[clutter-tutorial] Use clutter-1.0 and clutter-gtk-0.10.



commit d75f29af1a801d9c6e801d2bdb15652860caccf7
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Aug 26 14:25:56 2009 +0200

    Use clutter-1.0 and clutter-gtk-0.10.
    
    * configure.ac: Use clutter-1.0 and clutter-gtk-0.10.
    * examples/gtk_scrolling/main.c (main): gtk_clutter_viewport_new() takes
    an extra parameter now.
    * examples/custom_container/examplebox.c (example_box_pick):
    * examples/scrolling/scrollingcontainer.c
    (example_scrolling_container_pick): Use clutter_actor_paint() instead of
    deprecated clutter_actor_pick(), though I am now not sure if these
    implementations are correct at all.

 ChangeLog                               |   13 +++++++++++++
 Makefile_web.am_fragment                |    2 +-
 configure.ac                            |    2 +-
 examples/custom_container/examplebox.c  |   12 ++++++++++--
 examples/gtk_scrolling/main.c           |    4 ++--
 examples/scrolling/scrollingcontainer.c |    8 ++++++--
 6 files changed, 33 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ecb7f16..a368f83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-08-26  Murray Cumming  <murrayc murrayc com>
+
+  Use clutter-1.0 and clutter-gtk-0.10.
+
+	* configure.ac: Use clutter-1.0 and clutter-gtk-0.10.
+	* examples/gtk_scrolling/main.c (main): gtk_clutter_viewport_new() takes 
+	an extra parameter now.
+	* examples/custom_container/examplebox.c (example_box_pick):
+	* examples/scrolling/scrollingcontainer.c
+	(example_scrolling_container_pick): Use clutter_actor_paint() instead of 
+	deprecated clutter_actor_pick(), though I am now not sure if these 
+	implementations are correct at all.
+
 2009-06-25  Murray Cumming  <murrayc murrayc com>
 
 	Timeline, Animations: Mentino duration not frames-per-second.
diff --git a/Makefile_web.am_fragment b/Makefile_web.am_fragment
index 7f67ed2..0042e9a 100644
--- a/Makefile_web.am_fragment
+++ b/Makefile_web.am_fragment
@@ -1,5 +1,5 @@
 web_host = www.openismus.com
-web_path = /home/murrayc/openismus.com/documents/clutter_tutorial/0.9/
+web_path = /home/murrayc/openismus.com/documents/clutter_tutorial/1.0/
 web_path_docs = $(web_path)docs/
 
 rsync_args = -vz --rsh ssh
diff --git a/configure.ac b/configure.ac
index 169ae77..62766b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ Please install GNU make.]))
 #########################################################################
 #  Dependancy checks
 #########################################################################
-PKG_CHECK_MODULES(CLUTTER_DOC, clutter-0.9 clutter-gtk-0.9)
+PKG_CHECK_MODULES(CLUTTER_DOC, clutter-1.0 clutter-gtk-0.10)
 AC_SUBST(CLUTTER_DOC_CFLAGS)
 AC_SUBST(CLUTTER_DOC_LIBS)
 
diff --git a/examples/custom_container/examplebox.c b/examples/custom_container/examplebox.c
index f228b51..9ae2a13 100644
--- a/examples/custom_container/examplebox.c
+++ b/examples/custom_container/examplebox.c
@@ -173,14 +173,22 @@ example_box_pick (ClutterActor *actor,
                   const ClutterColor *color)
 {
   ExampleBox *box = EXAMPLE_BOX (actor);
-  GList *l;
+  GList *l = NULL;
+  
+  /* Chain up so we get a bounding box painted (if we are reactive) */
+  CLUTTER_ACTOR_CLASS (example_box_parent_class)->pick (actor, color);
+
 
+  /* TODO: Do something with the color?
+   * In clutter 0.8 we used it to call clutter_actor_pick() on the children,
+   * but now we call clutter_actor_paint() instead.
+   */
   for (l = box->children; l; l = l->next)
     {
       ClutterActor *child = l->data;
 
       if (CLUTTER_ACTOR_IS_MAPPED (child))
-        clutter_actor_pick (child, color);
+        clutter_actor_paint (child);
     }
 }
 
diff --git a/examples/gtk_scrolling/main.c b/examples/gtk_scrolling/main.c
index 71cf6bf..b54d13f 100644
--- a/examples/gtk_scrolling/main.c
+++ b/examples/gtk_scrolling/main.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
 
   /* Create a viewport actor to be able to scroll actor. By passing NULL it
    * will create new GtkAdjustments. */
-  ClutterActor *viewport = gtk_clutter_viewport_new (NULL, NULL);
+  ClutterActor *viewport = gtk_clutter_viewport_new (NULL, NULL, NULL);
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), viewport);
 
   /* Load image from first command line argument and add it to viewport: */
@@ -94,4 +94,4 @@ int main(int argc, char *argv[])
   gtk_main();
 
 	return EXIT_SUCCESS;
-}
\ No newline at end of file
+}
diff --git a/examples/scrolling/scrollingcontainer.c b/examples/scrolling/scrollingcontainer.c
index dc28e18..a5f9ccb 100644
--- a/examples/scrolling/scrollingcontainer.c
+++ b/examples/scrolling/scrollingcontainer.c
@@ -143,13 +143,17 @@ example_scrolling_container_paint (ClutterActor *actor)
 }
 
 /* An implementation for the ClutterActor::pick() vfunc,
-   picking all the child actors: */
+   drawing outlines of all the child actors: */
 static void
 example_scrolling_container_pick (ClutterActor *actor, 
                                   const ClutterColor *color)
 {
   ExampleScrollingContainer *self = EXAMPLE_SCROLLING_CONTAINER (actor);
-  clutter_actor_pick (self->group, color);
+
+  /* Chain up so we get a bounding box painted (if we are reactive) */
+  CLUTTER_ACTOR_CLASS (example_scrolling_container_parent_class)->pick (actor, color);
+
+  clutter_actor_paint (self->group);
 }
 
 /* An implementation for the ClutterActor::allocate() vfunc: */



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