jpayne@69
|
1 /*
|
jpayne@69
|
2 * This file generated automatically from xtest.xml by c_client.py.
|
jpayne@69
|
3 * Edit at your peril.
|
jpayne@69
|
4 */
|
jpayne@69
|
5
|
jpayne@69
|
6 /**
|
jpayne@69
|
7 * @defgroup XCB_Test_API XCB Test API
|
jpayne@69
|
8 * @brief Test XCB Protocol Implementation.
|
jpayne@69
|
9 * @{
|
jpayne@69
|
10 **/
|
jpayne@69
|
11
|
jpayne@69
|
12 #ifndef __XTEST_H
|
jpayne@69
|
13 #define __XTEST_H
|
jpayne@69
|
14
|
jpayne@69
|
15 #include "xcb.h"
|
jpayne@69
|
16 #include "xproto.h"
|
jpayne@69
|
17
|
jpayne@69
|
18 #ifdef __cplusplus
|
jpayne@69
|
19 extern "C" {
|
jpayne@69
|
20 #endif
|
jpayne@69
|
21
|
jpayne@69
|
22 #define XCB_TEST_MAJOR_VERSION 2
|
jpayne@69
|
23 #define XCB_TEST_MINOR_VERSION 2
|
jpayne@69
|
24
|
jpayne@69
|
25 extern xcb_extension_t xcb_test_id;
|
jpayne@69
|
26
|
jpayne@69
|
27 /**
|
jpayne@69
|
28 * @brief xcb_test_get_version_cookie_t
|
jpayne@69
|
29 **/
|
jpayne@69
|
30 typedef struct xcb_test_get_version_cookie_t {
|
jpayne@69
|
31 unsigned int sequence;
|
jpayne@69
|
32 } xcb_test_get_version_cookie_t;
|
jpayne@69
|
33
|
jpayne@69
|
34 /** Opcode for xcb_test_get_version. */
|
jpayne@69
|
35 #define XCB_TEST_GET_VERSION 0
|
jpayne@69
|
36
|
jpayne@69
|
37 /**
|
jpayne@69
|
38 * @brief xcb_test_get_version_request_t
|
jpayne@69
|
39 **/
|
jpayne@69
|
40 typedef struct xcb_test_get_version_request_t {
|
jpayne@69
|
41 uint8_t major_opcode;
|
jpayne@69
|
42 uint8_t minor_opcode;
|
jpayne@69
|
43 uint16_t length;
|
jpayne@69
|
44 uint8_t major_version;
|
jpayne@69
|
45 uint8_t pad0;
|
jpayne@69
|
46 uint16_t minor_version;
|
jpayne@69
|
47 } xcb_test_get_version_request_t;
|
jpayne@69
|
48
|
jpayne@69
|
49 /**
|
jpayne@69
|
50 * @brief xcb_test_get_version_reply_t
|
jpayne@69
|
51 **/
|
jpayne@69
|
52 typedef struct xcb_test_get_version_reply_t {
|
jpayne@69
|
53 uint8_t response_type;
|
jpayne@69
|
54 uint8_t major_version;
|
jpayne@69
|
55 uint16_t sequence;
|
jpayne@69
|
56 uint32_t length;
|
jpayne@69
|
57 uint16_t minor_version;
|
jpayne@69
|
58 } xcb_test_get_version_reply_t;
|
jpayne@69
|
59
|
jpayne@69
|
60 typedef enum xcb_test_cursor_t {
|
jpayne@69
|
61 XCB_TEST_CURSOR_NONE = 0,
|
jpayne@69
|
62 XCB_TEST_CURSOR_CURRENT = 1
|
jpayne@69
|
63 } xcb_test_cursor_t;
|
jpayne@69
|
64
|
jpayne@69
|
65 /**
|
jpayne@69
|
66 * @brief xcb_test_compare_cursor_cookie_t
|
jpayne@69
|
67 **/
|
jpayne@69
|
68 typedef struct xcb_test_compare_cursor_cookie_t {
|
jpayne@69
|
69 unsigned int sequence;
|
jpayne@69
|
70 } xcb_test_compare_cursor_cookie_t;
|
jpayne@69
|
71
|
jpayne@69
|
72 /** Opcode for xcb_test_compare_cursor. */
|
jpayne@69
|
73 #define XCB_TEST_COMPARE_CURSOR 1
|
jpayne@69
|
74
|
jpayne@69
|
75 /**
|
jpayne@69
|
76 * @brief xcb_test_compare_cursor_request_t
|
jpayne@69
|
77 **/
|
jpayne@69
|
78 typedef struct xcb_test_compare_cursor_request_t {
|
jpayne@69
|
79 uint8_t major_opcode;
|
jpayne@69
|
80 uint8_t minor_opcode;
|
jpayne@69
|
81 uint16_t length;
|
jpayne@69
|
82 xcb_window_t window;
|
jpayne@69
|
83 xcb_cursor_t cursor;
|
jpayne@69
|
84 } xcb_test_compare_cursor_request_t;
|
jpayne@69
|
85
|
jpayne@69
|
86 /**
|
jpayne@69
|
87 * @brief xcb_test_compare_cursor_reply_t
|
jpayne@69
|
88 **/
|
jpayne@69
|
89 typedef struct xcb_test_compare_cursor_reply_t {
|
jpayne@69
|
90 uint8_t response_type;
|
jpayne@69
|
91 uint8_t same;
|
jpayne@69
|
92 uint16_t sequence;
|
jpayne@69
|
93 uint32_t length;
|
jpayne@69
|
94 } xcb_test_compare_cursor_reply_t;
|
jpayne@69
|
95
|
jpayne@69
|
96 /** Opcode for xcb_test_fake_input. */
|
jpayne@69
|
97 #define XCB_TEST_FAKE_INPUT 2
|
jpayne@69
|
98
|
jpayne@69
|
99 /**
|
jpayne@69
|
100 * @brief xcb_test_fake_input_request_t
|
jpayne@69
|
101 **/
|
jpayne@69
|
102 typedef struct xcb_test_fake_input_request_t {
|
jpayne@69
|
103 uint8_t major_opcode;
|
jpayne@69
|
104 uint8_t minor_opcode;
|
jpayne@69
|
105 uint16_t length;
|
jpayne@69
|
106 uint8_t type;
|
jpayne@69
|
107 uint8_t detail;
|
jpayne@69
|
108 uint8_t pad0[2];
|
jpayne@69
|
109 uint32_t time;
|
jpayne@69
|
110 xcb_window_t root;
|
jpayne@69
|
111 uint8_t pad1[8];
|
jpayne@69
|
112 int16_t rootX;
|
jpayne@69
|
113 int16_t rootY;
|
jpayne@69
|
114 uint8_t pad2[7];
|
jpayne@69
|
115 uint8_t deviceid;
|
jpayne@69
|
116 } xcb_test_fake_input_request_t;
|
jpayne@69
|
117
|
jpayne@69
|
118 /** Opcode for xcb_test_grab_control. */
|
jpayne@69
|
119 #define XCB_TEST_GRAB_CONTROL 3
|
jpayne@69
|
120
|
jpayne@69
|
121 /**
|
jpayne@69
|
122 * @brief xcb_test_grab_control_request_t
|
jpayne@69
|
123 **/
|
jpayne@69
|
124 typedef struct xcb_test_grab_control_request_t {
|
jpayne@69
|
125 uint8_t major_opcode;
|
jpayne@69
|
126 uint8_t minor_opcode;
|
jpayne@69
|
127 uint16_t length;
|
jpayne@69
|
128 uint8_t impervious;
|
jpayne@69
|
129 uint8_t pad0[3];
|
jpayne@69
|
130 } xcb_test_grab_control_request_t;
|
jpayne@69
|
131
|
jpayne@69
|
132 /**
|
jpayne@69
|
133 *
|
jpayne@69
|
134 * @param c The connection
|
jpayne@69
|
135 * @return A cookie
|
jpayne@69
|
136 *
|
jpayne@69
|
137 * Delivers a request to the X server.
|
jpayne@69
|
138 *
|
jpayne@69
|
139 */
|
jpayne@69
|
140 xcb_test_get_version_cookie_t
|
jpayne@69
|
141 xcb_test_get_version (xcb_connection_t *c,
|
jpayne@69
|
142 uint8_t major_version,
|
jpayne@69
|
143 uint16_t minor_version);
|
jpayne@69
|
144
|
jpayne@69
|
145 /**
|
jpayne@69
|
146 *
|
jpayne@69
|
147 * @param c The connection
|
jpayne@69
|
148 * @return A cookie
|
jpayne@69
|
149 *
|
jpayne@69
|
150 * Delivers a request to the X server.
|
jpayne@69
|
151 *
|
jpayne@69
|
152 * This form can be used only if the request will cause
|
jpayne@69
|
153 * a reply to be generated. Any returned error will be
|
jpayne@69
|
154 * placed in the event queue.
|
jpayne@69
|
155 */
|
jpayne@69
|
156 xcb_test_get_version_cookie_t
|
jpayne@69
|
157 xcb_test_get_version_unchecked (xcb_connection_t *c,
|
jpayne@69
|
158 uint8_t major_version,
|
jpayne@69
|
159 uint16_t minor_version);
|
jpayne@69
|
160
|
jpayne@69
|
161 /**
|
jpayne@69
|
162 * Return the reply
|
jpayne@69
|
163 * @param c The connection
|
jpayne@69
|
164 * @param cookie The cookie
|
jpayne@69
|
165 * @param e The xcb_generic_error_t supplied
|
jpayne@69
|
166 *
|
jpayne@69
|
167 * Returns the reply of the request asked by
|
jpayne@69
|
168 *
|
jpayne@69
|
169 * The parameter @p e supplied to this function must be NULL if
|
jpayne@69
|
170 * xcb_test_get_version_unchecked(). is used.
|
jpayne@69
|
171 * Otherwise, it stores the error if any.
|
jpayne@69
|
172 *
|
jpayne@69
|
173 * The returned value must be freed by the caller using free().
|
jpayne@69
|
174 */
|
jpayne@69
|
175 xcb_test_get_version_reply_t *
|
jpayne@69
|
176 xcb_test_get_version_reply (xcb_connection_t *c,
|
jpayne@69
|
177 xcb_test_get_version_cookie_t cookie /**< */,
|
jpayne@69
|
178 xcb_generic_error_t **e);
|
jpayne@69
|
179
|
jpayne@69
|
180 /**
|
jpayne@69
|
181 *
|
jpayne@69
|
182 * @param c The connection
|
jpayne@69
|
183 * @return A cookie
|
jpayne@69
|
184 *
|
jpayne@69
|
185 * Delivers a request to the X server.
|
jpayne@69
|
186 *
|
jpayne@69
|
187 */
|
jpayne@69
|
188 xcb_test_compare_cursor_cookie_t
|
jpayne@69
|
189 xcb_test_compare_cursor (xcb_connection_t *c,
|
jpayne@69
|
190 xcb_window_t window,
|
jpayne@69
|
191 xcb_cursor_t cursor);
|
jpayne@69
|
192
|
jpayne@69
|
193 /**
|
jpayne@69
|
194 *
|
jpayne@69
|
195 * @param c The connection
|
jpayne@69
|
196 * @return A cookie
|
jpayne@69
|
197 *
|
jpayne@69
|
198 * Delivers a request to the X server.
|
jpayne@69
|
199 *
|
jpayne@69
|
200 * This form can be used only if the request will cause
|
jpayne@69
|
201 * a reply to be generated. Any returned error will be
|
jpayne@69
|
202 * placed in the event queue.
|
jpayne@69
|
203 */
|
jpayne@69
|
204 xcb_test_compare_cursor_cookie_t
|
jpayne@69
|
205 xcb_test_compare_cursor_unchecked (xcb_connection_t *c,
|
jpayne@69
|
206 xcb_window_t window,
|
jpayne@69
|
207 xcb_cursor_t cursor);
|
jpayne@69
|
208
|
jpayne@69
|
209 /**
|
jpayne@69
|
210 * Return the reply
|
jpayne@69
|
211 * @param c The connection
|
jpayne@69
|
212 * @param cookie The cookie
|
jpayne@69
|
213 * @param e The xcb_generic_error_t supplied
|
jpayne@69
|
214 *
|
jpayne@69
|
215 * Returns the reply of the request asked by
|
jpayne@69
|
216 *
|
jpayne@69
|
217 * The parameter @p e supplied to this function must be NULL if
|
jpayne@69
|
218 * xcb_test_compare_cursor_unchecked(). is used.
|
jpayne@69
|
219 * Otherwise, it stores the error if any.
|
jpayne@69
|
220 *
|
jpayne@69
|
221 * The returned value must be freed by the caller using free().
|
jpayne@69
|
222 */
|
jpayne@69
|
223 xcb_test_compare_cursor_reply_t *
|
jpayne@69
|
224 xcb_test_compare_cursor_reply (xcb_connection_t *c,
|
jpayne@69
|
225 xcb_test_compare_cursor_cookie_t cookie /**< */,
|
jpayne@69
|
226 xcb_generic_error_t **e);
|
jpayne@69
|
227
|
jpayne@69
|
228 /**
|
jpayne@69
|
229 *
|
jpayne@69
|
230 * @param c The connection
|
jpayne@69
|
231 * @return A cookie
|
jpayne@69
|
232 *
|
jpayne@69
|
233 * Delivers a request to the X server.
|
jpayne@69
|
234 *
|
jpayne@69
|
235 * This form can be used only if the request will not cause
|
jpayne@69
|
236 * a reply to be generated. Any returned error will be
|
jpayne@69
|
237 * saved for handling by xcb_request_check().
|
jpayne@69
|
238 */
|
jpayne@69
|
239 xcb_void_cookie_t
|
jpayne@69
|
240 xcb_test_fake_input_checked (xcb_connection_t *c,
|
jpayne@69
|
241 uint8_t type,
|
jpayne@69
|
242 uint8_t detail,
|
jpayne@69
|
243 uint32_t time,
|
jpayne@69
|
244 xcb_window_t root,
|
jpayne@69
|
245 int16_t rootX,
|
jpayne@69
|
246 int16_t rootY,
|
jpayne@69
|
247 uint8_t deviceid);
|
jpayne@69
|
248
|
jpayne@69
|
249 /**
|
jpayne@69
|
250 *
|
jpayne@69
|
251 * @param c The connection
|
jpayne@69
|
252 * @return A cookie
|
jpayne@69
|
253 *
|
jpayne@69
|
254 * Delivers a request to the X server.
|
jpayne@69
|
255 *
|
jpayne@69
|
256 */
|
jpayne@69
|
257 xcb_void_cookie_t
|
jpayne@69
|
258 xcb_test_fake_input (xcb_connection_t *c,
|
jpayne@69
|
259 uint8_t type,
|
jpayne@69
|
260 uint8_t detail,
|
jpayne@69
|
261 uint32_t time,
|
jpayne@69
|
262 xcb_window_t root,
|
jpayne@69
|
263 int16_t rootX,
|
jpayne@69
|
264 int16_t rootY,
|
jpayne@69
|
265 uint8_t deviceid);
|
jpayne@69
|
266
|
jpayne@69
|
267 /**
|
jpayne@69
|
268 *
|
jpayne@69
|
269 * @param c The connection
|
jpayne@69
|
270 * @return A cookie
|
jpayne@69
|
271 *
|
jpayne@69
|
272 * Delivers a request to the X server.
|
jpayne@69
|
273 *
|
jpayne@69
|
274 * This form can be used only if the request will not cause
|
jpayne@69
|
275 * a reply to be generated. Any returned error will be
|
jpayne@69
|
276 * saved for handling by xcb_request_check().
|
jpayne@69
|
277 */
|
jpayne@69
|
278 xcb_void_cookie_t
|
jpayne@69
|
279 xcb_test_grab_control_checked (xcb_connection_t *c,
|
jpayne@69
|
280 uint8_t impervious);
|
jpayne@69
|
281
|
jpayne@69
|
282 /**
|
jpayne@69
|
283 *
|
jpayne@69
|
284 * @param c The connection
|
jpayne@69
|
285 * @return A cookie
|
jpayne@69
|
286 *
|
jpayne@69
|
287 * Delivers a request to the X server.
|
jpayne@69
|
288 *
|
jpayne@69
|
289 */
|
jpayne@69
|
290 xcb_void_cookie_t
|
jpayne@69
|
291 xcb_test_grab_control (xcb_connection_t *c,
|
jpayne@69
|
292 uint8_t impervious);
|
jpayne@69
|
293
|
jpayne@69
|
294
|
jpayne@69
|
295 #ifdef __cplusplus
|
jpayne@69
|
296 }
|
jpayne@69
|
297 #endif
|
jpayne@69
|
298
|
jpayne@69
|
299 #endif
|
jpayne@69
|
300
|
jpayne@69
|
301 /**
|
jpayne@69
|
302 * @}
|
jpayne@69
|
303 */
|