[clutter] docs: Use ClutterTimeline:repeat-count instead of :loop



commit d808367fe451005cf1e7923434cf08d2afc0c29c
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Feb 13 15:26:26 2012 +0000

    docs: Use ClutterTimeline:repeat-count instead of :loop

 .../clutter/clutter-animation-tutorial.xml         |   15 +++++++++++----
 .../clutter/migrating-ClutterBehaviour.xml         |    2 +-
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/doc/reference/clutter/clutter-animation-tutorial.xml b/doc/reference/clutter/clutter-animation-tutorial.xml
index c553777..e9f1bf8 100644
--- a/doc/reference/clutter/clutter-animation-tutorial.xml
+++ b/doc/reference/clutter/clutter-animation-tutorial.xml
@@ -185,9 +185,16 @@ on_new_frame (ClutterTimeline *timeline,
 
   ClutterTimeline *timeline;
 
-  timeline = clutter_timeline_new (1000); /* one second */
-  clutter_timeline_set_loop (timeline, TRUE);
+  /* one second */
+  timeline = clutter_timeline_new (1000);
+
+  /* looping indefinitely */
+  clutter_timeline_set_repeat_count (timeline, -1);
+
+  /* get a notification each time a new frame should be drawn */
   g_signal_connect (timeline, "new-frame", G_CALLBACK (on_new_frame), actor);
+
+  /* start the timeline once control returns to the main loop */
   clutter_timeline_start (timeline);
       </programlisting>
     </example>
@@ -307,9 +314,9 @@ main (int argc, char *argv[])
   actor = clutter_texture_new_from_file ("ohpowers.png", NULL);
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor);
 
-  /* set up the animation to be 4 seconds long */
+  /* set up the animation to be 4 seconds long, and looping indefinitely */
   timeline = clutter_timeline_new (4000);
-  clutter_timeline_set_loop (timeline, TRUE);
+  clutter_timeline_set_repeat_count (timeline, -1);
 
   /* set up a sinusoidal easing mode to power the behaviour; the
    * alpha will take a reference on the timeline so we can safely
diff --git a/doc/reference/clutter/migrating-ClutterBehaviour.xml b/doc/reference/clutter/migrating-ClutterBehaviour.xml
index 64ad280..cc4c39e 100644
--- a/doc/reference/clutter/migrating-ClutterBehaviour.xml
+++ b/doc/reference/clutter/migrating-ClutterBehaviour.xml
@@ -105,7 +105,7 @@ reverse_timeline (ClutterTimeline *timeline)
                            NULL);
 
   ClutterTimeline *timeline = clutter_animation_get_timeline (animation);
-  clutter_timeline_set_loop (timeline, TRUE);
+  clutter_timeline_set_repeat_count (timeline, -1);
   clutter_timeline_set_auto_reverse (timeline, TRUE);
     </programlisting>
   </informalexample>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]