summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-10 14:01:33 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-10 14:01:33 +0900
commitc92bc5ad9646b0ce7546885428ad249f5b944a71 (patch)
treecdd12dcbd15af30a02b166fddfbbc84074644d41
parent6e8e0aa6c64f1700e4fec838603ea448736e38dc (diff)
test_naviframe: added a test for event freeze checking.
-rw-r--r--src/bin/test_naviframe.c56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/bin/test_naviframe.c b/src/bin/test_naviframe.c
index 75d728649..a4a39da20 100644
--- a/src/bin/test_naviframe.c
+++ b/src/bin/test_naviframe.c
@@ -59,14 +59,14 @@ _promote(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
59} 59}
60 60
61void 61void
62_page7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 62_page8(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
63{ 63{
64 Evas_Object *bt, *bt2, *content, *nf = data; 64 Evas_Object *bt, *bt2, *content, *nf = data;
65 Elm_Object_Item *it; 65 Elm_Object_Item *it;
66 66
67 bt = elm_button_add(nf); 67 bt = elm_button_add(nf);
68 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 68 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
69 BUTTON_TEXT_SET(bt, "Page 6"); 69 BUTTON_TEXT_SET(bt, "Page 7");
70 70
71 bt2 = elm_button_add(nf); 71 bt2 = elm_button_add(nf);
72 evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL); 72 evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -74,6 +74,58 @@ _page7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
74 evas_object_smart_callback_add(bt2, "clicked", _promote, 74 evas_object_smart_callback_add(bt2, "clicked", _promote,
75 evas_object_data_get(nf, "page1")); 75 evas_object_data_get(nf, "page1"));
76 content = _content_new(nf, img6); 76 content = _content_new(nf, img6);
77 it = elm_naviframe_item_push(nf, "Page 8", bt, bt2, content, NULL);
78 elm_object_item_part_text_set(it, "subtitle", "Overlap style!");
79
80 evas_object_smart_callback_add(bt, "clicked", _navi_pop, nf);
81}
82
83static void
84_page7_btn_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
85 void *event_info EINA_UNUSED)
86{
87 evas_object_color_set(obj, 100, 0, 0, 100);
88 _page8(data, NULL, NULL);
89}
90
91static void
92_page7_btn_up_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
93 void *event_info EINA_UNUSED)
94{
95 evas_object_color_set(obj, 255, 255, 255, 255);
96 printf("Page7 Button Mouse Up!\n");
97}
98
99Evas_Object *
100_page7_content_new(Evas_Object *nf)
101{
102 Evas_Object *bt;
103
104 bt = elm_button_add(nf);
105 elm_object_text_set(bt, "Page 8");
106 evas_object_event_callback_add(bt, EVAS_CALLBACK_MOUSE_DOWN,
107 _page7_btn_down_cb, nf);
108 evas_object_event_callback_add(bt, EVAS_CALLBACK_MOUSE_UP,
109 _page7_btn_up_cb, NULL);
110
111 return bt;
112}
113
114void
115_page7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
116{
117 Evas_Object *bt, *bt2, *content, *nf = data;
118 Elm_Object_Item *it;
119
120 bt = elm_button_add(nf);
121 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
122 BUTTON_TEXT_SET(bt, "Page 6");
123
124 bt2 = elm_button_add(nf);
125 evas_object_size_hint_align_set(bt2, EVAS_HINT_FILL, EVAS_HINT_FILL);
126 BUTTON_TEXT_SET(bt2, "Page 8");
127 evas_object_smart_callback_add(bt2, "clicked", _page8, nf);
128 content = _page7_content_new(nf);
77 it = elm_naviframe_item_push(nf, "Page 7", bt, bt2, content, "overlap"); 129 it = elm_naviframe_item_push(nf, "Page 7", bt, bt2, content, "overlap");
78 elm_object_item_part_text_set(it, "subtitle", "Overlap style!"); 130 elm_object_item_part_text_set(it, "subtitle", "Overlap style!");
79 131