From 62cc9ec3c9f9575146a847ebb25d1049446629cf Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 19 Jun 2008 20:45:28 +0000 Subject: [PATCH] 2008-06-19 Emmanuele Bassi * clutter/clutter-script.c: Be more explicit about the fact that the script id is not the name of an actor, and that it is retrieved by using clutter_get_script_id(). --- ChangeLog | 6 ++++++ clutter/clutter-script.c | 29 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3843bc82..f8e604122 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-19 Emmanuele Bassi + + * clutter/clutter-script.c: Be more explicit about the fact that + the script id is not the name of an actor, and that it is retrieved + by using clutter_get_script_id(). + 2008-06-17 Emmanuele Bassi * clutter/clutter-actor.h: diff --git a/clutter/clutter-script.c b/clutter/clutter-script.c index cfcf047d3..e826632ad 100644 --- a/clutter/clutter-script.c +++ b/clutter/clutter-script.c @@ -47,7 +47,7 @@ * * A simple object might be defined as: * - * + * |[ * { * "id" : "red-button", * "type" : "ClutterRectangle", @@ -55,18 +55,20 @@ * "height" : 100, * "color" : "0xff0000ff" * } - * + * ]| * * This will produce a red #ClutterRectangle, 100x100 pixels wide, and - * with a name of "red-button"; it can be retrieved by calling: + * with a ClutterScript id of "red-button"; it can be retrieved by calling: * - * + * |[ * ClutterActor *red_button; * * red_button = CLUTTER_ACTOR (clutter_script_get_object (script, "red-button")); - * + * ]| * - * and then manipulated with the Clutter API. + * and then manipulated with the Clutter API. For every object created + * using ClutterScript it is possible to check the id by calling + * clutter_get_script_id(). * * Packing can be represented using the "children" member, and passing an * array of objects or ids of objects already defined (but not packed: the @@ -76,7 +78,7 @@ * Behaviours and timelines can also be defined inside a UI definition * buffer: * - * + * |[ * { * "id" : "rotate-behaviour", * "type" : "ClutterBehaviourRotate", @@ -88,19 +90,19 @@ * "function" : "sine" * } * } - * + * ]| * * And then to apply a defined behaviour to an actor defined inside the * definition of an actor, the "behaviour" member can be used: * - * + * |[ * { * "id" : "my-rotating-actor", * "type" : "ClutterTexture", * ... * "behaviours" : [ "rotate-behaviour" ] * } - * + * ]| * * A #ClutterAlpha belonging to a #ClutterBehaviour can only be defined * implicitely. A #ClutterTimeline belonging to a #ClutterAlpha can be @@ -115,7 +117,7 @@ * then autoconnected to their respective signals using the * clutter_script_connect_signals() function: * - * + * |[ * ... * "signals" : [ * { "name" : "button-press-event", "handler" : "on_button_press" }, @@ -124,8 +126,9 @@ * "handler" : "after_foo", * "after" : true * }, - * ] - * + * ], + * ... + * ]| * * Signal handler definitions must have a "name" and a "handler" members; * they can also have the "after" and "swapped" boolean members (for the