Added a recipe explaining how to connect signals to handlers
in the JSON definition used by ClutterScript; also shows
how to connect the signals in code once the JSON has been
loaded.
Includes guidelines on writing handlers (i.e. need to use
-export-dynamic and non-static functions) and example
which connects a handler for motion events on a rectangle.
GEnum nicknames can be used to set properties in JSON
definitions, so added a callout to the JSON example explaining
this, and showing how to derive the nickname for an enumeration
value.
Modified the example code to use nicknames as well.
As JSON can make use of nicknames for GEnum properties,
mentioned this in the table mapping C property values
to their JSON equivalents (as the nick name is a much
shorter and cleaner way of setting a property in JSON).
Wrote an introduction to using ClutterScript with JSON. Focus
is on explaining why you might want to use it, basic principles
of operation (with annotated JSON sample), and how to map
data types from C to JSON.
Written simultaneously with a short recipe (uses the same sample
code) showing how to load a JSON file and retrieve objects
from it in code.
New script chapter needs an introduction.
While writing the introduction, also slightly changed the
emphasis of the recipe (towards refactoring an existing
application to use ClutterScript) and incorporated example
code into documentation.