* clutter/clutter-actor.c (parse_units),
(clutter_actor_parse_custom_node): Do not allow using percentages
of the stage on the stage itself, as it makes little to no
sense.
* clutter/clutter-script.c:
(clutter_script_construct_object): Rearrange code.
* tests/test-script.json: Do not set the size of the stage, to
test for the stage size percentage.
* clutter/clutter-actor.c (parse_units),
(clutter_actor_parse_custom_node),
(clutter_scriptable_iface_init): Override the parsing code
for the x, y, width and height properties of ClutterActor,
to allow strings with modifiers when defining the position
and/or the dimensions of an actor. Bare integers are assumed
as pixels; floating point values in the [0, 1] interval are
assumed as percentages; strings can have these modifiers:
- px - pixels
- mm - millimeters
- pt - points (at the current resolution)
- % - percentage of the stage
* clutter/clutter-units.h: Fix the conversion macros
* tests/test-script.json: Test the new values.
* clutter.symbols: Update with the new public symbols
* clutter/clutter-script.h:
* clutter/clutter-script-private.h:
* clutter/clutter-script.c:
(parse_signals), (json_object_end),
(signal_info_free), (object_info_free): Parse the "signals"
member for GObjects.
(clutter_script_connect_signals),
(clutter_script_connect_signals_full): Add new API for autoconnecting
signal handlers using the UI definition files.
* tests/test-script.c:
* tests/test-script.json: Test signal autoconnection.
* clutter/clutter-clone-texture.c (set_parent_texture): Hide the
clone texture only if it was visible, and show it again if we
are adding a visible texture.
* tests/test-script.json: Test the CloneTexture actor.
* clutter/json/json-parser.c:
(json_scanner_msg_handler): Set the GError to be returned by
the parsing functions into the GScanner error message handler.
(json_parser_object): Return the symbol token in case we have
a parse error after the member name.
(json_parser_load_from_data): Propagate the error set in the
message handler, if any.
* clutter/json/json-node.c (json_node_free): Unref the objects
only if are set, to avoid a couple of needless criticals we
get on error.
* tests/test-script.json: More properties.
* clutter/clutter-script-private.h:
* clutter/clutter-script.h:
* clutter/clutter-script.c: Allow id-less objects: as long
as they have a "type" member, a unique id will be provided.
(json_object_end): Add merge id to the object information
structure.
(apply_behaviours), (add_children): Keep the unresolved
objects around.
(construct_stage), (clutter_script_construct_object): If an
object has unresolved children or behaviours try resolving
them when we ask for it.
(json_parse_end), (clutter_script_ensure_objects): Ensure
that the objects are fully constructed as best as we can when
finished parsing.
(object_info_free), (remove_by_merge_id):
(clutter_script_unmerge_objects): Remove objects under the
same merge id returned by the loading functions. (Fixes
bug #558)
* tests/Makefile.am:
* tests/test-script.c:
* tests/test-script.json: Move part of the UI definition into
its own file and exercise clutter_script_load_from_file().