aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-03-24 15:39:37 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-03-24 15:40:51 +0830
commit388805ea6c17919c62b79d9d9c2c7d42e8e4580f (patch)
treed277063892cafe197f2ea6a6d26401ceb74db917
parentElm_map: fix build warning (diff)
downloadelementary-388805ea6c17919c62b79d9d9c2c7d42e8e4580f.tar.gz
Elm_image: remove elm_image_fill_outside_get
This api will be removed. elm_image_fill_outside_get is same as !elm_image_fill_inside_get. elm_image_fill_outside_set function is too.
-rw-r--r--src/lib/elm_image.c34
-rw-r--r--src/lib/elm_image.eo23
-rw-r--r--src/lib/elm_image_legacy.h45
3 files changed, 66 insertions, 36 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index e5b533edc..7ae9e4634 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -1231,20 +1231,6 @@ _elm_image_resizable_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, Eina_Bool *siz
}
EOLIAN static void
-_elm_image_fill_outside_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool fill_outside)
-{
- sd->fill_inside = !fill_outside;
-
- elm_obj_image_sizing_eval(obj);
-}
-
-EOLIAN static Eina_Bool
-_elm_image_fill_outside_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
-{
- return !sd->fill_inside;
-}
-
-EOLIAN static void
_elm_image_preload_disabled_set(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, Eina_Bool disable)
{
if (sd->edje || !sd->img) return;
@@ -1662,4 +1648,24 @@ elm_image_scale_get(const Evas_Object *obj)
return sd->scale;
}
+EAPI void
+elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
+{
+ ELM_IMAGE_CHECK(obj);
+ ELM_IMAGE_DATA_GET(obj, sd);
+
+ sd->fill_inside = !fill_outside;
+
+ elm_obj_image_sizing_eval(obj);
+}
+
+EAPI Eina_Bool
+elm_image_fill_outside_get(const Evas_Object *obj)
+{
+ ELM_IMAGE_CHECK(obj) EINA_FALSE;
+ ELM_IMAGE_DATA_GET(obj, sd);
+
+ return !sd->fill_inside;
+}
+
#include "elm_image.eo.c"
diff --git a/src/lib/elm_image.eo b/src/lib/elm_image.eo
index de511e06e..8c54a43b9 100644
--- a/src/lib/elm_image.eo
+++ b/src/lib/elm_image.eo
@@ -120,7 +120,7 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
The original aspect ratio (width / height) of the image is usually
distorted to match the object's size. Enabling this option will retain
this original aspect, and the way that the image is fit into the object's
- area depends on the option set by @.fill_outside.]]
+ area depends on the option set by @.fill_inside.]]
}
get {
}
@@ -140,27 +140,6 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
orient: Elm.Image_Orient; [[The image orientation Elm.Image.Orient Default is #ELM_IMAGE_ORIENT_NONE.]]
}
}
- @property fill_outside {
- [[Control if the image fills the entire object area, when keeping the aspect ratio.
-
- When the image should keep its aspect ratio even if resized to another
- aspect ratio, there are two possibilities to resize it: keep the entire
- image inside the limits of height and width of the object ($fill_outside
- is $false) or let the extra width or height go outside of the object,
- and the image will fill the entire object ($fill_outside is $true).
-
- Note: This option will have no effect if @.aspect_fixed
- is set to $false.
-
- See also @.fill_inside.]]
- set {
- }
- get {
- }
- values {
- fill_outside: bool; [[$true if the object is filled outside, $false otherwise. Default is $false.]]
- }
- }
@property resizable {
[[Control if the object is (up/down) resizable.
diff --git a/src/lib/elm_image_legacy.h b/src/lib/elm_image_legacy.h
index ff402dcd6..860cd99c1 100644
--- a/src/lib/elm_image_legacy.h
+++ b/src/lib/elm_image_legacy.h
@@ -320,4 +320,49 @@ EAPI void elm_image_scale_set(Evas_Object *obj, double scale);
* @ingroup Elm_Image
*/
EAPI double elm_image_scale_get(const Evas_Object *obj);
+
+/**
+ * @brief Control if the image fills the entire object area, when keeping the
+ * aspect ratio.
+ *
+ * When the image should keep its aspect ratio even if resized to another
+ * aspect ratio, there are two possibilities to resize it: keep the entire
+ * image inside the limits of height and width of the object ($fill_outside is
+ * @c false) or let the extra width or height go outside of the object, and the
+ * image will fill the entire object ($fill_outside is @c true).
+ *
+ * @note This option will have no effect if @ref elm_image_aspect_fixed_get is
+ * set to @c false.
+ *
+ * See also @ref Elm.Image.fill_inside.
+ *
+ * @param[in] fill_outside @c true if the object is filled outside, @c false
+ * otherwise. Default is @c false.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
+
+/**
+ * @brief Control if the image fills the entire object area, when keeping the
+ * aspect ratio.
+ *
+ * When the image should keep its aspect ratio even if resized to another
+ * aspect ratio, there are two possibilities to resize it: keep the entire
+ * image inside the limits of height and width of the object ($fill_outside is
+ * @c false) or let the extra width or height go outside of the object, and the
+ * image will fill the entire object ($fill_outside is @c true).
+ *
+ * @note This option will have no effect if @ref elm_image_aspect_fixed_get is
+ * set to @c false.
+ *
+ * See also @ref Elm.Image.fill_inside.
+ *
+ * @return @c true if the object is filled outside, @c false otherwise. Default
+ * is @c false.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj);
+
#include "elm_image.eo.legacy.h"