* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name
to ::set_id and ::get_id, to avoid potential confusion with the
ClutterActor:name property.
* clutter/clutter-script.h:
* clutter/clutter-script.c (clutter_script_construct_object): Use
clutter_scriptable_set_id().
(clutter_get_script_id): Add a public function to retrieve the ID
used in the UI definition files from an object.
* clutter/clutter-actor.c: Do not set the name of the actor with
the ID set in the UI definition files.
* tests/test-script.c: Test clutter_get_script_id().
* clutter.symbols: Update with the new symbols.
* 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.[ch]: Slight API change in the
clutter_script_get_objects() function: now it takes
object name/object return location pairs and returns the
number of objects found and returned.
* tests/test-script.c: Exercise the clutter_script_get_objects()
function.
* 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.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().
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.
* 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/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.
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.
* clutter/clutter-actor.[ch]: Remove the ::event-after signal
class handler, as it's not meant to be overridden by sub-classes.
(clutter_actor_class_init):
Make every event-related signal return a boolean: return TRUE
in a signal handler to block the emission. The value is accumulated
automatically by the signal API.
(clutter_actor_event): If ::event returns TRUE, skip to emitting
::event-after. Return the value accumulated by the signal emission
chain.
* clutter/clutter-private.h: Rename _clutter_boolean_accumlator().
* clutter/clutter-main.c (clutter_do_event): If clutter_actor_event()
returns TRUE then stop the event emission chain from child to parent.
* clutter/clutter-stage.c (clutter_stage_event): Behave like
clutter_actor_event().
(clutter_stage_get_key_focus),
(clutter_stage_set_key_focus): Avoid a nasty circular reference
issue: if the actor passed to set_key_focus is NULL then the stage
has the key focus.
* tests/test-events.c: Update the events test with the API
changes.
* clutter/clutter-actor.c:
* clutter/clutter-event.h:
* clutter/clutter-main.c:
* clutter/clutter-stage.c:
* clutter/clutter-stage.h:
* clutter/glx/clutter-backend-glx.c:
* clutter/glx/clutter-backend-glx.h:
* clutter/glx/clutter-event-glx.c:
* clutter/glx/clutter-stage-glx.c:
* clutter/glx/clutter-stage-glx.h:
Add initial support for stage state events.
Fix fullscreening for an already mapped stage.
* tests/test-events.c:
Print out info from the above. Blue button now toggles
fullscreen.
* clutter/clutter-effect.c:
* clutter/clutter-effect.h:
Add a setting for templates to ref or clone underlying
timelines. (As to improve sync issues like those in foofone)
* tests/test-timeline.c:
Also add completed signals.
* clutter/cogl/gles/cogl.c: (cogl_texture_image_2d):
* configure.ac:
Forward port from stable branch. RGB Image fixes gles
and check for lower case libgles_cm.
The clutter_timeout_pool_insert_sorted() function caused an inversion of
the timeout sources in the pool; this led to a wrong behaviour in the
execution of the timeout functions. See bug 471.
This patch drops clutter_timeout_pool_insert_sorted() in favour of the
standard g_list_insert_sorted(), which produces identical behaviours with
and without the pool.
A new test, written by Rob Bradford, has been added to the regression test
suite in order to identify sorting issues with the timeout pools.
* clutter/clutter-actor.c:
* clutter/clutter-actor.h:
* clutter/clutter-event.c:
* clutter/clutter-event.h:
* clutter/clutter-main.c:
* clutter/clutter-main.h:
* clutter/clutter-private.h:
* clutter/clutter-stage.c:
* clutter/clutter-stage.h:
* clutter/clutter-types.h:
Initial implementation of actors emmitting event signals (423);
- Actors set_reactive() to receive mouse events.
(call clutter_enable_motion_events() for per action motion events)
- clutter_stage_set_key_focus () to direct key events.
- Events bubble up to parents (ending at stage)
(original source identified by clutter_event_get_source())
TODO:
- enter/leave notifys for actors.
- stage specific events - fullscreen
- grabs
* tests/test-events.c:
Extend a little to use new API
* clutter/cogl/gl/cogl.c:
* clutter/glx/clutter-backend-glx.c:
Move get_proc_address into cogl and out of backend.
(shaders will need it)
* clutter/clutter-group.c: (clutter_group_real_lower):
Fix a minor compile warning.
* TODO:
Sync up.
ClutterBox is meant to work like the HTML boxing model: it has a margin and
a backgrdound color, and every child actor is added with a pack type and a
padding. The ClutterBoxChild structure holds the child actor, the padding,
the packing type and the allocated coordinates for the actor.
* clutter/clutter-behaviour-depth.c:
Modify to work like all other behvaiours in not forcing
increasing order in behaviour 'limits'. (#436)
Rename limit min/max props to start/end.
* tests/test-depth.c:
Simplify test-case to work with above change and
without multiple ramps
* clutter/clutter-behaviour-rotate.c:
Handle CW rotation when end > start and similar for CCW just
like ellipse behaviour.
* clutter/clutter-behaviour-depth.c: Clarify that what drives
the movement along the Z axis is the ClutterAlpha object (we
don't have the luxury of a rollover like the opacity does);
so, if you want to go from 0 to -100 you have to use a
decreasing function, just as well if you want to go from 100
to 0. Using a min-depth of 100 and a max-depth of 0 and an
increasing function is undefined behaviour.
* tests/Makefile.am:
* tests/test-depth.c: Add a test case for the depth behaviour.
Most of these fixes are simple symbol shadowing issues, like index and the
braindead y0 and y1 extern symbols exported by math.h on GNU libc systems.
There is a masking issue in ClutterTexture which should be checked; I ran
the tests and everything looked fine.
The rest are just unused variables.