mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
tests: abort if clutter_init fails
This fixes segfaults when something goes wrong during init, but the test keeps going anyway. Except for test-easing and test-picking, these were fixed by sed magic: sed -i -s -e "s/clutter_init \?(&argc, &argv)/\ if (clutter_init (\&argc, \&argv) != CLUTTER_INIT_SUCCESS)\n\ return 1/" tests/*/*.c http://bugzilla.clutter-project.org/show_bug.cgi?id=2574
This commit is contained in:
parent
0d14be1aec
commit
eb906d85ca
@ -47,7 +47,8 @@ main (int argc, char *argv[])
|
|||||||
ClutterGeometry geom = {0, 0, SIZE, SIZE};
|
ClutterGeometry geom = {0, 0, SIZE, SIZE};
|
||||||
gint i = 0;
|
gint i = 0;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
cally_util_a11y_init (&argc, &argv);
|
cally_util_a11y_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -251,7 +251,8 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_set_application_name ("AtkEditableText");
|
g_set_application_name ("AtkEditableText");
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
cally_util_a11y_init (&argc, &argv);
|
cally_util_a11y_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -141,7 +141,8 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_set_application_name ("AtkText");
|
g_set_application_name ("AtkText");
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
cally_util_a11y_init (&argc, &argv);
|
cally_util_a11y_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -193,7 +193,8 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_set_application_name ("AtkText");
|
g_set_application_name ("AtkText");
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
cally_util_a11y_init (&argc, &argv);
|
cally_util_a11y_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -97,7 +97,8 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_set_application_name ("Clone Example");
|
g_set_application_name ("Clone Example");
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
cally_util_a11y_init (&argc, &argv);
|
cally_util_a11y_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -88,7 +88,8 @@ test_animation_main (int argc, char *argv[])
|
|||||||
ClutterColor rect_color = { 0x44, 0xdd, 0x44, 0xff };
|
ClutterColor rect_color = { 0x44, 0xdd, 0x44, 0xff };
|
||||||
ClutterAction *action;
|
ClutterAction *action;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -52,7 +52,8 @@ test_animator_main (gint argc,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *rects[COUNT];
|
ClutterActor *rects[COUNT];
|
||||||
gint i;
|
gint 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 ();
|
||||||
|
|
||||||
|
@ -100,7 +100,8 @@ test_behave_main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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), "Behaviours");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Behaviours");
|
||||||
|
@ -136,7 +136,8 @@ test_bin_layout_main (int argc, char *argv[])
|
|||||||
ClutterColor *color;
|
ClutterColor *color;
|
||||||
ClutterAction *action;
|
ClutterAction *action;
|
||||||
|
|
||||||
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), "Box test");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Box test");
|
||||||
|
@ -247,7 +247,8 @@ test_binding_pool_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage, *key_group;
|
ClutterActor *stage, *key_group;
|
||||||
gint group_x, group_y;
|
gint group_x, group_y;
|
||||||
|
|
||||||
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,
|
g_signal_connect (stage,
|
||||||
|
@ -239,7 +239,8 @@ test_box_layout_main (int argc, char *argv[])
|
|||||||
ClutterLayoutManager *layout;
|
ClutterLayoutManager *layout;
|
||||||
gint i;
|
gint 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 ();
|
||||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Box Layout");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Box Layout");
|
||||||
|
@ -179,7 +179,8 @@ test_cairo_flowers_main (int argc, char **argv)
|
|||||||
|
|
||||||
srand (time (NULL));
|
srand (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 ();
|
||||||
|
|
||||||
|
@ -319,7 +319,8 @@ test_clip_main (int argc, char **argv)
|
|||||||
ClutterActor *stub_actor, *label;
|
ClutterActor *stub_actor, *label;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
data.current_clip.type = CLIP_NONE;
|
data.current_clip.type = CLIP_NONE;
|
||||||
data.clips = NULL;
|
data.clips = NULL;
|
||||||
|
@ -112,7 +112,8 @@ test_cogl_multitexture_main (int argc, char *argv[])
|
|||||||
0, 0, 1, 1
|
0, 0, 1, 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_get_geometry (stage, &geom);
|
clutter_actor_get_geometry (stage, &geom);
|
||||||
|
@ -298,7 +298,8 @@ test_cogl_offscreen_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -226,7 +226,8 @@ test_cogl_point_sprites_main (int argc, char *argv[])
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
data.material = cogl_material_new ();
|
data.material = cogl_material_new ();
|
||||||
data.last_spark_time = g_timer_new ();
|
data.last_spark_time = g_timer_new ();
|
||||||
|
@ -107,7 +107,8 @@ test_cogl_primitives_main (int argc, char *argv[])
|
|||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
ClutterTimeline *tl;
|
ClutterTimeline *tl;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
tl = clutter_timeline_new (G_N_ELEMENTS (paint_func) * 1000);
|
tl = clutter_timeline_new (G_N_ELEMENTS (paint_func) * 1000);
|
||||||
clutter_timeline_set_loop (tl, TRUE);
|
clutter_timeline_set_loop (tl, TRUE);
|
||||||
|
@ -364,7 +364,8 @@ test_cogl_shader_arbfp_main (int argc, char *argv[])
|
|||||||
GError *error;
|
GError *error;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
|
|
||||||
|
@ -319,7 +319,8 @@ test_cogl_shader_glsl_main (int argc, char *argv[])
|
|||||||
GError *error;
|
GError *error;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
|
|
||||||
|
@ -198,7 +198,8 @@ test_cogl_tex_convert_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -195,7 +195,8 @@ test_cogl_tex_foreign_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -245,7 +245,8 @@ test_cogl_tex_getset_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -361,7 +361,8 @@ test_cogl_tex_polygon_main (int argc, char *argv[])
|
|||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
ClutterColor blue = { 0x30, 0x30, 0xff, 0xff };
|
ClutterColor blue = { 0x30, 0x30, 0xff, 0xff };
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -186,7 +186,8 @@ test_cogl_tex_tile_main (int argc, char *argv[])
|
|||||||
ClutterActor *coglbox;
|
ClutterActor *coglbox;
|
||||||
ClutterTimeline *timeline;
|
ClutterTimeline *timeline;
|
||||||
|
|
||||||
clutter_init(&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Stage */
|
/* Stage */
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -333,7 +333,8 @@ test_cogl_vertex_buffer_main (int argc, char *argv[])
|
|||||||
ClutterGeometry stage_geom;
|
ClutterGeometry stage_geom;
|
||||||
gint dummy_width, dummy_height;
|
gint dummy_width, dummy_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 ();
|
||||||
|
|
||||||
|
@ -117,7 +117,8 @@ test_constraints_main (int argc, char *argv[])
|
|||||||
ClutterColor rect_color;
|
ClutterColor rect_color;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||||
|
@ -118,7 +118,8 @@ test_depth_main (int argc, char *argv[])
|
|||||||
ClutterActor *group, *hand, *label, *rect, *janus, *box;
|
ClutterActor *group, *hand, *label, *rect, *janus, *box;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
|
||||||
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), "Depth Test");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Depth Test");
|
||||||
|
@ -221,7 +221,8 @@ test_devices_main (int argc, char **argv)
|
|||||||
/* force enabling X11 support */
|
/* force enabling X11 support */
|
||||||
clutter_x11_enable_xinput ();
|
clutter_x11_enable_xinput ();
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
app = g_new0 (TestDevicesApp, 1);
|
app = g_new0 (TestDevicesApp, 1);
|
||||||
app->devices = g_hash_table_new (g_direct_hash, g_direct_equal) ;
|
app->devices = g_hash_table_new (g_direct_hash, g_direct_equal) ;
|
||||||
|
@ -203,12 +203,14 @@ test_easing_main (int argc, char *argv[])
|
|||||||
gchar *text;
|
gchar *text;
|
||||||
gfloat stage_width, stage_height;
|
gfloat stage_width, stage_height;
|
||||||
gfloat label_width, label_height;
|
gfloat label_width, label_height;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
clutter_init_with_args (&argc, &argv,
|
if (clutter_init_with_args (&argc, &argv,
|
||||||
NULL,
|
NULL,
|
||||||
test_easing_entries,
|
test_easing_entries,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
&error) != 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);
|
||||||
|
@ -268,7 +268,8 @@ test_events_main (int argc, char *argv[])
|
|||||||
ncol = { 0, 0, 0, 0xff },
|
ncol = { 0, 0, 0, 0xff },
|
||||||
xcol = { 0xff, 0, 0xff, 0xff };
|
xcol = { 0xff, 0, 0xff, 0xff };
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ test_fbo_main (int argc, char *argv[])
|
|||||||
int x_pos = 200;
|
int x_pos = 200;
|
||||||
int y_pos = 100;
|
int y_pos = 100;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (clutter_feature_available (CLUTTER_FEATURE_OFFSCREEN) == FALSE)
|
if (clutter_feature_available (CLUTTER_FEATURE_OFFSCREEN) == FALSE)
|
||||||
g_error("This test requires CLUTTER_FEATURE_OFFSCREEN");
|
g_error("This test requires CLUTTER_FEATURE_OFFSCREEN");
|
||||||
|
@ -72,7 +72,8 @@ test_fullscreen_main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
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 ();
|
||||||
g_signal_connect (stage,
|
g_signal_connect (stage,
|
||||||
|
@ -155,7 +155,8 @@ test_grab_main (int argc, char *argv[])
|
|||||||
ccol = { 0, 0xff, 0xff, 0xff },
|
ccol = { 0, 0xff, 0xff, 0xff },
|
||||||
ycol = { 0xff, 0xff, 0, 0xff };
|
ycol = { 0xff, 0xff, 0, 0xff };
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
g_print ("Red box: aquire grab on press, releases it on next button release\n");
|
g_print ("Red box: aquire grab on press, releases it on next button release\n");
|
||||||
g_print ("Blue box: aquire grab on press, destroys the blue box actor on release\n");
|
g_print ("Blue box: aquire grab on press, destroys the blue box actor on release\n");
|
||||||
|
@ -748,7 +748,8 @@ test_layout_main (int argc, char *argv[])
|
|||||||
gint i, size;
|
gint i, size;
|
||||||
GError *error = NULL;
|
GError *error = 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, 800, 600);
|
clutter_actor_set_size (stage, 800, 600);
|
||||||
|
@ -211,7 +211,8 @@ test_model_main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
ClutterModel *model;
|
ClutterModel *model;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
model = clutter_list_model_new (N_COLUMNS,
|
model = clutter_list_model_new (N_COLUMNS,
|
||||||
G_TYPE_INT, "Foo",
|
G_TYPE_INT, "Foo",
|
||||||
|
@ -116,7 +116,8 @@ test_multistage_main (int argc, char *argv[])
|
|||||||
ClutterActor *label;
|
ClutterActor *label;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage_default = clutter_stage_get_default ();
|
stage_default = clutter_stage_get_default ();
|
||||||
clutter_stage_set_title (CLUTTER_STAGE (stage_default), "Default Stage");
|
clutter_stage_set_title (CLUTTER_STAGE (stage_default), "Default Stage");
|
||||||
|
@ -102,7 +102,8 @@ test_path_constraint_main (int argc,
|
|||||||
ClutterPath *path;
|
ClutterPath *path;
|
||||||
ClutterColor rect_color = { 0xcc, 0x00, 0x00, 0xff };
|
ClutterColor rect_color = { 0xcc, 0x00, 0x00, 0xff };
|
||||||
|
|
||||||
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), "Path Constraint");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Path Constraint");
|
||||||
|
@ -259,7 +259,8 @@ test_pixmap_main (int argc, char **argv)
|
|||||||
int i;
|
int i;
|
||||||
int row_height;
|
int row_height;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
xdpy = clutter_x11_get_default_display ();
|
xdpy = clutter_x11_get_default_display ();
|
||||||
XSynchronize (xdpy, True);
|
XSynchronize (xdpy, True);
|
||||||
|
@ -58,7 +58,8 @@ test_scale_main (int argc, char *argv[])
|
|||||||
ClutterAlpha *alpha;
|
ClutterAlpha *alpha;
|
||||||
ClutterBehaviour *behave;
|
ClutterBehaviour *behave;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
|
||||||
|
@ -140,7 +140,8 @@ test_script_main (int argc, char *argv[])
|
|||||||
gchar *file;
|
gchar *file;
|
||||||
gint res;
|
gint res;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
script = clutter_script_new ();
|
script = clutter_script_new ();
|
||||||
g_assert (CLUTTER_IS_SCRIPT (script));
|
g_assert (CLUTTER_IS_SCRIPT (script));
|
||||||
|
@ -73,7 +73,8 @@ test_scrolling_main (int argc, char *argv[])
|
|||||||
ClutterAction *action;
|
ClutterAction *action;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
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), "Scrolling");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Scrolling");
|
||||||
|
@ -14,7 +14,8 @@ test_shader_effects_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage, *hand, *label, *rect;
|
ClutterActor *stage, *hand, *label, *rect;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* Make a timeline */
|
/* Make a timeline */
|
||||||
timeline = clutter_timeline_new (7692);
|
timeline = clutter_timeline_new (7692);
|
||||||
|
@ -308,7 +308,8 @@ test_shader_main (gint argc, gchar *argv[])
|
|||||||
GError *error;
|
GError *error;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
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), "Shaders");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Shaders");
|
||||||
|
@ -9,7 +9,8 @@ test_snap_constraint_main (int argc,
|
|||||||
{
|
{
|
||||||
ClutterActor *stage, *layer_a, *layer_b, *layer_c;
|
ClutterActor *stage, *layer_a, *layer_b, *layer_c;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
/* the main container */
|
/* the main container */
|
||||||
stage = clutter_stage_new ();
|
stage = clutter_stage_new ();
|
||||||
|
@ -132,7 +132,8 @@ test_stage_read_pixels_main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
CallbackData data;
|
CallbackData data;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
data.idle_source = 0;
|
data.idle_source = 0;
|
||||||
data.stage = clutter_stage_get_default ();
|
data.stage = clutter_stage_get_default ();
|
||||||
|
@ -41,7 +41,8 @@ test_stage_sizing_main (int argc, char *argv[])
|
|||||||
gfloat width;
|
gfloat width;
|
||||||
ClutterActor *stage, *rect, *label;
|
ClutterActor *stage, *rect, *label;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
|
||||||
|
@ -52,7 +52,8 @@ test_state_animator_main (gint argc,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterActor *rects[40];
|
ClutterActor *rects[40];
|
||||||
gint i;
|
gint 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 ();
|
||||||
|
|
||||||
|
@ -96,7 +96,8 @@ test_state_main (gint argc,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
ClutterState *layout_state;
|
ClutterState *layout_state;
|
||||||
gint i;
|
gint 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 ();
|
||||||
layout_state = clutter_state_new ();
|
layout_state = clutter_state_new ();
|
||||||
|
@ -168,7 +168,8 @@ test_table_layout_main (int argc, char *argv[])
|
|||||||
ClutterActor *box;
|
ClutterActor *box;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
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), "Table Layout");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Table Layout");
|
||||||
|
@ -272,7 +272,8 @@ test_text_field_main (gint argc,
|
|||||||
ClutterActor *box, *entry;
|
ClutterActor *box, *entry;
|
||||||
ClutterLayoutManager *table;
|
ClutterLayoutManager *table;
|
||||||
|
|
||||||
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 Fields");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Text Fields");
|
||||||
|
@ -20,7 +20,8 @@ test_text_main (gint argc,
|
|||||||
ClutterColor cursor_color = { 0xff, 0x33, 0x33, 0xff };
|
ClutterColor cursor_color = { 0xff, 0x33, 0x33, 0xff };
|
||||||
ClutterColor background_color = { 0x00, 0x00, 0x00, 0xff };
|
ClutterColor background_color = { 0x00, 0x00, 0x00, 0xff };
|
||||||
|
|
||||||
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), &background_color);
|
clutter_stage_set_color (CLUTTER_STAGE (stage), &background_color);
|
||||||
|
@ -125,7 +125,8 @@ test_texture_async_main (int argc, char *argv[])
|
|||||||
ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff };
|
ClutterColor stage_color = { 0x12, 0x34, 0x56, 0xff };
|
||||||
gchar *path;
|
gchar *path;
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
@ -12,7 +12,8 @@ test_texture_material_main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
clutter_threads_init ();
|
clutter_threads_init ();
|
||||||
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), "Texture Material");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Texture Material");
|
||||||
|
@ -54,7 +54,8 @@ test_texture_quality_main (int argc, char *argv[])
|
|||||||
GError *error;
|
GError *error;
|
||||||
gchar *file;
|
gchar *file;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -57,7 +57,8 @@ test_textures_main (int argc, char *argv[])
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
gint i, j;
|
gint i, j;
|
||||||
|
|
||||||
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_show_all (CLUTTER_ACTOR (stage));
|
clutter_actor_show_all (CLUTTER_ACTOR (stage));
|
||||||
|
@ -190,7 +190,8 @@ test_threads_main (int argc, char *argv[])
|
|||||||
|
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
clutter_threads_init ();
|
clutter_threads_init ();
|
||||||
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), "Threading");
|
clutter_stage_set_title (CLUTTER_STAGE (stage), "Threading");
|
||||||
|
@ -101,7 +101,8 @@ test_unproject_main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
|
|
||||||
|
@ -75,16 +75,18 @@ main (int argc, char **argv)
|
|||||||
const ClutterColor black = { 0x00, 0x00, 0x00, 0xff };
|
const ClutterColor black = { 0x00, 0x00, 0x00, 0xff };
|
||||||
ClutterColor color = { 0x00, 0x00, 0x00, 0xff };
|
ClutterColor color = { 0x00, 0x00, 0x00, 0xff };
|
||||||
ClutterActor *stage, *rect;
|
ClutterActor *stage, *rect;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
||||||
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
||||||
g_setenv ("CLUTTER_SHOW_FPS", "1", FALSE);
|
g_setenv ("CLUTTER_SHOW_FPS", "1", FALSE);
|
||||||
|
|
||||||
clutter_init_with_args (&argc, &argv,
|
if (clutter_init_with_args (&argc, &argv,
|
||||||
NULL,
|
NULL,
|
||||||
entries,
|
entries,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
&error) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
stage = clutter_stage_get_default ();
|
stage = clutter_stage_get_default ();
|
||||||
clutter_actor_set_size (stage, 512, 512);
|
clutter_actor_set_size (stage, 512, 512);
|
||||||
|
@ -87,7 +87,8 @@ main (int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
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 ();
|
||||||
|
|
||||||
|
@ -114,7 +114,8 @@ main (int argc, char *argv[])
|
|||||||
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
||||||
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
||||||
|
|
||||||
clutter_init (&argc, &argv);
|
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (argc != 3)
|
if (argc != 3)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,8 @@ main (int argc, char *argv[])
|
|||||||
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
g_setenv ("CLUTTER_VBLANK", "none", FALSE);
|
||||||
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
g_setenv ("CLUTTER_DEFAULT_FPS", "1000", FALSE);
|
||||||
|
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user