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