Top | ![]() |
![]() |
![]() |
![]() |
void | clutter_scriptable_set_id () |
const gchar * | clutter_scriptable_get_id () |
gboolean | clutter_scriptable_parse_custom_node () |
void | clutter_scriptable_set_custom_property () |
ClutterScriptable is implemented by ClutterActor, ClutterAlpha, ClutterAnimation, ClutterAnimator, ClutterBehaviour, ClutterBehaviourDepth, ClutterBehaviourEllipse, ClutterBehaviourOpacity, ClutterBehaviourPath, ClutterBehaviourRotate, ClutterBehaviourScale, ClutterBox, ClutterCairoTexture, ClutterClone, ClutterGLXTexturePixmap, ClutterGroup, ClutterInterval, ClutterKeyframeTransition, ClutterListModel, ClutterModel, ClutterPropertyTransition, ClutterRectangle, ClutterScrollActor, ClutterStage, ClutterState, ClutterText, ClutterTexture, ClutterTimeline, ClutterTransition, ClutterTransitionGroup and ClutterX11TexturePixmap.
The ClutterScriptableIface interface exposes the UI definition parsing process to external classes. By implementing this interface, a class can override the UI definition parsing and transform complex data types into GObject properties, or allow custom properties.
ClutterScriptable is available since Clutter 0.6
void clutter_scriptable_set_id (ClutterScriptable *scriptable
,const gchar *id_
);
Sets id_
as the unique Clutter script it for this instance of
ClutterScriptableIface.
This name can be used by user interface designer applications to define a unique name for an object constructable using the UI definition language parsed by ClutterScript.
Since: 0.6
const gchar *
clutter_scriptable_get_id (ClutterScriptable *scriptable
);
Retrieves the id of scriptable
set using clutter_scriptable_set_id()
.
the id of the object. The returned string is owned by the scriptable object and should never be modified of freed
Since: 0.6
gboolean clutter_scriptable_parse_custom_node (ClutterScriptable *scriptable
,ClutterScript *script
,GValue *value
,const gchar *name
,JsonNode *node
);
Parses the passed JSON node. The implementation must set the type
of the passed GValue pointer using g_value_init()
.
scriptable |
||
script |
the ClutterScript creating the scriptable instance |
|
value |
the generic value to be set |
|
name |
the name of the node |
|
node |
the JSON node to be parsed |
Since: 0.6
void clutter_scriptable_set_custom_property (ClutterScriptable *scriptable
,ClutterScript *script
,const gchar *name
,const GValue *value
);
Overrides the common properties setting. The underlying virtual function should be used when implementing custom properties.
scriptable |
||
script |
the ClutterScript creating the scriptable instance |
|
name |
the name of the property |
|
value |
the value of the property |
Since: 0.6
typedef struct _ClutterScriptable ClutterScriptable;
ClutterScriptable is an opaque structure whose members cannot be directly accessed
Since: 0.6
struct ClutterScriptableIface { void (* set_id) (ClutterScriptable *scriptable, const gchar *id_); const gchar *(* get_id) (ClutterScriptable *scriptable); gboolean (* parse_custom_node) (ClutterScriptable *scriptable, ClutterScript *script, GValue *value, const gchar *name, JsonNode *node); void (* set_custom_property) (ClutterScriptable *scriptable, ClutterScript *script, const gchar *name, const GValue *value); };
Interface for implementing "scriptable" objects. An object implementing this interface can override the parsing and properties setting sequence when loading a UI definition data with ClutterScript
virtual function for setting the id of a scriptable object |
||
virtual function for getting the id of a scriptable object |
||
virtual function for parsing complex data containers into GObject properties |
||
virtual function for setting a custom property |
Since: 0.6