diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 1185780d72..8bd591ca5a 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1041,6 +1041,18 @@ EAPI void ecore_wl2_window_preferred_rotation_set(Ecore_Wl2_Window *window, int */ EAPI int ecore_wl2_window_preferred_rotation_get(Ecore_Wl2_Window *window); +/** + * Set a windows available rotations + * + * @param window + * @param rots + * @param count + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.20 + */ +EAPI void ecore_wl2_window_available_rotations_set(Ecore_Wl2_Window *window, const int *rots, unsigned int count); + /** * @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 23b2985968..611db67fdf 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -191,6 +191,8 @@ struct _Ecore_Wl2_Window Eina_Bool supported : 1; Eina_Bool app_set : 1; int preferred_rot; + int *available_rots; + unsigned int count; } wm_rot; }; diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 4d5733a684..29e3eae1dd 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1255,3 +1255,11 @@ ecore_wl2_window_preferred_rotation_get(Ecore_Wl2_Window *window) EINA_SAFETY_ON_NULL_RETURN_VAL(window, 0); return window->wm_rot.preferred_rot; } + +EAPI void +ecore_wl2_window_available_rotations_set(Ecore_Wl2_Window *window, const int *rots, unsigned int count) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + window->wm_rot.count = count; + window->wm_rot.available_rots = rots; +}