restore insanely big tooltip test to its true glory
[framework/uifw/elementary.git] / src / bin / test_tooltip.c
1 #include <Elementary.h>
2 #ifdef HAVE_CONFIG_H
3 # include "elementary_config.h"
4 #endif
5 #ifndef ELM_LIB_QUICKLAUNCH
6
7 typedef struct _Testitem
8 {
9    Elm_Object_Item  *item;
10    const char       *path;
11    int               mode;
12    int               onoff;
13 } Testitem;
14
15 static Elm_Gengrid_Item_Class gic;
16
17 char *
18 grdt_lbl_get(void            *data,
19              Evas_Object *obj __UNUSED__,
20              const char *part __UNUSED__)
21 {
22    const Testitem *ti = data;
23    char buf[256];
24    snprintf(buf, sizeof(buf), "Photo %s", ti->path);
25    return strdup(buf);
26 }
27
28 Evas_Object *
29 grdt_content_get(void        *data,
30               Evas_Object *obj,
31               const char  *part)
32 {
33    const Testitem *ti = data;
34    if (!strcmp(part, "elm.swallow.icon"))
35      {
36         Evas_Object *icon = elm_bg_add(obj);
37         elm_bg_file_set(icon, ti->path, NULL);
38         evas_object_size_hint_aspect_set(icon,
39                                          EVAS_ASPECT_CONTROL_VERTICAL,
40                                          1, 1);
41         evas_object_show(icon);
42         return icon;
43      }
44    return NULL;
45 }
46
47 static Elm_Genlist_Item_Class itct;
48
49 static void
50 gltt_exp(void *data       __UNUSED__,
51          Evas_Object *obj __UNUSED__,
52          void            *event_info)
53 {
54    Elm_Object_Item *glit = event_info;
55    Evas_Object *gl = elm_object_item_widget_get(glit);
56    int val = (int)(long) elm_object_item_data_get(glit);
57    Elm_Object_Item *glit1, *glit2, *glit3;
58
59    val *= 10;
60    glit1 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 1), glit,
61                                    ELM_GENLIST_ITEM_NONE, NULL, NULL);
62    glit2 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 2), glit,
63                                    ELM_GENLIST_ITEM_NONE, NULL, NULL);
64    glit3 = elm_genlist_item_append(gl, &itct, (void *)(long) (val + 3), glit,
65                                    ELM_GENLIST_ITEM_TREE, NULL, NULL);
66
67    elm_genlist_item_tooltip_text_set(glit1, "Testing A");
68    elm_genlist_item_tooltip_text_set(glit2, "Testing B");
69    elm_genlist_item_tooltip_text_set(glit3, "Testing C");
70 }
71
72 static void
73 gltt_con(void *data       __UNUSED__,
74          Evas_Object *obj __UNUSED__,
75          void            *event_info)
76 {
77    Elm_Object_Item *glit = event_info;
78    elm_genlist_item_subitems_clear(glit);
79 }
80
81 static void
82 gltt_exp_req(void *data       __UNUSED__,
83              Evas_Object *obj __UNUSED__,
84              void            *event_info)
85 {
86    Elm_Object_Item *glit = event_info;
87    elm_genlist_item_expanded_set(glit, EINA_TRUE);
88 }
89
90 static void
91 gltt_con_req(void *data       __UNUSED__,
92              Evas_Object *obj __UNUSED__,
93              void            *event_info)
94 {
95    Elm_Object_Item *glit = event_info;
96    elm_genlist_item_expanded_set(glit, EINA_FALSE);
97 }
98
99 char *
100 gltt_text_get(void            *data,
101                Evas_Object *obj __UNUSED__,
102                const char *part __UNUSED__)
103 {
104    char buf[256];
105    snprintf(buf, sizeof(buf), "Item mode %i", (int)(long)data);
106    return strdup(buf);
107 }
108
109 static Evas_Object *
110 _tt_item_icon(void *data   __UNUSED__,
111               Evas_Object *obj __UNUSED__,
112               Evas_Object *tt,
113               void *item   __UNUSED__)
114 {
115    Evas_Object *ic = elm_icon_add(tt);
116    char buf[PATH_MAX];
117    snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
118             elm_app_data_dir_get());
119    elm_icon_file_set(ic, buf, NULL);
120    elm_icon_resizable_set(ic, 0, 0);
121    evas_object_resize(ic, 64, 64);
122    return ic;
123 }
124
125 static Evas_Object *
126 _tt_item_icon2(void *data   __UNUSED__,
127               Evas_Object *obj __UNUSED__,
128               Evas_Object *tt,
129               void *item   __UNUSED__)
130 {
131    Evas_Object *ic = elm_icon_add(tt);
132    char buf[PATH_MAX];
133    snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
134    elm_icon_file_set(ic, buf, NULL);
135    elm_icon_resizable_set(ic, 0, 0);
136    return ic;
137 }
138
139 static Evas_Object *
140 _tt_item_icon3(void *data   __UNUSED__,
141               Evas_Object *obj __UNUSED__,
142               Evas_Object *tt,
143               void *item   __UNUSED__)
144 {
145    int w, h, sw, sh;
146    Evas_Object *ic = elm_icon_add(tt);
147
148    char buf[PATH_MAX];
149    snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get());
150    elm_icon_file_set(ic, buf, NULL);
151    elm_icon_size_get(ic, &w, &h);
152    elm_icon_resizable_set(ic, 0, 0);
153    elm_win_screen_size_get(tt, NULL, NULL, &sw, &sh);
154    if ((w > sw) || (h > sh))
155      {
156         float sc = 0;
157         if ((float)w / (float)sw >= 0.8)
158           sc = ((float)sw * 0.8) / (float)w;
159         else if ((float)h / (float)sh >= 0.8)
160           sc = ((float)sh * 0.8) / (float)h;
161         if (sc) elm_object_scale_set(ic, sc);
162      }
163    return ic;
164 }
165
166 static Evas_Object *
167 _tt_item_label(void *data   __UNUSED__,
168               Evas_Object *obj __UNUSED__,
169               Evas_Object *tt,
170               void *item   __UNUSED__)
171 {
172    Evas_Object *l = elm_label_add(tt);
173    elm_object_text_set(l, "Something useful here?<ps/>"
174                           "No probably not, but this is a super long label<ps/>"
175                           "which probably breaks on your system, now doesn't it?<ps/>"
176                           "Yeah, I thought so.");
177    elm_label_line_wrap_set(l, ELM_WRAP_MIXED);
178    return l;
179 }
180
181 static void
182 _tt_item_icon_del(void            *data,
183                   Evas_Object *obj __UNUSED__,
184                   void            *event_info)
185 {
186    // test to check for del_cb behavior!
187    printf("_tt_icon_del: data=%ld (== 456?), event_info=%p\n",
188           (long)data, event_info);
189 }
190
191 static void
192 _tt_text_replace(void *data       __UNUSED__,
193                  Evas_Object     *obj,
194                  void *event_info __UNUSED__)
195 {
196    static int count = 0;
197    char buf[64];
198    snprintf(buf, sizeof(buf), "count=%d", count);
199    count++;
200    elm_object_tooltip_text_set(obj, buf);
201 }
202
203 static void
204 _tt_timer_del(void *data       __UNUSED__,
205               Evas *e          __UNUSED__,
206               Evas_Object     *obj,
207               void *event_info __UNUSED__)
208 {
209    Ecore_Timer *timer = evas_object_data_del(obj, "test-timer");
210    if (!timer) return;
211    ecore_timer_del(timer);
212 }
213
214 static Eina_Bool
215 _tt_text_replace_timer_cb(void *data)
216 {
217    _tt_text_replace(NULL, data, NULL);
218    return EINA_TRUE;
219 }
220
221 static void
222 _tt_text_replace_timed(void *data       __UNUSED__,
223                        Evas_Object     *obj,
224                        void *event_info __UNUSED__)
225 {
226    Ecore_Timer *timer = evas_object_data_get(obj, "test-timer");
227    if (timer)
228      {
229         ecore_timer_del(timer);
230         evas_object_data_del(obj, "test-timer");
231         elm_object_text_set(obj, "Simple text tooltip, click to start"
232                                   " changed timed");
233         return;
234      }
235
236    timer = ecore_timer_add(1.5, _tt_text_replace_timer_cb, obj);
237    evas_object_data_set(obj, "test-timer", timer);
238    elm_object_text_set(obj, "Simple text tooltip, click to stop changed"
239                              " timed");
240 }
241
242 static Evas_Object *
243 _tt_icon(void *data   __UNUSED__,
244          Evas_Object *obj __UNUSED__,
245          Evas_Object *tt)
246 {
247    Evas_Object *ic = elm_icon_add(tt);
248    char buf[PATH_MAX];
249    snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
250             elm_app_data_dir_get());
251    elm_icon_file_set(ic, buf, NULL);
252    elm_icon_resizable_set(ic, 0, 0);
253    evas_object_resize(ic, 64, 64);
254    return ic;
255 }
256
257 static Evas_Object *
258 _tt_icon2(void *data   __UNUSED__,
259           Evas_Object *obj __UNUSED__,
260           Evas_Object *tt)
261 {
262    Evas_Object *ic = elm_icon_add(tt);
263    char buf[PATH_MAX];
264    snprintf(buf, sizeof(buf), "%s/images/icon_00.png", elm_app_data_dir_get());
265    elm_icon_file_set(ic, buf, NULL);
266    elm_icon_resizable_set(ic, 0, 0);
267    evas_object_resize(ic, 64, 64);
268    return ic;
269 }
270
271 static void
272 _tt_icon_del(void            *data,
273              Evas_Object *obj __UNUSED__,
274              void            *event_info)
275 {
276    // test to check for del_cb behavior!
277    printf("_tt_icon_del: data=%ld (== 123?), event_info=%p\n",
278           (long)data, event_info);
279 }
280
281 static Eina_Bool
282 _tt_icon_replace_timer_cb(void *data)
283 {
284    static int current = 0;
285
286    elm_object_tooltip_content_cb_set
287      (data, current ? _tt_icon2 : _tt_icon, NULL, NULL);
288
289    current = !current;
290    return EINA_TRUE;
291 }
292
293 static void
294 _tt_icon_replace_timed(void *data       __UNUSED__,
295                        Evas_Object     *obj,
296                        void *event_info __UNUSED__)
297 {
298    Ecore_Timer *timer = evas_object_data_get(obj, "test-timer");
299    if (timer)
300      {
301         ecore_timer_del(timer);
302         evas_object_data_del(obj, "test-timer");
303         elm_object_text_set(obj, "Icon tooltip, click to start changed"
304                                   " timed");
305         return;
306      }
307
308    timer = ecore_timer_add(1.5, _tt_icon_replace_timer_cb, obj);
309    evas_object_data_set(obj, "test-timer", timer);
310    elm_object_text_set(obj, "Icon tooltip, click to stop changed timed");
311 }
312
313 static Eina_Bool
314 _tt_style_replace_timer_cb(void *data)
315 {
316    static int current = 0;
317    elm_object_tooltip_style_set(data, current ? NULL : "transparent");
318    current = !current;
319    return EINA_TRUE;
320 }
321
322 static void
323 _tt_style_replace_timed(void *data       __UNUSED__,
324                         Evas_Object     *obj,
325                         void *event_info __UNUSED__)
326 {
327    Ecore_Timer *timer = evas_object_data_get(obj, "test-timer");
328    if (timer)
329      {
330         ecore_timer_del(timer);
331         evas_object_data_del(obj, "test-timer");
332         elm_object_text_set(obj, "Icon tooltip style, click to start"
333                                   " changed timed");
334         return;
335      }
336
337    timer = ecore_timer_add(1.5, _tt_style_replace_timer_cb, obj);
338    evas_object_data_set(obj, "test-timer", timer);
339    elm_object_text_set(obj, "Icon tooltip style, click to stop changed"
340                              " timed");
341 }
342
343 static void
344 _tt_visible_lock_toggle(void *data       __UNUSED__,
345                         Evas_Object     *obj,
346                         void *event_info __UNUSED__)
347 {
348    static int locked = 0;
349
350    locked = !locked;
351    if (locked)
352      {
353         elm_object_text_set(obj, "Locked tooltip visibility");
354         elm_object_tooltip_text_set(obj, "This tooltip is locked"
355                                          " visible,<br/> click the button"
356                                          " to unlock!");
357         elm_object_tooltip_show(obj);
358      }
359    else
360      {
361         elm_object_text_set(obj, "Unlocked tooltip visibility");
362         elm_object_tooltip_text_set(obj, "This tooltip is unlocked"
363                                          " visible,<br/> click the button"
364                                          " to lock!");
365         elm_object_tooltip_hide(obj);
366      }
367 }
368
369 void
370 test_tooltip(void *data       __UNUSED__,
371              Evas_Object *obj __UNUSED__,
372              void *event_info __UNUSED__)
373 {
374    Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
375    Elm_Object_Item *tb_it;
376    Elm_Object_Item *lit;
377
378    win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
379    elm_win_title_set(win, "Tooltip");
380    elm_win_autodel_set(win, EINA_TRUE);
381
382    bg = elm_bg_add(win);
383    elm_win_resize_object_add(win, bg);
384    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
385                                     EVAS_HINT_EXPAND);
386    evas_object_show(bg);
387
388    bx = elm_box_add(win);
389    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
390                                     EVAS_HINT_EXPAND);
391    elm_win_resize_object_add(win, bx);
392    evas_object_show(bx);
393
394    tb = elm_toolbar_add(win);
395    elm_toolbar_homogeneous_set(tb, 0);
396    evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0);
397    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, 0.0);
398    elm_box_pack_end(bx, tb);
399    evas_object_show(tb);
400
401    tb_it = elm_toolbar_item_append(tb, NULL, "Open", NULL, NULL);
402    elm_object_item_tooltip_text_set(tb_it, "Opens a file");
403
404    tb_it = elm_toolbar_item_append(tb, NULL, "Icon", NULL, NULL);
405    elm_object_item_tooltip_content_cb_set
406      (tb_it, _tt_item_icon, (void *)456L, _tt_item_icon_del);
407    elm_object_item_tooltip_style_set(tb_it, "transparent");
408
409    bt = elm_button_add(win);
410    elm_object_text_set(bt, "Simple text tooltip");
411    elm_object_tooltip_text_set(bt, "Simple text tooltip");
412    elm_box_pack_end(bx, bt);
413    evas_object_show(bt);
414
415    bt = elm_button_add(win);
416    elm_object_text_set(bt, "Simple text tooltip, click to change");
417    elm_object_tooltip_text_set(bt, "Initial");
418    evas_object_smart_callback_add(bt, "clicked", _tt_text_replace, NULL);
419    elm_box_pack_end(bx, bt);
420    evas_object_show(bt);
421
422    bt = elm_button_add(win);
423    elm_object_text_set(bt, "Simple text tooltip, click to start"
424                             " changed timed");
425    elm_object_tooltip_text_set(bt, "Initial");
426    evas_object_smart_callback_add(bt, "clicked", _tt_text_replace_timed,
427                                   NULL);
428    elm_box_pack_end(bx, bt);
429    evas_object_show(bt);
430    evas_object_event_callback_add(bt, EVAS_CALLBACK_DEL, _tt_timer_del,
431                                   NULL);
432
433    bt = elm_button_add(win);
434    elm_object_text_set(bt, "Icon tooltip");
435    elm_object_tooltip_content_cb_set(bt, _tt_icon, (void *)123L,
436                                      _tt_icon_del);
437    elm_box_pack_end(bx, bt);
438    evas_object_show(bt);
439
440    bt = elm_button_add(win);
441    elm_object_text_set(bt, "Icon tooltip, click to start changed timed");
442    elm_object_tooltip_content_cb_set(bt, _tt_icon, NULL, NULL);
443    evas_object_smart_callback_add(bt, "clicked", _tt_icon_replace_timed,
444                                   NULL);
445    elm_box_pack_end(bx, bt);
446    evas_object_show(bt);
447    evas_object_event_callback_add(bt, EVAS_CALLBACK_DEL, _tt_timer_del,
448                                   NULL);
449
450    bt = elm_button_add(win);
451    elm_object_text_set(bt, "Transparent Icon tooltip");
452    elm_object_tooltip_content_cb_set(bt, _tt_icon, NULL, NULL);
453    elm_object_tooltip_style_set(bt, "transparent");
454    elm_box_pack_end(bx, bt);
455    evas_object_show(bt);
456
457    bt = elm_button_add(win);
458    elm_object_text_set(bt, "Icon tooltip style, click to start changed"
459                             " timed");
460    elm_object_tooltip_content_cb_set(bt, _tt_icon, NULL, NULL);
461    evas_object_smart_callback_add(bt, "clicked", _tt_style_replace_timed,
462                                   NULL);
463    elm_box_pack_end(bx, bt);
464    evas_object_show(bt);
465    evas_object_event_callback_add(bt, EVAS_CALLBACK_DEL, _tt_timer_del,
466                                   NULL);
467
468    bt = elm_button_add(win);
469    elm_object_text_set(bt, "Unlocked tooltip visibility");
470    elm_object_tooltip_text_set(bt, "This tooltip is unlocked visible,<br/>"
471                                    " click the button to lock!");
472    evas_object_smart_callback_add(bt, "clicked", _tt_visible_lock_toggle,
473                                   NULL);
474    elm_box_pack_end(bx, bt);
475    evas_object_show(bt);
476
477    se = elm_entry_add(win);
478    elm_entry_scrollable_set(se, EINA_TRUE);
479    evas_object_size_hint_weight_set(se, EVAS_HINT_EXPAND, 0.0);
480    evas_object_size_hint_align_set(se, EVAS_HINT_FILL, 0.5);
481    elm_entry_scrollbar_policy_set(se, ELM_SCROLLER_POLICY_OFF,
482                                            ELM_SCROLLER_POLICY_OFF);
483    elm_object_text_set(se, "Hello, some entry here!");
484    elm_object_tooltip_text_set(se, "Type something here!");
485    elm_entry_single_line_set(se, EINA_TRUE);
486    elm_box_pack_end(bx, se);
487    evas_object_show(se);
488
489    lst = elm_list_add(win);
490    lit = elm_list_item_append(lst, "Hello", NULL, NULL, NULL, NULL);
491    elm_object_item_tooltip_content_cb_set(lit, _tt_item_label, NULL, NULL);
492    elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
493    lit = elm_list_item_append(lst, "Icon Tooltip", NULL, NULL, NULL, NULL);
494    elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon, NULL, NULL);
495    lit = elm_list_item_append(lst, "Big Icon Tooltip", NULL, NULL, NULL, NULL);
496    elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon2, NULL, NULL);
497    elm_object_item_tooltip_style_set(lit, "transparent");
498    elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
499    lit = elm_list_item_append(lst, "Insanely Big Icon Tooltip", NULL, NULL, NULL, NULL);
500    elm_object_item_tooltip_content_cb_set(lit, _tt_item_icon3, NULL, NULL);
501    elm_object_item_tooltip_style_set(lit, "transparent");
502    elm_object_item_tooltip_window_mode_set(lit, EINA_TRUE);
503    evas_object_size_hint_weight_set(lst, EVAS_HINT_EXPAND,
504                                     EVAS_HINT_EXPAND);
505    evas_object_size_hint_align_set(lst, EVAS_HINT_FILL, EVAS_HINT_FILL);
506    evas_object_size_hint_min_set(lst, 100, 100);
507    elm_list_go(lst);
508    elm_box_pack_end(bx, lst);
509    evas_object_show(lst);
510
511    evas_object_resize(win, 320, 580);
512    evas_object_show(win);
513 }
514
515 void
516 test_tooltip2(void *data       __UNUSED__,
517               Evas_Object *obj __UNUSED__,
518               void *event_info __UNUSED__)
519 {
520    Evas_Object *win, *bg, *bx, *grid, *gl;
521    Elm_Object_Item *glit1, *glit2, *glit3;
522    static Testitem ti[144];
523    int i, n;
524    char buf[PATH_MAX];
525    const char *img[9] =
526    {
527       "panel_01.jpg",
528       "plant_01.jpg",
529       "rock_01.jpg",
530       "rock_02.jpg",
531       "sky_01.jpg",
532       "sky_02.jpg",
533       "sky_03.jpg",
534       "sky_04.jpg",
535       "wood_01.jpg",
536    };
537
538    win = elm_win_add(NULL, "tooltip2", ELM_WIN_BASIC);
539    elm_win_title_set(win, "Tooltip 2");
540    elm_win_autodel_set(win, EINA_TRUE);
541
542    bg = elm_bg_add(win);
543    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
544                                     EVAS_HINT_EXPAND);
545    elm_win_resize_object_add(win, bg);
546    evas_object_show(bg);
547
548    bx = elm_box_add(win);
549    evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
550                                     EVAS_HINT_EXPAND);
551    elm_win_resize_object_add(win, bx);
552    evas_object_show(bx);
553
554    grid = elm_gengrid_add(win);
555    elm_gengrid_item_size_set(grid, 100, 100);
556    elm_gengrid_horizontal_set(grid, EINA_FALSE);
557    elm_gengrid_multi_select_set(grid, EINA_TRUE);
558    evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
559    evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND,
560                                     EVAS_HINT_EXPAND);
561
562    gic.item_style = "default";
563    gic.func.text_get = grdt_lbl_get;
564    gic.func.content_get = grdt_content_get;
565
566    n = 0;
567    for (i = 0; i < 9; i++)
568      {
569         snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(),
570                  img[n]);
571         n++;
572         ti[i].mode = i;
573         ti[i].path = eina_stringshare_add(buf);
574         ti[i].item = elm_gengrid_item_append(grid, &gic, &(ti[i]), NULL,
575                                              NULL);
576         if (n % 2)
577           elm_gengrid_item_tooltip_text_set(ti[i].item, "Testing X");
578         else
579           elm_gengrid_item_tooltip_text_set(ti[i].item, "Testing Y");
580         if (!(i % 5))
581           elm_gengrid_item_selected_set(ti[i].item, EINA_TRUE);
582      }
583
584    elm_box_pack_end(bx, grid);
585    evas_object_show(grid);
586
587    gl = elm_genlist_add(win);
588    evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
589    evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND,
590                                     EVAS_HINT_EXPAND);
591
592    itct.item_style = "default";
593    itct.func.text_get = gltt_text_get;
594
595    glit1 = elm_genlist_item_append(gl, &itct, (void *)1, NULL,
596                                    ELM_GENLIST_ITEM_TREE, NULL, NULL);
597    glit2 = elm_genlist_item_append(gl, &itct, (void *)2, NULL,
598                                    ELM_GENLIST_ITEM_TREE, NULL, NULL);
599    glit3 = elm_genlist_item_append(gl, &itct, (void *)3, NULL,
600                                    ELM_GENLIST_ITEM_NONE, NULL, NULL);
601
602    elm_genlist_item_tooltip_text_set(glit1, "Testing 1");
603    elm_genlist_item_tooltip_text_set(glit2, "Testing 2");
604    elm_genlist_item_tooltip_text_set(glit3, "Testing 3");
605
606    evas_object_smart_callback_add(gl, "expand,request", gltt_exp_req, gl);
607    evas_object_smart_callback_add(gl, "contract,request", gltt_con_req,
608                                   gl);
609    evas_object_smart_callback_add(gl, "expanded", gltt_exp, gl);
610    evas_object_smart_callback_add(gl, "contracted", gltt_con, gl);
611
612    elm_box_pack_end(bx, gl);
613    evas_object_show(gl);
614
615    evas_object_resize(win, 320, 480);
616    evas_object_show(win);
617 }
618
619 #endif