etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / dri2.c
blob9554520eb6b27deba7fb22eb9ed2de0f16518916
1 /*
2 * This file generated automatically from dri2.xml by c_client.py.
3 * Edit at your peril.
4 */
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h> /* for offsetof() */
13 #include "xcbext.h"
14 #include "dri2.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
19 xcb_extension_t xcb_dri2_id = { "DRI2", 0 };
21 void
22 xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i /**< */)
24 --i->rem;
25 ++i->data;
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);
35 ret.rem = 0;
36 return ret;
39 void
40 xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i /**< */)
42 --i->rem;
43 ++i->data;
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);
53 ret.rem = 0;
54 return ret;
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 = {
63 /* count */ 2,
64 /* ext */ &xcb_dri2_id,
65 /* opcode */ XCB_DRI2_QUERY_VERSION,
66 /* isvoid */ 0
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);
82 return xcb_ret;
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 = {
91 /* count */ 2,
92 /* ext */ &xcb_dri2_id,
93 /* opcode */ XCB_DRI2_QUERY_VERSION,
94 /* isvoid */ 0
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);
110 return xcb_ret;
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;
135 xcb_block_len = 0;
136 /* driver_name */
137 xcb_block_len += _aux->driver_name_length * sizeof(char);
138 xcb_tmp += xcb_block_len;
139 xcb_align_to = ALIGNOF(char);
140 /* insert padding */
141 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
142 xcb_buffer_len += xcb_block_len + xcb_pad;
143 if (0 != xcb_pad) {
144 xcb_tmp += xcb_pad;
145 xcb_pad = 0;
147 xcb_block_len = 0;
148 /* alignment_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);
152 /* insert padding */
153 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
154 xcb_buffer_len += xcb_block_len + xcb_pad;
155 if (0 != xcb_pad) {
156 xcb_tmp += xcb_pad;
157 xcb_pad = 0;
159 xcb_block_len = 0;
160 /* device_name */
161 xcb_block_len += _aux->device_name_length * sizeof(char);
162 xcb_tmp += xcb_block_len;
163 xcb_align_to = ALIGNOF(char);
164 /* insert padding */
165 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
166 xcb_buffer_len += xcb_block_len + xcb_pad;
167 if (0 != xcb_pad) {
168 xcb_tmp += xcb_pad;
169 xcb_pad = 0;
171 xcb_block_len = 0;
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 = {
182 /* count */ 2,
183 /* ext */ &xcb_dri2_id,
184 /* opcode */ XCB_DRI2_CONNECT,
185 /* isvoid */ 0
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);
201 return xcb_ret;
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 = {
210 /* count */ 2,
211 /* ext */ &xcb_dri2_id,
212 /* opcode */ XCB_DRI2_CONNECT,
213 /* isvoid */ 0
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);
229 return xcb_ret;
232 char *
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);
249 i.rem = 0;
250 i.index = (char *) i.data - (char *) R;
251 return i;
254 void *
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));
273 i.rem = 0;
274 i.index = (char *) i.data - (char *) R;
275 return i;
278 char *
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);
297 i.rem = 0;
298 i.index = (char *) i.data - (char *) R;
299 return i;
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 = {
316 /* count */ 2,
317 /* ext */ &xcb_dri2_id,
318 /* opcode */ XCB_DRI2_AUTHENTICATE,
319 /* isvoid */ 0
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);
335 return xcb_ret;
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 = {
344 /* count */ 2,
345 /* ext */ &xcb_dri2_id,
346 /* opcode */ XCB_DRI2_AUTHENTICATE,
347 /* isvoid */ 0
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);
363 return xcb_ret;
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);
374 xcb_void_cookie_t
375 xcb_dri2_create_drawable_checked (xcb_connection_t *c /**< */,
376 xcb_drawable_t drawable /**< */)
378 static const xcb_protocol_request_t xcb_req = {
379 /* count */ 2,
380 /* ext */ &xcb_dri2_id,
381 /* opcode */ XCB_DRI2_CREATE_DRAWABLE,
382 /* isvoid */ 1
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);
397 return xcb_ret;
400 xcb_void_cookie_t
401 xcb_dri2_create_drawable (xcb_connection_t *c /**< */,
402 xcb_drawable_t drawable /**< */)
404 static const xcb_protocol_request_t xcb_req = {
405 /* count */ 2,
406 /* ext */ &xcb_dri2_id,
407 /* opcode */ XCB_DRI2_CREATE_DRAWABLE,
408 /* isvoid */ 1
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);
423 return xcb_ret;
426 xcb_void_cookie_t
427 xcb_dri2_destroy_drawable_checked (xcb_connection_t *c /**< */,
428 xcb_drawable_t drawable /**< */)
430 static const xcb_protocol_request_t xcb_req = {
431 /* count */ 2,
432 /* ext */ &xcb_dri2_id,
433 /* opcode */ XCB_DRI2_DESTROY_DRAWABLE,
434 /* isvoid */ 1
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);
449 return xcb_ret;
452 xcb_void_cookie_t
453 xcb_dri2_destroy_drawable (xcb_connection_t *c /**< */,
454 xcb_drawable_t drawable /**< */)
456 static const xcb_protocol_request_t xcb_req = {
457 /* count */ 2,
458 /* ext */ &xcb_dri2_id,
459 /* opcode */ XCB_DRI2_DESTROY_DRAWABLE,
460 /* isvoid */ 1
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);
475 return xcb_ret;
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;
492 xcb_block_len = 0;
493 /* attachments */
494 xcb_block_len += attachments_len * sizeof(uint32_t);
495 xcb_tmp += xcb_block_len;
496 xcb_align_to = ALIGNOF(uint32_t);
497 /* insert padding */
498 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
499 xcb_buffer_len += xcb_block_len + xcb_pad;
500 if (0 != xcb_pad) {
501 xcb_tmp += xcb_pad;
502 xcb_pad = 0;
504 xcb_block_len = 0;
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 = {
517 /* count */ 4,
518 /* ext */ &xcb_dri2_id,
519 /* opcode */ XCB_DRI2_GET_BUFFERS,
520 /* isvoid */ 0
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);
541 return xcb_ret;
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 = {
552 /* count */ 4,
553 /* ext */ &xcb_dri2_id,
554 /* opcode */ XCB_DRI2_GET_BUFFERS,
555 /* isvoid */ 0
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);
576 return xcb_ret;
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 /**< */)
588 return R->count;
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);
596 i.rem = R->count;
597 i.index = (char *) i.data - (char *) R;
598 return i;
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 = {
617 /* count */ 2,
618 /* ext */ &xcb_dri2_id,
619 /* opcode */ XCB_DRI2_COPY_REGION,
620 /* isvoid */ 0
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;
629 xcb_out.dest = dest;
630 xcb_out.src = src;
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);
638 return xcb_ret;
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 = {
649 /* count */ 2,
650 /* ext */ &xcb_dri2_id,
651 /* opcode */ XCB_DRI2_COPY_REGION,
652 /* isvoid */ 0
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;
661 xcb_out.dest = dest;
662 xcb_out.src = src;
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);
670 return xcb_ret;
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;
695 xcb_block_len = 0;
696 /* attachments */
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);
700 /* insert padding */
701 xcb_pad = -xcb_block_len & (xcb_align_to - 1);
702 xcb_buffer_len += xcb_block_len + xcb_pad;
703 if (0 != xcb_pad) {
704 xcb_tmp += xcb_pad;
705 xcb_pad = 0;
707 xcb_block_len = 0;
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 = {
720 /* count */ 4,
721 /* ext */ &xcb_dri2_id,
722 /* opcode */ XCB_DRI2_GET_BUFFERS_WITH_FORMAT,
723 /* isvoid */ 0
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);
744 return xcb_ret;
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 = {
755 /* count */ 4,
756 /* ext */ &xcb_dri2_id,
757 /* opcode */ XCB_DRI2_GET_BUFFERS_WITH_FORMAT,
758 /* isvoid */ 0
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);
779 return xcb_ret;
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 /**< */)
791 return R->count;
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);
799 i.rem = R->count;
800 i.index = (char *) i.data - (char *) R;
801 return i;
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 = {
823 /* count */ 2,
824 /* ext */ &xcb_dri2_id,
825 /* opcode */ XCB_DRI2_SWAP_BUFFERS,
826 /* isvoid */ 0
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);
847 return xcb_ret;
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 = {
861 /* count */ 2,
862 /* ext */ &xcb_dri2_id,
863 /* opcode */ XCB_DRI2_SWAP_BUFFERS,
864 /* isvoid */ 0
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);
885 return xcb_ret;
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 = {
901 /* count */ 2,
902 /* ext */ &xcb_dri2_id,
903 /* opcode */ XCB_DRI2_GET_MSC,
904 /* isvoid */ 0
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);
919 return xcb_ret;
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 = {
927 /* count */ 2,
928 /* ext */ &xcb_dri2_id,
929 /* opcode */ XCB_DRI2_GET_MSC,
930 /* isvoid */ 0
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);
945 return xcb_ret;
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 = {
967 /* count */ 2,
968 /* ext */ &xcb_dri2_id,
969 /* opcode */ XCB_DRI2_WAIT_MSC,
970 /* isvoid */ 0
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);
991 return xcb_ret;
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 = {
1005 /* count */ 2,
1006 /* ext */ &xcb_dri2_id,
1007 /* opcode */ XCB_DRI2_WAIT_MSC,
1008 /* isvoid */ 0
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);
1029 return xcb_ret;
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 = {
1047 /* count */ 2,
1048 /* ext */ &xcb_dri2_id,
1049 /* opcode */ XCB_DRI2_WAIT_SBC,
1050 /* isvoid */ 0
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);
1067 return xcb_ret;
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 = {
1077 /* count */ 2,
1078 /* ext */ &xcb_dri2_id,
1079 /* opcode */ XCB_DRI2_WAIT_SBC,
1080 /* isvoid */ 0
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);
1097 return xcb_ret;
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);
1108 xcb_void_cookie_t
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 = {
1114 /* count */ 2,
1115 /* ext */ &xcb_dri2_id,
1116 /* opcode */ XCB_DRI2_SWAP_INTERVAL,
1117 /* isvoid */ 1
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);
1133 return xcb_ret;
1136 xcb_void_cookie_t
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 = {
1142 /* count */ 2,
1143 /* ext */ &xcb_dri2_id,
1144 /* opcode */ XCB_DRI2_SWAP_INTERVAL,
1145 /* isvoid */ 1
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);
1161 return xcb_ret;
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 = {
1170 /* count */ 2,
1171 /* ext */ &xcb_dri2_id,
1172 /* opcode */ XCB_DRI2_GET_PARAM,
1173 /* isvoid */ 0
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);
1189 return xcb_ret;
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 = {
1198 /* count */ 2,
1199 /* ext */ &xcb_dri2_id,
1200 /* opcode */ XCB_DRI2_GET_PARAM,
1201 /* isvoid */ 0
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);
1217 return xcb_ret;
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);