1XIQUERYPOINTER(libmansuffix) 2============================ 3 4NAME 5---- 6 7 XIQueryPointer - get device pointer coordinates. 8 9SYNOPSIS 10-------- 11 12 #include <X11/extensions/XInput2.h> 13 14 Bool XIQueryPointer( Display *display, 15 int deviceid, 16 Window win, 17 Window *root_return, 18 Window *child_return, 19 double *root_x_return, 20 double *root_y_return, 21 double *win_x_return, 22 double *win_y_return, 23 XIButtonState *buttons_return, 24 XIModifierState *modifiers_return, 25 XIGroupState *group_return); 26 27 buttons_return 28 Returns the current button state. 29 30 child_return 31 Returns the child window that the pointer is located in, 32 if any. 33 34 deviceid 35 Specifies the device to query. 36 37 display 38 Specifies the connection to the X server. 39 40 group_return 41 Returns the current group state. 42 43 modifiers_return 44 Returns the current state of the modifier keys. 45 46 root_return 47 Returns the root window that the pointer is in. 48 49 root_x_return, root_y_return 50 Return the pointer coordinates relative to the root 51 window's origin. 52 53 win 54 Specifies the window. 55 56 win_x_return, win_y_return 57 Return the pointer coordinates relative to the specified 58 window. 59 60DESCRIPTION 61----------- 62 63 The XIQueryPointer function returns the root window the 64 device's pointer is logically on and the pointer coordinates 65 relative to the root window's origin. If XIQueryPointer returns 66 False, the pointer is not on the same screen as the specified 67 window, and XIQueryPointer returns None to child_return and 68 zero to win_x_return and win_y_return. If XIQueryPointer 69 returns True, the pointer coordinates returned to win_x_return 70 and win_y_return are relative to the origin of the specified 71 window. In this case, XIQueryPointer returns the child that 72 contains the pointer, if any, or else None to child_return. 73 74 XIQueryPointer returns the current logical state of the buttons 75 buttons_return. The keyboard paired with the master pointer is 76 selected to obtain the data for modifiers_return and 77 group_return. 78 79 The mask field in buttons_return is dynamically allocated and 80 must be freed by the caller. 81 82 XIQueryPointer is identical to XQueryPointer but specifies the 83 device explicitly. 84 85 XIQueryPointer can generate a BadDevice and a BadWindow error. 86 87DIAGNOSTICS 88----------- 89 90 BadDevice 91 An invalid device was specified. The device does not 92 exist or is not a pointer device. 93 94 BadWindow 95 A value for a Window argument does not name a defined 96 window. 97 98SEE ALSO 99-------- 100 101 XQueryPointer(libmansuffix) 102 103