[clutter/deprecate-default-stage: 11/14] docs: Remove clutter_stage_get_default()



commit 26aa4b5290c65984a0512a0ba4a30ab777628269
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Wed Nov 9 17:49:25 2011 +0000

    docs: Remove clutter_stage_get_default()
    
    A lot of the example code in the cookbook and the API reference still
    uses the default stage â sometimes as if it were a non-default one,
    which once again demonstrates how the default stage was a flawed concept
    that just confused people.

 clutter/clutter-actor.c                            |    2 +-
 .../examples/animations-looping-animator.c         |    2 +-
 .../examples/animations-looping-implicit.c         |    2 +-
 doc/cookbook/examples/animations-looping-state.c   |    2 +-
 doc/cookbook/examples/animations-moving-animator.c |    2 +-
 doc/cookbook/examples/animations-moving-implicit.c |    2 +-
 doc/cookbook/examples/animations-moving-state.c    |    2 +-
 doc/cookbook/examples/animations-rotating.c        |    2 +-
 doc/cookbook/examples/animations-scaling-zoom.c    |    2 +-
 doc/cookbook/examples/animations-scaling.c         |    2 +-
 doc/cookbook/examples/events-buttons-click.c       |    2 +-
 doc/cookbook/examples/events-buttons-lasso.c       |    2 +-
 doc/cookbook/examples/events-buttons.c             |    2 +-
 doc/cookbook/examples/events-mouse-scroll.c        |    3 ++-
 .../examples/events-pointer-motion-crossing.c      |    2 +-
 .../examples/events-pointer-motion-scribbler.c     |    3 ++-
 .../examples/events-pointer-motion-stacked.c       |    3 ++-
 doc/cookbook/examples/events-pointer-motion.c      |    3 ++-
 .../examples/layouts-bind-constraint-allocation.c  |    2 +-
 doc/cookbook/examples/layouts-box-menu.c           |    2 +-
 .../examples/layouts-box-property-effects.c        |    2 +-
 doc/cookbook/examples/layouts-box.c                |    2 +-
 .../examples/layouts-stacking-diff-sized-actors.c  |    3 ++-
 doc/cookbook/examples/layouts-stacking.c           |    3 ++-
 doc/cookbook/examples/textures-crossfade-cogl.c    |    2 +-
 .../examples/textures-crossfade-slideshow.c        |    2 +-
 doc/cookbook/examples/textures-crossfade.c         |    2 +-
 doc/cookbook/examples/textures-split-go.c          |    3 ++-
 doc/cookbook/examples/textures-sub-texture.c       |    3 ++-
 .../clutter/clutter-animation-tutorial.xml         |    3 ++-
 30 files changed, 39 insertions(+), 30 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 5a66c16..3c20406 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -12575,7 +12575,7 @@ _clutter_actor_foreach_child (ClutterActor *self,
 /* For debugging purposes this gives us a simple way to print out
  * the scenegraph e.g in gdb using:
  * [|
- *   _clutter_actor_traverse (clutter_stage_get_default (),
+ *   _clutter_actor_traverse (stage,
  *                            0,
  *                            _clutter_debug_print_actor_cb,
  *                            NULL,
diff --git a/doc/cookbook/examples/animations-looping-animator.c b/doc/cookbook/examples/animations-looping-animator.c
index 892ddaf..eb926ea 100644
--- a/doc/cookbook/examples/animations-looping-animator.c
+++ b/doc/cookbook/examples/animations-looping-animator.c
@@ -29,7 +29,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 300, 200);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-looping-implicit.c b/doc/cookbook/examples/animations-looping-implicit.c
index 0b23495..4ea03b2 100644
--- a/doc/cookbook/examples/animations-looping-implicit.c
+++ b/doc/cookbook/examples/animations-looping-implicit.c
@@ -39,7 +39,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 300, 200);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-looping-state.c b/doc/cookbook/examples/animations-looping-state.c
index de39233..43edb59 100644
--- a/doc/cookbook/examples/animations-looping-state.c
+++ b/doc/cookbook/examples/animations-looping-state.c
@@ -40,7 +40,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 300, 200);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-moving-animator.c b/doc/cookbook/examples/animations-moving-animator.c
index 03de112..b13d57c 100644
--- a/doc/cookbook/examples/animations-moving-animator.c
+++ b/doc/cookbook/examples/animations-moving-animator.c
@@ -79,7 +79,7 @@ if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
   state->animator = clutter_animator_new ();
   clutter_animator_set_duration (state->animator, 500);
 
-  state->stage = clutter_stage_get_default ();
+  state->stage = clutter_stage_new ();
   clutter_actor_set_size (state->stage, 400, 350);
   clutter_stage_set_color (CLUTTER_STAGE (state->stage), &stage_color);
   g_signal_connect (state->stage,
diff --git a/doc/cookbook/examples/animations-moving-implicit.c b/doc/cookbook/examples/animations-moving-implicit.c
index d1e57da..79083e6 100644
--- a/doc/cookbook/examples/animations-moving-implicit.c
+++ b/doc/cookbook/examples/animations-moving-implicit.c
@@ -47,7 +47,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 500, 500);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-moving-state.c b/doc/cookbook/examples/animations-moving-state.c
index a76edab..1208616 100644
--- a/doc/cookbook/examples/animations-moving-state.c
+++ b/doc/cookbook/examples/animations-moving-state.c
@@ -30,7 +30,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 650, 500);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-rotating.c b/doc/cookbook/examples/animations-rotating.c
index 8c6237b..411d5b8 100644
--- a/doc/cookbook/examples/animations-rotating.c
+++ b/doc/cookbook/examples/animations-rotating.c
@@ -42,7 +42,7 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   texture = clutter_texture_new ();
diff --git a/doc/cookbook/examples/animations-scaling-zoom.c b/doc/cookbook/examples/animations-scaling-zoom.c
index b78fccc..aa051c4 100644
--- a/doc/cookbook/examples/animations-scaling-zoom.c
+++ b/doc/cookbook/examples/animations-scaling-zoom.c
@@ -109,7 +109,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/animations-scaling.c b/doc/cookbook/examples/animations-scaling.c
index fe69bde..8fd5946 100644
--- a/doc/cookbook/examples/animations-scaling.c
+++ b/doc/cookbook/examples/animations-scaling.c
@@ -117,7 +117,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 350, 350);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/events-buttons-click.c b/doc/cookbook/examples/events-buttons-click.c
index 263aa89..f94bc79 100644
--- a/doc/cookbook/examples/events-buttons-click.c
+++ b/doc/cookbook/examples/events-buttons-click.c
@@ -26,7 +26,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/events-buttons-lasso.c b/doc/cookbook/examples/events-buttons-lasso.c
index c5597f9..16d37c6 100644
--- a/doc/cookbook/examples/events-buttons-lasso.c
+++ b/doc/cookbook/examples/events-buttons-lasso.c
@@ -125,7 +125,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 320, 240);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/events-buttons.c b/doc/cookbook/examples/events-buttons.c
index 92129a0..87f456f 100644
--- a/doc/cookbook/examples/events-buttons.c
+++ b/doc/cookbook/examples/events-buttons.c
@@ -60,7 +60,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/events-mouse-scroll.c b/doc/cookbook/examples/events-mouse-scroll.c
index 785e6c2..07cc0cb 100644
--- a/doc/cookbook/examples/events-mouse-scroll.c
+++ b/doc/cookbook/examples/events-mouse-scroll.c
@@ -78,8 +78,9 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   /* the scrollable actor */
   texture = clutter_texture_new ();
diff --git a/doc/cookbook/examples/events-pointer-motion-crossing.c b/doc/cookbook/examples/events-pointer-motion-crossing.c
index 0d21001..03852bb 100644
--- a/doc/cookbook/examples/events-pointer-motion-crossing.c
+++ b/doc/cookbook/examples/events-pointer-motion-crossing.c
@@ -37,7 +37,7 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   clutter_stage_set_title (CLUTTER_STAGE (stage), "btn");
 
diff --git a/doc/cookbook/examples/events-pointer-motion-scribbler.c b/doc/cookbook/examples/events-pointer-motion-scribbler.c
index 9337c00..4d5168d 100644
--- a/doc/cookbook/examples/events-pointer-motion-scribbler.c
+++ b/doc/cookbook/examples/events-pointer-motion-scribbler.c
@@ -115,9 +115,10 @@ main (int argc, char *argv[])
   cogl_path_new ();
   context->cogl_path = cogl_get_path ();
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   rect = clutter_rectangle_new_with_color (&actor_color);
   clutter_actor_set_size (rect, 300, 300);
diff --git a/doc/cookbook/examples/events-pointer-motion-stacked.c b/doc/cookbook/examples/events-pointer-motion-stacked.c
index 7a3d138..f92fa02 100644
--- a/doc/cookbook/examples/events-pointer-motion-stacked.c
+++ b/doc/cookbook/examples/events-pointer-motion-stacked.c
@@ -53,9 +53,10 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 300, 300);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   r1 = clutter_rectangle_new_with_color (&red);
   clutter_actor_set_size (r1, 150, 150);
