script: Separate construction from properties application

Currently, ClutterScriptParser will construct the object (using the
construct-only and construct parameters), apply the properties from
the ClutterScript definition, and eventuall will add children and
behaviours.

The construction phase should be more compartimentalized: the objects
should be constructed first and eventual children and behaviours
added. Then, once an object is requested or when the parsing process
has terminated, all the properties should be applied.

This change allows us to set up the actors before setting their
non-construct properties.
This commit is contained in:
Emmanuele Bassi
2009-11-04 14:05:13 +00:00
parent 31e5dadb68
commit 4df59d330c
3 changed files with 90 additions and 81 deletions

View File

@ -101,9 +101,6 @@ gboolean clutter_script_parse_node (ClutterScript *script,
GType clutter_script_get_type_from_symbol (const gchar *symbol);
GType clutter_script_get_type_from_class (const gchar *name);
GObject *_clutter_script_construct_object (ClutterScript *script,
ObjectInfo *info);
gulong clutter_script_resolve_animation_mode (const gchar *namer);
gboolean clutter_script_enum_from_string (GType gtype,
@ -125,6 +122,11 @@ gboolean clutter_script_parse_color (ClutterScript *script,
GObject *clutter_script_parse_alpha (ClutterScript *script,
JsonNode *node);
void _clutter_script_construct_object (ClutterScript *script,
ObjectInfo *oinfo);
void _clutter_script_apply_properties (ClutterScript *script,
ObjectInfo *oinfo);
gchar *_clutter_script_generate_fake_id (ClutterScript *script);
void _clutter_script_warn_missing_attribute (ClutterScript *script,