devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68ea9f1a7178c1d6a8b6a1ef283f48f602b3d14b

commit 68ea9f1a7178c1d6a8b6a1ef283f48f602b3d14b
Author: Christopher Michael <[email protected]>
Date:   Tue Nov 19 09:28:27 2019 -0500

    ecore-wl2: Add API to return window type
    
    Small patch whichs adds a new API to return the type of a given window
    
    @feature
---
 src/lib/ecore_wl2/Ecore_Wl2.h        | 10 ++++++++++
 src/lib/ecore_wl2/ecore_wl2_window.c |  7 +++++++
 2 files changed, 17 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index b06f3b1375..04dd80a79f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1077,6 +1077,16 @@ EAPI void 
ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool ico
  */
 EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, 
Ecore_Wl2_Window_Type type);
 
+/**
+ * Get the type of a given window
+ *
+ * @see Ecore_Wl2_Window_Type
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI Ecore_Wl2_Window_Type ecore_wl2_window_type_get(Ecore_Wl2_Window *window);
+
 /**
  * Find the output that a given window is on
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 97938339ce..6ba894b02f 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1741,3 +1741,10 @@ ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window, 
Eina_Bool purge)
    if (!window->wl2_surface) return;
    ecore_wl2_surface_flush(window->wl2_surface, purge);
 }
+
+EAPI Ecore_Wl2_Window_Type
+ecore_wl2_window_type_get(Ecore_Wl2_Window *window)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, ECORE_WL2_WINDOW_TYPE_NONE);
+   return window->type;
+}

-- 


Reply via email to