devilhorns pushed a commit to branch master.

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

commit e3abac30f1f90fe2c0339a3416259a7ff6535504
Author: Chris Michael <[email protected]>
Date:   Thu Jun 15 11:07:48 2017 -0400

    ecore-wl2: Add API to get/set if a window is in floating mode
    
    Small patch to add API functions which allow getting/setting if a
    window is in floating mode
    
    "#divergence"
    
    @feature
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wl2/Ecore_Wl2.h         | 23 +++++++++++++++++++++++
 src/lib/ecore_wl2/ecore_wl2_private.h |  1 +
 src/lib/ecore_wl2/ecore_wl2_window.c  | 14 ++++++++++++++
 3 files changed, 38 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 39926635bc..9b02f1db0a 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1217,6 +1217,29 @@ EAPI Eina_Bool 
ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window);
 EAPI void ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char 
*role);
 
 /**
+ * Set if a given window is in floating mode
+ *
+ * @param window
+ * @param floating
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI void ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, 
Eina_Bool floating);
+
+/**
+ * Get if a given window is in floating mode
+ *
+ * @param window
+ *
+ * @return EINA_TRUE if floating, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window);
+
+/**
  * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
  * @ingroup Ecore_Wl2_Group
  *
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 172daa8ac3..da7a8ae3ef 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -192,6 +192,7 @@ struct _Ecore_Wl2_Window
    Eina_Bool opaque_set : 1;
 
    Eina_Bool focus_skip : 1;
+   Eina_Bool floating : 1;
 
    struct
      {
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 1a3b284465..13e9c9eec0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1477,3 +1477,17 @@ ecore_wl2_window_role_set(Ecore_Wl2_Window *window, 
const char *role)
    EINA_SAFETY_ON_NULL_RETURN(window);
    eina_stringshare_replace(&window->role, role);
 }
+
+EAPI void
+ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, Eina_Bool 
floating)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+   window->floating = floating;
+}
+
+EAPI Eina_Bool
+ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
+   return window->floating;
+}

-- 


Reply via email to