photocam: implement Efl.Gfx.View.view_size.get
authorAmitesh Singh <amitesh.sh@samsung.com>
Wed, 17 May 2017 04:58:15 +0000 (13:58 +0900)
committerAmitesh Singh <amitesh.sh@samsung.com>
Wed, 17 May 2017 07:40:50 +0000 (16:40 +0900)
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>
src/lib/elementary/elm_photocam.c
src/lib/elementary/elm_photocam.eo
src/lib/elementary/elm_photocam_legacy.h

index 4fd7d2f..f09bd5e 100644 (file)
@@ -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);
+}
index fdbe38c..4225e47 100644 (file)
@@ -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;
index fc01f75..3c2d09b 100644 (file)
@@ -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"