6 #define FNAME widgets_file_icons_start
7 #define NAME "Widgets File Icons"
8 #define ICON "widgets.png"
19 static Evas_Object *o_images[NUM];
20 static Evas_Object *o_texts[NUM];
22 static const char *icons[] =
43 static void _setup(void)
47 for (i = 0; i < NUM; i++)
49 o = evas_object_image_add(evas);
51 evas_object_image_file_set(o, build_path(icons[i % 13]), NULL);
52 evas_object_image_fill_set(o, 0, 0, ICON_SIZE, ICON_SIZE);
53 evas_object_resize(o, ICON_SIZE, ICON_SIZE);
56 o = evas_object_text_add(evas);
58 evas_object_text_font_set(o, "Vera-Bold", 10);
59 evas_object_text_text_set(o, icons[i % 13]);
60 evas_object_text_style_set(o, EVAS_TEXT_STYLE_FAR_SOFT_SHADOW);
61 evas_object_color_set(o, 255, 255, 255, 255);
62 evas_object_text_shadow_color_set(o, 0, 0, 0, 24);
69 static void _cleanup(void)
72 for (i = 0; i < NUM; i++) evas_object_del(o_images[i]);
73 for (i = 0; i < NUM; i++) evas_object_del(o_texts[i]);
76 /* loop - do things */
77 static void _loop(double t, int f)
80 Evas_Coord x, y, tw, th, cent;
83 for (i = 0; i < NUM; i++)
85 evas_object_move(o_images[i], x + 8, y);
86 evas_object_geometry_get(o_texts[i], NULL, NULL, &tw, &th);
87 cent = (ICON_SIZE + 16 - tw) / 2;
88 evas_object_move(o_texts[i], x + cent, y + ICON_SIZE + 4);
99 /* prepend special key handlers if interactive (before STD) */
100 static void _key(char *key)
116 /* template stuff - ignore */
121 _ui_menu_item_add(ICON, NAME, FNAME);
132 ui_func_set(_key, _loop);