2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name
	to ::set_id and ::get_id, to avoid potential confusion with the
	ClutterActor:name property.

	* clutter/clutter-script.h:
	* clutter/clutter-script.c (clutter_script_construct_object): Use
	clutter_scriptable_set_id().

	(clutter_get_script_id): Add a public function to retrieve the ID
	used in the UI definition files from an object.

	* clutter/clutter-actor.c: Do not set the name of the actor with
	the ID set in the UI definition files.

	* tests/test-script.c: Test clutter_get_script_id().

	* clutter.symbols: Update with the new symbols.
This commit is contained in:
Emmanuele Bassi
2007-11-14 11:32:24 +00:00
parent bbf57ee461
commit b0e169d73c
10 changed files with 93 additions and 58 deletions

View File

@ -43,8 +43,8 @@ typedef struct _ClutterScriptableIface ClutterScriptableIface;
/**
* ClutterScriptableIface:
* @set_name: virtual function for setting the name of a scriptable object
* @get_name: virtual function for getting the name of a scriptable object
* @set_id: virtual function for setting the id of a scriptable object
* @get_id: virtual function for getting the id of a scriptable object
* @parse_custom_node: virtual function for parsing complex data containers
* into GObject properties
* @set_custom_property: virtual function for setting a custom property
@ -59,9 +59,9 @@ struct _ClutterScriptableIface
{
GTypeInterface g_iface;
void (* set_name) (ClutterScriptable *scriptable,
void (* set_id) (ClutterScriptable *scriptable,
const gchar *name);
const gchar *(* get_name) (ClutterScriptable *scriptable);
const gchar *(* get_id) (ClutterScriptable *scriptable);
gboolean (* parse_custom_node) (ClutterScriptable *scriptable,
ClutterScript *script,
@ -76,9 +76,9 @@ struct _ClutterScriptableIface
GType clutter_scriptable_get_type (void) G_GNUC_CONST;
void clutter_scriptable_set_name (ClutterScriptable *scriptable,
const gchar *name);
G_CONST_RETURN gchar *clutter_scriptable_get_name (ClutterScriptable *scriptable);
void clutter_scriptable_set_id (ClutterScriptable *scriptable,
const gchar *id);
G_CONST_RETURN gchar *clutter_scriptable_get_id (ClutterScriptable *scriptable);
gboolean clutter_scriptable_parse_custom_node (ClutterScriptable *scriptable,
ClutterScript *script,
GValue *value,