ecore-wl2: Add API function to return pointer position

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-28 12:07:39 -04:00
parent 25390920be
commit 462d86486f
2 changed files with 17 additions and 0 deletions

View File

@ -427,6 +427,9 @@ EAPI Eina_Bool ecore_wl2_window_iconified_get(Ecore_Wl2_Window *window);
/* TODO: doxy */
EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified);
/* TODO: doxy */
EAPI void ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, int *y);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -772,3 +772,17 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
window->minimized = iconified;
}
EAPI void
ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, int *y)
{
EINA_SAFETY_ON_NULL_RETURN(window);
if (x) *x = 0;
if (y) *y = 0;
if (!window->input) return;
if (x) *x = window->input->pointer.sx;
if (y) *y = window->input->pointer.sy;
}