From fa7f8d25b2e4db61c9ff9bfb5421a38bce019942 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Fri, 9 Jun 2017 09:51:19 -0400 Subject: [PATCH] ecore-wl2: Add API to return a windows preferred rotation @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 aa03746..1185780 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1030,6 +1030,18 @@ EAPI Eina_Bool ecore_wl2_window_rotation_app_get(Ecore_Wl2_Window *window); EAPI void ecore_wl2_window_preferred_rotation_set(Ecore_Wl2_Window *window, int rot); /** + * Get preferred rotation for a given window + * + * @param window + * + * @return Given windows preferred rotation + * + * @ingroup Ecore_Wl2_Window + * @since 1.20 + */ +EAPI int ecore_wl2_window_preferred_rotation_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 951b8f7..4d5733a 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1248,3 +1248,10 @@ ecore_wl2_window_preferred_rotation_set(Ecore_Wl2_Window *window, int rot) EINA_SAFETY_ON_NULL_RETURN(window); window->wm_rot.preferred_rot = rot; } + +EAPI int +ecore_wl2_window_preferred_rotation_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, 0); + return window->wm_rot.preferred_rot; +} -- 2.7.4