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
This commit is contained in:
Ji-Youn Park 2016-04-04 10:14:49 +08:30
parent db4ff548d3
commit 8c3f4cd816
3 changed files with 95 additions and 64 deletions

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

View 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.

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