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);
19 test_icon_animated(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
21 Evas_Object *win, *ic;
24 win = elm_win_add(NULL, "icon-animated-gif", ELM_WIN_BASIC);
25 elm_win_title_set(win, "Icon Animated Gif");
26 elm_win_autodel_set(win, EINA_TRUE);
27 elm_win_alpha_set(win, 1);
29 ic = elm_icon_add(win);
30 snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", elm_app_data_dir_get());
31 elm_icon_file_set(ic, buf, NULL);
32 if (elm_icon_animated_available_get(ic))
34 printf("============Support animator==============\n");
35 elm_icon_animated_set(ic, EINA_TRUE);
36 elm_icon_animated_play_set(ic, EINA_TRUE);
38 elm_icon_scale_set(ic, 0, 0);
39 elm_icon_no_scale_set(ic, 1);
40 evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
41 evas_object_size_hint_fill_set(ic, 0.5, 0.5);
42 elm_win_resize_object_add(win, ic);
45 evas_object_smart_callback_add(ic, "clicked", icon_clicked, ic);
47 evas_object_show(win);