containing ui setup steps in the profiling again.
[platform/upstream/expedite.git] / src / bin / textblock_intl.c
index edb658e..8317357 100755 (executable)
@@ -23,18 +23,16 @@ static void _setup(void)
    Evas_Object *o;
    Evas_Textblock_Style *st;
 
-   o = eo_add(EVAS_TEXTBLOCK_CLASS, evas);
+   o = evas_object_textblock_add(evas);
    o_text = o;
    st = evas_textblock_style_new();
    evas_textblock_style_set
      (st,
       "DEFAULT='font=Sans font_size=10 align=left color=#000000 wrap=word'"
       );
-   eo_do(o,
-         evas_obj_textblock_style_set(st),
-         evas_obj_textblock_clear(),
-         evas_obj_textblock_text_markup_set(
-      "This is a test of International test rendering in Evas<br/>"
+   evas_object_textblock_style_set(o, st);
+   evas_object_textblock_clear(o);
+   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/>"
@@ -63,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/>"
@@ -81,9 +79,8 @@ static void _setup(void)
       "Telugu: 'యూనికోడ్'<br/>"
       "Thai: 'ยูนืโคด'<br/>"
       "Tibetan: 'ཨུ་ནི་ཀོཌྲ།'<br/>"
-      "Yiddish: 'יוניקאָד'<br/>"
-      ),
-         efl_gfx_visible_set(EINA_TRUE));
+      "Yiddish: 'יוניקאָד'<br/>");
+   efl_gfx_entity_visible_set(o, EINA_TRUE);
 
    evas_textblock_style_free(st);
 
@@ -93,31 +90,31 @@ static void _setup(void)
 /* cleanup */
 static void _cleanup(void)
 {
-   eo_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;
 
-   eo_do(o_text, evas_obj_textblock_size_native_get(&w0, &h0));
+   evas_object_textblock_size_native_get(o_text, &w0, &h0);
    w = w0;
    h = h0;
    x = (win_w / 2) - (w / 2);
    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));
-   eo_do(o_text,
-         efl_gfx_position_set(x, y),
-         efl_gfx_size_set(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