1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
8 test_conformant(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
10 Evas_Object *win, *bg, *conform, *btn, *bx, *en;
12 win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC);
13 elm_win_title_set(win, "Conformant");
14 elm_win_autodel_set(win, EINA_TRUE);
16 elm_win_conformant_set(win, 1);
18 elm_win_conformant_set(win, EINA_TRUE);
19 >>>>>>> remotes/origin/upstream
22 elm_win_resize_object_add(win, bg);
23 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
26 conform = elm_conformant_add(win);
27 elm_win_resize_object_add(win, conform);
28 evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
29 evas_object_show(conform);
31 bx = elm_box_add(win);
32 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
33 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
35 en = elm_entry_add(win);
36 elm_entry_scrollable_set(en, EINA_TRUE);
38 elm_entry_single_line_set(en, 1);
39 elm_entry_bounce_set(en, 1, 0);
41 elm_entry_single_line_set(en, EINA_TRUE);
42 elm_entry_bounce_set(en, EINA_TRUE, EINA_FALSE);
43 >>>>>>> remotes/origin/upstream
44 elm_object_text_set(en, "This is the top entry here");
45 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
46 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
48 elm_box_pack_end(bx, en);
50 btn = elm_button_add(win);
51 elm_object_text_set(btn, "Test Conformant");
52 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0);
53 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
54 elm_box_pack_end(bx, btn);
55 evas_object_show(btn);
57 en = elm_entry_add(win);
58 elm_entry_scrollable_set(en, EINA_TRUE);
60 elm_entry_single_line_set(en, 1);
61 elm_entry_bounce_set(en, 1, 0);
63 elm_entry_single_line_set(en, EINA_TRUE);
64 elm_entry_bounce_set(en, EINA_TRUE, EINA_FALSE);
65 >>>>>>> remotes/origin/upstream
66 elm_object_text_set(en, "This is the middle entry here");
67 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
68 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
70 elm_box_pack_end(bx, en);
72 btn = elm_button_add(win);
73 elm_object_text_set(btn, "Test Conformant");
74 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
75 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
76 elm_box_pack_end(bx, btn);
77 evas_object_show(btn);
79 en = elm_entry_add(win);
80 elm_entry_scrollable_set(en, EINA_TRUE);
82 elm_entry_bounce_set(en, 0, 1);
84 elm_entry_bounce_set(en, EINA_FALSE, EINA_TRUE);
85 >>>>>>> remotes/origin/upstream
86 elm_object_text_set(en,
87 "This is a multi-line entry at the bottom<br/>"
88 "This can contain more than 1 line of text and be "
89 "scrolled around to allow for entering of lots of "
90 "content. It is also to test to see that autoscroll "
91 "moves to the right part of a larger multi-line "
92 "text entry that is inside of a scroller than can be "
93 "scrolled around, thus changing the expected position "
94 "as well as cursor changes updating auto-scroll when "
96 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
97 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
99 elm_box_pack_end(bx, en);
101 elm_object_content_set(conform, bx);
102 evas_object_show(bx);
104 evas_object_resize(win, 240, 240);
105 evas_object_show(win);
109 popobj(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
112 elm_pager_content_pop(data);
114 elm_naviframe_item_pop(data);
115 >>>>>>> remotes/origin/upstream
119 test_conformant2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
121 Evas_Object *win, *bg, *conform, *btn, *bx, *en, *pg;
123 win = elm_win_add(NULL, "conformant2", ELM_WIN_BASIC);
124 elm_win_title_set(win, "Conformant 2");
125 elm_win_autodel_set(win, EINA_TRUE);
127 elm_win_conformant_set(win, 1);
129 elm_win_conformant_set(win, EINA_TRUE);
130 >>>>>>> remotes/origin/upstream
132 bg = elm_bg_add(win);
133 elm_win_resize_object_add(win, bg);
134 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
135 evas_object_show(bg);
137 bx = elm_box_add(win);
138 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
139 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
140 elm_win_resize_object_add(win, bx);
141 evas_object_show(bx);
143 en = elm_entry_add(win);
144 elm_entry_scrollable_set(en, EINA_TRUE);
146 elm_entry_single_line_set(en, 1);
147 elm_entry_bounce_set(en, 1, 0);
149 elm_entry_single_line_set(en, EINA_TRUE);
150 elm_entry_bounce_set(en, EINA_TRUE, EINA_FALSE);
151 >>>>>>> remotes/origin/upstream
152 elm_object_text_set(en, "This is the top entry here");
153 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
154 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.5);
155 elm_box_pack_end(bx, en);
156 evas_object_show(en);
158 btn = elm_button_add(win);
160 elm_object_focus_allow_set(btn, 0);
162 elm_object_focus_allow_set(btn, EINA_FALSE);
163 >>>>>>> remotes/origin/upstream
164 elm_object_text_set(btn, "Delete Below");
165 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0);
166 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
167 elm_box_pack_end(bx, btn);
168 evas_object_show(btn);
171 pg = elm_pager_add(win);
173 pg = elm_naviframe_add(win);
174 >>>>>>> remotes/origin/upstream
175 evas_object_size_hint_weight_set(pg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
176 evas_object_size_hint_align_set(pg, EVAS_HINT_FILL, EVAS_HINT_FILL);
177 elm_box_pack_end(bx, pg);
178 evas_object_show(pg);
180 evas_object_smart_callback_add(btn, "clicked", popobj, pg);
182 conform = elm_conformant_add(win);
183 evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
184 evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
186 elm_pager_content_push(pg, conform);
188 elm_naviframe_item_simple_push(pg, conform);
189 >>>>>>> remotes/origin/upstream
190 evas_object_show(conform);
192 bx = elm_box_add(win);
193 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
194 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
196 en = elm_entry_add(win);
197 elm_entry_scrollable_set(en, EINA_TRUE);
199 elm_entry_bounce_set(en, 0, 1);
201 elm_entry_bounce_set(en, EINA_FALSE, EINA_TRUE);
202 >>>>>>> remotes/origin/upstream
203 elm_object_text_set(en, "This entry and button below get deleted.");
204 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
205 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
206 evas_object_show(en);
207 elm_box_pack_end(bx, en);
209 btn = elm_button_add(win);
211 elm_object_focus_allow_set(btn, 0);
213 elm_object_focus_allow_set(btn, EINA_FALSE);
214 >>>>>>> remotes/origin/upstream
215 elm_object_text_set(btn, "Delete this bottom bit 1");
216 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0);
217 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
218 elm_box_pack_end(bx, btn);
219 evas_object_show(btn);
221 evas_object_smart_callback_add(btn, "clicked", popobj, pg);
223 elm_object_content_set(conform, bx);
224 evas_object_show(bx);
226 conform = elm_conformant_add(win);
227 evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
228 evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL);
230 elm_pager_content_push(pg, conform);
232 elm_naviframe_item_simple_push(pg, conform);
233 >>>>>>> remotes/origin/upstream
234 evas_object_show(conform);
236 bx = elm_box_add(win);
237 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
238 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
240 en = elm_entry_add(win);
241 elm_entry_scrollable_set(en, EINA_TRUE);
243 elm_entry_bounce_set(en, 0, 1);
245 elm_entry_bounce_set(en, EINA_FALSE, EINA_TRUE);
246 >>>>>>> remotes/origin/upstream
247 elm_object_text_set(en, "This entry and button below get deleted.");
248 evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
249 evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
250 evas_object_show(en);
251 elm_box_pack_end(bx, en);
253 btn = elm_button_add(win);
255 elm_object_focus_allow_set(btn, 0);
257 elm_object_focus_allow_set(btn, EINA_FALSE);
258 >>>>>>> remotes/origin/upstream
259 elm_object_text_set(btn, "Delete this bottom bit 2");
260 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0);
261 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
262 elm_box_pack_end(bx, btn);
263 evas_object_show(btn);
265 evas_object_smart_callback_add(btn, "clicked", popobj, pg);
267 elm_object_content_set(conform, bx);
268 evas_object_show(bx);
270 evas_object_resize(win, 240, 480);
271 evas_object_show(win);