2 * This file generated automatically from present.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
22 xcb_extension_t xcb_present_id
= { "Present", 0 };
25 xcb_present_notify_next (xcb_present_notify_iterator_t
*i
/**< */)
29 i
->index
+= sizeof(xcb_present_notify_t
);
32 xcb_generic_iterator_t
33 xcb_present_notify_end (xcb_present_notify_iterator_t i
/**< */)
35 xcb_generic_iterator_t ret
;
36 ret
.data
= i
.data
+ i
.rem
;
37 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
42 xcb_present_query_version_cookie_t
43 xcb_present_query_version (xcb_connection_t
*c
/**< */,
44 uint32_t major_version
/**< */,
45 uint32_t minor_version
/**< */)
47 static const xcb_protocol_request_t xcb_req
= {
49 /* ext */ &xcb_present_id
,
50 /* opcode */ XCB_PRESENT_QUERY_VERSION
,
54 struct iovec xcb_parts
[4];
55 xcb_present_query_version_cookie_t xcb_ret
;
56 xcb_present_query_version_request_t xcb_out
;
58 xcb_out
.major_version
= major_version
;
59 xcb_out
.minor_version
= minor_version
;
61 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
62 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
63 xcb_parts
[3].iov_base
= 0;
64 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
66 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
70 xcb_present_query_version_cookie_t
71 xcb_present_query_version_unchecked (xcb_connection_t
*c
/**< */,
72 uint32_t major_version
/**< */,
73 uint32_t minor_version
/**< */)
75 static const xcb_protocol_request_t xcb_req
= {
77 /* ext */ &xcb_present_id
,
78 /* opcode */ XCB_PRESENT_QUERY_VERSION
,
82 struct iovec xcb_parts
[4];
83 xcb_present_query_version_cookie_t xcb_ret
;
84 xcb_present_query_version_request_t xcb_out
;
86 xcb_out
.major_version
= major_version
;
87 xcb_out
.minor_version
= minor_version
;
89 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
90 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
91 xcb_parts
[3].iov_base
= 0;
92 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
94 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
98 xcb_present_query_version_reply_t
*
99 xcb_present_query_version_reply (xcb_connection_t
*c
/**< */,
100 xcb_present_query_version_cookie_t cookie
/**< */,
101 xcb_generic_error_t
**e
/**< */)
103 return (xcb_present_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
107 xcb_present_pixmap_sizeof (const void *_buffer
/**< */,
108 uint32_t notifies_len
/**< */)
110 char *xcb_tmp
= (char *)_buffer
;
111 unsigned int xcb_buffer_len
= 0;
112 unsigned int xcb_block_len
= 0;
113 unsigned int xcb_pad
= 0;
114 unsigned int xcb_align_to
= 0;
117 xcb_block_len
+= sizeof(xcb_present_pixmap_request_t
);
118 xcb_tmp
+= xcb_block_len
;
119 xcb_buffer_len
+= xcb_block_len
;
122 xcb_block_len
+= notifies_len
* sizeof(xcb_present_notify_t
);
123 xcb_tmp
+= xcb_block_len
;
124 xcb_align_to
= ALIGNOF(xcb_present_notify_t
);
126 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
127 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
134 return xcb_buffer_len
;
138 xcb_present_pixmap_checked (xcb_connection_t
*c
/**< */,
139 xcb_window_t window
/**< */,
140 xcb_pixmap_t pixmap
/**< */,
141 uint32_t serial
/**< */,
142 xcb_xfixes_region_t valid
/**< */,
143 xcb_xfixes_region_t update
/**< */,
144 int16_t x_off
/**< */,
145 int16_t y_off
/**< */,
146 xcb_randr_crtc_t target_crtc
/**< */,
147 xcb_sync_fence_t wait_fence
/**< */,
148 xcb_sync_fence_t idle_fence
/**< */,
149 uint32_t options
/**< */,
150 uint64_t target_msc
/**< */,
151 uint64_t divisor
/**< */,
152 uint64_t remainder
/**< */,
153 uint32_t notifies_len
/**< */,
154 const xcb_present_notify_t
*notifies
/**< */)
156 static const xcb_protocol_request_t xcb_req
= {
158 /* ext */ &xcb_present_id
,
159 /* opcode */ XCB_PRESENT_PIXMAP
,
163 struct iovec xcb_parts
[6];
164 xcb_void_cookie_t xcb_ret
;
165 xcb_present_pixmap_request_t xcb_out
;
167 xcb_out
.window
= window
;
168 xcb_out
.pixmap
= pixmap
;
169 xcb_out
.serial
= serial
;
170 xcb_out
.valid
= valid
;
171 xcb_out
.update
= update
;
172 xcb_out
.x_off
= x_off
;
173 xcb_out
.y_off
= y_off
;
174 xcb_out
.target_crtc
= target_crtc
;
175 xcb_out
.wait_fence
= wait_fence
;
176 xcb_out
.idle_fence
= idle_fence
;
177 xcb_out
.options
= options
;
178 memset(xcb_out
.pad0
, 0, 4);
179 xcb_out
.target_msc
= target_msc
;
180 xcb_out
.divisor
= divisor
;
181 xcb_out
.remainder
= remainder
;
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;
187 /* xcb_present_notify_t notifies */
188 xcb_parts
[4].iov_base
= (char *) notifies
;
189 xcb_parts
[4].iov_len
= notifies_len
* sizeof(xcb_present_notify_t
);
190 xcb_parts
[5].iov_base
= 0;
191 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
193 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
198 xcb_present_pixmap (xcb_connection_t
*c
/**< */,
199 xcb_window_t window
/**< */,
200 xcb_pixmap_t pixmap
/**< */,
201 uint32_t serial
/**< */,
202 xcb_xfixes_region_t valid
/**< */,
203 xcb_xfixes_region_t update
/**< */,
204 int16_t x_off
/**< */,
205 int16_t y_off
/**< */,
206 xcb_randr_crtc_t target_crtc
/**< */,
207 xcb_sync_fence_t wait_fence
/**< */,
208 xcb_sync_fence_t idle_fence
/**< */,
209 uint32_t options
/**< */,
210 uint64_t target_msc
/**< */,
211 uint64_t divisor
/**< */,
212 uint64_t remainder
/**< */,
213 uint32_t notifies_len
/**< */,
214 const xcb_present_notify_t
*notifies
/**< */)
216 static const xcb_protocol_request_t xcb_req
= {
218 /* ext */ &xcb_present_id
,
219 /* opcode */ XCB_PRESENT_PIXMAP
,
223 struct iovec xcb_parts
[6];
224 xcb_void_cookie_t xcb_ret
;
225 xcb_present_pixmap_request_t xcb_out
;
227 xcb_out
.window
= window
;
228 xcb_out
.pixmap
= pixmap
;
229 xcb_out
.serial
= serial
;
230 xcb_out
.valid
= valid
;
231 xcb_out
.update
= update
;
232 xcb_out
.x_off
= x_off
;
233 xcb_out
.y_off
= y_off
;
234 xcb_out
.target_crtc
= target_crtc
;
235 xcb_out
.wait_fence
= wait_fence
;
236 xcb_out
.idle_fence
= idle_fence
;
237 xcb_out
.options
= options
;
238 memset(xcb_out
.pad0
, 0, 4);
239 xcb_out
.target_msc
= target_msc
;
240 xcb_out
.divisor
= divisor
;
241 xcb_out
.remainder
= remainder
;
243 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
244 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
245 xcb_parts
[3].iov_base
= 0;
246 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
247 /* xcb_present_notify_t notifies */
248 xcb_parts
[4].iov_base
= (char *) notifies
;
249 xcb_parts
[4].iov_len
= notifies_len
* sizeof(xcb_present_notify_t
);
250 xcb_parts
[5].iov_base
= 0;
251 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
253 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
258 xcb_present_notify_msc_checked (xcb_connection_t
*c
/**< */,
259 xcb_window_t window
/**< */,
260 uint32_t serial
/**< */,
261 uint64_t target_msc
/**< */,
262 uint64_t divisor
/**< */,
263 uint64_t remainder
/**< */)
265 static const xcb_protocol_request_t xcb_req
= {
267 /* ext */ &xcb_present_id
,
268 /* opcode */ XCB_PRESENT_NOTIFY_MSC
,
272 struct iovec xcb_parts
[4];
273 xcb_void_cookie_t xcb_ret
;
274 xcb_present_notify_msc_request_t xcb_out
;
276 xcb_out
.window
= window
;
277 xcb_out
.serial
= serial
;
278 memset(xcb_out
.pad0
, 0, 4);
279 xcb_out
.target_msc
= target_msc
;
280 xcb_out
.divisor
= divisor
;
281 xcb_out
.remainder
= remainder
;
283 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
284 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
285 xcb_parts
[3].iov_base
= 0;
286 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
288 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
293 xcb_present_notify_msc (xcb_connection_t
*c
/**< */,
294 xcb_window_t window
/**< */,
295 uint32_t serial
/**< */,
296 uint64_t target_msc
/**< */,
297 uint64_t divisor
/**< */,
298 uint64_t remainder
/**< */)
300 static const xcb_protocol_request_t xcb_req
= {
302 /* ext */ &xcb_present_id
,
303 /* opcode */ XCB_PRESENT_NOTIFY_MSC
,
307 struct iovec xcb_parts
[4];
308 xcb_void_cookie_t xcb_ret
;
309 xcb_present_notify_msc_request_t xcb_out
;
311 xcb_out
.window
= window
;
312 xcb_out
.serial
= serial
;
313 memset(xcb_out
.pad0
, 0, 4);
314 xcb_out
.target_msc
= target_msc
;
315 xcb_out
.divisor
= divisor
;
316 xcb_out
.remainder
= remainder
;
318 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
319 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
320 xcb_parts
[3].iov_base
= 0;
321 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
323 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
328 xcb_present_event_next (xcb_present_event_iterator_t
*i
/**< */)
332 i
->index
+= sizeof(xcb_present_event_t
);
335 xcb_generic_iterator_t
336 xcb_present_event_end (xcb_present_event_iterator_t i
/**< */)
338 xcb_generic_iterator_t ret
;
339 ret
.data
= i
.data
+ i
.rem
;
340 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
346 xcb_present_select_input_checked (xcb_connection_t
*c
/**< */,
347 xcb_present_event_t eid
/**< */,
348 xcb_window_t window
/**< */,
349 uint32_t event_mask
/**< */)
351 static const xcb_protocol_request_t xcb_req
= {
353 /* ext */ &xcb_present_id
,
354 /* opcode */ XCB_PRESENT_SELECT_INPUT
,
358 struct iovec xcb_parts
[4];
359 xcb_void_cookie_t xcb_ret
;
360 xcb_present_select_input_request_t xcb_out
;
363 xcb_out
.window
= window
;
364 xcb_out
.event_mask
= event_mask
;
366 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
367 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
368 xcb_parts
[3].iov_base
= 0;
369 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
371 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
376 xcb_present_select_input (xcb_connection_t
*c
/**< */,
377 xcb_present_event_t eid
/**< */,
378 xcb_window_t window
/**< */,
379 uint32_t event_mask
/**< */)
381 static const xcb_protocol_request_t xcb_req
= {
383 /* ext */ &xcb_present_id
,
384 /* opcode */ XCB_PRESENT_SELECT_INPUT
,
388 struct iovec xcb_parts
[4];
389 xcb_void_cookie_t xcb_ret
;
390 xcb_present_select_input_request_t xcb_out
;
393 xcb_out
.window
= window
;
394 xcb_out
.event_mask
= event_mask
;
396 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
397 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
398 xcb_parts
[3].iov_base
= 0;
399 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
401 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
405 xcb_present_query_capabilities_cookie_t
406 xcb_present_query_capabilities (xcb_connection_t
*c
/**< */,
407 uint32_t target
/**< */)
409 static const xcb_protocol_request_t xcb_req
= {
411 /* ext */ &xcb_present_id
,
412 /* opcode */ XCB_PRESENT_QUERY_CAPABILITIES
,
416 struct iovec xcb_parts
[4];
417 xcb_present_query_capabilities_cookie_t xcb_ret
;
418 xcb_present_query_capabilities_request_t xcb_out
;
420 xcb_out
.target
= target
;
422 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
423 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
424 xcb_parts
[3].iov_base
= 0;
425 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
427 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
431 xcb_present_query_capabilities_cookie_t
432 xcb_present_query_capabilities_unchecked (xcb_connection_t
*c
/**< */,
433 uint32_t target
/**< */)
435 static const xcb_protocol_request_t xcb_req
= {
437 /* ext */ &xcb_present_id
,
438 /* opcode */ XCB_PRESENT_QUERY_CAPABILITIES
,
442 struct iovec xcb_parts
[4];
443 xcb_present_query_capabilities_cookie_t xcb_ret
;
444 xcb_present_query_capabilities_request_t xcb_out
;
446 xcb_out
.target
= target
;
448 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
449 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
450 xcb_parts
[3].iov_base
= 0;
451 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
453 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
457 xcb_present_query_capabilities_reply_t
*
458 xcb_present_query_capabilities_reply (xcb_connection_t
*c
/**< */,
459 xcb_present_query_capabilities_cookie_t cookie
/**< */,
460 xcb_generic_error_t
**e
/**< */)
462 return (xcb_present_query_capabilities_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
466 xcb_present_redirect_notify_sizeof (const void *_buffer
/**< */,
467 uint32_t notifies_len
/**< */)
469 char *xcb_tmp
= (char *)_buffer
;
470 unsigned int xcb_buffer_len
= 0;
471 unsigned int xcb_block_len
= 0;
472 unsigned int xcb_pad
= 0;
473 unsigned int xcb_align_to
= 0;
476 xcb_block_len
+= sizeof(xcb_present_redirect_notify_event_t
);
477 xcb_tmp
+= xcb_block_len
;
478 xcb_buffer_len
+= xcb_block_len
;
481 xcb_block_len
+= notifies_len
* sizeof(xcb_present_notify_t
);
482 xcb_tmp
+= xcb_block_len
;
483 xcb_align_to
= ALIGNOF(xcb_present_notify_t
);
485 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
486 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
493 return xcb_buffer_len
;