ecore-wl2: Add function to return window id
authorChris Michael <cp.michael@samsung.com>
Thu, 20 Aug 2015 16:44:17 +0000 (12:44 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_window.c

index 3eff825..d226ea4 100644 (file)
@@ -222,6 +222,15 @@ EAPI Eina_Iterator *ecore_wl2_display_globals_get(Ecore_Wl2_Display *display);
  */
 EAPI Ecore_Wl2_Window *ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h);
 
+/**
+ * Get the window id associated with an Ecore_Wl2_Window
+ *
+ * @param window The Ecore_Wl2_Window of which to retrieve the window id
+ *
+ * @return The id associated with this window
+ */
+EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
index 283bae4..e4224a3 100644 (file)
@@ -27,3 +27,10 @@ ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x
 
    return win;
 }
+
+EAPI int
+ecore_wl2_window_id_get(Ecore_Wl2_Window *window)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1);
+   return win->id;
+}