mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
Merge with a11y
This commit is contained in:
parent
93eb0bfe32
commit
6ed879b84c
@ -51,6 +51,8 @@ main (int argc, char *argv[])
|
||||
clutter_stage_set_color (CLUTTER_STAGE (stage), CLUTTER_COLOR_White);
|
||||
clutter_actor_set_size (stage, WIDTH, HEIGHT);
|
||||
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
|
||||
button1 = clutter_rectangle_new_with_color (CLUTTER_COLOR_Yellow);
|
||||
clutter_actor_set_size (button1, SIZE, SIZE);
|
||||
|
||||
|
@ -148,15 +148,14 @@ _create_button (const gchar *text)
|
||||
ClutterActor *button = NULL;
|
||||
ClutterActor *rectangle = NULL;
|
||||
ClutterActor *label = NULL;
|
||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0xff };
|
||||
ClutterColor color_label = { 0x00, 0x00, 0x00, 0xff };
|
||||
|
||||
button = clutter_group_new ();
|
||||
rectangle = clutter_rectangle_new_with_color (&color_rect);
|
||||
rectangle = clutter_rectangle_new_with_color (CLUTTER_COLOR_Magenta);
|
||||
clutter_actor_set_size (rectangle, 375, 35);
|
||||
|
||||
label = clutter_text_new_full ("Sans Bold 32px",
|
||||
text, &color_label);
|
||||
text,
|
||||
CLUTTER_COLOR_Black);
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (button), rectangle);
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (button), label);
|
||||
clutter_actor_set_reactive (button, TRUE);
|
||||
@ -164,12 +163,9 @@ _create_button (const gchar *text)
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
make_ui (ClutterActor *stage)
|
||||
{
|
||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterActor *button = NULL;
|
||||
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEditable Test");
|
||||
@ -179,18 +175,18 @@ make_ui (ClutterActor *stage)
|
||||
/* text */
|
||||
text_actor = clutter_text_new_full ("Sans Bold 32px",
|
||||
"Lorem ipsum dolor sit amet",
|
||||
&color_text);
|
||||
CLUTTER_COLOR_Red);
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), text_actor);
|
||||
|
||||
/* text_editable */
|
||||
text_editable_actor = clutter_text_new_full ("Sans Bold 32px",
|
||||
"consectetur adipisicing elit",
|
||||
&color_text);
|
||||
CLUTTER_COLOR_Red);
|
||||
clutter_actor_set_position (text_editable_actor, 0, 100);
|
||||
clutter_text_set_editable (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
clutter_text_set_selectable (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
clutter_text_set_selection_color (CLUTTER_TEXT (text_editable_actor),
|
||||
&color_sel);
|
||||
CLUTTER_COLOR_Green);
|
||||
clutter_text_set_activatable (CLUTTER_TEXT (text_editable_actor),
|
||||
TRUE);
|
||||
clutter_text_set_line_wrap (CLUTTER_TEXT (text_editable_actor), TRUE);
|
||||
@ -257,6 +253,7 @@ main (int argc, char *argv[])
|
||||
cally_util_a11y_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_new ();
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
|
@ -88,7 +88,6 @@ make_ui (ClutterActor *stage)
|
||||
ClutterActor *editable = NULL;
|
||||
ClutterActor *rectangle = NULL;
|
||||
ClutterActor *label = NULL;
|
||||
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
|
||||
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
|
||||
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
|
||||
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
|
||||
@ -111,7 +110,7 @@ make_ui (ClutterActor *stage)
|
||||
/* editable */
|
||||
editable = clutter_text_new_full ("Sans Bold 32px",
|
||||
"ddd",
|
||||
&color_text);
|
||||
CLUTTER_COLOR_Red);
|
||||
clutter_actor_set_position (editable, 150, editable_geom_y);
|
||||
clutter_actor_set_size (editable, 500, 75);
|
||||
clutter_text_set_editable (CLUTTER_TEXT (editable), TRUE);
|
||||
@ -138,7 +137,7 @@ make_ui (ClutterActor *stage)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *stage, *stage_main
|
||||
ClutterActor *stage, *stage_main;
|
||||
Data data1, data2, data3;
|
||||
guint id_2 = 0;
|
||||
|
||||
@ -172,7 +171,8 @@ main (int argc, char *argv[])
|
||||
atk_add_global_event_listener (window_event_listener, "Atk:AtkWindow:deactivate");
|
||||
|
||||
stage_main = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEvents/1");
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage_main), "Cally - AtkEvents/1");
|
||||
g_signal_connect (stage_main, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
make_ui (stage_main);
|
||||
|
||||
clutter_actor_show_all (stage_main);
|
||||
@ -181,6 +181,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkEvents/2");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
|
||||
make_ui (stage);
|
||||
clutter_actor_show_all (stage);
|
||||
@ -188,8 +189,5 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
clutter_actor_destroy (stage_main);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -237,7 +237,6 @@ make_ui (ClutterActor *stage)
|
||||
G_CALLBACK (button_press_cb), NULL);
|
||||
|
||||
clutter_container_add_actor (CLUTTER_CONTAINER (stage), button);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
@ -254,6 +253,7 @@ main (int argc, char *argv[])
|
||||
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - AtkText Test");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
@ -264,7 +264,5 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -104,6 +104,7 @@ main (int argc, char *argv[])
|
||||
|
||||
stage = clutter_stage_new ();
|
||||
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cally - Clone Test");
|
||||
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
|
||||
|
||||
make_ui (stage);
|
||||
|
||||
@ -111,7 +112,5 @@ main (int argc, char *argv[])
|
||||
|
||||
clutter_main ();
|
||||
|
||||
clutter_actor_destroy (stage);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user