cookbook: Added comments to script example
authorElliot Smith <elliot.smith@intel.com>
Thu, 26 Aug 2010 16:07:21 +0000 (17:07 +0100)
committerElliot Smith <elliot.smith@intel.com>
Fri, 27 Aug 2010 10:21:30 +0000 (11:21 +0100)
Commented the ClutterScript example so it can be used
inline as part of the recipe, rather than as an
example in the appendix (it's too simple to warrant
a separate appendix).

doc/cookbook/examples/script-ui.c

index cc9a121..e02036b 100644 (file)
@@ -11,6 +11,7 @@ main (int argc, char *argv[])
   gchar *filename = "script-ui.json";
   GError *error = NULL;
 
+  /* load a JSON file into the script */
   clutter_script_load_from_file (ui, filename, &error);
 
   if (error != NULL)
@@ -20,6 +21,7 @@ main (int argc, char *argv[])
       exit (EXIT_FAILURE);
     }
 
+  /* retrieve objects from the script */
   ClutterActor *stage;
 
   clutter_script_get_objects (ui,