From 8b685a4d54785279af228056de7085e8cf60e6cc Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Fri, 9 Jun 2017 09:47:40 -0400 Subject: [PATCH] ecore-wl2: Add API to set window preferred rotation @feature Signed-off-by: Chris Michael --- src/lib/ecore_wl2/Ecore_Wl2.h | 11 +++++++++++ src/lib/ecore_wl2/ecore_wl2_private.h | 1 + src/lib/ecore_wl2/ecore_wl2_window.c | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index a37b228..aa03746 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1019,6 +1019,17 @@ EAPI void ecore_wl2_window_rotation_app_set(Ecore_Wl2_Window *window, Eina_Bool EAPI Eina_Bool ecore_wl2_window_rotation_app_get(Ecore_Wl2_Window *window); /** + * Set preferred rotation on a given window + * + * @param window + * @param rot + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.20 + */ +EAPI void ecore_wl2_window_preferred_rotation_set(Ecore_Wl2_Window *window, int rot); + +/** * @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 9687b7f..23b2985 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -190,6 +190,7 @@ struct _Ecore_Wl2_Window { Eina_Bool supported : 1; Eina_Bool app_set : 1; + int preferred_rot; } wm_rot; }; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 622cdea..951b8f7 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1241,3 +1241,10 @@ ecore_wl2_window_rotation_app_get(Ecore_Wl2_Window *window) EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); return window->wm_rot.app_set; } + +EAPI void +ecore_wl2_window_preferred_rotation_set(Ecore_Wl2_Window *window, int rot) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + window->wm_rot.preferred_rot = rot; +} -- 2.7.4