containing ui setup steps in the profiling again.
[platform/upstream/expedite.git] / src / bin / textblock_intl.c
old mode 100644 (file)
new mode 100755 (executable)
index a0309cf..8317357
@@ -31,12 +31,8 @@ static void _setup(void)
       "DEFAULT='font=Sans font_size=10 align=left color=#000000 wrap=word'"
       );
    evas_object_textblock_style_set(o, st);
-   evas_textblock_style_free(st);
    evas_object_textblock_clear(o);
-
-   evas_object_textblock_text_markup_set
-     (o,
-      "This is a test of International test rendering in Evas<br/>"
+   evas_object_textblock_text_markup_set(o, "This is a test of International test rendering in Evas<br/>"
       "<br/>"
       "Danish: 'Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen'<br/>"
       "German: 'Heizölrückstoßabdämpfung'<br/>"
@@ -65,7 +61,7 @@ static void _setup(void)
       "Greek: 'Γιούνικοντ'<br/>"
 
       /* also test the html entity stuff a bit */
-      "Greek continued: '&tau;&upsilon;&lambda;&theta;'<br/>"
+      "Greek continued: '&tau, &upsilon, &lambda, &theta, '<br/>"
 
       "Gujarati: 'યૂનિકોડ'<br/>"
       "Gurmukhi: 'ਯੂਨਿਕੋਡ'<br/>"
@@ -83,10 +79,10 @@ static void _setup(void)
       "Telugu: 'యూనికోడ్'<br/>"
       "Thai: 'ยูนืโคด'<br/>"
       "Tibetan: 'ཨུ་ནི་ཀོཌྲ།'<br/>"
-      "Yiddish: 'יוניקאָד'<br/>"
-      );
+      "Yiddish: 'יוניקאָד'<br/>");
+   efl_gfx_entity_visible_set(o, EINA_TRUE);
 
-   evas_object_show(o);
+   evas_textblock_style_free(st);
 
    done = 0;
 }
@@ -94,14 +90,14 @@ static void _setup(void)
 /* cleanup */
 static void _cleanup(void)
 {
-   evas_object_del(o_text);
+   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;
+   static int i = 0;
 
    evas_object_textblock_size_native_get(o_text, &w0, &h0);
    w = w0;
@@ -110,14 +106,15 @@ static void _loop(double t, int f)
    x += sin((double)(f + (i * 13)) / (31.1 * SLOW)) * (w0 / (2 * 2));
    y = (win_h / 2) - (h / 2);
    y += cos((double)(f + (i * 28)) / (19.6 * SLOW)) * (h0 / (2 * 2));
-   evas_object_move(o_text, x, y);
-   evas_object_resize(o_text, w, h);
+   efl_gfx_entity_position_set(o_text, EINA_POSITION2D(x, y));
+   efl_gfx_entity_size_set(o_text, EINA_SIZE2D(w, h));
+   ++i;
 
    FPS_STD(NAME);
 }
 
 /* prepend special key handlers if interactive (before STD) */
-static void _key(char *key)
+static void _key(const char *key)
 {
    KEY_STD;
 }
@@ -149,8 +146,7 @@ void FNAME(void);
 # ifndef UI
 void FNAME(void)
 {
-   ui_func_set(_key, _loop);
-   _setup();
+   ui_func_set(_key, _loop, _setup);
 }
 # endif
 #endif