#undef FNAME #undef NAME #undef ICON /* metadata */ #define FNAME textblock_basic_start #define NAME "Textblock Basic" #define ICON "text.png" #ifndef PROTO # ifndef UI # include "main.h" /* standard var */ static int done = 0; /* private data */ static Evas_Object *o_text; /* setup */ static void _setup(void) { Evas_Object *o; Evas_Textblock_Style *st; o = evas_object_textblock_add(evas); o_text = o; st = evas_textblock_style_new(); evas_textblock_style_set (st, "DEFAULT='font=Vera,Kochi font_size=8 align=left color=#000000 wrap=word'" "center='+ font=Vera,Kochi font_size=10 align=center'" "/center='- \n'" "right='+ font=Vera,Kochi font_size=10 align=right'" "/right='- \n'" "blockquote='+ left_margin=+24 right_margin=+24 font=Vera,Kochi font_size=10 align=left'" "h1='+ font_size=20'" "red='+ color=#ff0000'" "p='+ font=Vera,Kochi font_size=10 align=left'" "/p='- \n'" ); evas_object_textblock_style_set(o, st); evas_object_textblock_clear(o); evas_object_textblock_text_markup_set(o, "

Title


" "

A pragraph here red text and stuff.

" "

And escaping <, and >, as well as &, as

normal.

" "

If you want a newline use <, br>,
woo a new line!

" "Right " "aligned " "text " "should " "go here " "as it is " "within " "right tags " "to make it align to the " "right hand " "side of " "the textblock." "

And " "now we need " "to test some CO" "LO" "R Bla Rai" " Stuff.

" "20 Linesize
" "40 Linesize
" "100 percent Linerelsize
" "150 percent Linerelsize
" "200 percent Linerelsize
" "" "
" "(日本語 カタカナ ひらがな) " "Round about the cauldron go, " "In the poison'd entrails throw. " "Toad, that under cold stone " "Days and nights has thirty-one " "Swelter'd venom sleeping got, " "Boil thou first i' the charmed pot. " "Double, double toil and trouble, " "Fire burn, and cauldron bubble. " "Fillet of a fenny snake, " "In the cauldron boil and bake, " "Eye of newt and toe of frog, " "Wool of bat and tongue of dog, " "Adder's fork and blind-worm's sting, " "Lizard's leg and owlet's wing, " "For a charm of powerful trouble, " "Like a hell-broth boil and bubble. " "Double, double toil and trouble, " "Fire burn and cauldron bubble. " "Scale of dragon, tooth of wolf, " "Witches' mummy, maw and gulf " "Of the ravin'd salt-sea shark, " "Root of hemlock digg'd i' the dark, " "Liver of blaspheming Jew, " "Gall of goat, and slips of yew " "Silver'd in the moon's eclipse, " "Nose of Turk and Tartar's lips, " "Finger of birth-strangled babe " "Ditch-deliver'd by a drab, " "Make the gruel thick and slab: " "Add thereto a tiger's chaudron, " "For the ingredients of our cauldron. " "Double, double toil and trouble, " "Fire burn and cauldron bubble. " "Cool it with a baboon's blood, " "Then the charm is firm and good. " "Heizölrückstoßabdämpfung fløde pingüino kilómetros cœur déçu l'âme " "plutôt naïve Louÿs rêva crapaüter Íosa Úrmhac Óighe pór Éava Ádhaim" "
"); efl_gfx_entity_visible_set(o, EINA_TRUE); evas_textblock_style_free(st); done = 0; } /* cleanup */ static void _cleanup(void) { efl_del(o_text); } /* loop - do things */ static void _loop(double t, int f) { Evas_Coord x, y, w, h, w0, h0; int i = 0; w0 = 160; h0 = 120; w = 150 + ((1.0 + cos((double)(f + (i * 10)) / (37.4 * SLOW) )) * w0 * 2); h = 50 + ((1.0 + sin((double)(f + (i * 19)) / (52.6 * SLOW) )) * h0 * 2); x = (win_w / 2) - (w / 2); x += sin((double)(f + (i * 13)) / (86.7 * SLOW)) * (w0 / 2); y = (win_h / 2) - (h / 2); y += cos((double)(f + (i * 28)) / (93.8 * SLOW)) * (h0 / 2); efl_gfx_entity_position_set(o_text, EINA_POSITION2D(x, y)); efl_gfx_entity_size_set(o_text, EINA_SIZE2D(w, 5000)); FPS_STD(NAME); } /* prepend special key handlers if interactive (before STD) */ static void _key(const char *key) { KEY_STD; } /* template stuff - ignore */ # endif #endif #ifdef UI _ui_menu_item_add(ICON, NAME, FNAME); #endif #ifdef PROTO void FNAME(void); #endif #ifndef PROTO # ifndef UI void FNAME(void) { ui_func_set(_key, _loop); _setup(); } # endif #endif #undef FNAME #undef NAME #undef ICON