mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
cookbook: Use clutter_timeline_set_repeat_count()
This commit is contained in:
parent
97feb06a6f
commit
657e0ce093
@ -2346,7 +2346,7 @@ clutter_animator_start (animator);
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
ClutterTimeline *timeline = clutter_timeline_new (1000);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
@ -2398,7 +2398,7 @@ clutter_actor_animate_with_timeline (actor,
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
ClutterTimeline *timeline = clutter_timeline_new (2000);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
@ -2554,7 +2554,7 @@ clutter_state_warp_to_state (transitions, "right");
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Setting the <type>ClutterTimeline</type> to loop
|
||||
(via <function>clutter_timeline_set_loop()</function>). This
|
||||
(via <function>clutter_timeline_set_repeat_count()</function>). This
|
||||
is the best approach where the timeline is explicit (for
|
||||
<type>ClutterAnimator</type> and implicit animations).</para>
|
||||
</listitem>
|
||||
@ -3140,7 +3140,7 @@ ClutterTimeline *timeline;
|
||||
* indefinitely and reverses its direction each time it completes
|
||||
*/
|
||||
timeline = clutter_timeline_new (1000);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
clutter_timeline_set_auto_reverse (timeline, TRUE);
|
||||
|
||||
/* animate the offset property on the constraint from 0.0 to 1.0;
|
||||
|
@ -39,7 +39,7 @@ main (int argc,
|
||||
clutter_actor_set_position (actor, 150, 50);
|
||||
|
||||
timeline = clutter_timeline_new (2000);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
|
||||
animator = clutter_animator_new ();
|
||||
clutter_animator_set_timeline (animator, timeline);
|
||||
|
@ -49,7 +49,7 @@ main (int argc,
|
||||
clutter_actor_set_position (state->actor, 150, 50);
|
||||
|
||||
state->timeline = clutter_timeline_new (1000);
|
||||
clutter_timeline_set_loop (state->timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (state->timeline, -1);
|
||||
clutter_timeline_set_auto_reverse (state->timeline, TRUE);
|
||||
|
||||
g_signal_connect (stage,
|
||||
|
@ -110,7 +110,7 @@ main (int argc,
|
||||
NULL);
|
||||
|
||||
timeline = clutter_animator_get_timeline (animator);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
clutter_timeline_set_auto_reverse (timeline, TRUE);
|
||||
|
||||
g_signal_connect (stage,
|
||||
|
@ -47,7 +47,7 @@ main (int argc,
|
||||
|
||||
/* set up the timeline */
|
||||
timeline = clutter_timeline_new (1000);
|
||||
clutter_timeline_set_loop (timeline, TRUE);
|
||||
clutter_timeline_set_repeat_count (timeline, -1);
|
||||
clutter_timeline_set_auto_reverse (timeline, TRUE);
|
||||
|
||||
clutter_actor_animate_with_timeline (rectangle, CLUTTER_LINEAR, timeline,
|
||||
|
Loading…
Reference in New Issue
Block a user