From e3abac30f1f90fe2c0339a3416259a7ff6535504 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 15 Jun 2017 11:07:48 -0400 Subject: [PATCH] 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 --- 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 3992663..9b02f1d 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 172daa8..da7a8ae 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 1a3b284..13e9c9e 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; +} -- 2.7.4