2 #include <Elementary_Cursor.h>
4 # include "elementary_config.h"
6 #include <Elementary.h>
7 #ifndef ELM_LIB_QUICKLAUNCH
10 unsigned int state; /* What state we are testing */
13 typedef struct _api_data api_data;
18 ITEM_INSERT_BEFORE, /* 1 */
19 ITEM_INSERT_AFTER, /* 2 */
20 ITEM_SEPARATOR_SET, /* 3 */
21 LIST_ITEM_DEL, /* 4 */
22 SCROLLER_POLICY_SET_ON,
23 SCROLLER_POLICY_SET_OFF, /* Back to AUTO next */
24 TOOLTIP_TEXT_SET, /* 7 */
25 TOOLTIP_UNSET, /* 8 */
26 ITEM_CURSOR_SET, /* 9 */
27 ITEM_CURSOR_STYLE_SET,
28 DISABLED_SET, /* 11 */
29 MODE_SET_COMPRESS, /* 12 */
30 MODE_SET_LIMIT, /* 13 */
31 MODE_SET_EXPAND, /* 14 */
32 HORIZONTAL_SET, /* 15 */
37 typedef enum _api_state api_state;
40 set_api_state(api_data *api)
42 /** HOW TO TEST ************************
51 5 POLICY ON, BOUNCE_SET(TRUE, TRUE)
56 9 Curosr set on last item
57 10 Cursor style set last item
63 16 VERT MODE, BOUNCE(TRUE, FALSE) try to bounce on Y-axis
65 *** HOW TO TEST ***********************/
66 Evas_Object *li = api->list;
69 { /* Put all api-changes under switch */
70 case ITEM_PREPEND: /* 0 */
72 const Eina_List *items = elm_list_items_get(li);
73 elm_list_item_prepend(li, "PREPEND", NULL, NULL, NULL, NULL);
75 elm_list_item_bring_in(eina_list_nth(items, 0));
79 case ITEM_INSERT_BEFORE: /* 1 */
81 const Eina_List *items = elm_list_items_get(li);
82 if (eina_list_count(items))
84 elm_list_item_insert_before(li,
85 eina_list_nth(items, eina_list_count(items)-1),
86 "1-before-last", NULL, NULL, NULL, NULL);
88 elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
93 case ITEM_INSERT_AFTER: /* 2 */
95 const Eina_List *items = elm_list_items_get(li);
96 if (eina_list_count(items))
98 elm_list_item_insert_after(li,
99 eina_list_nth(items, eina_list_count(items)-2),
100 "insert-after", NULL, NULL, NULL, NULL);
102 elm_list_item_bring_in(eina_list_data_get(eina_list_last(items)));
107 case ITEM_SEPARATOR_SET: /* 3 */
109 const Eina_List *items = elm_list_items_get(li);
110 if (eina_list_count(items))
112 elm_list_item_separator_set(eina_list_nth(items, eina_list_count(items)-3), EINA_TRUE);
113 elm_list_item_bring_in(eina_list_nth(items, eina_list_count(items)-3));
119 case LIST_ITEM_DEL: /* 4 */
121 const Eina_List *items = elm_list_items_get(li);
122 if (eina_list_count(items))
124 elm_object_item_del(eina_list_data_get(eina_list_last(items)));
129 case SCROLLER_POLICY_SET_ON: /* 5 */
130 elm_list_bounce_set(li, EINA_TRUE, EINA_TRUE);
131 elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
134 case SCROLLER_POLICY_SET_OFF: /* Back to AUTO next (6) */
135 elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
138 case TOOLTIP_TEXT_SET: /* 7 */
140 const Eina_List *items = elm_list_items_get(li);
141 if (eina_list_count(items))
143 elm_object_item_tooltip_text_set(eina_list_data_get(eina_list_last(items)), "Tooltip set from API");
145 elm_list_scroller_policy_set(li, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
149 case TOOLTIP_UNSET: /* 8 */
151 const Eina_List *items = elm_list_items_get(li);
152 if (eina_list_count(items))
154 elm_object_item_tooltip_unset(eina_list_data_get(eina_list_last(items)));
159 case ITEM_CURSOR_SET: /* 9 */
161 const Eina_List *items = elm_list_items_get(li);
162 if (eina_list_count(items))
164 elm_object_item_cursor_set(eina_list_data_get(eina_list_last(items)), ELM_CURSOR_HAND2);
169 case ITEM_CURSOR_STYLE_SET: /* 10 */
171 const Eina_List *items = elm_list_items_get(li);
172 if (eina_list_count(items))
174 elm_object_item_cursor_style_set(eina_list_data_get(eina_list_last(items)), "transparent");
179 case DISABLED_SET: /* 11 */
181 const Eina_List *items = elm_list_items_get(li);
182 if (eina_list_count(items))
184 elm_object_item_disabled_set(eina_list_data_get(eina_list_last(items)), EINA_TRUE);
189 case MODE_SET_COMPRESS: /* 12 */
190 elm_list_mode_set(li, ELM_LIST_COMPRESS);
193 case MODE_SET_LIMIT: /* 13 */
194 elm_list_mode_set(li, ELM_LIST_LIMIT);
197 case MODE_SET_EXPAND: /* 14 */
198 elm_list_mode_set(li, ELM_LIST_EXPAND);
201 case HORIZONTAL_SET: /* 15 */
202 elm_list_mode_set(li, ELM_LIST_SCROLL); /* return to default mode */
203 elm_list_horizontal_set(li, EINA_TRUE);
206 case BOUNCE_SET: /* 16 */
207 elm_list_horizontal_set(li, EINA_FALSE);
208 elm_list_bounce_set(li, EINA_TRUE, EINA_FALSE);
211 case LIST_CLEAR: /* 17 */
224 _api_bt_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__)
225 { /* Will add here a SWITCH command containing code to modify test-object */
226 /* in accordance a->state value. */
230 printf("clicked event on API Button: api_state=<%d>\n", a->state);
233 sprintf(str, "Next API function (%u)", a->state);
234 elm_object_text_set(obj, str);
235 elm_object_disabled_set(obj, a->state == API_STATE_LAST);
239 my_show_it(void *data,
240 Evas_Object *obj __UNUSED__,
241 void *event_info __UNUSED__)
243 elm_list_item_show(data);
247 scroll_top(void *data __UNUSED__,
248 Evas_Object *obj __UNUSED__,
249 void *event_info __UNUSED__)
251 printf("Top edge!\n");
255 scroll_bottom(void *data __UNUSED__,
256 Evas_Object *obj __UNUSED__,
257 void *event_info __UNUSED__)
259 printf("Bottom edge!\n");
263 scroll_left(void *data __UNUSED__,
264 Evas_Object *obj __UNUSED__,
265 void *event_info __UNUSED__)
267 printf("Left edge!\n");
271 scroll_right(void *data __UNUSED__,
272 Evas_Object *obj __UNUSED__,
273 void *event_info __UNUSED__)
275 printf("Right edge!\n");
279 _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
285 test_list(void *data __UNUSED__,
286 Evas_Object *obj __UNUSED__,
287 void *event_info __UNUSED__)
289 Evas_Object *win, *li, *ic, *ic2, *bx, *tb2, *bt, *bxx;
291 Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4, *list_it5;
292 api_data *api = calloc(1, sizeof(api_data));
294 win = elm_win_util_standard_add("list", "List");
295 elm_win_autodel_set(win, EINA_TRUE);
296 evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
298 bxx = elm_box_add(win);
299 elm_win_resize_object_add(win, bxx);
300 evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
301 evas_object_show(bxx);
303 li = elm_list_add(win);
304 elm_list_mode_set(li, ELM_LIST_LIMIT);
305 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
306 evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
309 bt = elm_button_add(win);
310 elm_object_text_set(bt, "Next API function");
311 evas_object_smart_callback_add(bt, "clicked", _api_bt_clicked, (void *) api);
312 elm_box_pack_end(bxx, bt);
313 elm_object_disabled_set(bt, api->state == API_STATE_LAST);
314 evas_object_show(bt);
316 elm_box_pack_end(bxx, li);
318 ic = elm_icon_add(win);
319 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
320 elm_icon_file_set(ic, buf, NULL);
321 elm_icon_resizable_set(ic, 1, 1);
322 list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
323 ic = elm_icon_add(win);
324 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
325 elm_icon_resizable_set(ic, 0, 0);
326 elm_icon_file_set(ic, buf, NULL);
327 elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
328 ic = elm_icon_add(win);
329 elm_icon_standard_set(ic, "edit");
330 elm_icon_resizable_set(ic, 0, 0);
331 elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
333 ic = elm_icon_add(win);
334 elm_icon_standard_set(ic, "delete");
335 elm_icon_resizable_set(ic, 0, 0);
336 ic2 = elm_icon_add(win);
337 elm_icon_standard_set(ic2, "clock");
338 elm_icon_resizable_set(ic2, 0, 0);
339 list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
341 bx = elm_box_add(win);
342 elm_box_horizontal_set(bx, EINA_TRUE);
344 ic = elm_icon_add(win);
345 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
346 elm_icon_file_set(ic, buf, NULL);
347 elm_icon_resizable_set(ic, 0, 0);
348 evas_object_size_hint_align_set(ic, 0.5, 0.5);
349 elm_box_pack_end(bx, ic);
350 evas_object_show(ic);
352 ic = elm_icon_add(win);
353 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
354 elm_icon_file_set(ic, buf, NULL);
355 elm_icon_resizable_set(ic, 0, 0);
356 evas_object_size_hint_align_set(ic, 0.5, 0.0);
357 elm_box_pack_end(bx, ic);
358 evas_object_show(ic);
360 ic = elm_icon_add(win);
361 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
362 elm_icon_file_set(ic, buf, NULL);
363 elm_icon_resizable_set(ic, 0, 0);
364 evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
365 elm_box_pack_end(bx, ic);
366 evas_object_show(ic);
367 elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
369 elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
370 list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
371 elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
372 elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
373 elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
374 elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
375 list_it4 = elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
376 elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
377 elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
378 elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
379 elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
380 elm_list_item_append(li, "Is this label long enough?", NULL, NULL, NULL, NULL);
381 list_it5 = elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
385 evas_object_show(li);
387 tb2 = elm_table_add(win);
388 evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
389 elm_win_resize_object_add(win, tb2);
391 bt = elm_button_add(win);
392 elm_object_text_set(bt, "Hello");
393 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
394 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
395 evas_object_size_hint_align_set(bt, 0.9, 0.5);
396 elm_table_pack(tb2, bt, 0, 0, 1, 1);
397 evas_object_show(bt);
399 bt = elm_button_add(win);
400 elm_object_text_set(bt, "How");
401 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
402 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
403 evas_object_size_hint_align_set(bt, 0.9, 0.5);
404 elm_table_pack(tb2, bt, 0, 1, 1, 1);
405 evas_object_show(bt);
407 bt = elm_button_add(win);
408 elm_object_text_set(bt, "doing");
409 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
410 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
411 evas_object_size_hint_align_set(bt, 0.9, 0.5);
412 elm_table_pack(tb2, bt, 0, 2, 1, 1);
413 evas_object_show(bt);
415 bt = elm_button_add(win);
416 elm_object_text_set(bt, "Here");
417 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
418 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
419 evas_object_size_hint_align_set(bt, 0.9, 0.5);
420 elm_table_pack(tb2, bt, 0, 3, 1, 1);
421 evas_object_show(bt);
423 bt = elm_button_add(win);
424 elm_object_text_set(bt, "Maybe this...");
425 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it5);
426 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
427 evas_object_size_hint_align_set(bt, 0.9, 0.5);
428 elm_table_pack(tb2, bt, 0, 4, 1, 1);
429 evas_object_show(bt);
431 evas_object_show(tb2);
433 evas_object_resize(win, 320, 300);
434 evas_object_show(win);
436 evas_object_smart_callback_add(li, "scroll,edge,top", scroll_top, NULL);
437 evas_object_smart_callback_add(li, "scroll,edge,bottom", scroll_bottom, NULL);
438 evas_object_smart_callback_add(li, "scroll,edge,left", scroll_left, NULL);
439 evas_object_smart_callback_add(li, "scroll,edge,right", scroll_right, NULL);
443 test_list_horizontal(void *data __UNUSED__,
444 Evas_Object *obj __UNUSED__,
445 void *event_info __UNUSED__)
447 Evas_Object *win, *li, *ic, *ic2, *bx, *tb2, *bt;
449 Elm_Object_Item *list_it1, *list_it2, *list_it3, *list_it4;
451 win = elm_win_util_standard_add("list-horizontal", "List Horizontal");
452 elm_win_autodel_set(win, EINA_TRUE);
454 li = elm_list_add(win);
455 elm_list_horizontal_set(li, EINA_TRUE);
456 elm_list_mode_set(li, ELM_LIST_LIMIT);
457 elm_win_resize_object_add(win, li);
458 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
460 ic = elm_icon_add(win);
461 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
462 elm_icon_file_set(ic, buf, NULL);
463 elm_icon_resizable_set(ic, 1, 1);
464 list_it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
465 ic = elm_icon_add(win);
466 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
467 elm_icon_resizable_set(ic, 0, 0);
468 elm_icon_file_set(ic, buf, NULL);
469 elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
470 ic = elm_icon_add(win);
471 elm_icon_standard_set(ic, "edit");
472 elm_icon_resizable_set(ic, 0, 0);
473 elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
475 ic = elm_icon_add(win);
476 elm_icon_standard_set(ic, "delete");
477 elm_icon_resizable_set(ic, 0, 0);
478 ic2 = elm_icon_add(win);
479 elm_icon_standard_set(ic2, "clock");
480 elm_icon_resizable_set(ic2, 0, 0);
481 list_it2 = elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
483 bx = elm_box_add(win);
485 ic = elm_icon_add(win);
486 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
487 elm_icon_file_set(ic, buf, NULL);
488 elm_icon_resizable_set(ic, 0, 0);
489 evas_object_size_hint_align_set(ic, 0.5, 0.5);
490 elm_box_pack_end(bx, ic);
491 evas_object_show(ic);
493 ic = elm_icon_add(win);
494 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
495 elm_icon_file_set(ic, buf, NULL);
496 elm_icon_resizable_set(ic, 0, 0);
497 evas_object_size_hint_align_set(ic, 0.5, 0.0);
498 elm_box_pack_end(bx, ic);
499 evas_object_show(ic);
501 elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
503 elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
504 list_it3 = elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
505 elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
506 elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
507 elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
508 elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
510 list_it4 = elm_list_item_append(li, "And", NULL, NULL, NULL, NULL);
511 elm_list_item_append(li, "here", NULL, NULL, NULL, NULL);
512 elm_list_item_append(li, "we", NULL, NULL, NULL, NULL);
513 elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
514 elm_list_item_append(li, "done", NULL, NULL, NULL, NULL);
515 elm_list_item_append(li, "with", NULL, NULL, NULL, NULL);
516 elm_list_item_append(li, "items.", NULL, NULL, NULL, NULL);
520 evas_object_show(li);
522 tb2 = elm_table_add(win);
523 evas_object_size_hint_weight_set(tb2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
524 elm_win_resize_object_add(win, tb2);
526 bt = elm_button_add(win);
527 elm_object_text_set(bt, "Hello");
528 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it1);
529 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
530 evas_object_size_hint_align_set(bt, 0.5, 0.9);
531 elm_table_pack(tb2, bt, 0, 0, 1, 1);
532 evas_object_show(bt);
534 bt = elm_button_add(win);
535 elm_object_text_set(bt, "How");
536 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it2);
537 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
538 evas_object_size_hint_align_set(bt, 0.5, 0.9);
539 elm_table_pack(tb2, bt, 1, 0, 1, 1);
540 evas_object_show(bt);
542 bt = elm_button_add(win);
543 elm_object_text_set(bt, "doing");
544 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it3);
545 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
546 evas_object_size_hint_align_set(bt, 0.5, 0.9);
547 elm_table_pack(tb2, bt, 2, 0, 1, 1);
548 evas_object_show(bt);
550 bt = elm_button_add(win);
551 elm_object_text_set(bt, "And");
552 evas_object_smart_callback_add(bt, "clicked", my_show_it, list_it4);
553 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
554 evas_object_size_hint_align_set(bt, 0.5, 0.9);
555 elm_table_pack(tb2, bt, 3, 0, 1, 1);
556 evas_object_show(bt);
558 evas_object_show(tb2);
560 evas_object_resize(win, 320, 300);
561 evas_object_show(win);
567 my_li2_clear(void *data,
568 Evas_Object *obj __UNUSED__,
569 void *event_info __UNUSED__)
571 elm_list_clear(data);
575 my_li2_sel(void *data __UNUSED__,
577 void *event_info __UNUSED__)
579 Elm_Object_Item *list_it = elm_list_selected_item_get(obj);
580 elm_list_item_selected_set(list_it, 0);
584 test_list2(void *data __UNUSED__,
585 Evas_Object *obj __UNUSED__,
586 void *event_info __UNUSED__)
588 Evas_Object *win, *bg, *li, *ic, *ic2, *bx, *bx2, *bt;
590 Elm_Object_Item *list_it;
592 win = elm_win_add(NULL, "list2", ELM_WIN_BASIC);
593 elm_win_title_set(win, "List 2");
594 elm_win_autodel_set(win, EINA_TRUE);
596 bg = elm_bg_add(win);
597 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
598 elm_bg_file_set(bg, buf, NULL);
599 elm_win_resize_object_add(win, bg);
600 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
601 evas_object_show(bg);
603 bx = elm_box_add(win);
604 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
605 elm_win_resize_object_add(win, bx);
606 evas_object_show(bx);
608 li = elm_list_add(win);
609 evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
610 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
611 elm_list_mode_set(li, ELM_LIST_LIMIT);
612 // elm_list_multi_select_set(li, 1);
614 ic = elm_icon_add(win);
615 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
616 elm_icon_file_set(ic, buf, NULL);
617 list_it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
618 elm_list_item_selected_set(list_it, EINA_TRUE);
619 ic = elm_icon_add(win);
620 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
621 elm_icon_resizable_set(ic, 0, 0);
622 elm_icon_file_set(ic, buf, NULL);
623 elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
624 ic = elm_icon_add(win);
625 elm_icon_standard_set(ic, "edit");
626 elm_icon_resizable_set(ic, 0, 0);
627 elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
629 ic = elm_icon_add(win);
630 elm_icon_standard_set(ic, "delete");
631 elm_icon_resizable_set(ic, 0, 0);
632 ic2 = elm_icon_add(win);
633 elm_icon_standard_set(ic2, "clock");
634 elm_icon_resizable_set(ic2, 0, 0);
635 elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
637 bx2 = elm_box_add(win);
638 elm_box_horizontal_set(bx2, EINA_TRUE);
640 ic = elm_icon_add(win);
641 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
642 elm_icon_file_set(ic, buf, NULL);
643 elm_icon_resizable_set(ic, 0, 0);
644 evas_object_size_hint_align_set(ic, 0.5, 0.5);
645 elm_box_pack_end(bx2, ic);
646 evas_object_show(ic);
648 ic = elm_icon_add(win);
649 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
650 elm_icon_file_set(ic, buf, NULL);
651 elm_icon_resizable_set(ic, 0, 0);
652 evas_object_size_hint_align_set(ic, 0.5, 0.0);
653 elm_box_pack_end(bx2, ic);
654 evas_object_show(ic);
655 elm_list_item_append(li, "are", bx2, NULL, NULL, NULL);
657 elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
658 elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
659 elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
660 elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
661 elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
662 elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
663 elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
664 elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
665 elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
666 elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
667 elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
668 elm_list_item_append(li, "Longer label.", NULL, NULL, NULL, NULL);
672 elm_box_pack_end(bx, li);
673 evas_object_show(li);
675 bx2 = elm_box_add(win);
676 elm_box_horizontal_set(bx2, EINA_TRUE);
677 elm_box_homogeneous_set(bx2, EINA_TRUE);
678 evas_object_size_hint_weight_set(bx2, EVAS_HINT_EXPAND, 0.0);
679 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
681 bt = elm_button_add(win);
682 elm_object_text_set(bt, "Clear");
683 evas_object_smart_callback_add(bt, "clicked", my_li2_clear, li);
684 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
685 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
686 elm_box_pack_end(bx2, bt);
687 evas_object_show(bt);
689 elm_box_pack_end(bx, bx2);
690 evas_object_show(bx2);
692 evas_object_resize(win, 320, 300);
693 evas_object_show(win);
699 _bt_clicked(void *data __UNUSED__,
700 Evas_Object *obj __UNUSED__,
701 void *event_info __UNUSED__)
703 printf("button was clicked\n");
707 _first_bt_clicked(void *data, Evas_Object *obj __UNUSED__,
708 void *event_info __UNUSED__)
711 Evas_Object *li = (Evas_Object *) data;
714 Elm_Object_Item *lit = elm_list_first_item_get(li);
716 sprintf(str, "%s is selected", elm_object_item_text_get(lit));
717 elm_list_item_bring_in(lit);
718 elm_list_item_selected_set(lit, EINA_TRUE);
720 lb = evas_object_data_get(li, "label");
721 elm_object_text_set(lb, str);
725 _prev_bt_clicked(void *data, Evas_Object *obj __UNUSED__,
726 void *event_info __UNUSED__)
729 Evas_Object *li = (Evas_Object *) data;
732 Elm_Object_Item *lit = elm_list_selected_item_get(li);
734 lit = elm_list_item_prev(lit);
737 sprintf(str, "%s is selected", elm_object_item_text_get(lit));
738 elm_list_item_bring_in(lit);
739 elm_list_item_selected_set(lit, EINA_TRUE);
741 lb = evas_object_data_get(li, "label");
742 elm_object_text_set(lb, str);
746 _next_bt_clicked(void *data, Evas_Object *obj __UNUSED__,
747 void *event_info __UNUSED__)
750 Evas_Object *li = (Evas_Object *) data;
753 Elm_Object_Item *lit = elm_list_selected_item_get(li);
755 lit = elm_list_item_next(lit);
758 sprintf(str, "%s is selected", elm_object_item_text_get(lit));
759 elm_list_item_bring_in(lit);
760 elm_list_item_selected_set(lit, EINA_TRUE);
762 lb = evas_object_data_get(li, "label");
763 elm_object_text_set(lb, str);
767 _last_bt_clicked(void *data, Evas_Object *obj __UNUSED__,
768 void *event_info __UNUSED__)
771 Evas_Object *li = (Evas_Object *) data;
774 Elm_Object_Item *lit = elm_list_last_item_get(li);
776 sprintf(str, "%s is selected", elm_object_item_text_get(lit));
777 elm_list_item_bring_in(lit);
778 elm_list_item_selected_set(lit, EINA_TRUE);
780 lb = evas_object_data_get(li, "label");
781 elm_object_text_set(lb, str);
785 _it_clicked(void *data, Evas_Object *obj __UNUSED__,
786 void *event_info __UNUSED__)
788 printf("item was clicked\n");
790 Evas_Object *li = (Evas_Object *) data;
794 Elm_Object_Item *lit = elm_list_selected_item_get(li);
796 sprintf(str, "%s is selected", elm_object_item_text_get(lit));
798 lb = evas_object_data_get(li, "label");
799 elm_object_text_set(lb, str);
803 test_list3(void *data __UNUSED__,
804 Evas_Object *obj __UNUSED__,
805 void *event_info __UNUSED__)
807 Evas_Object *win, *li, *ic, *ic2, *bx;
810 win = elm_win_util_standard_add("list3", "List 3");
811 elm_win_autodel_set(win, EINA_TRUE);
813 li = elm_list_add(win);
814 elm_win_resize_object_add(win, li);
815 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
816 elm_list_mode_set(li, ELM_LIST_COMPRESS);
818 ic = elm_icon_add(win);
819 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
820 elm_icon_resizable_set(ic, 0, 0);
821 elm_icon_file_set(ic, buf, NULL);
822 ic2 = elm_button_add(win);
823 elm_object_text_set(ic2, "Click me");
824 evas_object_smart_callback_add(ic2, "clicked", _bt_clicked, NULL);
825 evas_object_propagate_events_set(ic2, 0);
826 elm_list_item_append(li, "Hello", ic, ic2, _it_clicked, NULL);
828 ic = elm_icon_add(win);
829 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
830 elm_icon_resizable_set(ic, 0, 0);
831 elm_icon_file_set(ic, buf, NULL);
832 ic2 = elm_button_add(win);
833 elm_object_text_set(ic2, "Click me");
834 evas_object_smart_callback_add(ic2, "clicked", _bt_clicked, NULL);
835 elm_list_item_append(li, "world", ic, ic2, _it_clicked, NULL);
837 ic = elm_icon_add(win);
838 elm_icon_standard_set(ic, "edit");
839 elm_icon_resizable_set(ic, 0, 0);
840 elm_list_item_append(li, ".", ic, NULL, NULL, NULL);
842 ic = elm_icon_add(win);
843 elm_icon_standard_set(ic, "delete");
844 elm_icon_resizable_set(ic, 0, 0);
845 ic2 = elm_icon_add(win);
846 elm_icon_standard_set(ic2, "clock");
847 elm_icon_resizable_set(ic2, 0, 0);
848 elm_list_item_append(li, "How", ic, ic2, NULL, NULL);
850 bx = elm_box_add(win);
851 elm_box_horizontal_set(bx, EINA_TRUE);
853 ic = elm_icon_add(win);
854 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
855 elm_icon_file_set(ic, buf, NULL);
856 elm_icon_resizable_set(ic, 0, 0);
857 evas_object_size_hint_align_set(ic, 0.5, 0.5);
858 elm_box_pack_end(bx, ic);
859 evas_object_show(ic);
861 ic = elm_icon_add(win);
862 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
863 elm_icon_file_set(ic, buf, NULL);
864 elm_icon_resizable_set(ic, 0, 0);
865 evas_object_size_hint_align_set(ic, 0.5, 0.0);
866 elm_box_pack_end(bx, ic);
867 evas_object_show(ic);
869 ic = elm_icon_add(win);
870 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
871 elm_icon_file_set(ic, buf, NULL);
872 elm_icon_resizable_set(ic, 0, 0);
873 evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
874 elm_box_pack_end(bx, ic);
875 evas_object_show(ic);
877 elm_list_item_append(li, "are", bx, NULL, NULL, NULL);
878 elm_list_item_append(li, "you", NULL, NULL, NULL, NULL);
879 elm_list_item_append(li, "doing", NULL, NULL, NULL, NULL);
880 elm_list_item_append(li, "out", NULL, NULL, NULL, NULL);
881 elm_list_item_append(li, "there", NULL, NULL, NULL, NULL);
882 elm_list_item_append(li, "today", NULL, NULL, NULL, NULL);
883 elm_list_item_append(li, "?", NULL, NULL, NULL, NULL);
884 elm_list_item_append(li, "Here", NULL, NULL, NULL, NULL);
885 elm_list_item_append(li, "are", NULL, NULL, NULL, NULL);
886 elm_list_item_append(li, "some", NULL, NULL, NULL, NULL);
887 elm_list_item_append(li, "more", NULL, NULL, NULL, NULL);
888 elm_list_item_append(li, "items", NULL, NULL, NULL, NULL);
889 elm_list_item_append(li, "Is this label long enough?", NULL, NULL, NULL, NULL);
890 elm_list_item_append(li, "Maybe this one is even longer so we can test long long items.", NULL, NULL, NULL, NULL);
894 evas_object_show(li);
896 evas_object_resize(win, 320, 300);
897 evas_object_show(win);
900 ///////////////////////////////////////////////////////////////////////////////////////
904 Evas_Object *naviframe, *win;
908 test_list4_back_cb(void *data,
909 Evas_Object *obj __UNUSED__,
910 void *event_info __UNUSED__)
912 struct Pginfo *info = data;
915 elm_naviframe_item_pop(info->naviframe);
919 test_list4_swipe(void *data,
920 Evas_Object *obj __UNUSED__,
923 Evas_Object *box, *entry, *button;
924 struct Pginfo *info = data;
926 if ((!event_info) || (!data)) return;
928 item_data = elm_object_item_data_get(event_info);
930 box = elm_box_add(info->win);
931 elm_box_horizontal_set(box, EINA_FALSE);
932 elm_box_homogeneous_set(box, EINA_FALSE);
933 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
934 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
935 evas_object_show(box);
937 entry = elm_entry_add(info->win);
938 elm_entry_scrollable_set(entry, EINA_TRUE);
939 elm_entry_editable_set(entry, EINA_FALSE);
940 elm_object_text_set(entry, item_data);
941 evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
942 evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
943 evas_object_show(entry);
945 button = elm_button_add(info->win);
946 elm_object_text_set(button, "back");
947 evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0);
948 evas_object_size_hint_align_set(button, EVAS_HINT_FILL, 0);
949 evas_object_smart_callback_add(button, "clicked", test_list4_back_cb, info);
950 evas_object_show(button);
952 elm_box_pack_start(box, entry);
953 elm_box_pack_end(box, button);
955 elm_naviframe_item_simple_push(info->naviframe, box);
959 test_list4(void *data __UNUSED__,
960 Evas_Object *obj __UNUSED__,
961 void *event_info __UNUSED__)
963 Evas_Object *win, *li, *ic, *ic2, *naviframe;
964 static struct Pginfo info = {NULL, NULL};
967 win = elm_win_util_standard_add("list4", "List 4");
968 elm_win_autodel_set(win, EINA_TRUE);
971 naviframe = elm_naviframe_add(win);
972 elm_win_resize_object_add(win, naviframe);
973 evas_object_size_hint_weight_set(naviframe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
974 evas_object_size_hint_align_set(naviframe, EVAS_HINT_FILL, EVAS_HINT_FILL);
975 evas_object_show(naviframe);
976 info.naviframe = naviframe;
978 li = elm_list_add(win);
979 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
980 elm_list_mode_set(li, ELM_LIST_COMPRESS);
981 evas_object_smart_callback_add(li, "swipe", test_list4_swipe, &info);
982 elm_naviframe_item_simple_push(naviframe, li);
984 static char pf_data[] = "Pink Floyd were formed in 1965, and originally consisted of university" \
985 "students Roger Waters, Nick Mason, Richard Wright, and Syd Barrett. The group were a popular" \
986 "fixture on London's underground music scene, and under Barrett's leadership released two " \
987 "charting singles, \"Arnold Layne\" and \"See Emily Play\", and a successful debut album, " \
988 "ThePiper at the Gates of Dawn. In 1968, guitarist and singer David Gilmour joined the " \
989 "line-up. Barrett was soon removed, due to his increasingly erratic behaviour. Following " \
990 "Barrett's departure, bass player and singer Roger Waters became the band's lyricist and " \
991 "conceptual leader, with Gilmour assuming lead guitar and much of the vocals. With this " \
992 "line-up, Floyd went on to achieve worldwide critical and commercial success with the " \
993 "conceptalbums The Dark Side of the Moon, Wish You Were Here, Animals, and The Wall.";
994 ic = elm_icon_add(win);
995 snprintf(buf, sizeof(buf), "%s/images/mystrale.jpg", elm_app_data_dir_get());
996 elm_icon_resizable_set(ic, 0, 0);
997 elm_icon_file_set(ic, buf, NULL);
998 elm_list_item_append(li, "Pink Floyd", ic, NULL, NULL, &pf_data);
1000 static char ds_data[] = "Dire Straits were a British rock band, formed by Mark Knopfler " \
1001 "(lead vocals and lead guitar), his younger brother David Knopfler (rhythm guitar and " \
1002 "backing vocals), John Illsley (bass guitar and backing vocals), and Pick Withers (drums " \
1003 "and percussion), and managed by Ed Bicknell, active between 1977 and 1995. Although the " \
1004 "band was formed in an era when punk rock was at the forefront, Dire Straits played a more "
1005 "bluesy style, albeit with a stripped-down sound that appealed to audiences weary of the " \
1006 "overproduced stadium rock of the 1970s.[citation needed] In their early days, Mark and " \
1007 "David requested that pub owners turn down their sound so that patrons could converse " \
1008 "while the band played, an indication of their unassuming demeanor. Despite this oddly " \
1009 "self-effacing approach to rock and roll, Dire Straits soon became hugely successful, with " \
1010 "their first album going multi-platinum globally.";
1011 ic = elm_icon_add(win);
1012 snprintf(buf, sizeof(buf), "%s/images/mystrale_2.jpg", elm_app_data_dir_get());
1013 elm_icon_resizable_set(ic, 0, 0);
1014 elm_icon_file_set(ic, buf, NULL);
1015 elm_list_item_append(li, "Dire Straits", ic, NULL, NULL, &ds_data);
1017 static char uh_data[] = "Uriah Heep are an English hard rock band. The band released several " \
1018 "commercially successful albums in the 1970s such as Uriah Heep Live (1973), but their " \
1019 "audience declined by the 1980s, to the point where they became essentially a cult band in " \
1020 "the United States and United Kingdom. Uriah Heep maintain a significant following in " \
1021 "Germany, the Netherlands, Scandinavia, the Balkans, Japan and Russia, where they still " \
1022 "perform at stadium-sized venues.";
1023 ic = elm_icon_add(win);
1024 snprintf(buf, sizeof(buf), "%s/images/icon_17.png", elm_app_data_dir_get());
1025 elm_icon_resizable_set(ic, 1, 1);
1026 elm_icon_file_set(ic, buf, NULL);
1027 elm_list_item_append(li, "Uriah Heep", ic, NULL, NULL, &uh_data);
1029 static char r_data[] = "Rush is a Canadian rock band formed in August 1968, in the Willowdale " \
1030 "neighbourhood of Toronto, Ontario. The band is composed of bassist, keyboardist, and lead " \
1031 "vocalist Geddy Lee, guitarist Alex Lifeson, and drummer and lyricist Neil Peart. The band " \
1032 "and its membership went through a number of re-configurations between 1968 and 1974, " \
1033 "achieving their current form when Peart replaced original drummer John Rutsey in July 1974, " \
1034 "two weeks before the group's first United States tour.";
1035 ic = elm_icon_add(win);
1036 snprintf(buf, sizeof(buf), "%s/images/icon_21.png", elm_app_data_dir_get());
1037 elm_icon_resizable_set(ic, 0, 0);
1038 elm_icon_file_set(ic, buf, NULL);
1039 ic2 = elm_icon_add(win);
1040 elm_icon_standard_set(ic2, "clock");
1041 elm_icon_resizable_set(ic2, 0, 0);
1042 elm_list_item_append(li, "Rush", ic, ic2, NULL, &r_data);
1046 evas_object_show(li);
1047 evas_object_resize(win, 320, 300);
1048 evas_object_show(win);
1051 /////////////////////////////////////////////////////////////////////////////////////////
1052 struct list5_data_cb
1054 Evas_Object *win, *list;
1058 test_list5_item_del(void *data,
1059 Evas_Object *obj __UNUSED__,
1060 void *event_info __UNUSED__)
1062 elm_object_item_del(data);
1066 test_list5_swipe(void *data __UNUSED__,
1067 Evas_Object *obj __UNUSED__,
1070 Evas_Object *button;
1071 struct list5_data_cb *info = elm_object_item_data_get(event_info);
1073 if (elm_object_item_part_content_get(event_info, "end")) return;
1075 button = elm_button_add(info->win);
1076 elm_object_text_set(button, "delete");
1077 evas_object_propagate_events_set(button, 0);
1078 evas_object_smart_callback_add(button, "clicked", test_list5_item_del,
1080 elm_object_item_part_content_set(event_info, "end", button);
1084 test_list5(void *data __UNUSED__,
1085 Evas_Object *obj __UNUSED__,
1086 void *event_info __UNUSED__)
1088 Evas_Object *win, *li;
1089 static struct list5_data_cb info;
1091 win = elm_win_util_standard_add("list5", "List 5");
1092 elm_win_autodel_set(win, EINA_TRUE);
1095 li = elm_list_add(win);
1096 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1097 elm_list_mode_set(li, ELM_LIST_COMPRESS);
1098 evas_object_smart_callback_add(li, "swipe", test_list5_swipe, NULL);
1099 elm_win_resize_object_add(win, li);
1100 evas_object_show(li);
1103 elm_list_item_append(li, "Network", NULL, NULL, NULL, &info);
1104 elm_list_item_append(li, "Audio", NULL, NULL, NULL, &info);
1107 evas_object_resize(win, 320, 300);
1108 evas_object_show(win);
1112 test_list6(void *data __UNUSED__,
1113 Evas_Object *obj __UNUSED__,
1114 void *event_info __UNUSED__)
1116 Evas_Object *win, *gd, *bt, *li, *lb;
1117 win = elm_win_util_standard_add("list6", "List 6");
1118 elm_win_autodel_set(win, EINA_TRUE);
1120 gd = elm_grid_add(win);
1121 elm_grid_size_set(gd, 100, 100);
1122 elm_win_resize_object_add(win, gd);
1123 evas_object_size_hint_weight_set(gd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1125 li = elm_list_add(win);
1126 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
1127 elm_list_mode_set(li, ELM_LIST_COMPRESS);
1128 elm_grid_pack(gd, li, 4, 4, 92, 72);
1129 evas_object_show(li);
1131 elm_list_item_append(li, "Eina", NULL, NULL, _it_clicked, li);
1132 elm_list_item_append(li, "Eet", NULL, NULL, _it_clicked, li);
1133 elm_list_item_append(li, "Evas", NULL, NULL, _it_clicked, li);
1134 elm_list_item_append(li, "Ecore", NULL, NULL, _it_clicked, li);
1135 elm_list_item_append(li, "Embryo", NULL, NULL, _it_clicked, li);
1136 elm_list_item_append(li, "Edje", NULL, NULL, _it_clicked, li);
1137 elm_list_item_append(li, "Efreet", NULL, NULL, _it_clicked, li);
1138 elm_list_item_append(li, "E_dbus", NULL, NULL, _it_clicked, li);
1139 elm_list_item_append(li, "Eeze", NULL, NULL, _it_clicked, li);
1140 elm_list_item_append(li, "Expedite", NULL, NULL, _it_clicked, li);
1141 elm_list_item_append(li, "Emotion", NULL, NULL, _it_clicked, li);
1142 elm_list_item_append(li, "Ethumb", NULL, NULL, _it_clicked, li);
1143 elm_list_item_append(li, "Elementary", NULL, NULL, _it_clicked, li);
1146 bt = elm_button_add(win);
1147 elm_object_text_set(bt, "First");
1148 evas_object_smart_callback_add(bt, "clicked", _first_bt_clicked, li);
1149 elm_grid_pack(gd, bt, 4, 80, 20, 10);
1150 evas_object_show(bt);
1152 bt = elm_button_add(win);
1153 elm_object_text_set(bt, "Prev");
1154 evas_object_smart_callback_add(bt, "clicked", _prev_bt_clicked, li);
1155 elm_grid_pack(gd, bt, 28, 80, 20, 10);
1156 evas_object_show(bt);
1158 bt = elm_button_add(win);
1159 elm_object_text_set(bt, "Next");
1160 evas_object_smart_callback_add(bt, "clicked", _next_bt_clicked, li);
1161 elm_grid_pack(gd, bt, 52, 80, 20, 10);
1162 evas_object_show(bt);
1164 bt = elm_button_add(win);
1165 elm_object_text_set(bt, "Last");
1166 evas_object_smart_callback_add(bt, "clicked", _last_bt_clicked, li);
1167 elm_grid_pack(gd, bt, 76, 80, 20, 10);
1168 evas_object_show(bt);
1170 lb = elm_label_add(win);
1171 elm_object_text_set(lb, "Nothing is selected");
1172 elm_grid_pack(gd, lb, 4, 90, 92, 10);
1173 evas_object_show(lb);
1175 evas_object_data_set(li, "label", lb);
1177 evas_object_show(gd);
1178 evas_object_resize(win, 480, 480);
1179 evas_object_show(win);