devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9a1435796d7255d5d4e464f76ea4cf960f348632

commit 9a1435796d7255d5d4e464f76ea4cf960f348632
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Sep 28 11:16:03 2015 -0400

    ecore-wl2: Add API function to return window geometry
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        |  3 +++
 src/lib/ecore_wl2/ecore_wl2_window.c | 11 +++++++++++
 2 files changed, 14 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index a5228f2..f500970 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -409,6 +409,9 @@ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window 
*window, const char *title
 /* TODO: doxy */
 EAPI void ecore_wl2_window_class_name_set(Ecore_Wl2_Window *window, const char 
*class_name);
 
+/* TODO: doxy */
+EAPI void ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int 
*y, int *w, int *h);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 4e048b6..df5c48e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -639,3 +639,14 @@ ecore_wl2_window_class_name_set(Ecore_Wl2_Window *window, 
const char *class_name
    else if (window->wl_shell_surface)
      wl_shell_surface_set_class(window->wl_shell_surface, window->class);
 }
+
+EAPI void
+ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y, int 
*w, int *h)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+
+   if (x) *x = window->geometry.x;
+   if (y) *y = window->geometry.y;
+   if (w) *w = window->geometry.w;
+   if (h) *h = window->geometry.h;
+}

-- 


Reply via email to