Elm_image: remove resizable_up and resizable_down Eo api
authorJi-Youn Park <jy0703.park@samsung.com>
Mon, 4 Apr 2016 01:44:49 +0000 (10:14 +0830)
committerJi-Youn Park <jy0703.park@samsung.com>
Mon, 4 Apr 2016 01:49:18 +0000 (10:19 +0830)
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
src/lib/elementary/elm_image.eo
src/lib/elementary/elm_image_legacy.h

index af3e906..44a2907 100644 (file)
@@ -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"
index bea774e..d963352 100644 (file)
@@ -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.
 
index d71f749..0d82584 100644 (file)
@@ -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"