ecore-wl2: Add API to set window preferred rotation

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-06-09 09:47:40 -04:00
parent 258c75e641
commit 8b685a4d54
3 changed files with 19 additions and 0 deletions

View File

@ -1018,6 +1018,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

View File

@ -190,6 +190,7 @@ struct _Ecore_Wl2_Window
{
Eina_Bool supported : 1;
Eina_Bool app_set : 1;
int preferred_rot;
} wm_rot;
};

View File

@ -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;
}