diff options
author | Amitesh Singh <amitesh.sh@samsung.com> | 2017-05-17 13:58:15 +0900 |
---|---|---|
committer | Amitesh Singh <amitesh.sh@samsung.com> | 2017-05-17 16:40:50 +0900 |
commit | a61e53fe341564d9a0123d94a907ce0eb8730846 (patch) | |
tree | 03cee7e1dab3cfab9780a6453959b83f039badbb | |
parent | bf31dcd2d06457edd78c466e704e779680844a43 (diff) | |
download | efl-a61e53fe341564d9a0123d94a907ce0eb8730846.tar.gz |
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>
-rw-r--r-- | src/lib/elementary/elm_photocam.c | 12 | ||||
-rw-r--r-- | src/lib/elementary/elm_photocam.eo | 17 | ||||
-rw-r--r-- | src/lib/elementary/elm_photocam_legacy.h | 13 |
3 files changed, 24 insertions, 18 deletions
diff --git a/src/lib/elementary/elm_photocam.c b/src/lib/elementary/elm_photocam.c index 4fd7d2f8d6..f09bd5e2c0 100644 --- a/src/lib/elementary/elm_photocam.c +++ b/src/lib/elementary/elm_photocam.c @@ -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); +} diff --git a/src/lib/elementary/elm_photocam.eo b/src/lib/elementary/elm_photocam.eo index fdbe38c9f1..4225e47276 100644 --- a/src/lib/elementary/elm_photocam.eo +++ b/src/lib/elementary/elm_photocam.eo @@ -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; diff --git a/src/lib/elementary/elm_photocam_legacy.h b/src/lib/elementary/elm_photocam_legacy.h index fc01f75d11..3c2d09ba52 100644 --- a/src/lib/elementary/elm_photocam_legacy.h +++ b/src/lib/elementary/elm_photocam_legacy.h @@ -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" |