jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=beb6fa61c7a3939eb3df50c31e20079801b00219

commit beb6fa61c7a3939eb3df50c31e20079801b00219
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Thu Apr 7 19:08:41 2016 +0830

    Elm_image: remove elm_image_sizing_eval from eo to legacy.
    
    elm_image_object_get api will be deprecated, so moved sizing eval func to 
legacy
---
 src/lib/elementary/elm_icon.c         |  2 +-
 src/lib/elementary/elm_image.c        | 28 +++++++++++++++++++---------
 src/lib/elementary/elm_image.eo       |  6 ------
 src/lib/elementary/elm_image_legacy.h |  7 +++++++
 4 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index 1432d78..466ab9d 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -480,7 +480,7 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
    if (ret)
      {
         eina_stringshare_replace(&sd->stdicon, name);
-        elm_obj_image_sizing_eval(obj);
+        elm_image_sizing_eval(obj);
         return EINA_TRUE;
      }
 
diff --git a/src/lib/elementary/elm_image.c b/src/lib/elementary/elm_image.c
index a1c5a85..b3d300b 100644
--- a/src/lib/elementary/elm_image.c
+++ b/src/lib/elementary/elm_image.c
@@ -35,6 +35,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
 
 static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
 static Eina_Bool _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data 
*sd, const char *file, const Eina_File *f, const char *key);
+static void _elm_image_sizing_eval(Eo *obj);
 
 static const Elm_Action key_actions[] = {
    {"activate", _key_action_activate},
@@ -604,7 +605,7 @@ _elm_image_evas_object_smart_add(Eo *obj, Elm_Image_Data 
*priv)
 
    elm_widget_can_focus_set(obj, EINA_FALSE);
 
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 }
 
 EOLIAN static void
@@ -733,7 +734,7 @@ _elm_image_elm_widget_theme_apply(Eo *obj, Elm_Image_Data 
*sd EINA_UNUSED)
    int_ret = elm_obj_widget_theme_apply(eo_super(obj, MY_CLASS));
    if (!int_ret) return EINA_FALSE;
 
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 
    return EINA_TRUE;
 }
@@ -770,13 +771,15 @@ _elm_image_internal_scale_set(Evas_Object *obj, 
Elm_Image_Data *sd, double scale
    _elm_image_internal_sizing_eval(obj, sd);
 }
 
-EOLIAN static void
-_elm_image_sizing_eval(Eo *obj, Elm_Image_Data *sd)
+static void
+_elm_image_sizing_eval(Eo *obj)
 {
    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
    int w = 0, h = 0;
    double ts;
 
+   ELM_IMAGE_DATA_GET(obj, sd);
+
    efl_image_smooth_scale_set(obj, sd->smooth);
 
    if (sd->no_scale)
@@ -1169,7 +1172,7 @@ _elm_image_no_scale_set(Eo *obj, Elm_Image_Data *sd, 
Eina_Bool no_scale)
 {
    sd->no_scale = no_scale;
 
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 }
 
 EOLIAN static Eina_Bool
@@ -1184,7 +1187,7 @@ _elm_image_resizable_set(Eo *obj, Elm_Image_Data *sd, 
Eina_Bool up, Eina_Bool do
    sd->resize_up = !!up;
    sd->resize_down = !!down;
 
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 }
 
 EOLIAN static void
@@ -1498,7 +1501,7 @@ EAPI void
 elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth)
 {
    efl_image_smooth_scale_set(obj, smooth);
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 }
 
 EAPI Eina_Bool
@@ -1529,7 +1532,7 @@ elm_image_file_set(Evas_Object *obj, const char *file, 
const char *group)
 
    ELM_IMAGE_CHECK(obj) EINA_FALSE;
    ret = efl_file_set(obj, file, group);
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
    return ret;
 }
 
@@ -1612,7 +1615,7 @@ elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool 
fill_outside)
 
    sd->fill_inside = !fill_outside;
 
-   elm_obj_image_sizing_eval(obj);
+   _elm_image_sizing_eval(obj);
 }
 
 EAPI Eina_Bool
@@ -1772,4 +1775,11 @@ elm_image_resize_up_get(const Evas_Object *obj)
    return sd->resize_up;
 }
 
+EAPI void
+elm_image_sizing_eval(Evas_Object *obj)
+{
+   ELM_IMAGE_CHECK(obj);
+   _elm_image_sizing_eval(obj);
+}
+
 #include "elm_image.eo.c"
diff --git a/src/lib/elementary/elm_image.eo b/src/lib/elementary/elm_image.eo
index 39eb15c..fa9fa20 100644
--- a/src/lib/elementary/elm_image.eo
+++ b/src/lib/elementary/elm_image.eo
@@ -94,12 +94,6 @@ class Elm.Image (Elm.Widget, Evas.Clickable_Interface, 
Evas.Draggable_Interface,
             down: bool; [[A bool to set if the object is resizable down. 
Default is $true.]]
          }
       }
-      sizing_eval {
-         [[Re-evaluate the object's final geometry.
-
-           @since 1.7]]
-         legacy: null;
-      }
    }
    implements {
       class.constructor;
diff --git a/src/lib/elementary/elm_image_legacy.h 
b/src/lib/elementary/elm_image_legacy.h
index 0d82584..c2bf8c7 100644
--- a/src/lib/elementary/elm_image_legacy.h
+++ b/src/lib/elementary/elm_image_legacy.h
@@ -495,5 +495,12 @@ EAPI void elm_image_resize_up_set(Evas_Object *obj, 
Eina_Bool resize_up);
  */
 EAPI Eina_Bool elm_image_resize_up_get(const Evas_Object *obj);
 
+/** Re-evaluate the object's final geometry.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Image
+ */
+EAPI void elm_image_sizing_eval(Evas_Object *obj);
 
 #include "elm_image.eo.legacy.h"

-- 


Reply via email to