2 * This file generated automatically from xtest.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_extension_t xcb_test_id
= { "XTEST", 0 };
21 xcb_test_get_version_cookie_t
22 xcb_test_get_version (xcb_connection_t
*c
/**< */,
23 uint8_t major_version
/**< */,
24 uint16_t minor_version
/**< */)
26 static const xcb_protocol_request_t xcb_req
= {
28 /* ext */ &xcb_test_id
,
29 /* opcode */ XCB_TEST_GET_VERSION
,
33 struct iovec xcb_parts
[4];
34 xcb_test_get_version_cookie_t xcb_ret
;
35 xcb_test_get_version_request_t xcb_out
;
37 xcb_out
.major_version
= major_version
;
39 xcb_out
.minor_version
= minor_version
;
41 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
42 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
43 xcb_parts
[3].iov_base
= 0;
44 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
46 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
50 xcb_test_get_version_cookie_t
51 xcb_test_get_version_unchecked (xcb_connection_t
*c
/**< */,
52 uint8_t major_version
/**< */,
53 uint16_t minor_version
/**< */)
55 static const xcb_protocol_request_t xcb_req
= {
57 /* ext */ &xcb_test_id
,
58 /* opcode */ XCB_TEST_GET_VERSION
,
62 struct iovec xcb_parts
[4];
63 xcb_test_get_version_cookie_t xcb_ret
;
64 xcb_test_get_version_request_t xcb_out
;
66 xcb_out
.major_version
= major_version
;
68 xcb_out
.minor_version
= minor_version
;
70 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
71 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
72 xcb_parts
[3].iov_base
= 0;
73 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
75 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
79 xcb_test_get_version_reply_t
*
80 xcb_test_get_version_reply (xcb_connection_t
*c
/**< */,
81 xcb_test_get_version_cookie_t cookie
/**< */,
82 xcb_generic_error_t
**e
/**< */)
84 return (xcb_test_get_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
87 xcb_test_compare_cursor_cookie_t
88 xcb_test_compare_cursor (xcb_connection_t
*c
/**< */,
89 xcb_window_t window
/**< */,
90 xcb_cursor_t cursor
/**< */)
92 static const xcb_protocol_request_t xcb_req
= {
94 /* ext */ &xcb_test_id
,
95 /* opcode */ XCB_TEST_COMPARE_CURSOR
,
99 struct iovec xcb_parts
[4];
100 xcb_test_compare_cursor_cookie_t xcb_ret
;
101 xcb_test_compare_cursor_request_t xcb_out
;
103 xcb_out
.window
= window
;
104 xcb_out
.cursor
= cursor
;
106 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
107 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
108 xcb_parts
[3].iov_base
= 0;
109 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
111 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
115 xcb_test_compare_cursor_cookie_t
116 xcb_test_compare_cursor_unchecked (xcb_connection_t
*c
/**< */,
117 xcb_window_t window
/**< */,
118 xcb_cursor_t cursor
/**< */)
120 static const xcb_protocol_request_t xcb_req
= {
122 /* ext */ &xcb_test_id
,
123 /* opcode */ XCB_TEST_COMPARE_CURSOR
,
127 struct iovec xcb_parts
[4];
128 xcb_test_compare_cursor_cookie_t xcb_ret
;
129 xcb_test_compare_cursor_request_t xcb_out
;
131 xcb_out
.window
= window
;
132 xcb_out
.cursor
= cursor
;
134 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
135 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
136 xcb_parts
[3].iov_base
= 0;
137 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
139 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
143 xcb_test_compare_cursor_reply_t
*
144 xcb_test_compare_cursor_reply (xcb_connection_t
*c
/**< */,
145 xcb_test_compare_cursor_cookie_t cookie
/**< */,
146 xcb_generic_error_t
**e
/**< */)
148 return (xcb_test_compare_cursor_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
152 xcb_test_fake_input_checked (xcb_connection_t
*c
/**< */,
153 uint8_t type
/**< */,
154 uint8_t detail
/**< */,
155 uint32_t time
/**< */,
156 xcb_window_t root
/**< */,
157 int16_t rootX
/**< */,
158 int16_t rootY
/**< */,
159 uint8_t deviceid
/**< */)
161 static const xcb_protocol_request_t xcb_req
= {
163 /* ext */ &xcb_test_id
,
164 /* opcode */ XCB_TEST_FAKE_INPUT
,
168 struct iovec xcb_parts
[4];
169 xcb_void_cookie_t xcb_ret
;
170 xcb_test_fake_input_request_t xcb_out
;
173 xcb_out
.detail
= detail
;
174 memset(xcb_out
.pad0
, 0, 2);
177 memset(xcb_out
.pad1
, 0, 8);
178 xcb_out
.rootX
= rootX
;
179 xcb_out
.rootY
= rootY
;
180 memset(xcb_out
.pad2
, 0, 7);
181 xcb_out
.deviceid
= deviceid
;
183 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
184 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
185 xcb_parts
[3].iov_base
= 0;
186 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
188 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
193 xcb_test_fake_input (xcb_connection_t
*c
/**< */,
194 uint8_t type
/**< */,
195 uint8_t detail
/**< */,
196 uint32_t time
/**< */,
197 xcb_window_t root
/**< */,
198 int16_t rootX
/**< */,
199 int16_t rootY
/**< */,
200 uint8_t deviceid
/**< */)
202 static const xcb_protocol_request_t xcb_req
= {
204 /* ext */ &xcb_test_id
,
205 /* opcode */ XCB_TEST_FAKE_INPUT
,
209 struct iovec xcb_parts
[4];
210 xcb_void_cookie_t xcb_ret
;
211 xcb_test_fake_input_request_t xcb_out
;
214 xcb_out
.detail
= detail
;
215 memset(xcb_out
.pad0
, 0, 2);
218 memset(xcb_out
.pad1
, 0, 8);
219 xcb_out
.rootX
= rootX
;
220 xcb_out
.rootY
= rootY
;
221 memset(xcb_out
.pad2
, 0, 7);
222 xcb_out
.deviceid
= deviceid
;
224 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
225 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
226 xcb_parts
[3].iov_base
= 0;
227 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
229 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
234 xcb_test_grab_control_checked (xcb_connection_t
*c
/**< */,
235 uint8_t impervious
/**< */)
237 static const xcb_protocol_request_t xcb_req
= {
239 /* ext */ &xcb_test_id
,
240 /* opcode */ XCB_TEST_GRAB_CONTROL
,
244 struct iovec xcb_parts
[4];
245 xcb_void_cookie_t xcb_ret
;
246 xcb_test_grab_control_request_t xcb_out
;
248 xcb_out
.impervious
= impervious
;
249 memset(xcb_out
.pad0
, 0, 3);
251 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
252 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
253 xcb_parts
[3].iov_base
= 0;
254 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
256 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
261 xcb_test_grab_control (xcb_connection_t
*c
/**< */,
262 uint8_t impervious
/**< */)
264 static const xcb_protocol_request_t xcb_req
= {
266 /* ext */ &xcb_test_id
,
267 /* opcode */ XCB_TEST_GRAB_CONTROL
,
271 struct iovec xcb_parts
[4];
272 xcb_void_cookie_t xcb_ret
;
273 xcb_test_grab_control_request_t xcb_out
;
275 xcb_out
.impervious
= impervious
;
276 memset(xcb_out
.pad0
, 0, 3);
278 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
279 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
280 xcb_parts
[3].iov_base
= 0;
281 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
283 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);