The Behaviour class and its implementations have been replaced by the
new animation framework API and by the constraints for layout-related
animations.
Currently, we need to make tests build, so we undef DISABLE_DEPRECATED
in specific test cases while they get ported.
Unparented actors are owned by the Script instance, and if that goes
away then the actors go away with it. The fact that we needed an
explicit destroy() before was a hint of a memory management issue that I
blissfully - and regretfully - ignored for the sake of a passing test
suite.
Layout properties work similarly to child properties, with the added
headache that they require the 3-tuple:
( layout manager, container, actor )
to be valid in order to be inspected, parsed and applied. This means
using the newly added back-pointer from the container to the layout
manager and then rejigging a bit how the ScriptParser handles the
unresolved properties.
Similarly to the child properties, which use the "child::" prefix, the
layout manager properties use the "layout::" prefix and are defined with
the child of a container holding a layout manager.
The ClutterScript parser needs to be extended to parse child properties
and apply them after an actor has been added to a container. In order to
distinguish child properties from regular GObject properties we can use
the "child::" prefix, e.g.:
{
"type" : "ClutterRectangle",
"id" : "child-01",
"child::has-focus" : true,
...
}
Parsing child properties can be deferred to the ClutterScriptable
interface, just like regular properties.
All the ClutterColor parsing rules should be coalesced inside
clutter_script_parse_color(): object, array and string notations
are the canonical ways of defining a ClutterColor inside a
ClutterScript definition. Having a single function in charge of
the parsing cleans up the code.
ClutterScript is a very complicated piece of machinery, with a
parser that has custom variations on top of the basic JSON
format; it could also be extended in the future, so if we don't
want to introduce regressions or break existing ClutterScript
definitions, we'd better have a conformance test suite.