forked from enlightenment/efl
add call for geting mosue xy - last_xy wasnt good enough :(
SVN revision: 14511
This commit is contained in:
parent
ab518488f3
commit
b6d502936e
|
@ -1284,6 +1284,7 @@ EAPI void ecore_x_window_key_ungrab(Ecore_X_Window win, char *key,
|
||||||
EAPI void ecore_x_focus_reset(void);
|
EAPI void ecore_x_focus_reset(void);
|
||||||
EAPI void ecore_x_events_allow_all(void);
|
EAPI void ecore_x_events_allow_all(void);
|
||||||
EAPI void ecore_x_pointer_last_xy_get(int *x, int *y);
|
EAPI void ecore_x_pointer_last_xy_get(int *x, int *y);
|
||||||
|
EAPI void ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1551,6 +1551,18 @@ ecore_x_pointer_last_xy_get(int *x, int *y)
|
||||||
if (x) *x = _ecore_x_event_last_root_x;
|
if (x) *x = _ecore_x_event_last_root_x;
|
||||||
if (y) *y = _ecore_x_event_last_root_y;
|
if (y) *y = _ecore_x_event_last_root_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
|
||||||
|
{
|
||||||
|
Window rwin, cwin;
|
||||||
|
int rx, ry, wx, wy;
|
||||||
|
unsigned int mask;
|
||||||
|
|
||||||
|
XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, &rx, &ry, &wx, &wy, &mask);
|
||||||
|
if (x) *x = wx;
|
||||||
|
if (y) *y = wy;
|
||||||
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue