forked from enlightenment/efl
Elm_image: remove object_get from eo and object_size_get to view.size.get
remove elm_image_object_get frome eo. change elm_image_object_size_get to efl_gfx_view_size_get
This commit is contained in:
parent
c0bbf53cb9
commit
e438bd09b2
|
@ -822,7 +822,7 @@ _elm_image_sizing_eval(Eo *obj, Elm_Image_Data *sd)
|
|||
|
||||
ts = sd->scale;
|
||||
sd->scale = 1.0;
|
||||
elm_obj_image_object_size_get(obj, &w, &h);
|
||||
efl_gfx_view_size_get(obj, &w, &h);
|
||||
|
||||
sd->scale = ts;
|
||||
evas_object_size_hint_min_get(obj, &minw, &minh);
|
||||
|
@ -887,7 +887,7 @@ _elm_image_file_set_do(Evas_Object *obj)
|
|||
evas_object_image_load_size_set(sd->img, sd->load_size, sd->load_size);
|
||||
else
|
||||
{
|
||||
elm_obj_image_object_size_get((Eo *) obj, &w, &h);
|
||||
efl_gfx_view_size_get((Eo *) obj, &w, &h);
|
||||
evas_object_image_load_size_set(sd->img, w, h);
|
||||
}
|
||||
}
|
||||
|
@ -1170,13 +1170,13 @@ _elm_image_efl_file_async_set(Eo *obj, Elm_Image_Data *pd, Eina_Bool async)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_image_efl_file_async_get(Eo *obj EINA_UNUSED, Elm_Image_Data *pd)
|
||||
_elm_image_efl_file_async_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
|
||||
{
|
||||
return pd->async_enable;
|
||||
return sd->async_enable;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_image_object_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h)
|
||||
_elm_image_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, int *w, int *h)
|
||||
{
|
||||
int tw, th;
|
||||
int cw = 0, ch = 0;
|
||||
|
@ -1321,12 +1321,6 @@ _elm_image_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, Elm_Ima
|
|||
return sd->edit;
|
||||
}
|
||||
|
||||
EOLIAN static Evas_Object*
|
||||
_elm_image_object_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
|
||||
{
|
||||
return sd->img;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_image_aspect_fixed_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool fixed)
|
||||
{
|
||||
|
@ -1608,12 +1602,12 @@ elm_image_memfile_set(Evas_Object *obj, const void *img, size_t size, const char
|
|||
EAPI void
|
||||
elm_image_scale_set(Evas_Object *obj,
|
||||
double scale)
|
||||
{
|
||||
{
|
||||
ELM_IMAGE_CHECK(obj);
|
||||
ELM_IMAGE_DATA_GET(obj, sd);
|
||||
|
||||
sd->scale = scale;
|
||||
|
||||
|
||||
_elm_image_internal_sizing_eval(obj, sd);
|
||||
}
|
||||
|
||||
|
@ -1684,6 +1678,18 @@ elm_image_orient_get(const Evas_Object *obj)
|
|||
return (Elm_Image_Orient) efl_image_orientation_get(obj);
|
||||
}
|
||||
|
||||
EAPI Evas_Object*
|
||||
elm_image_object_get(const Evas_Object *obj)
|
||||
{
|
||||
ELM_IMAGE_CHECK(obj) NULL;
|
||||
ELM_IMAGE_DATA_GET(obj, sd);
|
||||
return sd->img;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_image_object_size_get(const Evas_Object *obj, int *w, int *h)
|
||||
{
|
||||
efl_gfx_view_size_get(obj, w, h);
|
||||
}
|
||||
|
||||
#include "elm_image.eo.c"
|
||||
|
|
|
@ -20,10 +20,10 @@ struct Elm.Image.Error
|
|||
open_error: Eina.Bool;
|
||||
}
|
||||
|
||||
class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
|
||||
Edje.Object, Efl.Image, Evas.Draggable_Interface,
|
||||
class Elm.Image (Elm.Widget, Evas.Clickable_Interface, Evas.Draggable_Interface,
|
||||
Efl.File, Efl.Image, Efl.Image_Load, Efl.Player, Efl.Gfx.View, Efl.Player,
|
||||
Elm.Interface_Atspi_Image, Elm.Interface_Atspi_Widget_Action,
|
||||
Efl.Player)
|
||||
Edje.Object)
|
||||
{
|
||||
eo_prefix: elm_obj_image;
|
||||
methods {
|
||||
|
@ -122,31 +122,6 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
|
|||
down: bool; [[A bool to set if the object is resizable down. Default is $true.]]
|
||||
}
|
||||
}
|
||||
@property object {
|
||||
get {
|
||||
[[Get the inlined image object of the image widget.
|
||||
|
||||
This function allows one to get the underlying $Evas_Object of type
|
||||
Image from this elementary widget. It can be useful to do things like get
|
||||
the pixel data, save the image to a file, etc.
|
||||
|
||||
Note: Be careful to not manipulate it, as it is under control of
|
||||
elementary.]]
|
||||
|
||||
return: Evas.Object *; [[The inlined image object, or NULL if none exists]]
|
||||
}
|
||||
}
|
||||
@property object_size {
|
||||
get {
|
||||
[[Get the current size of the image.
|
||||
|
||||
This is the real size of the image, not the size of the object.]]
|
||||
}
|
||||
values {
|
||||
w: int; [[Pointer to store width, or NULL.]]
|
||||
h: int; [[Pointer to store height, or NULL.]]
|
||||
}
|
||||
}
|
||||
sizing_eval {
|
||||
[[Re-evaluate the object's final geometry.
|
||||
|
||||
|
@ -163,6 +138,7 @@ class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
|
|||
Efl.File.async.set;
|
||||
Efl.File.async.get;
|
||||
Efl.File.async_wait;
|
||||
Efl.Gfx.View.view_size.get;
|
||||
Efl.Image_Load.load_size.set;
|
||||
Efl.Image_Load.load_size.get;
|
||||
Efl.Image.smooth_scale.set;
|
||||
|
|
|
@ -420,4 +420,31 @@ EAPI void elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient);
|
|||
*/
|
||||
EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @brief Get the inlined image object of the image widget.
|
||||
*
|
||||
* This function allows one to get the underlying @c Evas_Object of type Image
|
||||
* from this elementary widget. It can be useful to do things like get the
|
||||
* pixel data, save the image to a file, etc.
|
||||
*
|
||||
* @note Be careful to not manipulate it, as it is under control of elementary.
|
||||
*
|
||||
* @return The inlined image object, or NULL if none exists
|
||||
*
|
||||
* @ingroup Elm_Image
|
||||
*/
|
||||
EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @brief Get the current size of the image.
|
||||
*
|
||||
* This is the real size of the image, not the size of the object.
|
||||
*
|
||||
* @param[out] w Pointer to store width, or NULL.
|
||||
* @param[out] h Pointer to store height, or NULL.
|
||||
*
|
||||
* @ingroup Elm_Image
|
||||
*/
|
||||
EAPI void elm_image_object_size_get(const Evas_Object *obj, int *w, int *h);
|
||||
|
||||
#include "elm_image.eo.legacy.h"
|
||||
|
|
Loading…
Reference in New Issue