mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
timeline: Add repeat-count
Being able to easily set the number of repeats has been a request for the animation framework for some time now. The usual way to implement this is: connect to the ::completed signal, use a static counter, and stop the timeline when the counter hits a specific spot. In the same light as the :auto-reverse property, we can make it easier to implement this common functionality by adding a :repeat-count property that, when set, limits the amount of loops that a Timeline can perform before stopping itself. In fact, we can implement the :loop property in terms of the :repeat-count property just by using a sentinel value mapping to "infinity", and map loop=FALSE to repeat-count=0, and loop=TRUE to repeat-count=-1.
This commit is contained in:
@ -718,8 +718,8 @@ clutter_timeline_clone
|
||||
<SUBSECTION>
|
||||
clutter_timeline_set_duration
|
||||
clutter_timeline_get_duration
|
||||
clutter_timeline_set_loop
|
||||
clutter_timeline_get_loop
|
||||
clutter_timeline_set_repeat_count
|
||||
clutter_timeline_get_repeat_count
|
||||
clutter_timeline_set_delay
|
||||
clutter_timeline_get_delay
|
||||
ClutterTimelineDirection
|
||||
@ -727,6 +727,8 @@ clutter_timeline_set_direction
|
||||
clutter_timeline_get_direction
|
||||
clutter_timeline_set_auto_reverse
|
||||
clutter_timeline_get_auto_reverse
|
||||
clutter_timeline_set_loop
|
||||
clutter_timeline_get_loop
|
||||
|
||||
<SUBSECTION>
|
||||
clutter_timeline_start
|
||||
|
Reference in New Issue
Block a user