summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-05-17 13:02:31 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-05-17 13:03:25 +0900
commit0e0ac8512a3d0005b759b5d37e3e23d7c50108bd (patch)
treeed0206220883651336c892eb7e44b7eda44c3ea2
parent383e8e150bf96e1eb5e46b60924dfd2bedf19008 (diff)
downloadefl-0e0ac8512a3d0005b759b5d37e3e23d7c50108bd.tar.gz
photocam: merge image_region_show() into image_region
and mark this API as legacy Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
-rw-r--r--src/lib/elementary/elm_photocam.c10
-rw-r--r--src/lib/elementary/elm_photocam.eo28
-rw-r--r--src/lib/elementary/elm_photocam_legacy.h14
3 files changed, 33 insertions, 19 deletions
diff --git a/src/lib/elementary/elm_photocam.c b/src/lib/elementary/elm_photocam.c
index 262accfa41..4fd7d2f8d6 100644
--- a/src/lib/elementary/elm_photocam.c
+++ b/src/lib/elementary/elm_photocam.c
@@ -2186,7 +2186,7 @@ _elm_photocam_image_region_get(Eo *obj, Elm_Photocam_Data *sd, int *x, int *y, i
}
EOLIAN static void
-_elm_photocam_image_region_show(Eo *obj, Elm_Photocam_Data *sd, int x, int y, int w, int h)
+_elm_photocam_image_region_set(Eo *obj, Elm_Photocam_Data *sd, int x, int y, int w, int h)
{
int rx, ry, rw, rh;
@@ -2207,6 +2207,12 @@ _elm_photocam_image_region_show(Eo *obj, Elm_Photocam_Data *sd, int x, int y, in
}
EAPI void
+elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h)
+{
+ elm_obj_photocam_image_region_set(obj, x, y, w, h);
+}
+
+EAPI void
elm_photocam_image_region_bring_in(Evas_Object *obj,
int x,
int y,
@@ -2453,4 +2459,4 @@ elm_photocam_internal_image_get(const Evas_Object *obj)
ELM_PHOTOCAM_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
return sd->img;
-} \ No newline at end of file
+}
diff --git a/src/lib/elementary/elm_photocam.eo b/src/lib/elementary/elm_photocam.eo
index fe4870915d..fdbe38c9f1 100644
--- a/src/lib/elementary/elm_photocam.eo
+++ b/src/lib/elementary/elm_photocam.eo
@@ -115,14 +115,20 @@ class Elm.Photocam (Elm.Widget, Elm.Interface_Scrollable,
get {
[[Get the region of the image that is currently shown
- See also @.image_region_show.
+ See also @.image_region.set.
+ ]]
+ }
+ set {
+ [[Set the viewed region of the image
+
+ This shows the region of the image without using animation.
]]
}
values {
- x: int; [[A pointer to the X-coordinate of region]]
- y: int; [[A pointer to the Y-coordinate of region]]
- w: int; [[A pointer to the width]]
- h: int; [[A pointer to the height]]
+ x: int; [[X-coordinate of region in image original pixels]]
+ y: int; [[Y-coordinate of region in image original pixels]]
+ w: int; [[Width of region in image original pixels]]
+ h: int; [[Height of region in image original pixels]]
}
}
@property image_size {
@@ -139,18 +145,6 @@ class Elm.Photocam (Elm.Widget, Elm.Interface_Scrollable,
h: int; [[A pointer to the height return]]
}
}
- image_region_show {
- [[Set the viewed region of the image
-
- This shows the region of the image without using animation.
- ]]
- params {
- @in x: int; [[X-coordinate of region in image original pixels]]
- @in y: int; [[Y-coordinate of region in image original pixels]]
- @in w: int; [[Width of region in image original pixels]]
- @in h: int; [[Height of region in image original pixels]]
- }
- }
}
implements {
class.constructor;
diff --git a/src/lib/elementary/elm_photocam_legacy.h b/src/lib/elementary/elm_photocam_legacy.h
index 29b15bb2c6..fc01f75d11 100644
--- a/src/lib/elementary/elm_photocam_legacy.h
+++ b/src/lib/elementary/elm_photocam_legacy.h
@@ -94,4 +94,18 @@ EAPI Evas_Image_Orient elm_photocam_image_orient_get(const Evas_Object *obj);
*/
EAPI Evas_Object* elm_photocam_internal_image_get(const Evas_Object *obj);
+/**
+ * @brief Set the viewed region of the image
+ *
+ * This shows the region of the image without using animation.
+ *
+ * @param[in] x X-coordinate of region in image original pixels
+ * @param[in] y Y-coordinate of region in image original pixels
+ * @param[in] w Width of region in image original pixels
+ * @param[in] h Height of region in image original pixels
+ *
+ * @ingroup Elm_Photocam
+ */
+EAPI void elm_photocam_image_region_show(Evas_Object *obj, int x, int y, int w, int h);
+
#include "elm_photocam.eo.legacy.h"