aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-04-07 19:08:41 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-04-07 19:08:41 +0830
commitbeb6fa61c7a3939eb3df50c31e20079801b00219 (patch)
tree42ce7222a7a8272ba5b90247d8fc1c0a6aa3f60a /src
parentefl.progress: Rename property from value to progress_value (diff)
downloadefl-beb6fa61c7a3939eb3df50c31e20079801b00219.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_icon.c2
-rw-r--r--src/lib/elementary/elm_image.c28
-rw-r--r--src/lib/elementary/elm_image.eo6
-rw-r--r--src/lib/elementary/elm_image_legacy.h7
4 files changed, 27 insertions, 16 deletions
diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index 1432d78691..466ab9d6e6 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 a1c5a8588e..b3d300b493 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 39eb15c0f9..fa9fa203b3 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 0d82584190..c2bf8c7d91 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"