6 #define FNAME text_basic_start
7 #define NAME "Text Basic"
8 #define ICON "text.png"
18 static Evas_Object *o_texts[OBNUM];
21 static void _setup(void)
26 for (i = 0; i < OBNUM; i++)
28 o = evas_object_text_add(evas);
31 efl_text_font_family_set(o, "Vera-Bold");
32 efl_text_font_size_set(o, 20);
33 efl_text_set(o, "This is a test string");
35 evas_object_text_font_set(o, "Vera-Bold", 20);
36 evas_object_text_text_set(o, "This is a test string");
38 efl_gfx_color_set(o, 0, 0, 0, 255);
39 efl_gfx_entity_visible_set(o, EINA_TRUE);
45 static void _cleanup(void)
48 for (i = 0; i < OBNUM; i++) efl_del(o_texts[i]);
51 /* loop - do things */
52 static void _loop(double t, int f)
55 Evas_Coord x, y, w, h;
56 for (i = 0; i < OBNUM; i++)
58 exp_size_get(o_texts[i], &w, &h);
59 x = (win_w / 2) - (w / 2);
60 x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
61 y = (win_h / 2) - (h / 2);
62 y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
63 efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x, y));
68 /* prepend special key handlers if interactive (before STD) */
69 static void _key(const char *key)
85 /* template stuff - ignore */
90 _ui_menu_item_add(ICON, NAME, FNAME);
101 ui_func_set(_key, _loop, _setup);