859cdb55e36340545be904443d3c2bcd30ff68c4
[platform/upstream/libXi.git] / man / XIQueryPointer.man
1 '\" t
2 .\"     Title: xiquerypointer
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 09/23/2011
6 .\"    Manual: [FIXME: manual]
7 .\"    Source: [FIXME: source]
8 .\"  Language: English
9 .\"
10 .TH "XIQUERYPOINTER" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 XIQueryPointer \- get device pointer coordinates\&.
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <X11/extensions/XInput2\&.h>
36 .fi
37 .sp
38 .nf
39 Bool XIQueryPointer( Display *display,
40                      int deviceid,
41                      Window win,
42                      Window *root_return,
43                      Window *child_return,
44                      double *root_x_return,
45                      double *root_y_return,
46                      double *win_x_return,
47                      double *win_y_return,
48                      XIButtonState *buttons_return,
49                      XIModifierState *modifiers_return,
50                      XIGroupState *group_return);
51 .fi
52 .sp
53 .nf
54 buttons_return
55        Returns the current button state\&.
56 .fi
57 .sp
58 .nf
59 child_return
60        Returns the child window that the pointer is located in,
61        if any\&.
62 .fi
63 .sp
64 .nf
65 deviceid
66        Specifies the device to query\&.
67 .fi
68 .sp
69 .nf
70 display
71        Specifies the connection to the X server\&.
72 .fi
73 .sp
74 .nf
75 group_return
76        Returns the current group state\&.
77 .fi
78 .sp
79 .nf
80 modifiers_return
81        Returns the current state of the modifier keys\&.
82 .fi
83 .sp
84 .nf
85 root_return
86        Returns the root window that the pointer is in\&.
87 .fi
88 .sp
89 .nf
90 root_x_return, root_y_return
91        Return the pointer coordinates relative to the root
92        window\*(Aqs origin\&.
93 .fi
94 .sp
95 .nf
96 win
97        Specifies the window\&.
98 .fi
99 .sp
100 .nf
101 win_x_return, win_y_return
102        Return the pointer coordinates relative to the specified
103        window\&.
104 .fi
105 .SH "DESCRIPTION"
106 .sp
107 .if n \{\
108 .RS 4
109 .\}
110 .nf
111 The XIQueryPointer function returns the root window the
112 device\*(Aqs pointer is logically on and the pointer coordinates
113 relative to the root window\*(Aqs origin\&. If XIQueryPointer returns
114 False, the pointer is not on the same screen as the specified
115 window, and XIQueryPointer returns None to child_return and
116 zero to win_x_return and win_y_return\&. If XIQueryPointer
117 returns True, the pointer coordinates returned to win_x_return
118 and win_y_return are relative to the origin of the specified
119 window\&. In this case, XIQueryPointer returns the child that
120 contains the pointer, if any, or else None to child_return\&.
121 .fi
122 .if n \{\
123 .RE
124 .\}
125 .sp
126 .if n \{\
127 .RS 4
128 .\}
129 .nf
130 XIQueryPointer returns the current logical state of the buttons
131 buttons_return\&. The keyboard paired with the master pointer is
132 selected to obtain the data for modifiers_return and
133 group_return\&.
134 .fi
135 .if n \{\
136 .RE
137 .\}
138 .sp
139 .if n \{\
140 .RS 4
141 .\}
142 .nf
143 The mask field in buttons_return is dynamically allocated and
144 must be freed by the caller\&.
145 .fi
146 .if n \{\
147 .RE
148 .\}
149 .sp
150 .if n \{\
151 .RS 4
152 .\}
153 .nf
154 XIQueryPointer is identical to XQueryPointer but specifies the
155 device explicitly\&.
156 .fi
157 .if n \{\
158 .RE
159 .\}
160 .sp
161 .if n \{\
162 .RS 4
163 .\}
164 .nf
165 XIQueryPointer can generate a BadDevice and a BadWindow error\&.
166 .fi
167 .if n \{\
168 .RE
169 .\}
170 .SH "DIAGNOSTICS"
171 .sp
172 .if n \{\
173 .RS 4
174 .\}
175 .nf
176 BadDevice
177        An invalid device was specified\&. The device does not
178        exist or is not a pointer device\&.
179 .fi
180 .if n \{\
181 .RE
182 .\}
183 .sp
184 .if n \{\
185 .RS 4
186 .\}
187 .nf
188 BadWindow
189        A value for a Window argument does not name a defined
190        window\&.
191 .fi
192 .if n \{\
193 .RE
194 .\}
195 .SH "SEE ALSO"
196 .sp
197 .if n \{\
198 .RS 4
199 .\}
200 .nf
201 XQueryPointer(libmansuffix)
202 .fi
203 .if n \{\
204 .RE
205 .\}