summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-11-09 17:49:25 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-11-10 15:37:51 +0000
commit26aa4b5290c65984a0512a0ba4a30ab777628269 (patch)
tree65d34a42336e90d70319957a18a0dbaa32fa9827
parent0c18dc6bf90cf521327869738b206274584c695e (diff)
downloadclutter-26aa4b5290c65984a0512a0ba4a30ab777628269.tar.gz
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.
-rw-r--r--clutter/clutter-actor.c2
-rw-r--r--doc/cookbook/examples/animations-looping-animator.c2
-rw-r--r--doc/cookbook/examples/animations-looping-implicit.c2
-rw-r--r--doc/cookbook/examples/animations-looping-state.c2
-rw-r--r--doc/cookbook/examples/animations-moving-animator.c2
-rw-r--r--doc/cookbook/examples/animations-moving-implicit.c2
-rw-r--r--doc/cookbook/examples/animations-moving-state.c2
-rw-r--r--doc/cookbook/examples/animations-rotating.c2
-rw-r--r--doc/cookbook/examples/animations-scaling-zoom.c2
-rw-r--r--doc/cookbook/examples/animations-scaling.c2
-rw-r--r--doc/cookbook/examples/events-buttons-click.c2
-rw-r--r--doc/cookbook/examples/events-buttons-lasso.c2
-rw-r--r--doc/cookbook/examples/events-buttons.c2
-rw-r--r--doc/cookbook/examples/events-mouse-scroll.c3
-rw-r--r--doc/cookbook/examples/events-pointer-motion-crossing.c2
-rw-r--r--doc/cookbook/examples/events-pointer-motion-scribbler.c3
-rw-r--r--doc/cookbook/examples/events-pointer-motion-stacked.c3
-rw-r--r--doc/cookbook/examples/events-pointer-motion.c3
-rw-r--r--doc/cookbook/examples/layouts-bind-constraint-allocation.c2
-rw-r--r--doc/cookbook/examples/layouts-box-menu.c2
-rw-r--r--doc/cookbook/examples/layouts-box-property-effects.c2
-rw-r--r--doc/cookbook/examples/layouts-box.c2
-rw-r--r--doc/cookbook/examples/layouts-stacking-diff-sized-actors.c3
-rw-r--r--doc/cookbook/examples/layouts-stacking.c3
-rw-r--r--doc/cookbook/examples/textures-crossfade-cogl.c2
-rw-r--r--doc/cookbook/examples/textures-crossfade-slideshow.c2
-rw-r--r--doc/cookbook/examples/textures-crossfade.c2
-rw-r--r--doc/cookbook/examples/textures-split-go.c3
-rw-r--r--doc/cookbook/examples/textures-sub-texture.c3
-rw-r--r--doc/reference/clutter/clutter-animation-tutorial.xml3
30 files changed, 39 insertions, 30 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 5a66c16ae..3c2040681 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 892ddaf16..eb926ea75 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 0b23495c0..4ea03b258 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 de39233e6..43edb59cd 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 03de11201..b13d57c12 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 d1e57dae4..79083e6ab 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 a76edabde..12086165b 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 8c6237b2a..411d5b849 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 b78fccc8a..aa051c4bb 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 fe69bde16..8fd5946e1 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 263aa89dc..f94bc7938 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 c5597f9b5..16d37c6ac 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 92129a01d..87f456fc1 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 785e6c293..07cc0cb99 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 0d21001a1..03852bb9a 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 9337c0047..4d5168dc9 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 7a3d13866..f92fa0298 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 355f9c15b..0a96bd7f1 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 7d38dd539..a48733135 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 e76c4a829..136f95ff3 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 6557d5d3f..b712b91ec 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 e489f8f1f..9b2b40b7c 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 b302a2384..45f47e181 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 f68f25b20..4fda817e0 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 b01e508b7..6c111b1f5 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 983a66a56..1a8b3ef58 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 aa62d46c0..6fbd53adf 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 f6922b784..540bc7d0d 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 9b2af8554..95fa263f1 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 8860aa41e..7340dc49d 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);