diff --git a/doc/cookbook/examples/events-pointer-motion.c b/doc/cookbook/examples/events-pointer-motion.c
index 355f9c1..0a96bd7 100644
--- a/doc/cookbook/examples/events-pointer-motion.c
+++ b/doc/cookbook/examples/events-pointer-motion.c
@@ -32,9 +32,10 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   rectangle = clutter_rectangle_new_with_color (&rectangle_color);
   clutter_actor_set_size (rectangle, 300, 300);
diff --git a/doc/cookbook/examples/layouts-bind-constraint-allocation.c b/doc/cookbook/examples/layouts-bind-constraint-allocation.c
index 7d38dd5..a487331 100644
--- a/doc/cookbook/examples/layouts-bind-constraint-allocation.c
+++ b/doc/cookbook/examples/layouts-bind-constraint-allocation.c
@@ -38,7 +38,7 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/layouts-box-menu.c b/doc/cookbook/examples/layouts-box-menu.c
index e76c4a8..136f95f 100644
--- a/doc/cookbook/examples/layouts-box-menu.c
+++ b/doc/cookbook/examples/layouts-box-menu.c
@@ -91,7 +91,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/layouts-box-property-effects.c b/doc/cookbook/examples/layouts-box-property-effects.c
index 6557d5d..b712b91 100644
--- a/doc/cookbook/examples/layouts-box-property-effects.c
+++ b/doc/cookbook/examples/layouts-box-property-effects.c
@@ -322,7 +322,7 @@ main (int   argc,
   state->expand = FALSE;
   state->x_align = CLUTTER_BOX_ALIGNMENT_START;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/layouts-box.c b/doc/cookbook/examples/layouts-box.c
index e489f8f..9b2b40b 100644
--- a/doc/cookbook/examples/layouts-box.c
+++ b/doc/cookbook/examples/layouts-box.c
@@ -21,7 +21,7 @@ main (int   argc,
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
   clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
diff --git a/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c b/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c
index b302a23..45f47e1 100644
--- a/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c
+++ b/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c
@@ -17,8 +17,9 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, 400, 400);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_START,
                                    CLUTTER_BIN_ALIGNMENT_START);
