summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-05-26 21:33:34 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-05-26 21:34:24 +0200
commit859b5a04236db40a3edecf4aa0162f0fe26cc818 (patch)
treea390714a0c5e97939a750ec4d80e9b91e8e79661
parent94dad4c37a324e67d2e8344748a0927c72c05f6c (diff)
elementary_test: add a new inwin test
to show focusable widgets in the inwin
-rw-r--r--src/bin/elementary/test.c2
-rw-r--r--src/bin/elementary/test_inwin.c32
2 files changed, 34 insertions, 0 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index b21a7125b9..fd26f0bd1b 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -104,6 +104,7 @@ void test_list_separator(void *data, Evas_Object *obj, void *event_info);
104void test_list_multi_select(void *data, Evas_Object *obj, void *event_info); 104void test_list_multi_select(void *data, Evas_Object *obj, void *event_info);
105void test_inwin(void *data, Evas_Object *obj, void *event_info); 105void test_inwin(void *data, Evas_Object *obj, void *event_info);
106void test_inwin2(void *data, Evas_Object *obj, void *event_info); 106void test_inwin2(void *data, Evas_Object *obj, void *event_info);
107void test_inwin3(void *data, Evas_Object *obj, void *event_info);
107void test_scaling(void *data, Evas_Object *obj, void *event_info); 108void test_scaling(void *data, Evas_Object *obj, void *event_info);
108void test_scaling2(void *data, Evas_Object *obj, void *event_info); 109void test_scaling2(void *data, Evas_Object *obj, void *event_info);
109void test_slider(void *data, Evas_Object *obj, void *event_info); 110void test_slider(void *data, Evas_Object *obj, void *event_info);
@@ -657,6 +658,7 @@ add_tests:
657 ADD_TEST(NULL, "Window / Background", "Window States 2", test_win_state2); 658 ADD_TEST(NULL, "Window / Background", "Window States 2", test_win_state2);
658 ADD_TEST(NULL, "Window / Background", "Inwin", test_inwin); 659 ADD_TEST(NULL, "Window / Background", "Inwin", test_inwin);
659 ADD_TEST(NULL, "Window / Background", "Inwin 2", test_inwin2); 660 ADD_TEST(NULL, "Window / Background", "Inwin 2", test_inwin2);
661 ADD_TEST(NULL, "Window / Background", "Inwin 3", test_inwin3);
660 ADD_TEST(NULL, "Window / Background", "Window Inline", test_win_inline); 662 ADD_TEST(NULL, "Window / Background", "Window Inline", test_win_inline);
661 ADD_TEST(NULL, "Window / Background", "Window Socket", test_win_socket); 663 ADD_TEST(NULL, "Window / Background", "Window Socket", test_win_socket);
662 ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug); 664 ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug);
diff --git a/src/bin/elementary/test_inwin.c b/src/bin/elementary/test_inwin.c
index 9dae4c091d..94dfe63663 100644
--- a/src/bin/elementary/test_inwin.c
+++ b/src/bin/elementary/test_inwin.c
@@ -127,3 +127,35 @@ test_inwin2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
127 evas_object_resize(win, 320, 240); 127 evas_object_resize(win, 320, 240);
128 evas_object_show(win); 128 evas_object_show(win);
129} 129}
130
131void
132test_inwin3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
133{
134 Evas_Object *win, *inwin, *lb, *box;
135
136 win = elm_win_util_standard_add("inwin2", "InWin 2");
137 elm_win_autodel_set(win, EINA_TRUE);
138
139 inwin = elm_win_inwin_add(win);
140 elm_object_style_set(inwin, "minimal_vertical");
141 evas_object_show(inwin);
142
143 box = elm_box_add(win);
144 elm_win_inwin_content_set(inwin, box);
145 evas_object_show(box);
146
147 lb = elm_button_add(box);
148 elm_object_text_set(lb,
149 "Test BTN 1");
150 elm_box_pack_end(box, lb);
151 evas_object_show(lb);
152
153 lb = elm_button_add(box);
154 elm_object_text_set(lb,
155 "Test BTN 1");
156 elm_box_pack_end(box, lb);
157 evas_object_show(lb);
158
159 evas_object_resize(win, 320, 240);
160 evas_object_show(win);
161}