forked from enlightenment/efl
ecore-wl2: Add API function to return pointer position
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
25390920be
commit
462d86486f
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue