xref: /minix3/external/mit/xorg/lib/libxcb/files/randr.c (revision b80da2a01d0bb632707b7b4e974aa32eaebbcc6f)
1 /*
2  * This file generated automatically from randr.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
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 "randr.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 #include "render.h"
19 
20 xcb_extension_t xcb_randr_id = { "RANDR", 0 };
21 
22 
23 /*****************************************************************************
24  **
25  ** void xcb_randr_mode_next
26  **
27  ** @param xcb_randr_mode_iterator_t *i
28  ** @returns void
29  **
30  *****************************************************************************/
31 
32 void
33 xcb_randr_mode_next (xcb_randr_mode_iterator_t *i  /**< */)
34 {
35     --i->rem;
36     ++i->data;
37     i->index += sizeof(xcb_randr_mode_t);
38 }
39 
40 
41 /*****************************************************************************
42  **
43  ** xcb_generic_iterator_t xcb_randr_mode_end
44  **
45  ** @param xcb_randr_mode_iterator_t i
46  ** @returns xcb_generic_iterator_t
47  **
48  *****************************************************************************/
49 
50 xcb_generic_iterator_t
51 xcb_randr_mode_end (xcb_randr_mode_iterator_t i  /**< */)
52 {
53     xcb_generic_iterator_t ret;
54     ret.data = i.data + i.rem;
55     ret.index = i.index + ((char *) ret.data - (char *) i.data);
56     ret.rem = 0;
57     return ret;
58 }
59 
60 
61 /*****************************************************************************
62  **
63  ** void xcb_randr_crtc_next
64  **
65  ** @param xcb_randr_crtc_iterator_t *i
66  ** @returns void
67  **
68  *****************************************************************************/
69 
70 void
71 xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i  /**< */)
72 {
73     --i->rem;
74     ++i->data;
75     i->index += sizeof(xcb_randr_crtc_t);
76 }
77 
78 
79 /*****************************************************************************
80  **
81  ** xcb_generic_iterator_t xcb_randr_crtc_end
82  **
83  ** @param xcb_randr_crtc_iterator_t i
84  ** @returns xcb_generic_iterator_t
85  **
86  *****************************************************************************/
87 
88 xcb_generic_iterator_t
89 xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i  /**< */)
90 {
91     xcb_generic_iterator_t ret;
92     ret.data = i.data + i.rem;
93     ret.index = i.index + ((char *) ret.data - (char *) i.data);
94     ret.rem = 0;
95     return ret;
96 }
97 
98 
99 /*****************************************************************************
100  **
101  ** void xcb_randr_output_next
102  **
103  ** @param xcb_randr_output_iterator_t *i
104  ** @returns void
105  **
106  *****************************************************************************/
107 
108 void
109 xcb_randr_output_next (xcb_randr_output_iterator_t *i  /**< */)
110 {
111     --i->rem;
112     ++i->data;
113     i->index += sizeof(xcb_randr_output_t);
114 }
115 
116 
117 /*****************************************************************************
118  **
119  ** xcb_generic_iterator_t xcb_randr_output_end
120  **
121  ** @param xcb_randr_output_iterator_t i
122  ** @returns xcb_generic_iterator_t
123  **
124  *****************************************************************************/
125 
126 xcb_generic_iterator_t
127 xcb_randr_output_end (xcb_randr_output_iterator_t i  /**< */)
128 {
129     xcb_generic_iterator_t ret;
130     ret.data = i.data + i.rem;
131     ret.index = i.index + ((char *) ret.data - (char *) i.data);
132     ret.rem = 0;
133     return ret;
134 }
135 
136 
137 /*****************************************************************************
138  **
139  ** void xcb_randr_screen_size_next
140  **
141  ** @param xcb_randr_screen_size_iterator_t *i
142  ** @returns void
143  **
144  *****************************************************************************/
145 
146 void
147 xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i  /**< */)
148 {
149     --i->rem;
150     ++i->data;
151     i->index += sizeof(xcb_randr_screen_size_t);
152 }
153 
154 
155 /*****************************************************************************
156  **
157  ** xcb_generic_iterator_t xcb_randr_screen_size_end
158  **
159  ** @param xcb_randr_screen_size_iterator_t i
160  ** @returns xcb_generic_iterator_t
161  **
162  *****************************************************************************/
163 
164 xcb_generic_iterator_t
165 xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i  /**< */)
166 {
167     xcb_generic_iterator_t ret;
168     ret.data = i.data + i.rem;
169     ret.index = i.index + ((char *) ret.data - (char *) i.data);
170     ret.rem = 0;
171     return ret;
172 }
173 
174 int
175 xcb_randr_refresh_rates_sizeof (const void  *_buffer  /**< */)
176 {
177     char *xcb_tmp = (char *)_buffer;
178     const xcb_randr_refresh_rates_t *_aux = (xcb_randr_refresh_rates_t *)_buffer;
179     unsigned int xcb_buffer_len = 0;
180     unsigned int xcb_block_len = 0;
181     unsigned int xcb_pad = 0;
182     unsigned int xcb_align_to;
183 
184 
185     xcb_block_len += sizeof(xcb_randr_refresh_rates_t);
186     xcb_tmp += xcb_block_len;
187     /* rates */
188     xcb_block_len += _aux->nRates * sizeof(uint16_t);
189     xcb_tmp += xcb_block_len;
190     xcb_align_to = ALIGNOF(uint16_t);
191     /* insert padding */
192     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
193     xcb_buffer_len += xcb_block_len + xcb_pad;
194     if (0 != xcb_pad) {
195         xcb_tmp += xcb_pad;
196         xcb_pad = 0;
197     }
198     xcb_block_len = 0;
199 
200     return xcb_buffer_len;
201 }
202 
203 
204 /*****************************************************************************
205  **
206  ** uint16_t * xcb_randr_refresh_rates_rates
207  **
208  ** @param const xcb_randr_refresh_rates_t *R
209  ** @returns uint16_t *
210  **
211  *****************************************************************************/
212 
213 uint16_t *
214 xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R  /**< */)
215 {
216     return (uint16_t *) (R + 1);
217 }
218 
219 
220 /*****************************************************************************
221  **
222  ** int xcb_randr_refresh_rates_rates_length
223  **
224  ** @param const xcb_randr_refresh_rates_t *R
225  ** @returns int
226  **
227  *****************************************************************************/
228 
229 int
230 xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R  /**< */)
231 {
232     return R->nRates;
233 }
234 
235 
236 /*****************************************************************************
237  **
238  ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end
239  **
240  ** @param const xcb_randr_refresh_rates_t *R
241  ** @returns xcb_generic_iterator_t
242  **
243  *****************************************************************************/
244 
245 xcb_generic_iterator_t
246 xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R  /**< */)
247 {
248     xcb_generic_iterator_t i;
249     i.data = ((uint16_t *) (R + 1)) + (R->nRates);
250     i.rem = 0;
251     i.index = (char *) i.data - (char *) R;
252     return i;
253 }
254 
255 
256 /*****************************************************************************
257  **
258  ** void xcb_randr_refresh_rates_next
259  **
260  ** @param xcb_randr_refresh_rates_iterator_t *i
261  ** @returns void
262  **
263  *****************************************************************************/
264 
265 void
266 xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i  /**< */)
267 {
268     xcb_randr_refresh_rates_t *R = i->data;
269     xcb_generic_iterator_t child;
270     child.data = (xcb_randr_refresh_rates_t *)(((char *)R) + xcb_randr_refresh_rates_sizeof(R));
271     i->index = (char *) child.data - (char *) i->data;
272     --i->rem;
273     i->data = (xcb_randr_refresh_rates_t *) child.data;
274 }
275 
276 
277 /*****************************************************************************
278  **
279  ** xcb_generic_iterator_t xcb_randr_refresh_rates_end
280  **
281  ** @param xcb_randr_refresh_rates_iterator_t i
282  ** @returns xcb_generic_iterator_t
283  **
284  *****************************************************************************/
285 
286 xcb_generic_iterator_t
287 xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i  /**< */)
288 {
289     xcb_generic_iterator_t ret;
290     while(i.rem > 0)
291         xcb_randr_refresh_rates_next(&i);
292     ret.data = i.data;
293     ret.rem = i.rem;
294     ret.index = i.index;
295     return ret;
296 }
297 
298 
299 /*****************************************************************************
300  **
301  ** xcb_randr_query_version_cookie_t xcb_randr_query_version
302  **
303  ** @param xcb_connection_t *c
304  ** @param uint32_t          major_version
305  ** @param uint32_t          minor_version
306  ** @returns xcb_randr_query_version_cookie_t
307  **
308  *****************************************************************************/
309 
310 xcb_randr_query_version_cookie_t
311 xcb_randr_query_version (xcb_connection_t *c  /**< */,
312                          uint32_t          major_version  /**< */,
313                          uint32_t          minor_version  /**< */)
314 {
315     static const xcb_protocol_request_t xcb_req = {
316         /* count */ 2,
317         /* ext */ &xcb_randr_id,
318         /* opcode */ XCB_RANDR_QUERY_VERSION,
319         /* isvoid */ 0
320     };
321 
322     struct iovec xcb_parts[4];
323     xcb_randr_query_version_cookie_t xcb_ret;
324     xcb_randr_query_version_request_t xcb_out;
325 
326     xcb_out.major_version = major_version;
327     xcb_out.minor_version = minor_version;
328 
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;
333 
334     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
335     return xcb_ret;
336 }
337 
338 
339 /*****************************************************************************
340  **
341  ** xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked
342  **
343  ** @param xcb_connection_t *c
344  ** @param uint32_t          major_version
345  ** @param uint32_t          minor_version
346  ** @returns xcb_randr_query_version_cookie_t
347  **
348  *****************************************************************************/
349 
350 xcb_randr_query_version_cookie_t
351 xcb_randr_query_version_unchecked (xcb_connection_t *c  /**< */,
352                                    uint32_t          major_version  /**< */,
353                                    uint32_t          minor_version  /**< */)
354 {
355     static const xcb_protocol_request_t xcb_req = {
356         /* count */ 2,
357         /* ext */ &xcb_randr_id,
358         /* opcode */ XCB_RANDR_QUERY_VERSION,
359         /* isvoid */ 0
360     };
361 
362     struct iovec xcb_parts[4];
363     xcb_randr_query_version_cookie_t xcb_ret;
364     xcb_randr_query_version_request_t xcb_out;
365 
366     xcb_out.major_version = major_version;
367     xcb_out.minor_version = minor_version;
368 
369     xcb_parts[2].iov_base = (char *) &xcb_out;
370     xcb_parts[2].iov_len = sizeof(xcb_out);
371     xcb_parts[3].iov_base = 0;
372     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
373 
374     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
375     return xcb_ret;
376 }
377 
378 
379 /*****************************************************************************
380  **
381  ** xcb_randr_query_version_reply_t * xcb_randr_query_version_reply
382  **
383  ** @param xcb_connection_t                  *c
384  ** @param xcb_randr_query_version_cookie_t   cookie
385  ** @param xcb_generic_error_t              **e
386  ** @returns xcb_randr_query_version_reply_t *
387  **
388  *****************************************************************************/
389 
390 xcb_randr_query_version_reply_t *
391 xcb_randr_query_version_reply (xcb_connection_t                  *c  /**< */,
392                                xcb_randr_query_version_cookie_t   cookie  /**< */,
393                                xcb_generic_error_t              **e  /**< */)
394 {
395     return (xcb_randr_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
396 }
397 
398 
399 /*****************************************************************************
400  **
401  ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config
402  **
403  ** @param xcb_connection_t *c
404  ** @param xcb_window_t      window
405  ** @param xcb_timestamp_t   timestamp
406  ** @param xcb_timestamp_t   config_timestamp
407  ** @param uint16_t          sizeID
408  ** @param uint16_t          rotation
409  ** @param uint16_t          rate
410  ** @returns xcb_randr_set_screen_config_cookie_t
411  **
412  *****************************************************************************/
413 
414 xcb_randr_set_screen_config_cookie_t
415 xcb_randr_set_screen_config (xcb_connection_t *c  /**< */,
416                              xcb_window_t      window  /**< */,
417                              xcb_timestamp_t   timestamp  /**< */,
418                              xcb_timestamp_t   config_timestamp  /**< */,
419                              uint16_t          sizeID  /**< */,
420                              uint16_t          rotation  /**< */,
421                              uint16_t          rate  /**< */)
422 {
423     static const xcb_protocol_request_t xcb_req = {
424         /* count */ 2,
425         /* ext */ &xcb_randr_id,
426         /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG,
427         /* isvoid */ 0
428     };
429 
430     struct iovec xcb_parts[4];
431     xcb_randr_set_screen_config_cookie_t xcb_ret;
432     xcb_randr_set_screen_config_request_t xcb_out;
433 
434     xcb_out.window = window;
435     xcb_out.timestamp = timestamp;
436     xcb_out.config_timestamp = config_timestamp;
437     xcb_out.sizeID = sizeID;
438     xcb_out.rotation = rotation;
439     xcb_out.rate = rate;
440     memset(xcb_out.pad0, 0, 2);
441 
442     xcb_parts[2].iov_base = (char *) &xcb_out;
443     xcb_parts[2].iov_len = sizeof(xcb_out);
444     xcb_parts[3].iov_base = 0;
445     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
446 
447     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
448     return xcb_ret;
449 }
450 
451 
452 /*****************************************************************************
453  **
454  ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked
455  **
456  ** @param xcb_connection_t *c
457  ** @param xcb_window_t      window
458  ** @param xcb_timestamp_t   timestamp
459  ** @param xcb_timestamp_t   config_timestamp
460  ** @param uint16_t          sizeID
461  ** @param uint16_t          rotation
462  ** @param uint16_t          rate
463  ** @returns xcb_randr_set_screen_config_cookie_t
464  **
465  *****************************************************************************/
466 
467 xcb_randr_set_screen_config_cookie_t
468 xcb_randr_set_screen_config_unchecked (xcb_connection_t *c  /**< */,
469                                        xcb_window_t      window  /**< */,
470                                        xcb_timestamp_t   timestamp  /**< */,
471                                        xcb_timestamp_t   config_timestamp  /**< */,
472                                        uint16_t          sizeID  /**< */,
473                                        uint16_t          rotation  /**< */,
474                                        uint16_t          rate  /**< */)
475 {
476     static const xcb_protocol_request_t xcb_req = {
477         /* count */ 2,
478         /* ext */ &xcb_randr_id,
479         /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG,
480         /* isvoid */ 0
481     };
482 
483     struct iovec xcb_parts[4];
484     xcb_randr_set_screen_config_cookie_t xcb_ret;
485     xcb_randr_set_screen_config_request_t xcb_out;
486 
487     xcb_out.window = window;
488     xcb_out.timestamp = timestamp;
489     xcb_out.config_timestamp = config_timestamp;
490     xcb_out.sizeID = sizeID;
491     xcb_out.rotation = rotation;
492     xcb_out.rate = rate;
493     memset(xcb_out.pad0, 0, 2);
494 
495     xcb_parts[2].iov_base = (char *) &xcb_out;
496     xcb_parts[2].iov_len = sizeof(xcb_out);
497     xcb_parts[3].iov_base = 0;
498     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
499 
500     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
501     return xcb_ret;
502 }
503 
504 
505 /*****************************************************************************
506  **
507  ** xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply
508  **
509  ** @param xcb_connection_t                      *c
510  ** @param xcb_randr_set_screen_config_cookie_t   cookie
511  ** @param xcb_generic_error_t                  **e
512  ** @returns xcb_randr_set_screen_config_reply_t *
513  **
514  *****************************************************************************/
515 
516 xcb_randr_set_screen_config_reply_t *
517 xcb_randr_set_screen_config_reply (xcb_connection_t                      *c  /**< */,
518                                    xcb_randr_set_screen_config_cookie_t   cookie  /**< */,
519                                    xcb_generic_error_t                  **e  /**< */)
520 {
521     return (xcb_randr_set_screen_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
522 }
523 
524 
525 /*****************************************************************************
526  **
527  ** xcb_void_cookie_t xcb_randr_select_input_checked
528  **
529  ** @param xcb_connection_t *c
530  ** @param xcb_window_t      window
531  ** @param uint16_t          enable
532  ** @returns xcb_void_cookie_t
533  **
534  *****************************************************************************/
535 
536 xcb_void_cookie_t
537 xcb_randr_select_input_checked (xcb_connection_t *c  /**< */,
538                                 xcb_window_t      window  /**< */,
539                                 uint16_t          enable  /**< */)
540 {
541     static const xcb_protocol_request_t xcb_req = {
542         /* count */ 2,
543         /* ext */ &xcb_randr_id,
544         /* opcode */ XCB_RANDR_SELECT_INPUT,
545         /* isvoid */ 1
546     };
547 
548     struct iovec xcb_parts[4];
549     xcb_void_cookie_t xcb_ret;
550     xcb_randr_select_input_request_t xcb_out;
551 
552     xcb_out.window = window;
553     xcb_out.enable = enable;
554     memset(xcb_out.pad0, 0, 2);
555 
556     xcb_parts[2].iov_base = (char *) &xcb_out;
557     xcb_parts[2].iov_len = sizeof(xcb_out);
558     xcb_parts[3].iov_base = 0;
559     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
560 
561     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
562     return xcb_ret;
563 }
564 
565 
566 /*****************************************************************************
567  **
568  ** xcb_void_cookie_t xcb_randr_select_input
569  **
570  ** @param xcb_connection_t *c
571  ** @param xcb_window_t      window
572  ** @param uint16_t          enable
573  ** @returns xcb_void_cookie_t
574  **
575  *****************************************************************************/
576 
577 xcb_void_cookie_t
578 xcb_randr_select_input (xcb_connection_t *c  /**< */,
579                         xcb_window_t      window  /**< */,
580                         uint16_t          enable  /**< */)
581 {
582     static const xcb_protocol_request_t xcb_req = {
583         /* count */ 2,
584         /* ext */ &xcb_randr_id,
585         /* opcode */ XCB_RANDR_SELECT_INPUT,
586         /* isvoid */ 1
587     };
588 
589     struct iovec xcb_parts[4];
590     xcb_void_cookie_t xcb_ret;
591     xcb_randr_select_input_request_t xcb_out;
592 
593     xcb_out.window = window;
594     xcb_out.enable = enable;
595     memset(xcb_out.pad0, 0, 2);
596 
597     xcb_parts[2].iov_base = (char *) &xcb_out;
598     xcb_parts[2].iov_len = sizeof(xcb_out);
599     xcb_parts[3].iov_base = 0;
600     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
601 
602     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
603     return xcb_ret;
604 }
605 
606 int
607 xcb_randr_get_screen_info_sizeof (const void  *_buffer  /**< */)
608 {
609     char *xcb_tmp = (char *)_buffer;
610     const xcb_randr_get_screen_info_reply_t *_aux = (xcb_randr_get_screen_info_reply_t *)_buffer;
611     unsigned int xcb_buffer_len = 0;
612     unsigned int xcb_block_len = 0;
613     unsigned int xcb_pad = 0;
614     unsigned int xcb_align_to;
615 
616     unsigned int i;
617     unsigned int xcb_tmp_len;
618 
619     xcb_block_len += sizeof(xcb_randr_get_screen_info_reply_t);
620     xcb_tmp += xcb_block_len;
621     /* sizes */
622     xcb_block_len += _aux->nSizes * sizeof(xcb_randr_screen_size_t);
623     xcb_tmp += xcb_block_len;
624     xcb_align_to = ALIGNOF(xcb_randr_screen_size_t);
625     /* insert padding */
626     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
627     xcb_buffer_len += xcb_block_len + xcb_pad;
628     if (0 != xcb_pad) {
629         xcb_tmp += xcb_pad;
630         xcb_pad = 0;
631     }
632     xcb_block_len = 0;
633     /* rates */
634     for(i=0; i<(_aux->nInfo - _aux->nSizes); i++) {
635         xcb_tmp_len = xcb_randr_refresh_rates_sizeof(xcb_tmp);
636         xcb_block_len += xcb_tmp_len;
637         xcb_tmp += xcb_tmp_len;
638     }
639     xcb_align_to = ALIGNOF(xcb_randr_refresh_rates_t);
640     /* insert padding */
641     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
642     xcb_buffer_len += xcb_block_len + xcb_pad;
643     if (0 != xcb_pad) {
644         xcb_tmp += xcb_pad;
645         xcb_pad = 0;
646     }
647     xcb_block_len = 0;
648 
649     return xcb_buffer_len;
650 }
651 
652 
653 /*****************************************************************************
654  **
655  ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info
656  **
657  ** @param xcb_connection_t *c
658  ** @param xcb_window_t      window
659  ** @returns xcb_randr_get_screen_info_cookie_t
660  **
661  *****************************************************************************/
662 
663 xcb_randr_get_screen_info_cookie_t
664 xcb_randr_get_screen_info (xcb_connection_t *c  /**< */,
665                            xcb_window_t      window  /**< */)
666 {
667     static const xcb_protocol_request_t xcb_req = {
668         /* count */ 2,
669         /* ext */ &xcb_randr_id,
670         /* opcode */ XCB_RANDR_GET_SCREEN_INFO,
671         /* isvoid */ 0
672     };
673 
674     struct iovec xcb_parts[4];
675     xcb_randr_get_screen_info_cookie_t xcb_ret;
676     xcb_randr_get_screen_info_request_t xcb_out;
677 
678     xcb_out.window = window;
679 
680     xcb_parts[2].iov_base = (char *) &xcb_out;
681     xcb_parts[2].iov_len = sizeof(xcb_out);
682     xcb_parts[3].iov_base = 0;
683     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
684 
685     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
686     return xcb_ret;
687 }
688 
689 
690 /*****************************************************************************
691  **
692  ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked
693  **
694  ** @param xcb_connection_t *c
695  ** @param xcb_window_t      window
696  ** @returns xcb_randr_get_screen_info_cookie_t
697  **
698  *****************************************************************************/
699 
700 xcb_randr_get_screen_info_cookie_t
701 xcb_randr_get_screen_info_unchecked (xcb_connection_t *c  /**< */,
702                                      xcb_window_t      window  /**< */)
703 {
704     static const xcb_protocol_request_t xcb_req = {
705         /* count */ 2,
706         /* ext */ &xcb_randr_id,
707         /* opcode */ XCB_RANDR_GET_SCREEN_INFO,
708         /* isvoid */ 0
709     };
710 
711     struct iovec xcb_parts[4];
712     xcb_randr_get_screen_info_cookie_t xcb_ret;
713     xcb_randr_get_screen_info_request_t xcb_out;
714 
715     xcb_out.window = window;
716 
717     xcb_parts[2].iov_base = (char *) &xcb_out;
718     xcb_parts[2].iov_len = sizeof(xcb_out);
719     xcb_parts[3].iov_base = 0;
720     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
721 
722     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
723     return xcb_ret;
724 }
725 
726 
727 /*****************************************************************************
728  **
729  ** xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes
730  **
731  ** @param const xcb_randr_get_screen_info_reply_t *R
732  ** @returns xcb_randr_screen_size_t *
733  **
734  *****************************************************************************/
735 
736 xcb_randr_screen_size_t *
737 xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R  /**< */)
738 {
739     return (xcb_randr_screen_size_t *) (R + 1);
740 }
741 
742 
743 /*****************************************************************************
744  **
745  ** int xcb_randr_get_screen_info_sizes_length
746  **
747  ** @param const xcb_randr_get_screen_info_reply_t *R
748  ** @returns int
749  **
750  *****************************************************************************/
751 
752 int
753 xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R  /**< */)
754 {
755     return R->nSizes;
756 }
757 
758 
759 /*****************************************************************************
760  **
761  ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator
762  **
763  ** @param const xcb_randr_get_screen_info_reply_t *R
764  ** @returns xcb_randr_screen_size_iterator_t
765  **
766  *****************************************************************************/
767 
768 xcb_randr_screen_size_iterator_t
769 xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R  /**< */)
770 {
771     xcb_randr_screen_size_iterator_t i;
772     i.data = (xcb_randr_screen_size_t *) (R + 1);
773     i.rem = R->nSizes;
774     i.index = (char *) i.data - (char *) R;
775     return i;
776 }
777 
778 
779 /*****************************************************************************
780  **
781  ** int xcb_randr_get_screen_info_rates_length
782  **
783  ** @param const xcb_randr_get_screen_info_reply_t *R
784  ** @returns int
785  **
786  *****************************************************************************/
787 
788 int
789 xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R  /**< */)
790 {
791     return (R->nInfo - R->nSizes);
792 }
793 
794 
795 /*****************************************************************************
796  **
797  ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator
798  **
799  ** @param const xcb_randr_get_screen_info_reply_t *R
800  ** @returns xcb_randr_refresh_rates_iterator_t
801  **
802  *****************************************************************************/
803 
804 xcb_randr_refresh_rates_iterator_t
805 xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R  /**< */)
806 {
807     xcb_randr_refresh_rates_iterator_t i;
808     xcb_generic_iterator_t prev = xcb_randr_screen_size_end(xcb_randr_get_screen_info_sizes_iterator(R));
809     i.data = (xcb_randr_refresh_rates_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_refresh_rates_t, prev.index));
810     i.rem = (R->nInfo - R->nSizes);
811     i.index = (char *) i.data - (char *) R;
812     return i;
813 }
814 
815 
816 /*****************************************************************************
817  **
818  ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply
819  **
820  ** @param xcb_connection_t                    *c
821  ** @param xcb_randr_get_screen_info_cookie_t   cookie
822  ** @param xcb_generic_error_t                **e
823  ** @returns xcb_randr_get_screen_info_reply_t *
824  **
825  *****************************************************************************/
826 
827 xcb_randr_get_screen_info_reply_t *
828 xcb_randr_get_screen_info_reply (xcb_connection_t                    *c  /**< */,
829                                  xcb_randr_get_screen_info_cookie_t   cookie  /**< */,
830                                  xcb_generic_error_t                **e  /**< */)
831 {
832     return (xcb_randr_get_screen_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
833 }
834 
835 
836 /*****************************************************************************
837  **
838  ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range
839  **
840  ** @param xcb_connection_t *c
841  ** @param xcb_window_t      window
842  ** @returns xcb_randr_get_screen_size_range_cookie_t
843  **
844  *****************************************************************************/
845 
846 xcb_randr_get_screen_size_range_cookie_t
847 xcb_randr_get_screen_size_range (xcb_connection_t *c  /**< */,
848                                  xcb_window_t      window  /**< */)
849 {
850     static const xcb_protocol_request_t xcb_req = {
851         /* count */ 2,
852         /* ext */ &xcb_randr_id,
853         /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE,
854         /* isvoid */ 0
855     };
856 
857     struct iovec xcb_parts[4];
858     xcb_randr_get_screen_size_range_cookie_t xcb_ret;
859     xcb_randr_get_screen_size_range_request_t xcb_out;
860 
861     xcb_out.window = window;
862 
863     xcb_parts[2].iov_base = (char *) &xcb_out;
864     xcb_parts[2].iov_len = sizeof(xcb_out);
865     xcb_parts[3].iov_base = 0;
866     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
867 
868     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
869     return xcb_ret;
870 }
871 
872 
873 /*****************************************************************************
874  **
875  ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked
876  **
877  ** @param xcb_connection_t *c
878  ** @param xcb_window_t      window
879  ** @returns xcb_randr_get_screen_size_range_cookie_t
880  **
881  *****************************************************************************/
882 
883 xcb_randr_get_screen_size_range_cookie_t
884 xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c  /**< */,
885                                            xcb_window_t      window  /**< */)
886 {
887     static const xcb_protocol_request_t xcb_req = {
888         /* count */ 2,
889         /* ext */ &xcb_randr_id,
890         /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE,
891         /* isvoid */ 0
892     };
893 
894     struct iovec xcb_parts[4];
895     xcb_randr_get_screen_size_range_cookie_t xcb_ret;
896     xcb_randr_get_screen_size_range_request_t xcb_out;
897 
898     xcb_out.window = window;
899 
900     xcb_parts[2].iov_base = (char *) &xcb_out;
901     xcb_parts[2].iov_len = sizeof(xcb_out);
902     xcb_parts[3].iov_base = 0;
903     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
904 
905     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
906     return xcb_ret;
907 }
908 
909 
910 /*****************************************************************************
911  **
912  ** xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply
913  **
914  ** @param xcb_connection_t                          *c
915  ** @param xcb_randr_get_screen_size_range_cookie_t   cookie
916  ** @param xcb_generic_error_t                      **e
917  ** @returns xcb_randr_get_screen_size_range_reply_t *
918  **
919  *****************************************************************************/
920 
921 xcb_randr_get_screen_size_range_reply_t *
922 xcb_randr_get_screen_size_range_reply (xcb_connection_t                          *c  /**< */,
923                                        xcb_randr_get_screen_size_range_cookie_t   cookie  /**< */,
924                                        xcb_generic_error_t                      **e  /**< */)
925 {
926     return (xcb_randr_get_screen_size_range_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
927 }
928 
929 
930 /*****************************************************************************
931  **
932  ** xcb_void_cookie_t xcb_randr_set_screen_size_checked
933  **
934  ** @param xcb_connection_t *c
935  ** @param xcb_window_t      window
936  ** @param uint16_t          width
937  ** @param uint16_t          height
938  ** @param uint32_t          mm_width
939  ** @param uint32_t          mm_height
940  ** @returns xcb_void_cookie_t
941  **
942  *****************************************************************************/
943 
944 xcb_void_cookie_t
945 xcb_randr_set_screen_size_checked (xcb_connection_t *c  /**< */,
946                                    xcb_window_t      window  /**< */,
947                                    uint16_t          width  /**< */,
948                                    uint16_t          height  /**< */,
949                                    uint32_t          mm_width  /**< */,
950                                    uint32_t          mm_height  /**< */)
951 {
952     static const xcb_protocol_request_t xcb_req = {
953         /* count */ 2,
954         /* ext */ &xcb_randr_id,
955         /* opcode */ XCB_RANDR_SET_SCREEN_SIZE,
956         /* isvoid */ 1
957     };
958 
959     struct iovec xcb_parts[4];
960     xcb_void_cookie_t xcb_ret;
961     xcb_randr_set_screen_size_request_t xcb_out;
962 
963     xcb_out.window = window;
964     xcb_out.width = width;
965     xcb_out.height = height;
966     xcb_out.mm_width = mm_width;
967     xcb_out.mm_height = mm_height;
968 
969     xcb_parts[2].iov_base = (char *) &xcb_out;
970     xcb_parts[2].iov_len = sizeof(xcb_out);
971     xcb_parts[3].iov_base = 0;
972     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
973 
974     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
975     return xcb_ret;
976 }
977 
978 
979 /*****************************************************************************
980  **
981  ** xcb_void_cookie_t xcb_randr_set_screen_size
982  **
983  ** @param xcb_connection_t *c
984  ** @param xcb_window_t      window
985  ** @param uint16_t          width
986  ** @param uint16_t          height
987  ** @param uint32_t          mm_width
988  ** @param uint32_t          mm_height
989  ** @returns xcb_void_cookie_t
990  **
991  *****************************************************************************/
992 
993 xcb_void_cookie_t
994 xcb_randr_set_screen_size (xcb_connection_t *c  /**< */,
995                            xcb_window_t      window  /**< */,
996                            uint16_t          width  /**< */,
997                            uint16_t          height  /**< */,
998                            uint32_t          mm_width  /**< */,
999                            uint32_t          mm_height  /**< */)
1000 {
1001     static const xcb_protocol_request_t xcb_req = {
1002         /* count */ 2,
1003         /* ext */ &xcb_randr_id,
1004         /* opcode */ XCB_RANDR_SET_SCREEN_SIZE,
1005         /* isvoid */ 1
1006     };
1007 
1008     struct iovec xcb_parts[4];
1009     xcb_void_cookie_t xcb_ret;
1010     xcb_randr_set_screen_size_request_t xcb_out;
1011 
1012     xcb_out.window = window;
1013     xcb_out.width = width;
1014     xcb_out.height = height;
1015     xcb_out.mm_width = mm_width;
1016     xcb_out.mm_height = mm_height;
1017 
1018     xcb_parts[2].iov_base = (char *) &xcb_out;
1019     xcb_parts[2].iov_len = sizeof(xcb_out);
1020     xcb_parts[3].iov_base = 0;
1021     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1022 
1023     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1024     return xcb_ret;
1025 }
1026 
1027 
1028 /*****************************************************************************
1029  **
1030  ** void xcb_randr_mode_info_next
1031  **
1032  ** @param xcb_randr_mode_info_iterator_t *i
1033  ** @returns void
1034  **
1035  *****************************************************************************/
1036 
1037 void
1038 xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i  /**< */)
1039 {
1040     --i->rem;
1041     ++i->data;
1042     i->index += sizeof(xcb_randr_mode_info_t);
1043 }
1044 
1045 
1046 /*****************************************************************************
1047  **
1048  ** xcb_generic_iterator_t xcb_randr_mode_info_end
1049  **
1050  ** @param xcb_randr_mode_info_iterator_t i
1051  ** @returns xcb_generic_iterator_t
1052  **
1053  *****************************************************************************/
1054 
1055 xcb_generic_iterator_t
1056 xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i  /**< */)
1057 {
1058     xcb_generic_iterator_t ret;
1059     ret.data = i.data + i.rem;
1060     ret.index = i.index + ((char *) ret.data - (char *) i.data);
1061     ret.rem = 0;
1062     return ret;
1063 }
1064 
1065 int
1066 xcb_randr_get_screen_resources_sizeof (const void  *_buffer  /**< */)
1067 {
1068     char *xcb_tmp = (char *)_buffer;
1069     const xcb_randr_get_screen_resources_reply_t *_aux = (xcb_randr_get_screen_resources_reply_t *)_buffer;
1070     unsigned int xcb_buffer_len = 0;
1071     unsigned int xcb_block_len = 0;
1072     unsigned int xcb_pad = 0;
1073     unsigned int xcb_align_to;
1074 
1075 
1076     xcb_block_len += sizeof(xcb_randr_get_screen_resources_reply_t);
1077     xcb_tmp += xcb_block_len;
1078     /* crtcs */
1079     xcb_block_len += _aux->num_crtcs * sizeof(uint32_t);
1080     xcb_tmp += xcb_block_len;
1081     xcb_align_to = ALIGNOF(xcb_randr_crtc_t);
1082     /* insert padding */
1083     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1084     xcb_buffer_len += xcb_block_len + xcb_pad;
1085     if (0 != xcb_pad) {
1086         xcb_tmp += xcb_pad;
1087         xcb_pad = 0;
1088     }
1089     xcb_block_len = 0;
1090     /* outputs */
1091     xcb_block_len += _aux->num_outputs * sizeof(uint32_t);
1092     xcb_tmp += xcb_block_len;
1093     xcb_align_to = ALIGNOF(xcb_randr_output_t);
1094     /* insert padding */
1095     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1096     xcb_buffer_len += xcb_block_len + xcb_pad;
1097     if (0 != xcb_pad) {
1098         xcb_tmp += xcb_pad;
1099         xcb_pad = 0;
1100     }
1101     xcb_block_len = 0;
1102     /* modes */
1103     xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t);
1104     xcb_tmp += xcb_block_len;
1105     xcb_align_to = ALIGNOF(xcb_randr_mode_info_t);
1106     /* insert padding */
1107     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1108     xcb_buffer_len += xcb_block_len + xcb_pad;
1109     if (0 != xcb_pad) {
1110         xcb_tmp += xcb_pad;
1111         xcb_pad = 0;
1112     }
1113     xcb_block_len = 0;
1114     /* names */
1115     xcb_block_len += _aux->names_len * sizeof(uint8_t);
1116     xcb_tmp += xcb_block_len;
1117     xcb_align_to = ALIGNOF(uint8_t);
1118     /* insert padding */
1119     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1120     xcb_buffer_len += xcb_block_len + xcb_pad;
1121     if (0 != xcb_pad) {
1122         xcb_tmp += xcb_pad;
1123         xcb_pad = 0;
1124     }
1125     xcb_block_len = 0;
1126 
1127     return xcb_buffer_len;
1128 }
1129 
1130 
1131 /*****************************************************************************
1132  **
1133  ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources
1134  **
1135  ** @param xcb_connection_t *c
1136  ** @param xcb_window_t      window
1137  ** @returns xcb_randr_get_screen_resources_cookie_t
1138  **
1139  *****************************************************************************/
1140 
1141 xcb_randr_get_screen_resources_cookie_t
1142 xcb_randr_get_screen_resources (xcb_connection_t *c  /**< */,
1143                                 xcb_window_t      window  /**< */)
1144 {
1145     static const xcb_protocol_request_t xcb_req = {
1146         /* count */ 2,
1147         /* ext */ &xcb_randr_id,
1148         /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES,
1149         /* isvoid */ 0
1150     };
1151 
1152     struct iovec xcb_parts[4];
1153     xcb_randr_get_screen_resources_cookie_t xcb_ret;
1154     xcb_randr_get_screen_resources_request_t xcb_out;
1155 
1156     xcb_out.window = window;
1157 
1158     xcb_parts[2].iov_base = (char *) &xcb_out;
1159     xcb_parts[2].iov_len = sizeof(xcb_out);
1160     xcb_parts[3].iov_base = 0;
1161     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1162 
1163     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1164     return xcb_ret;
1165 }
1166 
1167 
1168 /*****************************************************************************
1169  **
1170  ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked
1171  **
1172  ** @param xcb_connection_t *c
1173  ** @param xcb_window_t      window
1174  ** @returns xcb_randr_get_screen_resources_cookie_t
1175  **
1176  *****************************************************************************/
1177 
1178 xcb_randr_get_screen_resources_cookie_t
1179 xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c  /**< */,
1180                                           xcb_window_t      window  /**< */)
1181 {
1182     static const xcb_protocol_request_t xcb_req = {
1183         /* count */ 2,
1184         /* ext */ &xcb_randr_id,
1185         /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES,
1186         /* isvoid */ 0
1187     };
1188 
1189     struct iovec xcb_parts[4];
1190     xcb_randr_get_screen_resources_cookie_t xcb_ret;
1191     xcb_randr_get_screen_resources_request_t xcb_out;
1192 
1193     xcb_out.window = window;
1194 
1195     xcb_parts[2].iov_base = (char *) &xcb_out;
1196     xcb_parts[2].iov_len = sizeof(xcb_out);
1197     xcb_parts[3].iov_base = 0;
1198     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1199 
1200     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1201     return xcb_ret;
1202 }
1203 
1204 
1205 /*****************************************************************************
1206  **
1207  ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs
1208  **
1209  ** @param const xcb_randr_get_screen_resources_reply_t *R
1210  ** @returns xcb_randr_crtc_t *
1211  **
1212  *****************************************************************************/
1213 
1214 xcb_randr_crtc_t *
1215 xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1216 {
1217     return (xcb_randr_crtc_t *) (R + 1);
1218 }
1219 
1220 
1221 /*****************************************************************************
1222  **
1223  ** int xcb_randr_get_screen_resources_crtcs_length
1224  **
1225  ** @param const xcb_randr_get_screen_resources_reply_t *R
1226  ** @returns int
1227  **
1228  *****************************************************************************/
1229 
1230 int
1231 xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1232 {
1233     return R->num_crtcs;
1234 }
1235 
1236 
1237 /*****************************************************************************
1238  **
1239  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end
1240  **
1241  ** @param const xcb_randr_get_screen_resources_reply_t *R
1242  ** @returns xcb_generic_iterator_t
1243  **
1244  *****************************************************************************/
1245 
1246 xcb_generic_iterator_t
1247 xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1248 {
1249     xcb_generic_iterator_t i;
1250     i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
1251     i.rem = 0;
1252     i.index = (char *) i.data - (char *) R;
1253     return i;
1254 }
1255 
1256 
1257 /*****************************************************************************
1258  **
1259  ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs
1260  **
1261  ** @param const xcb_randr_get_screen_resources_reply_t *R
1262  ** @returns xcb_randr_output_t *
1263  **
1264  *****************************************************************************/
1265 
1266 xcb_randr_output_t *
1267 xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1268 {
1269     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_crtcs_end(R);
1270     return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
1271 }
1272 
1273 
1274 /*****************************************************************************
1275  **
1276  ** int xcb_randr_get_screen_resources_outputs_length
1277  **
1278  ** @param const xcb_randr_get_screen_resources_reply_t *R
1279  ** @returns int
1280  **
1281  *****************************************************************************/
1282 
1283 int
1284 xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1285 {
1286     return R->num_outputs;
1287 }
1288 
1289 
1290 /*****************************************************************************
1291  **
1292  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end
1293  **
1294  ** @param const xcb_randr_get_screen_resources_reply_t *R
1295  ** @returns xcb_generic_iterator_t
1296  **
1297  *****************************************************************************/
1298 
1299 xcb_generic_iterator_t
1300 xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1301 {
1302     xcb_generic_iterator_t i;
1303     xcb_generic_iterator_t child = xcb_randr_get_screen_resources_crtcs_end(R);
1304     i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs);
1305     i.rem = 0;
1306     i.index = (char *) i.data - (char *) R;
1307     return i;
1308 }
1309 
1310 
1311 /*****************************************************************************
1312  **
1313  ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes
1314  **
1315  ** @param const xcb_randr_get_screen_resources_reply_t *R
1316  ** @returns xcb_randr_mode_info_t *
1317  **
1318  *****************************************************************************/
1319 
1320 xcb_randr_mode_info_t *
1321 xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1322 {
1323     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R);
1324     return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0);
1325 }
1326 
1327 
1328 /*****************************************************************************
1329  **
1330  ** int xcb_randr_get_screen_resources_modes_length
1331  **
1332  ** @param const xcb_randr_get_screen_resources_reply_t *R
1333  ** @returns int
1334  **
1335  *****************************************************************************/
1336 
1337 int
1338 xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1339 {
1340     return R->num_modes;
1341 }
1342 
1343 
1344 /*****************************************************************************
1345  **
1346  ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator
1347  **
1348  ** @param const xcb_randr_get_screen_resources_reply_t *R
1349  ** @returns xcb_randr_mode_info_iterator_t
1350  **
1351  *****************************************************************************/
1352 
1353 xcb_randr_mode_info_iterator_t
1354 xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1355 {
1356     xcb_randr_mode_info_iterator_t i;
1357     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R);
1358     i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index));
1359     i.rem = R->num_modes;
1360     i.index = (char *) i.data - (char *) R;
1361     return i;
1362 }
1363 
1364 
1365 /*****************************************************************************
1366  **
1367  ** uint8_t * xcb_randr_get_screen_resources_names
1368  **
1369  ** @param const xcb_randr_get_screen_resources_reply_t *R
1370  ** @returns uint8_t *
1371  **
1372  *****************************************************************************/
1373 
1374 uint8_t *
1375 xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1376 {
1377     xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R));
1378     return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
1379 }
1380 
1381 
1382 /*****************************************************************************
1383  **
1384  ** int xcb_randr_get_screen_resources_names_length
1385  **
1386  ** @param const xcb_randr_get_screen_resources_reply_t *R
1387  ** @returns int
1388  **
1389  *****************************************************************************/
1390 
1391 int
1392 xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1393 {
1394     return R->names_len;
1395 }
1396 
1397 
1398 /*****************************************************************************
1399  **
1400  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end
1401  **
1402  ** @param const xcb_randr_get_screen_resources_reply_t *R
1403  ** @returns xcb_generic_iterator_t
1404  **
1405  *****************************************************************************/
1406 
1407 xcb_generic_iterator_t
1408 xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R  /**< */)
1409 {
1410     xcb_generic_iterator_t i;
1411     xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R));
1412     i.data = ((uint8_t *) child.data) + (R->names_len);
1413     i.rem = 0;
1414     i.index = (char *) i.data - (char *) R;
1415     return i;
1416 }
1417 
1418 
1419 /*****************************************************************************
1420  **
1421  ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply
1422  **
1423  ** @param xcb_connection_t                         *c
1424  ** @param xcb_randr_get_screen_resources_cookie_t   cookie
1425  ** @param xcb_generic_error_t                     **e
1426  ** @returns xcb_randr_get_screen_resources_reply_t *
1427  **
1428  *****************************************************************************/
1429 
1430 xcb_randr_get_screen_resources_reply_t *
1431 xcb_randr_get_screen_resources_reply (xcb_connection_t                         *c  /**< */,
1432                                       xcb_randr_get_screen_resources_cookie_t   cookie  /**< */,
1433                                       xcb_generic_error_t                     **e  /**< */)
1434 {
1435     return (xcb_randr_get_screen_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1436 }
1437 
1438 int
1439 xcb_randr_get_output_info_sizeof (const void  *_buffer  /**< */)
1440 {
1441     char *xcb_tmp = (char *)_buffer;
1442     const xcb_randr_get_output_info_reply_t *_aux = (xcb_randr_get_output_info_reply_t *)_buffer;
1443     unsigned int xcb_buffer_len = 0;
1444     unsigned int xcb_block_len = 0;
1445     unsigned int xcb_pad = 0;
1446     unsigned int xcb_align_to;
1447 
1448 
1449     xcb_block_len += sizeof(xcb_randr_get_output_info_reply_t);
1450     xcb_tmp += xcb_block_len;
1451     /* crtcs */
1452     xcb_block_len += _aux->num_crtcs * sizeof(xcb_randr_output_t);
1453     xcb_tmp += xcb_block_len;
1454     xcb_align_to = ALIGNOF(xcb_randr_crtc_t);
1455     /* insert padding */
1456     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1457     xcb_buffer_len += xcb_block_len + xcb_pad;
1458     if (0 != xcb_pad) {
1459         xcb_tmp += xcb_pad;
1460         xcb_pad = 0;
1461     }
1462     xcb_block_len = 0;
1463     /* modes */
1464     xcb_block_len += _aux->num_modes * sizeof(xcb_randr_output_t);
1465     xcb_tmp += xcb_block_len;
1466     xcb_align_to = ALIGNOF(xcb_randr_mode_t);
1467     /* insert padding */
1468     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1469     xcb_buffer_len += xcb_block_len + xcb_pad;
1470     if (0 != xcb_pad) {
1471         xcb_tmp += xcb_pad;
1472         xcb_pad = 0;
1473     }
1474     xcb_block_len = 0;
1475     /* clones */
1476     xcb_block_len += _aux->num_clones * sizeof(xcb_randr_output_t);
1477     xcb_tmp += xcb_block_len;
1478     xcb_align_to = ALIGNOF(xcb_randr_output_t);
1479     /* insert padding */
1480     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1481     xcb_buffer_len += xcb_block_len + xcb_pad;
1482     if (0 != xcb_pad) {
1483         xcb_tmp += xcb_pad;
1484         xcb_pad = 0;
1485     }
1486     xcb_block_len = 0;
1487     /* name */
1488     xcb_block_len += _aux->name_len * sizeof(uint8_t);
1489     xcb_tmp += xcb_block_len;
1490     xcb_align_to = ALIGNOF(uint8_t);
1491     /* insert padding */
1492     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1493     xcb_buffer_len += xcb_block_len + xcb_pad;
1494     if (0 != xcb_pad) {
1495         xcb_tmp += xcb_pad;
1496         xcb_pad = 0;
1497     }
1498     xcb_block_len = 0;
1499 
1500     return xcb_buffer_len;
1501 }
1502 
1503 
1504 /*****************************************************************************
1505  **
1506  ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info
1507  **
1508  ** @param xcb_connection_t   *c
1509  ** @param xcb_randr_output_t  output
1510  ** @param xcb_timestamp_t     config_timestamp
1511  ** @returns xcb_randr_get_output_info_cookie_t
1512  **
1513  *****************************************************************************/
1514 
1515 xcb_randr_get_output_info_cookie_t
1516 xcb_randr_get_output_info (xcb_connection_t   *c  /**< */,
1517                            xcb_randr_output_t  output  /**< */,
1518                            xcb_timestamp_t     config_timestamp  /**< */)
1519 {
1520     static const xcb_protocol_request_t xcb_req = {
1521         /* count */ 2,
1522         /* ext */ &xcb_randr_id,
1523         /* opcode */ XCB_RANDR_GET_OUTPUT_INFO,
1524         /* isvoid */ 0
1525     };
1526 
1527     struct iovec xcb_parts[4];
1528     xcb_randr_get_output_info_cookie_t xcb_ret;
1529     xcb_randr_get_output_info_request_t xcb_out;
1530 
1531     xcb_out.output = output;
1532     xcb_out.config_timestamp = config_timestamp;
1533 
1534     xcb_parts[2].iov_base = (char *) &xcb_out;
1535     xcb_parts[2].iov_len = sizeof(xcb_out);
1536     xcb_parts[3].iov_base = 0;
1537     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1538 
1539     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1540     return xcb_ret;
1541 }
1542 
1543 
1544 /*****************************************************************************
1545  **
1546  ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked
1547  **
1548  ** @param xcb_connection_t   *c
1549  ** @param xcb_randr_output_t  output
1550  ** @param xcb_timestamp_t     config_timestamp
1551  ** @returns xcb_randr_get_output_info_cookie_t
1552  **
1553  *****************************************************************************/
1554 
1555 xcb_randr_get_output_info_cookie_t
1556 xcb_randr_get_output_info_unchecked (xcb_connection_t   *c  /**< */,
1557                                      xcb_randr_output_t  output  /**< */,
1558                                      xcb_timestamp_t     config_timestamp  /**< */)
1559 {
1560     static const xcb_protocol_request_t xcb_req = {
1561         /* count */ 2,
1562         /* ext */ &xcb_randr_id,
1563         /* opcode */ XCB_RANDR_GET_OUTPUT_INFO,
1564         /* isvoid */ 0
1565     };
1566 
1567     struct iovec xcb_parts[4];
1568     xcb_randr_get_output_info_cookie_t xcb_ret;
1569     xcb_randr_get_output_info_request_t xcb_out;
1570 
1571     xcb_out.output = output;
1572     xcb_out.config_timestamp = config_timestamp;
1573 
1574     xcb_parts[2].iov_base = (char *) &xcb_out;
1575     xcb_parts[2].iov_len = sizeof(xcb_out);
1576     xcb_parts[3].iov_base = 0;
1577     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1578 
1579     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1580     return xcb_ret;
1581 }
1582 
1583 
1584 /*****************************************************************************
1585  **
1586  ** xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs
1587  **
1588  ** @param const xcb_randr_get_output_info_reply_t *R
1589  ** @returns xcb_randr_crtc_t *
1590  **
1591  *****************************************************************************/
1592 
1593 xcb_randr_crtc_t *
1594 xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R  /**< */)
1595 {
1596     return (xcb_randr_crtc_t *) (R + 1);
1597 }
1598 
1599 
1600 /*****************************************************************************
1601  **
1602  ** int xcb_randr_get_output_info_crtcs_length
1603  **
1604  ** @param const xcb_randr_get_output_info_reply_t *R
1605  ** @returns int
1606  **
1607  *****************************************************************************/
1608 
1609 int
1610 xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R  /**< */)
1611 {
1612     return R->num_crtcs;
1613 }
1614 
1615 
1616 /*****************************************************************************
1617  **
1618  ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end
1619  **
1620  ** @param const xcb_randr_get_output_info_reply_t *R
1621  ** @returns xcb_generic_iterator_t
1622  **
1623  *****************************************************************************/
1624 
1625 xcb_generic_iterator_t
1626 xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R  /**< */)
1627 {
1628     xcb_generic_iterator_t i;
1629     i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
1630     i.rem = 0;
1631     i.index = (char *) i.data - (char *) R;
1632     return i;
1633 }
1634 
1635 
1636 /*****************************************************************************
1637  **
1638  ** xcb_randr_mode_t * xcb_randr_get_output_info_modes
1639  **
1640  ** @param const xcb_randr_get_output_info_reply_t *R
1641  ** @returns xcb_randr_mode_t *
1642  **
1643  *****************************************************************************/
1644 
1645 xcb_randr_mode_t *
1646 xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R  /**< */)
1647 {
1648     xcb_generic_iterator_t prev = xcb_randr_get_output_info_crtcs_end(R);
1649     return (xcb_randr_mode_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_t, prev.index) + 0);
1650 }
1651 
1652 
1653 /*****************************************************************************
1654  **
1655  ** int xcb_randr_get_output_info_modes_length
1656  **
1657  ** @param const xcb_randr_get_output_info_reply_t *R
1658  ** @returns int
1659  **
1660  *****************************************************************************/
1661 
1662 int
1663 xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R  /**< */)
1664 {
1665     return R->num_modes;
1666 }
1667 
1668 
1669 /*****************************************************************************
1670  **
1671  ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end
1672  **
1673  ** @param const xcb_randr_get_output_info_reply_t *R
1674  ** @returns xcb_generic_iterator_t
1675  **
1676  *****************************************************************************/
1677 
1678 xcb_generic_iterator_t
1679 xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R  /**< */)
1680 {
1681     xcb_generic_iterator_t i;
1682     xcb_generic_iterator_t child = xcb_randr_get_output_info_crtcs_end(R);
1683     i.data = ((xcb_randr_mode_t *) child.data) + (R->num_modes);
1684     i.rem = 0;
1685     i.index = (char *) i.data - (char *) R;
1686     return i;
1687 }
1688 
1689 
1690 /*****************************************************************************
1691  **
1692  ** xcb_randr_output_t * xcb_randr_get_output_info_clones
1693  **
1694  ** @param const xcb_randr_get_output_info_reply_t *R
1695  ** @returns xcb_randr_output_t *
1696  **
1697  *****************************************************************************/
1698 
1699 xcb_randr_output_t *
1700 xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R  /**< */)
1701 {
1702     xcb_generic_iterator_t prev = xcb_randr_get_output_info_modes_end(R);
1703     return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
1704 }
1705 
1706 
1707 /*****************************************************************************
1708  **
1709  ** int xcb_randr_get_output_info_clones_length
1710  **
1711  ** @param const xcb_randr_get_output_info_reply_t *R
1712  ** @returns int
1713  **
1714  *****************************************************************************/
1715 
1716 int
1717 xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R  /**< */)
1718 {
1719     return R->num_clones;
1720 }
1721 
1722 
1723 /*****************************************************************************
1724  **
1725  ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end
1726  **
1727  ** @param const xcb_randr_get_output_info_reply_t *R
1728  ** @returns xcb_generic_iterator_t
1729  **
1730  *****************************************************************************/
1731 
1732 xcb_generic_iterator_t
1733 xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R  /**< */)
1734 {
1735     xcb_generic_iterator_t i;
1736     xcb_generic_iterator_t child = xcb_randr_get_output_info_modes_end(R);
1737     i.data = ((xcb_randr_output_t *) child.data) + (R->num_clones);
1738     i.rem = 0;
1739     i.index = (char *) i.data - (char *) R;
1740     return i;
1741 }
1742 
1743 
1744 /*****************************************************************************
1745  **
1746  ** uint8_t * xcb_randr_get_output_info_name
1747  **
1748  ** @param const xcb_randr_get_output_info_reply_t *R
1749  ** @returns uint8_t *
1750  **
1751  *****************************************************************************/
1752 
1753 uint8_t *
1754 xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R  /**< */)
1755 {
1756     xcb_generic_iterator_t prev = xcb_randr_get_output_info_clones_end(R);
1757     return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
1758 }
1759 
1760 
1761 /*****************************************************************************
1762  **
1763  ** int xcb_randr_get_output_info_name_length
1764  **
1765  ** @param const xcb_randr_get_output_info_reply_t *R
1766  ** @returns int
1767  **
1768  *****************************************************************************/
1769 
1770 int
1771 xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R  /**< */)
1772 {
1773     return R->name_len;
1774 }
1775 
1776 
1777 /*****************************************************************************
1778  **
1779  ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end
1780  **
1781  ** @param const xcb_randr_get_output_info_reply_t *R
1782  ** @returns xcb_generic_iterator_t
1783  **
1784  *****************************************************************************/
1785 
1786 xcb_generic_iterator_t
1787 xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R  /**< */)
1788 {
1789     xcb_generic_iterator_t i;
1790     xcb_generic_iterator_t child = xcb_randr_get_output_info_clones_end(R);
1791     i.data = ((uint8_t *) child.data) + (R->name_len);
1792     i.rem = 0;
1793     i.index = (char *) i.data - (char *) R;
1794     return i;
1795 }
1796 
1797 
1798 /*****************************************************************************
1799  **
1800  ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply
1801  **
1802  ** @param xcb_connection_t                    *c
1803  ** @param xcb_randr_get_output_info_cookie_t   cookie
1804  ** @param xcb_generic_error_t                **e
1805  ** @returns xcb_randr_get_output_info_reply_t *
1806  **
1807  *****************************************************************************/
1808 
1809 xcb_randr_get_output_info_reply_t *
1810 xcb_randr_get_output_info_reply (xcb_connection_t                    *c  /**< */,
1811                                  xcb_randr_get_output_info_cookie_t   cookie  /**< */,
1812                                  xcb_generic_error_t                **e  /**< */)
1813 {
1814     return (xcb_randr_get_output_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1815 }
1816 
1817 int
1818 xcb_randr_list_output_properties_sizeof (const void  *_buffer  /**< */)
1819 {
1820     char *xcb_tmp = (char *)_buffer;
1821     const xcb_randr_list_output_properties_reply_t *_aux = (xcb_randr_list_output_properties_reply_t *)_buffer;
1822     unsigned int xcb_buffer_len = 0;
1823     unsigned int xcb_block_len = 0;
1824     unsigned int xcb_pad = 0;
1825     unsigned int xcb_align_to;
1826 
1827 
1828     xcb_block_len += sizeof(xcb_randr_list_output_properties_reply_t);
1829     xcb_tmp += xcb_block_len;
1830     /* atoms */
1831     xcb_block_len += _aux->num_atoms * sizeof(xcb_atom_t);
1832     xcb_tmp += xcb_block_len;
1833     xcb_align_to = ALIGNOF(xcb_atom_t);
1834     /* insert padding */
1835     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1836     xcb_buffer_len += xcb_block_len + xcb_pad;
1837     if (0 != xcb_pad) {
1838         xcb_tmp += xcb_pad;
1839         xcb_pad = 0;
1840     }
1841     xcb_block_len = 0;
1842 
1843     return xcb_buffer_len;
1844 }
1845 
1846 
1847 /*****************************************************************************
1848  **
1849  ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties
1850  **
1851  ** @param xcb_connection_t   *c
1852  ** @param xcb_randr_output_t  output
1853  ** @returns xcb_randr_list_output_properties_cookie_t
1854  **
1855  *****************************************************************************/
1856 
1857 xcb_randr_list_output_properties_cookie_t
1858 xcb_randr_list_output_properties (xcb_connection_t   *c  /**< */,
1859                                   xcb_randr_output_t  output  /**< */)
1860 {
1861     static const xcb_protocol_request_t xcb_req = {
1862         /* count */ 2,
1863         /* ext */ &xcb_randr_id,
1864         /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES,
1865         /* isvoid */ 0
1866     };
1867 
1868     struct iovec xcb_parts[4];
1869     xcb_randr_list_output_properties_cookie_t xcb_ret;
1870     xcb_randr_list_output_properties_request_t xcb_out;
1871 
1872     xcb_out.output = output;
1873 
1874     xcb_parts[2].iov_base = (char *) &xcb_out;
1875     xcb_parts[2].iov_len = sizeof(xcb_out);
1876     xcb_parts[3].iov_base = 0;
1877     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1878 
1879     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1880     return xcb_ret;
1881 }
1882 
1883 
1884 /*****************************************************************************
1885  **
1886  ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked
1887  **
1888  ** @param xcb_connection_t   *c
1889  ** @param xcb_randr_output_t  output
1890  ** @returns xcb_randr_list_output_properties_cookie_t
1891  **
1892  *****************************************************************************/
1893 
1894 xcb_randr_list_output_properties_cookie_t
1895 xcb_randr_list_output_properties_unchecked (xcb_connection_t   *c  /**< */,
1896                                             xcb_randr_output_t  output  /**< */)
1897 {
1898     static const xcb_protocol_request_t xcb_req = {
1899         /* count */ 2,
1900         /* ext */ &xcb_randr_id,
1901         /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES,
1902         /* isvoid */ 0
1903     };
1904 
1905     struct iovec xcb_parts[4];
1906     xcb_randr_list_output_properties_cookie_t xcb_ret;
1907     xcb_randr_list_output_properties_request_t xcb_out;
1908 
1909     xcb_out.output = output;
1910 
1911     xcb_parts[2].iov_base = (char *) &xcb_out;
1912     xcb_parts[2].iov_len = sizeof(xcb_out);
1913     xcb_parts[3].iov_base = 0;
1914     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1915 
1916     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1917     return xcb_ret;
1918 }
1919 
1920 
1921 /*****************************************************************************
1922  **
1923  ** xcb_atom_t * xcb_randr_list_output_properties_atoms
1924  **
1925  ** @param const xcb_randr_list_output_properties_reply_t *R
1926  ** @returns xcb_atom_t *
1927  **
1928  *****************************************************************************/
1929 
1930 xcb_atom_t *
1931 xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R  /**< */)
1932 {
1933     return (xcb_atom_t *) (R + 1);
1934 }
1935 
1936 
1937 /*****************************************************************************
1938  **
1939  ** int xcb_randr_list_output_properties_atoms_length
1940  **
1941  ** @param const xcb_randr_list_output_properties_reply_t *R
1942  ** @returns int
1943  **
1944  *****************************************************************************/
1945 
1946 int
1947 xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R  /**< */)
1948 {
1949     return R->num_atoms;
1950 }
1951 
1952 
1953 /*****************************************************************************
1954  **
1955  ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end
1956  **
1957  ** @param const xcb_randr_list_output_properties_reply_t *R
1958  ** @returns xcb_generic_iterator_t
1959  **
1960  *****************************************************************************/
1961 
1962 xcb_generic_iterator_t
1963 xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R  /**< */)
1964 {
1965     xcb_generic_iterator_t i;
1966     i.data = ((xcb_atom_t *) (R + 1)) + (R->num_atoms);
1967     i.rem = 0;
1968     i.index = (char *) i.data - (char *) R;
1969     return i;
1970 }
1971 
1972 
1973 /*****************************************************************************
1974  **
1975  ** xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply
1976  **
1977  ** @param xcb_connection_t                           *c
1978  ** @param xcb_randr_list_output_properties_cookie_t   cookie
1979  ** @param xcb_generic_error_t                       **e
1980  ** @returns xcb_randr_list_output_properties_reply_t *
1981  **
1982  *****************************************************************************/
1983 
1984 xcb_randr_list_output_properties_reply_t *
1985 xcb_randr_list_output_properties_reply (xcb_connection_t                           *c  /**< */,
1986                                         xcb_randr_list_output_properties_cookie_t   cookie  /**< */,
1987                                         xcb_generic_error_t                       **e  /**< */)
1988 {
1989     return (xcb_randr_list_output_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1990 }
1991 
1992 int
1993 xcb_randr_query_output_property_sizeof (const void  *_buffer  /**< */)
1994 {
1995     char *xcb_tmp = (char *)_buffer;
1996     const xcb_randr_query_output_property_reply_t *_aux = (xcb_randr_query_output_property_reply_t *)_buffer;
1997     unsigned int xcb_buffer_len = 0;
1998     unsigned int xcb_block_len = 0;
1999     unsigned int xcb_pad = 0;
2000     unsigned int xcb_align_to;
2001 
2002 
2003     xcb_block_len += sizeof(xcb_randr_query_output_property_reply_t);
2004     xcb_tmp += xcb_block_len;
2005     /* validValues */
2006     xcb_block_len += _aux->length * sizeof(int32_t);
2007     xcb_tmp += xcb_block_len;
2008     xcb_align_to = ALIGNOF(int32_t);
2009     /* insert padding */
2010     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2011     xcb_buffer_len += xcb_block_len + xcb_pad;
2012     if (0 != xcb_pad) {
2013         xcb_tmp += xcb_pad;
2014         xcb_pad = 0;
2015     }
2016     xcb_block_len = 0;
2017 
2018     return xcb_buffer_len;
2019 }
2020 
2021 
2022 /*****************************************************************************
2023  **
2024  ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property
2025  **
2026  ** @param xcb_connection_t   *c
2027  ** @param xcb_randr_output_t  output
2028  ** @param xcb_atom_t          property
2029  ** @returns xcb_randr_query_output_property_cookie_t
2030  **
2031  *****************************************************************************/
2032 
2033 xcb_randr_query_output_property_cookie_t
2034 xcb_randr_query_output_property (xcb_connection_t   *c  /**< */,
2035                                  xcb_randr_output_t  output  /**< */,
2036                                  xcb_atom_t          property  /**< */)
2037 {
2038     static const xcb_protocol_request_t xcb_req = {
2039         /* count */ 2,
2040         /* ext */ &xcb_randr_id,
2041         /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY,
2042         /* isvoid */ 0
2043     };
2044 
2045     struct iovec xcb_parts[4];
2046     xcb_randr_query_output_property_cookie_t xcb_ret;
2047     xcb_randr_query_output_property_request_t xcb_out;
2048 
2049     xcb_out.output = output;
2050     xcb_out.property = property;
2051 
2052     xcb_parts[2].iov_base = (char *) &xcb_out;
2053     xcb_parts[2].iov_len = sizeof(xcb_out);
2054     xcb_parts[3].iov_base = 0;
2055     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2056 
2057     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2058     return xcb_ret;
2059 }
2060 
2061 
2062 /*****************************************************************************
2063  **
2064  ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked
2065  **
2066  ** @param xcb_connection_t   *c
2067  ** @param xcb_randr_output_t  output
2068  ** @param xcb_atom_t          property
2069  ** @returns xcb_randr_query_output_property_cookie_t
2070  **
2071  *****************************************************************************/
2072 
2073 xcb_randr_query_output_property_cookie_t
2074 xcb_randr_query_output_property_unchecked (xcb_connection_t   *c  /**< */,
2075                                            xcb_randr_output_t  output  /**< */,
2076                                            xcb_atom_t          property  /**< */)
2077 {
2078     static const xcb_protocol_request_t xcb_req = {
2079         /* count */ 2,
2080         /* ext */ &xcb_randr_id,
2081         /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY,
2082         /* isvoid */ 0
2083     };
2084 
2085     struct iovec xcb_parts[4];
2086     xcb_randr_query_output_property_cookie_t xcb_ret;
2087     xcb_randr_query_output_property_request_t xcb_out;
2088 
2089     xcb_out.output = output;
2090     xcb_out.property = property;
2091 
2092     xcb_parts[2].iov_base = (char *) &xcb_out;
2093     xcb_parts[2].iov_len = sizeof(xcb_out);
2094     xcb_parts[3].iov_base = 0;
2095     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2096 
2097     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2098     return xcb_ret;
2099 }
2100 
2101 
2102 /*****************************************************************************
2103  **
2104  ** int32_t * xcb_randr_query_output_property_valid_values
2105  **
2106  ** @param const xcb_randr_query_output_property_reply_t *R
2107  ** @returns int32_t *
2108  **
2109  *****************************************************************************/
2110 
2111 int32_t *
2112 xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R  /**< */)
2113 {
2114     return (int32_t *) (R + 1);
2115 }
2116 
2117 
2118 /*****************************************************************************
2119  **
2120  ** int xcb_randr_query_output_property_valid_values_length
2121  **
2122  ** @param const xcb_randr_query_output_property_reply_t *R
2123  ** @returns int
2124  **
2125  *****************************************************************************/
2126 
2127 int
2128 xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R  /**< */)
2129 {
2130     return R->length;
2131 }
2132 
2133 
2134 /*****************************************************************************
2135  **
2136  ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end
2137  **
2138  ** @param const xcb_randr_query_output_property_reply_t *R
2139  ** @returns xcb_generic_iterator_t
2140  **
2141  *****************************************************************************/
2142 
2143 xcb_generic_iterator_t
2144 xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R  /**< */)
2145 {
2146     xcb_generic_iterator_t i;
2147     i.data = ((int32_t *) (R + 1)) + (R->length);
2148     i.rem = 0;
2149     i.index = (char *) i.data - (char *) R;
2150     return i;
2151 }
2152 
2153 
2154 /*****************************************************************************
2155  **
2156  ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply
2157  **
2158  ** @param xcb_connection_t                          *c
2159  ** @param xcb_randr_query_output_property_cookie_t   cookie
2160  ** @param xcb_generic_error_t                      **e
2161  ** @returns xcb_randr_query_output_property_reply_t *
2162  **
2163  *****************************************************************************/
2164 
2165 xcb_randr_query_output_property_reply_t *
2166 xcb_randr_query_output_property_reply (xcb_connection_t                          *c  /**< */,
2167                                        xcb_randr_query_output_property_cookie_t   cookie  /**< */,
2168                                        xcb_generic_error_t                      **e  /**< */)
2169 {
2170     return (xcb_randr_query_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2171 }
2172 
2173 int
2174 xcb_randr_configure_output_property_sizeof (const void  *_buffer  /**< */,
2175                                             uint32_t     values_len  /**< */)
2176 {
2177     char *xcb_tmp = (char *)_buffer;
2178     unsigned int xcb_buffer_len = 0;
2179     unsigned int xcb_block_len = 0;
2180     unsigned int xcb_pad = 0;
2181     unsigned int xcb_align_to;
2182 
2183 
2184     xcb_block_len += sizeof(xcb_randr_configure_output_property_request_t);
2185     xcb_tmp += xcb_block_len;
2186     /* values */
2187     xcb_block_len += values_len * sizeof(int32_t);
2188     xcb_tmp += xcb_block_len;
2189     xcb_align_to = ALIGNOF(int32_t);
2190     /* insert padding */
2191     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2192     xcb_buffer_len += xcb_block_len + xcb_pad;
2193     if (0 != xcb_pad) {
2194         xcb_tmp += xcb_pad;
2195         xcb_pad = 0;
2196     }
2197     xcb_block_len = 0;
2198 
2199     return xcb_buffer_len;
2200 }
2201 
2202 
2203 /*****************************************************************************
2204  **
2205  ** xcb_void_cookie_t xcb_randr_configure_output_property_checked
2206  **
2207  ** @param xcb_connection_t   *c
2208  ** @param xcb_randr_output_t  output
2209  ** @param xcb_atom_t          property
2210  ** @param uint8_t             pending
2211  ** @param uint8_t             range
2212  ** @param uint32_t            values_len
2213  ** @param const int32_t      *values
2214  ** @returns xcb_void_cookie_t
2215  **
2216  *****************************************************************************/
2217 
2218 xcb_void_cookie_t
2219 xcb_randr_configure_output_property_checked (xcb_connection_t   *c  /**< */,
2220                                              xcb_randr_output_t  output  /**< */,
2221                                              xcb_atom_t          property  /**< */,
2222                                              uint8_t             pending  /**< */,
2223                                              uint8_t             range  /**< */,
2224                                              uint32_t            values_len  /**< */,
2225                                              const int32_t      *values  /**< */)
2226 {
2227     static const xcb_protocol_request_t xcb_req = {
2228         /* count */ 4,
2229         /* ext */ &xcb_randr_id,
2230         /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY,
2231         /* isvoid */ 1
2232     };
2233 
2234     struct iovec xcb_parts[6];
2235     xcb_void_cookie_t xcb_ret;
2236     xcb_randr_configure_output_property_request_t xcb_out;
2237 
2238     xcb_out.output = output;
2239     xcb_out.property = property;
2240     xcb_out.pending = pending;
2241     xcb_out.range = range;
2242     memset(xcb_out.pad0, 0, 2);
2243 
2244     xcb_parts[2].iov_base = (char *) &xcb_out;
2245     xcb_parts[2].iov_len = sizeof(xcb_out);
2246     xcb_parts[3].iov_base = 0;
2247     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2248     /* int32_t values */
2249     xcb_parts[4].iov_base = (char *) values;
2250     xcb_parts[4].iov_len = values_len * sizeof(int32_t);
2251     xcb_parts[5].iov_base = 0;
2252     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2253 
2254     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2255     return xcb_ret;
2256 }
2257 
2258 
2259 /*****************************************************************************
2260  **
2261  ** xcb_void_cookie_t xcb_randr_configure_output_property
2262  **
2263  ** @param xcb_connection_t   *c
2264  ** @param xcb_randr_output_t  output
2265  ** @param xcb_atom_t          property
2266  ** @param uint8_t             pending
2267  ** @param uint8_t             range
2268  ** @param uint32_t            values_len
2269  ** @param const int32_t      *values
2270  ** @returns xcb_void_cookie_t
2271  **
2272  *****************************************************************************/
2273 
2274 xcb_void_cookie_t
2275 xcb_randr_configure_output_property (xcb_connection_t   *c  /**< */,
2276                                      xcb_randr_output_t  output  /**< */,
2277                                      xcb_atom_t          property  /**< */,
2278                                      uint8_t             pending  /**< */,
2279                                      uint8_t             range  /**< */,
2280                                      uint32_t            values_len  /**< */,
2281                                      const int32_t      *values  /**< */)
2282 {
2283     static const xcb_protocol_request_t xcb_req = {
2284         /* count */ 4,
2285         /* ext */ &xcb_randr_id,
2286         /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY,
2287         /* isvoid */ 1
2288     };
2289 
2290     struct iovec xcb_parts[6];
2291     xcb_void_cookie_t xcb_ret;
2292     xcb_randr_configure_output_property_request_t xcb_out;
2293 
2294     xcb_out.output = output;
2295     xcb_out.property = property;
2296     xcb_out.pending = pending;
2297     xcb_out.range = range;
2298     memset(xcb_out.pad0, 0, 2);
2299 
2300     xcb_parts[2].iov_base = (char *) &xcb_out;
2301     xcb_parts[2].iov_len = sizeof(xcb_out);
2302     xcb_parts[3].iov_base = 0;
2303     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2304     /* int32_t values */
2305     xcb_parts[4].iov_base = (char *) values;
2306     xcb_parts[4].iov_len = values_len * sizeof(int32_t);
2307     xcb_parts[5].iov_base = 0;
2308     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2309 
2310     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2311     return xcb_ret;
2312 }
2313 
2314 int
2315 xcb_randr_change_output_property_sizeof (const void  *_buffer  /**< */)
2316 {
2317     char *xcb_tmp = (char *)_buffer;
2318     const xcb_randr_change_output_property_request_t *_aux = (xcb_randr_change_output_property_request_t *)_buffer;
2319     unsigned int xcb_buffer_len = 0;
2320     unsigned int xcb_block_len = 0;
2321     unsigned int xcb_pad = 0;
2322     unsigned int xcb_align_to;
2323 
2324 
2325     xcb_block_len += sizeof(xcb_randr_change_output_property_request_t);
2326     xcb_tmp += xcb_block_len;
2327     /* data */
2328     xcb_block_len += ((_aux->num_units * _aux->format) / 8) * sizeof(char);
2329     xcb_tmp += xcb_block_len;
2330     xcb_align_to = ALIGNOF(char);
2331     /* insert padding */
2332     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2333     xcb_buffer_len += xcb_block_len + xcb_pad;
2334     if (0 != xcb_pad) {
2335         xcb_tmp += xcb_pad;
2336         xcb_pad = 0;
2337     }
2338     xcb_block_len = 0;
2339 
2340     return xcb_buffer_len;
2341 }
2342 
2343 
2344 /*****************************************************************************
2345  **
2346  ** xcb_void_cookie_t xcb_randr_change_output_property_checked
2347  **
2348  ** @param xcb_connection_t   *c
2349  ** @param xcb_randr_output_t  output
2350  ** @param xcb_atom_t          property
2351  ** @param xcb_atom_t          type
2352  ** @param uint8_t             format
2353  ** @param uint8_t             mode
2354  ** @param uint32_t            num_units
2355  ** @param const void         *data
2356  ** @returns xcb_void_cookie_t
2357  **
2358  *****************************************************************************/
2359 
2360 xcb_void_cookie_t
2361 xcb_randr_change_output_property_checked (xcb_connection_t   *c  /**< */,
2362                                           xcb_randr_output_t  output  /**< */,
2363                                           xcb_atom_t          property  /**< */,
2364                                           xcb_atom_t          type  /**< */,
2365                                           uint8_t             format  /**< */,
2366                                           uint8_t             mode  /**< */,
2367                                           uint32_t            num_units  /**< */,
2368                                           const void         *data  /**< */)
2369 {
2370     static const xcb_protocol_request_t xcb_req = {
2371         /* count */ 4,
2372         /* ext */ &xcb_randr_id,
2373         /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY,
2374         /* isvoid */ 1
2375     };
2376 
2377     struct iovec xcb_parts[6];
2378     xcb_void_cookie_t xcb_ret;
2379     xcb_randr_change_output_property_request_t xcb_out;
2380 
2381     xcb_out.output = output;
2382     xcb_out.property = property;
2383     xcb_out.type = type;
2384     xcb_out.format = format;
2385     xcb_out.mode = mode;
2386     memset(xcb_out.pad0, 0, 2);
2387     xcb_out.num_units = num_units;
2388 
2389     xcb_parts[2].iov_base = (char *) &xcb_out;
2390     xcb_parts[2].iov_len = sizeof(xcb_out);
2391     xcb_parts[3].iov_base = 0;
2392     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2393     /* void data */
2394     xcb_parts[4].iov_base = (char *) data;
2395     xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char);
2396     xcb_parts[5].iov_base = 0;
2397     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2398 
2399     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2400     return xcb_ret;
2401 }
2402 
2403 
2404 /*****************************************************************************
2405  **
2406  ** xcb_void_cookie_t xcb_randr_change_output_property
2407  **
2408  ** @param xcb_connection_t   *c
2409  ** @param xcb_randr_output_t  output
2410  ** @param xcb_atom_t          property
2411  ** @param xcb_atom_t          type
2412  ** @param uint8_t             format
2413  ** @param uint8_t             mode
2414  ** @param uint32_t            num_units
2415  ** @param const void         *data
2416  ** @returns xcb_void_cookie_t
2417  **
2418  *****************************************************************************/
2419 
2420 xcb_void_cookie_t
2421 xcb_randr_change_output_property (xcb_connection_t   *c  /**< */,
2422                                   xcb_randr_output_t  output  /**< */,
2423                                   xcb_atom_t          property  /**< */,
2424                                   xcb_atom_t          type  /**< */,
2425                                   uint8_t             format  /**< */,
2426                                   uint8_t             mode  /**< */,
2427                                   uint32_t            num_units  /**< */,
2428                                   const void         *data  /**< */)
2429 {
2430     static const xcb_protocol_request_t xcb_req = {
2431         /* count */ 4,
2432         /* ext */ &xcb_randr_id,
2433         /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY,
2434         /* isvoid */ 1
2435     };
2436 
2437     struct iovec xcb_parts[6];
2438     xcb_void_cookie_t xcb_ret;
2439     xcb_randr_change_output_property_request_t xcb_out;
2440 
2441     xcb_out.output = output;
2442     xcb_out.property = property;
2443     xcb_out.type = type;
2444     xcb_out.format = format;
2445     xcb_out.mode = mode;
2446     memset(xcb_out.pad0, 0, 2);
2447     xcb_out.num_units = num_units;
2448 
2449     xcb_parts[2].iov_base = (char *) &xcb_out;
2450     xcb_parts[2].iov_len = sizeof(xcb_out);
2451     xcb_parts[3].iov_base = 0;
2452     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2453     /* void data */
2454     xcb_parts[4].iov_base = (char *) data;
2455     xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char);
2456     xcb_parts[5].iov_base = 0;
2457     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2458 
2459     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2460     return xcb_ret;
2461 }
2462 
2463 
2464 /*****************************************************************************
2465  **
2466  ** xcb_void_cookie_t xcb_randr_delete_output_property_checked
2467  **
2468  ** @param xcb_connection_t   *c
2469  ** @param xcb_randr_output_t  output
2470  ** @param xcb_atom_t          property
2471  ** @returns xcb_void_cookie_t
2472  **
2473  *****************************************************************************/
2474 
2475 xcb_void_cookie_t
2476 xcb_randr_delete_output_property_checked (xcb_connection_t   *c  /**< */,
2477                                           xcb_randr_output_t  output  /**< */,
2478                                           xcb_atom_t          property  /**< */)
2479 {
2480     static const xcb_protocol_request_t xcb_req = {
2481         /* count */ 2,
2482         /* ext */ &xcb_randr_id,
2483         /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY,
2484         /* isvoid */ 1
2485     };
2486 
2487     struct iovec xcb_parts[4];
2488     xcb_void_cookie_t xcb_ret;
2489     xcb_randr_delete_output_property_request_t xcb_out;
2490 
2491     xcb_out.output = output;
2492     xcb_out.property = property;
2493 
2494     xcb_parts[2].iov_base = (char *) &xcb_out;
2495     xcb_parts[2].iov_len = sizeof(xcb_out);
2496     xcb_parts[3].iov_base = 0;
2497     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2498 
2499     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2500     return xcb_ret;
2501 }
2502 
2503 
2504 /*****************************************************************************
2505  **
2506  ** xcb_void_cookie_t xcb_randr_delete_output_property
2507  **
2508  ** @param xcb_connection_t   *c
2509  ** @param xcb_randr_output_t  output
2510  ** @param xcb_atom_t          property
2511  ** @returns xcb_void_cookie_t
2512  **
2513  *****************************************************************************/
2514 
2515 xcb_void_cookie_t
2516 xcb_randr_delete_output_property (xcb_connection_t   *c  /**< */,
2517                                   xcb_randr_output_t  output  /**< */,
2518                                   xcb_atom_t          property  /**< */)
2519 {
2520     static const xcb_protocol_request_t xcb_req = {
2521         /* count */ 2,
2522         /* ext */ &xcb_randr_id,
2523         /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY,
2524         /* isvoid */ 1
2525     };
2526 
2527     struct iovec xcb_parts[4];
2528     xcb_void_cookie_t xcb_ret;
2529     xcb_randr_delete_output_property_request_t xcb_out;
2530 
2531     xcb_out.output = output;
2532     xcb_out.property = property;
2533 
2534     xcb_parts[2].iov_base = (char *) &xcb_out;
2535     xcb_parts[2].iov_len = sizeof(xcb_out);
2536     xcb_parts[3].iov_base = 0;
2537     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2538 
2539     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2540     return xcb_ret;
2541 }
2542 
2543 int
2544 xcb_randr_get_output_property_sizeof (const void  *_buffer  /**< */)
2545 {
2546     char *xcb_tmp = (char *)_buffer;
2547     const xcb_randr_get_output_property_reply_t *_aux = (xcb_randr_get_output_property_reply_t *)_buffer;
2548     unsigned int xcb_buffer_len = 0;
2549     unsigned int xcb_block_len = 0;
2550     unsigned int xcb_pad = 0;
2551     unsigned int xcb_align_to;
2552 
2553 
2554     xcb_block_len += sizeof(xcb_randr_get_output_property_reply_t);
2555     xcb_tmp += xcb_block_len;
2556     /* data */
2557     xcb_block_len += (_aux->num_items * (_aux->format / 8)) * sizeof(uint8_t);
2558     xcb_tmp += xcb_block_len;
2559     xcb_align_to = ALIGNOF(uint8_t);
2560     /* insert padding */
2561     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2562     xcb_buffer_len += xcb_block_len + xcb_pad;
2563     if (0 != xcb_pad) {
2564         xcb_tmp += xcb_pad;
2565         xcb_pad = 0;
2566     }
2567     xcb_block_len = 0;
2568 
2569     return xcb_buffer_len;
2570 }
2571 
2572 
2573 /*****************************************************************************
2574  **
2575  ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property
2576  **
2577  ** @param xcb_connection_t   *c
2578  ** @param xcb_randr_output_t  output
2579  ** @param xcb_atom_t          property
2580  ** @param xcb_atom_t          type
2581  ** @param uint32_t            long_offset
2582  ** @param uint32_t            long_length
2583  ** @param uint8_t             _delete
2584  ** @param uint8_t             pending
2585  ** @returns xcb_randr_get_output_property_cookie_t
2586  **
2587  *****************************************************************************/
2588 
2589 xcb_randr_get_output_property_cookie_t
2590 xcb_randr_get_output_property (xcb_connection_t   *c  /**< */,
2591                                xcb_randr_output_t  output  /**< */,
2592                                xcb_atom_t          property  /**< */,
2593                                xcb_atom_t          type  /**< */,
2594                                uint32_t            long_offset  /**< */,
2595                                uint32_t            long_length  /**< */,
2596                                uint8_t             _delete  /**< */,
2597                                uint8_t             pending  /**< */)
2598 {
2599     static const xcb_protocol_request_t xcb_req = {
2600         /* count */ 2,
2601         /* ext */ &xcb_randr_id,
2602         /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY,
2603         /* isvoid */ 0
2604     };
2605 
2606     struct iovec xcb_parts[4];
2607     xcb_randr_get_output_property_cookie_t xcb_ret;
2608     xcb_randr_get_output_property_request_t xcb_out;
2609 
2610     xcb_out.output = output;
2611     xcb_out.property = property;
2612     xcb_out.type = type;
2613     xcb_out.long_offset = long_offset;
2614     xcb_out.long_length = long_length;
2615     xcb_out._delete = _delete;
2616     xcb_out.pending = pending;
2617     memset(xcb_out.pad0, 0, 2);
2618 
2619     xcb_parts[2].iov_base = (char *) &xcb_out;
2620     xcb_parts[2].iov_len = sizeof(xcb_out);
2621     xcb_parts[3].iov_base = 0;
2622     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2623 
2624     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2625     return xcb_ret;
2626 }
2627 
2628 
2629 /*****************************************************************************
2630  **
2631  ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked
2632  **
2633  ** @param xcb_connection_t   *c
2634  ** @param xcb_randr_output_t  output
2635  ** @param xcb_atom_t          property
2636  ** @param xcb_atom_t          type
2637  ** @param uint32_t            long_offset
2638  ** @param uint32_t            long_length
2639  ** @param uint8_t             _delete
2640  ** @param uint8_t             pending
2641  ** @returns xcb_randr_get_output_property_cookie_t
2642  **
2643  *****************************************************************************/
2644 
2645 xcb_randr_get_output_property_cookie_t
2646 xcb_randr_get_output_property_unchecked (xcb_connection_t   *c  /**< */,
2647                                          xcb_randr_output_t  output  /**< */,
2648                                          xcb_atom_t          property  /**< */,
2649                                          xcb_atom_t          type  /**< */,
2650                                          uint32_t            long_offset  /**< */,
2651                                          uint32_t            long_length  /**< */,
2652                                          uint8_t             _delete  /**< */,
2653                                          uint8_t             pending  /**< */)
2654 {
2655     static const xcb_protocol_request_t xcb_req = {
2656         /* count */ 2,
2657         /* ext */ &xcb_randr_id,
2658         /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY,
2659         /* isvoid */ 0
2660     };
2661 
2662     struct iovec xcb_parts[4];
2663     xcb_randr_get_output_property_cookie_t xcb_ret;
2664     xcb_randr_get_output_property_request_t xcb_out;
2665 
2666     xcb_out.output = output;
2667     xcb_out.property = property;
2668     xcb_out.type = type;
2669     xcb_out.long_offset = long_offset;
2670     xcb_out.long_length = long_length;
2671     xcb_out._delete = _delete;
2672     xcb_out.pending = pending;
2673     memset(xcb_out.pad0, 0, 2);
2674 
2675     xcb_parts[2].iov_base = (char *) &xcb_out;
2676     xcb_parts[2].iov_len = sizeof(xcb_out);
2677     xcb_parts[3].iov_base = 0;
2678     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2679 
2680     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2681     return xcb_ret;
2682 }
2683 
2684 
2685 /*****************************************************************************
2686  **
2687  ** uint8_t * xcb_randr_get_output_property_data
2688  **
2689  ** @param const xcb_randr_get_output_property_reply_t *R
2690  ** @returns uint8_t *
2691  **
2692  *****************************************************************************/
2693 
2694 uint8_t *
2695 xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R  /**< */)
2696 {
2697     return (uint8_t *) (R + 1);
2698 }
2699 
2700 
2701 /*****************************************************************************
2702  **
2703  ** int xcb_randr_get_output_property_data_length
2704  **
2705  ** @param const xcb_randr_get_output_property_reply_t *R
2706  ** @returns int
2707  **
2708  *****************************************************************************/
2709 
2710 int
2711 xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R  /**< */)
2712 {
2713     return (R->num_items * (R->format / 8));
2714 }
2715 
2716 
2717 /*****************************************************************************
2718  **
2719  ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end
2720  **
2721  ** @param const xcb_randr_get_output_property_reply_t *R
2722  ** @returns xcb_generic_iterator_t
2723  **
2724  *****************************************************************************/
2725 
2726 xcb_generic_iterator_t
2727 xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R  /**< */)
2728 {
2729     xcb_generic_iterator_t i;
2730     i.data = ((uint8_t *) (R + 1)) + ((R->num_items * (R->format / 8)));
2731     i.rem = 0;
2732     i.index = (char *) i.data - (char *) R;
2733     return i;
2734 }
2735 
2736 
2737 /*****************************************************************************
2738  **
2739  ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply
2740  **
2741  ** @param xcb_connection_t                        *c
2742  ** @param xcb_randr_get_output_property_cookie_t   cookie
2743  ** @param xcb_generic_error_t                    **e
2744  ** @returns xcb_randr_get_output_property_reply_t *
2745  **
2746  *****************************************************************************/
2747 
2748 xcb_randr_get_output_property_reply_t *
2749 xcb_randr_get_output_property_reply (xcb_connection_t                        *c  /**< */,
2750                                      xcb_randr_get_output_property_cookie_t   cookie  /**< */,
2751                                      xcb_generic_error_t                    **e  /**< */)
2752 {
2753     return (xcb_randr_get_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2754 }
2755 
2756 int
2757 xcb_randr_create_mode_sizeof (const void  *_buffer  /**< */,
2758                               uint32_t     name_len  /**< */)
2759 {
2760     char *xcb_tmp = (char *)_buffer;
2761     unsigned int xcb_buffer_len = 0;
2762     unsigned int xcb_block_len = 0;
2763     unsigned int xcb_pad = 0;
2764     unsigned int xcb_align_to;
2765 
2766 
2767     xcb_block_len += sizeof(xcb_randr_create_mode_request_t);
2768     xcb_tmp += xcb_block_len;
2769     /* name */
2770     xcb_block_len += name_len * sizeof(char);
2771     xcb_tmp += xcb_block_len;
2772     xcb_align_to = ALIGNOF(char);
2773     /* insert padding */
2774     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2775     xcb_buffer_len += xcb_block_len + xcb_pad;
2776     if (0 != xcb_pad) {
2777         xcb_tmp += xcb_pad;
2778         xcb_pad = 0;
2779     }
2780     xcb_block_len = 0;
2781 
2782     return xcb_buffer_len;
2783 }
2784 
2785 
2786 /*****************************************************************************
2787  **
2788  ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode
2789  **
2790  ** @param xcb_connection_t      *c
2791  ** @param xcb_window_t           window
2792  ** @param xcb_randr_mode_info_t  mode_info
2793  ** @param uint32_t               name_len
2794  ** @param const char            *name
2795  ** @returns xcb_randr_create_mode_cookie_t
2796  **
2797  *****************************************************************************/
2798 
2799 xcb_randr_create_mode_cookie_t
2800 xcb_randr_create_mode (xcb_connection_t      *c  /**< */,
2801                        xcb_window_t           window  /**< */,
2802                        xcb_randr_mode_info_t  mode_info  /**< */,
2803                        uint32_t               name_len  /**< */,
2804                        const char            *name  /**< */)
2805 {
2806     static const xcb_protocol_request_t xcb_req = {
2807         /* count */ 4,
2808         /* ext */ &xcb_randr_id,
2809         /* opcode */ XCB_RANDR_CREATE_MODE,
2810         /* isvoid */ 0
2811     };
2812 
2813     struct iovec xcb_parts[6];
2814     xcb_randr_create_mode_cookie_t xcb_ret;
2815     xcb_randr_create_mode_request_t xcb_out;
2816 
2817     xcb_out.window = window;
2818     xcb_out.mode_info = mode_info;
2819 
2820     xcb_parts[2].iov_base = (char *) &xcb_out;
2821     xcb_parts[2].iov_len = sizeof(xcb_out);
2822     xcb_parts[3].iov_base = 0;
2823     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2824     /* char name */
2825     xcb_parts[4].iov_base = (char *) name;
2826     xcb_parts[4].iov_len = name_len * sizeof(char);
2827     xcb_parts[5].iov_base = 0;
2828     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2829 
2830     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2831     return xcb_ret;
2832 }
2833 
2834 
2835 /*****************************************************************************
2836  **
2837  ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked
2838  **
2839  ** @param xcb_connection_t      *c
2840  ** @param xcb_window_t           window
2841  ** @param xcb_randr_mode_info_t  mode_info
2842  ** @param uint32_t               name_len
2843  ** @param const char            *name
2844  ** @returns xcb_randr_create_mode_cookie_t
2845  **
2846  *****************************************************************************/
2847 
2848 xcb_randr_create_mode_cookie_t
2849 xcb_randr_create_mode_unchecked (xcb_connection_t      *c  /**< */,
2850                                  xcb_window_t           window  /**< */,
2851                                  xcb_randr_mode_info_t  mode_info  /**< */,
2852                                  uint32_t               name_len  /**< */,
2853                                  const char            *name  /**< */)
2854 {
2855     static const xcb_protocol_request_t xcb_req = {
2856         /* count */ 4,
2857         /* ext */ &xcb_randr_id,
2858         /* opcode */ XCB_RANDR_CREATE_MODE,
2859         /* isvoid */ 0
2860     };
2861 
2862     struct iovec xcb_parts[6];
2863     xcb_randr_create_mode_cookie_t xcb_ret;
2864     xcb_randr_create_mode_request_t xcb_out;
2865 
2866     xcb_out.window = window;
2867     xcb_out.mode_info = mode_info;
2868 
2869     xcb_parts[2].iov_base = (char *) &xcb_out;
2870     xcb_parts[2].iov_len = sizeof(xcb_out);
2871     xcb_parts[3].iov_base = 0;
2872     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2873     /* char name */
2874     xcb_parts[4].iov_base = (char *) name;
2875     xcb_parts[4].iov_len = name_len * sizeof(char);
2876     xcb_parts[5].iov_base = 0;
2877     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2878 
2879     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2880     return xcb_ret;
2881 }
2882 
2883 
2884 /*****************************************************************************
2885  **
2886  ** xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply
2887  **
2888  ** @param xcb_connection_t                *c
2889  ** @param xcb_randr_create_mode_cookie_t   cookie
2890  ** @param xcb_generic_error_t            **e
2891  ** @returns xcb_randr_create_mode_reply_t *
2892  **
2893  *****************************************************************************/
2894 
2895 xcb_randr_create_mode_reply_t *
2896 xcb_randr_create_mode_reply (xcb_connection_t                *c  /**< */,
2897                              xcb_randr_create_mode_cookie_t   cookie  /**< */,
2898                              xcb_generic_error_t            **e  /**< */)
2899 {
2900     return (xcb_randr_create_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2901 }
2902 
2903 
2904 /*****************************************************************************
2905  **
2906  ** xcb_void_cookie_t xcb_randr_destroy_mode_checked
2907  **
2908  ** @param xcb_connection_t *c
2909  ** @param xcb_randr_mode_t  mode
2910  ** @returns xcb_void_cookie_t
2911  **
2912  *****************************************************************************/
2913 
2914 xcb_void_cookie_t
2915 xcb_randr_destroy_mode_checked (xcb_connection_t *c  /**< */,
2916                                 xcb_randr_mode_t  mode  /**< */)
2917 {
2918     static const xcb_protocol_request_t xcb_req = {
2919         /* count */ 2,
2920         /* ext */ &xcb_randr_id,
2921         /* opcode */ XCB_RANDR_DESTROY_MODE,
2922         /* isvoid */ 1
2923     };
2924 
2925     struct iovec xcb_parts[4];
2926     xcb_void_cookie_t xcb_ret;
2927     xcb_randr_destroy_mode_request_t xcb_out;
2928 
2929     xcb_out.mode = mode;
2930 
2931     xcb_parts[2].iov_base = (char *) &xcb_out;
2932     xcb_parts[2].iov_len = sizeof(xcb_out);
2933     xcb_parts[3].iov_base = 0;
2934     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2935 
2936     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2937     return xcb_ret;
2938 }
2939 
2940 
2941 /*****************************************************************************
2942  **
2943  ** xcb_void_cookie_t xcb_randr_destroy_mode
2944  **
2945  ** @param xcb_connection_t *c
2946  ** @param xcb_randr_mode_t  mode
2947  ** @returns xcb_void_cookie_t
2948  **
2949  *****************************************************************************/
2950 
2951 xcb_void_cookie_t
2952 xcb_randr_destroy_mode (xcb_connection_t *c  /**< */,
2953                         xcb_randr_mode_t  mode  /**< */)
2954 {
2955     static const xcb_protocol_request_t xcb_req = {
2956         /* count */ 2,
2957         /* ext */ &xcb_randr_id,
2958         /* opcode */ XCB_RANDR_DESTROY_MODE,
2959         /* isvoid */ 1
2960     };
2961 
2962     struct iovec xcb_parts[4];
2963     xcb_void_cookie_t xcb_ret;
2964     xcb_randr_destroy_mode_request_t xcb_out;
2965 
2966     xcb_out.mode = mode;
2967 
2968     xcb_parts[2].iov_base = (char *) &xcb_out;
2969     xcb_parts[2].iov_len = sizeof(xcb_out);
2970     xcb_parts[3].iov_base = 0;
2971     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2972 
2973     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2974     return xcb_ret;
2975 }
2976 
2977 
2978 /*****************************************************************************
2979  **
2980  ** xcb_void_cookie_t xcb_randr_add_output_mode_checked
2981  **
2982  ** @param xcb_connection_t   *c
2983  ** @param xcb_randr_output_t  output
2984  ** @param xcb_randr_mode_t    mode
2985  ** @returns xcb_void_cookie_t
2986  **
2987  *****************************************************************************/
2988 
2989 xcb_void_cookie_t
2990 xcb_randr_add_output_mode_checked (xcb_connection_t   *c  /**< */,
2991                                    xcb_randr_output_t  output  /**< */,
2992                                    xcb_randr_mode_t    mode  /**< */)
2993 {
2994     static const xcb_protocol_request_t xcb_req = {
2995         /* count */ 2,
2996         /* ext */ &xcb_randr_id,
2997         /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE,
2998         /* isvoid */ 1
2999     };
3000 
3001     struct iovec xcb_parts[4];
3002     xcb_void_cookie_t xcb_ret;
3003     xcb_randr_add_output_mode_request_t xcb_out;
3004 
3005     xcb_out.output = output;
3006     xcb_out.mode = mode;
3007 
3008     xcb_parts[2].iov_base = (char *) &xcb_out;
3009     xcb_parts[2].iov_len = sizeof(xcb_out);
3010     xcb_parts[3].iov_base = 0;
3011     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3012 
3013     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3014     return xcb_ret;
3015 }
3016 
3017 
3018 /*****************************************************************************
3019  **
3020  ** xcb_void_cookie_t xcb_randr_add_output_mode
3021  **
3022  ** @param xcb_connection_t   *c
3023  ** @param xcb_randr_output_t  output
3024  ** @param xcb_randr_mode_t    mode
3025  ** @returns xcb_void_cookie_t
3026  **
3027  *****************************************************************************/
3028 
3029 xcb_void_cookie_t
3030 xcb_randr_add_output_mode (xcb_connection_t   *c  /**< */,
3031                            xcb_randr_output_t  output  /**< */,
3032                            xcb_randr_mode_t    mode  /**< */)
3033 {
3034     static const xcb_protocol_request_t xcb_req = {
3035         /* count */ 2,
3036         /* ext */ &xcb_randr_id,
3037         /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE,
3038         /* isvoid */ 1
3039     };
3040 
3041     struct iovec xcb_parts[4];
3042     xcb_void_cookie_t xcb_ret;
3043     xcb_randr_add_output_mode_request_t xcb_out;
3044 
3045     xcb_out.output = output;
3046     xcb_out.mode = mode;
3047 
3048     xcb_parts[2].iov_base = (char *) &xcb_out;
3049     xcb_parts[2].iov_len = sizeof(xcb_out);
3050     xcb_parts[3].iov_base = 0;
3051     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3052 
3053     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3054     return xcb_ret;
3055 }
3056 
3057 
3058 /*****************************************************************************
3059  **
3060  ** xcb_void_cookie_t xcb_randr_delete_output_mode_checked
3061  **
3062  ** @param xcb_connection_t   *c
3063  ** @param xcb_randr_output_t  output
3064  ** @param xcb_randr_mode_t    mode
3065  ** @returns xcb_void_cookie_t
3066  **
3067  *****************************************************************************/
3068 
3069 xcb_void_cookie_t
3070 xcb_randr_delete_output_mode_checked (xcb_connection_t   *c  /**< */,
3071                                       xcb_randr_output_t  output  /**< */,
3072                                       xcb_randr_mode_t    mode  /**< */)
3073 {
3074     static const xcb_protocol_request_t xcb_req = {
3075         /* count */ 2,
3076         /* ext */ &xcb_randr_id,
3077         /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE,
3078         /* isvoid */ 1
3079     };
3080 
3081     struct iovec xcb_parts[4];
3082     xcb_void_cookie_t xcb_ret;
3083     xcb_randr_delete_output_mode_request_t xcb_out;
3084 
3085     xcb_out.output = output;
3086     xcb_out.mode = mode;
3087 
3088     xcb_parts[2].iov_base = (char *) &xcb_out;
3089     xcb_parts[2].iov_len = sizeof(xcb_out);
3090     xcb_parts[3].iov_base = 0;
3091     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3092 
3093     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3094     return xcb_ret;
3095 }
3096 
3097 
3098 /*****************************************************************************
3099  **
3100  ** xcb_void_cookie_t xcb_randr_delete_output_mode
3101  **
3102  ** @param xcb_connection_t   *c
3103  ** @param xcb_randr_output_t  output
3104  ** @param xcb_randr_mode_t    mode
3105  ** @returns xcb_void_cookie_t
3106  **
3107  *****************************************************************************/
3108 
3109 xcb_void_cookie_t
3110 xcb_randr_delete_output_mode (xcb_connection_t   *c  /**< */,
3111                               xcb_randr_output_t  output  /**< */,
3112                               xcb_randr_mode_t    mode  /**< */)
3113 {
3114     static const xcb_protocol_request_t xcb_req = {
3115         /* count */ 2,
3116         /* ext */ &xcb_randr_id,
3117         /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE,
3118         /* isvoid */ 1
3119     };
3120 
3121     struct iovec xcb_parts[4];
3122     xcb_void_cookie_t xcb_ret;
3123     xcb_randr_delete_output_mode_request_t xcb_out;
3124 
3125     xcb_out.output = output;
3126     xcb_out.mode = mode;
3127 
3128     xcb_parts[2].iov_base = (char *) &xcb_out;
3129     xcb_parts[2].iov_len = sizeof(xcb_out);
3130     xcb_parts[3].iov_base = 0;
3131     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3132 
3133     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3134     return xcb_ret;
3135 }
3136 
3137 int
3138 xcb_randr_get_crtc_info_sizeof (const void  *_buffer  /**< */)
3139 {
3140     char *xcb_tmp = (char *)_buffer;
3141     const xcb_randr_get_crtc_info_reply_t *_aux = (xcb_randr_get_crtc_info_reply_t *)_buffer;
3142     unsigned int xcb_buffer_len = 0;
3143     unsigned int xcb_block_len = 0;
3144     unsigned int xcb_pad = 0;
3145     unsigned int xcb_align_to;
3146 
3147 
3148     xcb_block_len += sizeof(xcb_randr_get_crtc_info_reply_t);
3149     xcb_tmp += xcb_block_len;
3150     /* outputs */
3151     xcb_block_len += _aux->num_outputs * sizeof(xcb_randr_output_t);
3152     xcb_tmp += xcb_block_len;
3153     xcb_align_to = ALIGNOF(xcb_randr_output_t);
3154     /* insert padding */
3155     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3156     xcb_buffer_len += xcb_block_len + xcb_pad;
3157     if (0 != xcb_pad) {
3158         xcb_tmp += xcb_pad;
3159         xcb_pad = 0;
3160     }
3161     xcb_block_len = 0;
3162     /* possible */
3163     xcb_block_len += _aux->num_possible_outputs * sizeof(xcb_randr_output_t);
3164     xcb_tmp += xcb_block_len;
3165     xcb_align_to = ALIGNOF(xcb_randr_output_t);
3166     /* insert padding */
3167     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3168     xcb_buffer_len += xcb_block_len + xcb_pad;
3169     if (0 != xcb_pad) {
3170         xcb_tmp += xcb_pad;
3171         xcb_pad = 0;
3172     }
3173     xcb_block_len = 0;
3174 
3175     return xcb_buffer_len;
3176 }
3177 
3178 
3179 /*****************************************************************************
3180  **
3181  ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info
3182  **
3183  ** @param xcb_connection_t *c
3184  ** @param xcb_randr_crtc_t  crtc
3185  ** @param xcb_timestamp_t   config_timestamp
3186  ** @returns xcb_randr_get_crtc_info_cookie_t
3187  **
3188  *****************************************************************************/
3189 
3190 xcb_randr_get_crtc_info_cookie_t
3191 xcb_randr_get_crtc_info (xcb_connection_t *c  /**< */,
3192                          xcb_randr_crtc_t  crtc  /**< */,
3193                          xcb_timestamp_t   config_timestamp  /**< */)
3194 {
3195     static const xcb_protocol_request_t xcb_req = {
3196         /* count */ 2,
3197         /* ext */ &xcb_randr_id,
3198         /* opcode */ XCB_RANDR_GET_CRTC_INFO,
3199         /* isvoid */ 0
3200     };
3201 
3202     struct iovec xcb_parts[4];
3203     xcb_randr_get_crtc_info_cookie_t xcb_ret;
3204     xcb_randr_get_crtc_info_request_t xcb_out;
3205 
3206     xcb_out.crtc = crtc;
3207     xcb_out.config_timestamp = config_timestamp;
3208 
3209     xcb_parts[2].iov_base = (char *) &xcb_out;
3210     xcb_parts[2].iov_len = sizeof(xcb_out);
3211     xcb_parts[3].iov_base = 0;
3212     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3213 
3214     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3215     return xcb_ret;
3216 }
3217 
3218 
3219 /*****************************************************************************
3220  **
3221  ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked
3222  **
3223  ** @param xcb_connection_t *c
3224  ** @param xcb_randr_crtc_t  crtc
3225  ** @param xcb_timestamp_t   config_timestamp
3226  ** @returns xcb_randr_get_crtc_info_cookie_t
3227  **
3228  *****************************************************************************/
3229 
3230 xcb_randr_get_crtc_info_cookie_t
3231 xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c  /**< */,
3232                                    xcb_randr_crtc_t  crtc  /**< */,
3233                                    xcb_timestamp_t   config_timestamp  /**< */)
3234 {
3235     static const xcb_protocol_request_t xcb_req = {
3236         /* count */ 2,
3237         /* ext */ &xcb_randr_id,
3238         /* opcode */ XCB_RANDR_GET_CRTC_INFO,
3239         /* isvoid */ 0
3240     };
3241 
3242     struct iovec xcb_parts[4];
3243     xcb_randr_get_crtc_info_cookie_t xcb_ret;
3244     xcb_randr_get_crtc_info_request_t xcb_out;
3245 
3246     xcb_out.crtc = crtc;
3247     xcb_out.config_timestamp = config_timestamp;
3248 
3249     xcb_parts[2].iov_base = (char *) &xcb_out;
3250     xcb_parts[2].iov_len = sizeof(xcb_out);
3251     xcb_parts[3].iov_base = 0;
3252     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3253 
3254     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3255     return xcb_ret;
3256 }
3257 
3258 
3259 /*****************************************************************************
3260  **
3261  ** xcb_randr_output_t * xcb_randr_get_crtc_info_outputs
3262  **
3263  ** @param const xcb_randr_get_crtc_info_reply_t *R
3264  ** @returns xcb_randr_output_t *
3265  **
3266  *****************************************************************************/
3267 
3268 xcb_randr_output_t *
3269 xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3270 {
3271     return (xcb_randr_output_t *) (R + 1);
3272 }
3273 
3274 
3275 /*****************************************************************************
3276  **
3277  ** int xcb_randr_get_crtc_info_outputs_length
3278  **
3279  ** @param const xcb_randr_get_crtc_info_reply_t *R
3280  ** @returns int
3281  **
3282  *****************************************************************************/
3283 
3284 int
3285 xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3286 {
3287     return R->num_outputs;
3288 }
3289 
3290 
3291 /*****************************************************************************
3292  **
3293  ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end
3294  **
3295  ** @param const xcb_randr_get_crtc_info_reply_t *R
3296  ** @returns xcb_generic_iterator_t
3297  **
3298  *****************************************************************************/
3299 
3300 xcb_generic_iterator_t
3301 xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3302 {
3303     xcb_generic_iterator_t i;
3304     i.data = ((xcb_randr_output_t *) (R + 1)) + (R->num_outputs);
3305     i.rem = 0;
3306     i.index = (char *) i.data - (char *) R;
3307     return i;
3308 }
3309 
3310 
3311 /*****************************************************************************
3312  **
3313  ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible
3314  **
3315  ** @param const xcb_randr_get_crtc_info_reply_t *R
3316  ** @returns xcb_randr_output_t *
3317  **
3318  *****************************************************************************/
3319 
3320 xcb_randr_output_t *
3321 xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3322 {
3323     xcb_generic_iterator_t prev = xcb_randr_get_crtc_info_outputs_end(R);
3324     return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
3325 }
3326 
3327 
3328 /*****************************************************************************
3329  **
3330  ** int xcb_randr_get_crtc_info_possible_length
3331  **
3332  ** @param const xcb_randr_get_crtc_info_reply_t *R
3333  ** @returns int
3334  **
3335  *****************************************************************************/
3336 
3337 int
3338 xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3339 {
3340     return R->num_possible_outputs;
3341 }
3342 
3343 
3344 /*****************************************************************************
3345  **
3346  ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end
3347  **
3348  ** @param const xcb_randr_get_crtc_info_reply_t *R
3349  ** @returns xcb_generic_iterator_t
3350  **
3351  *****************************************************************************/
3352 
3353 xcb_generic_iterator_t
3354 xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R  /**< */)
3355 {
3356     xcb_generic_iterator_t i;
3357     xcb_generic_iterator_t child = xcb_randr_get_crtc_info_outputs_end(R);
3358     i.data = ((xcb_randr_output_t *) child.data) + (R->num_possible_outputs);
3359     i.rem = 0;
3360     i.index = (char *) i.data - (char *) R;
3361     return i;
3362 }
3363 
3364 
3365 /*****************************************************************************
3366  **
3367  ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply
3368  **
3369  ** @param xcb_connection_t                  *c
3370  ** @param xcb_randr_get_crtc_info_cookie_t   cookie
3371  ** @param xcb_generic_error_t              **e
3372  ** @returns xcb_randr_get_crtc_info_reply_t *
3373  **
3374  *****************************************************************************/
3375 
3376 xcb_randr_get_crtc_info_reply_t *
3377 xcb_randr_get_crtc_info_reply (xcb_connection_t                  *c  /**< */,
3378                                xcb_randr_get_crtc_info_cookie_t   cookie  /**< */,
3379                                xcb_generic_error_t              **e  /**< */)
3380 {
3381     return (xcb_randr_get_crtc_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3382 }
3383 
3384 int
3385 xcb_randr_set_crtc_config_sizeof (const void  *_buffer  /**< */,
3386                                   uint32_t     outputs_len  /**< */)
3387 {
3388     char *xcb_tmp = (char *)_buffer;
3389     unsigned int xcb_buffer_len = 0;
3390     unsigned int xcb_block_len = 0;
3391     unsigned int xcb_pad = 0;
3392     unsigned int xcb_align_to;
3393 
3394 
3395     xcb_block_len += sizeof(xcb_randr_set_crtc_config_request_t);
3396     xcb_tmp += xcb_block_len;
3397     /* outputs */
3398     xcb_block_len += outputs_len * sizeof(xcb_randr_output_t);
3399     xcb_tmp += xcb_block_len;
3400     xcb_align_to = ALIGNOF(xcb_randr_output_t);
3401     /* insert padding */
3402     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3403     xcb_buffer_len += xcb_block_len + xcb_pad;
3404     if (0 != xcb_pad) {
3405         xcb_tmp += xcb_pad;
3406         xcb_pad = 0;
3407     }
3408     xcb_block_len = 0;
3409 
3410     return xcb_buffer_len;
3411 }
3412 
3413 
3414 /*****************************************************************************
3415  **
3416  ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config
3417  **
3418  ** @param xcb_connection_t         *c
3419  ** @param xcb_randr_crtc_t          crtc
3420  ** @param xcb_timestamp_t           timestamp
3421  ** @param xcb_timestamp_t           config_timestamp
3422  ** @param int16_t                   x
3423  ** @param int16_t                   y
3424  ** @param xcb_randr_mode_t          mode
3425  ** @param uint16_t                  rotation
3426  ** @param uint32_t                  outputs_len
3427  ** @param const xcb_randr_output_t *outputs
3428  ** @returns xcb_randr_set_crtc_config_cookie_t
3429  **
3430  *****************************************************************************/
3431 
3432 xcb_randr_set_crtc_config_cookie_t
3433 xcb_randr_set_crtc_config (xcb_connection_t         *c  /**< */,
3434                            xcb_randr_crtc_t          crtc  /**< */,
3435                            xcb_timestamp_t           timestamp  /**< */,
3436                            xcb_timestamp_t           config_timestamp  /**< */,
3437                            int16_t                   x  /**< */,
3438                            int16_t                   y  /**< */,
3439                            xcb_randr_mode_t          mode  /**< */,
3440                            uint16_t                  rotation  /**< */,
3441                            uint32_t                  outputs_len  /**< */,
3442                            const xcb_randr_output_t *outputs  /**< */)
3443 {
3444     static const xcb_protocol_request_t xcb_req = {
3445         /* count */ 4,
3446         /* ext */ &xcb_randr_id,
3447         /* opcode */ XCB_RANDR_SET_CRTC_CONFIG,
3448         /* isvoid */ 0
3449     };
3450 
3451     struct iovec xcb_parts[6];
3452     xcb_randr_set_crtc_config_cookie_t xcb_ret;
3453     xcb_randr_set_crtc_config_request_t xcb_out;
3454 
3455     xcb_out.crtc = crtc;
3456     xcb_out.timestamp = timestamp;
3457     xcb_out.config_timestamp = config_timestamp;
3458     xcb_out.x = x;
3459     xcb_out.y = y;
3460     xcb_out.mode = mode;
3461     xcb_out.rotation = rotation;
3462     memset(xcb_out.pad0, 0, 2);
3463 
3464     xcb_parts[2].iov_base = (char *) &xcb_out;
3465     xcb_parts[2].iov_len = sizeof(xcb_out);
3466     xcb_parts[3].iov_base = 0;
3467     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3468     /* xcb_randr_output_t outputs */
3469     xcb_parts[4].iov_base = (char *) outputs;
3470     xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t);
3471     xcb_parts[5].iov_base = 0;
3472     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3473 
3474     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3475     return xcb_ret;
3476 }
3477 
3478 
3479 /*****************************************************************************
3480  **
3481  ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked
3482  **
3483  ** @param xcb_connection_t         *c
3484  ** @param xcb_randr_crtc_t          crtc
3485  ** @param xcb_timestamp_t           timestamp
3486  ** @param xcb_timestamp_t           config_timestamp
3487  ** @param int16_t                   x
3488  ** @param int16_t                   y
3489  ** @param xcb_randr_mode_t          mode
3490  ** @param uint16_t                  rotation
3491  ** @param uint32_t                  outputs_len
3492  ** @param const xcb_randr_output_t *outputs
3493  ** @returns xcb_randr_set_crtc_config_cookie_t
3494  **
3495  *****************************************************************************/
3496 
3497 xcb_randr_set_crtc_config_cookie_t
3498 xcb_randr_set_crtc_config_unchecked (xcb_connection_t         *c  /**< */,
3499                                      xcb_randr_crtc_t          crtc  /**< */,
3500                                      xcb_timestamp_t           timestamp  /**< */,
3501                                      xcb_timestamp_t           config_timestamp  /**< */,
3502                                      int16_t                   x  /**< */,
3503                                      int16_t                   y  /**< */,
3504                                      xcb_randr_mode_t          mode  /**< */,
3505                                      uint16_t                  rotation  /**< */,
3506                                      uint32_t                  outputs_len  /**< */,
3507                                      const xcb_randr_output_t *outputs  /**< */)
3508 {
3509     static const xcb_protocol_request_t xcb_req = {
3510         /* count */ 4,
3511         /* ext */ &xcb_randr_id,
3512         /* opcode */ XCB_RANDR_SET_CRTC_CONFIG,
3513         /* isvoid */ 0
3514     };
3515 
3516     struct iovec xcb_parts[6];
3517     xcb_randr_set_crtc_config_cookie_t xcb_ret;
3518     xcb_randr_set_crtc_config_request_t xcb_out;
3519 
3520     xcb_out.crtc = crtc;
3521     xcb_out.timestamp = timestamp;
3522     xcb_out.config_timestamp = config_timestamp;
3523     xcb_out.x = x;
3524     xcb_out.y = y;
3525     xcb_out.mode = mode;
3526     xcb_out.rotation = rotation;
3527     memset(xcb_out.pad0, 0, 2);
3528 
3529     xcb_parts[2].iov_base = (char *) &xcb_out;
3530     xcb_parts[2].iov_len = sizeof(xcb_out);
3531     xcb_parts[3].iov_base = 0;
3532     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3533     /* xcb_randr_output_t outputs */
3534     xcb_parts[4].iov_base = (char *) outputs;
3535     xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t);
3536     xcb_parts[5].iov_base = 0;
3537     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3538 
3539     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3540     return xcb_ret;
3541 }
3542 
3543 
3544 /*****************************************************************************
3545  **
3546  ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply
3547  **
3548  ** @param xcb_connection_t                    *c
3549  ** @param xcb_randr_set_crtc_config_cookie_t   cookie
3550  ** @param xcb_generic_error_t                **e
3551  ** @returns xcb_randr_set_crtc_config_reply_t *
3552  **
3553  *****************************************************************************/
3554 
3555 xcb_randr_set_crtc_config_reply_t *
3556 xcb_randr_set_crtc_config_reply (xcb_connection_t                    *c  /**< */,
3557                                  xcb_randr_set_crtc_config_cookie_t   cookie  /**< */,
3558                                  xcb_generic_error_t                **e  /**< */)
3559 {
3560     return (xcb_randr_set_crtc_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3561 }
3562 
3563 
3564 /*****************************************************************************
3565  **
3566  ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size
3567  **
3568  ** @param xcb_connection_t *c
3569  ** @param xcb_randr_crtc_t  crtc
3570  ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
3571  **
3572  *****************************************************************************/
3573 
3574 xcb_randr_get_crtc_gamma_size_cookie_t
3575 xcb_randr_get_crtc_gamma_size (xcb_connection_t *c  /**< */,
3576                                xcb_randr_crtc_t  crtc  /**< */)
3577 {
3578     static const xcb_protocol_request_t xcb_req = {
3579         /* count */ 2,
3580         /* ext */ &xcb_randr_id,
3581         /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE,
3582         /* isvoid */ 0
3583     };
3584 
3585     struct iovec xcb_parts[4];
3586     xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret;
3587     xcb_randr_get_crtc_gamma_size_request_t xcb_out;
3588 
3589     xcb_out.crtc = crtc;
3590 
3591     xcb_parts[2].iov_base = (char *) &xcb_out;
3592     xcb_parts[2].iov_len = sizeof(xcb_out);
3593     xcb_parts[3].iov_base = 0;
3594     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3595 
3596     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3597     return xcb_ret;
3598 }
3599 
3600 
3601 /*****************************************************************************
3602  **
3603  ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked
3604  **
3605  ** @param xcb_connection_t *c
3606  ** @param xcb_randr_crtc_t  crtc
3607  ** @returns xcb_randr_get_crtc_gamma_size_cookie_t
3608  **
3609  *****************************************************************************/
3610 
3611 xcb_randr_get_crtc_gamma_size_cookie_t
3612 xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c  /**< */,
3613                                          xcb_randr_crtc_t  crtc  /**< */)
3614 {
3615     static const xcb_protocol_request_t xcb_req = {
3616         /* count */ 2,
3617         /* ext */ &xcb_randr_id,
3618         /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE,
3619         /* isvoid */ 0
3620     };
3621 
3622     struct iovec xcb_parts[4];
3623     xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret;
3624     xcb_randr_get_crtc_gamma_size_request_t xcb_out;
3625 
3626     xcb_out.crtc = crtc;
3627 
3628     xcb_parts[2].iov_base = (char *) &xcb_out;
3629     xcb_parts[2].iov_len = sizeof(xcb_out);
3630     xcb_parts[3].iov_base = 0;
3631     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3632 
3633     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3634     return xcb_ret;
3635 }
3636 
3637 
3638 /*****************************************************************************
3639  **
3640  ** xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply
3641  **
3642  ** @param xcb_connection_t                        *c
3643  ** @param xcb_randr_get_crtc_gamma_size_cookie_t   cookie
3644  ** @param xcb_generic_error_t                    **e
3645  ** @returns xcb_randr_get_crtc_gamma_size_reply_t *
3646  **
3647  *****************************************************************************/
3648 
3649 xcb_randr_get_crtc_gamma_size_reply_t *
3650 xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t                        *c  /**< */,
3651                                      xcb_randr_get_crtc_gamma_size_cookie_t   cookie  /**< */,
3652                                      xcb_generic_error_t                    **e  /**< */)
3653 {
3654     return (xcb_randr_get_crtc_gamma_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3655 }
3656 
3657 int
3658 xcb_randr_get_crtc_gamma_sizeof (const void  *_buffer  /**< */)
3659 {
3660     char *xcb_tmp = (char *)_buffer;
3661     const xcb_randr_get_crtc_gamma_reply_t *_aux = (xcb_randr_get_crtc_gamma_reply_t *)_buffer;
3662     unsigned int xcb_buffer_len = 0;
3663     unsigned int xcb_block_len = 0;
3664     unsigned int xcb_pad = 0;
3665     unsigned int xcb_align_to;
3666 
3667 
3668     xcb_block_len += sizeof(xcb_randr_get_crtc_gamma_reply_t);
3669     xcb_tmp += xcb_block_len;
3670     /* red */
3671     xcb_block_len += _aux->size * sizeof(uint16_t);
3672     xcb_tmp += xcb_block_len;
3673     xcb_align_to = ALIGNOF(uint16_t);
3674     /* insert padding */
3675     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3676     xcb_buffer_len += xcb_block_len + xcb_pad;
3677     if (0 != xcb_pad) {
3678         xcb_tmp += xcb_pad;
3679         xcb_pad = 0;
3680     }
3681     xcb_block_len = 0;
3682     /* green */
3683     xcb_block_len += _aux->size * sizeof(uint16_t);
3684     xcb_tmp += xcb_block_len;
3685     xcb_align_to = ALIGNOF(uint16_t);
3686     /* insert padding */
3687     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3688     xcb_buffer_len += xcb_block_len + xcb_pad;
3689     if (0 != xcb_pad) {
3690         xcb_tmp += xcb_pad;
3691         xcb_pad = 0;
3692     }
3693     xcb_block_len = 0;
3694     /* blue */
3695     xcb_block_len += _aux->size * sizeof(uint16_t);
3696     xcb_tmp += xcb_block_len;
3697     xcb_align_to = ALIGNOF(uint16_t);
3698     /* insert padding */
3699     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3700     xcb_buffer_len += xcb_block_len + xcb_pad;
3701     if (0 != xcb_pad) {
3702         xcb_tmp += xcb_pad;
3703         xcb_pad = 0;
3704     }
3705     xcb_block_len = 0;
3706 
3707     return xcb_buffer_len;
3708 }
3709 
3710 
3711 /*****************************************************************************
3712  **
3713  ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma
3714  **
3715  ** @param xcb_connection_t *c
3716  ** @param xcb_randr_crtc_t  crtc
3717  ** @returns xcb_randr_get_crtc_gamma_cookie_t
3718  **
3719  *****************************************************************************/
3720 
3721 xcb_randr_get_crtc_gamma_cookie_t
3722 xcb_randr_get_crtc_gamma (xcb_connection_t *c  /**< */,
3723                           xcb_randr_crtc_t  crtc  /**< */)
3724 {
3725     static const xcb_protocol_request_t xcb_req = {
3726         /* count */ 2,
3727         /* ext */ &xcb_randr_id,
3728         /* opcode */ XCB_RANDR_GET_CRTC_GAMMA,
3729         /* isvoid */ 0
3730     };
3731 
3732     struct iovec xcb_parts[4];
3733     xcb_randr_get_crtc_gamma_cookie_t xcb_ret;
3734     xcb_randr_get_crtc_gamma_request_t xcb_out;
3735 
3736     xcb_out.crtc = crtc;
3737 
3738     xcb_parts[2].iov_base = (char *) &xcb_out;
3739     xcb_parts[2].iov_len = sizeof(xcb_out);
3740     xcb_parts[3].iov_base = 0;
3741     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3742 
3743     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3744     return xcb_ret;
3745 }
3746 
3747 
3748 /*****************************************************************************
3749  **
3750  ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked
3751  **
3752  ** @param xcb_connection_t *c
3753  ** @param xcb_randr_crtc_t  crtc
3754  ** @returns xcb_randr_get_crtc_gamma_cookie_t
3755  **
3756  *****************************************************************************/
3757 
3758 xcb_randr_get_crtc_gamma_cookie_t
3759 xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c  /**< */,
3760                                     xcb_randr_crtc_t  crtc  /**< */)
3761 {
3762     static const xcb_protocol_request_t xcb_req = {
3763         /* count */ 2,
3764         /* ext */ &xcb_randr_id,
3765         /* opcode */ XCB_RANDR_GET_CRTC_GAMMA,
3766         /* isvoid */ 0
3767     };
3768 
3769     struct iovec xcb_parts[4];
3770     xcb_randr_get_crtc_gamma_cookie_t xcb_ret;
3771     xcb_randr_get_crtc_gamma_request_t xcb_out;
3772 
3773     xcb_out.crtc = crtc;
3774 
3775     xcb_parts[2].iov_base = (char *) &xcb_out;
3776     xcb_parts[2].iov_len = sizeof(xcb_out);
3777     xcb_parts[3].iov_base = 0;
3778     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3779 
3780     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3781     return xcb_ret;
3782 }
3783 
3784 
3785 /*****************************************************************************
3786  **
3787  ** uint16_t * xcb_randr_get_crtc_gamma_red
3788  **
3789  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3790  ** @returns uint16_t *
3791  **
3792  *****************************************************************************/
3793 
3794 uint16_t *
3795 xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3796 {
3797     return (uint16_t *) (R + 1);
3798 }
3799 
3800 
3801 /*****************************************************************************
3802  **
3803  ** int xcb_randr_get_crtc_gamma_red_length
3804  **
3805  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3806  ** @returns int
3807  **
3808  *****************************************************************************/
3809 
3810 int
3811 xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3812 {
3813     return R->size;
3814 }
3815 
3816 
3817 /*****************************************************************************
3818  **
3819  ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end
3820  **
3821  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3822  ** @returns xcb_generic_iterator_t
3823  **
3824  *****************************************************************************/
3825 
3826 xcb_generic_iterator_t
3827 xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3828 {
3829     xcb_generic_iterator_t i;
3830     i.data = ((uint16_t *) (R + 1)) + (R->size);
3831     i.rem = 0;
3832     i.index = (char *) i.data - (char *) R;
3833     return i;
3834 }
3835 
3836 
3837 /*****************************************************************************
3838  **
3839  ** uint16_t * xcb_randr_get_crtc_gamma_green
3840  **
3841  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3842  ** @returns uint16_t *
3843  **
3844  *****************************************************************************/
3845 
3846 uint16_t *
3847 xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3848 {
3849     xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_red_end(R);
3850     return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0);
3851 }
3852 
3853 
3854 /*****************************************************************************
3855  **
3856  ** int xcb_randr_get_crtc_gamma_green_length
3857  **
3858  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3859  ** @returns int
3860  **
3861  *****************************************************************************/
3862 
3863 int
3864 xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3865 {
3866     return R->size;
3867 }
3868 
3869 
3870 /*****************************************************************************
3871  **
3872  ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end
3873  **
3874  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3875  ** @returns xcb_generic_iterator_t
3876  **
3877  *****************************************************************************/
3878 
3879 xcb_generic_iterator_t
3880 xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3881 {
3882     xcb_generic_iterator_t i;
3883     xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_red_end(R);
3884     i.data = ((uint16_t *) child.data) + (R->size);
3885     i.rem = 0;
3886     i.index = (char *) i.data - (char *) R;
3887     return i;
3888 }
3889 
3890 
3891 /*****************************************************************************
3892  **
3893  ** uint16_t * xcb_randr_get_crtc_gamma_blue
3894  **
3895  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3896  ** @returns uint16_t *
3897  **
3898  *****************************************************************************/
3899 
3900 uint16_t *
3901 xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3902 {
3903     xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_green_end(R);
3904     return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0);
3905 }
3906 
3907 
3908 /*****************************************************************************
3909  **
3910  ** int xcb_randr_get_crtc_gamma_blue_length
3911  **
3912  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3913  ** @returns int
3914  **
3915  *****************************************************************************/
3916 
3917 int
3918 xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3919 {
3920     return R->size;
3921 }
3922 
3923 
3924 /*****************************************************************************
3925  **
3926  ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end
3927  **
3928  ** @param const xcb_randr_get_crtc_gamma_reply_t *R
3929  ** @returns xcb_generic_iterator_t
3930  **
3931  *****************************************************************************/
3932 
3933 xcb_generic_iterator_t
3934 xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R  /**< */)
3935 {
3936     xcb_generic_iterator_t i;
3937     xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_green_end(R);
3938     i.data = ((uint16_t *) child.data) + (R->size);
3939     i.rem = 0;
3940     i.index = (char *) i.data - (char *) R;
3941     return i;
3942 }
3943 
3944 
3945 /*****************************************************************************
3946  **
3947  ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply
3948  **
3949  ** @param xcb_connection_t                   *c
3950  ** @param xcb_randr_get_crtc_gamma_cookie_t   cookie
3951  ** @param xcb_generic_error_t               **e
3952  ** @returns xcb_randr_get_crtc_gamma_reply_t *
3953  **
3954  *****************************************************************************/
3955 
3956 xcb_randr_get_crtc_gamma_reply_t *
3957 xcb_randr_get_crtc_gamma_reply (xcb_connection_t                   *c  /**< */,
3958                                 xcb_randr_get_crtc_gamma_cookie_t   cookie  /**< */,
3959                                 xcb_generic_error_t               **e  /**< */)
3960 {
3961     return (xcb_randr_get_crtc_gamma_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3962 }
3963 
3964 int
3965 xcb_randr_set_crtc_gamma_sizeof (const void  *_buffer  /**< */)
3966 {
3967     char *xcb_tmp = (char *)_buffer;
3968     const xcb_randr_set_crtc_gamma_request_t *_aux = (xcb_randr_set_crtc_gamma_request_t *)_buffer;
3969     unsigned int xcb_buffer_len = 0;
3970     unsigned int xcb_block_len = 0;
3971     unsigned int xcb_pad = 0;
3972     unsigned int xcb_align_to;
3973 
3974 
3975     xcb_block_len += sizeof(xcb_randr_set_crtc_gamma_request_t);
3976     xcb_tmp += xcb_block_len;
3977     /* red */
3978     xcb_block_len += _aux->size * sizeof(uint16_t);
3979     xcb_tmp += xcb_block_len;
3980     xcb_align_to = ALIGNOF(uint16_t);
3981     /* insert padding */
3982     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3983     xcb_buffer_len += xcb_block_len + xcb_pad;
3984     if (0 != xcb_pad) {
3985         xcb_tmp += xcb_pad;
3986         xcb_pad = 0;
3987     }
3988     xcb_block_len = 0;
3989     /* green */
3990     xcb_block_len += _aux->size * sizeof(uint16_t);
3991     xcb_tmp += xcb_block_len;
3992     xcb_align_to = ALIGNOF(uint16_t);
3993     /* insert padding */
3994     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3995     xcb_buffer_len += xcb_block_len + xcb_pad;
3996     if (0 != xcb_pad) {
3997         xcb_tmp += xcb_pad;
3998         xcb_pad = 0;
3999     }
4000     xcb_block_len = 0;
4001     /* blue */
4002     xcb_block_len += _aux->size * sizeof(uint16_t);
4003     xcb_tmp += xcb_block_len;
4004     xcb_align_to = ALIGNOF(uint16_t);
4005     /* insert padding */
4006     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4007     xcb_buffer_len += xcb_block_len + xcb_pad;
4008     if (0 != xcb_pad) {
4009         xcb_tmp += xcb_pad;
4010         xcb_pad = 0;
4011     }
4012     xcb_block_len = 0;
4013 
4014     return xcb_buffer_len;
4015 }
4016 
4017 
4018 /*****************************************************************************
4019  **
4020  ** xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked
4021  **
4022  ** @param xcb_connection_t *c
4023  ** @param xcb_randr_crtc_t  crtc
4024  ** @param uint16_t          size
4025  ** @param const uint16_t   *red
4026  ** @param const uint16_t   *green
4027  ** @param const uint16_t   *blue
4028  ** @returns xcb_void_cookie_t
4029  **
4030  *****************************************************************************/
4031 
4032 xcb_void_cookie_t
4033 xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c  /**< */,
4034                                   xcb_randr_crtc_t  crtc  /**< */,
4035                                   uint16_t          size  /**< */,
4036                                   const uint16_t   *red  /**< */,
4037                                   const uint16_t   *green  /**< */,
4038                                   const uint16_t   *blue  /**< */)
4039 {
4040     static const xcb_protocol_request_t xcb_req = {
4041         /* count */ 8,
4042         /* ext */ &xcb_randr_id,
4043         /* opcode */ XCB_RANDR_SET_CRTC_GAMMA,
4044         /* isvoid */ 1
4045     };
4046 
4047     struct iovec xcb_parts[10];
4048     xcb_void_cookie_t xcb_ret;
4049     xcb_randr_set_crtc_gamma_request_t xcb_out;
4050 
4051     xcb_out.crtc = crtc;
4052     xcb_out.size = size;
4053     memset(xcb_out.pad0, 0, 2);
4054 
4055     xcb_parts[2].iov_base = (char *) &xcb_out;
4056     xcb_parts[2].iov_len = sizeof(xcb_out);
4057     xcb_parts[3].iov_base = 0;
4058     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4059     /* uint16_t red */
4060     xcb_parts[4].iov_base = (char *) red;
4061     xcb_parts[4].iov_len = size * sizeof(uint16_t);
4062     xcb_parts[5].iov_base = 0;
4063     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4064     /* uint16_t green */
4065     xcb_parts[6].iov_base = (char *) green;
4066     xcb_parts[6].iov_len = size * sizeof(uint16_t);
4067     xcb_parts[7].iov_base = 0;
4068     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4069     /* uint16_t blue */
4070     xcb_parts[8].iov_base = (char *) blue;
4071     xcb_parts[8].iov_len = size * sizeof(uint16_t);
4072     xcb_parts[9].iov_base = 0;
4073     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
4074 
4075     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4076     return xcb_ret;
4077 }
4078 
4079 
4080 /*****************************************************************************
4081  **
4082  ** xcb_void_cookie_t xcb_randr_set_crtc_gamma
4083  **
4084  ** @param xcb_connection_t *c
4085  ** @param xcb_randr_crtc_t  crtc
4086  ** @param uint16_t          size
4087  ** @param const uint16_t   *red
4088  ** @param const uint16_t   *green
4089  ** @param const uint16_t   *blue
4090  ** @returns xcb_void_cookie_t
4091  **
4092  *****************************************************************************/
4093 
4094 xcb_void_cookie_t
4095 xcb_randr_set_crtc_gamma (xcb_connection_t *c  /**< */,
4096                           xcb_randr_crtc_t  crtc  /**< */,
4097                           uint16_t          size  /**< */,
4098                           const uint16_t   *red  /**< */,
4099                           const uint16_t   *green  /**< */,
4100                           const uint16_t   *blue  /**< */)
4101 {
4102     static const xcb_protocol_request_t xcb_req = {
4103         /* count */ 8,
4104         /* ext */ &xcb_randr_id,
4105         /* opcode */ XCB_RANDR_SET_CRTC_GAMMA,
4106         /* isvoid */ 1
4107     };
4108 
4109     struct iovec xcb_parts[10];
4110     xcb_void_cookie_t xcb_ret;
4111     xcb_randr_set_crtc_gamma_request_t xcb_out;
4112 
4113     xcb_out.crtc = crtc;
4114     xcb_out.size = size;
4115     memset(xcb_out.pad0, 0, 2);
4116 
4117     xcb_parts[2].iov_base = (char *) &xcb_out;
4118     xcb_parts[2].iov_len = sizeof(xcb_out);
4119     xcb_parts[3].iov_base = 0;
4120     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4121     /* uint16_t red */
4122     xcb_parts[4].iov_base = (char *) red;
4123     xcb_parts[4].iov_len = size * sizeof(uint16_t);
4124     xcb_parts[5].iov_base = 0;
4125     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4126     /* uint16_t green */
4127     xcb_parts[6].iov_base = (char *) green;
4128     xcb_parts[6].iov_len = size * sizeof(uint16_t);
4129     xcb_parts[7].iov_base = 0;
4130     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4131     /* uint16_t blue */
4132     xcb_parts[8].iov_base = (char *) blue;
4133     xcb_parts[8].iov_len = size * sizeof(uint16_t);
4134     xcb_parts[9].iov_base = 0;
4135     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
4136 
4137     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4138     return xcb_ret;
4139 }
4140 
4141 int
4142 xcb_randr_get_screen_resources_current_sizeof (const void  *_buffer  /**< */)
4143 {
4144     char *xcb_tmp = (char *)_buffer;
4145     const xcb_randr_get_screen_resources_current_reply_t *_aux = (xcb_randr_get_screen_resources_current_reply_t *)_buffer;
4146     unsigned int xcb_buffer_len = 0;
4147     unsigned int xcb_block_len = 0;
4148     unsigned int xcb_pad = 0;
4149     unsigned int xcb_align_to;
4150 
4151 
4152     xcb_block_len += sizeof(xcb_randr_get_screen_resources_current_reply_t);
4153     xcb_tmp += xcb_block_len;
4154     /* crtcs */
4155     xcb_block_len += _aux->num_crtcs * sizeof(uint32_t);
4156     xcb_tmp += xcb_block_len;
4157     xcb_align_to = ALIGNOF(xcb_randr_crtc_t);
4158     /* insert padding */
4159     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4160     xcb_buffer_len += xcb_block_len + xcb_pad;
4161     if (0 != xcb_pad) {
4162         xcb_tmp += xcb_pad;
4163         xcb_pad = 0;
4164     }
4165     xcb_block_len = 0;
4166     /* outputs */
4167     xcb_block_len += _aux->num_outputs * sizeof(uint32_t);
4168     xcb_tmp += xcb_block_len;
4169     xcb_align_to = ALIGNOF(xcb_randr_output_t);
4170     /* insert padding */
4171     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4172     xcb_buffer_len += xcb_block_len + xcb_pad;
4173     if (0 != xcb_pad) {
4174         xcb_tmp += xcb_pad;
4175         xcb_pad = 0;
4176     }
4177     xcb_block_len = 0;
4178     /* modes */
4179     xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t);
4180     xcb_tmp += xcb_block_len;
4181     xcb_align_to = ALIGNOF(xcb_randr_mode_info_t);
4182     /* insert padding */
4183     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4184     xcb_buffer_len += xcb_block_len + xcb_pad;
4185     if (0 != xcb_pad) {
4186         xcb_tmp += xcb_pad;
4187         xcb_pad = 0;
4188     }
4189     xcb_block_len = 0;
4190     /* names */
4191     xcb_block_len += _aux->names_len * sizeof(uint8_t);
4192     xcb_tmp += xcb_block_len;
4193     xcb_align_to = ALIGNOF(uint8_t);
4194     /* insert padding */
4195     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4196     xcb_buffer_len += xcb_block_len + xcb_pad;
4197     if (0 != xcb_pad) {
4198         xcb_tmp += xcb_pad;
4199         xcb_pad = 0;
4200     }
4201     xcb_block_len = 0;
4202 
4203     return xcb_buffer_len;
4204 }
4205 
4206 
4207 /*****************************************************************************
4208  **
4209  ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current
4210  **
4211  ** @param xcb_connection_t *c
4212  ** @param xcb_window_t      window
4213  ** @returns xcb_randr_get_screen_resources_current_cookie_t
4214  **
4215  *****************************************************************************/
4216 
4217 xcb_randr_get_screen_resources_current_cookie_t
4218 xcb_randr_get_screen_resources_current (xcb_connection_t *c  /**< */,
4219                                         xcb_window_t      window  /**< */)
4220 {
4221     static const xcb_protocol_request_t xcb_req = {
4222         /* count */ 2,
4223         /* ext */ &xcb_randr_id,
4224         /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT,
4225         /* isvoid */ 0
4226     };
4227 
4228     struct iovec xcb_parts[4];
4229     xcb_randr_get_screen_resources_current_cookie_t xcb_ret;
4230     xcb_randr_get_screen_resources_current_request_t xcb_out;
4231 
4232     xcb_out.window = window;
4233 
4234     xcb_parts[2].iov_base = (char *) &xcb_out;
4235     xcb_parts[2].iov_len = sizeof(xcb_out);
4236     xcb_parts[3].iov_base = 0;
4237     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4238 
4239     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4240     return xcb_ret;
4241 }
4242 
4243 
4244 /*****************************************************************************
4245  **
4246  ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked
4247  **
4248  ** @param xcb_connection_t *c
4249  ** @param xcb_window_t      window
4250  ** @returns xcb_randr_get_screen_resources_current_cookie_t
4251  **
4252  *****************************************************************************/
4253 
4254 xcb_randr_get_screen_resources_current_cookie_t
4255 xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c  /**< */,
4256                                                   xcb_window_t      window  /**< */)
4257 {
4258     static const xcb_protocol_request_t xcb_req = {
4259         /* count */ 2,
4260         /* ext */ &xcb_randr_id,
4261         /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT,
4262         /* isvoid */ 0
4263     };
4264 
4265     struct iovec xcb_parts[4];
4266     xcb_randr_get_screen_resources_current_cookie_t xcb_ret;
4267     xcb_randr_get_screen_resources_current_request_t xcb_out;
4268 
4269     xcb_out.window = window;
4270 
4271     xcb_parts[2].iov_base = (char *) &xcb_out;
4272     xcb_parts[2].iov_len = sizeof(xcb_out);
4273     xcb_parts[3].iov_base = 0;
4274     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4275 
4276     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4277     return xcb_ret;
4278 }
4279 
4280 
4281 /*****************************************************************************
4282  **
4283  ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs
4284  **
4285  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4286  ** @returns xcb_randr_crtc_t *
4287  **
4288  *****************************************************************************/
4289 
4290 xcb_randr_crtc_t *
4291 xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4292 {
4293     return (xcb_randr_crtc_t *) (R + 1);
4294 }
4295 
4296 
4297 /*****************************************************************************
4298  **
4299  ** int xcb_randr_get_screen_resources_current_crtcs_length
4300  **
4301  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4302  ** @returns int
4303  **
4304  *****************************************************************************/
4305 
4306 int
4307 xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4308 {
4309     return R->num_crtcs;
4310 }
4311 
4312 
4313 /*****************************************************************************
4314  **
4315  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end
4316  **
4317  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4318  ** @returns xcb_generic_iterator_t
4319  **
4320  *****************************************************************************/
4321 
4322 xcb_generic_iterator_t
4323 xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4324 {
4325     xcb_generic_iterator_t i;
4326     i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs);
4327     i.rem = 0;
4328     i.index = (char *) i.data - (char *) R;
4329     return i;
4330 }
4331 
4332 
4333 /*****************************************************************************
4334  **
4335  ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs
4336  **
4337  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4338  ** @returns xcb_randr_output_t *
4339  **
4340  *****************************************************************************/
4341 
4342 xcb_randr_output_t *
4343 xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4344 {
4345     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_crtcs_end(R);
4346     return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0);
4347 }
4348 
4349 
4350 /*****************************************************************************
4351  **
4352  ** int xcb_randr_get_screen_resources_current_outputs_length
4353  **
4354  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4355  ** @returns int
4356  **
4357  *****************************************************************************/
4358 
4359 int
4360 xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4361 {
4362     return R->num_outputs;
4363 }
4364 
4365 
4366 /*****************************************************************************
4367  **
4368  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end
4369  **
4370  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4371  ** @returns xcb_generic_iterator_t
4372  **
4373  *****************************************************************************/
4374 
4375 xcb_generic_iterator_t
4376 xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4377 {
4378     xcb_generic_iterator_t i;
4379     xcb_generic_iterator_t child = xcb_randr_get_screen_resources_current_crtcs_end(R);
4380     i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs);
4381     i.rem = 0;
4382     i.index = (char *) i.data - (char *) R;
4383     return i;
4384 }
4385 
4386 
4387 /*****************************************************************************
4388  **
4389  ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes
4390  **
4391  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4392  ** @returns xcb_randr_mode_info_t *
4393  **
4394  *****************************************************************************/
4395 
4396 xcb_randr_mode_info_t *
4397 xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4398 {
4399     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R);
4400     return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0);
4401 }
4402 
4403 
4404 /*****************************************************************************
4405  **
4406  ** int xcb_randr_get_screen_resources_current_modes_length
4407  **
4408  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4409  ** @returns int
4410  **
4411  *****************************************************************************/
4412 
4413 int
4414 xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4415 {
4416     return R->num_modes;
4417 }
4418 
4419 
4420 /*****************************************************************************
4421  **
4422  ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator
4423  **
4424  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4425  ** @returns xcb_randr_mode_info_iterator_t
4426  **
4427  *****************************************************************************/
4428 
4429 xcb_randr_mode_info_iterator_t
4430 xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4431 {
4432     xcb_randr_mode_info_iterator_t i;
4433     xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R);
4434     i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index));
4435     i.rem = R->num_modes;
4436     i.index = (char *) i.data - (char *) R;
4437     return i;
4438 }
4439 
4440 
4441 /*****************************************************************************
4442  **
4443  ** uint8_t * xcb_randr_get_screen_resources_current_names
4444  **
4445  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4446  ** @returns uint8_t *
4447  **
4448  *****************************************************************************/
4449 
4450 uint8_t *
4451 xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4452 {
4453     xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R));
4454     return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0);
4455 }
4456 
4457 
4458 /*****************************************************************************
4459  **
4460  ** int xcb_randr_get_screen_resources_current_names_length
4461  **
4462  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4463  ** @returns int
4464  **
4465  *****************************************************************************/
4466 
4467 int
4468 xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4469 {
4470     return R->names_len;
4471 }
4472 
4473 
4474 /*****************************************************************************
4475  **
4476  ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end
4477  **
4478  ** @param const xcb_randr_get_screen_resources_current_reply_t *R
4479  ** @returns xcb_generic_iterator_t
4480  **
4481  *****************************************************************************/
4482 
4483 xcb_generic_iterator_t
4484 xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R  /**< */)
4485 {
4486     xcb_generic_iterator_t i;
4487     xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R));
4488     i.data = ((uint8_t *) child.data) + (R->names_len);
4489     i.rem = 0;
4490     i.index = (char *) i.data - (char *) R;
4491     return i;
4492 }
4493 
4494 
4495 /*****************************************************************************
4496  **
4497  ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply
4498  **
4499  ** @param xcb_connection_t                                 *c
4500  ** @param xcb_randr_get_screen_resources_current_cookie_t   cookie
4501  ** @param xcb_generic_error_t                             **e
4502  ** @returns xcb_randr_get_screen_resources_current_reply_t *
4503  **
4504  *****************************************************************************/
4505 
4506 xcb_randr_get_screen_resources_current_reply_t *
4507 xcb_randr_get_screen_resources_current_reply (xcb_connection_t                                 *c  /**< */,
4508                                               xcb_randr_get_screen_resources_current_cookie_t   cookie  /**< */,
4509                                               xcb_generic_error_t                             **e  /**< */)
4510 {
4511     return (xcb_randr_get_screen_resources_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4512 }
4513 
4514 int
4515 xcb_randr_set_crtc_transform_sizeof (const void  *_buffer  /**< */,
4516                                      uint32_t     filter_params_len  /**< */)
4517 {
4518     char *xcb_tmp = (char *)_buffer;
4519     const xcb_randr_set_crtc_transform_request_t *_aux = (xcb_randr_set_crtc_transform_request_t *)_buffer;
4520     unsigned int xcb_buffer_len = 0;
4521     unsigned int xcb_block_len = 0;
4522     unsigned int xcb_pad = 0;
4523     unsigned int xcb_align_to;
4524 
4525 
4526     xcb_block_len += sizeof(xcb_randr_set_crtc_transform_request_t);
4527     xcb_tmp += xcb_block_len;
4528     /* filter_name */
4529     xcb_block_len += _aux->filter_len * sizeof(char);
4530     xcb_tmp += xcb_block_len;
4531     xcb_align_to = ALIGNOF(char);
4532     /* insert padding */
4533     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4534     xcb_buffer_len += xcb_block_len + xcb_pad;
4535     if (0 != xcb_pad) {
4536         xcb_tmp += xcb_pad;
4537         xcb_pad = 0;
4538     }
4539     xcb_block_len = 0;
4540     /* filter_params */
4541     xcb_block_len += filter_params_len * sizeof(xcb_render_fixed_t);
4542     xcb_tmp += xcb_block_len;
4543     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
4544     /* insert padding */
4545     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4546     xcb_buffer_len += xcb_block_len + xcb_pad;
4547     if (0 != xcb_pad) {
4548         xcb_tmp += xcb_pad;
4549         xcb_pad = 0;
4550     }
4551     xcb_block_len = 0;
4552 
4553     return xcb_buffer_len;
4554 }
4555 
4556 
4557 /*****************************************************************************
4558  **
4559  ** xcb_void_cookie_t xcb_randr_set_crtc_transform_checked
4560  **
4561  ** @param xcb_connection_t         *c
4562  ** @param xcb_randr_crtc_t          crtc
4563  ** @param xcb_render_transform_t    transform
4564  ** @param uint16_t                  filter_len
4565  ** @param const char               *filter_name
4566  ** @param uint32_t                  filter_params_len
4567  ** @param const xcb_render_fixed_t *filter_params
4568  ** @returns xcb_void_cookie_t
4569  **
4570  *****************************************************************************/
4571 
4572 xcb_void_cookie_t
4573 xcb_randr_set_crtc_transform_checked (xcb_connection_t         *c  /**< */,
4574                                       xcb_randr_crtc_t          crtc  /**< */,
4575                                       xcb_render_transform_t    transform  /**< */,
4576                                       uint16_t                  filter_len  /**< */,
4577                                       const char               *filter_name  /**< */,
4578                                       uint32_t                  filter_params_len  /**< */,
4579                                       const xcb_render_fixed_t *filter_params  /**< */)
4580 {
4581     static const xcb_protocol_request_t xcb_req = {
4582         /* count */ 6,
4583         /* ext */ &xcb_randr_id,
4584         /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM,
4585         /* isvoid */ 1
4586     };
4587 
4588     struct iovec xcb_parts[8];
4589     xcb_void_cookie_t xcb_ret;
4590     xcb_randr_set_crtc_transform_request_t xcb_out;
4591 
4592     xcb_out.crtc = crtc;
4593     xcb_out.transform = transform;
4594     xcb_out.filter_len = filter_len;
4595     memset(xcb_out.pad0, 0, 2);
4596 
4597     xcb_parts[2].iov_base = (char *) &xcb_out;
4598     xcb_parts[2].iov_len = sizeof(xcb_out);
4599     xcb_parts[3].iov_base = 0;
4600     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4601     /* char filter_name */
4602     xcb_parts[4].iov_base = (char *) filter_name;
4603     xcb_parts[4].iov_len = filter_len * sizeof(char);
4604     xcb_parts[5].iov_base = 0;
4605     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4606     /* xcb_render_fixed_t filter_params */
4607     xcb_parts[6].iov_base = (char *) filter_params;
4608     xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t);
4609     xcb_parts[7].iov_base = 0;
4610     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4611 
4612     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4613     return xcb_ret;
4614 }
4615 
4616 
4617 /*****************************************************************************
4618  **
4619  ** xcb_void_cookie_t xcb_randr_set_crtc_transform
4620  **
4621  ** @param xcb_connection_t         *c
4622  ** @param xcb_randr_crtc_t          crtc
4623  ** @param xcb_render_transform_t    transform
4624  ** @param uint16_t                  filter_len
4625  ** @param const char               *filter_name
4626  ** @param uint32_t                  filter_params_len
4627  ** @param const xcb_render_fixed_t *filter_params
4628  ** @returns xcb_void_cookie_t
4629  **
4630  *****************************************************************************/
4631 
4632 xcb_void_cookie_t
4633 xcb_randr_set_crtc_transform (xcb_connection_t         *c  /**< */,
4634                               xcb_randr_crtc_t          crtc  /**< */,
4635                               xcb_render_transform_t    transform  /**< */,
4636                               uint16_t                  filter_len  /**< */,
4637                               const char               *filter_name  /**< */,
4638                               uint32_t                  filter_params_len  /**< */,
4639                               const xcb_render_fixed_t *filter_params  /**< */)
4640 {
4641     static const xcb_protocol_request_t xcb_req = {
4642         /* count */ 6,
4643         /* ext */ &xcb_randr_id,
4644         /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM,
4645         /* isvoid */ 1
4646     };
4647 
4648     struct iovec xcb_parts[8];
4649     xcb_void_cookie_t xcb_ret;
4650     xcb_randr_set_crtc_transform_request_t xcb_out;
4651 
4652     xcb_out.crtc = crtc;
4653     xcb_out.transform = transform;
4654     xcb_out.filter_len = filter_len;
4655     memset(xcb_out.pad0, 0, 2);
4656 
4657     xcb_parts[2].iov_base = (char *) &xcb_out;
4658     xcb_parts[2].iov_len = sizeof(xcb_out);
4659     xcb_parts[3].iov_base = 0;
4660     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4661     /* char filter_name */
4662     xcb_parts[4].iov_base = (char *) filter_name;
4663     xcb_parts[4].iov_len = filter_len * sizeof(char);
4664     xcb_parts[5].iov_base = 0;
4665     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
4666     /* xcb_render_fixed_t filter_params */
4667     xcb_parts[6].iov_base = (char *) filter_params;
4668     xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t);
4669     xcb_parts[7].iov_base = 0;
4670     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
4671 
4672     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4673     return xcb_ret;
4674 }
4675 
4676 int
4677 xcb_randr_get_crtc_transform_sizeof (const void  *_buffer  /**< */)
4678 {
4679     char *xcb_tmp = (char *)_buffer;
4680     const xcb_randr_get_crtc_transform_reply_t *_aux = (xcb_randr_get_crtc_transform_reply_t *)_buffer;
4681     unsigned int xcb_buffer_len = 0;
4682     unsigned int xcb_block_len = 0;
4683     unsigned int xcb_pad = 0;
4684     unsigned int xcb_align_to;
4685 
4686 
4687     xcb_block_len += sizeof(xcb_randr_get_crtc_transform_reply_t);
4688     xcb_tmp += xcb_block_len;
4689     /* pending_filter_name */
4690     xcb_block_len += _aux->pending_len * sizeof(char);
4691     xcb_tmp += xcb_block_len;
4692     xcb_align_to = ALIGNOF(char);
4693     /* insert padding */
4694     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4695     xcb_buffer_len += xcb_block_len + xcb_pad;
4696     if (0 != xcb_pad) {
4697         xcb_tmp += xcb_pad;
4698         xcb_pad = 0;
4699     }
4700     xcb_block_len = 0;
4701     /* pending_params */
4702     xcb_block_len += _aux->pending_nparams * sizeof(xcb_render_fixed_t);
4703     xcb_tmp += xcb_block_len;
4704     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
4705     /* insert padding */
4706     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4707     xcb_buffer_len += xcb_block_len + xcb_pad;
4708     if (0 != xcb_pad) {
4709         xcb_tmp += xcb_pad;
4710         xcb_pad = 0;
4711     }
4712     xcb_block_len = 0;
4713     /* current_filter_name */
4714     xcb_block_len += _aux->current_len * sizeof(char);
4715     xcb_tmp += xcb_block_len;
4716     xcb_align_to = ALIGNOF(char);
4717     /* insert padding */
4718     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4719     xcb_buffer_len += xcb_block_len + xcb_pad;
4720     if (0 != xcb_pad) {
4721         xcb_tmp += xcb_pad;
4722         xcb_pad = 0;
4723     }
4724     xcb_block_len = 0;
4725     /* current_params */
4726     xcb_block_len += _aux->current_nparams * sizeof(xcb_render_fixed_t);
4727     xcb_tmp += xcb_block_len;
4728     xcb_align_to = ALIGNOF(xcb_render_fixed_t);
4729     /* insert padding */
4730     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4731     xcb_buffer_len += xcb_block_len + xcb_pad;
4732     if (0 != xcb_pad) {
4733         xcb_tmp += xcb_pad;
4734         xcb_pad = 0;
4735     }
4736     xcb_block_len = 0;
4737 
4738     return xcb_buffer_len;
4739 }
4740 
4741 
4742 /*****************************************************************************
4743  **
4744  ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform
4745  **
4746  ** @param xcb_connection_t *c
4747  ** @param xcb_randr_crtc_t  crtc
4748  ** @returns xcb_randr_get_crtc_transform_cookie_t
4749  **
4750  *****************************************************************************/
4751 
4752 xcb_randr_get_crtc_transform_cookie_t
4753 xcb_randr_get_crtc_transform (xcb_connection_t *c  /**< */,
4754                               xcb_randr_crtc_t  crtc  /**< */)
4755 {
4756     static const xcb_protocol_request_t xcb_req = {
4757         /* count */ 2,
4758         /* ext */ &xcb_randr_id,
4759         /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM,
4760         /* isvoid */ 0
4761     };
4762 
4763     struct iovec xcb_parts[4];
4764     xcb_randr_get_crtc_transform_cookie_t xcb_ret;
4765     xcb_randr_get_crtc_transform_request_t xcb_out;
4766 
4767     xcb_out.crtc = crtc;
4768 
4769     xcb_parts[2].iov_base = (char *) &xcb_out;
4770     xcb_parts[2].iov_len = sizeof(xcb_out);
4771     xcb_parts[3].iov_base = 0;
4772     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4773 
4774     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4775     return xcb_ret;
4776 }
4777 
4778 
4779 /*****************************************************************************
4780  **
4781  ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked
4782  **
4783  ** @param xcb_connection_t *c
4784  ** @param xcb_randr_crtc_t  crtc
4785  ** @returns xcb_randr_get_crtc_transform_cookie_t
4786  **
4787  *****************************************************************************/
4788 
4789 xcb_randr_get_crtc_transform_cookie_t
4790 xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c  /**< */,
4791                                         xcb_randr_crtc_t  crtc  /**< */)
4792 {
4793     static const xcb_protocol_request_t xcb_req = {
4794         /* count */ 2,
4795         /* ext */ &xcb_randr_id,
4796         /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM,
4797         /* isvoid */ 0
4798     };
4799 
4800     struct iovec xcb_parts[4];
4801     xcb_randr_get_crtc_transform_cookie_t xcb_ret;
4802     xcb_randr_get_crtc_transform_request_t xcb_out;
4803 
4804     xcb_out.crtc = crtc;
4805 
4806     xcb_parts[2].iov_base = (char *) &xcb_out;
4807     xcb_parts[2].iov_len = sizeof(xcb_out);
4808     xcb_parts[3].iov_base = 0;
4809     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4810 
4811     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4812     return xcb_ret;
4813 }
4814 
4815 
4816 /*****************************************************************************
4817  **
4818  ** char * xcb_randr_get_crtc_transform_pending_filter_name
4819  **
4820  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4821  ** @returns char *
4822  **
4823  *****************************************************************************/
4824 
4825 char *
4826 xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4827 {
4828     return (char *) (R + 1);
4829 }
4830 
4831 
4832 /*****************************************************************************
4833  **
4834  ** int xcb_randr_get_crtc_transform_pending_filter_name_length
4835  **
4836  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4837  ** @returns int
4838  **
4839  *****************************************************************************/
4840 
4841 int
4842 xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4843 {
4844     return R->pending_len;
4845 }
4846 
4847 
4848 /*****************************************************************************
4849  **
4850  ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end
4851  **
4852  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4853  ** @returns xcb_generic_iterator_t
4854  **
4855  *****************************************************************************/
4856 
4857 xcb_generic_iterator_t
4858 xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4859 {
4860     xcb_generic_iterator_t i;
4861     i.data = ((char *) (R + 1)) + (R->pending_len);
4862     i.rem = 0;
4863     i.index = (char *) i.data - (char *) R;
4864     return i;
4865 }
4866 
4867 
4868 /*****************************************************************************
4869  **
4870  ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params
4871  **
4872  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4873  ** @returns xcb_render_fixed_t *
4874  **
4875  *****************************************************************************/
4876 
4877 xcb_render_fixed_t *
4878 xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4879 {
4880     xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_filter_name_end(R);
4881     return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0);
4882 }
4883 
4884 
4885 /*****************************************************************************
4886  **
4887  ** int xcb_randr_get_crtc_transform_pending_params_length
4888  **
4889  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4890  ** @returns int
4891  **
4892  *****************************************************************************/
4893 
4894 int
4895 xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4896 {
4897     return R->pending_nparams;
4898 }
4899 
4900 
4901 /*****************************************************************************
4902  **
4903  ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end
4904  **
4905  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4906  ** @returns xcb_generic_iterator_t
4907  **
4908  *****************************************************************************/
4909 
4910 xcb_generic_iterator_t
4911 xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4912 {
4913     xcb_generic_iterator_t i;
4914     xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_filter_name_end(R);
4915     i.data = ((xcb_render_fixed_t *) child.data) + (R->pending_nparams);
4916     i.rem = 0;
4917     i.index = (char *) i.data - (char *) R;
4918     return i;
4919 }
4920 
4921 
4922 /*****************************************************************************
4923  **
4924  ** char * xcb_randr_get_crtc_transform_current_filter_name
4925  **
4926  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4927  ** @returns char *
4928  **
4929  *****************************************************************************/
4930 
4931 char *
4932 xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4933 {
4934     xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_params_end(R);
4935     return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0);
4936 }
4937 
4938 
4939 /*****************************************************************************
4940  **
4941  ** int xcb_randr_get_crtc_transform_current_filter_name_length
4942  **
4943  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4944  ** @returns int
4945  **
4946  *****************************************************************************/
4947 
4948 int
4949 xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4950 {
4951     return R->current_len;
4952 }
4953 
4954 
4955 /*****************************************************************************
4956  **
4957  ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end
4958  **
4959  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4960  ** @returns xcb_generic_iterator_t
4961  **
4962  *****************************************************************************/
4963 
4964 xcb_generic_iterator_t
4965 xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4966 {
4967     xcb_generic_iterator_t i;
4968     xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_params_end(R);
4969     i.data = ((char *) child.data) + (R->current_len);
4970     i.rem = 0;
4971     i.index = (char *) i.data - (char *) R;
4972     return i;
4973 }
4974 
4975 
4976 /*****************************************************************************
4977  **
4978  ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params
4979  **
4980  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4981  ** @returns xcb_render_fixed_t *
4982  **
4983  *****************************************************************************/
4984 
4985 xcb_render_fixed_t *
4986 xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
4987 {
4988     xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_current_filter_name_end(R);
4989     return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0);
4990 }
4991 
4992 
4993 /*****************************************************************************
4994  **
4995  ** int xcb_randr_get_crtc_transform_current_params_length
4996  **
4997  ** @param const xcb_randr_get_crtc_transform_reply_t *R
4998  ** @returns int
4999  **
5000  *****************************************************************************/
5001 
5002 int
5003 xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
5004 {
5005     return R->current_nparams;
5006 }
5007 
5008 
5009 /*****************************************************************************
5010  **
5011  ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end
5012  **
5013  ** @param const xcb_randr_get_crtc_transform_reply_t *R
5014  ** @returns xcb_generic_iterator_t
5015  **
5016  *****************************************************************************/
5017 
5018 xcb_generic_iterator_t
5019 xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R  /**< */)
5020 {
5021     xcb_generic_iterator_t i;
5022     xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_current_filter_name_end(R);
5023     i.data = ((xcb_render_fixed_t *) child.data) + (R->current_nparams);
5024     i.rem = 0;
5025     i.index = (char *) i.data - (char *) R;
5026     return i;
5027 }
5028 
5029 
5030 /*****************************************************************************
5031  **
5032  ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply
5033  **
5034  ** @param xcb_connection_t                       *c
5035  ** @param xcb_randr_get_crtc_transform_cookie_t   cookie
5036  ** @param xcb_generic_error_t                   **e
5037  ** @returns xcb_randr_get_crtc_transform_reply_t *
5038  **
5039  *****************************************************************************/
5040 
5041 xcb_randr_get_crtc_transform_reply_t *
5042 xcb_randr_get_crtc_transform_reply (xcb_connection_t                       *c  /**< */,
5043                                     xcb_randr_get_crtc_transform_cookie_t   cookie  /**< */,
5044                                     xcb_generic_error_t                   **e  /**< */)
5045 {
5046     return (xcb_randr_get_crtc_transform_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5047 }
5048 
5049 
5050 /*****************************************************************************
5051  **
5052  ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning
5053  **
5054  ** @param xcb_connection_t *c
5055  ** @param xcb_randr_crtc_t  crtc
5056  ** @returns xcb_randr_get_panning_cookie_t
5057  **
5058  *****************************************************************************/
5059 
5060 xcb_randr_get_panning_cookie_t
5061 xcb_randr_get_panning (xcb_connection_t *c  /**< */,
5062                        xcb_randr_crtc_t  crtc  /**< */)
5063 {
5064     static const xcb_protocol_request_t xcb_req = {
5065         /* count */ 2,
5066         /* ext */ &xcb_randr_id,
5067         /* opcode */ XCB_RANDR_GET_PANNING,
5068         /* isvoid */ 0
5069     };
5070 
5071     struct iovec xcb_parts[4];
5072     xcb_randr_get_panning_cookie_t xcb_ret;
5073     xcb_randr_get_panning_request_t xcb_out;
5074 
5075     xcb_out.crtc = crtc;
5076 
5077     xcb_parts[2].iov_base = (char *) &xcb_out;
5078     xcb_parts[2].iov_len = sizeof(xcb_out);
5079     xcb_parts[3].iov_base = 0;
5080     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5081 
5082     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5083     return xcb_ret;
5084 }
5085 
5086 
5087 /*****************************************************************************
5088  **
5089  ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked
5090  **
5091  ** @param xcb_connection_t *c
5092  ** @param xcb_randr_crtc_t  crtc
5093  ** @returns xcb_randr_get_panning_cookie_t
5094  **
5095  *****************************************************************************/
5096 
5097 xcb_randr_get_panning_cookie_t
5098 xcb_randr_get_panning_unchecked (xcb_connection_t *c  /**< */,
5099                                  xcb_randr_crtc_t  crtc  /**< */)
5100 {
5101     static const xcb_protocol_request_t xcb_req = {
5102         /* count */ 2,
5103         /* ext */ &xcb_randr_id,
5104         /* opcode */ XCB_RANDR_GET_PANNING,
5105         /* isvoid */ 0
5106     };
5107 
5108     struct iovec xcb_parts[4];
5109     xcb_randr_get_panning_cookie_t xcb_ret;
5110     xcb_randr_get_panning_request_t xcb_out;
5111 
5112     xcb_out.crtc = crtc;
5113 
5114     xcb_parts[2].iov_base = (char *) &xcb_out;
5115     xcb_parts[2].iov_len = sizeof(xcb_out);
5116     xcb_parts[3].iov_base = 0;
5117     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5118 
5119     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5120     return xcb_ret;
5121 }
5122 
5123 
5124 /*****************************************************************************
5125  **
5126  ** xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply
5127  **
5128  ** @param xcb_connection_t                *c
5129  ** @param xcb_randr_get_panning_cookie_t   cookie
5130  ** @param xcb_generic_error_t            **e
5131  ** @returns xcb_randr_get_panning_reply_t *
5132  **
5133  *****************************************************************************/
5134 
5135 xcb_randr_get_panning_reply_t *
5136 xcb_randr_get_panning_reply (xcb_connection_t                *c  /**< */,
5137                              xcb_randr_get_panning_cookie_t   cookie  /**< */,
5138                              xcb_generic_error_t            **e  /**< */)
5139 {
5140     return (xcb_randr_get_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5141 }
5142 
5143 
5144 /*****************************************************************************
5145  **
5146  ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning
5147  **
5148  ** @param xcb_connection_t *c
5149  ** @param xcb_randr_crtc_t  crtc
5150  ** @param xcb_timestamp_t   timestamp
5151  ** @param uint16_t          left
5152  ** @param uint16_t          top
5153  ** @param uint16_t          width
5154  ** @param uint16_t          height
5155  ** @param uint16_t          track_left
5156  ** @param uint16_t          track_top
5157  ** @param uint16_t          track_width
5158  ** @param uint16_t          track_height
5159  ** @param int16_t           border_left
5160  ** @param int16_t           border_top
5161  ** @param int16_t           border_right
5162  ** @param int16_t           border_bottom
5163  ** @returns xcb_randr_set_panning_cookie_t
5164  **
5165  *****************************************************************************/
5166 
5167 xcb_randr_set_panning_cookie_t
5168 xcb_randr_set_panning (xcb_connection_t *c  /**< */,
5169                        xcb_randr_crtc_t  crtc  /**< */,
5170                        xcb_timestamp_t   timestamp  /**< */,
5171                        uint16_t          left  /**< */,
5172                        uint16_t          top  /**< */,
5173                        uint16_t          width  /**< */,
5174                        uint16_t          height  /**< */,
5175                        uint16_t          track_left  /**< */,
5176                        uint16_t          track_top  /**< */,
5177                        uint16_t          track_width  /**< */,
5178                        uint16_t          track_height  /**< */,
5179                        int16_t           border_left  /**< */,
5180                        int16_t           border_top  /**< */,
5181                        int16_t           border_right  /**< */,
5182                        int16_t           border_bottom  /**< */)
5183 {
5184     static const xcb_protocol_request_t xcb_req = {
5185         /* count */ 2,
5186         /* ext */ &xcb_randr_id,
5187         /* opcode */ XCB_RANDR_SET_PANNING,
5188         /* isvoid */ 0
5189     };
5190 
5191     struct iovec xcb_parts[4];
5192     xcb_randr_set_panning_cookie_t xcb_ret;
5193     xcb_randr_set_panning_request_t xcb_out;
5194 
5195     xcb_out.crtc = crtc;
5196     xcb_out.timestamp = timestamp;
5197     xcb_out.left = left;
5198     xcb_out.top = top;
5199     xcb_out.width = width;
5200     xcb_out.height = height;
5201     xcb_out.track_left = track_left;
5202     xcb_out.track_top = track_top;
5203     xcb_out.track_width = track_width;
5204     xcb_out.track_height = track_height;
5205     xcb_out.border_left = border_left;
5206     xcb_out.border_top = border_top;
5207     xcb_out.border_right = border_right;
5208     xcb_out.border_bottom = border_bottom;
5209 
5210     xcb_parts[2].iov_base = (char *) &xcb_out;
5211     xcb_parts[2].iov_len = sizeof(xcb_out);
5212     xcb_parts[3].iov_base = 0;
5213     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5214 
5215     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5216     return xcb_ret;
5217 }
5218 
5219 
5220 /*****************************************************************************
5221  **
5222  ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked
5223  **
5224  ** @param xcb_connection_t *c
5225  ** @param xcb_randr_crtc_t  crtc
5226  ** @param xcb_timestamp_t   timestamp
5227  ** @param uint16_t          left
5228  ** @param uint16_t          top
5229  ** @param uint16_t          width
5230  ** @param uint16_t          height
5231  ** @param uint16_t          track_left
5232  ** @param uint16_t          track_top
5233  ** @param uint16_t          track_width
5234  ** @param uint16_t          track_height
5235  ** @param int16_t           border_left
5236  ** @param int16_t           border_top
5237  ** @param int16_t           border_right
5238  ** @param int16_t           border_bottom
5239  ** @returns xcb_randr_set_panning_cookie_t
5240  **
5241  *****************************************************************************/
5242 
5243 xcb_randr_set_panning_cookie_t
5244 xcb_randr_set_panning_unchecked (xcb_connection_t *c  /**< */,
5245                                  xcb_randr_crtc_t  crtc  /**< */,
5246                                  xcb_timestamp_t   timestamp  /**< */,
5247                                  uint16_t          left  /**< */,
5248                                  uint16_t          top  /**< */,
5249                                  uint16_t          width  /**< */,
5250                                  uint16_t          height  /**< */,
5251                                  uint16_t          track_left  /**< */,
5252                                  uint16_t          track_top  /**< */,
5253                                  uint16_t          track_width  /**< */,
5254                                  uint16_t          track_height  /**< */,
5255                                  int16_t           border_left  /**< */,
5256                                  int16_t           border_top  /**< */,
5257                                  int16_t           border_right  /**< */,
5258                                  int16_t           border_bottom  /**< */)
5259 {
5260     static const xcb_protocol_request_t xcb_req = {
5261         /* count */ 2,
5262         /* ext */ &xcb_randr_id,
5263         /* opcode */ XCB_RANDR_SET_PANNING,
5264         /* isvoid */ 0
5265     };
5266 
5267     struct iovec xcb_parts[4];
5268     xcb_randr_set_panning_cookie_t xcb_ret;
5269     xcb_randr_set_panning_request_t xcb_out;
5270 
5271     xcb_out.crtc = crtc;
5272     xcb_out.timestamp = timestamp;
5273     xcb_out.left = left;
5274     xcb_out.top = top;
5275     xcb_out.width = width;
5276     xcb_out.height = height;
5277     xcb_out.track_left = track_left;
5278     xcb_out.track_top = track_top;
5279     xcb_out.track_width = track_width;
5280     xcb_out.track_height = track_height;
5281     xcb_out.border_left = border_left;
5282     xcb_out.border_top = border_top;
5283     xcb_out.border_right = border_right;
5284     xcb_out.border_bottom = border_bottom;
5285 
5286     xcb_parts[2].iov_base = (char *) &xcb_out;
5287     xcb_parts[2].iov_len = sizeof(xcb_out);
5288     xcb_parts[3].iov_base = 0;
5289     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5290 
5291     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5292     return xcb_ret;
5293 }
5294 
5295 
5296 /*****************************************************************************
5297  **
5298  ** xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply
5299  **
5300  ** @param xcb_connection_t                *c
5301  ** @param xcb_randr_set_panning_cookie_t   cookie
5302  ** @param xcb_generic_error_t            **e
5303  ** @returns xcb_randr_set_panning_reply_t *
5304  **
5305  *****************************************************************************/
5306 
5307 xcb_randr_set_panning_reply_t *
5308 xcb_randr_set_panning_reply (xcb_connection_t                *c  /**< */,
5309                              xcb_randr_set_panning_cookie_t   cookie  /**< */,
5310                              xcb_generic_error_t            **e  /**< */)
5311 {
5312     return (xcb_randr_set_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5313 }
5314 
5315 
5316 /*****************************************************************************
5317  **
5318  ** xcb_void_cookie_t xcb_randr_set_output_primary_checked
5319  **
5320  ** @param xcb_connection_t   *c
5321  ** @param xcb_window_t        window
5322  ** @param xcb_randr_output_t  output
5323  ** @returns xcb_void_cookie_t
5324  **
5325  *****************************************************************************/
5326 
5327 xcb_void_cookie_t
5328 xcb_randr_set_output_primary_checked (xcb_connection_t   *c  /**< */,
5329                                       xcb_window_t        window  /**< */,
5330                                       xcb_randr_output_t  output  /**< */)
5331 {
5332     static const xcb_protocol_request_t xcb_req = {
5333         /* count */ 2,
5334         /* ext */ &xcb_randr_id,
5335         /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY,
5336         /* isvoid */ 1
5337     };
5338 
5339     struct iovec xcb_parts[4];
5340     xcb_void_cookie_t xcb_ret;
5341     xcb_randr_set_output_primary_request_t xcb_out;
5342 
5343     xcb_out.window = window;
5344     xcb_out.output = output;
5345 
5346     xcb_parts[2].iov_base = (char *) &xcb_out;
5347     xcb_parts[2].iov_len = sizeof(xcb_out);
5348     xcb_parts[3].iov_base = 0;
5349     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5350 
5351     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5352     return xcb_ret;
5353 }
5354 
5355 
5356 /*****************************************************************************
5357  **
5358  ** xcb_void_cookie_t xcb_randr_set_output_primary
5359  **
5360  ** @param xcb_connection_t   *c
5361  ** @param xcb_window_t        window
5362  ** @param xcb_randr_output_t  output
5363  ** @returns xcb_void_cookie_t
5364  **
5365  *****************************************************************************/
5366 
5367 xcb_void_cookie_t
5368 xcb_randr_set_output_primary (xcb_connection_t   *c  /**< */,
5369                               xcb_window_t        window  /**< */,
5370                               xcb_randr_output_t  output  /**< */)
5371 {
5372     static const xcb_protocol_request_t xcb_req = {
5373         /* count */ 2,
5374         /* ext */ &xcb_randr_id,
5375         /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY,
5376         /* isvoid */ 1
5377     };
5378 
5379     struct iovec xcb_parts[4];
5380     xcb_void_cookie_t xcb_ret;
5381     xcb_randr_set_output_primary_request_t xcb_out;
5382 
5383     xcb_out.window = window;
5384     xcb_out.output = output;
5385 
5386     xcb_parts[2].iov_base = (char *) &xcb_out;
5387     xcb_parts[2].iov_len = sizeof(xcb_out);
5388     xcb_parts[3].iov_base = 0;
5389     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5390 
5391     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5392     return xcb_ret;
5393 }
5394 
5395 
5396 /*****************************************************************************
5397  **
5398  ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary
5399  **
5400  ** @param xcb_connection_t *c
5401  ** @param xcb_window_t      window
5402  ** @returns xcb_randr_get_output_primary_cookie_t
5403  **
5404  *****************************************************************************/
5405 
5406 xcb_randr_get_output_primary_cookie_t
5407 xcb_randr_get_output_primary (xcb_connection_t *c  /**< */,
5408                               xcb_window_t      window  /**< */)
5409 {
5410     static const xcb_protocol_request_t xcb_req = {
5411         /* count */ 2,
5412         /* ext */ &xcb_randr_id,
5413         /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY,
5414         /* isvoid */ 0
5415     };
5416 
5417     struct iovec xcb_parts[4];
5418     xcb_randr_get_output_primary_cookie_t xcb_ret;
5419     xcb_randr_get_output_primary_request_t xcb_out;
5420 
5421     xcb_out.window = window;
5422 
5423     xcb_parts[2].iov_base = (char *) &xcb_out;
5424     xcb_parts[2].iov_len = sizeof(xcb_out);
5425     xcb_parts[3].iov_base = 0;
5426     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5427 
5428     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5429     return xcb_ret;
5430 }
5431 
5432 
5433 /*****************************************************************************
5434  **
5435  ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked
5436  **
5437  ** @param xcb_connection_t *c
5438  ** @param xcb_window_t      window
5439  ** @returns xcb_randr_get_output_primary_cookie_t
5440  **
5441  *****************************************************************************/
5442 
5443 xcb_randr_get_output_primary_cookie_t
5444 xcb_randr_get_output_primary_unchecked (xcb_connection_t *c  /**< */,
5445                                         xcb_window_t      window  /**< */)
5446 {
5447     static const xcb_protocol_request_t xcb_req = {
5448         /* count */ 2,
5449         /* ext */ &xcb_randr_id,
5450         /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY,
5451         /* isvoid */ 0
5452     };
5453 
5454     struct iovec xcb_parts[4];
5455     xcb_randr_get_output_primary_cookie_t xcb_ret;
5456     xcb_randr_get_output_primary_request_t xcb_out;
5457 
5458     xcb_out.window = window;
5459 
5460     xcb_parts[2].iov_base = (char *) &xcb_out;
5461     xcb_parts[2].iov_len = sizeof(xcb_out);
5462     xcb_parts[3].iov_base = 0;
5463     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5464 
5465     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5466     return xcb_ret;
5467 }
5468 
5469 
5470 /*****************************************************************************
5471  **
5472  ** xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply
5473  **
5474  ** @param xcb_connection_t                       *c
5475  ** @param xcb_randr_get_output_primary_cookie_t   cookie
5476  ** @param xcb_generic_error_t                   **e
5477  ** @returns xcb_randr_get_output_primary_reply_t *
5478  **
5479  *****************************************************************************/
5480 
5481 xcb_randr_get_output_primary_reply_t *
5482 xcb_randr_get_output_primary_reply (xcb_connection_t                       *c  /**< */,
5483                                     xcb_randr_get_output_primary_cookie_t   cookie  /**< */,
5484                                     xcb_generic_error_t                   **e  /**< */)
5485 {
5486     return (xcb_randr_get_output_primary_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5487 }
5488 
5489 
5490 /*****************************************************************************
5491  **
5492  ** void xcb_randr_crtc_change_next
5493  **
5494  ** @param xcb_randr_crtc_change_iterator_t *i
5495  ** @returns void
5496  **
5497  *****************************************************************************/
5498 
5499 void
5500 xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i  /**< */)
5501 {
5502     --i->rem;
5503     ++i->data;
5504     i->index += sizeof(xcb_randr_crtc_change_t);
5505 }
5506 
5507 
5508 /*****************************************************************************
5509  **
5510  ** xcb_generic_iterator_t xcb_randr_crtc_change_end
5511  **
5512  ** @param xcb_randr_crtc_change_iterator_t i
5513  ** @returns xcb_generic_iterator_t
5514  **
5515  *****************************************************************************/
5516 
5517 xcb_generic_iterator_t
5518 xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i  /**< */)
5519 {
5520     xcb_generic_iterator_t ret;
5521     ret.data = i.data + i.rem;
5522     ret.index = i.index + ((char *) ret.data - (char *) i.data);
5523     ret.rem = 0;
5524     return ret;
5525 }
5526 
5527 
5528 /*****************************************************************************
5529  **
5530  ** void xcb_randr_output_change_next
5531  **
5532  ** @param xcb_randr_output_change_iterator_t *i
5533  ** @returns void
5534  **
5535  *****************************************************************************/
5536 
5537 void
5538 xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i  /**< */)
5539 {
5540     --i->rem;
5541     ++i->data;
5542     i->index += sizeof(xcb_randr_output_change_t);
5543 }
5544 
5545 
5546 /*****************************************************************************
5547  **
5548  ** xcb_generic_iterator_t xcb_randr_output_change_end
5549  **
5550  ** @param xcb_randr_output_change_iterator_t i
5551  ** @returns xcb_generic_iterator_t
5552  **
5553  *****************************************************************************/
5554 
5555 xcb_generic_iterator_t
5556 xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i  /**< */)
5557 {
5558     xcb_generic_iterator_t ret;
5559     ret.data = i.data + i.rem;
5560     ret.index = i.index + ((char *) ret.data - (char *) i.data);
5561     ret.rem = 0;
5562     return ret;
5563 }
5564 
5565 
5566 /*****************************************************************************
5567  **
5568  ** void xcb_randr_output_property_next
5569  **
5570  ** @param xcb_randr_output_property_iterator_t *i
5571  ** @returns void
5572  **
5573  *****************************************************************************/
5574 
5575 void
5576 xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i  /**< */)
5577 {
5578     --i->rem;
5579     ++i->data;
5580     i->index += sizeof(xcb_randr_output_property_t);
5581 }
5582 
5583 
5584 /*****************************************************************************
5585  **
5586  ** xcb_generic_iterator_t xcb_randr_output_property_end
5587  **
5588  ** @param xcb_randr_output_property_iterator_t i
5589  ** @returns xcb_generic_iterator_t
5590  **
5591  *****************************************************************************/
5592 
5593 xcb_generic_iterator_t
5594 xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i  /**< */)
5595 {
5596     xcb_generic_iterator_t ret;
5597     ret.data = i.data + i.rem;
5598     ret.index = i.index + ((char *) ret.data - (char *) i.data);
5599     ret.rem = 0;
5600     return ret;
5601 }
5602 
5603 
5604 /*****************************************************************************
5605  **
5606  ** void xcb_randr_notify_data_next
5607  **
5608  ** @param xcb_randr_notify_data_iterator_t *i
5609  ** @returns void
5610  **
5611  *****************************************************************************/
5612 
5613 void
5614 xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i  /**< */)
5615 {
5616     --i->rem;
5617     ++i->data;
5618     i->index += sizeof(xcb_randr_notify_data_t);
5619 }
5620 
5621 
5622 /*****************************************************************************
5623  **
5624  ** xcb_generic_iterator_t xcb_randr_notify_data_end
5625  **
5626  ** @param xcb_randr_notify_data_iterator_t i
5627  ** @returns xcb_generic_iterator_t
5628  **
5629  *****************************************************************************/
5630 
5631 xcb_generic_iterator_t
5632 xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i  /**< */)
5633 {
5634     xcb_generic_iterator_t ret;
5635     ret.data = i.data + i.rem;
5636     ret.index = i.index + ((char *) ret.data - (char *) i.data);
5637     ret.rem = 0;
5638     return ret;
5639 }
5640 
5641