fixed plugin image size problem
[framework/uifw/elementary.git] / src / bin / test_toolbar.c
1 #ifdef HAVE_CONFIG_H
2 # include "elementary_config.h"
3 #endif
4 #include <Elementary.h>
5 #ifndef ELM_LIB_QUICKLAUNCH
6 static void
7 tb_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
8 {
9    char buf[PATH_MAX];
10    snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", elm_app_data_dir_get());
11    elm_photo_file_set(data, buf);
12 }
13
14 static void
15 tb_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
16 {
17    char buf[PATH_MAX];
18    snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
19    elm_photo_file_set(data, buf);
20 }
21
22 static void
23 tb_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
24 {
25    char buf[PATH_MAX];
26    snprintf(buf, sizeof(buf), "%s/images/wood_01.jpg", elm_app_data_dir_get());
27    elm_photo_file_set(data, buf);
28 }
29
30 static void
31 tb_3a(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
32 {
33    tb_3(data, obj, event_info);
34    elm_toolbar_item_state_set(event_info, elm_toolbar_item_state_next(event_info));
35 }
36
37 static void
38 tb_3b(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
39 {
40    tb_3(data, obj, event_info);
41    elm_toolbar_item_state_unset(event_info);
42 }
43
44 static void
45 tb_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
46 {
47    char buf[PATH_MAX];
48    snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
49    elm_photo_file_set(data, buf);
50 }
51
52 static void
53 tb_4a(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
54 {
55    elm_toolbar_item_state_set(event_info, elm_toolbar_item_state_prev(event_info));
56 }
57
58 static void
59 tb_5(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
60 {
61    elm_photo_file_set(data, NULL);
62 }
63
64 static void
65 toolbar_clicked_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
66 {
67    Elm_Object_Item *it = elm_toolbar_more_item_get(obj);
68
69    if (!strcmp(elm_object_item_text_get(it), "Open") && (it == elm_toolbar_selected_item_get(obj)))
70      {
71         elm_toolbar_item_icon_set(it, "arrow_up");
72         elm_object_item_text_set(it, "Close");
73      }
74    else if (!strcmp(elm_object_item_text_get(it), "Close"))
75      {
76         elm_toolbar_item_icon_set(it, "arrow_down");
77         elm_object_item_text_set(it, "Open");
78      }
79 }
80
81 void
82 test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
83 {
84    Evas_Object *win, *bx, *tb, *ph, *menu;
85    Evas_Object *ph1, *ph2, *ph3, *ph4;
86    Elm_Object_Item *tb_it;
87    Elm_Object_Item *menu_it;
88    char buf[PATH_MAX];
89
90    win = elm_win_util_standard_add("toolbar", "Toolbar");
91    elm_win_autodel_set(win, EINA_TRUE);
92
93    bx = elm_box_add(win);
94    elm_win_resize_object_add(win, bx);
95    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
96    evas_object_show(bx);
97
98    tb = elm_toolbar_add(win);
99    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
100    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
101    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
102    elm_object_scale_set(tb, 0.9);
103
104    ph1 = elm_photo_add(win);
105    ph2 = elm_photo_add(win);
106    ph3 = elm_photo_add(win);
107    ph4 = elm_photo_add(win);
108
109    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
110    elm_object_item_disabled_set(tb_it, EINA_TRUE);
111    elm_toolbar_item_priority_set(tb_it, 100);
112
113    tb_it = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
114    elm_toolbar_item_priority_set(tb_it, -100);
115
116    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
117    elm_toolbar_item_priority_set(tb_it, 150);
118
119    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
120    elm_toolbar_item_priority_set(tb_it, 0);
121
122    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
123    elm_toolbar_item_priority_set(tb_it, -200);
124
125    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
126    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
127    elm_toolbar_item_priority_set(tb_it, -9999);
128    elm_toolbar_menu_parent_set(tb, win);
129    menu = elm_toolbar_item_menu_get(tb_it);
130
131    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
132    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
133    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
134    elm_menu_item_add(menu, NULL, "edit-delete", "Menu", tb_5, ph4);
135
136    elm_box_pack_end(bx, tb);
137    evas_object_show(tb);
138
139    tb = elm_table_add(win);
140    //elm_table_homogeneous_set(tb, 1);
141    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
142    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
143
144    ph = ph1;
145    elm_photo_size_set(ph, 40);
146    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
147    elm_photo_file_set(ph, buf);
148    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
149    evas_object_size_hint_align_set(ph, 0.5, 0.5);
150    elm_table_pack(tb, ph, 0, 0, 1, 1);
151    evas_object_show(ph);
152
153    ph = ph2;
154    elm_photo_size_set(ph, 80);
155    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
156    evas_object_size_hint_align_set(ph, 0.5, 0.5);
157    elm_table_pack(tb, ph, 1, 0, 1, 1);
158    evas_object_show(ph);
159
160    ph = ph3;
161    elm_photo_size_set(ph, 20);
162    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
163    elm_photo_file_set(ph, buf);
164    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
165    evas_object_size_hint_align_set(ph, 0.5, 0.5);
166    elm_table_pack(tb, ph, 0, 1, 1, 1);
167    evas_object_show(ph);
168
169    ph = ph4;
170    elm_photo_size_set(ph, 60);
171    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
172    elm_photo_file_set(ph, buf);
173    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
174    evas_object_size_hint_align_set(ph, 0.5, 0.5);
175    elm_table_pack(tb, ph, 1, 1, 1, 1);
176    evas_object_show(ph);
177
178    elm_box_pack_end(bx, tb);
179    evas_object_show(tb);
180
181    evas_object_resize(win, 320, 300);
182    evas_object_show(win);
183 }
184
185 void
186 test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
187 {
188    Evas_Object *win, *bx, *tb, *ph, *menu;
189    Evas_Object *ph1, *ph2, *ph3, *ph4;
190    Elm_Object_Item *item;
191    Elm_Object_Item *menu_it;
192    char buf[PATH_MAX];
193
194    win = elm_win_util_standard_add("toolbar2", "Toolbar 2");
195    elm_win_autodel_set(win, EINA_TRUE);
196
197    bx = elm_box_add(win);
198    elm_win_resize_object_add(win, bx);
199    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
200    evas_object_show(bx);
201
202    tb = elm_toolbar_add(win);
203    elm_toolbar_homogeneous_set(tb, 0);
204    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL);
205    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
206    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
207
208    ph1 = elm_photo_add(win);
209    ph2 = elm_photo_add(win);
210    ph3 = elm_photo_add(win);
211    ph4 = elm_photo_add(win);
212
213    item = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
214    elm_object_item_disabled_set(item, EINA_TRUE);
215    elm_toolbar_item_priority_set(item, -100);
216
217    item = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
218    elm_toolbar_item_priority_set(item, 100);
219
220    item = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
221    elm_toolbar_item_priority_set(item, -150);
222
223    item = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
224    elm_toolbar_item_priority_set(item, -200);
225
226    item = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
227    elm_toolbar_item_priority_set(item, 0);
228
229    item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
230    elm_toolbar_item_menu_set(item, EINA_TRUE);
231    elm_toolbar_item_priority_set(item, -9999);
232    elm_toolbar_menu_parent_set(tb, win);
233    menu = elm_toolbar_item_menu_get(item);
234
235    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
236    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
237    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
238    elm_menu_item_add(menu, NULL, "edit-delete", "Scroll", tb_5, ph4);
239
240    elm_box_pack_end(bx, tb);
241    evas_object_show(tb);
242
243    tb = elm_table_add(win);
244    //elm_table_homogeneous_set(tb, 1);
245    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
246    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
247
248    ph = ph1;
249    elm_photo_size_set(ph, 40);
250    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
251    elm_photo_file_set(ph, buf);
252    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
253    evas_object_size_hint_align_set(ph, 0.5, 0.5);
254    elm_table_pack(tb, ph, 0, 0, 1, 1);
255    evas_object_show(ph);
256
257    ph = ph2;
258    elm_photo_size_set(ph, 80);
259    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
260    evas_object_size_hint_align_set(ph, 0.5, 0.5);
261    elm_table_pack(tb, ph, 1, 0, 1, 1);
262    evas_object_show(ph);
263
264    ph = ph3;
265    elm_photo_size_set(ph, 20);
266    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
267    elm_photo_file_set(ph, buf);
268    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
269    evas_object_size_hint_align_set(ph, 0.5, 0.5);
270    elm_table_pack(tb, ph, 0, 1, 1, 1);
271    evas_object_show(ph);
272
273    ph = ph4;
274    elm_photo_size_set(ph, 60);
275    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
276    elm_photo_file_set(ph, buf);
277    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
278    evas_object_size_hint_align_set(ph, 0.5, 0.5);
279    elm_table_pack(tb, ph, 1, 1, 1, 1);
280    evas_object_show(ph);
281
282    elm_box_pack_end(bx, tb);
283    evas_object_show(tb);
284
285    evas_object_resize(win, 320, 300);
286    evas_object_show(win);
287 }
288
289 void
290 test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
291 {
292    Evas_Object *win, *bx, *tb, *ph, *menu;
293    Evas_Object *ph1, *ph2, *ph3, *ph4;
294    Elm_Object_Item *tb_it;
295    Elm_Object_Item *menu_it;
296    char buf[PATH_MAX];
297
298    win = elm_win_util_standard_add("toolbar3", "Toolbar 3");
299    elm_win_autodel_set(win, EINA_TRUE);
300
301    bx = elm_box_add(win);
302    elm_win_resize_object_add(win, bx);
303    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
304    evas_object_show(bx);
305
306    tb = elm_toolbar_add(win);
307    elm_toolbar_homogeneous_set(tb, EINA_FALSE);
308    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_NONE);
309    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
310    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
311
312    ph1 = elm_photo_add(win);
313    ph2 = elm_photo_add(win);
314    ph3 = elm_photo_add(win);
315    ph4 = elm_photo_add(win);
316
317    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
318    elm_object_item_disabled_set(tb_it, EINA_TRUE);
319    elm_toolbar_item_priority_set(tb_it, EINA_FALSE);
320
321    tb_it = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
322    elm_toolbar_item_priority_set(tb_it, -200);
323
324    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
325    elm_toolbar_item_priority_set(tb_it, EINA_TRUE);
326
327    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
328    elm_toolbar_item_priority_set(tb_it, -10);
329
330    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
331    elm_toolbar_item_priority_set(tb_it, 50);
332
333    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
334    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
335    elm_toolbar_item_priority_set(tb_it, 9999);
336    elm_toolbar_menu_parent_set(tb, win);
337    menu = elm_toolbar_item_menu_get(tb_it);
338
339    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
340    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
341    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
342    elm_menu_item_add(menu, NULL, "edit-delete", "None", tb_5, ph4);
343
344    elm_box_pack_end(bx, tb);
345    evas_object_show(tb);
346
347    tb = elm_table_add(win);
348    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
349    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
350
351    ph = ph1;
352    elm_photo_size_set(ph, 40);
353    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
354    elm_photo_file_set(ph, buf);
355    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
356    evas_object_size_hint_align_set(ph, 0.5, 0.5);
357    elm_table_pack(tb, ph, 0, 0, 1, 1);
358    evas_object_show(ph);
359
360    ph = ph2;
361    elm_photo_size_set(ph, 80);
362    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
363    evas_object_size_hint_align_set(ph, 0.5, 0.5);
364    elm_table_pack(tb, ph, 1, 0, 1, 1);
365    evas_object_show(ph);
366
367    ph = ph3;
368    elm_photo_size_set(ph, 20);
369    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
370    elm_photo_file_set(ph, buf);
371    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
372    evas_object_size_hint_align_set(ph, 0.5, 0.5);
373    elm_table_pack(tb, ph, 0, 1, 1, 1);
374    evas_object_show(ph);
375
376    ph = ph4;
377    elm_photo_size_set(ph, 60);
378    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
379    elm_photo_file_set(ph, buf);
380    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
381    evas_object_size_hint_align_set(ph, 0.5, 0.5);
382    elm_table_pack(tb, ph, 1, 1, 1, 1);
383    evas_object_show(ph);
384
385    elm_box_pack_end(bx, tb);
386    evas_object_show(tb);
387
388    evas_object_resize(win, 320, 300);
389    evas_object_show(win);
390 }
391
392 /* The same test of toolbar, but using hide shrink mode instead of menu */
393 void
394 test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
395 {
396    Evas_Object *win, *bx, *tb, *ph, *menu;
397    Evas_Object *ph1, *ph2, *ph3, *ph4;
398    Elm_Object_Item *tb_it;
399    Elm_Object_Item *menu_it;
400    char buf[PATH_MAX];
401
402    win = elm_win_util_standard_add("toolbar4", "Toolbar 4");
403    elm_win_autodel_set(win, EINA_TRUE);
404
405    bx = elm_box_add(win);
406    elm_win_resize_object_add(win, bx);
407    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
408    evas_object_show(bx);
409
410    tb = elm_toolbar_add(win);
411    elm_toolbar_homogeneous_set(tb, 0);
412    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_HIDE);
413    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
414    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
415
416    ph1 = elm_photo_add(win);
417    ph2 = elm_photo_add(win);
418    ph3 = elm_photo_add(win);
419    ph4 = elm_photo_add(win);
420
421    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
422    elm_object_item_disabled_set(tb_it, EINA_TRUE);
423    elm_toolbar_item_priority_set(tb_it, 100);
424
425    tb_it = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
426    elm_toolbar_item_priority_set(tb_it, -100);
427
428    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
429    elm_toolbar_item_priority_set(tb_it, 150);
430
431    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
432    elm_toolbar_item_priority_set(tb_it, 0);
433
434    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
435    elm_toolbar_item_priority_set(tb_it, -200);
436
437    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
438    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
439    elm_toolbar_item_priority_set(tb_it, -9999);
440    elm_toolbar_menu_parent_set(tb, win);
441    menu = elm_toolbar_item_menu_get(tb_it);
442
443    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
444    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
445    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
446    elm_menu_item_add(menu, NULL, "edit-delete", "Menu", tb_5, ph4);
447
448    elm_box_pack_end(bx, tb);
449    evas_object_show(tb);
450
451    tb = elm_table_add(win);
452    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
453    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
454
455    ph = ph1;
456    elm_photo_size_set(ph, 40);
457    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
458    elm_photo_file_set(ph, buf);
459    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
460    evas_object_size_hint_align_set(ph, 0.5, 0.5);
461    elm_table_pack(tb, ph, 0, 0, 1, 1);
462    evas_object_show(ph);
463
464    ph = ph2;
465    elm_photo_size_set(ph, 80);
466    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
467    evas_object_size_hint_align_set(ph, 0.5, 0.5);
468    elm_table_pack(tb, ph, 1, 0, 1, 1);
469    evas_object_show(ph);
470
471    ph = ph3;
472    elm_photo_size_set(ph, 20);
473    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
474    elm_photo_file_set(ph, buf);
475    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
476    evas_object_size_hint_align_set(ph, 0.5, 0.5);
477    elm_table_pack(tb, ph, 0, 1, 1, 1);
478    evas_object_show(ph);
479
480    ph = ph4;
481    elm_photo_size_set(ph, 60);
482    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
483    elm_photo_file_set(ph, buf);
484    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
485    evas_object_size_hint_align_set(ph, 0.5, 0.5);
486    elm_table_pack(tb, ph, 1, 1, 1, 1);
487    evas_object_show(ph);
488
489    elm_box_pack_end(bx, tb);
490    evas_object_show(tb);
491
492    evas_object_resize(win, 320, 300);
493    evas_object_show(win);
494 }
495
496 /* Toolbar with multiple state buttons */
497 void
498 test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
499 {
500    Evas_Object *win, *bx, *tb, *ph, *menu;
501    Evas_Object *ph1, *ph2, *ph3, *ph4;
502    Elm_Object_Item *tb_it;
503    Elm_Object_Item *menu_it;
504    char buf[PATH_MAX];
505
506    win = elm_win_util_standard_add("toolbar5", "Toolbar 5");
507    elm_win_autodel_set(win, EINA_TRUE);
508
509    bx = elm_box_add(win);
510    elm_win_resize_object_add(win, bx);
511    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
512    evas_object_show(bx);
513
514    tb = elm_toolbar_add(win);
515    elm_toolbar_homogeneous_set(tb, 0);
516    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
517    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
518    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
519    elm_toolbar_select_mode_set(tb, ELM_OBJECT_SELECT_MODE_NONE);
520
521    ph1 = elm_photo_add(win);
522    ph2 = elm_photo_add(win);
523    ph3 = elm_photo_add(win);
524    ph4 = elm_photo_add(win);
525
526    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
527    elm_object_item_disabled_set(tb_it, EINA_TRUE);
528    elm_toolbar_item_priority_set(tb_it, 100);
529
530    snprintf(buf, sizeof(buf), "%s/images/icon_04.pngj", elm_app_data_dir_get());
531    tb_it = elm_toolbar_item_append(tb, buf, "World", tb_2, ph1);
532    elm_toolbar_item_priority_set(tb_it, -100);
533
534    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3a, ph4);
535    elm_toolbar_item_state_add(tb_it, "object-rotate-left", "H2", tb_3b, ph4);
536    elm_toolbar_item_priority_set(tb_it, 150);
537
538    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4a, ph4);
539    elm_toolbar_item_state_add(tb_it, "emptytrash", "Comes2", tb_4a, ph4);
540    elm_toolbar_item_state_add(tb_it, "trashcan_full", "Comes3", tb_4a, ph4);
541    elm_toolbar_item_priority_set(tb_it, 0);
542
543    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
544    elm_toolbar_item_priority_set(tb_it, -200);
545
546    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
547    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
548    elm_toolbar_item_priority_set(tb_it, -9999);
549    elm_toolbar_menu_parent_set(tb, win);
550    menu = elm_toolbar_item_menu_get(tb_it);
551
552    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
553    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
554    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
555    elm_menu_item_add(menu, NULL, "edit-delete", "Menu", tb_5, ph4);
556
557    elm_box_pack_end(bx, tb);
558    evas_object_show(tb);
559
560    tb = elm_table_add(win);
561    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
562    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
563
564    ph = ph1;
565    elm_photo_size_set(ph, 40);
566    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
567    elm_photo_file_set(ph, buf);
568    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
569    evas_object_size_hint_align_set(ph, 0.5, 0.5);
570    elm_table_pack(tb, ph, 0, 0, 1, 1);
571    evas_object_show(ph);
572
573    ph = ph2;
574    elm_photo_size_set(ph, 80);
575    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
576    evas_object_size_hint_align_set(ph, 0.5, 0.5);
577    elm_table_pack(tb, ph, 1, 0, 1, 1);
578    evas_object_show(ph);
579
580    ph = ph3;
581    elm_photo_size_set(ph, 20);
582    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
583    elm_photo_file_set(ph, buf);
584    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
585    evas_object_size_hint_align_set(ph, 0.5, 0.5);
586    elm_table_pack(tb, ph, 0, 1, 1, 1);
587    evas_object_show(ph);
588
589    ph = ph4;
590    elm_photo_size_set(ph, 60);
591    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
592    elm_photo_file_set(ph, buf);
593    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
594    evas_object_size_hint_align_set(ph, 0.5, 0.5);
595    elm_table_pack(tb, ph, 1, 1, 1, 1);
596    evas_object_show(ph);
597
598    elm_box_pack_end(bx, tb);
599    evas_object_show(tb);
600
601    evas_object_resize(win, 320, 300);
602    evas_object_show(win);
603 }
604
605 void
606 test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
607 {
608    Evas_Object *win, *bx, *tb, *ph, *menu;
609    Evas_Object *ph1, *ph2, *ph3, *ph4;
610    Elm_Object_Item *tb_it;
611    Elm_Object_Item *menu_it;
612    char buf[PATH_MAX];
613
614    win = elm_win_util_standard_add("toolbar6", "Toolbar 6");
615    elm_win_autodel_set(win, EINA_TRUE);
616
617    bx = elm_box_add(win);
618    elm_win_resize_object_add(win, bx);
619    elm_box_horizontal_set(bx, EINA_TRUE);
620    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
621    evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
622    evas_object_show(bx);
623
624    tb = elm_toolbar_add(win);
625    elm_toolbar_horizontal_set(tb, EINA_FALSE);
626    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
627    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
628    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
629
630    ph1 = elm_photo_add(win);
631    ph2 = elm_photo_add(win);
632    ph3 = elm_photo_add(win);
633    ph4 = elm_photo_add(win);
634
635    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
636    elm_object_item_disabled_set(tb_it, EINA_TRUE);
637    elm_toolbar_item_priority_set(tb_it, 100);
638
639    tb_it = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
640    elm_toolbar_item_priority_set(tb_it, -100);
641
642    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
643    elm_toolbar_item_priority_set(tb_it, 150);
644
645    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
646    elm_toolbar_item_priority_set(tb_it, 0);
647
648    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
649    elm_toolbar_item_priority_set(tb_it, -200);
650
651    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
652    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
653    elm_toolbar_item_priority_set(tb_it, -9999);
654    elm_toolbar_menu_parent_set(tb, win);
655    menu = elm_toolbar_item_menu_get(tb_it);
656
657    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
658    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
659    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
660    elm_menu_item_add(menu, NULL, "edit-delete", "Menu", tb_5, ph4);
661
662    elm_box_pack_end(bx, tb);
663    evas_object_show(tb);
664
665    tb = elm_table_add(win);
666    evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
667    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
668
669    ph = ph1;
670    elm_photo_size_set(ph, 40);
671    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
672    elm_photo_file_set(ph, buf);
673    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
674    evas_object_size_hint_align_set(ph, 0.5, 0.5);
675    elm_table_pack(tb, ph, 0, 0, 1, 1);
676    evas_object_show(ph);
677
678    ph = ph2;
679    elm_photo_size_set(ph, 80);
680    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
681    evas_object_size_hint_align_set(ph, 0.5, 0.5);
682    elm_table_pack(tb, ph, 1, 0, 1, 1);
683    evas_object_show(ph);
684
685    ph = ph3;
686    elm_photo_size_set(ph, 20);
687    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
688    elm_photo_file_set(ph, buf);
689    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
690    evas_object_size_hint_align_set(ph, 0.5, 0.5);
691    elm_table_pack(tb, ph, 0, 1, 1, 1);
692    evas_object_show(ph);
693
694    ph = ph4;
695    elm_photo_size_set(ph, 60);
696    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
697    elm_photo_file_set(ph, buf);
698    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
699    evas_object_size_hint_align_set(ph, 0.5, 0.5);
700    elm_table_pack(tb, ph, 1, 1, 1, 1);
701    evas_object_show(ph);
702
703    elm_box_pack_end(bx, tb);
704    evas_object_show(tb);
705
706    evas_object_resize(win, 320, 300);
707    evas_object_show(win);
708 }
709
710 void
711 test_toolbar7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
712 {
713    Evas_Object *win, *bx, *tb, *ph, *menu;
714    Evas_Object *ph1, *ph2, *ph3, *ph4;
715    Elm_Object_Item *tb_it;
716    Elm_Object_Item *menu_it;
717    char buf[PATH_MAX];
718
719    win = elm_win_util_standard_add("toolbar7", "Toolbar 7");
720    elm_win_autodel_set(win, EINA_TRUE);
721
722    bx = elm_box_add(win);
723    elm_win_resize_object_add(win, bx);
724    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
725    evas_object_show(bx);
726
727    tb = elm_toolbar_add(win);
728    elm_object_style_set(tb, "item_horizontal");
729    elm_toolbar_homogeneous_set(tb, 0);
730    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_MENU);
731    evas_object_size_hint_weight_set(tb, 0.0, 0.0);
732    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
733
734    ph1 = elm_photo_add(win);
735    ph2 = elm_photo_add(win);
736    ph3 = elm_photo_add(win);
737    ph4 = elm_photo_add(win);
738
739    tb_it = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
740    elm_object_item_disabled_set(tb_it, EINA_TRUE);
741    elm_toolbar_item_priority_set(tb_it, 100);
742
743    tb_it = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
744    elm_toolbar_item_priority_set(tb_it, -100);
745
746    tb_it = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
747    elm_toolbar_item_priority_set(tb_it, 150);
748
749    tb_it = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
750    elm_toolbar_item_priority_set(tb_it, 0);
751
752    tb_it = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
753    elm_toolbar_item_priority_set(tb_it, -200);
754
755    tb_it = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
756    elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
757    elm_toolbar_item_priority_set(tb_it, -9999);
758    elm_toolbar_menu_parent_set(tb, win);
759    menu = elm_toolbar_item_menu_get(tb_it);
760
761    elm_menu_item_add(menu, NULL, "edit-cut", "Shrink", tb_3, ph4);
762    menu_it = elm_menu_item_add(menu, NULL, "edit-copy", "Mode", tb_4, ph4);
763    elm_menu_item_add(menu, menu_it, "edit-paste", "is set to", tb_4, ph4);
764    elm_menu_item_add(menu, NULL, "edit-delete", "Menu", tb_5, ph4);
765
766    elm_box_pack_end(bx, tb);
767    evas_object_show(tb);
768
769    tb = elm_table_add(win);
770    //elm_table_homogeneous_set(tb, 1);
771    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
772    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
773
774    ph = ph1;
775    elm_photo_size_set(ph, 40);
776    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
777    elm_photo_file_set(ph, buf);
778    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
779    evas_object_size_hint_align_set(ph, 0.5, 0.5);
780    elm_table_pack(tb, ph, 0, 0, 1, 1);
781    evas_object_show(ph);
782
783    ph = ph2;
784    elm_photo_size_set(ph, 80);
785    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
786    evas_object_size_hint_align_set(ph, 0.5, 0.5);
787    elm_table_pack(tb, ph, 1, 0, 1, 1);
788    evas_object_show(ph);
789
790    ph = ph3;
791    elm_photo_size_set(ph, 20);
792    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
793    elm_photo_file_set(ph, buf);
794    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
795    evas_object_size_hint_align_set(ph, 0.5, 0.5);
796    elm_table_pack(tb, ph, 0, 1, 1, 1);
797    evas_object_show(ph);
798
799    ph = ph4;
800    elm_photo_size_set(ph, 60);
801    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
802    elm_photo_file_set(ph, buf);
803    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
804    evas_object_size_hint_align_set(ph, 0.5, 0.5);
805    elm_table_pack(tb, ph, 1, 1, 1, 1);
806    evas_object_show(ph);
807
808    elm_box_pack_end(bx, tb);
809    evas_object_show(tb);
810
811    evas_object_resize(win, 320, 300);
812    evas_object_show(win);
813 }
814
815 void
816 test_toolbar8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
817 {
818    Evas_Object *win, *bx, *tb, *ph, *sl;
819    Evas_Object *ph1, *ph2, *ph3, *ph4;
820    Elm_Object_Item *item;
821    char buf[PATH_MAX];
822
823    win = elm_win_util_standard_add("toolbar8", "Toolbar 8");
824    elm_win_autodel_set(win, EINA_TRUE);
825
826    bx = elm_box_add(win);
827    elm_win_resize_object_add(win, bx);
828    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
829    evas_object_show(bx);
830
831    tb = elm_toolbar_add(win);
832    elm_toolbar_homogeneous_set(tb, EINA_FALSE);
833    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_EXPAND);
834    elm_toolbar_standard_priority_set(tb, 0);
835    evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
836    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
837
838    ph1 = elm_photo_add(win);
839    ph2 = elm_photo_add(win);
840    ph3 = elm_photo_add(win);
841    ph4 = elm_photo_add(win);
842
843    item = elm_toolbar_item_append(tb, "document-print", "Hello", tb_1, ph1);
844    elm_object_item_disabled_set(item, EINA_TRUE);
845    elm_toolbar_item_priority_set(item, -100);
846
847    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
848
849    item = elm_toolbar_item_append(tb, "folder-new", "World", tb_2, ph1);
850    elm_toolbar_item_priority_set(item, 100);
851
852    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
853
854    item = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3, ph4);
855    elm_toolbar_item_priority_set(item, -150);
856
857    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
858
859    sl = elm_slider_add(win);
860    evas_object_size_hint_min_set(sl, 100, 50);
861    item = elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL);
862    elm_object_item_part_content_set(item, "object", sl);
863
864    elm_toolbar_item_priority_set(item, 500);
865
866    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
867
868    item = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
869    elm_toolbar_item_priority_set(item, -200);
870
871    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
872
873    item = elm_toolbar_item_append(tb, "edit-cut", "Shrink", tb_4, ph4);
874    elm_toolbar_item_priority_set(item, -200);
875
876    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
877
878    item = elm_toolbar_item_append(tb, "edit-copy", "Mode", tb_4, ph4);
879    elm_toolbar_item_priority_set(item, -200);
880
881    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
882
883    item = elm_toolbar_item_append(tb, "edit-paste", "is set to", tb_4, ph4);
884    elm_toolbar_item_priority_set(item, -200);
885
886    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
887
888    item = elm_toolbar_item_append(tb, "edit-delete", "Menu", tb_4, ph4);
889    elm_toolbar_item_priority_set(item, 200);
890
891    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
892
893    item = elm_toolbar_item_append(tb, "mail-send", "Comes", tb_4, ph4);
894    elm_toolbar_item_priority_set(item, 200);
895
896    elm_toolbar_item_separator_set(elm_toolbar_item_append(tb, NULL, NULL, NULL, NULL), EINA_TRUE);
897
898    item = elm_toolbar_item_append(tb, "clock", "Elementary", tb_5, ph4);
899    elm_toolbar_item_priority_set(item, -300);
900
901    elm_object_item_text_set(elm_toolbar_more_item_get(tb), "Open");
902
903    evas_object_smart_callback_add(tb, "clicked", toolbar_clicked_cb, NULL);
904
905    elm_box_pack_end(bx, tb);
906    evas_object_show(tb);
907
908    tb = elm_table_add(win);
909    evas_object_size_hint_weight_set(tb, 0.0, EVAS_HINT_EXPAND);
910    evas_object_size_hint_fill_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
911
912    ph = ph1;
913    elm_photo_size_set(ph, 80);
914    snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
915    elm_photo_file_set(ph, buf);
916    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
917    evas_object_size_hint_align_set(ph, 0.5, 0.5);
918    elm_table_pack(tb, ph, 0, 0, 1, 1);
919    evas_object_show(ph);
920
921    ph = ph2;
922    elm_photo_size_set(ph, 160);
923    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
924    evas_object_size_hint_align_set(ph, 0.5, 0.5);
925    elm_table_pack(tb, ph, 1, 0, 1, 1);
926    evas_object_show(ph);
927
928    ph = ph3;
929    elm_photo_size_set(ph, 40);
930    snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
931    elm_photo_file_set(ph, buf);
932    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
933    evas_object_size_hint_align_set(ph, 0.5, 0.5);
934    elm_table_pack(tb, ph, 0, 1, 1, 1);
935    evas_object_show(ph);
936
937    ph = ph4;
938    elm_photo_size_set(ph, 120);
939    snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
940    elm_photo_file_set(ph, buf);
941    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
942    evas_object_size_hint_align_set(ph, 0.5, 0.5);
943    elm_table_pack(tb, ph, 1, 1, 1, 1);
944    evas_object_show(ph);
945
946    elm_box_pack_end(bx, tb);
947    evas_object_show(tb);
948
949    evas_object_resize(win, 420, 250);
950    evas_object_show(win);
951 }
952 #endif