6 #define FNAME widgets_file_icons_4_start
7 #define NAME "Widgets File Icons 4"
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 = eo_add(EVAS_IMAGE_CLASS, evas);
51 eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL),
52 efl_gfx_fill_set(0, 0, ICON_SIZE, ICON_SIZE),
53 efl_gfx_size_set(ICON_SIZE, ICON_SIZE),
54 efl_gfx_visible_set(EINA_TRUE));
56 o = eo_add(EVAS_TEXT_CLASS, evas);
58 eo_do(o, efl_text_properties_font_set("Vera-Bold", 10),
59 efl_text_set(icons[i % 13]),
60 efl_gfx_color_set(0, 0, 0, 255),
61 efl_gfx_visible_set(EINA_TRUE));
67 static void _cleanup(void)
70 for (i = 0; i < NUM; i++)
77 /* loop - do things */
78 static void _loop(double t, int f)
81 Evas_Coord x, y, tw, th, cent;
84 for (i = 0; i < NUM; i++)
86 eo_do(o_images[i], efl_gfx_position_set(x + 8, y));
87 eo_do(o_texts[i], efl_gfx_size_get(&tw, &th));
88 cent = (ICON_SIZE + 16 - tw) / 2;
89 eo_do(o_texts[i], efl_gfx_position_set(x + cent, y + ICON_SIZE + 4));
100 /* prepend special key handlers if interactive (before STD) */
101 static void _key(char *key)
117 /* template stuff - ignore */
122 _ui_menu_item_add(ICON, NAME, FNAME);
133 ui_func_set(_key, _loop);