diff --git a/doc/cookbook/examples/layouts-stacking.c b/doc/cookbook/examples/layouts-stacking.c
index f68f25b..4fda817 100644
--- a/doc/cookbook/examples/layouts-stacking.c
+++ b/doc/cookbook/examples/layouts-stacking.c
@@ -28,8 +28,9 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   layout = clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_CENTER,
                                    CLUTTER_BIN_ALIGNMENT_CENTER);
diff --git a/doc/cookbook/examples/textures-crossfade-cogl.c b/doc/cookbook/examples/textures-crossfade-cogl.c
index b01e508..6c111b1 100644
--- a/doc/cookbook/examples/textures-crossfade-cogl.c
+++ b/doc/cookbook/examples/textures-crossfade-cogl.c
@@ -149,7 +149,7 @@ main (int argc, char *argv[])
    * assign the material we created earlier to the Texture for painting
    * it
    */
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");
   clutter_actor_set_size (stage, 400, 300);
   clutter_actor_show (stage);
diff --git a/doc/cookbook/examples/textures-crossfade-slideshow.c b/doc/cookbook/examples/textures-crossfade-slideshow.c
index 983a66a..1a8b3ef 100644
--- a/doc/cookbook/examples/textures-crossfade-slideshow.c
+++ b/doc/cookbook/examples/textures-crossfade-slideshow.c
@@ -125,7 +125,7 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
   clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");
   clutter_actor_set_size (stage, stage_side, stage_side);
diff --git a/doc/cookbook/examples/textures-crossfade.c b/doc/cookbook/examples/textures-crossfade.c
index aa62d46..6fbd53a 100644
--- a/doc/cookbook/examples/textures-crossfade.c
+++ b/doc/cookbook/examples/textures-crossfade.c
@@ -85,7 +85,7 @@ main (int argc, char *argv[])
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");
   clutter_actor_set_size (stage, 400, 300);
   clutter_actor_show (stage);
diff --git a/doc/cookbook/examples/textures-split-go.c b/doc/cookbook/examples/textures-split-go.c
index f6922b7..540bc7d 100644
--- a/doc/cookbook/examples/textures-split-go.c
+++ b/doc/cookbook/examples/textures-split-go.c
@@ -117,9 +117,10 @@ main (int    argc,
   if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_actor_get_size (stage, &stage_width, &stage_height);
   clutter_stage_set_title (CLUTTER_STAGE (stage), "Animate sub-textures");
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   /* Load smiley.png, creating a new ClutterTexture, get its size and the
    * Cogl texture handle */
diff --git a/doc/cookbook/examples/textures-sub-texture.c b/doc/cookbook/examples/textures-sub-texture.c
index 9b2af85..95fa263 100644
--- a/doc/cookbook/examples/textures-sub-texture.c
+++ b/doc/cookbook/examples/textures-sub-texture.c
@@ -12,8 +12,9 @@ main (int argc, char **argv)
     return 1;
 
   /* Get the default stage */
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
   clutter_stage_set_title (CLUTTER_STAGE (stage), "Sub-texture");
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   /* Create a new ClutterTexture that shows smiley.png */
   image = clutter_texture_new_from_file ("smiley.png", NULL);
diff --git a/doc/reference/clutter/clutter-animation-tutorial.xml b/doc/reference/clutter/clutter-animation-tutorial.xml
index 8860aa4..7340dc4 100644
--- a/doc/reference/clutter/clutter-animation-tutorial.xml
+++ b/doc/reference/clutter/clutter-animation-tutorial.xml
@@ -302,7 +302,8 @@ main (int argc, char *argv[])
   if (clutter_init (&amp;argc, &amp;argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
-  stage = clutter_stage_get_default ();
+  stage = clutter_stage_new ();
+  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
 
   actor = clutter_texture_new_from_file ("ohpowers.png", NULL);
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor);



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