mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
accessibility/*: Do not use clutter_stage_get_default()
This commit is contained in:
parent
deba576dd1
commit
a5522b707e
@ -45,8 +45,9 @@ main (int argc, char *argv[])
|
||||
|
||||
cally_util_a11y_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
stage = clutter_stage_new ();
|
||||
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkComponent Test");
|
||||
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
|
@ -168,12 +168,12 @@ _create_button (const gchar *text)
|
||||
static void
|
||||
make_ui (ClutterActor *stage)
|
||||
{
|
||||
ClutterColor color_stage = { 0x00, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterActor *button = NULL;
|
||||
|
||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &color_stage);
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEditable Test");
|
||||
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
/* text */
|
||||
@ -256,7 +256,7 @@ main (int argc, char *argv[])
|
||||
|
||||
cally_util_a11y_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
stage = clutter_stage_new ();
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
|
@ -138,8 +138,8 @@ make_ui (ClutterActor *stage)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage = NULL;
|
||||
Data data1, data2,data3;
|
||||
ClutterActor *stage, *stage_main
|
||||
Data data1, data2, data3;
|
||||
guint id_2 = 0;
|
||||
|
||||
g_set_application_name ("AtkText");
|
||||
@ -171,19 +171,25 @@ main (int argc, char *argv[])
|
||||
atk_add_global_event_listener (window_event_listener, "Atk:AtkWindow:activate");
|
||||
atk_add_global_event_listener (window_event_listener, "Atk:AtkWindow:deactivate");
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
make_ui (stage);
|
||||
stage_main = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEvents/1");
|
||||
make_ui (stage_main);
|
||||
|
||||
clutter_actor_show_all (stage);
|
||||
clutter_actor_show_all (stage_main);
|
||||
|
||||
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
|
||||
{
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEvents/2");
|
||||
|
||||
make_ui (stage);
|
||||
clutter_actor_show_all (stage);
|
||||
}
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
clutter_actor_destroy (stage_main);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ make_ui (ClutterActor *stage)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage = NULL;
|
||||
ClutterActor *stage;
|
||||
|
||||
g_set_application_name ("AtkText");
|
||||
|
||||
@ -252,7 +252,8 @@ main (int argc, char *argv[])
|
||||
|
||||
cally_util_a11y_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkText Test");
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
@ -263,5 +264,7 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ make_ui (ClutterActor *stage)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage = NULL;
|
||||
ClutterActor *stage;
|
||||
|
||||
g_set_application_name ("Clone Example");
|
||||
|
||||
@ -102,12 +102,16 @@ main (int argc, char *argv[])
|
||||
|
||||
cally_util_a11y_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - Clone Test");
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
clutter_actor_show_all (stage);
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user