From 8c3f4cd8163f98eb77e40b76d29272511e138753 Mon Sep 17 00:00:00 2001 From: Ji-Youn Park Date: Mon, 4 Apr 2016 10:14:49 +0830 Subject: Elm_image: remove resizable_up and resizable_down Eo api risizable_up and resizable_down api will be deprecated after creating the apis to deal with image content using scale type --- src/lib/elementary/elm_image.c | 82 ++++++++++++++++++++--------------- src/lib/elementary/elm_image.eo | 28 ------------ src/lib/elementary/elm_image_legacy.h | 49 +++++++++++++++++++++ 3 files changed, 95 insertions(+), 64 deletions(-) diff --git a/src/lib/elementary/elm_image.c b/src/lib/elementary/elm_image.c index af3e906382..44a29070fc 100644 --- a/src/lib/elementary/elm_image.c +++ b/src/lib/elementary/elm_image.c @@ -553,42 +553,6 @@ _elm_image_fill_inside_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd) return sd->fill_inside; } -EOLIAN static void -_elm_image_resize_up_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool resize_up) -{ - resize_up = !!resize_up; - - if (sd->resize_up == resize_up) return; - - sd->resize_up = resize_up; - - _elm_image_internal_sizing_eval(obj, sd); -} - -EOLIAN static Eina_Bool -_elm_image_resize_up_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd) -{ - return sd->resize_up; -} - -EOLIAN static void -_elm_image_resize_down_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool resize_down) -{ - resize_down = !!resize_down; - - if (sd->resize_down == resize_down) return; - - sd->resize_down = resize_down; - - _elm_image_internal_sizing_eval(obj, sd); -} - -EOLIAN static Eina_Bool -_elm_image_resize_down_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd) -{ - return sd->resize_down; -} - static Eina_Bool _elm_image_drag_n_drop_cb(void *elm_obj, Evas_Object *obj, @@ -1692,4 +1656,50 @@ elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) efl_gfx_view_size_get(obj, w, h); } +EAPI void +elm_image_resize_down_set(Evas_Object *obj, Eina_Bool resize_down) +{ + ELM_IMAGE_CHECK(obj); + ELM_IMAGE_DATA_GET(obj, sd); + + resize_down = !!resize_down; + + if (sd->resize_down == resize_down) return; + + sd->resize_down = resize_down; + + _elm_image_internal_sizing_eval(obj, sd); +} + +EAPI Eina_Bool +elm_image_resize_down_get(const Evas_Object *obj) +{ + ELM_IMAGE_CHECK(obj) EINA_FALSE; + ELM_IMAGE_DATA_GET(obj, sd); + return sd->resize_down; +} + +EAPI void +elm_image_resize_up_set(Evas_Object *obj, Eina_Bool resize_up) +{ + ELM_IMAGE_CHECK(obj); + ELM_IMAGE_DATA_GET(obj, sd); + + resize_up = !!resize_up; + + if (sd->resize_up == resize_up) return; + + sd->resize_up = resize_up; + + _elm_image_internal_sizing_eval(obj, sd); +} + +EAPI Eina_Bool +elm_image_resize_up_get(const Evas_Object *obj) +{ + ELM_IMAGE_CHECK(obj) EINA_FALSE; + ELM_IMAGE_DATA_GET(obj, sd); + return sd->resize_up; +} + #include "elm_image.eo.c" diff --git a/src/lib/elementary/elm_image.eo b/src/lib/elementary/elm_image.eo index bea774e3de..d963352441 100644 --- a/src/lib/elementary/elm_image.eo +++ b/src/lib/elementary/elm_image.eo @@ -27,34 +27,6 @@ class Elm.Image (Elm.Widget, Evas.Clickable_Interface, Evas.Draggable_Interface, { eo_prefix: elm_obj_image; methods { - @property resize_down { - [[Control whether the object's image can be resized to a size smaller than the original one. - - @since 1.7]] - set { - legacy: null; - } - get { - legacy: null; - } - values { - resize_down: bool; [[whether resizing down is allowed]] - } - } - @property resize_up { - [[Control whether the object's image can be resized to a size larget than the original one. - - @since 1.7]] - set { - legacy: null; - } - get { - legacy: null; - } - values { - resize_up: bool; [[whether resizing up is allowed]] - } - } @property no_scale { [[Control scaling behaviour of this object. diff --git a/src/lib/elementary/elm_image_legacy.h b/src/lib/elementary/elm_image_legacy.h index d71f74943a..0d82584190 100644 --- a/src/lib/elementary/elm_image_legacy.h +++ b/src/lib/elementary/elm_image_legacy.h @@ -447,4 +447,53 @@ EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj); */ EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h); +/** + * @brief Control whether the object's image can be resized to a size smaller + * than the original one. + * + * @param[in] resize_down whether resizing down is allowed + * + * @since 1.7 + * + * @ingroup Elm_Image + */ +EAPI void elm_image_resize_down_set(Evas_Object *obj, Eina_Bool resize_down); + +/** + * @brief Control whether the object's image can be resized to a size smaller + * than the original one. + * + * @return whether resizing down is allowed + * + * @since 1.7 + * + * @ingroup Elm_Image + */ +EAPI Eina_Bool elm_image_resize_down_get(const Evas_Object *obj); + +/** + * @brief Control whether the object's image can be resized to a size larget + * than the original one. + * + * @param[in] resize_up whether resizing up is allowed + * + * @since 1.7 + * + * @ingroup Elm_Image + */ +EAPI void elm_image_resize_up_set(Evas_Object *obj, Eina_Bool resize_up); + +/** + * @brief Control whether the object's image can be resized to a size larget + * than the original one. + * + * @return whether resizing up is allowed + * + * @since 1.7 + * + * @ingroup Elm_Image + */ +EAPI Eina_Bool elm_image_resize_up_get(const Evas_Object *obj); + + #include "elm_image.eo.legacy.h" -- cgit v1.2.1