6 #define FNAME textblock_basic_start
7 #define NAME "Textblock Basic"
8 #define ICON "text.png"
18 static Evas_Object *o_text;
21 static void _setup(void)
24 Evas_Textblock_Style *st;
26 o = evas_object_textblock_add(evas);
28 st = evas_textblock_style_new();
29 evas_textblock_style_set
31 "DEFAULT='font=Vera,Kochi font_size=8 align=left color=#000000 wrap=word'"
32 "center='+ font=Vera,Kochi font_size=10 align=center'"
34 "right='+ font=Vera,Kochi font_size=10 align=right'"
36 "blockquote='+ left_margin=+24 right_margin=+24 font=Vera,Kochi font_size=10 align=left'"
38 "red='+ color=#ff0000'"
39 "p='+ font=Vera,Kochi font_size=10 align=left'"
42 evas_object_textblock_style_set(o, st);
43 evas_object_textblock_clear(o);
44 evas_object_textblock_text_markup_set(o, "<center><h1>Title</h1></center><br/>"
45 "<p><tab>A pragraph here <red>red text</red> and stuff.</p>"
46 "<p>And escaping <, and >, as well as &, as <h1>normal.</h1></p>"
47 "<p>If you want a newline use <, br>, <br/>woo a new line!</p>"
49 "<style=outline color=#fff outline_color=#000>aligned</> "
50 "<style=shadow shadow_color=#fff8>text</> "
51 "<style=soft_shadow shadow_color=#0002>should</> "
52 "<style=glow color=#fff glow2_color=#fe87 glow_color=#f214 >go here</> "
53 "<style=far_shadow shadow_color=#0005>as it is</> "
54 "<style=outline_shadow color=#fff outline_color=#8228 shadow_color=#005>within</> "
55 "<style=outline_soft_shadow color=#fff outline_color=#8228 shadow_color=#0002>right tags</> "
56 "<style=far_soft_shadow color=#fff shadow_color=#0002>to make it align to the</> "
57 "<underline=on underline_color=#00f>right hand</> "
58 "<backing=on backing_color=#fff8>side </><backing_color=#ff08>of</><backing_color=#0f08> </>"
59 "<strikethrough=on strikethrough_color=#f0f8>the textblock</>.</right>"
61 "<underline=double underline_color=#f00 underline2_color=#00f>now we need</> "
62 "to test some <color=#f00 font_size=8>C</><color=#0f0 font_size=10>O</>"
63 "<color=#00f font_size=12>L</><color=#fff font_size=14>O</>"
64 "<color=#ff0 font_size=16>R</><color=#0ff font_size=18> Bla Rai</>"
65 "<color=#f0f font_size=20> Stuff</>.</p>"
66 "<backing=on backing_color=#f00 linesize=20>20 Linesize<br/>"
67 "<backing=on backing_color=#0f0 linesize=40>40 Linesize<br/>"
68 "<backing=on backing_color=#f00 linerelsize=100%>100 percent Linerelsize<br/>"
69 "<backing=on backing_color=#0f0 linerelsize=150%>150 percent Linerelsize<br/>"
70 "<backing=on backing_color=#00f linerelsize=200%>200 percent Linerelsize<br/>"
71 "<backing=off linerelsize=0%>"
74 "<style=outline color=#fff outline_color=#000>Round about the cauldron go, </> "
75 "In the poison'd entrails throw. "
76 "<style=shadow shadow_color=#fff8>Toad, that under cold stone</> "
77 "Days and nights has thirty-one "
78 "<style=soft_shadow shadow_color=#0002>Swelter'd venom sleeping got, </> "
79 "<style=glow color=#fff glow2_color=#fe87 glow_color=#f214 >Boil thou first i' the charmed pot.</> "
80 "Double, double toil and trouble, "
81 "Fire burn, and cauldron bubble. "
82 "<style=far_shadow shadow_color=#0005>Fillet of a fenny snake, </> "
83 "In the cauldron boil and bake, "
84 "<style=outline_shadow color=#fff outline_color=#8228 shadow_color=#005>Eye of newt and toe of frog, </> "
85 "<underline=on underline_color=#00f>Wool of bat and tongue of dog, </> "
86 "<backing=on backing_color=#ff08>Adder's fork and blind-worm's sting, </> "
87 "<underline=double underline_color=#f00 underline2_color=#00f>Lizard's leg and owlet's wing, </> "
88 "<color=#808 font_size=20>For a charm of powerful trouble, "
89 "Like a hell-broth boil and bubble. "
90 "Double, double toil and trouble, </> "
91 "Fire burn and cauldron bubble. "
92 "Scale of dragon, tooth of wolf, "
93 "Witches' mummy, maw and gulf "
94 "Of the ravin'd salt-sea shark, "
95 "Root of hemlock digg'd i' the dark, "
96 "Liver of blaspheming Jew, "
97 "Gall of goat, and slips of yew "
98 "Silver'd in the moon's eclipse, "
99 "Nose of Turk and Tartar's lips, "
100 "Finger of birth-strangled babe "
101 "Ditch-deliver'd by a drab, "
102 "Make the gruel thick and slab: "
103 "Add thereto a tiger's chaudron, "
104 "For the ingredients of our cauldron. "
105 "Double, double toil and trouble, "
106 "Fire burn and cauldron bubble. "
107 "Cool it with a baboon's blood, "
108 "Then the charm is firm and good. "
109 "Heizölrückstoßabdämpfung fløde pingüino kilómetros cœur déçu l'âme "
110 "plutôt naïve Louÿs rêva crapaüter Íosa Úrmhac Óighe pór Éava Ádhaim"
112 efl_gfx_entity_visible_set(o, EINA_TRUE);
114 evas_textblock_style_free(st);
120 static void _cleanup(void)
125 /* loop - do things */
126 static void _loop(double t, int f)
128 Evas_Coord x, y, w, h, w0, h0;
133 w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2);
134 h = 50 + ((1.0 + sin((double)(f + (i * 19)) / (52.6 * SLOW) )) * h0 * 2);
135 x = (win_w / 2) - (w / 2);
136 x += sin((double)(f + (i * 13)) / (86.7 * SLOW)) * (w0 / 2);
137 y = (win_h / 2) - (h / 2);
138 y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2);
139 efl_gfx_entity_position_set(o_text, EINA_POSITION2D(x, y));
140 efl_gfx_entity_size_set(o_text, EINA_SIZE2D(w, 5000));
146 /* prepend special key handlers if interactive (before STD) */
147 static void _key(const char *key)
163 /* template stuff - ignore */
168 _ui_menu_item_add(ICON, NAME, FNAME);
179 ui_func_set(_key, _loop, _setup);