2 * This file generated automatically from res.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_res_id
= { "X-Resource", 0 };
22 xcb_res_client_next (xcb_res_client_iterator_t
*i
/**< */)
26 i
->index
+= sizeof(xcb_res_client_t
);
29 xcb_generic_iterator_t
30 xcb_res_client_end (xcb_res_client_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_res_type_next (xcb_res_type_iterator_t
*i
/**< */)
44 i
->index
+= sizeof(xcb_res_type_t
);
47 xcb_generic_iterator_t
48 xcb_res_type_end (xcb_res_type_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
);
58 xcb_res_client_id_spec_next (xcb_res_client_id_spec_iterator_t
*i
/**< */)
62 i
->index
+= sizeof(xcb_res_client_id_spec_t
);
65 xcb_generic_iterator_t
66 xcb_res_client_id_spec_end (xcb_res_client_id_spec_iterator_t i
/**< */)
68 xcb_generic_iterator_t ret
;
69 ret
.data
= i
.data
+ i
.rem
;
70 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
76 xcb_res_client_id_value_sizeof (const void *_buffer
/**< */)
78 char *xcb_tmp
= (char *)_buffer
;
79 const xcb_res_client_id_value_t
*_aux
= (xcb_res_client_id_value_t
*)_buffer
;
80 unsigned int xcb_buffer_len
= 0;
81 unsigned int xcb_block_len
= 0;
82 unsigned int xcb_pad
= 0;
83 unsigned int xcb_align_to
= 0;
86 xcb_block_len
+= sizeof(xcb_res_client_id_value_t
);
87 xcb_tmp
+= xcb_block_len
;
88 xcb_buffer_len
+= xcb_block_len
;
91 xcb_block_len
+= _aux
->length
* sizeof(uint32_t);
92 xcb_tmp
+= xcb_block_len
;
93 xcb_align_to
= ALIGNOF(uint32_t);
95 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
96 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
103 return xcb_buffer_len
;
107 xcb_res_client_id_value_value (const xcb_res_client_id_value_t
*R
/**< */)
109 return (uint32_t *) (R
+ 1);
113 xcb_res_client_id_value_value_length (const xcb_res_client_id_value_t
*R
/**< */)
118 xcb_generic_iterator_t
119 xcb_res_client_id_value_value_end (const xcb_res_client_id_value_t
*R
/**< */)
121 xcb_generic_iterator_t i
;
122 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->length
);
124 i
.index
= (char *) i
.data
- (char *) R
;
129 xcb_res_client_id_value_next (xcb_res_client_id_value_iterator_t
*i
/**< */)
131 xcb_res_client_id_value_t
*R
= i
->data
;
132 xcb_generic_iterator_t child
;
133 child
.data
= (xcb_res_client_id_value_t
*)(((char *)R
) + xcb_res_client_id_value_sizeof(R
));
134 i
->index
= (char *) child
.data
- (char *) i
->data
;
136 i
->data
= (xcb_res_client_id_value_t
*) child
.data
;
139 xcb_generic_iterator_t
140 xcb_res_client_id_value_end (xcb_res_client_id_value_iterator_t i
/**< */)
142 xcb_generic_iterator_t ret
;
144 xcb_res_client_id_value_next(&i
);
152 xcb_res_resource_id_spec_next (xcb_res_resource_id_spec_iterator_t
*i
/**< */)
156 i
->index
+= sizeof(xcb_res_resource_id_spec_t
);
159 xcb_generic_iterator_t
160 xcb_res_resource_id_spec_end (xcb_res_resource_id_spec_iterator_t i
/**< */)
162 xcb_generic_iterator_t ret
;
163 ret
.data
= i
.data
+ i
.rem
;
164 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
170 xcb_res_resource_size_spec_next (xcb_res_resource_size_spec_iterator_t
*i
/**< */)
174 i
->index
+= sizeof(xcb_res_resource_size_spec_t
);
177 xcb_generic_iterator_t
178 xcb_res_resource_size_spec_end (xcb_res_resource_size_spec_iterator_t i
/**< */)
180 xcb_generic_iterator_t ret
;
181 ret
.data
= i
.data
+ i
.rem
;
182 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
188 xcb_res_resource_size_value_sizeof (const void *_buffer
/**< */)
190 char *xcb_tmp
= (char *)_buffer
;
191 const xcb_res_resource_size_value_t
*_aux
= (xcb_res_resource_size_value_t
*)_buffer
;
192 unsigned int xcb_buffer_len
= 0;
193 unsigned int xcb_block_len
= 0;
194 unsigned int xcb_pad
= 0;
195 unsigned int xcb_align_to
= 0;
198 xcb_block_len
+= sizeof(xcb_res_resource_size_value_t
);
199 xcb_tmp
+= xcb_block_len
;
200 xcb_buffer_len
+= xcb_block_len
;
202 /* cross_references */
203 xcb_block_len
+= _aux
->num_cross_references
* sizeof(xcb_res_resource_size_spec_t
);
204 xcb_tmp
+= xcb_block_len
;
205 xcb_align_to
= ALIGNOF(xcb_res_resource_size_spec_t
);
207 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
208 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
215 return xcb_buffer_len
;
218 xcb_res_resource_size_spec_t
*
219 xcb_res_resource_size_value_cross_references (const xcb_res_resource_size_value_t
*R
/**< */)
221 return (xcb_res_resource_size_spec_t
*) (R
+ 1);
225 xcb_res_resource_size_value_cross_references_length (const xcb_res_resource_size_value_t
*R
/**< */)
227 return R
->num_cross_references
;
230 xcb_res_resource_size_spec_iterator_t
231 xcb_res_resource_size_value_cross_references_iterator (const xcb_res_resource_size_value_t
*R
/**< */)
233 xcb_res_resource_size_spec_iterator_t i
;
234 i
.data
= (xcb_res_resource_size_spec_t
*) (R
+ 1);
235 i
.rem
= R
->num_cross_references
;
236 i
.index
= (char *) i
.data
- (char *) R
;
241 xcb_res_resource_size_value_next (xcb_res_resource_size_value_iterator_t
*i
/**< */)
243 xcb_res_resource_size_value_t
*R
= i
->data
;
244 xcb_generic_iterator_t child
;
245 child
.data
= (xcb_res_resource_size_value_t
*)(((char *)R
) + xcb_res_resource_size_value_sizeof(R
));
246 i
->index
= (char *) child
.data
- (char *) i
->data
;
248 i
->data
= (xcb_res_resource_size_value_t
*) child
.data
;
251 xcb_generic_iterator_t
252 xcb_res_resource_size_value_end (xcb_res_resource_size_value_iterator_t i
/**< */)
254 xcb_generic_iterator_t ret
;
256 xcb_res_resource_size_value_next(&i
);
263 xcb_res_query_version_cookie_t
264 xcb_res_query_version (xcb_connection_t
*c
/**< */,
265 uint8_t client_major
/**< */,
266 uint8_t client_minor
/**< */)
268 static const xcb_protocol_request_t xcb_req
= {
270 /* ext */ &xcb_res_id
,
271 /* opcode */ XCB_RES_QUERY_VERSION
,
275 struct iovec xcb_parts
[4];
276 xcb_res_query_version_cookie_t xcb_ret
;
277 xcb_res_query_version_request_t xcb_out
;
279 xcb_out
.client_major
= client_major
;
280 xcb_out
.client_minor
= client_minor
;
282 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
283 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
284 xcb_parts
[3].iov_base
= 0;
285 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
287 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
291 xcb_res_query_version_cookie_t
292 xcb_res_query_version_unchecked (xcb_connection_t
*c
/**< */,
293 uint8_t client_major
/**< */,
294 uint8_t client_minor
/**< */)
296 static const xcb_protocol_request_t xcb_req
= {
298 /* ext */ &xcb_res_id
,
299 /* opcode */ XCB_RES_QUERY_VERSION
,
303 struct iovec xcb_parts
[4];
304 xcb_res_query_version_cookie_t xcb_ret
;
305 xcb_res_query_version_request_t xcb_out
;
307 xcb_out
.client_major
= client_major
;
308 xcb_out
.client_minor
= client_minor
;
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
);
319 xcb_res_query_version_reply_t
*
320 xcb_res_query_version_reply (xcb_connection_t
*c
/**< */,
321 xcb_res_query_version_cookie_t cookie
/**< */,
322 xcb_generic_error_t
**e
/**< */)
324 return (xcb_res_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
328 xcb_res_query_clients_sizeof (const void *_buffer
/**< */)
330 char *xcb_tmp
= (char *)_buffer
;
331 const xcb_res_query_clients_reply_t
*_aux
= (xcb_res_query_clients_reply_t
*)_buffer
;
332 unsigned int xcb_buffer_len
= 0;
333 unsigned int xcb_block_len
= 0;
334 unsigned int xcb_pad
= 0;
335 unsigned int xcb_align_to
= 0;
338 xcb_block_len
+= sizeof(xcb_res_query_clients_reply_t
);
339 xcb_tmp
+= xcb_block_len
;
340 xcb_buffer_len
+= xcb_block_len
;
343 xcb_block_len
+= _aux
->num_clients
* sizeof(xcb_res_client_t
);
344 xcb_tmp
+= xcb_block_len
;
345 xcb_align_to
= ALIGNOF(xcb_res_client_t
);
347 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
348 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
355 return xcb_buffer_len
;
358 xcb_res_query_clients_cookie_t
359 xcb_res_query_clients (xcb_connection_t
*c
/**< */)
361 static const xcb_protocol_request_t xcb_req
= {
363 /* ext */ &xcb_res_id
,
364 /* opcode */ XCB_RES_QUERY_CLIENTS
,
368 struct iovec xcb_parts
[4];
369 xcb_res_query_clients_cookie_t xcb_ret
;
370 xcb_res_query_clients_request_t xcb_out
;
373 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
374 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
375 xcb_parts
[3].iov_base
= 0;
376 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
378 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
382 xcb_res_query_clients_cookie_t
383 xcb_res_query_clients_unchecked (xcb_connection_t
*c
/**< */)
385 static const xcb_protocol_request_t xcb_req
= {
387 /* ext */ &xcb_res_id
,
388 /* opcode */ XCB_RES_QUERY_CLIENTS
,
392 struct iovec xcb_parts
[4];
393 xcb_res_query_clients_cookie_t xcb_ret
;
394 xcb_res_query_clients_request_t xcb_out
;
397 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
398 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
399 xcb_parts
[3].iov_base
= 0;
400 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
402 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
407 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t
*R
/**< */)
409 return (xcb_res_client_t
*) (R
+ 1);
413 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t
*R
/**< */)
415 return R
->num_clients
;
418 xcb_res_client_iterator_t
419 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t
*R
/**< */)
421 xcb_res_client_iterator_t i
;
422 i
.data
= (xcb_res_client_t
*) (R
+ 1);
423 i
.rem
= R
->num_clients
;
424 i
.index
= (char *) i
.data
- (char *) R
;
428 xcb_res_query_clients_reply_t
*
429 xcb_res_query_clients_reply (xcb_connection_t
*c
/**< */,
430 xcb_res_query_clients_cookie_t cookie
/**< */,
431 xcb_generic_error_t
**e
/**< */)
433 return (xcb_res_query_clients_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
437 xcb_res_query_client_resources_sizeof (const void *_buffer
/**< */)
439 char *xcb_tmp
= (char *)_buffer
;
440 const xcb_res_query_client_resources_reply_t
*_aux
= (xcb_res_query_client_resources_reply_t
*)_buffer
;
441 unsigned int xcb_buffer_len
= 0;
442 unsigned int xcb_block_len
= 0;
443 unsigned int xcb_pad
= 0;
444 unsigned int xcb_align_to
= 0;
447 xcb_block_len
+= sizeof(xcb_res_query_client_resources_reply_t
);
448 xcb_tmp
+= xcb_block_len
;
449 xcb_buffer_len
+= xcb_block_len
;
452 xcb_block_len
+= _aux
->num_types
* sizeof(xcb_res_type_t
);
453 xcb_tmp
+= xcb_block_len
;
454 xcb_align_to
= ALIGNOF(xcb_res_type_t
);
456 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
457 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
464 return xcb_buffer_len
;
467 xcb_res_query_client_resources_cookie_t
468 xcb_res_query_client_resources (xcb_connection_t
*c
/**< */,
469 uint32_t xid
/**< */)
471 static const xcb_protocol_request_t xcb_req
= {
473 /* ext */ &xcb_res_id
,
474 /* opcode */ XCB_RES_QUERY_CLIENT_RESOURCES
,
478 struct iovec xcb_parts
[4];
479 xcb_res_query_client_resources_cookie_t xcb_ret
;
480 xcb_res_query_client_resources_request_t xcb_out
;
484 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
485 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
486 xcb_parts
[3].iov_base
= 0;
487 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
489 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
493 xcb_res_query_client_resources_cookie_t
494 xcb_res_query_client_resources_unchecked (xcb_connection_t
*c
/**< */,
495 uint32_t xid
/**< */)
497 static const xcb_protocol_request_t xcb_req
= {
499 /* ext */ &xcb_res_id
,
500 /* opcode */ XCB_RES_QUERY_CLIENT_RESOURCES
,
504 struct iovec xcb_parts
[4];
505 xcb_res_query_client_resources_cookie_t xcb_ret
;
506 xcb_res_query_client_resources_request_t xcb_out
;
510 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
511 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
512 xcb_parts
[3].iov_base
= 0;
513 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
515 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
520 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t
*R
/**< */)
522 return (xcb_res_type_t
*) (R
+ 1);
526 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t
*R
/**< */)
531 xcb_res_type_iterator_t
532 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t
*R
/**< */)
534 xcb_res_type_iterator_t i
;
535 i
.data
= (xcb_res_type_t
*) (R
+ 1);
536 i
.rem
= R
->num_types
;
537 i
.index
= (char *) i
.data
- (char *) R
;
541 xcb_res_query_client_resources_reply_t
*
542 xcb_res_query_client_resources_reply (xcb_connection_t
*c
/**< */,
543 xcb_res_query_client_resources_cookie_t cookie
/**< */,
544 xcb_generic_error_t
**e
/**< */)
546 return (xcb_res_query_client_resources_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
549 xcb_res_query_client_pixmap_bytes_cookie_t
550 xcb_res_query_client_pixmap_bytes (xcb_connection_t
*c
/**< */,
551 uint32_t xid
/**< */)
553 static const xcb_protocol_request_t xcb_req
= {
555 /* ext */ &xcb_res_id
,
556 /* opcode */ XCB_RES_QUERY_CLIENT_PIXMAP_BYTES
,
560 struct iovec xcb_parts
[4];
561 xcb_res_query_client_pixmap_bytes_cookie_t xcb_ret
;
562 xcb_res_query_client_pixmap_bytes_request_t xcb_out
;
566 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
567 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
568 xcb_parts
[3].iov_base
= 0;
569 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
571 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
575 xcb_res_query_client_pixmap_bytes_cookie_t
576 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t
*c
/**< */,
577 uint32_t xid
/**< */)
579 static const xcb_protocol_request_t xcb_req
= {
581 /* ext */ &xcb_res_id
,
582 /* opcode */ XCB_RES_QUERY_CLIENT_PIXMAP_BYTES
,
586 struct iovec xcb_parts
[4];
587 xcb_res_query_client_pixmap_bytes_cookie_t xcb_ret
;
588 xcb_res_query_client_pixmap_bytes_request_t xcb_out
;
592 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
593 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
594 xcb_parts
[3].iov_base
= 0;
595 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
597 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
601 xcb_res_query_client_pixmap_bytes_reply_t
*
602 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t
*c
/**< */,
603 xcb_res_query_client_pixmap_bytes_cookie_t cookie
/**< */,
604 xcb_generic_error_t
**e
/**< */)
606 return (xcb_res_query_client_pixmap_bytes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
610 xcb_res_query_client_ids_sizeof (const void *_buffer
/**< */)
612 char *xcb_tmp
= (char *)_buffer
;
613 const xcb_res_query_client_ids_request_t
*_aux
= (xcb_res_query_client_ids_request_t
*)_buffer
;
614 unsigned int xcb_buffer_len
= 0;
615 unsigned int xcb_block_len
= 0;
616 unsigned int xcb_pad
= 0;
617 unsigned int xcb_align_to
= 0;
620 xcb_block_len
+= sizeof(xcb_res_query_client_ids_request_t
);
621 xcb_tmp
+= xcb_block_len
;
622 xcb_buffer_len
+= xcb_block_len
;
625 xcb_block_len
+= _aux
->num_specs
* sizeof(xcb_res_client_id_spec_t
);
626 xcb_tmp
+= xcb_block_len
;
627 xcb_align_to
= ALIGNOF(xcb_res_client_id_spec_t
);
629 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
630 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
637 return xcb_buffer_len
;
640 xcb_res_query_client_ids_cookie_t
641 xcb_res_query_client_ids (xcb_connection_t
*c
/**< */,
642 uint32_t num_specs
/**< */,
643 const xcb_res_client_id_spec_t
*specs
/**< */)
645 static const xcb_protocol_request_t xcb_req
= {
647 /* ext */ &xcb_res_id
,
648 /* opcode */ XCB_RES_QUERY_CLIENT_IDS
,
652 struct iovec xcb_parts
[6];
653 xcb_res_query_client_ids_cookie_t xcb_ret
;
654 xcb_res_query_client_ids_request_t xcb_out
;
656 xcb_out
.num_specs
= num_specs
;
658 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
659 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
660 xcb_parts
[3].iov_base
= 0;
661 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
662 /* xcb_res_client_id_spec_t specs */
663 xcb_parts
[4].iov_base
= (char *) specs
;
664 xcb_parts
[4].iov_len
= num_specs
* sizeof(xcb_res_client_id_spec_t
);
665 xcb_parts
[5].iov_base
= 0;
666 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
668 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
672 xcb_res_query_client_ids_cookie_t
673 xcb_res_query_client_ids_unchecked (xcb_connection_t
*c
/**< */,
674 uint32_t num_specs
/**< */,
675 const xcb_res_client_id_spec_t
*specs
/**< */)
677 static const xcb_protocol_request_t xcb_req
= {
679 /* ext */ &xcb_res_id
,
680 /* opcode */ XCB_RES_QUERY_CLIENT_IDS
,
684 struct iovec xcb_parts
[6];
685 xcb_res_query_client_ids_cookie_t xcb_ret
;
686 xcb_res_query_client_ids_request_t xcb_out
;
688 xcb_out
.num_specs
= num_specs
;
690 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
691 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
692 xcb_parts
[3].iov_base
= 0;
693 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
694 /* xcb_res_client_id_spec_t specs */
695 xcb_parts
[4].iov_base
= (char *) specs
;
696 xcb_parts
[4].iov_len
= num_specs
* sizeof(xcb_res_client_id_spec_t
);
697 xcb_parts
[5].iov_base
= 0;
698 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
700 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
705 xcb_res_query_client_ids_ids_length (const xcb_res_query_client_ids_reply_t
*R
/**< */)
710 xcb_res_client_id_value_iterator_t
711 xcb_res_query_client_ids_ids_iterator (const xcb_res_query_client_ids_reply_t
*R
/**< */)
713 xcb_res_client_id_value_iterator_t i
;
714 i
.data
= (xcb_res_client_id_value_t
*) (R
+ 1);
716 i
.index
= (char *) i
.data
- (char *) R
;
720 xcb_res_query_client_ids_reply_t
*
721 xcb_res_query_client_ids_reply (xcb_connection_t
*c
/**< */,
722 xcb_res_query_client_ids_cookie_t cookie
/**< */,
723 xcb_generic_error_t
**e
/**< */)
725 return (xcb_res_query_client_ids_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
729 xcb_res_query_resource_bytes_sizeof (const void *_buffer
/**< */)
731 char *xcb_tmp
= (char *)_buffer
;
732 const xcb_res_query_resource_bytes_request_t
*_aux
= (xcb_res_query_resource_bytes_request_t
*)_buffer
;
733 unsigned int xcb_buffer_len
= 0;
734 unsigned int xcb_block_len
= 0;
735 unsigned int xcb_pad
= 0;
736 unsigned int xcb_align_to
= 0;
739 xcb_block_len
+= sizeof(xcb_res_query_resource_bytes_request_t
);
740 xcb_tmp
+= xcb_block_len
;
741 xcb_buffer_len
+= xcb_block_len
;
744 xcb_block_len
+= _aux
->num_specs
* sizeof(xcb_res_resource_id_spec_t
);
745 xcb_tmp
+= xcb_block_len
;
746 xcb_align_to
= ALIGNOF(xcb_res_resource_id_spec_t
);
748 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
749 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
756 return xcb_buffer_len
;
759 xcb_res_query_resource_bytes_cookie_t
760 xcb_res_query_resource_bytes (xcb_connection_t
*c
/**< */,
761 uint32_t client
/**< */,
762 uint32_t num_specs
/**< */,
763 const xcb_res_resource_id_spec_t
*specs
/**< */)
765 static const xcb_protocol_request_t xcb_req
= {
767 /* ext */ &xcb_res_id
,
768 /* opcode */ XCB_RES_QUERY_RESOURCE_BYTES
,
772 struct iovec xcb_parts
[6];
773 xcb_res_query_resource_bytes_cookie_t xcb_ret
;
774 xcb_res_query_resource_bytes_request_t xcb_out
;
776 xcb_out
.client
= client
;
777 xcb_out
.num_specs
= num_specs
;
779 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
780 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
781 xcb_parts
[3].iov_base
= 0;
782 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
783 /* xcb_res_resource_id_spec_t specs */
784 xcb_parts
[4].iov_base
= (char *) specs
;
785 xcb_parts
[4].iov_len
= num_specs
* sizeof(xcb_res_resource_id_spec_t
);
786 xcb_parts
[5].iov_base
= 0;
787 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
789 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
793 xcb_res_query_resource_bytes_cookie_t
794 xcb_res_query_resource_bytes_unchecked (xcb_connection_t
*c
/**< */,
795 uint32_t client
/**< */,
796 uint32_t num_specs
/**< */,
797 const xcb_res_resource_id_spec_t
*specs
/**< */)
799 static const xcb_protocol_request_t xcb_req
= {
801 /* ext */ &xcb_res_id
,
802 /* opcode */ XCB_RES_QUERY_RESOURCE_BYTES
,
806 struct iovec xcb_parts
[6];
807 xcb_res_query_resource_bytes_cookie_t xcb_ret
;
808 xcb_res_query_resource_bytes_request_t xcb_out
;
810 xcb_out
.client
= client
;
811 xcb_out
.num_specs
= num_specs
;
813 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
814 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
815 xcb_parts
[3].iov_base
= 0;
816 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
817 /* xcb_res_resource_id_spec_t specs */
818 xcb_parts
[4].iov_base
= (char *) specs
;
819 xcb_parts
[4].iov_len
= num_specs
* sizeof(xcb_res_resource_id_spec_t
);
820 xcb_parts
[5].iov_base
= 0;
821 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
823 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
828 xcb_res_query_resource_bytes_sizes_length (const xcb_res_query_resource_bytes_reply_t
*R
/**< */)
833 xcb_res_resource_size_value_iterator_t
834 xcb_res_query_resource_bytes_sizes_iterator (const xcb_res_query_resource_bytes_reply_t
*R
/**< */)
836 xcb_res_resource_size_value_iterator_t i
;
837 i
.data
= (xcb_res_resource_size_value_t
*) (R
+ 1);
838 i
.rem
= R
->num_sizes
;
839 i
.index
= (char *) i
.data
- (char *) R
;
843 xcb_res_query_resource_bytes_reply_t
*
844 xcb_res_query_resource_bytes_reply (xcb_connection_t
*c
/**< */,
845 xcb_res_query_resource_bytes_cookie_t cookie
/**< */,
846 xcb_generic_error_t
**e
/**< */)
848 return (xcb_res_query_resource_bytes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);