ecore-wl2: Add API to get/set if a window is in floating mode
authorChris Michael <cp.michael@samsung.com>
Thu, 15 Jun 2017 15:07:48 +0000 (11:07 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 15 Jun 2017 15:07:48 +0000 (11:07 -0400)
Small patch to add API functions which allow getting/setting if a
window is in floating mode

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_private.h
src/lib/ecore_wl2/ecore_wl2_window.c

index 3992663..9b02f1d 100644 (file)
@@ -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
  *
index 172daa8..da7a8ae 100644 (file)
@@ -192,6 +192,7 @@ struct _Ecore_Wl2_Window
    Eina_Bool opaque_set : 1;
 
    Eina_Bool focus_skip : 1;
+   Eina_Bool floating : 1;
 
    struct
      {
index 1a3b284..13e9c9e 100644 (file)
@@ -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;
+}