ecore-wl2: Add API function to set pointer surface on a window

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-28 12:15:51 -04:00
parent d8f72b6c32
commit 590c278a46
2 changed files with 14 additions and 0 deletions

View File

@ -430,6 +430,8 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool ico
/* TODO: doxy */
EAPI void ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, int *y);
EAPI void ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surface *surface, int hot_x, int hot_y);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -798,3 +798,15 @@ ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, int *y)
if (x) *x = window->input->pointer.sx;
if (y) *y = window->input->pointer.sy;
}
EAPI void
ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surface *surface, int hot_x, int hot_y)
{
EINA_SAFETY_ON_NULL_RETURN(window);
EINA_SAFETY_ON_NULL_RETURN(window->input);
if (window->input->wl.pointer)
wl_pointer_set_cursor(window->input->wl.pointer,
window->input->pointer.enter_serial,
surface, hot_x, hot_y);
}