[clutter/deprecate-default-stage: 2/11] accessibility/*: Do not use clutter_stage_get_default()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/deprecate-default-stage: 2/11] accessibility/*: Do not use clutter_stage_get_default()
- Date: Thu, 10 Nov 2011 15:34:28 +0000 (UTC)
commit 343ed8ea99c3a9c5528c1ab523c6daf1af23acdc
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Nov 8 17:11:34 2011 +0000
accessibility/*: Do not use clutter_stage_get_default()
tests/accessibility/cally-atkcomponent-example.c | 3 ++-
.../accessibility/cally-atkeditabletext-example.c | 6 +++---
tests/accessibility/cally-atkevents-example.c | 16 +++++++++++-----
tests/accessibility/cally-atktext-example.c | 7 +++++--
tests/accessibility/cally-clone-example.c | 8 ++++++--
5 files changed, 27 insertions(+), 13 deletions(-)
---
diff --git a/tests/accessibility/cally-atkcomponent-example.c b/tests/accessibility/cally-atkcomponent-example.c
index 7d4ebcd..853ccbe 100644
--- a/tests/accessibility/cally-atkcomponent-example.c
+++ b/tests/accessibility/cally-atkcomponent-example.c
@@ -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);
diff --git a/tests/accessibility/cally-atkeditabletext-example.c b/tests/accessibility/cally-atkeditabletext-example.c
index d139138..4f2e732 100644
--- a/tests/accessibility/cally-atkeditabletext-example.c
+++ b/tests/accessibility/cally-atkeditabletext-example.c
@@ -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);
diff --git a/tests/accessibility/cally-atkevents-example.c b/tests/accessibility/cally-atkevents-example.c
index ca0a006..c3f2df2 100644
--- a/tests/accessibility/cally-atkevents-example.c
+++ b/tests/accessibility/cally-atkevents-example.c
@@ -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;
}
diff --git a/tests/accessibility/cally-atktext-example.c b/tests/accessibility/cally-atktext-example.c
index 4d6099d..3ffade6 100644
--- a/tests/accessibility/cally-atktext-example.c
+++ b/tests/accessibility/cally-atktext-example.c
@@ -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;
}
diff --git a/tests/accessibility/cally-clone-example.c b/tests/accessibility/cally-clone-example.c
index 04137c2..3cc3acb 100644
--- a/tests/accessibility/cally-clone-example.c
+++ b/tests/accessibility/cally-clone-example.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]