2 * This file generated automatically from xf86dri.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
18 xcb_extension_t xcb_xf86dri_id
= { "XFree86-DRI", 0 };
21 xcb_xf86dri_drm_clip_rect_next (xcb_xf86dri_drm_clip_rect_iterator_t
*i
/**< */)
25 i
->index
+= sizeof(xcb_xf86dri_drm_clip_rect_t
);
28 xcb_generic_iterator_t
29 xcb_xf86dri_drm_clip_rect_end (xcb_xf86dri_drm_clip_rect_iterator_t i
/**< */)
31 xcb_generic_iterator_t ret
;
32 ret
.data
= i
.data
+ i
.rem
;
33 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
38 xcb_xf86dri_query_version_cookie_t
39 xcb_xf86dri_query_version (xcb_connection_t
*c
/**< */)
41 static const xcb_protocol_request_t xcb_req
= {
43 /* ext */ &xcb_xf86dri_id
,
44 /* opcode */ XCB_XF86DRI_QUERY_VERSION
,
48 struct iovec xcb_parts
[4];
49 xcb_xf86dri_query_version_cookie_t xcb_ret
;
50 xcb_xf86dri_query_version_request_t xcb_out
;
53 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
54 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
55 xcb_parts
[3].iov_base
= 0;
56 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
58 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
62 xcb_xf86dri_query_version_cookie_t
63 xcb_xf86dri_query_version_unchecked (xcb_connection_t
*c
/**< */)
65 static const xcb_protocol_request_t xcb_req
= {
67 /* ext */ &xcb_xf86dri_id
,
68 /* opcode */ XCB_XF86DRI_QUERY_VERSION
,
72 struct iovec xcb_parts
[4];
73 xcb_xf86dri_query_version_cookie_t xcb_ret
;
74 xcb_xf86dri_query_version_request_t xcb_out
;
77 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
78 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
79 xcb_parts
[3].iov_base
= 0;
80 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
82 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
86 xcb_xf86dri_query_version_reply_t
*
87 xcb_xf86dri_query_version_reply (xcb_connection_t
*c
/**< */,
88 xcb_xf86dri_query_version_cookie_t cookie
/**< */,
89 xcb_generic_error_t
**e
/**< */)
91 return (xcb_xf86dri_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
94 xcb_xf86dri_query_direct_rendering_capable_cookie_t
95 xcb_xf86dri_query_direct_rendering_capable (xcb_connection_t
*c
/**< */,
96 uint32_t screen
/**< */)
98 static const xcb_protocol_request_t xcb_req
= {
100 /* ext */ &xcb_xf86dri_id
,
101 /* opcode */ XCB_XF86DRI_QUERY_DIRECT_RENDERING_CAPABLE
,
105 struct iovec xcb_parts
[4];
106 xcb_xf86dri_query_direct_rendering_capable_cookie_t xcb_ret
;
107 xcb_xf86dri_query_direct_rendering_capable_request_t xcb_out
;
109 xcb_out
.screen
= screen
;
111 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
112 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
113 xcb_parts
[3].iov_base
= 0;
114 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
116 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
120 xcb_xf86dri_query_direct_rendering_capable_cookie_t
121 xcb_xf86dri_query_direct_rendering_capable_unchecked (xcb_connection_t
*c
/**< */,
122 uint32_t screen
/**< */)
124 static const xcb_protocol_request_t xcb_req
= {
126 /* ext */ &xcb_xf86dri_id
,
127 /* opcode */ XCB_XF86DRI_QUERY_DIRECT_RENDERING_CAPABLE
,
131 struct iovec xcb_parts
[4];
132 xcb_xf86dri_query_direct_rendering_capable_cookie_t xcb_ret
;
133 xcb_xf86dri_query_direct_rendering_capable_request_t xcb_out
;
135 xcb_out
.screen
= screen
;
137 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
138 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
139 xcb_parts
[3].iov_base
= 0;
140 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
142 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
146 xcb_xf86dri_query_direct_rendering_capable_reply_t
*
147 xcb_xf86dri_query_direct_rendering_capable_reply (xcb_connection_t
*c
/**< */,
148 xcb_xf86dri_query_direct_rendering_capable_cookie_t cookie
/**< */,
149 xcb_generic_error_t
**e
/**< */)
151 return (xcb_xf86dri_query_direct_rendering_capable_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
155 xcb_xf86dri_open_connection_sizeof (const void *_buffer
/**< */)
157 char *xcb_tmp
= (char *)_buffer
;
158 const xcb_xf86dri_open_connection_reply_t
*_aux
= (xcb_xf86dri_open_connection_reply_t
*)_buffer
;
159 unsigned int xcb_buffer_len
= 0;
160 unsigned int xcb_block_len
= 0;
161 unsigned int xcb_pad
= 0;
162 unsigned int xcb_align_to
= 0;
165 xcb_block_len
+= sizeof(xcb_xf86dri_open_connection_reply_t
);
166 xcb_tmp
+= xcb_block_len
;
167 xcb_buffer_len
+= xcb_block_len
;
170 xcb_block_len
+= _aux
->bus_id_len
* sizeof(char);
171 xcb_tmp
+= xcb_block_len
;
172 xcb_align_to
= ALIGNOF(char);
174 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
175 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
182 return xcb_buffer_len
;
185 xcb_xf86dri_open_connection_cookie_t
186 xcb_xf86dri_open_connection (xcb_connection_t
*c
/**< */,
187 uint32_t screen
/**< */)
189 static const xcb_protocol_request_t xcb_req
= {
191 /* ext */ &xcb_xf86dri_id
,
192 /* opcode */ XCB_XF86DRI_OPEN_CONNECTION
,
196 struct iovec xcb_parts
[4];
197 xcb_xf86dri_open_connection_cookie_t xcb_ret
;
198 xcb_xf86dri_open_connection_request_t xcb_out
;
200 xcb_out
.screen
= screen
;
202 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
203 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
204 xcb_parts
[3].iov_base
= 0;
205 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
207 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
211 xcb_xf86dri_open_connection_cookie_t
212 xcb_xf86dri_open_connection_unchecked (xcb_connection_t
*c
/**< */,
213 uint32_t screen
/**< */)
215 static const xcb_protocol_request_t xcb_req
= {
217 /* ext */ &xcb_xf86dri_id
,
218 /* opcode */ XCB_XF86DRI_OPEN_CONNECTION
,
222 struct iovec xcb_parts
[4];
223 xcb_xf86dri_open_connection_cookie_t xcb_ret
;
224 xcb_xf86dri_open_connection_request_t xcb_out
;
226 xcb_out
.screen
= screen
;
228 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
229 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
230 xcb_parts
[3].iov_base
= 0;
231 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
233 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
238 xcb_xf86dri_open_connection_bus_id (const xcb_xf86dri_open_connection_reply_t
*R
/**< */)
240 return (char *) (R
+ 1);
244 xcb_xf86dri_open_connection_bus_id_length (const xcb_xf86dri_open_connection_reply_t
*R
/**< */)
246 return R
->bus_id_len
;
249 xcb_generic_iterator_t
250 xcb_xf86dri_open_connection_bus_id_end (const xcb_xf86dri_open_connection_reply_t
*R
/**< */)
252 xcb_generic_iterator_t i
;
253 i
.data
= ((char *) (R
+ 1)) + (R
->bus_id_len
);
255 i
.index
= (char *) i
.data
- (char *) R
;
259 xcb_xf86dri_open_connection_reply_t
*
260 xcb_xf86dri_open_connection_reply (xcb_connection_t
*c
/**< */,
261 xcb_xf86dri_open_connection_cookie_t cookie
/**< */,
262 xcb_generic_error_t
**e
/**< */)
264 return (xcb_xf86dri_open_connection_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
268 xcb_xf86dri_close_connection_checked (xcb_connection_t
*c
/**< */,
269 uint32_t screen
/**< */)
271 static const xcb_protocol_request_t xcb_req
= {
273 /* ext */ &xcb_xf86dri_id
,
274 /* opcode */ XCB_XF86DRI_CLOSE_CONNECTION
,
278 struct iovec xcb_parts
[4];
279 xcb_void_cookie_t xcb_ret
;
280 xcb_xf86dri_close_connection_request_t xcb_out
;
282 xcb_out
.screen
= screen
;
284 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
285 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
286 xcb_parts
[3].iov_base
= 0;
287 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
289 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
294 xcb_xf86dri_close_connection (xcb_connection_t
*c
/**< */,
295 uint32_t screen
/**< */)
297 static const xcb_protocol_request_t xcb_req
= {
299 /* ext */ &xcb_xf86dri_id
,
300 /* opcode */ XCB_XF86DRI_CLOSE_CONNECTION
,
304 struct iovec xcb_parts
[4];
305 xcb_void_cookie_t xcb_ret
;
306 xcb_xf86dri_close_connection_request_t xcb_out
;
308 xcb_out
.screen
= screen
;
310 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
311 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
312 xcb_parts
[3].iov_base
= 0;
313 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
315 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
320 xcb_xf86dri_get_client_driver_name_sizeof (const void *_buffer
/**< */)
322 char *xcb_tmp
= (char *)_buffer
;
323 const xcb_xf86dri_get_client_driver_name_reply_t
*_aux
= (xcb_xf86dri_get_client_driver_name_reply_t
*)_buffer
;
324 unsigned int xcb_buffer_len
= 0;
325 unsigned int xcb_block_len
= 0;
326 unsigned int xcb_pad
= 0;
327 unsigned int xcb_align_to
= 0;
330 xcb_block_len
+= sizeof(xcb_xf86dri_get_client_driver_name_reply_t
);
331 xcb_tmp
+= xcb_block_len
;
332 xcb_buffer_len
+= xcb_block_len
;
334 /* client_driver_name */
335 xcb_block_len
+= _aux
->client_driver_name_len
* sizeof(char);
336 xcb_tmp
+= xcb_block_len
;
337 xcb_align_to
= ALIGNOF(char);
339 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
340 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
347 return xcb_buffer_len
;
350 xcb_xf86dri_get_client_driver_name_cookie_t
351 xcb_xf86dri_get_client_driver_name (xcb_connection_t
*c
/**< */,
352 uint32_t screen
/**< */)
354 static const xcb_protocol_request_t xcb_req
= {
356 /* ext */ &xcb_xf86dri_id
,
357 /* opcode */ XCB_XF86DRI_GET_CLIENT_DRIVER_NAME
,
361 struct iovec xcb_parts
[4];
362 xcb_xf86dri_get_client_driver_name_cookie_t xcb_ret
;
363 xcb_xf86dri_get_client_driver_name_request_t xcb_out
;
365 xcb_out
.screen
= screen
;
367 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
368 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
369 xcb_parts
[3].iov_base
= 0;
370 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
372 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
376 xcb_xf86dri_get_client_driver_name_cookie_t
377 xcb_xf86dri_get_client_driver_name_unchecked (xcb_connection_t
*c
/**< */,
378 uint32_t screen
/**< */)
380 static const xcb_protocol_request_t xcb_req
= {
382 /* ext */ &xcb_xf86dri_id
,
383 /* opcode */ XCB_XF86DRI_GET_CLIENT_DRIVER_NAME
,
387 struct iovec xcb_parts
[4];
388 xcb_xf86dri_get_client_driver_name_cookie_t xcb_ret
;
389 xcb_xf86dri_get_client_driver_name_request_t xcb_out
;
391 xcb_out
.screen
= screen
;
393 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
394 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
395 xcb_parts
[3].iov_base
= 0;
396 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
398 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
403 xcb_xf86dri_get_client_driver_name_client_driver_name (const xcb_xf86dri_get_client_driver_name_reply_t
*R
/**< */)
405 return (char *) (R
+ 1);
409 xcb_xf86dri_get_client_driver_name_client_driver_name_length (const xcb_xf86dri_get_client_driver_name_reply_t
*R
/**< */)
411 return R
->client_driver_name_len
;
414 xcb_generic_iterator_t
415 xcb_xf86dri_get_client_driver_name_client_driver_name_end (const xcb_xf86dri_get_client_driver_name_reply_t
*R
/**< */)
417 xcb_generic_iterator_t i
;
418 i
.data
= ((char *) (R
+ 1)) + (R
->client_driver_name_len
);
420 i
.index
= (char *) i
.data
- (char *) R
;
424 xcb_xf86dri_get_client_driver_name_reply_t
*
425 xcb_xf86dri_get_client_driver_name_reply (xcb_connection_t
*c
/**< */,
426 xcb_xf86dri_get_client_driver_name_cookie_t cookie
/**< */,
427 xcb_generic_error_t
**e
/**< */)
429 return (xcb_xf86dri_get_client_driver_name_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
432 xcb_xf86dri_create_context_cookie_t
433 xcb_xf86dri_create_context (xcb_connection_t
*c
/**< */,
434 uint32_t screen
/**< */,
435 uint32_t visual
/**< */,
436 uint32_t context
/**< */)
438 static const xcb_protocol_request_t xcb_req
= {
440 /* ext */ &xcb_xf86dri_id
,
441 /* opcode */ XCB_XF86DRI_CREATE_CONTEXT
,
445 struct iovec xcb_parts
[4];
446 xcb_xf86dri_create_context_cookie_t xcb_ret
;
447 xcb_xf86dri_create_context_request_t xcb_out
;
449 xcb_out
.screen
= screen
;
450 xcb_out
.visual
= visual
;
451 xcb_out
.context
= context
;
453 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
454 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
455 xcb_parts
[3].iov_base
= 0;
456 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
458 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
462 xcb_xf86dri_create_context_cookie_t
463 xcb_xf86dri_create_context_unchecked (xcb_connection_t
*c
/**< */,
464 uint32_t screen
/**< */,
465 uint32_t visual
/**< */,
466 uint32_t context
/**< */)
468 static const xcb_protocol_request_t xcb_req
= {
470 /* ext */ &xcb_xf86dri_id
,
471 /* opcode */ XCB_XF86DRI_CREATE_CONTEXT
,
475 struct iovec xcb_parts
[4];
476 xcb_xf86dri_create_context_cookie_t xcb_ret
;
477 xcb_xf86dri_create_context_request_t xcb_out
;
479 xcb_out
.screen
= screen
;
480 xcb_out
.visual
= visual
;
481 xcb_out
.context
= context
;
483 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
484 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
485 xcb_parts
[3].iov_base
= 0;
486 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
488 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
492 xcb_xf86dri_create_context_reply_t
*
493 xcb_xf86dri_create_context_reply (xcb_connection_t
*c
/**< */,
494 xcb_xf86dri_create_context_cookie_t cookie
/**< */,
495 xcb_generic_error_t
**e
/**< */)
497 return (xcb_xf86dri_create_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
501 xcb_xf86dri_destroy_context_checked (xcb_connection_t
*c
/**< */,
502 uint32_t screen
/**< */,
503 uint32_t context
/**< */)
505 static const xcb_protocol_request_t xcb_req
= {
507 /* ext */ &xcb_xf86dri_id
,
508 /* opcode */ XCB_XF86DRI_DESTROY_CONTEXT
,
512 struct iovec xcb_parts
[4];
513 xcb_void_cookie_t xcb_ret
;
514 xcb_xf86dri_destroy_context_request_t xcb_out
;
516 xcb_out
.screen
= screen
;
517 xcb_out
.context
= context
;
519 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
520 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
521 xcb_parts
[3].iov_base
= 0;
522 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
524 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
529 xcb_xf86dri_destroy_context (xcb_connection_t
*c
/**< */,
530 uint32_t screen
/**< */,
531 uint32_t context
/**< */)
533 static const xcb_protocol_request_t xcb_req
= {
535 /* ext */ &xcb_xf86dri_id
,
536 /* opcode */ XCB_XF86DRI_DESTROY_CONTEXT
,
540 struct iovec xcb_parts
[4];
541 xcb_void_cookie_t xcb_ret
;
542 xcb_xf86dri_destroy_context_request_t xcb_out
;
544 xcb_out
.screen
= screen
;
545 xcb_out
.context
= context
;
547 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
548 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
549 xcb_parts
[3].iov_base
= 0;
550 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
552 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
556 xcb_xf86dri_create_drawable_cookie_t
557 xcb_xf86dri_create_drawable (xcb_connection_t
*c
/**< */,
558 uint32_t screen
/**< */,
559 uint32_t drawable
/**< */)
561 static const xcb_protocol_request_t xcb_req
= {
563 /* ext */ &xcb_xf86dri_id
,
564 /* opcode */ XCB_XF86DRI_CREATE_DRAWABLE
,
568 struct iovec xcb_parts
[4];
569 xcb_xf86dri_create_drawable_cookie_t xcb_ret
;
570 xcb_xf86dri_create_drawable_request_t xcb_out
;
572 xcb_out
.screen
= screen
;
573 xcb_out
.drawable
= drawable
;
575 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
576 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
577 xcb_parts
[3].iov_base
= 0;
578 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
580 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
584 xcb_xf86dri_create_drawable_cookie_t
585 xcb_xf86dri_create_drawable_unchecked (xcb_connection_t
*c
/**< */,
586 uint32_t screen
/**< */,
587 uint32_t drawable
/**< */)
589 static const xcb_protocol_request_t xcb_req
= {
591 /* ext */ &xcb_xf86dri_id
,
592 /* opcode */ XCB_XF86DRI_CREATE_DRAWABLE
,
596 struct iovec xcb_parts
[4];
597 xcb_xf86dri_create_drawable_cookie_t xcb_ret
;
598 xcb_xf86dri_create_drawable_request_t xcb_out
;
600 xcb_out
.screen
= screen
;
601 xcb_out
.drawable
= drawable
;
603 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
604 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
605 xcb_parts
[3].iov_base
= 0;
606 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
608 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
612 xcb_xf86dri_create_drawable_reply_t
*
613 xcb_xf86dri_create_drawable_reply (xcb_connection_t
*c
/**< */,
614 xcb_xf86dri_create_drawable_cookie_t cookie
/**< */,
615 xcb_generic_error_t
**e
/**< */)
617 return (xcb_xf86dri_create_drawable_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
621 xcb_xf86dri_destroy_drawable_checked (xcb_connection_t
*c
/**< */,
622 uint32_t screen
/**< */,
623 uint32_t drawable
/**< */)
625 static const xcb_protocol_request_t xcb_req
= {
627 /* ext */ &xcb_xf86dri_id
,
628 /* opcode */ XCB_XF86DRI_DESTROY_DRAWABLE
,
632 struct iovec xcb_parts
[4];
633 xcb_void_cookie_t xcb_ret
;
634 xcb_xf86dri_destroy_drawable_request_t xcb_out
;
636 xcb_out
.screen
= screen
;
637 xcb_out
.drawable
= drawable
;
639 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
640 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
641 xcb_parts
[3].iov_base
= 0;
642 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
644 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
649 xcb_xf86dri_destroy_drawable (xcb_connection_t
*c
/**< */,
650 uint32_t screen
/**< */,
651 uint32_t drawable
/**< */)
653 static const xcb_protocol_request_t xcb_req
= {
655 /* ext */ &xcb_xf86dri_id
,
656 /* opcode */ XCB_XF86DRI_DESTROY_DRAWABLE
,
660 struct iovec xcb_parts
[4];
661 xcb_void_cookie_t xcb_ret
;
662 xcb_xf86dri_destroy_drawable_request_t xcb_out
;
664 xcb_out
.screen
= screen
;
665 xcb_out
.drawable
= drawable
;
667 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
668 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
669 xcb_parts
[3].iov_base
= 0;
670 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
672 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
677 xcb_xf86dri_get_drawable_info_sizeof (const void *_buffer
/**< */)
679 char *xcb_tmp
= (char *)_buffer
;
680 const xcb_xf86dri_get_drawable_info_reply_t
*_aux
= (xcb_xf86dri_get_drawable_info_reply_t
*)_buffer
;
681 unsigned int xcb_buffer_len
= 0;
682 unsigned int xcb_block_len
= 0;
683 unsigned int xcb_pad
= 0;
684 unsigned int xcb_align_to
= 0;
687 xcb_block_len
+= sizeof(xcb_xf86dri_get_drawable_info_reply_t
);
688 xcb_tmp
+= xcb_block_len
;
689 xcb_buffer_len
+= xcb_block_len
;
692 xcb_block_len
+= _aux
->num_clip_rects
* sizeof(xcb_xf86dri_drm_clip_rect_t
);
693 xcb_tmp
+= xcb_block_len
;
694 xcb_align_to
= ALIGNOF(xcb_xf86dri_drm_clip_rect_t
);
696 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
697 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
703 /* back_clip_rects */
704 xcb_block_len
+= _aux
->num_back_clip_rects
* sizeof(xcb_xf86dri_drm_clip_rect_t
);
705 xcb_tmp
+= xcb_block_len
;
706 xcb_align_to
= ALIGNOF(xcb_xf86dri_drm_clip_rect_t
);
708 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
709 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
716 return xcb_buffer_len
;
719 xcb_xf86dri_get_drawable_info_cookie_t
720 xcb_xf86dri_get_drawable_info (xcb_connection_t
*c
/**< */,
721 uint32_t screen
/**< */,
722 uint32_t drawable
/**< */)
724 static const xcb_protocol_request_t xcb_req
= {
726 /* ext */ &xcb_xf86dri_id
,
727 /* opcode */ XCB_XF86DRI_GET_DRAWABLE_INFO
,
731 struct iovec xcb_parts
[4];
732 xcb_xf86dri_get_drawable_info_cookie_t xcb_ret
;
733 xcb_xf86dri_get_drawable_info_request_t xcb_out
;
735 xcb_out
.screen
= screen
;
736 xcb_out
.drawable
= drawable
;
738 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
739 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
740 xcb_parts
[3].iov_base
= 0;
741 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
743 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
747 xcb_xf86dri_get_drawable_info_cookie_t
748 xcb_xf86dri_get_drawable_info_unchecked (xcb_connection_t
*c
/**< */,
749 uint32_t screen
/**< */,
750 uint32_t drawable
/**< */)
752 static const xcb_protocol_request_t xcb_req
= {
754 /* ext */ &xcb_xf86dri_id
,
755 /* opcode */ XCB_XF86DRI_GET_DRAWABLE_INFO
,
759 struct iovec xcb_parts
[4];
760 xcb_xf86dri_get_drawable_info_cookie_t xcb_ret
;
761 xcb_xf86dri_get_drawable_info_request_t xcb_out
;
763 xcb_out
.screen
= screen
;
764 xcb_out
.drawable
= drawable
;
766 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
767 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
768 xcb_parts
[3].iov_base
= 0;
769 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
771 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
775 xcb_xf86dri_drm_clip_rect_t
*
776 xcb_xf86dri_get_drawable_info_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
778 return (xcb_xf86dri_drm_clip_rect_t
*) (R
+ 1);
782 xcb_xf86dri_get_drawable_info_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
784 return R
->num_clip_rects
;
787 xcb_xf86dri_drm_clip_rect_iterator_t
788 xcb_xf86dri_get_drawable_info_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
790 xcb_xf86dri_drm_clip_rect_iterator_t i
;
791 i
.data
= (xcb_xf86dri_drm_clip_rect_t
*) (R
+ 1);
792 i
.rem
= R
->num_clip_rects
;
793 i
.index
= (char *) i
.data
- (char *) R
;
797 xcb_xf86dri_drm_clip_rect_t
*
798 xcb_xf86dri_get_drawable_info_back_clip_rects (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
800 xcb_generic_iterator_t prev
= xcb_xf86dri_drm_clip_rect_end(xcb_xf86dri_get_drawable_info_clip_rects_iterator(R
));
801 return (xcb_xf86dri_drm_clip_rect_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_xf86dri_drm_clip_rect_t
, prev
.index
) + 0);
805 xcb_xf86dri_get_drawable_info_back_clip_rects_length (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
807 return R
->num_back_clip_rects
;
810 xcb_xf86dri_drm_clip_rect_iterator_t
811 xcb_xf86dri_get_drawable_info_back_clip_rects_iterator (const xcb_xf86dri_get_drawable_info_reply_t
*R
/**< */)
813 xcb_xf86dri_drm_clip_rect_iterator_t i
;
814 xcb_generic_iterator_t prev
= xcb_xf86dri_drm_clip_rect_end(xcb_xf86dri_get_drawable_info_clip_rects_iterator(R
));
815 i
.data
= (xcb_xf86dri_drm_clip_rect_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_xf86dri_drm_clip_rect_t
, prev
.index
));
816 i
.rem
= R
->num_back_clip_rects
;
817 i
.index
= (char *) i
.data
- (char *) R
;
821 xcb_xf86dri_get_drawable_info_reply_t
*
822 xcb_xf86dri_get_drawable_info_reply (xcb_connection_t
*c
/**< */,
823 xcb_xf86dri_get_drawable_info_cookie_t cookie
/**< */,
824 xcb_generic_error_t
**e
/**< */)
826 return (xcb_xf86dri_get_drawable_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
830 xcb_xf86dri_get_device_info_sizeof (const void *_buffer
/**< */)
832 char *xcb_tmp
= (char *)_buffer
;
833 const xcb_xf86dri_get_device_info_reply_t
*_aux
= (xcb_xf86dri_get_device_info_reply_t
*)_buffer
;
834 unsigned int xcb_buffer_len
= 0;
835 unsigned int xcb_block_len
= 0;
836 unsigned int xcb_pad
= 0;
837 unsigned int xcb_align_to
= 0;
840 xcb_block_len
+= sizeof(xcb_xf86dri_get_device_info_reply_t
);
841 xcb_tmp
+= xcb_block_len
;
842 xcb_buffer_len
+= xcb_block_len
;
845 xcb_block_len
+= _aux
->device_private_size
* sizeof(uint32_t);
846 xcb_tmp
+= xcb_block_len
;
847 xcb_align_to
= ALIGNOF(uint32_t);
849 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
850 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
857 return xcb_buffer_len
;
860 xcb_xf86dri_get_device_info_cookie_t
861 xcb_xf86dri_get_device_info (xcb_connection_t
*c
/**< */,
862 uint32_t screen
/**< */)
864 static const xcb_protocol_request_t xcb_req
= {
866 /* ext */ &xcb_xf86dri_id
,
867 /* opcode */ XCB_XF86DRI_GET_DEVICE_INFO
,
871 struct iovec xcb_parts
[4];
872 xcb_xf86dri_get_device_info_cookie_t xcb_ret
;
873 xcb_xf86dri_get_device_info_request_t xcb_out
;
875 xcb_out
.screen
= screen
;
877 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
878 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
879 xcb_parts
[3].iov_base
= 0;
880 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
882 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
886 xcb_xf86dri_get_device_info_cookie_t
887 xcb_xf86dri_get_device_info_unchecked (xcb_connection_t
*c
/**< */,
888 uint32_t screen
/**< */)
890 static const xcb_protocol_request_t xcb_req
= {
892 /* ext */ &xcb_xf86dri_id
,
893 /* opcode */ XCB_XF86DRI_GET_DEVICE_INFO
,
897 struct iovec xcb_parts
[4];
898 xcb_xf86dri_get_device_info_cookie_t xcb_ret
;
899 xcb_xf86dri_get_device_info_request_t xcb_out
;
901 xcb_out
.screen
= screen
;
903 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
904 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
905 xcb_parts
[3].iov_base
= 0;
906 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
908 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
913 xcb_xf86dri_get_device_info_device_private (const xcb_xf86dri_get_device_info_reply_t
*R
/**< */)
915 return (uint32_t *) (R
+ 1);
919 xcb_xf86dri_get_device_info_device_private_length (const xcb_xf86dri_get_device_info_reply_t
*R
/**< */)
921 return R
->device_private_size
;
924 xcb_generic_iterator_t
925 xcb_xf86dri_get_device_info_device_private_end (const xcb_xf86dri_get_device_info_reply_t
*R
/**< */)
927 xcb_generic_iterator_t i
;
928 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->device_private_size
);
930 i
.index
= (char *) i
.data
- (char *) R
;
934 xcb_xf86dri_get_device_info_reply_t
*
935 xcb_xf86dri_get_device_info_reply (xcb_connection_t
*c
/**< */,
936 xcb_xf86dri_get_device_info_cookie_t cookie
/**< */,
937 xcb_generic_error_t
**e
/**< */)
939 return (xcb_xf86dri_get_device_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
942 xcb_xf86dri_auth_connection_cookie_t
943 xcb_xf86dri_auth_connection (xcb_connection_t
*c
/**< */,
944 uint32_t screen
/**< */,
945 uint32_t magic
/**< */)
947 static const xcb_protocol_request_t xcb_req
= {
949 /* ext */ &xcb_xf86dri_id
,
950 /* opcode */ XCB_XF86DRI_AUTH_CONNECTION
,
954 struct iovec xcb_parts
[4];
955 xcb_xf86dri_auth_connection_cookie_t xcb_ret
;
956 xcb_xf86dri_auth_connection_request_t xcb_out
;
958 xcb_out
.screen
= screen
;
959 xcb_out
.magic
= magic
;
961 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
962 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
963 xcb_parts
[3].iov_base
= 0;
964 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
966 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
970 xcb_xf86dri_auth_connection_cookie_t
971 xcb_xf86dri_auth_connection_unchecked (xcb_connection_t
*c
/**< */,
972 uint32_t screen
/**< */,
973 uint32_t magic
/**< */)
975 static const xcb_protocol_request_t xcb_req
= {
977 /* ext */ &xcb_xf86dri_id
,
978 /* opcode */ XCB_XF86DRI_AUTH_CONNECTION
,
982 struct iovec xcb_parts
[4];
983 xcb_xf86dri_auth_connection_cookie_t xcb_ret
;
984 xcb_xf86dri_auth_connection_request_t xcb_out
;
986 xcb_out
.screen
= screen
;
987 xcb_out
.magic
= magic
;
989 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
990 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
991 xcb_parts
[3].iov_base
= 0;
992 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
994 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
998 xcb_xf86dri_auth_connection_reply_t
*
999 xcb_xf86dri_auth_connection_reply (xcb_connection_t
*c
/**< */,
1000 xcb_xf86dri_auth_connection_cookie_t cookie
/**< */,
1001 xcb_generic_error_t
**e
/**< */)
1003 return (xcb_xf86dri_auth_connection_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);