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
This commit is contained in:
Ji-Youn Park 2016-04-07 19:08:41 +08:30
parent ce22fa292a
commit beb6fa61c7
4 changed files with 27 additions and 16 deletions

View File

@ -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;
}

View File

@ -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"

View File

@ -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;

View File

@ -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"