2 * This file generated automatically from dri2.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_dri2_id
= { "DRI2", 0 };
22 xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t
*i
/**< */)
26 i
->index
+= sizeof(xcb_dri2_dri2_buffer_t
);
29 xcb_generic_iterator_t
30 xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i
/**< */)
32 xcb_generic_iterator_t ret
;
33 ret
.data
= i
.data
+ i
.rem
;
34 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
40 xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t
*i
/**< */)
44 i
->index
+= sizeof(xcb_dri2_attach_format_t
);
47 xcb_generic_iterator_t
48 xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i
/**< */)
50 xcb_generic_iterator_t ret
;
51 ret
.data
= i
.data
+ i
.rem
;
52 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
57 xcb_dri2_query_version_cookie_t
58 xcb_dri2_query_version (xcb_connection_t
*c
/**< */,
59 uint32_t major_version
/**< */,
60 uint32_t minor_version
/**< */)
62 static const xcb_protocol_request_t xcb_req
= {
64 /* ext */ &xcb_dri2_id
,
65 /* opcode */ XCB_DRI2_QUERY_VERSION
,
69 struct iovec xcb_parts
[4];
70 xcb_dri2_query_version_cookie_t xcb_ret
;
71 xcb_dri2_query_version_request_t xcb_out
;
73 xcb_out
.major_version
= major_version
;
74 xcb_out
.minor_version
= minor_version
;
76 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
77 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
78 xcb_parts
[3].iov_base
= 0;
79 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
81 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
85 xcb_dri2_query_version_cookie_t
86 xcb_dri2_query_version_unchecked (xcb_connection_t
*c
/**< */,
87 uint32_t major_version
/**< */,
88 uint32_t minor_version
/**< */)
90 static const xcb_protocol_request_t xcb_req
= {
92 /* ext */ &xcb_dri2_id
,
93 /* opcode */ XCB_DRI2_QUERY_VERSION
,
97 struct iovec xcb_parts
[4];
98 xcb_dri2_query_version_cookie_t xcb_ret
;
99 xcb_dri2_query_version_request_t xcb_out
;
101 xcb_out
.major_version
= major_version
;
102 xcb_out
.minor_version
= minor_version
;
104 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
105 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
106 xcb_parts
[3].iov_base
= 0;
107 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
109 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
113 xcb_dri2_query_version_reply_t
*
114 xcb_dri2_query_version_reply (xcb_connection_t
*c
/**< */,
115 xcb_dri2_query_version_cookie_t cookie
/**< */,
116 xcb_generic_error_t
**e
/**< */)
118 return (xcb_dri2_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
122 xcb_dri2_connect_sizeof (const void *_buffer
/**< */)
124 char *xcb_tmp
= (char *)_buffer
;
125 const xcb_dri2_connect_reply_t
*_aux
= (xcb_dri2_connect_reply_t
*)_buffer
;
126 unsigned int xcb_buffer_len
= 0;
127 unsigned int xcb_block_len
= 0;
128 unsigned int xcb_pad
= 0;
129 unsigned int xcb_align_to
= 0;
132 xcb_block_len
+= sizeof(xcb_dri2_connect_reply_t
);
133 xcb_tmp
+= xcb_block_len
;
134 xcb_buffer_len
+= xcb_block_len
;
137 xcb_block_len
+= _aux
->driver_name_length
* sizeof(char);
138 xcb_tmp
+= xcb_block_len
;
139 xcb_align_to
= ALIGNOF(char);
141 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
142 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
149 xcb_block_len
+= (((_aux
->driver_name_length
+ 3) & (~3)) - _aux
->driver_name_length
) * sizeof(char);
150 xcb_tmp
+= xcb_block_len
;
151 xcb_align_to
= ALIGNOF(char);
153 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
154 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
161 xcb_block_len
+= _aux
->device_name_length
* sizeof(char);
162 xcb_tmp
+= xcb_block_len
;
163 xcb_align_to
= ALIGNOF(char);
165 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
166 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
173 return xcb_buffer_len
;
176 xcb_dri2_connect_cookie_t
177 xcb_dri2_connect (xcb_connection_t
*c
/**< */,
178 xcb_window_t window
/**< */,
179 uint32_t driver_type
/**< */)
181 static const xcb_protocol_request_t xcb_req
= {
183 /* ext */ &xcb_dri2_id
,
184 /* opcode */ XCB_DRI2_CONNECT
,
188 struct iovec xcb_parts
[4];
189 xcb_dri2_connect_cookie_t xcb_ret
;
190 xcb_dri2_connect_request_t xcb_out
;
192 xcb_out
.window
= window
;
193 xcb_out
.driver_type
= driver_type
;
195 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
196 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
197 xcb_parts
[3].iov_base
= 0;
198 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
200 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
204 xcb_dri2_connect_cookie_t
205 xcb_dri2_connect_unchecked (xcb_connection_t
*c
/**< */,
206 xcb_window_t window
/**< */,
207 uint32_t driver_type
/**< */)
209 static const xcb_protocol_request_t xcb_req
= {
211 /* ext */ &xcb_dri2_id
,
212 /* opcode */ XCB_DRI2_CONNECT
,
216 struct iovec xcb_parts
[4];
217 xcb_dri2_connect_cookie_t xcb_ret
;
218 xcb_dri2_connect_request_t xcb_out
;
220 xcb_out
.window
= window
;
221 xcb_out
.driver_type
= driver_type
;
223 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
224 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
225 xcb_parts
[3].iov_base
= 0;
226 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
228 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
233 xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t
*R
/**< */)
235 return (char *) (R
+ 1);
239 xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t
*R
/**< */)
241 return R
->driver_name_length
;
244 xcb_generic_iterator_t
245 xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t
*R
/**< */)
247 xcb_generic_iterator_t i
;
248 i
.data
= ((char *) (R
+ 1)) + (R
->driver_name_length
);
250 i
.index
= (char *) i
.data
- (char *) R
;
255 xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t
*R
/**< */)
257 xcb_generic_iterator_t prev
= xcb_dri2_connect_driver_name_end(R
);
258 return (void *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
262 xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t
*R
/**< */)
264 return (((R
->driver_name_length
+ 3) & (~3)) - R
->driver_name_length
);
267 xcb_generic_iterator_t
268 xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t
*R
/**< */)
270 xcb_generic_iterator_t i
;
271 xcb_generic_iterator_t child
= xcb_dri2_connect_driver_name_end(R
);
272 i
.data
= ((char *) child
.data
) + ((((R
->driver_name_length
+ 3) & (~3)) - R
->driver_name_length
));
274 i
.index
= (char *) i
.data
- (char *) R
;
279 xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t
*R
/**< */)
281 xcb_generic_iterator_t prev
= xcb_dri2_connect_alignment_pad_end(R
);
282 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
286 xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t
*R
/**< */)
288 return R
->device_name_length
;
291 xcb_generic_iterator_t
292 xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t
*R
/**< */)
294 xcb_generic_iterator_t i
;
295 xcb_generic_iterator_t child
= xcb_dri2_connect_alignment_pad_end(R
);
296 i
.data
= ((char *) child
.data
) + (R
->device_name_length
);
298 i
.index
= (char *) i
.data
- (char *) R
;
302 xcb_dri2_connect_reply_t
*
303 xcb_dri2_connect_reply (xcb_connection_t
*c
/**< */,
304 xcb_dri2_connect_cookie_t cookie
/**< */,
305 xcb_generic_error_t
**e
/**< */)
307 return (xcb_dri2_connect_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
310 xcb_dri2_authenticate_cookie_t
311 xcb_dri2_authenticate (xcb_connection_t
*c
/**< */,
312 xcb_window_t window
/**< */,
313 uint32_t magic
/**< */)
315 static const xcb_protocol_request_t xcb_req
= {
317 /* ext */ &xcb_dri2_id
,
318 /* opcode */ XCB_DRI2_AUTHENTICATE
,
322 struct iovec xcb_parts
[4];
323 xcb_dri2_authenticate_cookie_t xcb_ret
;
324 xcb_dri2_authenticate_request_t xcb_out
;
326 xcb_out
.window
= window
;
327 xcb_out
.magic
= magic
;
329 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
330 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
331 xcb_parts
[3].iov_base
= 0;
332 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
334 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
338 xcb_dri2_authenticate_cookie_t
339 xcb_dri2_authenticate_unchecked (xcb_connection_t
*c
/**< */,
340 xcb_window_t window
/**< */,
341 uint32_t magic
/**< */)
343 static const xcb_protocol_request_t xcb_req
= {
345 /* ext */ &xcb_dri2_id
,
346 /* opcode */ XCB_DRI2_AUTHENTICATE
,
350 struct iovec xcb_parts
[4];
351 xcb_dri2_authenticate_cookie_t xcb_ret
;
352 xcb_dri2_authenticate_request_t xcb_out
;
354 xcb_out
.window
= window
;
355 xcb_out
.magic
= magic
;
357 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
358 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
359 xcb_parts
[3].iov_base
= 0;
360 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
362 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
366 xcb_dri2_authenticate_reply_t
*
367 xcb_dri2_authenticate_reply (xcb_connection_t
*c
/**< */,
368 xcb_dri2_authenticate_cookie_t cookie
/**< */,
369 xcb_generic_error_t
**e
/**< */)
371 return (xcb_dri2_authenticate_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
375 xcb_dri2_create_drawable_checked (xcb_connection_t
*c
/**< */,
376 xcb_drawable_t drawable
/**< */)
378 static const xcb_protocol_request_t xcb_req
= {
380 /* ext */ &xcb_dri2_id
,
381 /* opcode */ XCB_DRI2_CREATE_DRAWABLE
,
385 struct iovec xcb_parts
[4];
386 xcb_void_cookie_t xcb_ret
;
387 xcb_dri2_create_drawable_request_t xcb_out
;
389 xcb_out
.drawable
= drawable
;
391 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
392 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
393 xcb_parts
[3].iov_base
= 0;
394 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
396 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
401 xcb_dri2_create_drawable (xcb_connection_t
*c
/**< */,
402 xcb_drawable_t drawable
/**< */)
404 static const xcb_protocol_request_t xcb_req
= {
406 /* ext */ &xcb_dri2_id
,
407 /* opcode */ XCB_DRI2_CREATE_DRAWABLE
,
411 struct iovec xcb_parts
[4];
412 xcb_void_cookie_t xcb_ret
;
413 xcb_dri2_create_drawable_request_t xcb_out
;
415 xcb_out
.drawable
= drawable
;
417 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
418 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
419 xcb_parts
[3].iov_base
= 0;
420 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
422 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
427 xcb_dri2_destroy_drawable_checked (xcb_connection_t
*c
/**< */,
428 xcb_drawable_t drawable
/**< */)
430 static const xcb_protocol_request_t xcb_req
= {
432 /* ext */ &xcb_dri2_id
,
433 /* opcode */ XCB_DRI2_DESTROY_DRAWABLE
,
437 struct iovec xcb_parts
[4];
438 xcb_void_cookie_t xcb_ret
;
439 xcb_dri2_destroy_drawable_request_t xcb_out
;
441 xcb_out
.drawable
= drawable
;
443 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
444 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
445 xcb_parts
[3].iov_base
= 0;
446 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
448 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
453 xcb_dri2_destroy_drawable (xcb_connection_t
*c
/**< */,
454 xcb_drawable_t drawable
/**< */)
456 static const xcb_protocol_request_t xcb_req
= {
458 /* ext */ &xcb_dri2_id
,
459 /* opcode */ XCB_DRI2_DESTROY_DRAWABLE
,
463 struct iovec xcb_parts
[4];
464 xcb_void_cookie_t xcb_ret
;
465 xcb_dri2_destroy_drawable_request_t xcb_out
;
467 xcb_out
.drawable
= drawable
;
469 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
470 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
471 xcb_parts
[3].iov_base
= 0;
472 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
474 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
479 xcb_dri2_get_buffers_sizeof (const void *_buffer
/**< */,
480 uint32_t attachments_len
/**< */)
482 char *xcb_tmp
= (char *)_buffer
;
483 unsigned int xcb_buffer_len
= 0;
484 unsigned int xcb_block_len
= 0;
485 unsigned int xcb_pad
= 0;
486 unsigned int xcb_align_to
= 0;
489 xcb_block_len
+= sizeof(xcb_dri2_get_buffers_request_t
);
490 xcb_tmp
+= xcb_block_len
;
491 xcb_buffer_len
+= xcb_block_len
;
494 xcb_block_len
+= attachments_len
* sizeof(uint32_t);
495 xcb_tmp
+= xcb_block_len
;
496 xcb_align_to
= ALIGNOF(uint32_t);
498 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
499 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
506 return xcb_buffer_len
;
509 xcb_dri2_get_buffers_cookie_t
510 xcb_dri2_get_buffers (xcb_connection_t
*c
/**< */,
511 xcb_drawable_t drawable
/**< */,
512 uint32_t count
/**< */,
513 uint32_t attachments_len
/**< */,
514 const uint32_t *attachments
/**< */)
516 static const xcb_protocol_request_t xcb_req
= {
518 /* ext */ &xcb_dri2_id
,
519 /* opcode */ XCB_DRI2_GET_BUFFERS
,
523 struct iovec xcb_parts
[6];
524 xcb_dri2_get_buffers_cookie_t xcb_ret
;
525 xcb_dri2_get_buffers_request_t xcb_out
;
527 xcb_out
.drawable
= drawable
;
528 xcb_out
.count
= count
;
530 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
531 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
532 xcb_parts
[3].iov_base
= 0;
533 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
534 /* uint32_t attachments */
535 xcb_parts
[4].iov_base
= (char *) attachments
;
536 xcb_parts
[4].iov_len
= attachments_len
* sizeof(uint32_t);
537 xcb_parts
[5].iov_base
= 0;
538 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
540 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
544 xcb_dri2_get_buffers_cookie_t
545 xcb_dri2_get_buffers_unchecked (xcb_connection_t
*c
/**< */,
546 xcb_drawable_t drawable
/**< */,
547 uint32_t count
/**< */,
548 uint32_t attachments_len
/**< */,
549 const uint32_t *attachments
/**< */)
551 static const xcb_protocol_request_t xcb_req
= {
553 /* ext */ &xcb_dri2_id
,
554 /* opcode */ XCB_DRI2_GET_BUFFERS
,
558 struct iovec xcb_parts
[6];
559 xcb_dri2_get_buffers_cookie_t xcb_ret
;
560 xcb_dri2_get_buffers_request_t xcb_out
;
562 xcb_out
.drawable
= drawable
;
563 xcb_out
.count
= count
;
565 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
566 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
567 xcb_parts
[3].iov_base
= 0;
568 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
569 /* uint32_t attachments */
570 xcb_parts
[4].iov_base
= (char *) attachments
;
571 xcb_parts
[4].iov_len
= attachments_len
* sizeof(uint32_t);
572 xcb_parts
[5].iov_base
= 0;
573 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
575 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
579 xcb_dri2_dri2_buffer_t
*
580 xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t
*R
/**< */)
582 return (xcb_dri2_dri2_buffer_t
*) (R
+ 1);
586 xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t
*R
/**< */)
591 xcb_dri2_dri2_buffer_iterator_t
592 xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t
*R
/**< */)
594 xcb_dri2_dri2_buffer_iterator_t i
;
595 i
.data
= (xcb_dri2_dri2_buffer_t
*) (R
+ 1);
597 i
.index
= (char *) i
.data
- (char *) R
;
601 xcb_dri2_get_buffers_reply_t
*
602 xcb_dri2_get_buffers_reply (xcb_connection_t
*c
/**< */,
603 xcb_dri2_get_buffers_cookie_t cookie
/**< */,
604 xcb_generic_error_t
**e
/**< */)
606 return (xcb_dri2_get_buffers_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
609 xcb_dri2_copy_region_cookie_t
610 xcb_dri2_copy_region (xcb_connection_t
*c
/**< */,
611 xcb_drawable_t drawable
/**< */,
612 uint32_t region
/**< */,
613 uint32_t dest
/**< */,
614 uint32_t src
/**< */)
616 static const xcb_protocol_request_t xcb_req
= {
618 /* ext */ &xcb_dri2_id
,
619 /* opcode */ XCB_DRI2_COPY_REGION
,
623 struct iovec xcb_parts
[4];
624 xcb_dri2_copy_region_cookie_t xcb_ret
;
625 xcb_dri2_copy_region_request_t xcb_out
;
627 xcb_out
.drawable
= drawable
;
628 xcb_out
.region
= region
;
632 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
633 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
634 xcb_parts
[3].iov_base
= 0;
635 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
637 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
641 xcb_dri2_copy_region_cookie_t
642 xcb_dri2_copy_region_unchecked (xcb_connection_t
*c
/**< */,
643 xcb_drawable_t drawable
/**< */,
644 uint32_t region
/**< */,
645 uint32_t dest
/**< */,
646 uint32_t src
/**< */)
648 static const xcb_protocol_request_t xcb_req
= {
650 /* ext */ &xcb_dri2_id
,
651 /* opcode */ XCB_DRI2_COPY_REGION
,
655 struct iovec xcb_parts
[4];
656 xcb_dri2_copy_region_cookie_t xcb_ret
;
657 xcb_dri2_copy_region_request_t xcb_out
;
659 xcb_out
.drawable
= drawable
;
660 xcb_out
.region
= region
;
664 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
665 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
666 xcb_parts
[3].iov_base
= 0;
667 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
669 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
673 xcb_dri2_copy_region_reply_t
*
674 xcb_dri2_copy_region_reply (xcb_connection_t
*c
/**< */,
675 xcb_dri2_copy_region_cookie_t cookie
/**< */,
676 xcb_generic_error_t
**e
/**< */)
678 return (xcb_dri2_copy_region_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
682 xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer
/**< */,
683 uint32_t attachments_len
/**< */)
685 char *xcb_tmp
= (char *)_buffer
;
686 unsigned int xcb_buffer_len
= 0;
687 unsigned int xcb_block_len
= 0;
688 unsigned int xcb_pad
= 0;
689 unsigned int xcb_align_to
= 0;
692 xcb_block_len
+= sizeof(xcb_dri2_get_buffers_with_format_request_t
);
693 xcb_tmp
+= xcb_block_len
;
694 xcb_buffer_len
+= xcb_block_len
;
697 xcb_block_len
+= attachments_len
* sizeof(xcb_dri2_attach_format_t
);
698 xcb_tmp
+= xcb_block_len
;
699 xcb_align_to
= ALIGNOF(xcb_dri2_attach_format_t
);
701 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
702 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
709 return xcb_buffer_len
;
712 xcb_dri2_get_buffers_with_format_cookie_t
713 xcb_dri2_get_buffers_with_format (xcb_connection_t
*c
/**< */,
714 xcb_drawable_t drawable
/**< */,
715 uint32_t count
/**< */,
716 uint32_t attachments_len
/**< */,
717 const xcb_dri2_attach_format_t
*attachments
/**< */)
719 static const xcb_protocol_request_t xcb_req
= {
721 /* ext */ &xcb_dri2_id
,
722 /* opcode */ XCB_DRI2_GET_BUFFERS_WITH_FORMAT
,
726 struct iovec xcb_parts
[6];
727 xcb_dri2_get_buffers_with_format_cookie_t xcb_ret
;
728 xcb_dri2_get_buffers_with_format_request_t xcb_out
;
730 xcb_out
.drawable
= drawable
;
731 xcb_out
.count
= count
;
733 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
734 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
735 xcb_parts
[3].iov_base
= 0;
736 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
737 /* xcb_dri2_attach_format_t attachments */
738 xcb_parts
[4].iov_base
= (char *) attachments
;
739 xcb_parts
[4].iov_len
= attachments_len
* sizeof(xcb_dri2_attach_format_t
);
740 xcb_parts
[5].iov_base
= 0;
741 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
743 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
747 xcb_dri2_get_buffers_with_format_cookie_t
748 xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t
*c
/**< */,
749 xcb_drawable_t drawable
/**< */,
750 uint32_t count
/**< */,
751 uint32_t attachments_len
/**< */,
752 const xcb_dri2_attach_format_t
*attachments
/**< */)
754 static const xcb_protocol_request_t xcb_req
= {
756 /* ext */ &xcb_dri2_id
,
757 /* opcode */ XCB_DRI2_GET_BUFFERS_WITH_FORMAT
,
761 struct iovec xcb_parts
[6];
762 xcb_dri2_get_buffers_with_format_cookie_t xcb_ret
;
763 xcb_dri2_get_buffers_with_format_request_t xcb_out
;
765 xcb_out
.drawable
= drawable
;
766 xcb_out
.count
= count
;
768 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
769 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
770 xcb_parts
[3].iov_base
= 0;
771 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
772 /* xcb_dri2_attach_format_t attachments */
773 xcb_parts
[4].iov_base
= (char *) attachments
;
774 xcb_parts
[4].iov_len
= attachments_len
* sizeof(xcb_dri2_attach_format_t
);
775 xcb_parts
[5].iov_base
= 0;
776 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
778 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
782 xcb_dri2_dri2_buffer_t
*
783 xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t
*R
/**< */)
785 return (xcb_dri2_dri2_buffer_t
*) (R
+ 1);
789 xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t
*R
/**< */)
794 xcb_dri2_dri2_buffer_iterator_t
795 xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t
*R
/**< */)
797 xcb_dri2_dri2_buffer_iterator_t i
;
798 i
.data
= (xcb_dri2_dri2_buffer_t
*) (R
+ 1);
800 i
.index
= (char *) i
.data
- (char *) R
;
804 xcb_dri2_get_buffers_with_format_reply_t
*
805 xcb_dri2_get_buffers_with_format_reply (xcb_connection_t
*c
/**< */,
806 xcb_dri2_get_buffers_with_format_cookie_t cookie
/**< */,
807 xcb_generic_error_t
**e
/**< */)
809 return (xcb_dri2_get_buffers_with_format_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
812 xcb_dri2_swap_buffers_cookie_t
813 xcb_dri2_swap_buffers (xcb_connection_t
*c
/**< */,
814 xcb_drawable_t drawable
/**< */,
815 uint32_t target_msc_hi
/**< */,
816 uint32_t target_msc_lo
/**< */,
817 uint32_t divisor_hi
/**< */,
818 uint32_t divisor_lo
/**< */,
819 uint32_t remainder_hi
/**< */,
820 uint32_t remainder_lo
/**< */)
822 static const xcb_protocol_request_t xcb_req
= {
824 /* ext */ &xcb_dri2_id
,
825 /* opcode */ XCB_DRI2_SWAP_BUFFERS
,
829 struct iovec xcb_parts
[4];
830 xcb_dri2_swap_buffers_cookie_t xcb_ret
;
831 xcb_dri2_swap_buffers_request_t xcb_out
;
833 xcb_out
.drawable
= drawable
;
834 xcb_out
.target_msc_hi
= target_msc_hi
;
835 xcb_out
.target_msc_lo
= target_msc_lo
;
836 xcb_out
.divisor_hi
= divisor_hi
;
837 xcb_out
.divisor_lo
= divisor_lo
;
838 xcb_out
.remainder_hi
= remainder_hi
;
839 xcb_out
.remainder_lo
= remainder_lo
;
841 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
842 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
843 xcb_parts
[3].iov_base
= 0;
844 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
846 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
850 xcb_dri2_swap_buffers_cookie_t
851 xcb_dri2_swap_buffers_unchecked (xcb_connection_t
*c
/**< */,
852 xcb_drawable_t drawable
/**< */,
853 uint32_t target_msc_hi
/**< */,
854 uint32_t target_msc_lo
/**< */,
855 uint32_t divisor_hi
/**< */,
856 uint32_t divisor_lo
/**< */,
857 uint32_t remainder_hi
/**< */,
858 uint32_t remainder_lo
/**< */)
860 static const xcb_protocol_request_t xcb_req
= {
862 /* ext */ &xcb_dri2_id
,
863 /* opcode */ XCB_DRI2_SWAP_BUFFERS
,
867 struct iovec xcb_parts
[4];
868 xcb_dri2_swap_buffers_cookie_t xcb_ret
;
869 xcb_dri2_swap_buffers_request_t xcb_out
;
871 xcb_out
.drawable
= drawable
;
872 xcb_out
.target_msc_hi
= target_msc_hi
;
873 xcb_out
.target_msc_lo
= target_msc_lo
;
874 xcb_out
.divisor_hi
= divisor_hi
;
875 xcb_out
.divisor_lo
= divisor_lo
;
876 xcb_out
.remainder_hi
= remainder_hi
;
877 xcb_out
.remainder_lo
= remainder_lo
;
879 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
880 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
881 xcb_parts
[3].iov_base
= 0;
882 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
884 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
888 xcb_dri2_swap_buffers_reply_t
*
889 xcb_dri2_swap_buffers_reply (xcb_connection_t
*c
/**< */,
890 xcb_dri2_swap_buffers_cookie_t cookie
/**< */,
891 xcb_generic_error_t
**e
/**< */)
893 return (xcb_dri2_swap_buffers_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
896 xcb_dri2_get_msc_cookie_t
897 xcb_dri2_get_msc (xcb_connection_t
*c
/**< */,
898 xcb_drawable_t drawable
/**< */)
900 static const xcb_protocol_request_t xcb_req
= {
902 /* ext */ &xcb_dri2_id
,
903 /* opcode */ XCB_DRI2_GET_MSC
,
907 struct iovec xcb_parts
[4];
908 xcb_dri2_get_msc_cookie_t xcb_ret
;
909 xcb_dri2_get_msc_request_t xcb_out
;
911 xcb_out
.drawable
= drawable
;
913 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
914 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
915 xcb_parts
[3].iov_base
= 0;
916 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
918 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
922 xcb_dri2_get_msc_cookie_t
923 xcb_dri2_get_msc_unchecked (xcb_connection_t
*c
/**< */,
924 xcb_drawable_t drawable
/**< */)
926 static const xcb_protocol_request_t xcb_req
= {
928 /* ext */ &xcb_dri2_id
,
929 /* opcode */ XCB_DRI2_GET_MSC
,
933 struct iovec xcb_parts
[4];
934 xcb_dri2_get_msc_cookie_t xcb_ret
;
935 xcb_dri2_get_msc_request_t xcb_out
;
937 xcb_out
.drawable
= drawable
;
939 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
940 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
941 xcb_parts
[3].iov_base
= 0;
942 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
944 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
948 xcb_dri2_get_msc_reply_t
*
949 xcb_dri2_get_msc_reply (xcb_connection_t
*c
/**< */,
950 xcb_dri2_get_msc_cookie_t cookie
/**< */,
951 xcb_generic_error_t
**e
/**< */)
953 return (xcb_dri2_get_msc_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
956 xcb_dri2_wait_msc_cookie_t
957 xcb_dri2_wait_msc (xcb_connection_t
*c
/**< */,
958 xcb_drawable_t drawable
/**< */,
959 uint32_t target_msc_hi
/**< */,
960 uint32_t target_msc_lo
/**< */,
961 uint32_t divisor_hi
/**< */,
962 uint32_t divisor_lo
/**< */,
963 uint32_t remainder_hi
/**< */,
964 uint32_t remainder_lo
/**< */)
966 static const xcb_protocol_request_t xcb_req
= {
968 /* ext */ &xcb_dri2_id
,
969 /* opcode */ XCB_DRI2_WAIT_MSC
,
973 struct iovec xcb_parts
[4];
974 xcb_dri2_wait_msc_cookie_t xcb_ret
;
975 xcb_dri2_wait_msc_request_t xcb_out
;
977 xcb_out
.drawable
= drawable
;
978 xcb_out
.target_msc_hi
= target_msc_hi
;
979 xcb_out
.target_msc_lo
= target_msc_lo
;
980 xcb_out
.divisor_hi
= divisor_hi
;
981 xcb_out
.divisor_lo
= divisor_lo
;
982 xcb_out
.remainder_hi
= remainder_hi
;
983 xcb_out
.remainder_lo
= remainder_lo
;
985 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
986 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
987 xcb_parts
[3].iov_base
= 0;
988 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
990 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
994 xcb_dri2_wait_msc_cookie_t
995 xcb_dri2_wait_msc_unchecked (xcb_connection_t
*c
/**< */,
996 xcb_drawable_t drawable
/**< */,
997 uint32_t target_msc_hi
/**< */,
998 uint32_t target_msc_lo
/**< */,
999 uint32_t divisor_hi
/**< */,
1000 uint32_t divisor_lo
/**< */,
1001 uint32_t remainder_hi
/**< */,
1002 uint32_t remainder_lo
/**< */)
1004 static const xcb_protocol_request_t xcb_req
= {
1006 /* ext */ &xcb_dri2_id
,
1007 /* opcode */ XCB_DRI2_WAIT_MSC
,
1011 struct iovec xcb_parts
[4];
1012 xcb_dri2_wait_msc_cookie_t xcb_ret
;
1013 xcb_dri2_wait_msc_request_t xcb_out
;
1015 xcb_out
.drawable
= drawable
;
1016 xcb_out
.target_msc_hi
= target_msc_hi
;
1017 xcb_out
.target_msc_lo
= target_msc_lo
;
1018 xcb_out
.divisor_hi
= divisor_hi
;
1019 xcb_out
.divisor_lo
= divisor_lo
;
1020 xcb_out
.remainder_hi
= remainder_hi
;
1021 xcb_out
.remainder_lo
= remainder_lo
;
1023 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1024 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1025 xcb_parts
[3].iov_base
= 0;
1026 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1028 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1032 xcb_dri2_wait_msc_reply_t
*
1033 xcb_dri2_wait_msc_reply (xcb_connection_t
*c
/**< */,
1034 xcb_dri2_wait_msc_cookie_t cookie
/**< */,
1035 xcb_generic_error_t
**e
/**< */)
1037 return (xcb_dri2_wait_msc_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1040 xcb_dri2_wait_sbc_cookie_t
1041 xcb_dri2_wait_sbc (xcb_connection_t
*c
/**< */,
1042 xcb_drawable_t drawable
/**< */,
1043 uint32_t target_sbc_hi
/**< */,
1044 uint32_t target_sbc_lo
/**< */)
1046 static const xcb_protocol_request_t xcb_req
= {
1048 /* ext */ &xcb_dri2_id
,
1049 /* opcode */ XCB_DRI2_WAIT_SBC
,
1053 struct iovec xcb_parts
[4];
1054 xcb_dri2_wait_sbc_cookie_t xcb_ret
;
1055 xcb_dri2_wait_sbc_request_t xcb_out
;
1057 xcb_out
.drawable
= drawable
;
1058 xcb_out
.target_sbc_hi
= target_sbc_hi
;
1059 xcb_out
.target_sbc_lo
= target_sbc_lo
;
1061 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1062 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1063 xcb_parts
[3].iov_base
= 0;
1064 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1066 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1070 xcb_dri2_wait_sbc_cookie_t
1071 xcb_dri2_wait_sbc_unchecked (xcb_connection_t
*c
/**< */,
1072 xcb_drawable_t drawable
/**< */,
1073 uint32_t target_sbc_hi
/**< */,
1074 uint32_t target_sbc_lo
/**< */)
1076 static const xcb_protocol_request_t xcb_req
= {
1078 /* ext */ &xcb_dri2_id
,
1079 /* opcode */ XCB_DRI2_WAIT_SBC
,
1083 struct iovec xcb_parts
[4];
1084 xcb_dri2_wait_sbc_cookie_t xcb_ret
;
1085 xcb_dri2_wait_sbc_request_t xcb_out
;
1087 xcb_out
.drawable
= drawable
;
1088 xcb_out
.target_sbc_hi
= target_sbc_hi
;
1089 xcb_out
.target_sbc_lo
= target_sbc_lo
;
1091 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1092 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1093 xcb_parts
[3].iov_base
= 0;
1094 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1096 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1100 xcb_dri2_wait_sbc_reply_t
*
1101 xcb_dri2_wait_sbc_reply (xcb_connection_t
*c
/**< */,
1102 xcb_dri2_wait_sbc_cookie_t cookie
/**< */,
1103 xcb_generic_error_t
**e
/**< */)
1105 return (xcb_dri2_wait_sbc_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1109 xcb_dri2_swap_interval_checked (xcb_connection_t
*c
/**< */,
1110 xcb_drawable_t drawable
/**< */,
1111 uint32_t interval
/**< */)
1113 static const xcb_protocol_request_t xcb_req
= {
1115 /* ext */ &xcb_dri2_id
,
1116 /* opcode */ XCB_DRI2_SWAP_INTERVAL
,
1120 struct iovec xcb_parts
[4];
1121 xcb_void_cookie_t xcb_ret
;
1122 xcb_dri2_swap_interval_request_t xcb_out
;
1124 xcb_out
.drawable
= drawable
;
1125 xcb_out
.interval
= interval
;
1127 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1128 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1129 xcb_parts
[3].iov_base
= 0;
1130 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1132 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1137 xcb_dri2_swap_interval (xcb_connection_t
*c
/**< */,
1138 xcb_drawable_t drawable
/**< */,
1139 uint32_t interval
/**< */)
1141 static const xcb_protocol_request_t xcb_req
= {
1143 /* ext */ &xcb_dri2_id
,
1144 /* opcode */ XCB_DRI2_SWAP_INTERVAL
,
1148 struct iovec xcb_parts
[4];
1149 xcb_void_cookie_t xcb_ret
;
1150 xcb_dri2_swap_interval_request_t xcb_out
;
1152 xcb_out
.drawable
= drawable
;
1153 xcb_out
.interval
= interval
;
1155 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1156 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1157 xcb_parts
[3].iov_base
= 0;
1158 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1160 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1164 xcb_dri2_get_param_cookie_t
1165 xcb_dri2_get_param (xcb_connection_t
*c
/**< */,
1166 xcb_drawable_t drawable
/**< */,
1167 uint32_t param
/**< */)
1169 static const xcb_protocol_request_t xcb_req
= {
1171 /* ext */ &xcb_dri2_id
,
1172 /* opcode */ XCB_DRI2_GET_PARAM
,
1176 struct iovec xcb_parts
[4];
1177 xcb_dri2_get_param_cookie_t xcb_ret
;
1178 xcb_dri2_get_param_request_t xcb_out
;
1180 xcb_out
.drawable
= drawable
;
1181 xcb_out
.param
= param
;
1183 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1184 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1185 xcb_parts
[3].iov_base
= 0;
1186 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1188 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1192 xcb_dri2_get_param_cookie_t
1193 xcb_dri2_get_param_unchecked (xcb_connection_t
*c
/**< */,
1194 xcb_drawable_t drawable
/**< */,
1195 uint32_t param
/**< */)
1197 static const xcb_protocol_request_t xcb_req
= {
1199 /* ext */ &xcb_dri2_id
,
1200 /* opcode */ XCB_DRI2_GET_PARAM
,
1204 struct iovec xcb_parts
[4];
1205 xcb_dri2_get_param_cookie_t xcb_ret
;
1206 xcb_dri2_get_param_request_t xcb_out
;
1208 xcb_out
.drawable
= drawable
;
1209 xcb_out
.param
= param
;
1211 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1212 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1213 xcb_parts
[3].iov_base
= 0;
1214 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1216 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1220 xcb_dri2_get_param_reply_t
*
1221 xcb_dri2_get_param_reply (xcb_connection_t
*c
/**< */,
1222 xcb_dri2_get_param_cookie_t cookie
/**< */,
1223 xcb_generic_error_t
**e
/**< */)
1225 return (xcb_dri2_get_param_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);