ecore-wl2: Add API to set window available rotations

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-06-09 09:54:44 -04:00
parent fa7f8d25b2
commit b1584c9054
3 changed files with 22 additions and 0 deletions

View File

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

View File

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

View File

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