* clutter/clutter-actor.c: Implement part of the ClutterScriptable
interface, using the ClutterActor API to set and get the name
of an actor.
(clutter_geometry_copy), (clutter_geometry_free): Use
the slice allocator to avoid fragmentation when setting
properties and emitting signals (that is: when packing
boxed types into GValues).
(clutter_actor_box_copy), (clutter_actor_box_free),
(clutter_vertex_copy), (clutter_vertex_free): Ditto.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_push_transform_child),
(clutter_actor_pop_transfomr_child): Simple wrappers around
COGL API, which avoid including clutter/cogl.h when writing
container actors outside Clutter.
* clutter/Makefile.am:
* clutter/clutter.h:
* clutter/clutter-scriptable.[ch]: Add the ClutterScriptable
interface; by implementing this interface, a class can
override the UI definition parsing and transform complex data
types into GObject properties, or allow custom properties.
* clutter/clutter-script.c:
* clutter/clutter-script-parser.c:
* clutter/clutter-script-private.h: Rearrange the code and
use the ClutterScriptable interface to parse and build the
custom properties. This cleans up the code and also it makes
it more reliable (the complex type parsing is now done using
the target type and not just the name of the property).
* clutter/clutter-json.h: Header for including the JSON
parsing and data types.
* clutter/json/json-types.h: Add JSON_NODE_VALUE_TYPE() macro.
* clutter/json/Makefile.am: Install the JSON headers into a
private location. This might change in the future, and might
also cause collisions if you're using JSON-GLib and Clutter
at the same time, so be warned.
* 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)
* clutter/clutter-actor.c:
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Add the :reactive property, to
control reactiveness using the UI definition files.
(clutter_actor_reparent): Do not assume the parent is a
ClutterContainer, and call the container API only if needed.
(clutter_actor_destroy): Remove from the parent if needed,
just like the documentation says.
* clutter/json/json-object.c: Automatically transform every
delimiter into an underscore.
* clutter/clutter-script.c: Implement the "parent_texture"
property translation for ClutterCloneTextures, using the
passed id of the parent texture.
* clutter/clutter-timeline.[ch]: Added ClutterTimeline:duration,
a property for setting the duration of a timeline in milliseconds.
The property comes with accessors and a new constructor. The
frame rate used is the default value.
* clutter/clutter-private.h:
* clutter/clutter-main.[ch]: Add clutter_get_default_frame_rate()
and clutter_set_default_frame_rate(); these two functions control
the default frame rate to be used when creating timelines. Currently
is set to 60 frames-per-second.
* clutter.symbols:
Added a bunch of missing symbols.
* clutter/clutter-script.c:
* json/json-node.c:
Use g_slice_new0 instead of g_slice_new to avoid passing garbage to functions.
* tests/test-threads.c:
Replaced non-portable sleep() with g_usleep().
* clutter/clutter-actor.c:
More events documentation.
* clutter/clutter-event.c:
* clutter/clutter-event.h:
Add synthetic flag and make put_event use it
(via modded patch from pippin)
* clutter/clutter-main.c: (clutter_do_event):
dont use put event anymore when pushing enter/leave events.
* clutter.symbols:
A list of public symbols, one per line; semi-autogenerated, so
might not be complete -- PLEASE when adding new public APIs, add
the function name to this file.
* clutter/clutter-script.c (construct_timline),
(parse_member_to_property): Transfer ownership of the
implicit timelines to the behaviour, so that they get
unreferenced when the behaviour is destroyed.
(parse_member_to_property): Reverse the list of children
and behaviours.
Portability fixes:
* clutter/clutter-private.h:
Bracket #include "unistd.h" with #ifdef HAVE_UNISTD_H
* clutter/clutter-fixed.c:
Use "", not <> for inclusion of local files.
(clutter_sqrtx): forward declare local variables.
* clutter/clutter-debug.h:
Added non-gcc (c99) implementation of variadic debug macros for
when not compiling with gcc.
* clutter/pango/pangoclutter-render.c:
Fixed some strange uses of CLUTTER_NOTE() + stripped trailing
whitespace.
smaller than the original, seems to work well down to about a scale
of 50%.
* clutter/pango/pangoclutter-fontmap.c:
(pango_clutter_font_map_default_substitute): turn off hinting.
* clutter/pango/pangoclutter-render.c: request linear filtering
instead of nearest neighbour when scaling down.
* tests/test-text.c: replaced test with a a test that renders a sample
grid with various pixel sizes and scales for visual inspection of
text rendering quality.
* clutter/clutter-actor.c: Remove the ::event-after signal:
three event layers to connect to seems a bit overkill.
(clutter_actor_event): Return FALSE, not TRUE by default,
as g_signal_emit() will change the return value if no
handlers are connected
* clutter/clutter-stage.c: Emit ::notify when we change
the fullscreen property.
* clutter/clutter-script.c: Add more documentation for the
definition format and keywords.
(translate_property): Collapse the G_TYPE_ENUM and G_TYPE_FLAGS
cases into one, to simplify the code.
* tests/test-script.c: Test enumeration conversion by using
a value different from the default.
* clutter/json/json-types.h:
* clutter/json/json-array.c:
* clutter/json/json-object.c: Resync with the upstream copy
of JSON-GLib; add json_object_remove_member() and
json_array_remove_element() and fix the g_hash_table_get_keys()
replacement for GLib 2.12.
* clutter/clutter-script.c: Clean up the complex properties
parsing code.
* 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.
* 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().
* clutter/clutter-script.c (clutter_script_get_object): Construct
the requested object if it hasn't been already. This allows
referencing objects within the same snippet.
* tests/test-script.c: Declare a timeline and use it inside
multiple behaviours; apply multiple behaviours to various
actors, then retrieve the timeline to start it when the test
runs.
* clutter/eglnative/clutter-backend-egl.c:
(clutter_backend_egl_dispose):
Call eglTerminate() on the display when the backend is disposed of.
* clutter/eglnative/clutter-stage-egl.c:
(clutter_stage_egl_realize):
Don't use the createNativeWindow() call, it's not generic EGL.
* 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.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
* clutter/clutter-private.h:
* clutter/clutter-main.c:
Add a hash to global clutter context mapping all parented actor
id's to actors.
Add clutter_get_actor_by_id() call.
Convert picking machinery to use above.
(performance/simpler composite actor creation)
* clutter/clutter-stage.c: (clutter_stage_fullscreen),
(clutter_stage_unfullscreen), (clutter_stage_event):
Only set the fullscreen property on stage state fullscreen event(#545)
Experimental as could be painful to implement on non X backends.