On Sun, 2008-03-30 at 02:01 +0100, koos vriezen wrote:
> > Also check the new marker support in trunk (and scores) - that may be
> > able to be used as you describe with some wrapping, but Im not 100% on
> > that.
>
> I saw the marker addition. But I didn't quite understand how to use
> this that I would benefit from this. I guess I give the sources
> another look.
a quick overview on the markers API:
markers are per-timeline unique identifiers attached to a specific frame
or at a specific time. each time a timeline reaches a marker, a signal
will be emitted.
for instance, if you have a timeline of duration=1000 and you want to
receive notification of it being halfway through (to start another
timeline or to update the animation), you just need to add a marker at
the given time and connect to the ::marker-reached signal:
clutter_timeline_add_marker_at_time (timeline, "half", 500);
g_signal_connect (timeline, "marker-reached", half_cb, NULL);
the ::marker-reached signal is also detailed with the marker name, so
you can have multiple markers and a different callback for each one:
clutter_timeline_add_marker_at_time (timeline, "foo", 250);
clutter_timeline_add_marker_at_time (timeline, "bar", 500);
clutter_timeline_add_marker_at_time (timeline, "baz", 750);
g_signal_connect (timeline, "marker-reached::foo", foo_cb, NULL);
g_signal_connect (timeline, "marker-reached::bar", bar_cb, NULL);
g_signal_connect (timeline, "marker-reached::baz", baz_cb, NULL);
if a frame with a marker attached was skipped, the timeline will still
emit the ::marker-reached signal, exactly like we guarantee that
the ::completed signal will be emitted even if the last frame has been
dropped.
the Score object has also been changed to use markers: you can now
append a timeline at a specific marker on the parent.
+++
to reply to your first email: what you need is ClutterScore.
ciao,
Emmanuele.
-- Emmanuele Bassi, OpenedHand Ltd. Unit R, Homesdale Business Centre 216-218 Homesdale Rd., Bromley - BR12QZ http://www.o-hand.com -- To unsubscribe send a mail to clutter+unsubscribe_at_o-hand.comReceived on Thu Apr 03 2008 - 02:15:32 EDT
This archive was generated by hypermail 2.2.0 : Thu Apr 03 2008 - 03:00:17 EDT