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