containing ui setup steps in the profiling again.
[platform/upstream/expedite.git] / src / bin / widgets_file_icons_2_grouped.c
index 8691b0c..096a072 100755 (executable)
@@ -46,28 +46,34 @@ static void _setup(void)
    Evas_Object *o;
    for (i = 0; i < NUM; i++)
      {
-        o = eo_add(EVAS_IMAGE_CLASS, evas);
+        o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
         o_images[i] = o;
-        eo_do(o, efl_file_set(build_path(icons[i % 13]), NULL),
-                 efl_gfx_fill_set(0, 0, ICON_SIZE, ICON_SIZE),
-                 efl_gfx_size_set(ICON_SIZE, ICON_SIZE),
-                 efl_gfx_visible_set(EINA_TRUE));
+        efl_file_simple_load(o, build_path(icons[i % 13]), NULL);
+        efl_gfx_fill_set(o, EINA_RECT(0, 0, ICON_SIZE, ICON_SIZE));
+        efl_gfx_entity_size_set(o, EINA_SIZE2D(ICON_SIZE, ICON_SIZE));
+        efl_gfx_entity_visible_set(o, EINA_TRUE);
 
-        o = eo_add(EVAS_TEXT_CLASS, evas);
+        o = evas_object_text_add(evas);
         o_texts[i] = o;
-        eo_do(o, efl_text_properties_font_set("Vera-Bold", 10),
-              efl_text_set(icons[i % 13]),
-              efl_gfx_color_set(0, 0, 0, 255),
-              efl_gfx_visible_set(EINA_TRUE));
+#if 0
+        efl_text_font_family_set(o, "Vera-Bold");
+        efl_text_font_size_set(o, 10);
+        efl_text_set(o, icons[i % 13]);
+#else
+        evas_object_text_font_set(o, "Vera-Bold", 10);
+        evas_object_text_text_set(o, icons[i % 13]);
+#endif
+        efl_gfx_color_set(o, 0, 0, 0, 255);
+        efl_gfx_entity_visible_set(o, EINA_TRUE);
      }
    for (i = 0; i < NUM; i++)
      {
-       eo_do(o_images[i], efl_gfx_stack_raise());
+       efl_gfx_stack_raise_to_top(o_images[i]);
      }
    for (i = 0; i < NUM; i++)
      {
         if (i > 13)
-          eo_do(o_images[i], efl_gfx_stack_above(o_images[i - 13]));
+          efl_gfx_stack_above(o_images[i], o_images[i - 13]);
      }
    done = 0;
 }
@@ -78,8 +84,8 @@ static void _cleanup(void)
    int i;
    for (i = 0; i < NUM; i++)
      {
-        eo_del(o_images[i]);
-        eo_del(o_texts[i]);
+        efl_del(o_images[i]);
+        efl_del(o_texts[i]);
      }
 }
 
@@ -92,10 +98,10 @@ static void _loop(double t, int f)
    y = 0 - f;
    for (i = 0; i < NUM; i++)
      {
-        eo_do(o_images[i], efl_gfx_position_set(x + 8, y));
-        eo_do(o_texts[i], efl_gfx_size_get(&tw, &th));
+        efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x + 8, y));
+        exp_size_get(o_texts[i], &tw, &th);
         cent = (ICON_SIZE + 16 - tw) / 2;
-        eo_do(o_texts[i], efl_gfx_position_set(x + cent, y + ICON_SIZE + 4));
+        efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x + cent, y + ICON_SIZE + 4));
         x += ICON_SIZE + 16;
         if (x > win_w)
           {
@@ -107,7 +113,7 @@ static void _loop(double t, int f)
 }
 
 /* prepend special key handlers if interactive (before STD) */
-static void _key(char *key)
+static void _key(const char *key)
 {
    KEY_STD;
 }
@@ -139,8 +145,7 @@ void FNAME(void);
 # ifndef UI
 void FNAME(void)
 {
-   ui_func_set(_key, _loop);
-   _setup();
+   ui_func_set(_key, _loop, _setup);
 }
 # endif
 #endif