forked from enlightenment/efl
photocam: implement Efl.Gfx.View.view_size.get
replace elm_photocam_image_size_get with Efl.Gfx.View.view_size.get and mark elm_photocam_image_size_get as legacy API. Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
This commit is contained in:
parent
bf31dcd2d0
commit
a61e53fe34
|
@ -2128,10 +2128,10 @@ _elm_photocam_zoom_mode_get(Eo *obj EINA_UNUSED, Elm_Photocam_Data *sd)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_photocam_image_size_get(Eo *obj EINA_UNUSED, Elm_Photocam_Data *sd, int *w, int *h)
|
||||
_elm_photocam_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Elm_Photocam_Data *pd, int *w, int *h)
|
||||
{
|
||||
if (w) *w = sd->size.imw;
|
||||
if (h) *h = sd->size.imh;
|
||||
if (w) *w = pd->size.imw;
|
||||
if (h) *h = pd->size.imh;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
@ -2460,3 +2460,9 @@ elm_photocam_internal_image_get(const Evas_Object *obj)
|
|||
|
||||
return sd->img;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h)
|
||||
{
|
||||
efl_gfx_view_size_get(obj, w, h);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ enum Elm.Photocam.Zoom_Mode
|
|||
|
||||
class Elm.Photocam (Elm.Widget, Elm.Interface_Scrollable,
|
||||
Elm.Interface.Atspi_Widget_Action, Efl.File,
|
||||
Efl.Ui.Clickable, Efl.Ui.Scrollable,
|
||||
Efl.Ui.Clickable, Efl.Ui.Scrollable, Efl.Gfx.View,
|
||||
Efl.Ui.Zoomable, Efl.Orientation, Efl.Flipable)
|
||||
{
|
||||
[[Elementary photocam class]]
|
||||
|
@ -131,26 +131,13 @@ class Elm.Photocam (Elm.Widget, Elm.Interface_Scrollable,
|
|||
h: int; [[Height of region in image original pixels]]
|
||||
}
|
||||
}
|
||||
@property image_size {
|
||||
get {
|
||||
[[Get the current image pixel width and height
|
||||
|
||||
This gets the current photo pixel width and height (for the
|
||||
original). The size will be returned in the integers $w and $h
|
||||
that are pointed to.
|
||||
]]
|
||||
}
|
||||
values {
|
||||
w: int; [[A pointer to the width return]]
|
||||
h: int; [[A pointer to the height return]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.constructor;
|
||||
Efl.Gfx.position { set; }
|
||||
Efl.Gfx.size { set; }
|
||||
Efl.Gfx.View.view_size { get; }
|
||||
Efl.Canvas.Group.group_add;
|
||||
Efl.Canvas.Group.group_del;
|
||||
Efl.Canvas.Group.group_member_add;
|
||||
|
|
|
@ -108,4 +108,17 @@ EAPI Evas_Object* elm_photocam_internal_image_get(const Evas_Object *obj);
|
|||
*/
|
||||
EAPI void elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h);
|
||||
|
||||
/**
|
||||
* @brief Get the current image pixel width and height
|
||||
*
|
||||
* This gets the current photo pixel width and height (for the original). The
|
||||
* size will be returned in the integers @c w and @c h that are pointed to.
|
||||
*
|
||||
* @param[out] w A pointer to the width return
|
||||
* @param[out] h A pointer to the height return
|
||||
*
|
||||
* @ingroup Elm_Photocam
|
||||
*/
|
||||
EAPI void elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h);
|
||||
|
||||
#include "elm_photocam.eo.legacy.h"
|
||||
|
|
Loading…
Reference in New Issue