devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=25505626ad221cbf7acd07a6771c2bd7efa98a39

commit 25505626ad221cbf7acd07a6771c2bd7efa98a39
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Oct 6 10:19:05 2015 -0400

    ecore-wl2: Add API function to get the position of a subsurface
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h         | 12 ++++++++++++
 src/lib/ecore_wl2/ecore_wl2_subsurf.c |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index ac4f8b6..33f2bc8 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -623,6 +623,18 @@ EAPI struct wl_surface 
*ecore_wl2_subsurface_surface_get(Ecore_Wl2_Subsurface *s
  */
 EAPI void ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface *subsurface, 
int x, int y);
 
+/**
+ * Get the position of this subsurface, relative to its parent surface.
+ * Coordinates will be returned in x and y if non-NULL.
+ *
+ * @param subsurface the subsurface
+ * @param x coordinate in the parent surface, or NULL to ignore
+ * @param y coordinate in the parent surface, or NULL to ignore
+ *
+ * @ingroup Ecore_Wl2_Subsurface_Group
+ */
+EAPI void ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, 
int *x, int *y);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_subsurf.c 
b/src/lib/ecore_wl2/ecore_wl2_subsurf.c
index c17566b..ebc7172 100644
--- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c
+++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c
@@ -99,3 +99,12 @@ ecore_wl2_subsurface_position_set(Ecore_Wl2_Subsurface 
*subsurface, int x, int y
 
    wl_subsurface_set_position(subsurface->wl.subsurface, x, y);
 }
+
+EAPI void
+ecore_wl2_subsurface_position_get(Ecore_Wl2_Subsurface *subsurface, int *x, 
int *y)
+{
+   EINA_SAFETY_ON_NULL_RETURN(subsurface);
+
+   if (x) *x = subsurface->x;
+   if (y) *y = subsurface->y;
+}

-- 


Reply via email to