2 * This file generated automatically from randr.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
20 xcb_extension_t xcb_randr_id
= { "RANDR", 0 };
23 xcb_randr_mode_next (xcb_randr_mode_iterator_t
*i
/**< */)
27 i
->index
+= sizeof(xcb_randr_mode_t
);
30 xcb_generic_iterator_t
31 xcb_randr_mode_end (xcb_randr_mode_iterator_t i
/**< */)
33 xcb_generic_iterator_t ret
;
34 ret
.data
= i
.data
+ i
.rem
;
35 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
41 xcb_randr_crtc_next (xcb_randr_crtc_iterator_t
*i
/**< */)
45 i
->index
+= sizeof(xcb_randr_crtc_t
);
48 xcb_generic_iterator_t
49 xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i
/**< */)
51 xcb_generic_iterator_t ret
;
52 ret
.data
= i
.data
+ i
.rem
;
53 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
59 xcb_randr_output_next (xcb_randr_output_iterator_t
*i
/**< */)
63 i
->index
+= sizeof(xcb_randr_output_t
);
66 xcb_generic_iterator_t
67 xcb_randr_output_end (xcb_randr_output_iterator_t i
/**< */)
69 xcb_generic_iterator_t ret
;
70 ret
.data
= i
.data
+ i
.rem
;
71 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
77 xcb_randr_provider_next (xcb_randr_provider_iterator_t
*i
/**< */)
81 i
->index
+= sizeof(xcb_randr_provider_t
);
84 xcb_generic_iterator_t
85 xcb_randr_provider_end (xcb_randr_provider_iterator_t i
/**< */)
87 xcb_generic_iterator_t ret
;
88 ret
.data
= i
.data
+ i
.rem
;
89 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
95 xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t
*i
/**< */)
99 i
->index
+= sizeof(xcb_randr_screen_size_t
);
102 xcb_generic_iterator_t
103 xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i
/**< */)
105 xcb_generic_iterator_t ret
;
106 ret
.data
= i
.data
+ i
.rem
;
107 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
113 xcb_randr_refresh_rates_sizeof (const void *_buffer
/**< */)
115 char *xcb_tmp
= (char *)_buffer
;
116 const xcb_randr_refresh_rates_t
*_aux
= (xcb_randr_refresh_rates_t
*)_buffer
;
117 unsigned int xcb_buffer_len
= 0;
118 unsigned int xcb_block_len
= 0;
119 unsigned int xcb_pad
= 0;
120 unsigned int xcb_align_to
= 0;
123 xcb_block_len
+= sizeof(xcb_randr_refresh_rates_t
);
124 xcb_tmp
+= xcb_block_len
;
125 xcb_buffer_len
+= xcb_block_len
;
128 xcb_block_len
+= _aux
->nRates
* sizeof(uint16_t);
129 xcb_tmp
+= xcb_block_len
;
130 xcb_align_to
= ALIGNOF(uint16_t);
132 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
133 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
140 return xcb_buffer_len
;
144 xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t
*R
/**< */)
146 return (uint16_t *) (R
+ 1);
150 xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t
*R
/**< */)
155 xcb_generic_iterator_t
156 xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t
*R
/**< */)
158 xcb_generic_iterator_t i
;
159 i
.data
= ((uint16_t *) (R
+ 1)) + (R
->nRates
);
161 i
.index
= (char *) i
.data
- (char *) R
;
166 xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t
*i
/**< */)
168 xcb_randr_refresh_rates_t
*R
= i
->data
;
169 xcb_generic_iterator_t child
;
170 child
.data
= (xcb_randr_refresh_rates_t
*)(((char *)R
) + xcb_randr_refresh_rates_sizeof(R
));
171 i
->index
= (char *) child
.data
- (char *) i
->data
;
173 i
->data
= (xcb_randr_refresh_rates_t
*) child
.data
;
176 xcb_generic_iterator_t
177 xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i
/**< */)
179 xcb_generic_iterator_t ret
;
181 xcb_randr_refresh_rates_next(&i
);
188 xcb_randr_query_version_cookie_t
189 xcb_randr_query_version (xcb_connection_t
*c
/**< */,
190 uint32_t major_version
/**< */,
191 uint32_t minor_version
/**< */)
193 static const xcb_protocol_request_t xcb_req
= {
195 /* ext */ &xcb_randr_id
,
196 /* opcode */ XCB_RANDR_QUERY_VERSION
,
200 struct iovec xcb_parts
[4];
201 xcb_randr_query_version_cookie_t xcb_ret
;
202 xcb_randr_query_version_request_t xcb_out
;
204 xcb_out
.major_version
= major_version
;
205 xcb_out
.minor_version
= minor_version
;
207 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
208 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
209 xcb_parts
[3].iov_base
= 0;
210 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
212 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
216 xcb_randr_query_version_cookie_t
217 xcb_randr_query_version_unchecked (xcb_connection_t
*c
/**< */,
218 uint32_t major_version
/**< */,
219 uint32_t minor_version
/**< */)
221 static const xcb_protocol_request_t xcb_req
= {
223 /* ext */ &xcb_randr_id
,
224 /* opcode */ XCB_RANDR_QUERY_VERSION
,
228 struct iovec xcb_parts
[4];
229 xcb_randr_query_version_cookie_t xcb_ret
;
230 xcb_randr_query_version_request_t xcb_out
;
232 xcb_out
.major_version
= major_version
;
233 xcb_out
.minor_version
= minor_version
;
235 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
236 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
237 xcb_parts
[3].iov_base
= 0;
238 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
240 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
244 xcb_randr_query_version_reply_t
*
245 xcb_randr_query_version_reply (xcb_connection_t
*c
/**< */,
246 xcb_randr_query_version_cookie_t cookie
/**< */,
247 xcb_generic_error_t
**e
/**< */)
249 return (xcb_randr_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
252 xcb_randr_set_screen_config_cookie_t
253 xcb_randr_set_screen_config (xcb_connection_t
*c
/**< */,
254 xcb_window_t window
/**< */,
255 xcb_timestamp_t timestamp
/**< */,
256 xcb_timestamp_t config_timestamp
/**< */,
257 uint16_t sizeID
/**< */,
258 uint16_t rotation
/**< */,
259 uint16_t rate
/**< */)
261 static const xcb_protocol_request_t xcb_req
= {
263 /* ext */ &xcb_randr_id
,
264 /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG
,
268 struct iovec xcb_parts
[4];
269 xcb_randr_set_screen_config_cookie_t xcb_ret
;
270 xcb_randr_set_screen_config_request_t xcb_out
;
272 xcb_out
.window
= window
;
273 xcb_out
.timestamp
= timestamp
;
274 xcb_out
.config_timestamp
= config_timestamp
;
275 xcb_out
.sizeID
= sizeID
;
276 xcb_out
.rotation
= rotation
;
278 memset(xcb_out
.pad0
, 0, 2);
280 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
281 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
282 xcb_parts
[3].iov_base
= 0;
283 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
285 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
289 xcb_randr_set_screen_config_cookie_t
290 xcb_randr_set_screen_config_unchecked (xcb_connection_t
*c
/**< */,
291 xcb_window_t window
/**< */,
292 xcb_timestamp_t timestamp
/**< */,
293 xcb_timestamp_t config_timestamp
/**< */,
294 uint16_t sizeID
/**< */,
295 uint16_t rotation
/**< */,
296 uint16_t rate
/**< */)
298 static const xcb_protocol_request_t xcb_req
= {
300 /* ext */ &xcb_randr_id
,
301 /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG
,
305 struct iovec xcb_parts
[4];
306 xcb_randr_set_screen_config_cookie_t xcb_ret
;
307 xcb_randr_set_screen_config_request_t xcb_out
;
309 xcb_out
.window
= window
;
310 xcb_out
.timestamp
= timestamp
;
311 xcb_out
.config_timestamp
= config_timestamp
;
312 xcb_out
.sizeID
= sizeID
;
313 xcb_out
.rotation
= rotation
;
315 memset(xcb_out
.pad0
, 0, 2);
317 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
318 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
319 xcb_parts
[3].iov_base
= 0;
320 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
322 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
326 xcb_randr_set_screen_config_reply_t
*
327 xcb_randr_set_screen_config_reply (xcb_connection_t
*c
/**< */,
328 xcb_randr_set_screen_config_cookie_t cookie
/**< */,
329 xcb_generic_error_t
**e
/**< */)
331 return (xcb_randr_set_screen_config_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
335 xcb_randr_select_input_checked (xcb_connection_t
*c
/**< */,
336 xcb_window_t window
/**< */,
337 uint16_t enable
/**< */)
339 static const xcb_protocol_request_t xcb_req
= {
341 /* ext */ &xcb_randr_id
,
342 /* opcode */ XCB_RANDR_SELECT_INPUT
,
346 struct iovec xcb_parts
[4];
347 xcb_void_cookie_t xcb_ret
;
348 xcb_randr_select_input_request_t xcb_out
;
350 xcb_out
.window
= window
;
351 xcb_out
.enable
= enable
;
352 memset(xcb_out
.pad0
, 0, 2);
354 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
355 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
356 xcb_parts
[3].iov_base
= 0;
357 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
359 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
364 xcb_randr_select_input (xcb_connection_t
*c
/**< */,
365 xcb_window_t window
/**< */,
366 uint16_t enable
/**< */)
368 static const xcb_protocol_request_t xcb_req
= {
370 /* ext */ &xcb_randr_id
,
371 /* opcode */ XCB_RANDR_SELECT_INPUT
,
375 struct iovec xcb_parts
[4];
376 xcb_void_cookie_t xcb_ret
;
377 xcb_randr_select_input_request_t xcb_out
;
379 xcb_out
.window
= window
;
380 xcb_out
.enable
= enable
;
381 memset(xcb_out
.pad0
, 0, 2);
383 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
384 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
385 xcb_parts
[3].iov_base
= 0;
386 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
388 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
393 xcb_randr_get_screen_info_sizeof (const void *_buffer
/**< */)
395 char *xcb_tmp
= (char *)_buffer
;
396 const xcb_randr_get_screen_info_reply_t
*_aux
= (xcb_randr_get_screen_info_reply_t
*)_buffer
;
397 unsigned int xcb_buffer_len
= 0;
398 unsigned int xcb_block_len
= 0;
399 unsigned int xcb_pad
= 0;
400 unsigned int xcb_align_to
= 0;
403 unsigned int xcb_tmp_len
;
405 xcb_block_len
+= sizeof(xcb_randr_get_screen_info_reply_t
);
406 xcb_tmp
+= xcb_block_len
;
407 xcb_buffer_len
+= xcb_block_len
;
410 xcb_block_len
+= _aux
->nSizes
* sizeof(xcb_randr_screen_size_t
);
411 xcb_tmp
+= xcb_block_len
;
412 xcb_align_to
= ALIGNOF(xcb_randr_screen_size_t
);
414 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
415 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
422 for(i
=0; i
<(_aux
->nInfo
- _aux
->nSizes
); i
++) {
423 xcb_tmp_len
= xcb_randr_refresh_rates_sizeof(xcb_tmp
);
424 xcb_block_len
+= xcb_tmp_len
;
425 xcb_tmp
+= xcb_tmp_len
;
427 xcb_align_to
= ALIGNOF(xcb_randr_refresh_rates_t
);
429 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
430 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
437 return xcb_buffer_len
;
440 xcb_randr_get_screen_info_cookie_t
441 xcb_randr_get_screen_info (xcb_connection_t
*c
/**< */,
442 xcb_window_t window
/**< */)
444 static const xcb_protocol_request_t xcb_req
= {
446 /* ext */ &xcb_randr_id
,
447 /* opcode */ XCB_RANDR_GET_SCREEN_INFO
,
451 struct iovec xcb_parts
[4];
452 xcb_randr_get_screen_info_cookie_t xcb_ret
;
453 xcb_randr_get_screen_info_request_t xcb_out
;
455 xcb_out
.window
= window
;
457 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
458 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
459 xcb_parts
[3].iov_base
= 0;
460 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
462 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
466 xcb_randr_get_screen_info_cookie_t
467 xcb_randr_get_screen_info_unchecked (xcb_connection_t
*c
/**< */,
468 xcb_window_t window
/**< */)
470 static const xcb_protocol_request_t xcb_req
= {
472 /* ext */ &xcb_randr_id
,
473 /* opcode */ XCB_RANDR_GET_SCREEN_INFO
,
477 struct iovec xcb_parts
[4];
478 xcb_randr_get_screen_info_cookie_t xcb_ret
;
479 xcb_randr_get_screen_info_request_t xcb_out
;
481 xcb_out
.window
= window
;
483 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
484 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
485 xcb_parts
[3].iov_base
= 0;
486 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
488 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
492 xcb_randr_screen_size_t
*
493 xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t
*R
/**< */)
495 return (xcb_randr_screen_size_t
*) (R
+ 1);
499 xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t
*R
/**< */)
504 xcb_randr_screen_size_iterator_t
505 xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t
*R
/**< */)
507 xcb_randr_screen_size_iterator_t i
;
508 i
.data
= (xcb_randr_screen_size_t
*) (R
+ 1);
510 i
.index
= (char *) i
.data
- (char *) R
;
515 xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t
*R
/**< */)
517 return (R
->nInfo
- R
->nSizes
);
520 xcb_randr_refresh_rates_iterator_t
521 xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t
*R
/**< */)
523 xcb_randr_refresh_rates_iterator_t i
;
524 xcb_generic_iterator_t prev
= xcb_randr_screen_size_end(xcb_randr_get_screen_info_sizes_iterator(R
));
525 i
.data
= (xcb_randr_refresh_rates_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_refresh_rates_t
, prev
.index
));
526 i
.rem
= (R
->nInfo
- R
->nSizes
);
527 i
.index
= (char *) i
.data
- (char *) R
;
531 xcb_randr_get_screen_info_reply_t
*
532 xcb_randr_get_screen_info_reply (xcb_connection_t
*c
/**< */,
533 xcb_randr_get_screen_info_cookie_t cookie
/**< */,
534 xcb_generic_error_t
**e
/**< */)
536 return (xcb_randr_get_screen_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
539 xcb_randr_get_screen_size_range_cookie_t
540 xcb_randr_get_screen_size_range (xcb_connection_t
*c
/**< */,
541 xcb_window_t window
/**< */)
543 static const xcb_protocol_request_t xcb_req
= {
545 /* ext */ &xcb_randr_id
,
546 /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE
,
550 struct iovec xcb_parts
[4];
551 xcb_randr_get_screen_size_range_cookie_t xcb_ret
;
552 xcb_randr_get_screen_size_range_request_t xcb_out
;
554 xcb_out
.window
= window
;
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;
561 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
565 xcb_randr_get_screen_size_range_cookie_t
566 xcb_randr_get_screen_size_range_unchecked (xcb_connection_t
*c
/**< */,
567 xcb_window_t window
/**< */)
569 static const xcb_protocol_request_t xcb_req
= {
571 /* ext */ &xcb_randr_id
,
572 /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE
,
576 struct iovec xcb_parts
[4];
577 xcb_randr_get_screen_size_range_cookie_t xcb_ret
;
578 xcb_randr_get_screen_size_range_request_t xcb_out
;
580 xcb_out
.window
= window
;
582 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
583 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
584 xcb_parts
[3].iov_base
= 0;
585 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
587 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
591 xcb_randr_get_screen_size_range_reply_t
*
592 xcb_randr_get_screen_size_range_reply (xcb_connection_t
*c
/**< */,
593 xcb_randr_get_screen_size_range_cookie_t cookie
/**< */,
594 xcb_generic_error_t
**e
/**< */)
596 return (xcb_randr_get_screen_size_range_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
600 xcb_randr_set_screen_size_checked (xcb_connection_t
*c
/**< */,
601 xcb_window_t window
/**< */,
602 uint16_t width
/**< */,
603 uint16_t height
/**< */,
604 uint32_t mm_width
/**< */,
605 uint32_t mm_height
/**< */)
607 static const xcb_protocol_request_t xcb_req
= {
609 /* ext */ &xcb_randr_id
,
610 /* opcode */ XCB_RANDR_SET_SCREEN_SIZE
,
614 struct iovec xcb_parts
[4];
615 xcb_void_cookie_t xcb_ret
;
616 xcb_randr_set_screen_size_request_t xcb_out
;
618 xcb_out
.window
= window
;
619 xcb_out
.width
= width
;
620 xcb_out
.height
= height
;
621 xcb_out
.mm_width
= mm_width
;
622 xcb_out
.mm_height
= mm_height
;
624 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
625 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
626 xcb_parts
[3].iov_base
= 0;
627 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
629 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
634 xcb_randr_set_screen_size (xcb_connection_t
*c
/**< */,
635 xcb_window_t window
/**< */,
636 uint16_t width
/**< */,
637 uint16_t height
/**< */,
638 uint32_t mm_width
/**< */,
639 uint32_t mm_height
/**< */)
641 static const xcb_protocol_request_t xcb_req
= {
643 /* ext */ &xcb_randr_id
,
644 /* opcode */ XCB_RANDR_SET_SCREEN_SIZE
,
648 struct iovec xcb_parts
[4];
649 xcb_void_cookie_t xcb_ret
;
650 xcb_randr_set_screen_size_request_t xcb_out
;
652 xcb_out
.window
= window
;
653 xcb_out
.width
= width
;
654 xcb_out
.height
= height
;
655 xcb_out
.mm_width
= mm_width
;
656 xcb_out
.mm_height
= mm_height
;
658 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
659 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
660 xcb_parts
[3].iov_base
= 0;
661 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
663 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
668 xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t
*i
/**< */)
672 i
->index
+= sizeof(xcb_randr_mode_info_t
);
675 xcb_generic_iterator_t
676 xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i
/**< */)
678 xcb_generic_iterator_t ret
;
679 ret
.data
= i
.data
+ i
.rem
;
680 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
686 xcb_randr_get_screen_resources_sizeof (const void *_buffer
/**< */)
688 char *xcb_tmp
= (char *)_buffer
;
689 const xcb_randr_get_screen_resources_reply_t
*_aux
= (xcb_randr_get_screen_resources_reply_t
*)_buffer
;
690 unsigned int xcb_buffer_len
= 0;
691 unsigned int xcb_block_len
= 0;
692 unsigned int xcb_pad
= 0;
693 unsigned int xcb_align_to
= 0;
696 xcb_block_len
+= sizeof(xcb_randr_get_screen_resources_reply_t
);
697 xcb_tmp
+= xcb_block_len
;
698 xcb_buffer_len
+= xcb_block_len
;
701 xcb_block_len
+= _aux
->num_crtcs
* sizeof(uint32_t);
702 xcb_tmp
+= xcb_block_len
;
703 xcb_align_to
= ALIGNOF(xcb_randr_crtc_t
);
705 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
706 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
713 xcb_block_len
+= _aux
->num_outputs
* sizeof(uint32_t);
714 xcb_tmp
+= xcb_block_len
;
715 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
717 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
718 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
725 xcb_block_len
+= _aux
->num_modes
* sizeof(xcb_randr_mode_info_t
);
726 xcb_tmp
+= xcb_block_len
;
727 xcb_align_to
= ALIGNOF(xcb_randr_mode_info_t
);
729 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
730 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
737 xcb_block_len
+= _aux
->names_len
* sizeof(uint8_t);
738 xcb_tmp
+= xcb_block_len
;
739 xcb_align_to
= ALIGNOF(uint8_t);
741 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
742 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
749 return xcb_buffer_len
;
752 xcb_randr_get_screen_resources_cookie_t
753 xcb_randr_get_screen_resources (xcb_connection_t
*c
/**< */,
754 xcb_window_t window
/**< */)
756 static const xcb_protocol_request_t xcb_req
= {
758 /* ext */ &xcb_randr_id
,
759 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES
,
763 struct iovec xcb_parts
[4];
764 xcb_randr_get_screen_resources_cookie_t xcb_ret
;
765 xcb_randr_get_screen_resources_request_t xcb_out
;
767 xcb_out
.window
= window
;
769 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
770 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
771 xcb_parts
[3].iov_base
= 0;
772 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
774 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
778 xcb_randr_get_screen_resources_cookie_t
779 xcb_randr_get_screen_resources_unchecked (xcb_connection_t
*c
/**< */,
780 xcb_window_t window
/**< */)
782 static const xcb_protocol_request_t xcb_req
= {
784 /* ext */ &xcb_randr_id
,
785 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES
,
789 struct iovec xcb_parts
[4];
790 xcb_randr_get_screen_resources_cookie_t xcb_ret
;
791 xcb_randr_get_screen_resources_request_t xcb_out
;
793 xcb_out
.window
= window
;
795 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
796 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
797 xcb_parts
[3].iov_base
= 0;
798 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
800 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
805 xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
807 return (xcb_randr_crtc_t
*) (R
+ 1);
811 xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
816 xcb_generic_iterator_t
817 xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
819 xcb_generic_iterator_t i
;
820 i
.data
= ((xcb_randr_crtc_t
*) (R
+ 1)) + (R
->num_crtcs
);
822 i
.index
= (char *) i
.data
- (char *) R
;
827 xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
829 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_crtcs_end(R
);
830 return (xcb_randr_output_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_output_t
, prev
.index
) + 0);
834 xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
836 return R
->num_outputs
;
839 xcb_generic_iterator_t
840 xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
842 xcb_generic_iterator_t i
;
843 xcb_generic_iterator_t child
= xcb_randr_get_screen_resources_crtcs_end(R
);
844 i
.data
= ((xcb_randr_output_t
*) child
.data
) + (R
->num_outputs
);
846 i
.index
= (char *) i
.data
- (char *) R
;
850 xcb_randr_mode_info_t
*
851 xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
853 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_outputs_end(R
);
854 return (xcb_randr_mode_info_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_mode_info_t
, prev
.index
) + 0);
858 xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
863 xcb_randr_mode_info_iterator_t
864 xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
866 xcb_randr_mode_info_iterator_t i
;
867 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_outputs_end(R
);
868 i
.data
= (xcb_randr_mode_info_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_mode_info_t
, prev
.index
));
869 i
.rem
= R
->num_modes
;
870 i
.index
= (char *) i
.data
- (char *) R
;
875 xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
877 xcb_generic_iterator_t prev
= xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R
));
878 return (uint8_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint8_t, prev
.index
) + 0);
882 xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
887 xcb_generic_iterator_t
888 xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t
*R
/**< */)
890 xcb_generic_iterator_t i
;
891 xcb_generic_iterator_t child
= xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R
));
892 i
.data
= ((uint8_t *) child
.data
) + (R
->names_len
);
894 i
.index
= (char *) i
.data
- (char *) R
;
898 xcb_randr_get_screen_resources_reply_t
*
899 xcb_randr_get_screen_resources_reply (xcb_connection_t
*c
/**< */,
900 xcb_randr_get_screen_resources_cookie_t cookie
/**< */,
901 xcb_generic_error_t
**e
/**< */)
903 return (xcb_randr_get_screen_resources_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
907 xcb_randr_get_output_info_sizeof (const void *_buffer
/**< */)
909 char *xcb_tmp
= (char *)_buffer
;
910 const xcb_randr_get_output_info_reply_t
*_aux
= (xcb_randr_get_output_info_reply_t
*)_buffer
;
911 unsigned int xcb_buffer_len
= 0;
912 unsigned int xcb_block_len
= 0;
913 unsigned int xcb_pad
= 0;
914 unsigned int xcb_align_to
= 0;
917 xcb_block_len
+= sizeof(xcb_randr_get_output_info_reply_t
);
918 xcb_tmp
+= xcb_block_len
;
919 xcb_buffer_len
+= xcb_block_len
;
922 xcb_block_len
+= _aux
->num_crtcs
* sizeof(xcb_randr_output_t
);
923 xcb_tmp
+= xcb_block_len
;
924 xcb_align_to
= ALIGNOF(xcb_randr_crtc_t
);
926 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
927 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
934 xcb_block_len
+= _aux
->num_modes
* sizeof(xcb_randr_output_t
);
935 xcb_tmp
+= xcb_block_len
;
936 xcb_align_to
= ALIGNOF(xcb_randr_mode_t
);
938 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
939 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
946 xcb_block_len
+= _aux
->num_clones
* sizeof(xcb_randr_output_t
);
947 xcb_tmp
+= xcb_block_len
;
948 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
950 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
951 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
958 xcb_block_len
+= _aux
->name_len
* sizeof(uint8_t);
959 xcb_tmp
+= xcb_block_len
;
960 xcb_align_to
= ALIGNOF(uint8_t);
962 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
963 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
970 return xcb_buffer_len
;
973 xcb_randr_get_output_info_cookie_t
974 xcb_randr_get_output_info (xcb_connection_t
*c
/**< */,
975 xcb_randr_output_t output
/**< */,
976 xcb_timestamp_t config_timestamp
/**< */)
978 static const xcb_protocol_request_t xcb_req
= {
980 /* ext */ &xcb_randr_id
,
981 /* opcode */ XCB_RANDR_GET_OUTPUT_INFO
,
985 struct iovec xcb_parts
[4];
986 xcb_randr_get_output_info_cookie_t xcb_ret
;
987 xcb_randr_get_output_info_request_t xcb_out
;
989 xcb_out
.output
= output
;
990 xcb_out
.config_timestamp
= config_timestamp
;
992 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
993 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
994 xcb_parts
[3].iov_base
= 0;
995 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
997 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1001 xcb_randr_get_output_info_cookie_t
1002 xcb_randr_get_output_info_unchecked (xcb_connection_t
*c
/**< */,
1003 xcb_randr_output_t output
/**< */,
1004 xcb_timestamp_t config_timestamp
/**< */)
1006 static const xcb_protocol_request_t xcb_req
= {
1008 /* ext */ &xcb_randr_id
,
1009 /* opcode */ XCB_RANDR_GET_OUTPUT_INFO
,
1013 struct iovec xcb_parts
[4];
1014 xcb_randr_get_output_info_cookie_t xcb_ret
;
1015 xcb_randr_get_output_info_request_t xcb_out
;
1017 xcb_out
.output
= output
;
1018 xcb_out
.config_timestamp
= config_timestamp
;
1020 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1021 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1022 xcb_parts
[3].iov_base
= 0;
1023 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1025 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1030 xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1032 return (xcb_randr_crtc_t
*) (R
+ 1);
1036 xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1038 return R
->num_crtcs
;
1041 xcb_generic_iterator_t
1042 xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1044 xcb_generic_iterator_t i
;
1045 i
.data
= ((xcb_randr_crtc_t
*) (R
+ 1)) + (R
->num_crtcs
);
1047 i
.index
= (char *) i
.data
- (char *) R
;
1052 xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1054 xcb_generic_iterator_t prev
= xcb_randr_get_output_info_crtcs_end(R
);
1055 return (xcb_randr_mode_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_mode_t
, prev
.index
) + 0);
1059 xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1061 return R
->num_modes
;
1064 xcb_generic_iterator_t
1065 xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1067 xcb_generic_iterator_t i
;
1068 xcb_generic_iterator_t child
= xcb_randr_get_output_info_crtcs_end(R
);
1069 i
.data
= ((xcb_randr_mode_t
*) child
.data
) + (R
->num_modes
);
1071 i
.index
= (char *) i
.data
- (char *) R
;
1075 xcb_randr_output_t
*
1076 xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1078 xcb_generic_iterator_t prev
= xcb_randr_get_output_info_modes_end(R
);
1079 return (xcb_randr_output_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_output_t
, prev
.index
) + 0);
1083 xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1085 return R
->num_clones
;
1088 xcb_generic_iterator_t
1089 xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1091 xcb_generic_iterator_t i
;
1092 xcb_generic_iterator_t child
= xcb_randr_get_output_info_modes_end(R
);
1093 i
.data
= ((xcb_randr_output_t
*) child
.data
) + (R
->num_clones
);
1095 i
.index
= (char *) i
.data
- (char *) R
;
1100 xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1102 xcb_generic_iterator_t prev
= xcb_randr_get_output_info_clones_end(R
);
1103 return (uint8_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint8_t, prev
.index
) + 0);
1107 xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1112 xcb_generic_iterator_t
1113 xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t
*R
/**< */)
1115 xcb_generic_iterator_t i
;
1116 xcb_generic_iterator_t child
= xcb_randr_get_output_info_clones_end(R
);
1117 i
.data
= ((uint8_t *) child
.data
) + (R
->name_len
);
1119 i
.index
= (char *) i
.data
- (char *) R
;
1123 xcb_randr_get_output_info_reply_t
*
1124 xcb_randr_get_output_info_reply (xcb_connection_t
*c
/**< */,
1125 xcb_randr_get_output_info_cookie_t cookie
/**< */,
1126 xcb_generic_error_t
**e
/**< */)
1128 return (xcb_randr_get_output_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1132 xcb_randr_list_output_properties_sizeof (const void *_buffer
/**< */)
1134 char *xcb_tmp
= (char *)_buffer
;
1135 const xcb_randr_list_output_properties_reply_t
*_aux
= (xcb_randr_list_output_properties_reply_t
*)_buffer
;
1136 unsigned int xcb_buffer_len
= 0;
1137 unsigned int xcb_block_len
= 0;
1138 unsigned int xcb_pad
= 0;
1139 unsigned int xcb_align_to
= 0;
1142 xcb_block_len
+= sizeof(xcb_randr_list_output_properties_reply_t
);
1143 xcb_tmp
+= xcb_block_len
;
1144 xcb_buffer_len
+= xcb_block_len
;
1147 xcb_block_len
+= _aux
->num_atoms
* sizeof(xcb_atom_t
);
1148 xcb_tmp
+= xcb_block_len
;
1149 xcb_align_to
= ALIGNOF(xcb_atom_t
);
1150 /* insert padding */
1151 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1152 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1159 return xcb_buffer_len
;
1162 xcb_randr_list_output_properties_cookie_t
1163 xcb_randr_list_output_properties (xcb_connection_t
*c
/**< */,
1164 xcb_randr_output_t output
/**< */)
1166 static const xcb_protocol_request_t xcb_req
= {
1168 /* ext */ &xcb_randr_id
,
1169 /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES
,
1173 struct iovec xcb_parts
[4];
1174 xcb_randr_list_output_properties_cookie_t xcb_ret
;
1175 xcb_randr_list_output_properties_request_t xcb_out
;
1177 xcb_out
.output
= output
;
1179 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1180 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1181 xcb_parts
[3].iov_base
= 0;
1182 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1184 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1188 xcb_randr_list_output_properties_cookie_t
1189 xcb_randr_list_output_properties_unchecked (xcb_connection_t
*c
/**< */,
1190 xcb_randr_output_t output
/**< */)
1192 static const xcb_protocol_request_t xcb_req
= {
1194 /* ext */ &xcb_randr_id
,
1195 /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES
,
1199 struct iovec xcb_parts
[4];
1200 xcb_randr_list_output_properties_cookie_t xcb_ret
;
1201 xcb_randr_list_output_properties_request_t xcb_out
;
1203 xcb_out
.output
= output
;
1205 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1206 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1207 xcb_parts
[3].iov_base
= 0;
1208 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1210 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1215 xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t
*R
/**< */)
1217 return (xcb_atom_t
*) (R
+ 1);
1221 xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t
*R
/**< */)
1223 return R
->num_atoms
;
1226 xcb_generic_iterator_t
1227 xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t
*R
/**< */)
1229 xcb_generic_iterator_t i
;
1230 i
.data
= ((xcb_atom_t
*) (R
+ 1)) + (R
->num_atoms
);
1232 i
.index
= (char *) i
.data
- (char *) R
;
1236 xcb_randr_list_output_properties_reply_t
*
1237 xcb_randr_list_output_properties_reply (xcb_connection_t
*c
/**< */,
1238 xcb_randr_list_output_properties_cookie_t cookie
/**< */,
1239 xcb_generic_error_t
**e
/**< */)
1241 return (xcb_randr_list_output_properties_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1245 xcb_randr_query_output_property_sizeof (const void *_buffer
/**< */)
1247 char *xcb_tmp
= (char *)_buffer
;
1248 const xcb_randr_query_output_property_reply_t
*_aux
= (xcb_randr_query_output_property_reply_t
*)_buffer
;
1249 unsigned int xcb_buffer_len
= 0;
1250 unsigned int xcb_block_len
= 0;
1251 unsigned int xcb_pad
= 0;
1252 unsigned int xcb_align_to
= 0;
1255 xcb_block_len
+= sizeof(xcb_randr_query_output_property_reply_t
);
1256 xcb_tmp
+= xcb_block_len
;
1257 xcb_buffer_len
+= xcb_block_len
;
1260 xcb_block_len
+= _aux
->length
* sizeof(int32_t);
1261 xcb_tmp
+= xcb_block_len
;
1262 xcb_align_to
= ALIGNOF(int32_t);
1263 /* insert padding */
1264 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1265 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1272 return xcb_buffer_len
;
1275 xcb_randr_query_output_property_cookie_t
1276 xcb_randr_query_output_property (xcb_connection_t
*c
/**< */,
1277 xcb_randr_output_t output
/**< */,
1278 xcb_atom_t property
/**< */)
1280 static const xcb_protocol_request_t xcb_req
= {
1282 /* ext */ &xcb_randr_id
,
1283 /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY
,
1287 struct iovec xcb_parts
[4];
1288 xcb_randr_query_output_property_cookie_t xcb_ret
;
1289 xcb_randr_query_output_property_request_t xcb_out
;
1291 xcb_out
.output
= output
;
1292 xcb_out
.property
= property
;
1294 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1295 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1296 xcb_parts
[3].iov_base
= 0;
1297 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1299 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1303 xcb_randr_query_output_property_cookie_t
1304 xcb_randr_query_output_property_unchecked (xcb_connection_t
*c
/**< */,
1305 xcb_randr_output_t output
/**< */,
1306 xcb_atom_t property
/**< */)
1308 static const xcb_protocol_request_t xcb_req
= {
1310 /* ext */ &xcb_randr_id
,
1311 /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY
,
1315 struct iovec xcb_parts
[4];
1316 xcb_randr_query_output_property_cookie_t xcb_ret
;
1317 xcb_randr_query_output_property_request_t xcb_out
;
1319 xcb_out
.output
= output
;
1320 xcb_out
.property
= property
;
1322 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1323 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1324 xcb_parts
[3].iov_base
= 0;
1325 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1327 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1332 xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t
*R
/**< */)
1334 return (int32_t *) (R
+ 1);
1338 xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t
*R
/**< */)
1343 xcb_generic_iterator_t
1344 xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t
*R
/**< */)
1346 xcb_generic_iterator_t i
;
1347 i
.data
= ((int32_t *) (R
+ 1)) + (R
->length
);
1349 i
.index
= (char *) i
.data
- (char *) R
;
1353 xcb_randr_query_output_property_reply_t
*
1354 xcb_randr_query_output_property_reply (xcb_connection_t
*c
/**< */,
1355 xcb_randr_query_output_property_cookie_t cookie
/**< */,
1356 xcb_generic_error_t
**e
/**< */)
1358 return (xcb_randr_query_output_property_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1362 xcb_randr_configure_output_property_sizeof (const void *_buffer
/**< */,
1363 uint32_t values_len
/**< */)
1365 char *xcb_tmp
= (char *)_buffer
;
1366 unsigned int xcb_buffer_len
= 0;
1367 unsigned int xcb_block_len
= 0;
1368 unsigned int xcb_pad
= 0;
1369 unsigned int xcb_align_to
= 0;
1372 xcb_block_len
+= sizeof(xcb_randr_configure_output_property_request_t
);
1373 xcb_tmp
+= xcb_block_len
;
1374 xcb_buffer_len
+= xcb_block_len
;
1377 xcb_block_len
+= values_len
* sizeof(int32_t);
1378 xcb_tmp
+= xcb_block_len
;
1379 xcb_align_to
= ALIGNOF(int32_t);
1380 /* insert padding */
1381 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1382 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1389 return xcb_buffer_len
;
1393 xcb_randr_configure_output_property_checked (xcb_connection_t
*c
/**< */,
1394 xcb_randr_output_t output
/**< */,
1395 xcb_atom_t property
/**< */,
1396 uint8_t pending
/**< */,
1397 uint8_t range
/**< */,
1398 uint32_t values_len
/**< */,
1399 const int32_t *values
/**< */)
1401 static const xcb_protocol_request_t xcb_req
= {
1403 /* ext */ &xcb_randr_id
,
1404 /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY
,
1408 struct iovec xcb_parts
[6];
1409 xcb_void_cookie_t xcb_ret
;
1410 xcb_randr_configure_output_property_request_t xcb_out
;
1412 xcb_out
.output
= output
;
1413 xcb_out
.property
= property
;
1414 xcb_out
.pending
= pending
;
1415 xcb_out
.range
= range
;
1416 memset(xcb_out
.pad0
, 0, 2);
1418 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1419 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1420 xcb_parts
[3].iov_base
= 0;
1421 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1422 /* int32_t values */
1423 xcb_parts
[4].iov_base
= (char *) values
;
1424 xcb_parts
[4].iov_len
= values_len
* sizeof(int32_t);
1425 xcb_parts
[5].iov_base
= 0;
1426 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1428 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1433 xcb_randr_configure_output_property (xcb_connection_t
*c
/**< */,
1434 xcb_randr_output_t output
/**< */,
1435 xcb_atom_t property
/**< */,
1436 uint8_t pending
/**< */,
1437 uint8_t range
/**< */,
1438 uint32_t values_len
/**< */,
1439 const int32_t *values
/**< */)
1441 static const xcb_protocol_request_t xcb_req
= {
1443 /* ext */ &xcb_randr_id
,
1444 /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY
,
1448 struct iovec xcb_parts
[6];
1449 xcb_void_cookie_t xcb_ret
;
1450 xcb_randr_configure_output_property_request_t xcb_out
;
1452 xcb_out
.output
= output
;
1453 xcb_out
.property
= property
;
1454 xcb_out
.pending
= pending
;
1455 xcb_out
.range
= range
;
1456 memset(xcb_out
.pad0
, 0, 2);
1458 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1459 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1460 xcb_parts
[3].iov_base
= 0;
1461 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1462 /* int32_t values */
1463 xcb_parts
[4].iov_base
= (char *) values
;
1464 xcb_parts
[4].iov_len
= values_len
* sizeof(int32_t);
1465 xcb_parts
[5].iov_base
= 0;
1466 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1468 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1473 xcb_randr_change_output_property_sizeof (const void *_buffer
/**< */)
1475 char *xcb_tmp
= (char *)_buffer
;
1476 const xcb_randr_change_output_property_request_t
*_aux
= (xcb_randr_change_output_property_request_t
*)_buffer
;
1477 unsigned int xcb_buffer_len
= 0;
1478 unsigned int xcb_block_len
= 0;
1479 unsigned int xcb_pad
= 0;
1480 unsigned int xcb_align_to
= 0;
1483 xcb_block_len
+= sizeof(xcb_randr_change_output_property_request_t
);
1484 xcb_tmp
+= xcb_block_len
;
1485 xcb_buffer_len
+= xcb_block_len
;
1488 xcb_block_len
+= ((_aux
->num_units
* _aux
->format
) / 8) * sizeof(char);
1489 xcb_tmp
+= xcb_block_len
;
1490 xcb_align_to
= ALIGNOF(char);
1491 /* insert padding */
1492 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1493 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1500 return xcb_buffer_len
;
1504 xcb_randr_change_output_property_checked (xcb_connection_t
*c
/**< */,
1505 xcb_randr_output_t output
/**< */,
1506 xcb_atom_t property
/**< */,
1507 xcb_atom_t type
/**< */,
1508 uint8_t format
/**< */,
1509 uint8_t mode
/**< */,
1510 uint32_t num_units
/**< */,
1511 const void *data
/**< */)
1513 static const xcb_protocol_request_t xcb_req
= {
1515 /* ext */ &xcb_randr_id
,
1516 /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY
,
1520 struct iovec xcb_parts
[6];
1521 xcb_void_cookie_t xcb_ret
;
1522 xcb_randr_change_output_property_request_t xcb_out
;
1524 xcb_out
.output
= output
;
1525 xcb_out
.property
= property
;
1526 xcb_out
.type
= type
;
1527 xcb_out
.format
= format
;
1528 xcb_out
.mode
= mode
;
1529 memset(xcb_out
.pad0
, 0, 2);
1530 xcb_out
.num_units
= num_units
;
1532 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1533 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1534 xcb_parts
[3].iov_base
= 0;
1535 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1537 xcb_parts
[4].iov_base
= (char *) data
;
1538 xcb_parts
[4].iov_len
= ((num_units
* format
) / 8) * sizeof(char);
1539 xcb_parts
[5].iov_base
= 0;
1540 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1542 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1547 xcb_randr_change_output_property (xcb_connection_t
*c
/**< */,
1548 xcb_randr_output_t output
/**< */,
1549 xcb_atom_t property
/**< */,
1550 xcb_atom_t type
/**< */,
1551 uint8_t format
/**< */,
1552 uint8_t mode
/**< */,
1553 uint32_t num_units
/**< */,
1554 const void *data
/**< */)
1556 static const xcb_protocol_request_t xcb_req
= {
1558 /* ext */ &xcb_randr_id
,
1559 /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY
,
1563 struct iovec xcb_parts
[6];
1564 xcb_void_cookie_t xcb_ret
;
1565 xcb_randr_change_output_property_request_t xcb_out
;
1567 xcb_out
.output
= output
;
1568 xcb_out
.property
= property
;
1569 xcb_out
.type
= type
;
1570 xcb_out
.format
= format
;
1571 xcb_out
.mode
= mode
;
1572 memset(xcb_out
.pad0
, 0, 2);
1573 xcb_out
.num_units
= num_units
;
1575 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1576 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1577 xcb_parts
[3].iov_base
= 0;
1578 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1580 xcb_parts
[4].iov_base
= (char *) data
;
1581 xcb_parts
[4].iov_len
= ((num_units
* format
) / 8) * sizeof(char);
1582 xcb_parts
[5].iov_base
= 0;
1583 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1585 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1590 xcb_randr_delete_output_property_checked (xcb_connection_t
*c
/**< */,
1591 xcb_randr_output_t output
/**< */,
1592 xcb_atom_t property
/**< */)
1594 static const xcb_protocol_request_t xcb_req
= {
1596 /* ext */ &xcb_randr_id
,
1597 /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY
,
1601 struct iovec xcb_parts
[4];
1602 xcb_void_cookie_t xcb_ret
;
1603 xcb_randr_delete_output_property_request_t xcb_out
;
1605 xcb_out
.output
= output
;
1606 xcb_out
.property
= property
;
1608 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1609 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1610 xcb_parts
[3].iov_base
= 0;
1611 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1613 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1618 xcb_randr_delete_output_property (xcb_connection_t
*c
/**< */,
1619 xcb_randr_output_t output
/**< */,
1620 xcb_atom_t property
/**< */)
1622 static const xcb_protocol_request_t xcb_req
= {
1624 /* ext */ &xcb_randr_id
,
1625 /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY
,
1629 struct iovec xcb_parts
[4];
1630 xcb_void_cookie_t xcb_ret
;
1631 xcb_randr_delete_output_property_request_t xcb_out
;
1633 xcb_out
.output
= output
;
1634 xcb_out
.property
= property
;
1636 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1637 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1638 xcb_parts
[3].iov_base
= 0;
1639 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1641 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1646 xcb_randr_get_output_property_sizeof (const void *_buffer
/**< */)
1648 char *xcb_tmp
= (char *)_buffer
;
1649 const xcb_randr_get_output_property_reply_t
*_aux
= (xcb_randr_get_output_property_reply_t
*)_buffer
;
1650 unsigned int xcb_buffer_len
= 0;
1651 unsigned int xcb_block_len
= 0;
1652 unsigned int xcb_pad
= 0;
1653 unsigned int xcb_align_to
= 0;
1656 xcb_block_len
+= sizeof(xcb_randr_get_output_property_reply_t
);
1657 xcb_tmp
+= xcb_block_len
;
1658 xcb_buffer_len
+= xcb_block_len
;
1661 xcb_block_len
+= (_aux
->num_items
* (_aux
->format
/ 8)) * sizeof(uint8_t);
1662 xcb_tmp
+= xcb_block_len
;
1663 xcb_align_to
= ALIGNOF(uint8_t);
1664 /* insert padding */
1665 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1666 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1673 return xcb_buffer_len
;
1676 xcb_randr_get_output_property_cookie_t
1677 xcb_randr_get_output_property (xcb_connection_t
*c
/**< */,
1678 xcb_randr_output_t output
/**< */,
1679 xcb_atom_t property
/**< */,
1680 xcb_atom_t type
/**< */,
1681 uint32_t long_offset
/**< */,
1682 uint32_t long_length
/**< */,
1683 uint8_t _delete
/**< */,
1684 uint8_t pending
/**< */)
1686 static const xcb_protocol_request_t xcb_req
= {
1688 /* ext */ &xcb_randr_id
,
1689 /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY
,
1693 struct iovec xcb_parts
[4];
1694 xcb_randr_get_output_property_cookie_t xcb_ret
;
1695 xcb_randr_get_output_property_request_t xcb_out
;
1697 xcb_out
.output
= output
;
1698 xcb_out
.property
= property
;
1699 xcb_out
.type
= type
;
1700 xcb_out
.long_offset
= long_offset
;
1701 xcb_out
.long_length
= long_length
;
1702 xcb_out
._delete
= _delete
;
1703 xcb_out
.pending
= pending
;
1704 memset(xcb_out
.pad0
, 0, 2);
1706 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1707 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1708 xcb_parts
[3].iov_base
= 0;
1709 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1711 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1715 xcb_randr_get_output_property_cookie_t
1716 xcb_randr_get_output_property_unchecked (xcb_connection_t
*c
/**< */,
1717 xcb_randr_output_t output
/**< */,
1718 xcb_atom_t property
/**< */,
1719 xcb_atom_t type
/**< */,
1720 uint32_t long_offset
/**< */,
1721 uint32_t long_length
/**< */,
1722 uint8_t _delete
/**< */,
1723 uint8_t pending
/**< */)
1725 static const xcb_protocol_request_t xcb_req
= {
1727 /* ext */ &xcb_randr_id
,
1728 /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY
,
1732 struct iovec xcb_parts
[4];
1733 xcb_randr_get_output_property_cookie_t xcb_ret
;
1734 xcb_randr_get_output_property_request_t xcb_out
;
1736 xcb_out
.output
= output
;
1737 xcb_out
.property
= property
;
1738 xcb_out
.type
= type
;
1739 xcb_out
.long_offset
= long_offset
;
1740 xcb_out
.long_length
= long_length
;
1741 xcb_out
._delete
= _delete
;
1742 xcb_out
.pending
= pending
;
1743 memset(xcb_out
.pad0
, 0, 2);
1745 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1746 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1747 xcb_parts
[3].iov_base
= 0;
1748 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1750 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1755 xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t
*R
/**< */)
1757 return (uint8_t *) (R
+ 1);
1761 xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t
*R
/**< */)
1763 return (R
->num_items
* (R
->format
/ 8));
1766 xcb_generic_iterator_t
1767 xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t
*R
/**< */)
1769 xcb_generic_iterator_t i
;
1770 i
.data
= ((uint8_t *) (R
+ 1)) + ((R
->num_items
* (R
->format
/ 8)));
1772 i
.index
= (char *) i
.data
- (char *) R
;
1776 xcb_randr_get_output_property_reply_t
*
1777 xcb_randr_get_output_property_reply (xcb_connection_t
*c
/**< */,
1778 xcb_randr_get_output_property_cookie_t cookie
/**< */,
1779 xcb_generic_error_t
**e
/**< */)
1781 return (xcb_randr_get_output_property_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1785 xcb_randr_create_mode_sizeof (const void *_buffer
/**< */,
1786 uint32_t name_len
/**< */)
1788 char *xcb_tmp
= (char *)_buffer
;
1789 unsigned int xcb_buffer_len
= 0;
1790 unsigned int xcb_block_len
= 0;
1791 unsigned int xcb_pad
= 0;
1792 unsigned int xcb_align_to
= 0;
1795 xcb_block_len
+= sizeof(xcb_randr_create_mode_request_t
);
1796 xcb_tmp
+= xcb_block_len
;
1797 xcb_buffer_len
+= xcb_block_len
;
1800 xcb_block_len
+= name_len
* sizeof(char);
1801 xcb_tmp
+= xcb_block_len
;
1802 xcb_align_to
= ALIGNOF(char);
1803 /* insert padding */
1804 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1805 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1812 return xcb_buffer_len
;
1815 xcb_randr_create_mode_cookie_t
1816 xcb_randr_create_mode (xcb_connection_t
*c
/**< */,
1817 xcb_window_t window
/**< */,
1818 xcb_randr_mode_info_t mode_info
/**< */,
1819 uint32_t name_len
/**< */,
1820 const char *name
/**< */)
1822 static const xcb_protocol_request_t xcb_req
= {
1824 /* ext */ &xcb_randr_id
,
1825 /* opcode */ XCB_RANDR_CREATE_MODE
,
1829 struct iovec xcb_parts
[6];
1830 xcb_randr_create_mode_cookie_t xcb_ret
;
1831 xcb_randr_create_mode_request_t xcb_out
;
1833 xcb_out
.window
= window
;
1834 xcb_out
.mode_info
= mode_info
;
1836 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1837 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1838 xcb_parts
[3].iov_base
= 0;
1839 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1841 xcb_parts
[4].iov_base
= (char *) name
;
1842 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
1843 xcb_parts
[5].iov_base
= 0;
1844 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1846 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1850 xcb_randr_create_mode_cookie_t
1851 xcb_randr_create_mode_unchecked (xcb_connection_t
*c
/**< */,
1852 xcb_window_t window
/**< */,
1853 xcb_randr_mode_info_t mode_info
/**< */,
1854 uint32_t name_len
/**< */,
1855 const char *name
/**< */)
1857 static const xcb_protocol_request_t xcb_req
= {
1859 /* ext */ &xcb_randr_id
,
1860 /* opcode */ XCB_RANDR_CREATE_MODE
,
1864 struct iovec xcb_parts
[6];
1865 xcb_randr_create_mode_cookie_t xcb_ret
;
1866 xcb_randr_create_mode_request_t xcb_out
;
1868 xcb_out
.window
= window
;
1869 xcb_out
.mode_info
= mode_info
;
1871 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1872 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1873 xcb_parts
[3].iov_base
= 0;
1874 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1876 xcb_parts
[4].iov_base
= (char *) name
;
1877 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
1878 xcb_parts
[5].iov_base
= 0;
1879 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1881 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1885 xcb_randr_create_mode_reply_t
*
1886 xcb_randr_create_mode_reply (xcb_connection_t
*c
/**< */,
1887 xcb_randr_create_mode_cookie_t cookie
/**< */,
1888 xcb_generic_error_t
**e
/**< */)
1890 return (xcb_randr_create_mode_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1894 xcb_randr_destroy_mode_checked (xcb_connection_t
*c
/**< */,
1895 xcb_randr_mode_t mode
/**< */)
1897 static const xcb_protocol_request_t xcb_req
= {
1899 /* ext */ &xcb_randr_id
,
1900 /* opcode */ XCB_RANDR_DESTROY_MODE
,
1904 struct iovec xcb_parts
[4];
1905 xcb_void_cookie_t xcb_ret
;
1906 xcb_randr_destroy_mode_request_t xcb_out
;
1908 xcb_out
.mode
= mode
;
1910 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1911 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1912 xcb_parts
[3].iov_base
= 0;
1913 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1915 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1920 xcb_randr_destroy_mode (xcb_connection_t
*c
/**< */,
1921 xcb_randr_mode_t mode
/**< */)
1923 static const xcb_protocol_request_t xcb_req
= {
1925 /* ext */ &xcb_randr_id
,
1926 /* opcode */ XCB_RANDR_DESTROY_MODE
,
1930 struct iovec xcb_parts
[4];
1931 xcb_void_cookie_t xcb_ret
;
1932 xcb_randr_destroy_mode_request_t xcb_out
;
1934 xcb_out
.mode
= mode
;
1936 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1937 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1938 xcb_parts
[3].iov_base
= 0;
1939 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1941 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1946 xcb_randr_add_output_mode_checked (xcb_connection_t
*c
/**< */,
1947 xcb_randr_output_t output
/**< */,
1948 xcb_randr_mode_t mode
/**< */)
1950 static const xcb_protocol_request_t xcb_req
= {
1952 /* ext */ &xcb_randr_id
,
1953 /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE
,
1957 struct iovec xcb_parts
[4];
1958 xcb_void_cookie_t xcb_ret
;
1959 xcb_randr_add_output_mode_request_t xcb_out
;
1961 xcb_out
.output
= output
;
1962 xcb_out
.mode
= mode
;
1964 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1965 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1966 xcb_parts
[3].iov_base
= 0;
1967 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1969 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1974 xcb_randr_add_output_mode (xcb_connection_t
*c
/**< */,
1975 xcb_randr_output_t output
/**< */,
1976 xcb_randr_mode_t mode
/**< */)
1978 static const xcb_protocol_request_t xcb_req
= {
1980 /* ext */ &xcb_randr_id
,
1981 /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE
,
1985 struct iovec xcb_parts
[4];
1986 xcb_void_cookie_t xcb_ret
;
1987 xcb_randr_add_output_mode_request_t xcb_out
;
1989 xcb_out
.output
= output
;
1990 xcb_out
.mode
= mode
;
1992 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1993 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1994 xcb_parts
[3].iov_base
= 0;
1995 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1997 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2002 xcb_randr_delete_output_mode_checked (xcb_connection_t
*c
/**< */,
2003 xcb_randr_output_t output
/**< */,
2004 xcb_randr_mode_t mode
/**< */)
2006 static const xcb_protocol_request_t xcb_req
= {
2008 /* ext */ &xcb_randr_id
,
2009 /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE
,
2013 struct iovec xcb_parts
[4];
2014 xcb_void_cookie_t xcb_ret
;
2015 xcb_randr_delete_output_mode_request_t xcb_out
;
2017 xcb_out
.output
= output
;
2018 xcb_out
.mode
= mode
;
2020 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2021 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2022 xcb_parts
[3].iov_base
= 0;
2023 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2025 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2030 xcb_randr_delete_output_mode (xcb_connection_t
*c
/**< */,
2031 xcb_randr_output_t output
/**< */,
2032 xcb_randr_mode_t mode
/**< */)
2034 static const xcb_protocol_request_t xcb_req
= {
2036 /* ext */ &xcb_randr_id
,
2037 /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE
,
2041 struct iovec xcb_parts
[4];
2042 xcb_void_cookie_t xcb_ret
;
2043 xcb_randr_delete_output_mode_request_t xcb_out
;
2045 xcb_out
.output
= output
;
2046 xcb_out
.mode
= mode
;
2048 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2049 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2050 xcb_parts
[3].iov_base
= 0;
2051 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2053 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2058 xcb_randr_get_crtc_info_sizeof (const void *_buffer
/**< */)
2060 char *xcb_tmp
= (char *)_buffer
;
2061 const xcb_randr_get_crtc_info_reply_t
*_aux
= (xcb_randr_get_crtc_info_reply_t
*)_buffer
;
2062 unsigned int xcb_buffer_len
= 0;
2063 unsigned int xcb_block_len
= 0;
2064 unsigned int xcb_pad
= 0;
2065 unsigned int xcb_align_to
= 0;
2068 xcb_block_len
+= sizeof(xcb_randr_get_crtc_info_reply_t
);
2069 xcb_tmp
+= xcb_block_len
;
2070 xcb_buffer_len
+= xcb_block_len
;
2073 xcb_block_len
+= _aux
->num_outputs
* sizeof(xcb_randr_output_t
);
2074 xcb_tmp
+= xcb_block_len
;
2075 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
2076 /* insert padding */
2077 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2078 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2085 xcb_block_len
+= _aux
->num_possible_outputs
* sizeof(xcb_randr_output_t
);
2086 xcb_tmp
+= xcb_block_len
;
2087 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
2088 /* insert padding */
2089 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2090 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2097 return xcb_buffer_len
;
2100 xcb_randr_get_crtc_info_cookie_t
2101 xcb_randr_get_crtc_info (xcb_connection_t
*c
/**< */,
2102 xcb_randr_crtc_t crtc
/**< */,
2103 xcb_timestamp_t config_timestamp
/**< */)
2105 static const xcb_protocol_request_t xcb_req
= {
2107 /* ext */ &xcb_randr_id
,
2108 /* opcode */ XCB_RANDR_GET_CRTC_INFO
,
2112 struct iovec xcb_parts
[4];
2113 xcb_randr_get_crtc_info_cookie_t xcb_ret
;
2114 xcb_randr_get_crtc_info_request_t xcb_out
;
2116 xcb_out
.crtc
= crtc
;
2117 xcb_out
.config_timestamp
= config_timestamp
;
2119 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2120 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2121 xcb_parts
[3].iov_base
= 0;
2122 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2124 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2128 xcb_randr_get_crtc_info_cookie_t
2129 xcb_randr_get_crtc_info_unchecked (xcb_connection_t
*c
/**< */,
2130 xcb_randr_crtc_t crtc
/**< */,
2131 xcb_timestamp_t config_timestamp
/**< */)
2133 static const xcb_protocol_request_t xcb_req
= {
2135 /* ext */ &xcb_randr_id
,
2136 /* opcode */ XCB_RANDR_GET_CRTC_INFO
,
2140 struct iovec xcb_parts
[4];
2141 xcb_randr_get_crtc_info_cookie_t xcb_ret
;
2142 xcb_randr_get_crtc_info_request_t xcb_out
;
2144 xcb_out
.crtc
= crtc
;
2145 xcb_out
.config_timestamp
= config_timestamp
;
2147 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2148 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2149 xcb_parts
[3].iov_base
= 0;
2150 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2152 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2156 xcb_randr_output_t
*
2157 xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2159 return (xcb_randr_output_t
*) (R
+ 1);
2163 xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2165 return R
->num_outputs
;
2168 xcb_generic_iterator_t
2169 xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2171 xcb_generic_iterator_t i
;
2172 i
.data
= ((xcb_randr_output_t
*) (R
+ 1)) + (R
->num_outputs
);
2174 i
.index
= (char *) i
.data
- (char *) R
;
2178 xcb_randr_output_t
*
2179 xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2181 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_info_outputs_end(R
);
2182 return (xcb_randr_output_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_output_t
, prev
.index
) + 0);
2186 xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2188 return R
->num_possible_outputs
;
2191 xcb_generic_iterator_t
2192 xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t
*R
/**< */)
2194 xcb_generic_iterator_t i
;
2195 xcb_generic_iterator_t child
= xcb_randr_get_crtc_info_outputs_end(R
);
2196 i
.data
= ((xcb_randr_output_t
*) child
.data
) + (R
->num_possible_outputs
);
2198 i
.index
= (char *) i
.data
- (char *) R
;
2202 xcb_randr_get_crtc_info_reply_t
*
2203 xcb_randr_get_crtc_info_reply (xcb_connection_t
*c
/**< */,
2204 xcb_randr_get_crtc_info_cookie_t cookie
/**< */,
2205 xcb_generic_error_t
**e
/**< */)
2207 return (xcb_randr_get_crtc_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2211 xcb_randr_set_crtc_config_sizeof (const void *_buffer
/**< */,
2212 uint32_t outputs_len
/**< */)
2214 char *xcb_tmp
= (char *)_buffer
;
2215 unsigned int xcb_buffer_len
= 0;
2216 unsigned int xcb_block_len
= 0;
2217 unsigned int xcb_pad
= 0;
2218 unsigned int xcb_align_to
= 0;
2221 xcb_block_len
+= sizeof(xcb_randr_set_crtc_config_request_t
);
2222 xcb_tmp
+= xcb_block_len
;
2223 xcb_buffer_len
+= xcb_block_len
;
2226 xcb_block_len
+= outputs_len
* sizeof(xcb_randr_output_t
);
2227 xcb_tmp
+= xcb_block_len
;
2228 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
2229 /* insert padding */
2230 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2231 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2238 return xcb_buffer_len
;
2241 xcb_randr_set_crtc_config_cookie_t
2242 xcb_randr_set_crtc_config (xcb_connection_t
*c
/**< */,
2243 xcb_randr_crtc_t crtc
/**< */,
2244 xcb_timestamp_t timestamp
/**< */,
2245 xcb_timestamp_t config_timestamp
/**< */,
2248 xcb_randr_mode_t mode
/**< */,
2249 uint16_t rotation
/**< */,
2250 uint32_t outputs_len
/**< */,
2251 const xcb_randr_output_t
*outputs
/**< */)
2253 static const xcb_protocol_request_t xcb_req
= {
2255 /* ext */ &xcb_randr_id
,
2256 /* opcode */ XCB_RANDR_SET_CRTC_CONFIG
,
2260 struct iovec xcb_parts
[6];
2261 xcb_randr_set_crtc_config_cookie_t xcb_ret
;
2262 xcb_randr_set_crtc_config_request_t xcb_out
;
2264 xcb_out
.crtc
= crtc
;
2265 xcb_out
.timestamp
= timestamp
;
2266 xcb_out
.config_timestamp
= config_timestamp
;
2269 xcb_out
.mode
= mode
;
2270 xcb_out
.rotation
= rotation
;
2271 memset(xcb_out
.pad0
, 0, 2);
2273 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2274 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2275 xcb_parts
[3].iov_base
= 0;
2276 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2277 /* xcb_randr_output_t outputs */
2278 xcb_parts
[4].iov_base
= (char *) outputs
;
2279 xcb_parts
[4].iov_len
= outputs_len
* sizeof(xcb_timestamp_t
);
2280 xcb_parts
[5].iov_base
= 0;
2281 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2283 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2287 xcb_randr_set_crtc_config_cookie_t
2288 xcb_randr_set_crtc_config_unchecked (xcb_connection_t
*c
/**< */,
2289 xcb_randr_crtc_t crtc
/**< */,
2290 xcb_timestamp_t timestamp
/**< */,
2291 xcb_timestamp_t config_timestamp
/**< */,
2294 xcb_randr_mode_t mode
/**< */,
2295 uint16_t rotation
/**< */,
2296 uint32_t outputs_len
/**< */,
2297 const xcb_randr_output_t
*outputs
/**< */)
2299 static const xcb_protocol_request_t xcb_req
= {
2301 /* ext */ &xcb_randr_id
,
2302 /* opcode */ XCB_RANDR_SET_CRTC_CONFIG
,
2306 struct iovec xcb_parts
[6];
2307 xcb_randr_set_crtc_config_cookie_t xcb_ret
;
2308 xcb_randr_set_crtc_config_request_t xcb_out
;
2310 xcb_out
.crtc
= crtc
;
2311 xcb_out
.timestamp
= timestamp
;
2312 xcb_out
.config_timestamp
= config_timestamp
;
2315 xcb_out
.mode
= mode
;
2316 xcb_out
.rotation
= rotation
;
2317 memset(xcb_out
.pad0
, 0, 2);
2319 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2320 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2321 xcb_parts
[3].iov_base
= 0;
2322 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2323 /* xcb_randr_output_t outputs */
2324 xcb_parts
[4].iov_base
= (char *) outputs
;
2325 xcb_parts
[4].iov_len
= outputs_len
* sizeof(xcb_timestamp_t
);
2326 xcb_parts
[5].iov_base
= 0;
2327 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2329 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2333 xcb_randr_set_crtc_config_reply_t
*
2334 xcb_randr_set_crtc_config_reply (xcb_connection_t
*c
/**< */,
2335 xcb_randr_set_crtc_config_cookie_t cookie
/**< */,
2336 xcb_generic_error_t
**e
/**< */)
2338 return (xcb_randr_set_crtc_config_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2341 xcb_randr_get_crtc_gamma_size_cookie_t
2342 xcb_randr_get_crtc_gamma_size (xcb_connection_t
*c
/**< */,
2343 xcb_randr_crtc_t crtc
/**< */)
2345 static const xcb_protocol_request_t xcb_req
= {
2347 /* ext */ &xcb_randr_id
,
2348 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE
,
2352 struct iovec xcb_parts
[4];
2353 xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret
;
2354 xcb_randr_get_crtc_gamma_size_request_t xcb_out
;
2356 xcb_out
.crtc
= crtc
;
2358 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2359 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2360 xcb_parts
[3].iov_base
= 0;
2361 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2363 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2367 xcb_randr_get_crtc_gamma_size_cookie_t
2368 xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t
*c
/**< */,
2369 xcb_randr_crtc_t crtc
/**< */)
2371 static const xcb_protocol_request_t xcb_req
= {
2373 /* ext */ &xcb_randr_id
,
2374 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE
,
2378 struct iovec xcb_parts
[4];
2379 xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret
;
2380 xcb_randr_get_crtc_gamma_size_request_t xcb_out
;
2382 xcb_out
.crtc
= crtc
;
2384 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2385 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2386 xcb_parts
[3].iov_base
= 0;
2387 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2389 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2393 xcb_randr_get_crtc_gamma_size_reply_t
*
2394 xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t
*c
/**< */,
2395 xcb_randr_get_crtc_gamma_size_cookie_t cookie
/**< */,
2396 xcb_generic_error_t
**e
/**< */)
2398 return (xcb_randr_get_crtc_gamma_size_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2402 xcb_randr_get_crtc_gamma_sizeof (const void *_buffer
/**< */)
2404 char *xcb_tmp
= (char *)_buffer
;
2405 const xcb_randr_get_crtc_gamma_reply_t
*_aux
= (xcb_randr_get_crtc_gamma_reply_t
*)_buffer
;
2406 unsigned int xcb_buffer_len
= 0;
2407 unsigned int xcb_block_len
= 0;
2408 unsigned int xcb_pad
= 0;
2409 unsigned int xcb_align_to
= 0;
2412 xcb_block_len
+= sizeof(xcb_randr_get_crtc_gamma_reply_t
);
2413 xcb_tmp
+= xcb_block_len
;
2414 xcb_buffer_len
+= xcb_block_len
;
2417 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2418 xcb_tmp
+= xcb_block_len
;
2419 xcb_align_to
= ALIGNOF(uint16_t);
2420 /* insert padding */
2421 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2422 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2429 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2430 xcb_tmp
+= xcb_block_len
;
2431 xcb_align_to
= ALIGNOF(uint16_t);
2432 /* insert padding */
2433 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2434 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2441 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2442 xcb_tmp
+= xcb_block_len
;
2443 xcb_align_to
= ALIGNOF(uint16_t);
2444 /* insert padding */
2445 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2446 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2453 return xcb_buffer_len
;
2456 xcb_randr_get_crtc_gamma_cookie_t
2457 xcb_randr_get_crtc_gamma (xcb_connection_t
*c
/**< */,
2458 xcb_randr_crtc_t crtc
/**< */)
2460 static const xcb_protocol_request_t xcb_req
= {
2462 /* ext */ &xcb_randr_id
,
2463 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA
,
2467 struct iovec xcb_parts
[4];
2468 xcb_randr_get_crtc_gamma_cookie_t xcb_ret
;
2469 xcb_randr_get_crtc_gamma_request_t xcb_out
;
2471 xcb_out
.crtc
= crtc
;
2473 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2474 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2475 xcb_parts
[3].iov_base
= 0;
2476 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2478 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2482 xcb_randr_get_crtc_gamma_cookie_t
2483 xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t
*c
/**< */,
2484 xcb_randr_crtc_t crtc
/**< */)
2486 static const xcb_protocol_request_t xcb_req
= {
2488 /* ext */ &xcb_randr_id
,
2489 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA
,
2493 struct iovec xcb_parts
[4];
2494 xcb_randr_get_crtc_gamma_cookie_t xcb_ret
;
2495 xcb_randr_get_crtc_gamma_request_t xcb_out
;
2497 xcb_out
.crtc
= crtc
;
2499 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2500 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2501 xcb_parts
[3].iov_base
= 0;
2502 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2504 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2509 xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2511 return (uint16_t *) (R
+ 1);
2515 xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2520 xcb_generic_iterator_t
2521 xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2523 xcb_generic_iterator_t i
;
2524 i
.data
= ((uint16_t *) (R
+ 1)) + (R
->size
);
2526 i
.index
= (char *) i
.data
- (char *) R
;
2531 xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2533 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_gamma_red_end(R
);
2534 return (uint16_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint16_t, prev
.index
) + 0);
2538 xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2543 xcb_generic_iterator_t
2544 xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2546 xcb_generic_iterator_t i
;
2547 xcb_generic_iterator_t child
= xcb_randr_get_crtc_gamma_red_end(R
);
2548 i
.data
= ((uint16_t *) child
.data
) + (R
->size
);
2550 i
.index
= (char *) i
.data
- (char *) R
;
2555 xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2557 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_gamma_green_end(R
);
2558 return (uint16_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint16_t, prev
.index
) + 0);
2562 xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2567 xcb_generic_iterator_t
2568 xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t
*R
/**< */)
2570 xcb_generic_iterator_t i
;
2571 xcb_generic_iterator_t child
= xcb_randr_get_crtc_gamma_green_end(R
);
2572 i
.data
= ((uint16_t *) child
.data
) + (R
->size
);
2574 i
.index
= (char *) i
.data
- (char *) R
;
2578 xcb_randr_get_crtc_gamma_reply_t
*
2579 xcb_randr_get_crtc_gamma_reply (xcb_connection_t
*c
/**< */,
2580 xcb_randr_get_crtc_gamma_cookie_t cookie
/**< */,
2581 xcb_generic_error_t
**e
/**< */)
2583 return (xcb_randr_get_crtc_gamma_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2587 xcb_randr_set_crtc_gamma_sizeof (const void *_buffer
/**< */)
2589 char *xcb_tmp
= (char *)_buffer
;
2590 const xcb_randr_set_crtc_gamma_request_t
*_aux
= (xcb_randr_set_crtc_gamma_request_t
*)_buffer
;
2591 unsigned int xcb_buffer_len
= 0;
2592 unsigned int xcb_block_len
= 0;
2593 unsigned int xcb_pad
= 0;
2594 unsigned int xcb_align_to
= 0;
2597 xcb_block_len
+= sizeof(xcb_randr_set_crtc_gamma_request_t
);
2598 xcb_tmp
+= xcb_block_len
;
2599 xcb_buffer_len
+= xcb_block_len
;
2602 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2603 xcb_tmp
+= xcb_block_len
;
2604 xcb_align_to
= ALIGNOF(uint16_t);
2605 /* insert padding */
2606 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2607 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2614 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2615 xcb_tmp
+= xcb_block_len
;
2616 xcb_align_to
= ALIGNOF(uint16_t);
2617 /* insert padding */
2618 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2619 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2626 xcb_block_len
+= _aux
->size
* sizeof(uint16_t);
2627 xcb_tmp
+= xcb_block_len
;
2628 xcb_align_to
= ALIGNOF(uint16_t);
2629 /* insert padding */
2630 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2631 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2638 return xcb_buffer_len
;
2642 xcb_randr_set_crtc_gamma_checked (xcb_connection_t
*c
/**< */,
2643 xcb_randr_crtc_t crtc
/**< */,
2644 uint16_t size
/**< */,
2645 const uint16_t *red
/**< */,
2646 const uint16_t *green
/**< */,
2647 const uint16_t *blue
/**< */)
2649 static const xcb_protocol_request_t xcb_req
= {
2651 /* ext */ &xcb_randr_id
,
2652 /* opcode */ XCB_RANDR_SET_CRTC_GAMMA
,
2656 struct iovec xcb_parts
[10];
2657 xcb_void_cookie_t xcb_ret
;
2658 xcb_randr_set_crtc_gamma_request_t xcb_out
;
2660 xcb_out
.crtc
= crtc
;
2661 xcb_out
.size
= size
;
2662 memset(xcb_out
.pad0
, 0, 2);
2664 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2665 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2666 xcb_parts
[3].iov_base
= 0;
2667 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2669 xcb_parts
[4].iov_base
= (char *) red
;
2670 xcb_parts
[4].iov_len
= size
* sizeof(uint16_t);
2671 xcb_parts
[5].iov_base
= 0;
2672 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2673 /* uint16_t green */
2674 xcb_parts
[6].iov_base
= (char *) green
;
2675 xcb_parts
[6].iov_len
= size
* sizeof(uint16_t);
2676 xcb_parts
[7].iov_base
= 0;
2677 xcb_parts
[7].iov_len
= -xcb_parts
[6].iov_len
& 3;
2679 xcb_parts
[8].iov_base
= (char *) blue
;
2680 xcb_parts
[8].iov_len
= size
* sizeof(uint16_t);
2681 xcb_parts
[9].iov_base
= 0;
2682 xcb_parts
[9].iov_len
= -xcb_parts
[8].iov_len
& 3;
2684 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2689 xcb_randr_set_crtc_gamma (xcb_connection_t
*c
/**< */,
2690 xcb_randr_crtc_t crtc
/**< */,
2691 uint16_t size
/**< */,
2692 const uint16_t *red
/**< */,
2693 const uint16_t *green
/**< */,
2694 const uint16_t *blue
/**< */)
2696 static const xcb_protocol_request_t xcb_req
= {
2698 /* ext */ &xcb_randr_id
,
2699 /* opcode */ XCB_RANDR_SET_CRTC_GAMMA
,
2703 struct iovec xcb_parts
[10];
2704 xcb_void_cookie_t xcb_ret
;
2705 xcb_randr_set_crtc_gamma_request_t xcb_out
;
2707 xcb_out
.crtc
= crtc
;
2708 xcb_out
.size
= size
;
2709 memset(xcb_out
.pad0
, 0, 2);
2711 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2712 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2713 xcb_parts
[3].iov_base
= 0;
2714 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2716 xcb_parts
[4].iov_base
= (char *) red
;
2717 xcb_parts
[4].iov_len
= size
* sizeof(uint16_t);
2718 xcb_parts
[5].iov_base
= 0;
2719 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2720 /* uint16_t green */
2721 xcb_parts
[6].iov_base
= (char *) green
;
2722 xcb_parts
[6].iov_len
= size
* sizeof(uint16_t);
2723 xcb_parts
[7].iov_base
= 0;
2724 xcb_parts
[7].iov_len
= -xcb_parts
[6].iov_len
& 3;
2726 xcb_parts
[8].iov_base
= (char *) blue
;
2727 xcb_parts
[8].iov_len
= size
* sizeof(uint16_t);
2728 xcb_parts
[9].iov_base
= 0;
2729 xcb_parts
[9].iov_len
= -xcb_parts
[8].iov_len
& 3;
2731 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2736 xcb_randr_get_screen_resources_current_sizeof (const void *_buffer
/**< */)
2738 char *xcb_tmp
= (char *)_buffer
;
2739 const xcb_randr_get_screen_resources_current_reply_t
*_aux
= (xcb_randr_get_screen_resources_current_reply_t
*)_buffer
;
2740 unsigned int xcb_buffer_len
= 0;
2741 unsigned int xcb_block_len
= 0;
2742 unsigned int xcb_pad
= 0;
2743 unsigned int xcb_align_to
= 0;
2746 xcb_block_len
+= sizeof(xcb_randr_get_screen_resources_current_reply_t
);
2747 xcb_tmp
+= xcb_block_len
;
2748 xcb_buffer_len
+= xcb_block_len
;
2751 xcb_block_len
+= _aux
->num_crtcs
* sizeof(uint32_t);
2752 xcb_tmp
+= xcb_block_len
;
2753 xcb_align_to
= ALIGNOF(xcb_randr_crtc_t
);
2754 /* insert padding */
2755 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2756 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2763 xcb_block_len
+= _aux
->num_outputs
* sizeof(uint32_t);
2764 xcb_tmp
+= xcb_block_len
;
2765 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
2766 /* insert padding */
2767 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2768 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2775 xcb_block_len
+= _aux
->num_modes
* sizeof(xcb_randr_mode_info_t
);
2776 xcb_tmp
+= xcb_block_len
;
2777 xcb_align_to
= ALIGNOF(xcb_randr_mode_info_t
);
2778 /* insert padding */
2779 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2780 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2787 xcb_block_len
+= _aux
->names_len
* sizeof(uint8_t);
2788 xcb_tmp
+= xcb_block_len
;
2789 xcb_align_to
= ALIGNOF(uint8_t);
2790 /* insert padding */
2791 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2792 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2799 return xcb_buffer_len
;
2802 xcb_randr_get_screen_resources_current_cookie_t
2803 xcb_randr_get_screen_resources_current (xcb_connection_t
*c
/**< */,
2804 xcb_window_t window
/**< */)
2806 static const xcb_protocol_request_t xcb_req
= {
2808 /* ext */ &xcb_randr_id
,
2809 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT
,
2813 struct iovec xcb_parts
[4];
2814 xcb_randr_get_screen_resources_current_cookie_t xcb_ret
;
2815 xcb_randr_get_screen_resources_current_request_t xcb_out
;
2817 xcb_out
.window
= window
;
2819 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2820 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2821 xcb_parts
[3].iov_base
= 0;
2822 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2824 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2828 xcb_randr_get_screen_resources_current_cookie_t
2829 xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t
*c
/**< */,
2830 xcb_window_t window
/**< */)
2832 static const xcb_protocol_request_t xcb_req
= {
2834 /* ext */ &xcb_randr_id
,
2835 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT
,
2839 struct iovec xcb_parts
[4];
2840 xcb_randr_get_screen_resources_current_cookie_t xcb_ret
;
2841 xcb_randr_get_screen_resources_current_request_t xcb_out
;
2843 xcb_out
.window
= window
;
2845 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2846 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2847 xcb_parts
[3].iov_base
= 0;
2848 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2850 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2855 xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2857 return (xcb_randr_crtc_t
*) (R
+ 1);
2861 xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2863 return R
->num_crtcs
;
2866 xcb_generic_iterator_t
2867 xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2869 xcb_generic_iterator_t i
;
2870 i
.data
= ((xcb_randr_crtc_t
*) (R
+ 1)) + (R
->num_crtcs
);
2872 i
.index
= (char *) i
.data
- (char *) R
;
2876 xcb_randr_output_t
*
2877 xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2879 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_current_crtcs_end(R
);
2880 return (xcb_randr_output_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_output_t
, prev
.index
) + 0);
2884 xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2886 return R
->num_outputs
;
2889 xcb_generic_iterator_t
2890 xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2892 xcb_generic_iterator_t i
;
2893 xcb_generic_iterator_t child
= xcb_randr_get_screen_resources_current_crtcs_end(R
);
2894 i
.data
= ((xcb_randr_output_t
*) child
.data
) + (R
->num_outputs
);
2896 i
.index
= (char *) i
.data
- (char *) R
;
2900 xcb_randr_mode_info_t
*
2901 xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2903 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_current_outputs_end(R
);
2904 return (xcb_randr_mode_info_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_mode_info_t
, prev
.index
) + 0);
2908 xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2910 return R
->num_modes
;
2913 xcb_randr_mode_info_iterator_t
2914 xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2916 xcb_randr_mode_info_iterator_t i
;
2917 xcb_generic_iterator_t prev
= xcb_randr_get_screen_resources_current_outputs_end(R
);
2918 i
.data
= (xcb_randr_mode_info_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_mode_info_t
, prev
.index
));
2919 i
.rem
= R
->num_modes
;
2920 i
.index
= (char *) i
.data
- (char *) R
;
2925 xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2927 xcb_generic_iterator_t prev
= xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R
));
2928 return (uint8_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint8_t, prev
.index
) + 0);
2932 xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2934 return R
->names_len
;
2937 xcb_generic_iterator_t
2938 xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t
*R
/**< */)
2940 xcb_generic_iterator_t i
;
2941 xcb_generic_iterator_t child
= xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R
));
2942 i
.data
= ((uint8_t *) child
.data
) + (R
->names_len
);
2944 i
.index
= (char *) i
.data
- (char *) R
;
2948 xcb_randr_get_screen_resources_current_reply_t
*
2949 xcb_randr_get_screen_resources_current_reply (xcb_connection_t
*c
/**< */,
2950 xcb_randr_get_screen_resources_current_cookie_t cookie
/**< */,
2951 xcb_generic_error_t
**e
/**< */)
2953 return (xcb_randr_get_screen_resources_current_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2957 xcb_randr_set_crtc_transform_sizeof (const void *_buffer
/**< */,
2958 uint32_t filter_params_len
/**< */)
2960 char *xcb_tmp
= (char *)_buffer
;
2961 const xcb_randr_set_crtc_transform_request_t
*_aux
= (xcb_randr_set_crtc_transform_request_t
*)_buffer
;
2962 unsigned int xcb_buffer_len
= 0;
2963 unsigned int xcb_block_len
= 0;
2964 unsigned int xcb_pad
= 0;
2965 unsigned int xcb_align_to
= 0;
2968 xcb_block_len
+= sizeof(xcb_randr_set_crtc_transform_request_t
);
2969 xcb_tmp
+= xcb_block_len
;
2970 xcb_buffer_len
+= xcb_block_len
;
2973 xcb_block_len
+= _aux
->filter_len
* sizeof(char);
2974 xcb_tmp
+= xcb_block_len
;
2975 xcb_align_to
= ALIGNOF(char);
2976 /* insert padding */
2977 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2978 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2985 xcb_block_len
+= filter_params_len
* sizeof(xcb_render_fixed_t
);
2986 xcb_tmp
+= xcb_block_len
;
2987 xcb_align_to
= ALIGNOF(xcb_render_fixed_t
);
2988 /* insert padding */
2989 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2990 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2997 return xcb_buffer_len
;
3001 xcb_randr_set_crtc_transform_checked (xcb_connection_t
*c
/**< */,
3002 xcb_randr_crtc_t crtc
/**< */,
3003 xcb_render_transform_t transform
/**< */,
3004 uint16_t filter_len
/**< */,
3005 const char *filter_name
/**< */,
3006 uint32_t filter_params_len
/**< */,
3007 const xcb_render_fixed_t
*filter_params
/**< */)
3009 static const xcb_protocol_request_t xcb_req
= {
3011 /* ext */ &xcb_randr_id
,
3012 /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM
,
3016 struct iovec xcb_parts
[8];
3017 xcb_void_cookie_t xcb_ret
;
3018 xcb_randr_set_crtc_transform_request_t xcb_out
;
3020 xcb_out
.crtc
= crtc
;
3021 xcb_out
.transform
= transform
;
3022 xcb_out
.filter_len
= filter_len
;
3023 memset(xcb_out
.pad0
, 0, 2);
3025 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3026 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3027 xcb_parts
[3].iov_base
= 0;
3028 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3029 /* char filter_name */
3030 xcb_parts
[4].iov_base
= (char *) filter_name
;
3031 xcb_parts
[4].iov_len
= filter_len
* sizeof(char);
3032 xcb_parts
[5].iov_base
= 0;
3033 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
3034 /* xcb_render_fixed_t filter_params */
3035 xcb_parts
[6].iov_base
= (char *) filter_params
;
3036 xcb_parts
[6].iov_len
= filter_params_len
* sizeof(xcb_render_fixed_t
);
3037 xcb_parts
[7].iov_base
= 0;
3038 xcb_parts
[7].iov_len
= -xcb_parts
[6].iov_len
& 3;
3040 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3045 xcb_randr_set_crtc_transform (xcb_connection_t
*c
/**< */,
3046 xcb_randr_crtc_t crtc
/**< */,
3047 xcb_render_transform_t transform
/**< */,
3048 uint16_t filter_len
/**< */,
3049 const char *filter_name
/**< */,
3050 uint32_t filter_params_len
/**< */,
3051 const xcb_render_fixed_t
*filter_params
/**< */)
3053 static const xcb_protocol_request_t xcb_req
= {
3055 /* ext */ &xcb_randr_id
,
3056 /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM
,
3060 struct iovec xcb_parts
[8];
3061 xcb_void_cookie_t xcb_ret
;
3062 xcb_randr_set_crtc_transform_request_t xcb_out
;
3064 xcb_out
.crtc
= crtc
;
3065 xcb_out
.transform
= transform
;
3066 xcb_out
.filter_len
= filter_len
;
3067 memset(xcb_out
.pad0
, 0, 2);
3069 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3070 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3071 xcb_parts
[3].iov_base
= 0;
3072 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3073 /* char filter_name */
3074 xcb_parts
[4].iov_base
= (char *) filter_name
;
3075 xcb_parts
[4].iov_len
= filter_len
* sizeof(char);
3076 xcb_parts
[5].iov_base
= 0;
3077 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
3078 /* xcb_render_fixed_t filter_params */
3079 xcb_parts
[6].iov_base
= (char *) filter_params
;
3080 xcb_parts
[6].iov_len
= filter_params_len
* sizeof(xcb_render_fixed_t
);
3081 xcb_parts
[7].iov_base
= 0;
3082 xcb_parts
[7].iov_len
= -xcb_parts
[6].iov_len
& 3;
3084 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3089 xcb_randr_get_crtc_transform_sizeof (const void *_buffer
/**< */)
3091 char *xcb_tmp
= (char *)_buffer
;
3092 const xcb_randr_get_crtc_transform_reply_t
*_aux
= (xcb_randr_get_crtc_transform_reply_t
*)_buffer
;
3093 unsigned int xcb_buffer_len
= 0;
3094 unsigned int xcb_block_len
= 0;
3095 unsigned int xcb_pad
= 0;
3096 unsigned int xcb_align_to
= 0;
3099 xcb_block_len
+= sizeof(xcb_randr_get_crtc_transform_reply_t
);
3100 xcb_tmp
+= xcb_block_len
;
3101 xcb_buffer_len
+= xcb_block_len
;
3103 /* pending_filter_name */
3104 xcb_block_len
+= _aux
->pending_len
* sizeof(char);
3105 xcb_tmp
+= xcb_block_len
;
3106 xcb_align_to
= ALIGNOF(char);
3107 /* insert padding */
3108 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3109 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3115 /* pending_params */
3116 xcb_block_len
+= _aux
->pending_nparams
* sizeof(xcb_render_fixed_t
);
3117 xcb_tmp
+= xcb_block_len
;
3118 xcb_align_to
= ALIGNOF(xcb_render_fixed_t
);
3119 /* insert padding */
3120 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3121 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3127 /* current_filter_name */
3128 xcb_block_len
+= _aux
->current_len
* sizeof(char);
3129 xcb_tmp
+= xcb_block_len
;
3130 xcb_align_to
= ALIGNOF(char);
3131 /* insert padding */
3132 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3133 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3139 /* current_params */
3140 xcb_block_len
+= _aux
->current_nparams
* sizeof(xcb_render_fixed_t
);
3141 xcb_tmp
+= xcb_block_len
;
3142 xcb_align_to
= ALIGNOF(xcb_render_fixed_t
);
3143 /* insert padding */
3144 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3145 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3152 return xcb_buffer_len
;
3155 xcb_randr_get_crtc_transform_cookie_t
3156 xcb_randr_get_crtc_transform (xcb_connection_t
*c
/**< */,
3157 xcb_randr_crtc_t crtc
/**< */)
3159 static const xcb_protocol_request_t xcb_req
= {
3161 /* ext */ &xcb_randr_id
,
3162 /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM
,
3166 struct iovec xcb_parts
[4];
3167 xcb_randr_get_crtc_transform_cookie_t xcb_ret
;
3168 xcb_randr_get_crtc_transform_request_t xcb_out
;
3170 xcb_out
.crtc
= crtc
;
3172 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3173 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3174 xcb_parts
[3].iov_base
= 0;
3175 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3177 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3181 xcb_randr_get_crtc_transform_cookie_t
3182 xcb_randr_get_crtc_transform_unchecked (xcb_connection_t
*c
/**< */,
3183 xcb_randr_crtc_t crtc
/**< */)
3185 static const xcb_protocol_request_t xcb_req
= {
3187 /* ext */ &xcb_randr_id
,
3188 /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM
,
3192 struct iovec xcb_parts
[4];
3193 xcb_randr_get_crtc_transform_cookie_t xcb_ret
;
3194 xcb_randr_get_crtc_transform_request_t xcb_out
;
3196 xcb_out
.crtc
= crtc
;
3198 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3199 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3200 xcb_parts
[3].iov_base
= 0;
3201 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3203 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3208 xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3210 return (char *) (R
+ 1);
3214 xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3216 return R
->pending_len
;
3219 xcb_generic_iterator_t
3220 xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3222 xcb_generic_iterator_t i
;
3223 i
.data
= ((char *) (R
+ 1)) + (R
->pending_len
);
3225 i
.index
= (char *) i
.data
- (char *) R
;
3229 xcb_render_fixed_t
*
3230 xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3232 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_transform_pending_filter_name_end(R
);
3233 return (xcb_render_fixed_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_render_fixed_t
, prev
.index
) + 0);
3237 xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3239 return R
->pending_nparams
;
3242 xcb_generic_iterator_t
3243 xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3245 xcb_generic_iterator_t i
;
3246 xcb_generic_iterator_t child
= xcb_randr_get_crtc_transform_pending_filter_name_end(R
);
3247 i
.data
= ((xcb_render_fixed_t
*) child
.data
) + (R
->pending_nparams
);
3249 i
.index
= (char *) i
.data
- (char *) R
;
3254 xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3256 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_transform_pending_params_end(R
);
3257 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
3261 xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3263 return R
->current_len
;
3266 xcb_generic_iterator_t
3267 xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3269 xcb_generic_iterator_t i
;
3270 xcb_generic_iterator_t child
= xcb_randr_get_crtc_transform_pending_params_end(R
);
3271 i
.data
= ((char *) child
.data
) + (R
->current_len
);
3273 i
.index
= (char *) i
.data
- (char *) R
;
3277 xcb_render_fixed_t
*
3278 xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3280 xcb_generic_iterator_t prev
= xcb_randr_get_crtc_transform_current_filter_name_end(R
);
3281 return (xcb_render_fixed_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_render_fixed_t
, prev
.index
) + 0);
3285 xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3287 return R
->current_nparams
;
3290 xcb_generic_iterator_t
3291 xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t
*R
/**< */)
3293 xcb_generic_iterator_t i
;
3294 xcb_generic_iterator_t child
= xcb_randr_get_crtc_transform_current_filter_name_end(R
);
3295 i
.data
= ((xcb_render_fixed_t
*) child
.data
) + (R
->current_nparams
);
3297 i
.index
= (char *) i
.data
- (char *) R
;
3301 xcb_randr_get_crtc_transform_reply_t
*
3302 xcb_randr_get_crtc_transform_reply (xcb_connection_t
*c
/**< */,
3303 xcb_randr_get_crtc_transform_cookie_t cookie
/**< */,
3304 xcb_generic_error_t
**e
/**< */)
3306 return (xcb_randr_get_crtc_transform_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3309 xcb_randr_get_panning_cookie_t
3310 xcb_randr_get_panning (xcb_connection_t
*c
/**< */,
3311 xcb_randr_crtc_t crtc
/**< */)
3313 static const xcb_protocol_request_t xcb_req
= {
3315 /* ext */ &xcb_randr_id
,
3316 /* opcode */ XCB_RANDR_GET_PANNING
,
3320 struct iovec xcb_parts
[4];
3321 xcb_randr_get_panning_cookie_t xcb_ret
;
3322 xcb_randr_get_panning_request_t xcb_out
;
3324 xcb_out
.crtc
= crtc
;
3326 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3327 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3328 xcb_parts
[3].iov_base
= 0;
3329 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3331 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3335 xcb_randr_get_panning_cookie_t
3336 xcb_randr_get_panning_unchecked (xcb_connection_t
*c
/**< */,
3337 xcb_randr_crtc_t crtc
/**< */)
3339 static const xcb_protocol_request_t xcb_req
= {
3341 /* ext */ &xcb_randr_id
,
3342 /* opcode */ XCB_RANDR_GET_PANNING
,
3346 struct iovec xcb_parts
[4];
3347 xcb_randr_get_panning_cookie_t xcb_ret
;
3348 xcb_randr_get_panning_request_t xcb_out
;
3350 xcb_out
.crtc
= crtc
;
3352 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3353 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3354 xcb_parts
[3].iov_base
= 0;
3355 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3357 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3361 xcb_randr_get_panning_reply_t
*
3362 xcb_randr_get_panning_reply (xcb_connection_t
*c
/**< */,
3363 xcb_randr_get_panning_cookie_t cookie
/**< */,
3364 xcb_generic_error_t
**e
/**< */)
3366 return (xcb_randr_get_panning_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3369 xcb_randr_set_panning_cookie_t
3370 xcb_randr_set_panning (xcb_connection_t
*c
/**< */,
3371 xcb_randr_crtc_t crtc
/**< */,
3372 xcb_timestamp_t timestamp
/**< */,
3373 uint16_t left
/**< */,
3374 uint16_t top
/**< */,
3375 uint16_t width
/**< */,
3376 uint16_t height
/**< */,
3377 uint16_t track_left
/**< */,
3378 uint16_t track_top
/**< */,
3379 uint16_t track_width
/**< */,
3380 uint16_t track_height
/**< */,
3381 int16_t border_left
/**< */,
3382 int16_t border_top
/**< */,
3383 int16_t border_right
/**< */,
3384 int16_t border_bottom
/**< */)
3386 static const xcb_protocol_request_t xcb_req
= {
3388 /* ext */ &xcb_randr_id
,
3389 /* opcode */ XCB_RANDR_SET_PANNING
,
3393 struct iovec xcb_parts
[4];
3394 xcb_randr_set_panning_cookie_t xcb_ret
;
3395 xcb_randr_set_panning_request_t xcb_out
;
3397 xcb_out
.crtc
= crtc
;
3398 xcb_out
.timestamp
= timestamp
;
3399 xcb_out
.left
= left
;
3401 xcb_out
.width
= width
;
3402 xcb_out
.height
= height
;
3403 xcb_out
.track_left
= track_left
;
3404 xcb_out
.track_top
= track_top
;
3405 xcb_out
.track_width
= track_width
;
3406 xcb_out
.track_height
= track_height
;
3407 xcb_out
.border_left
= border_left
;
3408 xcb_out
.border_top
= border_top
;
3409 xcb_out
.border_right
= border_right
;
3410 xcb_out
.border_bottom
= border_bottom
;
3412 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3413 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3414 xcb_parts
[3].iov_base
= 0;
3415 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3417 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3421 xcb_randr_set_panning_cookie_t
3422 xcb_randr_set_panning_unchecked (xcb_connection_t
*c
/**< */,
3423 xcb_randr_crtc_t crtc
/**< */,
3424 xcb_timestamp_t timestamp
/**< */,
3425 uint16_t left
/**< */,
3426 uint16_t top
/**< */,
3427 uint16_t width
/**< */,
3428 uint16_t height
/**< */,
3429 uint16_t track_left
/**< */,
3430 uint16_t track_top
/**< */,
3431 uint16_t track_width
/**< */,
3432 uint16_t track_height
/**< */,
3433 int16_t border_left
/**< */,
3434 int16_t border_top
/**< */,
3435 int16_t border_right
/**< */,
3436 int16_t border_bottom
/**< */)
3438 static const xcb_protocol_request_t xcb_req
= {
3440 /* ext */ &xcb_randr_id
,
3441 /* opcode */ XCB_RANDR_SET_PANNING
,
3445 struct iovec xcb_parts
[4];
3446 xcb_randr_set_panning_cookie_t xcb_ret
;
3447 xcb_randr_set_panning_request_t xcb_out
;
3449 xcb_out
.crtc
= crtc
;
3450 xcb_out
.timestamp
= timestamp
;
3451 xcb_out
.left
= left
;
3453 xcb_out
.width
= width
;
3454 xcb_out
.height
= height
;
3455 xcb_out
.track_left
= track_left
;
3456 xcb_out
.track_top
= track_top
;
3457 xcb_out
.track_width
= track_width
;
3458 xcb_out
.track_height
= track_height
;
3459 xcb_out
.border_left
= border_left
;
3460 xcb_out
.border_top
= border_top
;
3461 xcb_out
.border_right
= border_right
;
3462 xcb_out
.border_bottom
= border_bottom
;
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;
3469 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3473 xcb_randr_set_panning_reply_t
*
3474 xcb_randr_set_panning_reply (xcb_connection_t
*c
/**< */,
3475 xcb_randr_set_panning_cookie_t cookie
/**< */,
3476 xcb_generic_error_t
**e
/**< */)
3478 return (xcb_randr_set_panning_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3482 xcb_randr_set_output_primary_checked (xcb_connection_t
*c
/**< */,
3483 xcb_window_t window
/**< */,
3484 xcb_randr_output_t output
/**< */)
3486 static const xcb_protocol_request_t xcb_req
= {
3488 /* ext */ &xcb_randr_id
,
3489 /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY
,
3493 struct iovec xcb_parts
[4];
3494 xcb_void_cookie_t xcb_ret
;
3495 xcb_randr_set_output_primary_request_t xcb_out
;
3497 xcb_out
.window
= window
;
3498 xcb_out
.output
= output
;
3500 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3501 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3502 xcb_parts
[3].iov_base
= 0;
3503 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3505 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3510 xcb_randr_set_output_primary (xcb_connection_t
*c
/**< */,
3511 xcb_window_t window
/**< */,
3512 xcb_randr_output_t output
/**< */)
3514 static const xcb_protocol_request_t xcb_req
= {
3516 /* ext */ &xcb_randr_id
,
3517 /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY
,
3521 struct iovec xcb_parts
[4];
3522 xcb_void_cookie_t xcb_ret
;
3523 xcb_randr_set_output_primary_request_t xcb_out
;
3525 xcb_out
.window
= window
;
3526 xcb_out
.output
= output
;
3528 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3529 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3530 xcb_parts
[3].iov_base
= 0;
3531 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3533 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3537 xcb_randr_get_output_primary_cookie_t
3538 xcb_randr_get_output_primary (xcb_connection_t
*c
/**< */,
3539 xcb_window_t window
/**< */)
3541 static const xcb_protocol_request_t xcb_req
= {
3543 /* ext */ &xcb_randr_id
,
3544 /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY
,
3548 struct iovec xcb_parts
[4];
3549 xcb_randr_get_output_primary_cookie_t xcb_ret
;
3550 xcb_randr_get_output_primary_request_t xcb_out
;
3552 xcb_out
.window
= window
;
3554 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3555 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3556 xcb_parts
[3].iov_base
= 0;
3557 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3559 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3563 xcb_randr_get_output_primary_cookie_t
3564 xcb_randr_get_output_primary_unchecked (xcb_connection_t
*c
/**< */,
3565 xcb_window_t window
/**< */)
3567 static const xcb_protocol_request_t xcb_req
= {
3569 /* ext */ &xcb_randr_id
,
3570 /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY
,
3574 struct iovec xcb_parts
[4];
3575 xcb_randr_get_output_primary_cookie_t xcb_ret
;
3576 xcb_randr_get_output_primary_request_t xcb_out
;
3578 xcb_out
.window
= window
;
3580 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3581 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3582 xcb_parts
[3].iov_base
= 0;
3583 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3585 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3589 xcb_randr_get_output_primary_reply_t
*
3590 xcb_randr_get_output_primary_reply (xcb_connection_t
*c
/**< */,
3591 xcb_randr_get_output_primary_cookie_t cookie
/**< */,
3592 xcb_generic_error_t
**e
/**< */)
3594 return (xcb_randr_get_output_primary_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3598 xcb_randr_get_providers_sizeof (const void *_buffer
/**< */)
3600 char *xcb_tmp
= (char *)_buffer
;
3601 const xcb_randr_get_providers_reply_t
*_aux
= (xcb_randr_get_providers_reply_t
*)_buffer
;
3602 unsigned int xcb_buffer_len
= 0;
3603 unsigned int xcb_block_len
= 0;
3604 unsigned int xcb_pad
= 0;
3605 unsigned int xcb_align_to
= 0;
3608 xcb_block_len
+= sizeof(xcb_randr_get_providers_reply_t
);
3609 xcb_tmp
+= xcb_block_len
;
3610 xcb_buffer_len
+= xcb_block_len
;
3613 xcb_block_len
+= _aux
->num_providers
* sizeof(xcb_randr_provider_t
);
3614 xcb_tmp
+= xcb_block_len
;
3615 xcb_align_to
= ALIGNOF(xcb_randr_provider_t
);
3616 /* insert padding */
3617 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3618 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3625 return xcb_buffer_len
;
3628 xcb_randr_get_providers_cookie_t
3629 xcb_randr_get_providers (xcb_connection_t
*c
/**< */,
3630 xcb_window_t window
/**< */)
3632 static const xcb_protocol_request_t xcb_req
= {
3634 /* ext */ &xcb_randr_id
,
3635 /* opcode */ XCB_RANDR_GET_PROVIDERS
,
3639 struct iovec xcb_parts
[4];
3640 xcb_randr_get_providers_cookie_t xcb_ret
;
3641 xcb_randr_get_providers_request_t xcb_out
;
3643 xcb_out
.window
= window
;
3645 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3646 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3647 xcb_parts
[3].iov_base
= 0;
3648 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3650 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3654 xcb_randr_get_providers_cookie_t
3655 xcb_randr_get_providers_unchecked (xcb_connection_t
*c
/**< */,
3656 xcb_window_t window
/**< */)
3658 static const xcb_protocol_request_t xcb_req
= {
3660 /* ext */ &xcb_randr_id
,
3661 /* opcode */ XCB_RANDR_GET_PROVIDERS
,
3665 struct iovec xcb_parts
[4];
3666 xcb_randr_get_providers_cookie_t xcb_ret
;
3667 xcb_randr_get_providers_request_t xcb_out
;
3669 xcb_out
.window
= window
;
3671 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3672 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3673 xcb_parts
[3].iov_base
= 0;
3674 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3676 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3680 xcb_randr_provider_t
*
3681 xcb_randr_get_providers_providers (const xcb_randr_get_providers_reply_t
*R
/**< */)
3683 return (xcb_randr_provider_t
*) (R
+ 1);
3687 xcb_randr_get_providers_providers_length (const xcb_randr_get_providers_reply_t
*R
/**< */)
3689 return R
->num_providers
;
3692 xcb_generic_iterator_t
3693 xcb_randr_get_providers_providers_end (const xcb_randr_get_providers_reply_t
*R
/**< */)
3695 xcb_generic_iterator_t i
;
3696 i
.data
= ((xcb_randr_provider_t
*) (R
+ 1)) + (R
->num_providers
);
3698 i
.index
= (char *) i
.data
- (char *) R
;
3702 xcb_randr_get_providers_reply_t
*
3703 xcb_randr_get_providers_reply (xcb_connection_t
*c
/**< */,
3704 xcb_randr_get_providers_cookie_t cookie
/**< */,
3705 xcb_generic_error_t
**e
/**< */)
3707 return (xcb_randr_get_providers_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3711 xcb_randr_get_provider_info_sizeof (const void *_buffer
/**< */)
3713 char *xcb_tmp
= (char *)_buffer
;
3714 const xcb_randr_get_provider_info_reply_t
*_aux
= (xcb_randr_get_provider_info_reply_t
*)_buffer
;
3715 unsigned int xcb_buffer_len
= 0;
3716 unsigned int xcb_block_len
= 0;
3717 unsigned int xcb_pad
= 0;
3718 unsigned int xcb_align_to
= 0;
3721 xcb_block_len
+= sizeof(xcb_randr_get_provider_info_reply_t
);
3722 xcb_tmp
+= xcb_block_len
;
3723 xcb_buffer_len
+= xcb_block_len
;
3726 xcb_block_len
+= _aux
->num_crtcs
* sizeof(uint32_t);
3727 xcb_tmp
+= xcb_block_len
;
3728 xcb_align_to
= ALIGNOF(xcb_randr_crtc_t
);
3729 /* insert padding */
3730 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3731 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3738 xcb_block_len
+= _aux
->num_outputs
* sizeof(uint32_t);
3739 xcb_tmp
+= xcb_block_len
;
3740 xcb_align_to
= ALIGNOF(xcb_randr_output_t
);
3741 /* insert padding */
3742 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3743 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3749 /* associated_providers */
3750 xcb_block_len
+= _aux
->num_associated_providers
* sizeof(uint32_t);
3751 xcb_tmp
+= xcb_block_len
;
3752 xcb_align_to
= ALIGNOF(xcb_randr_provider_t
);
3753 /* insert padding */
3754 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3755 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3761 /* associated_capability */
3762 xcb_block_len
+= _aux
->num_associated_providers
* sizeof(uint32_t);
3763 xcb_tmp
+= xcb_block_len
;
3764 xcb_align_to
= ALIGNOF(uint32_t);
3765 /* insert padding */
3766 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3767 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3774 xcb_block_len
+= _aux
->name_len
* sizeof(char);
3775 xcb_tmp
+= xcb_block_len
;
3776 xcb_align_to
= ALIGNOF(char);
3777 /* insert padding */
3778 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3779 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3786 return xcb_buffer_len
;
3789 xcb_randr_get_provider_info_cookie_t
3790 xcb_randr_get_provider_info (xcb_connection_t
*c
/**< */,
3791 xcb_randr_provider_t provider
/**< */,
3792 xcb_timestamp_t config_timestamp
/**< */)
3794 static const xcb_protocol_request_t xcb_req
= {
3796 /* ext */ &xcb_randr_id
,
3797 /* opcode */ XCB_RANDR_GET_PROVIDER_INFO
,
3801 struct iovec xcb_parts
[4];
3802 xcb_randr_get_provider_info_cookie_t xcb_ret
;
3803 xcb_randr_get_provider_info_request_t xcb_out
;
3805 xcb_out
.provider
= provider
;
3806 xcb_out
.config_timestamp
= config_timestamp
;
3808 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3809 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3810 xcb_parts
[3].iov_base
= 0;
3811 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3813 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3817 xcb_randr_get_provider_info_cookie_t
3818 xcb_randr_get_provider_info_unchecked (xcb_connection_t
*c
/**< */,
3819 xcb_randr_provider_t provider
/**< */,
3820 xcb_timestamp_t config_timestamp
/**< */)
3822 static const xcb_protocol_request_t xcb_req
= {
3824 /* ext */ &xcb_randr_id
,
3825 /* opcode */ XCB_RANDR_GET_PROVIDER_INFO
,
3829 struct iovec xcb_parts
[4];
3830 xcb_randr_get_provider_info_cookie_t xcb_ret
;
3831 xcb_randr_get_provider_info_request_t xcb_out
;
3833 xcb_out
.provider
= provider
;
3834 xcb_out
.config_timestamp
= config_timestamp
;
3836 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3837 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3838 xcb_parts
[3].iov_base
= 0;
3839 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3841 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3846 xcb_randr_get_provider_info_crtcs (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3848 return (xcb_randr_crtc_t
*) (R
+ 1);
3852 xcb_randr_get_provider_info_crtcs_length (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3854 return R
->num_crtcs
;
3857 xcb_generic_iterator_t
3858 xcb_randr_get_provider_info_crtcs_end (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3860 xcb_generic_iterator_t i
;
3861 i
.data
= ((xcb_randr_crtc_t
*) (R
+ 1)) + (R
->num_crtcs
);
3863 i
.index
= (char *) i
.data
- (char *) R
;
3867 xcb_randr_output_t
*
3868 xcb_randr_get_provider_info_outputs (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3870 xcb_generic_iterator_t prev
= xcb_randr_get_provider_info_crtcs_end(R
);
3871 return (xcb_randr_output_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_output_t
, prev
.index
) + 0);
3875 xcb_randr_get_provider_info_outputs_length (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3877 return R
->num_outputs
;
3880 xcb_generic_iterator_t
3881 xcb_randr_get_provider_info_outputs_end (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3883 xcb_generic_iterator_t i
;
3884 xcb_generic_iterator_t child
= xcb_randr_get_provider_info_crtcs_end(R
);
3885 i
.data
= ((xcb_randr_output_t
*) child
.data
) + (R
->num_outputs
);
3887 i
.index
= (char *) i
.data
- (char *) R
;
3891 xcb_randr_provider_t
*
3892 xcb_randr_get_provider_info_associated_providers (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3894 xcb_generic_iterator_t prev
= xcb_randr_get_provider_info_outputs_end(R
);
3895 return (xcb_randr_provider_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_randr_provider_t
, prev
.index
) + 0);
3899 xcb_randr_get_provider_info_associated_providers_length (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3901 return R
->num_associated_providers
;
3904 xcb_generic_iterator_t
3905 xcb_randr_get_provider_info_associated_providers_end (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3907 xcb_generic_iterator_t i
;
3908 xcb_generic_iterator_t child
= xcb_randr_get_provider_info_outputs_end(R
);
3909 i
.data
= ((xcb_randr_provider_t
*) child
.data
) + (R
->num_associated_providers
);
3911 i
.index
= (char *) i
.data
- (char *) R
;
3916 xcb_randr_get_provider_info_associated_capability (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3918 xcb_generic_iterator_t prev
= xcb_randr_get_provider_info_associated_providers_end(R
);
3919 return (uint32_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint32_t, prev
.index
) + 0);
3923 xcb_randr_get_provider_info_associated_capability_length (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3925 return R
->num_associated_providers
;
3928 xcb_generic_iterator_t
3929 xcb_randr_get_provider_info_associated_capability_end (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3931 xcb_generic_iterator_t i
;
3932 xcb_generic_iterator_t child
= xcb_randr_get_provider_info_associated_providers_end(R
);
3933 i
.data
= ((uint32_t *) child
.data
) + (R
->num_associated_providers
);
3935 i
.index
= (char *) i
.data
- (char *) R
;
3940 xcb_randr_get_provider_info_name (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3942 xcb_generic_iterator_t prev
= xcb_randr_get_provider_info_associated_capability_end(R
);
3943 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
3947 xcb_randr_get_provider_info_name_length (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3952 xcb_generic_iterator_t
3953 xcb_randr_get_provider_info_name_end (const xcb_randr_get_provider_info_reply_t
*R
/**< */)
3955 xcb_generic_iterator_t i
;
3956 xcb_generic_iterator_t child
= xcb_randr_get_provider_info_associated_capability_end(R
);
3957 i
.data
= ((char *) child
.data
) + (R
->name_len
);
3959 i
.index
= (char *) i
.data
- (char *) R
;
3963 xcb_randr_get_provider_info_reply_t
*
3964 xcb_randr_get_provider_info_reply (xcb_connection_t
*c
/**< */,
3965 xcb_randr_get_provider_info_cookie_t cookie
/**< */,
3966 xcb_generic_error_t
**e
/**< */)
3968 return (xcb_randr_get_provider_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3972 xcb_randr_set_provider_offload_sink_checked (xcb_connection_t
*c
/**< */,
3973 xcb_randr_provider_t provider
/**< */,
3974 xcb_randr_provider_t sink_provider
/**< */,
3975 xcb_timestamp_t config_timestamp
/**< */)
3977 static const xcb_protocol_request_t xcb_req
= {
3979 /* ext */ &xcb_randr_id
,
3980 /* opcode */ XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK
,
3984 struct iovec xcb_parts
[4];
3985 xcb_void_cookie_t xcb_ret
;
3986 xcb_randr_set_provider_offload_sink_request_t xcb_out
;
3988 xcb_out
.provider
= provider
;
3989 xcb_out
.sink_provider
= sink_provider
;
3990 xcb_out
.config_timestamp
= config_timestamp
;
3992 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3993 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3994 xcb_parts
[3].iov_base
= 0;
3995 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3997 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4002 xcb_randr_set_provider_offload_sink (xcb_connection_t
*c
/**< */,
4003 xcb_randr_provider_t provider
/**< */,
4004 xcb_randr_provider_t sink_provider
/**< */,
4005 xcb_timestamp_t config_timestamp
/**< */)
4007 static const xcb_protocol_request_t xcb_req
= {
4009 /* ext */ &xcb_randr_id
,
4010 /* opcode */ XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK
,
4014 struct iovec xcb_parts
[4];
4015 xcb_void_cookie_t xcb_ret
;
4016 xcb_randr_set_provider_offload_sink_request_t xcb_out
;
4018 xcb_out
.provider
= provider
;
4019 xcb_out
.sink_provider
= sink_provider
;
4020 xcb_out
.config_timestamp
= config_timestamp
;
4022 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4023 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4024 xcb_parts
[3].iov_base
= 0;
4025 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4027 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4032 xcb_randr_set_provider_output_source_checked (xcb_connection_t
*c
/**< */,
4033 xcb_randr_provider_t provider
/**< */,
4034 xcb_randr_provider_t source_provider
/**< */,
4035 xcb_timestamp_t config_timestamp
/**< */)
4037 static const xcb_protocol_request_t xcb_req
= {
4039 /* ext */ &xcb_randr_id
,
4040 /* opcode */ XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE
,
4044 struct iovec xcb_parts
[4];
4045 xcb_void_cookie_t xcb_ret
;
4046 xcb_randr_set_provider_output_source_request_t xcb_out
;
4048 xcb_out
.provider
= provider
;
4049 xcb_out
.source_provider
= source_provider
;
4050 xcb_out
.config_timestamp
= config_timestamp
;
4052 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4053 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4054 xcb_parts
[3].iov_base
= 0;
4055 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4057 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4062 xcb_randr_set_provider_output_source (xcb_connection_t
*c
/**< */,
4063 xcb_randr_provider_t provider
/**< */,
4064 xcb_randr_provider_t source_provider
/**< */,
4065 xcb_timestamp_t config_timestamp
/**< */)
4067 static const xcb_protocol_request_t xcb_req
= {
4069 /* ext */ &xcb_randr_id
,
4070 /* opcode */ XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE
,
4074 struct iovec xcb_parts
[4];
4075 xcb_void_cookie_t xcb_ret
;
4076 xcb_randr_set_provider_output_source_request_t xcb_out
;
4078 xcb_out
.provider
= provider
;
4079 xcb_out
.source_provider
= source_provider
;
4080 xcb_out
.config_timestamp
= config_timestamp
;
4082 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4083 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4084 xcb_parts
[3].iov_base
= 0;
4085 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4087 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4092 xcb_randr_list_provider_properties_sizeof (const void *_buffer
/**< */)
4094 char *xcb_tmp
= (char *)_buffer
;
4095 const xcb_randr_list_provider_properties_reply_t
*_aux
= (xcb_randr_list_provider_properties_reply_t
*)_buffer
;
4096 unsigned int xcb_buffer_len
= 0;
4097 unsigned int xcb_block_len
= 0;
4098 unsigned int xcb_pad
= 0;
4099 unsigned int xcb_align_to
= 0;
4102 xcb_block_len
+= sizeof(xcb_randr_list_provider_properties_reply_t
);
4103 xcb_tmp
+= xcb_block_len
;
4104 xcb_buffer_len
+= xcb_block_len
;
4107 xcb_block_len
+= _aux
->num_atoms
* sizeof(xcb_atom_t
);
4108 xcb_tmp
+= xcb_block_len
;
4109 xcb_align_to
= ALIGNOF(xcb_atom_t
);
4110 /* insert padding */
4111 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4112 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4119 return xcb_buffer_len
;
4122 xcb_randr_list_provider_properties_cookie_t
4123 xcb_randr_list_provider_properties (xcb_connection_t
*c
/**< */,
4124 xcb_randr_provider_t provider
/**< */)
4126 static const xcb_protocol_request_t xcb_req
= {
4128 /* ext */ &xcb_randr_id
,
4129 /* opcode */ XCB_RANDR_LIST_PROVIDER_PROPERTIES
,
4133 struct iovec xcb_parts
[4];
4134 xcb_randr_list_provider_properties_cookie_t xcb_ret
;
4135 xcb_randr_list_provider_properties_request_t xcb_out
;
4137 xcb_out
.provider
= provider
;
4139 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4140 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4141 xcb_parts
[3].iov_base
= 0;
4142 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4144 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4148 xcb_randr_list_provider_properties_cookie_t
4149 xcb_randr_list_provider_properties_unchecked (xcb_connection_t
*c
/**< */,
4150 xcb_randr_provider_t provider
/**< */)
4152 static const xcb_protocol_request_t xcb_req
= {
4154 /* ext */ &xcb_randr_id
,
4155 /* opcode */ XCB_RANDR_LIST_PROVIDER_PROPERTIES
,
4159 struct iovec xcb_parts
[4];
4160 xcb_randr_list_provider_properties_cookie_t xcb_ret
;
4161 xcb_randr_list_provider_properties_request_t xcb_out
;
4163 xcb_out
.provider
= provider
;
4165 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4166 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4167 xcb_parts
[3].iov_base
= 0;
4168 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4170 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4175 xcb_randr_list_provider_properties_atoms (const xcb_randr_list_provider_properties_reply_t
*R
/**< */)
4177 return (xcb_atom_t
*) (R
+ 1);
4181 xcb_randr_list_provider_properties_atoms_length (const xcb_randr_list_provider_properties_reply_t
*R
/**< */)
4183 return R
->num_atoms
;
4186 xcb_generic_iterator_t
4187 xcb_randr_list_provider_properties_atoms_end (const xcb_randr_list_provider_properties_reply_t
*R
/**< */)
4189 xcb_generic_iterator_t i
;
4190 i
.data
= ((xcb_atom_t
*) (R
+ 1)) + (R
->num_atoms
);
4192 i
.index
= (char *) i
.data
- (char *) R
;
4196 xcb_randr_list_provider_properties_reply_t
*
4197 xcb_randr_list_provider_properties_reply (xcb_connection_t
*c
/**< */,
4198 xcb_randr_list_provider_properties_cookie_t cookie
/**< */,
4199 xcb_generic_error_t
**e
/**< */)
4201 return (xcb_randr_list_provider_properties_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4205 xcb_randr_query_provider_property_sizeof (const void *_buffer
/**< */)
4207 char *xcb_tmp
= (char *)_buffer
;
4208 const xcb_randr_query_provider_property_reply_t
*_aux
= (xcb_randr_query_provider_property_reply_t
*)_buffer
;
4209 unsigned int xcb_buffer_len
= 0;
4210 unsigned int xcb_block_len
= 0;
4211 unsigned int xcb_pad
= 0;
4212 unsigned int xcb_align_to
= 0;
4215 xcb_block_len
+= sizeof(xcb_randr_query_provider_property_reply_t
);
4216 xcb_tmp
+= xcb_block_len
;
4217 xcb_buffer_len
+= xcb_block_len
;
4220 xcb_block_len
+= _aux
->length
* sizeof(int32_t);
4221 xcb_tmp
+= xcb_block_len
;
4222 xcb_align_to
= ALIGNOF(int32_t);
4223 /* insert padding */
4224 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4225 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4232 return xcb_buffer_len
;
4235 xcb_randr_query_provider_property_cookie_t
4236 xcb_randr_query_provider_property (xcb_connection_t
*c
/**< */,
4237 xcb_randr_provider_t provider
/**< */,
4238 xcb_atom_t property
/**< */)
4240 static const xcb_protocol_request_t xcb_req
= {
4242 /* ext */ &xcb_randr_id
,
4243 /* opcode */ XCB_RANDR_QUERY_PROVIDER_PROPERTY
,
4247 struct iovec xcb_parts
[4];
4248 xcb_randr_query_provider_property_cookie_t xcb_ret
;
4249 xcb_randr_query_provider_property_request_t xcb_out
;
4251 xcb_out
.provider
= provider
;
4252 xcb_out
.property
= property
;
4254 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4255 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4256 xcb_parts
[3].iov_base
= 0;
4257 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4259 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4263 xcb_randr_query_provider_property_cookie_t
4264 xcb_randr_query_provider_property_unchecked (xcb_connection_t
*c
/**< */,
4265 xcb_randr_provider_t provider
/**< */,
4266 xcb_atom_t property
/**< */)
4268 static const xcb_protocol_request_t xcb_req
= {
4270 /* ext */ &xcb_randr_id
,
4271 /* opcode */ XCB_RANDR_QUERY_PROVIDER_PROPERTY
,
4275 struct iovec xcb_parts
[4];
4276 xcb_randr_query_provider_property_cookie_t xcb_ret
;
4277 xcb_randr_query_provider_property_request_t xcb_out
;
4279 xcb_out
.provider
= provider
;
4280 xcb_out
.property
= property
;
4282 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4283 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4284 xcb_parts
[3].iov_base
= 0;
4285 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4287 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4292 xcb_randr_query_provider_property_valid_values (const xcb_randr_query_provider_property_reply_t
*R
/**< */)
4294 return (int32_t *) (R
+ 1);
4298 xcb_randr_query_provider_property_valid_values_length (const xcb_randr_query_provider_property_reply_t
*R
/**< */)
4303 xcb_generic_iterator_t
4304 xcb_randr_query_provider_property_valid_values_end (const xcb_randr_query_provider_property_reply_t
*R
/**< */)
4306 xcb_generic_iterator_t i
;
4307 i
.data
= ((int32_t *) (R
+ 1)) + (R
->length
);
4309 i
.index
= (char *) i
.data
- (char *) R
;
4313 xcb_randr_query_provider_property_reply_t
*
4314 xcb_randr_query_provider_property_reply (xcb_connection_t
*c
/**< */,
4315 xcb_randr_query_provider_property_cookie_t cookie
/**< */,
4316 xcb_generic_error_t
**e
/**< */)
4318 return (xcb_randr_query_provider_property_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4322 xcb_randr_configure_provider_property_sizeof (const void *_buffer
/**< */,
4323 uint32_t values_len
/**< */)
4325 char *xcb_tmp
= (char *)_buffer
;
4326 unsigned int xcb_buffer_len
= 0;
4327 unsigned int xcb_block_len
= 0;
4328 unsigned int xcb_pad
= 0;
4329 unsigned int xcb_align_to
= 0;
4332 xcb_block_len
+= sizeof(xcb_randr_configure_provider_property_request_t
);
4333 xcb_tmp
+= xcb_block_len
;
4334 xcb_buffer_len
+= xcb_block_len
;
4337 xcb_block_len
+= values_len
* sizeof(int32_t);
4338 xcb_tmp
+= xcb_block_len
;
4339 xcb_align_to
= ALIGNOF(int32_t);
4340 /* insert padding */
4341 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4342 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4349 return xcb_buffer_len
;
4353 xcb_randr_configure_provider_property_checked (xcb_connection_t
*c
/**< */,
4354 xcb_randr_provider_t provider
/**< */,
4355 xcb_atom_t property
/**< */,
4356 uint8_t pending
/**< */,
4357 uint8_t range
/**< */,
4358 uint32_t values_len
/**< */,
4359 const int32_t *values
/**< */)
4361 static const xcb_protocol_request_t xcb_req
= {
4363 /* ext */ &xcb_randr_id
,
4364 /* opcode */ XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY
,
4368 struct iovec xcb_parts
[6];
4369 xcb_void_cookie_t xcb_ret
;
4370 xcb_randr_configure_provider_property_request_t xcb_out
;
4372 xcb_out
.provider
= provider
;
4373 xcb_out
.property
= property
;
4374 xcb_out
.pending
= pending
;
4375 xcb_out
.range
= range
;
4376 memset(xcb_out
.pad0
, 0, 2);
4378 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4379 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4380 xcb_parts
[3].iov_base
= 0;
4381 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4382 /* int32_t values */
4383 xcb_parts
[4].iov_base
= (char *) values
;
4384 xcb_parts
[4].iov_len
= values_len
* sizeof(int32_t);
4385 xcb_parts
[5].iov_base
= 0;
4386 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4388 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4393 xcb_randr_configure_provider_property (xcb_connection_t
*c
/**< */,
4394 xcb_randr_provider_t provider
/**< */,
4395 xcb_atom_t property
/**< */,
4396 uint8_t pending
/**< */,
4397 uint8_t range
/**< */,
4398 uint32_t values_len
/**< */,
4399 const int32_t *values
/**< */)
4401 static const xcb_protocol_request_t xcb_req
= {
4403 /* ext */ &xcb_randr_id
,
4404 /* opcode */ XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY
,
4408 struct iovec xcb_parts
[6];
4409 xcb_void_cookie_t xcb_ret
;
4410 xcb_randr_configure_provider_property_request_t xcb_out
;
4412 xcb_out
.provider
= provider
;
4413 xcb_out
.property
= property
;
4414 xcb_out
.pending
= pending
;
4415 xcb_out
.range
= range
;
4416 memset(xcb_out
.pad0
, 0, 2);
4418 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4419 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4420 xcb_parts
[3].iov_base
= 0;
4421 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4422 /* int32_t values */
4423 xcb_parts
[4].iov_base
= (char *) values
;
4424 xcb_parts
[4].iov_len
= values_len
* sizeof(int32_t);
4425 xcb_parts
[5].iov_base
= 0;
4426 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4428 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4433 xcb_randr_change_provider_property_sizeof (const void *_buffer
/**< */)
4435 char *xcb_tmp
= (char *)_buffer
;
4436 const xcb_randr_change_provider_property_request_t
*_aux
= (xcb_randr_change_provider_property_request_t
*)_buffer
;
4437 unsigned int xcb_buffer_len
= 0;
4438 unsigned int xcb_block_len
= 0;
4439 unsigned int xcb_pad
= 0;
4440 unsigned int xcb_align_to
= 0;
4443 xcb_block_len
+= sizeof(xcb_randr_change_provider_property_request_t
);
4444 xcb_tmp
+= xcb_block_len
;
4445 xcb_buffer_len
+= xcb_block_len
;
4448 xcb_block_len
+= (_aux
->num_items
* (_aux
->format
/ 8)) * sizeof(char);
4449 xcb_tmp
+= xcb_block_len
;
4450 xcb_align_to
= ALIGNOF(char);
4451 /* insert padding */
4452 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4453 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4460 return xcb_buffer_len
;
4464 xcb_randr_change_provider_property_checked (xcb_connection_t
*c
/**< */,
4465 xcb_randr_provider_t provider
/**< */,
4466 xcb_atom_t property
/**< */,
4467 xcb_atom_t type
/**< */,
4468 uint8_t format
/**< */,
4469 uint8_t mode
/**< */,
4470 uint32_t num_items
/**< */,
4471 const void *data
/**< */)
4473 static const xcb_protocol_request_t xcb_req
= {
4475 /* ext */ &xcb_randr_id
,
4476 /* opcode */ XCB_RANDR_CHANGE_PROVIDER_PROPERTY
,
4480 struct iovec xcb_parts
[6];
4481 xcb_void_cookie_t xcb_ret
;
4482 xcb_randr_change_provider_property_request_t xcb_out
;
4484 xcb_out
.provider
= provider
;
4485 xcb_out
.property
= property
;
4486 xcb_out
.type
= type
;
4487 xcb_out
.format
= format
;
4488 xcb_out
.mode
= mode
;
4489 memset(xcb_out
.pad0
, 0, 2);
4490 xcb_out
.num_items
= num_items
;
4492 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4493 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4494 xcb_parts
[3].iov_base
= 0;
4495 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4497 xcb_parts
[4].iov_base
= (char *) data
;
4498 xcb_parts
[4].iov_len
= (num_items
* (format
/ 8)) * sizeof(char);
4499 xcb_parts
[5].iov_base
= 0;
4500 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4502 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4507 xcb_randr_change_provider_property (xcb_connection_t
*c
/**< */,
4508 xcb_randr_provider_t provider
/**< */,
4509 xcb_atom_t property
/**< */,
4510 xcb_atom_t type
/**< */,
4511 uint8_t format
/**< */,
4512 uint8_t mode
/**< */,
4513 uint32_t num_items
/**< */,
4514 const void *data
/**< */)
4516 static const xcb_protocol_request_t xcb_req
= {
4518 /* ext */ &xcb_randr_id
,
4519 /* opcode */ XCB_RANDR_CHANGE_PROVIDER_PROPERTY
,
4523 struct iovec xcb_parts
[6];
4524 xcb_void_cookie_t xcb_ret
;
4525 xcb_randr_change_provider_property_request_t xcb_out
;
4527 xcb_out
.provider
= provider
;
4528 xcb_out
.property
= property
;
4529 xcb_out
.type
= type
;
4530 xcb_out
.format
= format
;
4531 xcb_out
.mode
= mode
;
4532 memset(xcb_out
.pad0
, 0, 2);
4533 xcb_out
.num_items
= num_items
;
4535 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4536 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4537 xcb_parts
[3].iov_base
= 0;
4538 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4540 xcb_parts
[4].iov_base
= (char *) data
;
4541 xcb_parts
[4].iov_len
= (num_items
* (format
/ 8)) * sizeof(char);
4542 xcb_parts
[5].iov_base
= 0;
4543 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4545 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4550 xcb_randr_delete_provider_property_checked (xcb_connection_t
*c
/**< */,
4551 xcb_randr_provider_t provider
/**< */,
4552 xcb_atom_t property
/**< */)
4554 static const xcb_protocol_request_t xcb_req
= {
4556 /* ext */ &xcb_randr_id
,
4557 /* opcode */ XCB_RANDR_DELETE_PROVIDER_PROPERTY
,
4561 struct iovec xcb_parts
[4];
4562 xcb_void_cookie_t xcb_ret
;
4563 xcb_randr_delete_provider_property_request_t xcb_out
;
4565 xcb_out
.provider
= provider
;
4566 xcb_out
.property
= property
;
4568 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4569 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4570 xcb_parts
[3].iov_base
= 0;
4571 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4573 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4578 xcb_randr_delete_provider_property (xcb_connection_t
*c
/**< */,
4579 xcb_randr_provider_t provider
/**< */,
4580 xcb_atom_t property
/**< */)
4582 static const xcb_protocol_request_t xcb_req
= {
4584 /* ext */ &xcb_randr_id
,
4585 /* opcode */ XCB_RANDR_DELETE_PROVIDER_PROPERTY
,
4589 struct iovec xcb_parts
[4];
4590 xcb_void_cookie_t xcb_ret
;
4591 xcb_randr_delete_provider_property_request_t xcb_out
;
4593 xcb_out
.provider
= provider
;
4594 xcb_out
.property
= property
;
4596 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4597 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4598 xcb_parts
[3].iov_base
= 0;
4599 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4601 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4606 xcb_randr_get_provider_property_sizeof (const void *_buffer
/**< */)
4608 char *xcb_tmp
= (char *)_buffer
;
4609 const xcb_randr_get_provider_property_reply_t
*_aux
= (xcb_randr_get_provider_property_reply_t
*)_buffer
;
4610 unsigned int xcb_buffer_len
= 0;
4611 unsigned int xcb_block_len
= 0;
4612 unsigned int xcb_pad
= 0;
4613 unsigned int xcb_align_to
= 0;
4616 xcb_block_len
+= sizeof(xcb_randr_get_provider_property_reply_t
);
4617 xcb_tmp
+= xcb_block_len
;
4618 xcb_buffer_len
+= xcb_block_len
;
4621 xcb_block_len
+= (_aux
->num_items
* (_aux
->format
/ 8)) * sizeof(char);
4622 xcb_tmp
+= xcb_block_len
;
4623 xcb_align_to
= ALIGNOF(char);
4624 /* insert padding */
4625 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4626 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4633 return xcb_buffer_len
;
4636 xcb_randr_get_provider_property_cookie_t
4637 xcb_randr_get_provider_property (xcb_connection_t
*c
/**< */,
4638 xcb_randr_provider_t provider
/**< */,
4639 xcb_atom_t property
/**< */,
4640 xcb_atom_t type
/**< */,
4641 uint32_t long_offset
/**< */,
4642 uint32_t long_length
/**< */,
4643 uint8_t _delete
/**< */,
4644 uint8_t pending
/**< */)
4646 static const xcb_protocol_request_t xcb_req
= {
4648 /* ext */ &xcb_randr_id
,
4649 /* opcode */ XCB_RANDR_GET_PROVIDER_PROPERTY
,
4653 struct iovec xcb_parts
[4];
4654 xcb_randr_get_provider_property_cookie_t xcb_ret
;
4655 xcb_randr_get_provider_property_request_t xcb_out
;
4657 xcb_out
.provider
= provider
;
4658 xcb_out
.property
= property
;
4659 xcb_out
.type
= type
;
4660 xcb_out
.long_offset
= long_offset
;
4661 xcb_out
.long_length
= long_length
;
4662 xcb_out
._delete
= _delete
;
4663 xcb_out
.pending
= pending
;
4664 memset(xcb_out
.pad0
, 0, 2);
4666 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4667 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4668 xcb_parts
[3].iov_base
= 0;
4669 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4671 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4675 xcb_randr_get_provider_property_cookie_t
4676 xcb_randr_get_provider_property_unchecked (xcb_connection_t
*c
/**< */,
4677 xcb_randr_provider_t provider
/**< */,
4678 xcb_atom_t property
/**< */,
4679 xcb_atom_t type
/**< */,
4680 uint32_t long_offset
/**< */,
4681 uint32_t long_length
/**< */,
4682 uint8_t _delete
/**< */,
4683 uint8_t pending
/**< */)
4685 static const xcb_protocol_request_t xcb_req
= {
4687 /* ext */ &xcb_randr_id
,
4688 /* opcode */ XCB_RANDR_GET_PROVIDER_PROPERTY
,
4692 struct iovec xcb_parts
[4];
4693 xcb_randr_get_provider_property_cookie_t xcb_ret
;
4694 xcb_randr_get_provider_property_request_t xcb_out
;
4696 xcb_out
.provider
= provider
;
4697 xcb_out
.property
= property
;
4698 xcb_out
.type
= type
;
4699 xcb_out
.long_offset
= long_offset
;
4700 xcb_out
.long_length
= long_length
;
4701 xcb_out
._delete
= _delete
;
4702 xcb_out
.pending
= pending
;
4703 memset(xcb_out
.pad0
, 0, 2);
4705 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4706 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4707 xcb_parts
[3].iov_base
= 0;
4708 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4710 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4715 xcb_randr_get_provider_property_data (const xcb_randr_get_provider_property_reply_t
*R
/**< */)
4717 return (void *) (R
+ 1);
4721 xcb_randr_get_provider_property_data_length (const xcb_randr_get_provider_property_reply_t
*R
/**< */)
4723 return (R
->num_items
* (R
->format
/ 8));
4726 xcb_generic_iterator_t
4727 xcb_randr_get_provider_property_data_end (const xcb_randr_get_provider_property_reply_t
*R
/**< */)
4729 xcb_generic_iterator_t i
;
4730 i
.data
= ((char *) (R
+ 1)) + ((R
->num_items
* (R
->format
/ 8)));
4732 i
.index
= (char *) i
.data
- (char *) R
;
4736 xcb_randr_get_provider_property_reply_t
*
4737 xcb_randr_get_provider_property_reply (xcb_connection_t
*c
/**< */,
4738 xcb_randr_get_provider_property_cookie_t cookie
/**< */,
4739 xcb_generic_error_t
**e
/**< */)
4741 return (xcb_randr_get_provider_property_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4745 xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t
*i
/**< */)
4749 i
->index
+= sizeof(xcb_randr_crtc_change_t
);
4752 xcb_generic_iterator_t
4753 xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i
/**< */)
4755 xcb_generic_iterator_t ret
;
4756 ret
.data
= i
.data
+ i
.rem
;
4757 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4763 xcb_randr_output_change_next (xcb_randr_output_change_iterator_t
*i
/**< */)
4767 i
->index
+= sizeof(xcb_randr_output_change_t
);
4770 xcb_generic_iterator_t
4771 xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i
/**< */)
4773 xcb_generic_iterator_t ret
;
4774 ret
.data
= i
.data
+ i
.rem
;
4775 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4781 xcb_randr_output_property_next (xcb_randr_output_property_iterator_t
*i
/**< */)
4785 i
->index
+= sizeof(xcb_randr_output_property_t
);
4788 xcb_generic_iterator_t
4789 xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i
/**< */)
4791 xcb_generic_iterator_t ret
;
4792 ret
.data
= i
.data
+ i
.rem
;
4793 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4799 xcb_randr_provider_change_next (xcb_randr_provider_change_iterator_t
*i
/**< */)
4803 i
->index
+= sizeof(xcb_randr_provider_change_t
);
4806 xcb_generic_iterator_t
4807 xcb_randr_provider_change_end (xcb_randr_provider_change_iterator_t i
/**< */)
4809 xcb_generic_iterator_t ret
;
4810 ret
.data
= i
.data
+ i
.rem
;
4811 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4817 xcb_randr_provider_property_next (xcb_randr_provider_property_iterator_t
*i
/**< */)
4821 i
->index
+= sizeof(xcb_randr_provider_property_t
);
4824 xcb_generic_iterator_t
4825 xcb_randr_provider_property_end (xcb_randr_provider_property_iterator_t i
/**< */)
4827 xcb_generic_iterator_t ret
;
4828 ret
.data
= i
.data
+ i
.rem
;
4829 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4835 xcb_randr_resource_change_next (xcb_randr_resource_change_iterator_t
*i
/**< */)
4839 i
->index
+= sizeof(xcb_randr_resource_change_t
);
4842 xcb_generic_iterator_t
4843 xcb_randr_resource_change_end (xcb_randr_resource_change_iterator_t i
/**< */)
4845 xcb_generic_iterator_t ret
;
4846 ret
.data
= i
.data
+ i
.rem
;
4847 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4853 xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t
*i
/**< */)
4857 i
->index
+= sizeof(xcb_randr_notify_data_t
);
4860 xcb_generic_iterator_t
4861 xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i
/**< */)
4863 xcb_generic_iterator_t ret
;
4864 ret
.data
= i
.data
+ i
.rem
;
4865 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);