From e12077adfa3bb6157c9757e6e4dba25822d41655 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Fri, 9 Jun 2017 09:13:36 -0400 Subject: [PATCH] ecore-wl2: Add API to get if window manager rotation is supported This patch adds an API function which can be called to determine if window manager rotation is supported. @feature Signed-off-by: Chris Michael --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 ++++++++++++ src/lib/ecore_wl2/ecore_wl2_window.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 6548a0c..bd832b3 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -984,6 +984,18 @@ EAPI void ecore_wl2_window_buffer_transform_set(Ecore_Wl2_Window *window, int tr EAPI void ecore_wl2_window_wm_rotation_supported_set(Ecore_Wl2_Window *window, Eina_Bool enabled); /** + * Get if window rotation is supported by the window manager + * + * @param window + * + * @return EINA_TRUE if supported, EINA_FALSE otherwise + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.20 + */ +EAPI Eina_Bool ecore_wl2_window_wm_rotation_supported_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_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 26cdd7f..ef5da9d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1220,3 +1220,10 @@ ecore_wl2_window_wm_rotation_supported_set(Ecore_Wl2_Window *window, Eina_Bool e EINA_SAFETY_ON_NULL_RETURN(window); window->wm_rot.supported = enabled; } + +EAPI Eina_Bool +ecore_wl2_window_wm_rotation_supported_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); + return window->wm_rot.supported; +} -- 2.7.4