1 #include <Elementary.h>
3 # include "elementary_config.h"
5 #ifndef ELM_LIB_QUICKLAUNCH
7 icon_clicked(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
12 rec = elm_icon_animated_play_get(ic);
14 printf("clicked!rec =%d\n",rec);
15 elm_icon_animated_play_set(ic, rec);
20 test_icon_animated(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
22 Evas_Object *win, *ic;
25 win = elm_win_add(NULL, "icon-animated-gif", ELM_WIN_BASIC);
26 elm_win_title_set(win, "Icon Animated Gif");
27 elm_win_autodel_set(win, 1);
28 elm_win_alpha_set(win, 1);
30 ic = elm_icon_add(win);
31 snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", PACKAGE_DATA_DIR);
32 elm_icon_file_set(ic, buf, NULL);
33 if (elm_icon_animated_available_get(ic))
35 printf("============Support animator==============\n");
37 elm_icon_animated_set(ic, TRUE);
38 elm_icon_animated_play_set(ic, TRUE);
39 elm_icon_scale_set(ic, 0, 0);
40 elm_icon_no_scale_set(ic, 1);
41 evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
42 evas_object_size_hint_fill_set(ic, 0.5, 0.5);
43 elm_win_resize_object_add(win, ic);
46 evas_object_smart_callback_add(ic, "clicked", icon_clicked, ic);
48 evas_object_show(win);