Commit Graph

7 Commits

Author SHA1 Message Date
Emmanuele Bassi
f1105807fb 2007-10-18 Emmanuele Bassi <ebassi@openedhand.com>
* 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)
2007-10-18 12:31:07 +00:00
Emmanuele Bassi
a4b7abd18e 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Parse flags like we parse enums.
2007-10-10 13:01:09 +00:00
Emmanuele Bassi
7aa52af5dd 2007-10-10 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/json/json-parser.c: Use the commodity JsonNode API
	and accept bare values as root nodes.

	* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Unreference the created objects
	only if they are top-levels, like ClutterBehaviour and
	ClutterTimelines. Actors have floating references, so we
	just transfer ownership to their containers, and the stage
	is owned by the backend. Add the "type_func" key to the
	object definition, so the user can supply its own GType
	function if the class name doesn't follow the GObject rules.
	Document the ClutterScript public API.
2007-10-10 10:42:19 +00:00
Emmanuele Bassi
0d7184db20 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Allow applying behaviours directly
	inside the UI definition data.

	* tests/test-script.c: Test the "behaviours" member.
2007-10-09 15:11:01 +00:00
Emmanuele Bassi
ac9aa06fcf 2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.h:
	* clutter/clutter-script.c: Add licensing information to
	the newly added files.

	* clutter/clutter-script.c: Support creating behaviours with
	ClutterScript. ClutterAlpha objects are implicit, but
	timelines can be both explicit objects using their id or
	implicit objects. Make the property resolution and translation
	more robust. Support the pixbuf property.

	* tests/test-script.c: Test the newly added features.

	* docs/reference/clutter-docs.sgml:
	* docs/reference/clutter-sections.txt: Add ClutterScript.
2007-10-09 13:29:03 +00:00
Emmanuele Bassi
76dd06bc7b 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-private.h:
	* clutter/clutter-script.c: Allow defining childrens for every
	container actor inside the UI definition files.
2007-10-08 16:25:10 +00:00
Emmanuele Bassi
991562f536 2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

	* clutter/json/Makefile.am:
	* clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based
	JSON parser/generator library. We use it in-tree because we might
	need to change the API. Ideally, we'd depend on it.

	* clutter/clutter.h:
	* clutter/clutter-script-private.h:
	* clutter/clutter-script.[ch]: ClutterScript, the scenegraph
	generator class. It parses JSON streams in form of buffers and
	files and builds the scene.

	* clutter/clutter-debug.h:
	* clutter/clutter-main.c: Add a "script" debug flag

	* clutter/Makefile.am: Build glue.

	* tests/Makefile.am:
	* tests/test-script.c: Add a test case for the ClutterScript.

	* configure.ac: Depend on GLib 2.14, so we can use the
	g_hash_table_get_key() and g_hash_table_get_values() functions
	for the time being; we can probably reimplement those, but we
	are going to need 2.14 anyway if we are going to implement a
	list model using GSequence.
2007-10-08 15:03:22 +00:00