diff --git a/doc/cookbook/examples/actors-composite-main.c b/doc/cookbook/examples/actors-composite-main.c index 2df5fa90a..b9a8ea3ef 100644 --- a/doc/cookbook/examples/actors-composite-main.c +++ b/doc/cookbook/examples/actors-composite-main.c @@ -32,7 +32,8 @@ main (int argc, ClutterConstraint *align_x_constraint; ClutterConstraint *align_y_constraint; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/animations-complex.c b/doc/cookbook/examples/animations-complex.c index 62542e47d..b7b15a68d 100644 --- a/doc/cookbook/examples/animations-complex.c +++ b/doc/cookbook/examples/animations-complex.c @@ -40,7 +40,8 @@ main (int argc, char *argv[]) if (argc > 1) filename = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; script = clutter_script_new (); clutter_script_load_from_file (script, filename, &error); diff --git a/doc/cookbook/examples/animations-looping-animator.c b/doc/cookbook/examples/animations-looping-animator.c index 8698a4ce3..892ddaf16 100644 --- a/doc/cookbook/examples/animations-looping-animator.c +++ b/doc/cookbook/examples/animations-looping-animator.c @@ -26,7 +26,8 @@ main (int argc, ClutterTimeline *timeline; ClutterAnimator *animator; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 300, 200); diff --git a/doc/cookbook/examples/animations-looping-implicit.c b/doc/cookbook/examples/animations-looping-implicit.c index 6606ee185..0b23495c0 100644 --- a/doc/cookbook/examples/animations-looping-implicit.c +++ b/doc/cookbook/examples/animations-looping-implicit.c @@ -36,7 +36,8 @@ main (int argc, ClutterActor *stage; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 300, 200); diff --git a/doc/cookbook/examples/animations-looping-state.c b/doc/cookbook/examples/animations-looping-state.c index 58b815745..de39233e6 100644 --- a/doc/cookbook/examples/animations-looping-state.c +++ b/doc/cookbook/examples/animations-looping-state.c @@ -37,7 +37,8 @@ main (int argc, ClutterActor *actor; ClutterState *transitions; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 300, 200); diff --git a/doc/cookbook/examples/animations-moving-animator.c b/doc/cookbook/examples/animations-moving-animator.c index 22ae6fd5b..03de11201 100644 --- a/doc/cookbook/examples/animations-moving-animator.c +++ b/doc/cookbook/examples/animations-moving-animator.c @@ -73,7 +73,8 @@ main (int argc, /* seed random number generator */ srand ((unsigned int) time (NULL)); -clutter_init (&argc, &argv); +if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; state->animator = clutter_animator_new (); clutter_animator_set_duration (state->animator, 500); diff --git a/doc/cookbook/examples/animations-moving-implicit.c b/doc/cookbook/examples/animations-moving-implicit.c index ee9a7e023..d1e57dae4 100644 --- a/doc/cookbook/examples/animations-moving-implicit.c +++ b/doc/cookbook/examples/animations-moving-implicit.c @@ -44,7 +44,8 @@ main (int argc, AnimationSpec y_move = { "y", 400.0 }; AnimationSpec z_move = { "depth", -1000.0 }; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 500, 500); diff --git a/doc/cookbook/examples/animations-moving-state.c b/doc/cookbook/examples/animations-moving-state.c index 669f15768..a76edabde 100644 --- a/doc/cookbook/examples/animations-moving-state.c +++ b/doc/cookbook/examples/animations-moving-state.c @@ -27,7 +27,8 @@ main (int argc, ClutterActor *green; ClutterState *transitions; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 650, 500); diff --git a/doc/cookbook/examples/animations-path-circle.c b/doc/cookbook/examples/animations-path-circle.c index 23a13e69f..ddb5992c8 100644 --- a/doc/cookbook/examples/animations-path-circle.c +++ b/doc/cookbook/examples/animations-path-circle.c @@ -70,7 +70,8 @@ main (int argc, ClutterActor *stage; ClutterActor *rectangle; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE); diff --git a/doc/cookbook/examples/animations-path-easing.c b/doc/cookbook/examples/animations-path-easing.c index 8a1da760d..fc119fc08 100644 --- a/doc/cookbook/examples/animations-path-easing.c +++ b/doc/cookbook/examples/animations-path-easing.c @@ -49,7 +49,8 @@ main (int argc, ClutterActor *stage; ClutterAnimator *animator; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/animations-path.c b/doc/cookbook/examples/animations-path.c index c3686578f..95c715fa8 100644 --- a/doc/cookbook/examples/animations-path.c +++ b/doc/cookbook/examples/animations-path.c @@ -14,7 +14,8 @@ main (int argc, const ClutterColor *stage_color = clutter_color_new (51, 51, 85, 255); const ClutterColor *red_color = clutter_color_new (255, 0, 0, 255); - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 360, 300); diff --git a/doc/cookbook/examples/animations-reuse.c b/doc/cookbook/examples/animations-reuse.c index 506435a21..b7337338b 100644 --- a/doc/cookbook/examples/animations-reuse.c +++ b/doc/cookbook/examples/animations-reuse.c @@ -82,7 +82,8 @@ main (int argc, char *argv[]) ClutterScript *script; ClutterActor *stage; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; script = clutter_script_new (); load_script_from_file (script, UI_FILE); diff --git a/doc/cookbook/examples/animations-rotating.c b/doc/cookbook/examples/animations-rotating.c index 23985e72e..8c6237b2a 100644 --- a/doc/cookbook/examples/animations-rotating.c +++ b/doc/cookbook/examples/animations-rotating.c @@ -39,7 +39,8 @@ main (int argc, char *argv[]) GError *error = NULL; gfloat texture_width, texture_height; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); diff --git a/doc/cookbook/examples/animations-scaling-zoom.c b/doc/cookbook/examples/animations-scaling-zoom.c index 023b567c7..b78fccc8a 100644 --- a/doc/cookbook/examples/animations-scaling-zoom.c +++ b/doc/cookbook/examples/animations-scaling-zoom.c @@ -106,7 +106,8 @@ main (int argc, image_path = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE); diff --git a/doc/cookbook/examples/animations-scaling.c b/doc/cookbook/examples/animations-scaling.c index df723691b..fe69bde16 100644 --- a/doc/cookbook/examples/animations-scaling.c +++ b/doc/cookbook/examples/animations-scaling.c @@ -114,7 +114,8 @@ main (int argc, State *state = g_new0 (State, 1); ClutterActor *stage; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 350, 350); diff --git a/doc/cookbook/examples/effects-built-in.c b/doc/cookbook/examples/effects-built-in.c index a7eb3ceef..f2c3c463b 100644 --- a/doc/cookbook/examples/effects-built-in.c +++ b/doc/cookbook/examples/effects-built-in.c @@ -20,7 +20,8 @@ main (int argc, filename = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/effects-custom-deform.c b/doc/cookbook/examples/effects-custom-deform.c index 55094bfd4..74ed2133c 100644 --- a/doc/cookbook/examples/effects-custom-deform.c +++ b/doc/cookbook/examples/effects-custom-deform.c @@ -46,7 +46,8 @@ main (int argc, filename = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 400, 300); diff --git a/doc/cookbook/examples/events-buttons-click.c b/doc/cookbook/examples/events-buttons-click.c index bb6cbd68e..263aa89dc 100644 --- a/doc/cookbook/examples/events-buttons-click.c +++ b/doc/cookbook/examples/events-buttons-click.c @@ -23,7 +23,8 @@ main (int argc, ClutterActor *actor1; ClutterActor *actor2; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/events-buttons-lasso.c b/doc/cookbook/examples/events-buttons-lasso.c index 144ff0af1..c5597f9b5 100644 --- a/doc/cookbook/examples/events-buttons-lasso.c +++ b/doc/cookbook/examples/events-buttons-lasso.c @@ -122,7 +122,8 @@ main (int argc, /* seed random number generator */ srand ((unsigned int) time (NULL)); - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 320, 240); diff --git a/doc/cookbook/examples/events-buttons.c b/doc/cookbook/examples/events-buttons.c index f6f6b0372..92129a01d 100644 --- a/doc/cookbook/examples/events-buttons.c +++ b/doc/cookbook/examples/events-buttons.c @@ -57,7 +57,8 @@ main (int argc, ClutterActor *red; ClutterActor *green; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/events-mouse-scroll.c b/doc/cookbook/examples/events-mouse-scroll.c index 4dac00baa..785e6c293 100644 --- a/doc/cookbook/examples/events-mouse-scroll.c +++ b/doc/cookbook/examples/events-mouse-scroll.c @@ -75,7 +75,8 @@ main (int argc, char *argv[]) image_file_path = argv[1]; } - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT); diff --git a/doc/cookbook/examples/events-pointer-motion-crossing.c b/doc/cookbook/examples/events-pointer-motion-crossing.c index a9f5f8ac0..0d21001a1 100644 --- a/doc/cookbook/examples/events-pointer-motion-crossing.c +++ b/doc/cookbook/examples/events-pointer-motion-crossing.c @@ -34,7 +34,8 @@ main (int argc, char *argv[]) ClutterActor *text; ClutterState *transitions; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color); diff --git a/doc/cookbook/examples/events-pointer-motion-scribbler.c b/doc/cookbook/examples/events-pointer-motion-scribbler.c index 5930739aa..9337c0047 100644 --- a/doc/cookbook/examples/events-pointer-motion-scribbler.c +++ b/doc/cookbook/examples/events-pointer-motion-scribbler.c @@ -107,7 +107,8 @@ main (int argc, char *argv[]) ClutterActor *rect; ClutterActor *canvas; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; context->path = clutter_path_new (); diff --git a/doc/cookbook/examples/events-pointer-motion-stacked.c b/doc/cookbook/examples/events-pointer-motion-stacked.c index a7a0cd22e..7a3d13866 100644 --- a/doc/cookbook/examples/events-pointer-motion-stacked.c +++ b/doc/cookbook/examples/events-pointer-motion-stacked.c @@ -50,7 +50,8 @@ main (int argc, char *argv[]) ClutterActor *stage; ClutterActor *r1, *r2, *r3; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 300, 300); diff --git a/doc/cookbook/examples/events-pointer-motion.c b/doc/cookbook/examples/events-pointer-motion.c index 38191bab9..355f9c15b 100644 --- a/doc/cookbook/examples/events-pointer-motion.c +++ b/doc/cookbook/examples/events-pointer-motion.c @@ -29,7 +29,8 @@ main (int argc, char *argv[]) ClutterActor *stage; ClutterActor *rectangle; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-bind-constraint-allocation.c b/doc/cookbook/examples/layouts-bind-constraint-allocation.c index 4369a186e..7d38dd539 100644 --- a/doc/cookbook/examples/layouts-bind-constraint-allocation.c +++ b/doc/cookbook/examples/layouts-bind-constraint-allocation.c @@ -35,7 +35,8 @@ main (int argc, char *argv[]) ClutterActor *actor; ClutterActor *overlay; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-bind-constraint-overlay.c b/doc/cookbook/examples/layouts-bind-constraint-overlay.c index 0224124e1..77c209f7f 100644 --- a/doc/cookbook/examples/layouts-bind-constraint-overlay.c +++ b/doc/cookbook/examples/layouts-bind-constraint-overlay.c @@ -78,7 +78,8 @@ main (int argc, char *argv[]) if (argc > 1) filename = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE); diff --git a/doc/cookbook/examples/layouts-bind-constraint-stage.c b/doc/cookbook/examples/layouts-bind-constraint-stage.c index a5b687553..250b434f5 100644 --- a/doc/cookbook/examples/layouts-bind-constraint-stage.c +++ b/doc/cookbook/examples/layouts-bind-constraint-stage.c @@ -16,7 +16,8 @@ main (int argc, char *argv[]) ClutterConstraint *width_binding; ClutterConstraint *height_binding; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-box-menu.c b/doc/cookbook/examples/layouts-box-menu.c index cfacc0802..e76c4a829 100644 --- a/doc/cookbook/examples/layouts-box-menu.c +++ b/doc/cookbook/examples/layouts-box-menu.c @@ -88,7 +88,8 @@ main (int argc, ClutterLayoutManager *menu_layout; ClutterActor *menu; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-box-property-effects.c b/doc/cookbook/examples/layouts-box-property-effects.c index 3adff79c6..6557d5d3f 100644 --- a/doc/cookbook/examples/layouts-box-property-effects.c +++ b/doc/cookbook/examples/layouts-box-property-effects.c @@ -314,7 +314,8 @@ main (int argc, State *state = g_new0 (State, 1); - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; state->x_fill = FALSE; state->y_fill = FALSE; diff --git a/doc/cookbook/examples/layouts-box.c b/doc/cookbook/examples/layouts-box.c index 84c436cf7..e489f8f1f 100644 --- a/doc/cookbook/examples/layouts-box.c +++ b/doc/cookbook/examples/layouts-box.c @@ -18,7 +18,8 @@ main (int argc, ClutterActor *red; ClutterActor *blue; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c b/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c index e4be3cc16..b302a2384 100644 --- a/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c +++ b/doc/cookbook/examples/layouts-stacking-diff-sized-actors.c @@ -14,7 +14,8 @@ main (int argc, char *argv[]) ClutterColor *color; ClutterActor *rect; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, 400, 400); diff --git a/doc/cookbook/examples/layouts-stacking.c b/doc/cookbook/examples/layouts-stacking.c index 799ca2b4a..f68f25b20 100644 --- a/doc/cookbook/examples/layouts-stacking.c +++ b/doc/cookbook/examples/layouts-stacking.c @@ -25,7 +25,8 @@ main (int argc, char *argv[]) if (argc > 1) filename = argv[1]; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE); diff --git a/doc/cookbook/examples/script-signals.c b/doc/cookbook/examples/script-signals.c index 718861b98..03811d10e 100644 --- a/doc/cookbook/examples/script-signals.c +++ b/doc/cookbook/examples/script-signals.c @@ -61,7 +61,8 @@ main (int argc, char *argv[]) gchar *filename = "script-signals.json"; GError *error = NULL; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; ui = clutter_script_new (); diff --git a/doc/cookbook/examples/script-ui.c b/doc/cookbook/examples/script-ui.c index 6797deae1..a488763bc 100644 --- a/doc/cookbook/examples/script-ui.c +++ b/doc/cookbook/examples/script-ui.c @@ -10,7 +10,8 @@ main (int argc, char *argv[]) gchar *filename = "script-ui.json"; GError *error = NULL; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; ui = clutter_script_new (); diff --git a/doc/cookbook/examples/text-shadow.c b/doc/cookbook/examples/text-shadow.c index 90643476f..b73bae1d3 100644 --- a/doc/cookbook/examples/text-shadow.c +++ b/doc/cookbook/examples/text-shadow.c @@ -40,7 +40,8 @@ main (int argc, char *argv[]) ClutterActor *stage; ClutterActor *text; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_stage_set_title (CLUTTER_STAGE (stage), "Text shadow"); diff --git a/doc/cookbook/examples/textures-crossfade-cogl.c b/doc/cookbook/examples/textures-crossfade-cogl.c index 946f6977e..b01e508b7 100644 --- a/doc/cookbook/examples/textures-crossfade-cogl.c +++ b/doc/cookbook/examples/textures-crossfade-cogl.c @@ -106,10 +106,11 @@ main (int argc, char *argv[]) ClutterActor *texture; ClutterTimeline *timeline; - clutter_init_with_args (&argc, &argv, - " - Crossfade", entries, - NULL, - NULL); + if (clutter_init_with_args (&argc, &argv, + " - Crossfade", entries, + NULL, + NULL) != CLUTTER_INIT_SUCCESS) + return 1; if (source == NULL || target == NULL) return print_usage_and_exit (argv[0], EXIT_FAILURE); diff --git a/doc/cookbook/examples/textures-crossfade-slideshow.c b/doc/cookbook/examples/textures-crossfade-slideshow.c index afba2e178..983a66a56 100644 --- a/doc/cookbook/examples/textures-crossfade-slideshow.c +++ b/doc/cookbook/examples/textures-crossfade-slideshow.c @@ -122,7 +122,8 @@ main (int argc, char *argv[]) for (i = 1; i < argc; i++) app->image_paths = g_slist_append (app->image_paths, argv[i]); - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL); diff --git a/doc/cookbook/examples/textures-crossfade.c b/doc/cookbook/examples/textures-crossfade.c index d330ebf04..aa62d46c0 100644 --- a/doc/cookbook/examples/textures-crossfade.c +++ b/doc/cookbook/examples/textures-crossfade.c @@ -70,10 +70,11 @@ main (int argc, char *argv[]) ClutterActor *top, *bottom; ClutterState *transitions; - clutter_init_with_args (&argc, &argv, - " - cross-fade", entries, - NULL, - NULL); + if (clutter_init_with_args (&argc, &argv, + " - cross-fade", entries, + NULL, + NULL) != CLUTTER_INIT_SUCCESS) + return 1; if (source == NULL || target == NULL) { @@ -81,7 +82,8 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade"); diff --git a/doc/cookbook/examples/textures-reflection.c b/doc/cookbook/examples/textures-reflection.c index a8c94e1b0..170e701c2 100644 --- a/doc/cookbook/examples/textures-reflection.c +++ b/doc/cookbook/examples/textures-reflection.c @@ -77,7 +77,8 @@ main (int argc, char *argv[]) ClutterActor *clone; gfloat y_offset; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_new (); clutter_stage_set_title (CLUTTER_STAGE (stage), "Reflection"); diff --git a/doc/cookbook/examples/textures-split-go.c b/doc/cookbook/examples/textures-split-go.c index 940e9f1cc..f6922b784 100644 --- a/doc/cookbook/examples/textures-split-go.c +++ b/doc/cookbook/examples/textures-split-go.c @@ -114,7 +114,8 @@ main (int argc, CoglHandle texture; Context context; - clutter_init (NULL, NULL); + if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default (); clutter_actor_get_size (stage, &stage_width, &stage_height); diff --git a/doc/cookbook/examples/textures-sub-texture.c b/doc/cookbook/examples/textures-sub-texture.c index 0d6075cdb..9b2af8554 100644 --- a/doc/cookbook/examples/textures-sub-texture.c +++ b/doc/cookbook/examples/textures-sub-texture.c @@ -8,7 +8,8 @@ main (int argc, char **argv) gfloat image_width, image_height; /* Initialize Clutter */ - clutter_init (NULL, NULL); + if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) + return 1; /* Get the default stage */ stage = clutter_stage_get_default (); diff --git a/doc/cookbook/textures.xml b/doc/cookbook/textures.xml index b48d85b15..e37b01ee3 100644 --- a/doc/cookbook/textures.xml +++ b/doc/cookbook/textures.xml @@ -441,7 +441,8 @@ main (int argc, char *argv[]) /* initialize GLib's default threading implementation */ g_thread_init (NULL); - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; /* ... get stage etc. */ @@ -711,7 +712,8 @@ _clone_paint_cb (ClutterActor *actor) int main (int argc, char *argv[]) { - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; /* ... get stage etc. */ diff --git a/doc/reference/clutter/clutter-animation-tutorial.xml b/doc/reference/clutter/clutter-animation-tutorial.xml index 511aae12a..8860aa41e 100644 --- a/doc/reference/clutter/clutter-animation-tutorial.xml +++ b/doc/reference/clutter/clutter-animation-tutorial.xml @@ -299,7 +299,8 @@ main (int argc, char *argv[]) ClutterAlpha *alpha; ClutterActor *stage, *actor; - clutter_init (&argc, &argv); + if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) + return 1; stage = clutter_stage_get_default ();