EAPI struct wl_shm *ecore_wl_shm_get(void);
EAPI struct wl_display *ecore_wl_display_get(void);
EAPI void ecore_wl_screen_size_get(int *w, int *h);
-EAPI void ecore_wl_pointer_xy_get(Ecore_Wl_Window *win, int *x, int *y);
+EAPI void ecore_wl_pointer_xy_get(int *x, int *y);
EAPI Ecore_Wl_Window *ecore_wl_window_new(Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type);
EAPI void ecore_wl_window_free(Ecore_Wl_Window *win);
/* @since 1.2 */
EAPI void
-ecore_wl_pointer_xy_get(Ecore_Wl_Window *win, int *x, int *y)
+ecore_wl_pointer_xy_get(int *x, int *y)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- if (x) *x = 0;
- if (y) *y = 0;
- if ((!win) || (!win->pointer_device)) return;
- if (x) *x = win->pointer_device->sx;
- if (y) *y = win->pointer_device->sy;
+ _ecore_wl_input_pointer_xy_get(x, y);
}
/* local functions */
_ecore_wl_input_cb_data_selection
};
+/* local variables */
+static int _pointer_x, _pointer_y;
+
void
_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id)
{
free(input);
}
+void
+_ecore_wl_input_pointer_xy_get(int *x, int *y)
+{
+ if (x) *x = _pointer_x;
+ if (y) *y = _pointer_y;
+}
+
/* local functions */
static void
_ecore_wl_input_cb_motion(void *data, struct wl_input_device *input_device __UNUSED__, unsigned int timestamp, int sx, int sy)
if (!(input = data)) return;
+ _pointer_x = sx;
+ _pointer_y = sy;
+
input->sx = sx;
input->sy = sy;
void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id);
void _ecore_wl_input_del(Ecore_Wl_Input *input);
+void _ecore_wl_input_pointer_xy_get(int *x, int *y);
void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id);
void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer);