mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
doc: fix clutter_init() usage in examples
Make sure users get the idea that clutter_init() has a return value that needs to be checked. These were fixed via sed magic: sed -i -s -e "s/clutter_init (.*)/\ if (& != CLUTTER_INIT_SUCCESS)\n return 1/"\ doc/*/*/*.{c,xml} doc/*/*.xml http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
parent
eb906d85ca
commit
aece642adb
@ -32,7 +32,8 @@ main (int argc,
|
|||||||
ClutterConstraint *align_x_constraint;
|
ClutterConstraint *align_x_constraint;
|
||||||
ClutterConstraint *align_y_constraint;
|
ClutterConstraint *align_y_constraint;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -40,7 +40,8 @@ main (int argc, char *argv[])
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
script = clutter_script_new ();
|
script = clutter_script_new ();
|
||||||
clutter_script_load_from_file (script, filename, &error);
|
clutter_script_load_from_file (script, filename, &error);
|
||||||
|
@ -26,7 +26,8 @@ main (int argc,
|
|||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
ClutterAnimator *animator;
|
ClutterAnimator *animator;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 300, 200);
|
clutter_actor_set_size (stage, 300, 200);
|
||||||
|
@ -36,7 +36,8 @@ main (int argc,
|
|||||||
|
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 300, 200);
|
clutter_actor_set_size (stage, 300, 200);
|
||||||
|
@ -37,7 +37,8 @@ main (int argc,
|
|||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
ClutterState *transitions;
|
ClutterState *transitions;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 300, 200);
|
clutter_actor_set_size (stage, 300, 200);
|
||||||
|
@ -73,7 +73,8 @@ main (int argc,
|
|||||||
/* seed random number generator */
|
/* seed random number generator */
|
||||||
srand ((unsigned int) time (NULL));
|
srand ((unsigned int) time (NULL));
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
state->animator = clutter_animator_new ();
|
state->animator = clutter_animator_new ();
|
||||||
clutter_animator_set_duration (state->animator, 500);
|
clutter_animator_set_duration (state->animator, 500);
|
||||||
|
@ -44,7 +44,8 @@ main (int argc,
|
|||||||
AnimationSpec y_move = { "y", 400.0 };
|
AnimationSpec y_move = { "y", 400.0 };
|
||||||
AnimationSpec z_move = { "depth", -1000.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 ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 500, 500);
|
clutter_actor_set_size (stage, 500, 500);
|
||||||
|
@ -27,7 +27,8 @@ main (int argc,
|
|||||||
ClutterActor *green;
|
ClutterActor *green;
|
||||||
ClutterState *transitions;
|
ClutterState *transitions;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 650, 500);
|
clutter_actor_set_size (stage, 650, 500);
|
||||||
|
@ -70,7 +70,8 @@ main (int argc,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *rectangle;
|
ClutterActor *rectangle;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
||||||
|
@ -49,7 +49,8 @@ main (int argc,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterAnimator *animator;
|
ClutterAnimator *animator;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -14,7 +14,8 @@ main (int argc,
|
|||||||
const ClutterColor *stage_color = clutter_color_new (51, 51, 85, 255);
|
const ClutterColor *stage_color = clutter_color_new (51, 51, 85, 255);
|
||||||
const ClutterColor *red_color = clutter_color_new (255, 0, 0, 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 ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 360, 300);
|
clutter_actor_set_size (stage, 360, 300);
|
||||||
|
@ -82,7 +82,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterScript *script;
|
ClutterScript *script;
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
script = clutter_script_new ();
|
script = clutter_script_new ();
|
||||||
load_script_from_file (script, UI_FILE);
|
load_script_from_file (script, UI_FILE);
|
||||||
|
@ -39,7 +39,8 @@ main (int argc, char *argv[])
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gfloat texture_width, texture_height;
|
gfloat texture_width, texture_height;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||||
|
@ -106,7 +106,8 @@ main (int argc,
|
|||||||
|
|
||||||
image_path = argv[1];
|
image_path = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
||||||
|
@ -114,7 +114,8 @@ main (int argc,
|
|||||||
State *state = g_new0 (State, 1);
|
State *state = g_new0 (State, 1);
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 350, 350);
|
clutter_actor_set_size (stage, 350, 350);
|
||||||
|
@ -20,7 +20,8 @@ main (int argc,
|
|||||||
|
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -46,7 +46,8 @@ main (int argc,
|
|||||||
|
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 400, 300);
|
clutter_actor_set_size (stage, 400, 300);
|
||||||
|
@ -23,7 +23,8 @@ main (int argc,
|
|||||||
ClutterActor *actor1;
|
ClutterActor *actor1;
|
||||||
ClutterActor *actor2;
|
ClutterActor *actor2;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -122,7 +122,8 @@ main (int argc,
|
|||||||
/* seed random number generator */
|
/* seed random number generator */
|
||||||
srand ((unsigned int) time (NULL));
|
srand ((unsigned int) time (NULL));
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 320, 240);
|
clutter_actor_set_size (stage, 320, 240);
|
||||||
|
@ -57,7 +57,8 @@ main (int argc,
|
|||||||
ClutterActor *red;
|
ClutterActor *red;
|
||||||
ClutterActor *green;
|
ClutterActor *green;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -75,7 +75,8 @@ main (int argc, char *argv[])
|
|||||||
image_file_path = argv[1];
|
image_file_path = argv[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
|
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
|
||||||
|
@ -34,7 +34,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *text;
|
ClutterActor *text;
|
||||||
ClutterState *transitions;
|
ClutterState *transitions;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
|
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
|
||||||
|
@ -107,7 +107,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *rect;
|
ClutterActor *rect;
|
||||||
ClutterActor *canvas;
|
ClutterActor *canvas;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
context->path = clutter_path_new ();
|
context->path = clutter_path_new ();
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *r1, *r2, *r3;
|
ClutterActor *r1, *r2, *r3;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 300, 300);
|
clutter_actor_set_size (stage, 300, 300);
|
||||||
|
@ -29,7 +29,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *rectangle;
|
ClutterActor *rectangle;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -35,7 +35,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *actor;
|
ClutterActor *actor;
|
||||||
ClutterActor *overlay;
|
ClutterActor *overlay;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -78,7 +78,8 @@ main (int argc, char *argv[])
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
||||||
|
@ -16,7 +16,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterConstraint *width_binding;
|
ClutterConstraint *width_binding;
|
||||||
ClutterConstraint *height_binding;
|
ClutterConstraint *height_binding;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -88,7 +88,8 @@ main (int argc,
|
|||||||
ClutterLayoutManager *menu_layout;
|
ClutterLayoutManager *menu_layout;
|
||||||
ClutterActor *menu;
|
ClutterActor *menu;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -314,7 +314,8 @@ main (int argc,
|
|||||||
|
|
||||||
State *state = g_new0 (State, 1);
|
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->x_fill = FALSE;
|
||||||
state->y_fill = FALSE;
|
state->y_fill = FALSE;
|
||||||
|
@ -18,7 +18,8 @@ main (int argc,
|
|||||||
ClutterActor *red;
|
ClutterActor *red;
|
||||||
ClutterActor *blue;
|
ClutterActor *blue;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -14,7 +14,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterColor *color;
|
ClutterColor *color;
|
||||||
ClutterActor *rect;
|
ClutterActor *rect;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 400, 400);
|
clutter_actor_set_size (stage, 400, 400);
|
||||||
|
@ -25,7 +25,8 @@ main (int argc, char *argv[])
|
|||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
clutter_actor_set_size (stage, STAGE_SIDE, STAGE_SIDE);
|
||||||
|
@ -61,7 +61,8 @@ main (int argc, char *argv[])
|
|||||||
gchar *filename = "script-signals.json";
|
gchar *filename = "script-signals.json";
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
ui = clutter_script_new ();
|
ui = clutter_script_new ();
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ main (int argc, char *argv[])
|
|||||||
gchar *filename = "script-ui.json";
|
gchar *filename = "script-ui.json";
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
ui = clutter_script_new ();
|
ui = clutter_script_new ();
|
||||||
|
|
||||||
|
@ -40,7 +40,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *text;
|
ClutterActor *text;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text shadow");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text shadow");
|
||||||
|
@ -106,10 +106,11 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *texture;
|
ClutterActor *texture;
|
||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
|
|
||||||
clutter_init_with_args (&argc, &argv,
|
if (clutter_init_with_args (&argc, &argv,
|
||||||
" - Crossfade", entries,
|
" - Crossfade", entries,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (source == NULL || target == NULL)
|
if (source == NULL || target == NULL)
|
||||||
return print_usage_and_exit (argv[0], EXIT_FAILURE);
|
return print_usage_and_exit (argv[0], EXIT_FAILURE);
|
||||||
|
@ -122,7 +122,8 @@ main (int argc, char *argv[])
|
|||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
app->image_paths = g_slist_append (app->image_paths, argv[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 ();
|
stage = clutter_stage_get_default ();
|
||||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||||
|
@ -70,10 +70,11 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *top, *bottom;
|
ClutterActor *top, *bottom;
|
||||||
ClutterState *transitions;
|
ClutterState *transitions;
|
||||||
|
|
||||||
clutter_init_with_args (&argc, &argv,
|
if (clutter_init_with_args (&argc, &argv,
|
||||||
" - cross-fade", entries,
|
" - cross-fade", entries,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (source == NULL || target == NULL)
|
if (source == NULL || target == NULL)
|
||||||
{
|
{
|
||||||
@ -81,7 +82,8 @@ main (int argc, char *argv[])
|
|||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "cross-fade");
|
||||||
|
@ -77,7 +77,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterActor *clone;
|
ClutterActor *clone;
|
||||||
gfloat y_offset;
|
gfloat y_offset;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Reflection");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Reflection");
|
||||||
|
@ -114,7 +114,8 @@ main (int argc,
|
|||||||
CoglHandle texture;
|
CoglHandle texture;
|
||||||
Context context;
|
Context context;
|
||||||
|
|
||||||
clutter_init (NULL, NULL);
|
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
clutter_actor_get_size (stage, &stage_width, &stage_height);
|
||||||
|
@ -8,7 +8,8 @@ main (int argc, char **argv)
|
|||||||
gfloat image_width, image_height;
|
gfloat image_width, image_height;
|
||||||
|
|
||||||
/* Initialize Clutter */
|
/* Initialize Clutter */
|
||||||
clutter_init (NULL, NULL);
|
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Get the default stage */
|
/* Get the default stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -441,7 +441,8 @@ main (int argc, char *argv[])
|
|||||||
/* initialize GLib's default threading implementation */
|
/* initialize GLib's default threading implementation */
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* ... get stage etc. */
|
/* ... get stage etc. */
|
||||||
|
|
||||||
@ -711,7 +712,8 @@ _clone_paint_cb (ClutterActor *actor)
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* ... get stage etc. */
|
/* ... get stage etc. */
|
||||||
|
|
||||||
|
@ -299,7 +299,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterAlpha *alpha;
|
ClutterAlpha *alpha;
|
||||||
ClutterActor *stage, *actor;
|
ClutterActor *stage, *actor;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user