6 #define FNAME widgets_list_1_start
7 #define NAME "Widgets List"
8 #define ICON "widgets.png"
19 static Evas_Object *o_images[NUM];
20 static Evas_Object *o_texts[NUM];
22 static const char *labels[] =
59 static void _setup(void)
63 for (i = 0; i < NUM; i++)
65 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
67 efl_gfx_image_border_insets_set(o, 2, 2, 2, 2);
68 efl_file_simple_load(o, build_path("pan.png"), NULL);
69 efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w, ICON_SIZE));
70 efl_gfx_entity_visible_set(o, EINA_TRUE);
72 o = evas_object_text_add(evas);
74 efl_text_font_family_set(o, "Vera-Bold");
75 efl_text_font_size_set(o, 10);
76 efl_text_set(o, labels[i % 26]);
77 efl_gfx_color_set(o, 0, 0, 0, 255);
78 efl_gfx_entity_visible_set(o, EINA_TRUE);
84 static void _cleanup(void)
87 for (i = 0; i < NUM; i++)
94 /* loop - do things */
95 static void _loop(double t, int f)
98 Evas_Coord x, y, tw, th, cent;
101 for (i = 0; i < NUM; i++)
103 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
104 exp_size_get(o_texts[i], &tw, &th);
105 cent = (ICON_SIZE - th) / 2;
106 efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x + 8, y + cent));
112 /* prepend special key handlers if interactive (before STD) */
113 static void _key(const char *key)
129 /* template stuff - ignore */
134 _ui_menu_item_add(ICON, NAME, FNAME);
146 ui_func_set(_key, _loop);