2 * This file generated automatically from xproto.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_char2b_next (xcb_char2b_iterator_t
*i
/**< */)
23 i
->index
+= sizeof(xcb_char2b_t
);
26 xcb_generic_iterator_t
27 xcb_char2b_end (xcb_char2b_iterator_t i
/**< */)
29 xcb_generic_iterator_t ret
;
30 ret
.data
= i
.data
+ i
.rem
;
31 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
37 xcb_window_next (xcb_window_iterator_t
*i
/**< */)
41 i
->index
+= sizeof(xcb_window_t
);
44 xcb_generic_iterator_t
45 xcb_window_end (xcb_window_iterator_t i
/**< */)
47 xcb_generic_iterator_t ret
;
48 ret
.data
= i
.data
+ i
.rem
;
49 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
55 xcb_pixmap_next (xcb_pixmap_iterator_t
*i
/**< */)
59 i
->index
+= sizeof(xcb_pixmap_t
);
62 xcb_generic_iterator_t
63 xcb_pixmap_end (xcb_pixmap_iterator_t i
/**< */)
65 xcb_generic_iterator_t ret
;
66 ret
.data
= i
.data
+ i
.rem
;
67 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
73 xcb_cursor_next (xcb_cursor_iterator_t
*i
/**< */)
77 i
->index
+= sizeof(xcb_cursor_t
);
80 xcb_generic_iterator_t
81 xcb_cursor_end (xcb_cursor_iterator_t i
/**< */)
83 xcb_generic_iterator_t ret
;
84 ret
.data
= i
.data
+ i
.rem
;
85 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
91 xcb_font_next (xcb_font_iterator_t
*i
/**< */)
95 i
->index
+= sizeof(xcb_font_t
);
98 xcb_generic_iterator_t
99 xcb_font_end (xcb_font_iterator_t i
/**< */)
101 xcb_generic_iterator_t ret
;
102 ret
.data
= i
.data
+ i
.rem
;
103 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
109 xcb_gcontext_next (xcb_gcontext_iterator_t
*i
/**< */)
113 i
->index
+= sizeof(xcb_gcontext_t
);
116 xcb_generic_iterator_t
117 xcb_gcontext_end (xcb_gcontext_iterator_t i
/**< */)
119 xcb_generic_iterator_t ret
;
120 ret
.data
= i
.data
+ i
.rem
;
121 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
127 xcb_colormap_next (xcb_colormap_iterator_t
*i
/**< */)
131 i
->index
+= sizeof(xcb_colormap_t
);
134 xcb_generic_iterator_t
135 xcb_colormap_end (xcb_colormap_iterator_t i
/**< */)
137 xcb_generic_iterator_t ret
;
138 ret
.data
= i
.data
+ i
.rem
;
139 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
145 xcb_atom_next (xcb_atom_iterator_t
*i
/**< */)
149 i
->index
+= sizeof(xcb_atom_t
);
152 xcb_generic_iterator_t
153 xcb_atom_end (xcb_atom_iterator_t i
/**< */)
155 xcb_generic_iterator_t ret
;
156 ret
.data
= i
.data
+ i
.rem
;
157 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
163 xcb_drawable_next (xcb_drawable_iterator_t
*i
/**< */)
167 i
->index
+= sizeof(xcb_drawable_t
);
170 xcb_generic_iterator_t
171 xcb_drawable_end (xcb_drawable_iterator_t i
/**< */)
173 xcb_generic_iterator_t ret
;
174 ret
.data
= i
.data
+ i
.rem
;
175 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
181 xcb_fontable_next (xcb_fontable_iterator_t
*i
/**< */)
185 i
->index
+= sizeof(xcb_fontable_t
);
188 xcb_generic_iterator_t
189 xcb_fontable_end (xcb_fontable_iterator_t i
/**< */)
191 xcb_generic_iterator_t ret
;
192 ret
.data
= i
.data
+ i
.rem
;
193 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
199 xcb_visualid_next (xcb_visualid_iterator_t
*i
/**< */)
203 i
->index
+= sizeof(xcb_visualid_t
);
206 xcb_generic_iterator_t
207 xcb_visualid_end (xcb_visualid_iterator_t i
/**< */)
209 xcb_generic_iterator_t ret
;
210 ret
.data
= i
.data
+ i
.rem
;
211 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
217 xcb_timestamp_next (xcb_timestamp_iterator_t
*i
/**< */)
221 i
->index
+= sizeof(xcb_timestamp_t
);
224 xcb_generic_iterator_t
225 xcb_timestamp_end (xcb_timestamp_iterator_t i
/**< */)
227 xcb_generic_iterator_t ret
;
228 ret
.data
= i
.data
+ i
.rem
;
229 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
235 xcb_keysym_next (xcb_keysym_iterator_t
*i
/**< */)
239 i
->index
+= sizeof(xcb_keysym_t
);
242 xcb_generic_iterator_t
243 xcb_keysym_end (xcb_keysym_iterator_t i
/**< */)
245 xcb_generic_iterator_t ret
;
246 ret
.data
= i
.data
+ i
.rem
;
247 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
253 xcb_keycode_next (xcb_keycode_iterator_t
*i
/**< */)
257 i
->index
+= sizeof(xcb_keycode_t
);
260 xcb_generic_iterator_t
261 xcb_keycode_end (xcb_keycode_iterator_t i
/**< */)
263 xcb_generic_iterator_t ret
;
264 ret
.data
= i
.data
+ i
.rem
;
265 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
271 xcb_button_next (xcb_button_iterator_t
*i
/**< */)
275 i
->index
+= sizeof(xcb_button_t
);
278 xcb_generic_iterator_t
279 xcb_button_end (xcb_button_iterator_t i
/**< */)
281 xcb_generic_iterator_t ret
;
282 ret
.data
= i
.data
+ i
.rem
;
283 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
289 xcb_point_next (xcb_point_iterator_t
*i
/**< */)
293 i
->index
+= sizeof(xcb_point_t
);
296 xcb_generic_iterator_t
297 xcb_point_end (xcb_point_iterator_t i
/**< */)
299 xcb_generic_iterator_t ret
;
300 ret
.data
= i
.data
+ i
.rem
;
301 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
307 xcb_rectangle_next (xcb_rectangle_iterator_t
*i
/**< */)
311 i
->index
+= sizeof(xcb_rectangle_t
);
314 xcb_generic_iterator_t
315 xcb_rectangle_end (xcb_rectangle_iterator_t i
/**< */)
317 xcb_generic_iterator_t ret
;
318 ret
.data
= i
.data
+ i
.rem
;
319 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
325 xcb_arc_next (xcb_arc_iterator_t
*i
/**< */)
329 i
->index
+= sizeof(xcb_arc_t
);
332 xcb_generic_iterator_t
333 xcb_arc_end (xcb_arc_iterator_t i
/**< */)
335 xcb_generic_iterator_t ret
;
336 ret
.data
= i
.data
+ i
.rem
;
337 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
343 xcb_format_next (xcb_format_iterator_t
*i
/**< */)
347 i
->index
+= sizeof(xcb_format_t
);
350 xcb_generic_iterator_t
351 xcb_format_end (xcb_format_iterator_t i
/**< */)
353 xcb_generic_iterator_t ret
;
354 ret
.data
= i
.data
+ i
.rem
;
355 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
361 xcb_visualtype_next (xcb_visualtype_iterator_t
*i
/**< */)
365 i
->index
+= sizeof(xcb_visualtype_t
);
368 xcb_generic_iterator_t
369 xcb_visualtype_end (xcb_visualtype_iterator_t i
/**< */)
371 xcb_generic_iterator_t ret
;
372 ret
.data
= i
.data
+ i
.rem
;
373 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
379 xcb_depth_sizeof (const void *_buffer
/**< */)
381 char *xcb_tmp
= (char *)_buffer
;
382 const xcb_depth_t
*_aux
= (xcb_depth_t
*)_buffer
;
383 unsigned int xcb_buffer_len
= 0;
384 unsigned int xcb_block_len
= 0;
385 unsigned int xcb_pad
= 0;
386 unsigned int xcb_align_to
= 0;
389 xcb_block_len
+= sizeof(xcb_depth_t
);
390 xcb_tmp
+= xcb_block_len
;
391 xcb_buffer_len
+= xcb_block_len
;
394 xcb_block_len
+= _aux
->visuals_len
* sizeof(xcb_visualtype_t
);
395 xcb_tmp
+= xcb_block_len
;
396 xcb_align_to
= ALIGNOF(xcb_visualtype_t
);
398 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
399 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
406 return xcb_buffer_len
;
410 xcb_depth_visuals (const xcb_depth_t
*R
/**< */)
412 return (xcb_visualtype_t
*) (R
+ 1);
416 xcb_depth_visuals_length (const xcb_depth_t
*R
/**< */)
418 return R
->visuals_len
;
421 xcb_visualtype_iterator_t
422 xcb_depth_visuals_iterator (const xcb_depth_t
*R
/**< */)
424 xcb_visualtype_iterator_t i
;
425 i
.data
= (xcb_visualtype_t
*) (R
+ 1);
426 i
.rem
= R
->visuals_len
;
427 i
.index
= (char *) i
.data
- (char *) R
;
432 xcb_depth_next (xcb_depth_iterator_t
*i
/**< */)
434 xcb_depth_t
*R
= i
->data
;
435 xcb_generic_iterator_t child
;
436 child
.data
= (xcb_depth_t
*)(((char *)R
) + xcb_depth_sizeof(R
));
437 i
->index
= (char *) child
.data
- (char *) i
->data
;
439 i
->data
= (xcb_depth_t
*) child
.data
;
442 xcb_generic_iterator_t
443 xcb_depth_end (xcb_depth_iterator_t i
/**< */)
445 xcb_generic_iterator_t ret
;
455 xcb_screen_sizeof (const void *_buffer
/**< */)
457 char *xcb_tmp
= (char *)_buffer
;
458 const xcb_screen_t
*_aux
= (xcb_screen_t
*)_buffer
;
459 unsigned int xcb_buffer_len
= 0;
460 unsigned int xcb_block_len
= 0;
461 unsigned int xcb_pad
= 0;
462 unsigned int xcb_align_to
= 0;
465 unsigned int xcb_tmp_len
;
467 xcb_block_len
+= sizeof(xcb_screen_t
);
468 xcb_tmp
+= xcb_block_len
;
469 xcb_buffer_len
+= xcb_block_len
;
472 for(i
=0; i
<_aux
->allowed_depths_len
; i
++) {
473 xcb_tmp_len
= xcb_depth_sizeof(xcb_tmp
);
474 xcb_block_len
+= xcb_tmp_len
;
475 xcb_tmp
+= xcb_tmp_len
;
477 xcb_align_to
= ALIGNOF(xcb_depth_t
);
479 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
480 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
487 return xcb_buffer_len
;
491 xcb_screen_allowed_depths_length (const xcb_screen_t
*R
/**< */)
493 return R
->allowed_depths_len
;
497 xcb_screen_allowed_depths_iterator (const xcb_screen_t
*R
/**< */)
499 xcb_depth_iterator_t i
;
500 i
.data
= (xcb_depth_t
*) (R
+ 1);
501 i
.rem
= R
->allowed_depths_len
;
502 i
.index
= (char *) i
.data
- (char *) R
;
507 xcb_screen_next (xcb_screen_iterator_t
*i
/**< */)
509 xcb_screen_t
*R
= i
->data
;
510 xcb_generic_iterator_t child
;
511 child
.data
= (xcb_screen_t
*)(((char *)R
) + xcb_screen_sizeof(R
));
512 i
->index
= (char *) child
.data
- (char *) i
->data
;
514 i
->data
= (xcb_screen_t
*) child
.data
;
517 xcb_generic_iterator_t
518 xcb_screen_end (xcb_screen_iterator_t i
/**< */)
520 xcb_generic_iterator_t ret
;
530 xcb_setup_request_sizeof (const void *_buffer
/**< */)
532 char *xcb_tmp
= (char *)_buffer
;
533 const xcb_setup_request_t
*_aux
= (xcb_setup_request_t
*)_buffer
;
534 unsigned int xcb_buffer_len
= 0;
535 unsigned int xcb_block_len
= 0;
536 unsigned int xcb_pad
= 0;
537 unsigned int xcb_align_to
= 0;
540 xcb_block_len
+= sizeof(xcb_setup_request_t
);
541 xcb_tmp
+= xcb_block_len
;
542 xcb_buffer_len
+= xcb_block_len
;
544 /* authorization_protocol_name */
545 xcb_block_len
+= _aux
->authorization_protocol_name_len
* sizeof(char);
546 xcb_tmp
+= xcb_block_len
;
547 xcb_align_to
= ALIGNOF(char);
549 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
550 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
556 /* authorization_protocol_data */
557 xcb_block_len
+= _aux
->authorization_protocol_data_len
* sizeof(char);
558 xcb_tmp
+= xcb_block_len
;
559 xcb_align_to
= ALIGNOF(char);
561 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
562 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
569 return xcb_buffer_len
;
573 xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t
*R
/**< */)
575 return (char *) (R
+ 1);
579 xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t
*R
/**< */)
581 return R
->authorization_protocol_name_len
;
584 xcb_generic_iterator_t
585 xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t
*R
/**< */)
587 xcb_generic_iterator_t i
;
588 i
.data
= ((char *) (R
+ 1)) + (R
->authorization_protocol_name_len
);
590 i
.index
= (char *) i
.data
- (char *) R
;
595 xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t
*R
/**< */)
597 xcb_generic_iterator_t prev
= xcb_setup_request_authorization_protocol_name_end(R
);
598 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
602 xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t
*R
/**< */)
604 return R
->authorization_protocol_data_len
;
607 xcb_generic_iterator_t
608 xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t
*R
/**< */)
610 xcb_generic_iterator_t i
;
611 xcb_generic_iterator_t child
= xcb_setup_request_authorization_protocol_name_end(R
);
612 i
.data
= ((char *) child
.data
) + (R
->authorization_protocol_data_len
);
614 i
.index
= (char *) i
.data
- (char *) R
;
619 xcb_setup_request_next (xcb_setup_request_iterator_t
*i
/**< */)
621 xcb_setup_request_t
*R
= i
->data
;
622 xcb_generic_iterator_t child
;
623 child
.data
= (xcb_setup_request_t
*)(((char *)R
) + xcb_setup_request_sizeof(R
));
624 i
->index
= (char *) child
.data
- (char *) i
->data
;
626 i
->data
= (xcb_setup_request_t
*) child
.data
;
629 xcb_generic_iterator_t
630 xcb_setup_request_end (xcb_setup_request_iterator_t i
/**< */)
632 xcb_generic_iterator_t ret
;
634 xcb_setup_request_next(&i
);
642 xcb_setup_failed_sizeof (const void *_buffer
/**< */)
644 char *xcb_tmp
= (char *)_buffer
;
645 const xcb_setup_failed_t
*_aux
= (xcb_setup_failed_t
*)_buffer
;
646 unsigned int xcb_buffer_len
= 0;
647 unsigned int xcb_block_len
= 0;
648 unsigned int xcb_pad
= 0;
649 unsigned int xcb_align_to
= 0;
652 xcb_block_len
+= sizeof(xcb_setup_failed_t
);
653 xcb_tmp
+= xcb_block_len
;
654 xcb_buffer_len
+= xcb_block_len
;
657 xcb_block_len
+= _aux
->reason_len
* sizeof(char);
658 xcb_tmp
+= xcb_block_len
;
659 xcb_align_to
= ALIGNOF(char);
661 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
662 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
669 return xcb_buffer_len
;
673 xcb_setup_failed_reason (const xcb_setup_failed_t
*R
/**< */)
675 return (char *) (R
+ 1);
679 xcb_setup_failed_reason_length (const xcb_setup_failed_t
*R
/**< */)
681 return R
->reason_len
;
684 xcb_generic_iterator_t
685 xcb_setup_failed_reason_end (const xcb_setup_failed_t
*R
/**< */)
687 xcb_generic_iterator_t i
;
688 i
.data
= ((char *) (R
+ 1)) + (R
->reason_len
);
690 i
.index
= (char *) i
.data
- (char *) R
;
695 xcb_setup_failed_next (xcb_setup_failed_iterator_t
*i
/**< */)
697 xcb_setup_failed_t
*R
= i
->data
;
698 xcb_generic_iterator_t child
;
699 child
.data
= (xcb_setup_failed_t
*)(((char *)R
) + xcb_setup_failed_sizeof(R
));
700 i
->index
= (char *) child
.data
- (char *) i
->data
;
702 i
->data
= (xcb_setup_failed_t
*) child
.data
;
705 xcb_generic_iterator_t
706 xcb_setup_failed_end (xcb_setup_failed_iterator_t i
/**< */)
708 xcb_generic_iterator_t ret
;
710 xcb_setup_failed_next(&i
);
718 xcb_setup_authenticate_sizeof (const void *_buffer
/**< */)
720 char *xcb_tmp
= (char *)_buffer
;
721 const xcb_setup_authenticate_t
*_aux
= (xcb_setup_authenticate_t
*)_buffer
;
722 unsigned int xcb_buffer_len
= 0;
723 unsigned int xcb_block_len
= 0;
724 unsigned int xcb_pad
= 0;
725 unsigned int xcb_align_to
= 0;
728 xcb_block_len
+= sizeof(xcb_setup_authenticate_t
);
729 xcb_tmp
+= xcb_block_len
;
730 xcb_buffer_len
+= xcb_block_len
;
733 xcb_block_len
+= (_aux
->length
* 4) * sizeof(char);
734 xcb_tmp
+= xcb_block_len
;
735 xcb_align_to
= ALIGNOF(char);
737 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
738 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
745 return xcb_buffer_len
;
749 xcb_setup_authenticate_reason (const xcb_setup_authenticate_t
*R
/**< */)
751 return (char *) (R
+ 1);
755 xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t
*R
/**< */)
757 return (R
->length
* 4);
760 xcb_generic_iterator_t
761 xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t
*R
/**< */)
763 xcb_generic_iterator_t i
;
764 i
.data
= ((char *) (R
+ 1)) + ((R
->length
* 4));
766 i
.index
= (char *) i
.data
- (char *) R
;
771 xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t
*i
/**< */)
773 xcb_setup_authenticate_t
*R
= i
->data
;
774 xcb_generic_iterator_t child
;
775 child
.data
= (xcb_setup_authenticate_t
*)(((char *)R
) + xcb_setup_authenticate_sizeof(R
));
776 i
->index
= (char *) child
.data
- (char *) i
->data
;
778 i
->data
= (xcb_setup_authenticate_t
*) child
.data
;
781 xcb_generic_iterator_t
782 xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i
/**< */)
784 xcb_generic_iterator_t ret
;
786 xcb_setup_authenticate_next(&i
);
794 xcb_setup_sizeof (const void *_buffer
/**< */)
796 char *xcb_tmp
= (char *)_buffer
;
797 const xcb_setup_t
*_aux
= (xcb_setup_t
*)_buffer
;
798 unsigned int xcb_buffer_len
= 0;
799 unsigned int xcb_block_len
= 0;
800 unsigned int xcb_pad
= 0;
801 unsigned int xcb_align_to
= 0;
804 unsigned int xcb_tmp_len
;
806 xcb_block_len
+= sizeof(xcb_setup_t
);
807 xcb_tmp
+= xcb_block_len
;
808 xcb_buffer_len
+= xcb_block_len
;
811 xcb_block_len
+= _aux
->vendor_len
* sizeof(char);
812 xcb_tmp
+= xcb_block_len
;
813 xcb_align_to
= ALIGNOF(char);
815 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
816 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
823 xcb_block_len
+= _aux
->pixmap_formats_len
* sizeof(xcb_format_t
);
824 xcb_tmp
+= xcb_block_len
;
825 xcb_align_to
= ALIGNOF(xcb_format_t
);
827 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
828 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
835 for(i
=0; i
<_aux
->roots_len
; i
++) {
836 xcb_tmp_len
= xcb_screen_sizeof(xcb_tmp
);
837 xcb_block_len
+= xcb_tmp_len
;
838 xcb_tmp
+= xcb_tmp_len
;
840 xcb_align_to
= ALIGNOF(xcb_screen_t
);
842 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
843 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
850 return xcb_buffer_len
;
854 xcb_setup_vendor (const xcb_setup_t
*R
/**< */)
856 return (char *) (R
+ 1);
860 xcb_setup_vendor_length (const xcb_setup_t
*R
/**< */)
862 return R
->vendor_len
;
865 xcb_generic_iterator_t
866 xcb_setup_vendor_end (const xcb_setup_t
*R
/**< */)
868 xcb_generic_iterator_t i
;
869 i
.data
= ((char *) (R
+ 1)) + (R
->vendor_len
);
871 i
.index
= (char *) i
.data
- (char *) R
;
876 xcb_setup_pixmap_formats (const xcb_setup_t
*R
/**< */)
878 xcb_generic_iterator_t prev
= xcb_setup_vendor_end(R
);
879 return (xcb_format_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_format_t
, prev
.index
) + 0);
883 xcb_setup_pixmap_formats_length (const xcb_setup_t
*R
/**< */)
885 return R
->pixmap_formats_len
;
888 xcb_format_iterator_t
889 xcb_setup_pixmap_formats_iterator (const xcb_setup_t
*R
/**< */)
891 xcb_format_iterator_t i
;
892 xcb_generic_iterator_t prev
= xcb_setup_vendor_end(R
);
893 i
.data
= (xcb_format_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_format_t
, prev
.index
));
894 i
.rem
= R
->pixmap_formats_len
;
895 i
.index
= (char *) i
.data
- (char *) R
;
900 xcb_setup_roots_length (const xcb_setup_t
*R
/**< */)
905 xcb_screen_iterator_t
906 xcb_setup_roots_iterator (const xcb_setup_t
*R
/**< */)
908 xcb_screen_iterator_t i
;
909 xcb_generic_iterator_t prev
= xcb_format_end(xcb_setup_pixmap_formats_iterator(R
));
910 i
.data
= (xcb_screen_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_screen_t
, prev
.index
));
911 i
.rem
= R
->roots_len
;
912 i
.index
= (char *) i
.data
- (char *) R
;
917 xcb_setup_next (xcb_setup_iterator_t
*i
/**< */)
919 xcb_setup_t
*R
= i
->data
;
920 xcb_generic_iterator_t child
;
921 child
.data
= (xcb_setup_t
*)(((char *)R
) + xcb_setup_sizeof(R
));
922 i
->index
= (char *) child
.data
- (char *) i
->data
;
924 i
->data
= (xcb_setup_t
*) child
.data
;
927 xcb_generic_iterator_t
928 xcb_setup_end (xcb_setup_iterator_t i
/**< */)
930 xcb_generic_iterator_t ret
;
940 xcb_client_message_data_next (xcb_client_message_data_iterator_t
*i
/**< */)
944 i
->index
+= sizeof(xcb_client_message_data_t
);
947 xcb_generic_iterator_t
948 xcb_client_message_data_end (xcb_client_message_data_iterator_t i
/**< */)
950 xcb_generic_iterator_t ret
;
951 ret
.data
= i
.data
+ i
.rem
;
952 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
958 xcb_create_window_sizeof (const void *_buffer
/**< */)
960 char *xcb_tmp
= (char *)_buffer
;
961 const xcb_create_window_request_t
*_aux
= (xcb_create_window_request_t
*)_buffer
;
962 unsigned int xcb_buffer_len
= 0;
963 unsigned int xcb_block_len
= 0;
964 unsigned int xcb_pad
= 0;
965 unsigned int xcb_align_to
= 0;
968 xcb_block_len
+= sizeof(xcb_create_window_request_t
);
969 xcb_tmp
+= xcb_block_len
;
970 xcb_buffer_len
+= xcb_block_len
;
973 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
974 xcb_tmp
+= xcb_block_len
;
975 xcb_align_to
= ALIGNOF(uint32_t);
977 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
978 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
985 return xcb_buffer_len
;
989 xcb_create_window_checked (xcb_connection_t
*c
/**< */,
990 uint8_t depth
/**< */,
991 xcb_window_t wid
/**< */,
992 xcb_window_t parent
/**< */,
995 uint16_t width
/**< */,
996 uint16_t height
/**< */,
997 uint16_t border_width
/**< */,
998 uint16_t _class
/**< */,
999 xcb_visualid_t visual
/**< */,
1000 uint32_t value_mask
/**< */,
1001 const uint32_t *value_list
/**< */)
1003 static const xcb_protocol_request_t xcb_req
= {
1006 /* opcode */ XCB_CREATE_WINDOW
,
1010 struct iovec xcb_parts
[6];
1011 xcb_void_cookie_t xcb_ret
;
1012 xcb_create_window_request_t xcb_out
;
1014 xcb_out
.depth
= depth
;
1016 xcb_out
.parent
= parent
;
1019 xcb_out
.width
= width
;
1020 xcb_out
.height
= height
;
1021 xcb_out
.border_width
= border_width
;
1022 xcb_out
._class
= _class
;
1023 xcb_out
.visual
= visual
;
1024 xcb_out
.value_mask
= value_mask
;
1026 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1027 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1028 xcb_parts
[3].iov_base
= 0;
1029 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1030 /* uint32_t value_list */
1031 xcb_parts
[4].iov_base
= (char *) value_list
;
1032 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1033 xcb_parts
[5].iov_base
= 0;
1034 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1036 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1041 xcb_create_window (xcb_connection_t
*c
/**< */,
1042 uint8_t depth
/**< */,
1043 xcb_window_t wid
/**< */,
1044 xcb_window_t parent
/**< */,
1047 uint16_t width
/**< */,
1048 uint16_t height
/**< */,
1049 uint16_t border_width
/**< */,
1050 uint16_t _class
/**< */,
1051 xcb_visualid_t visual
/**< */,
1052 uint32_t value_mask
/**< */,
1053 const uint32_t *value_list
/**< */)
1055 static const xcb_protocol_request_t xcb_req
= {
1058 /* opcode */ XCB_CREATE_WINDOW
,
1062 struct iovec xcb_parts
[6];
1063 xcb_void_cookie_t xcb_ret
;
1064 xcb_create_window_request_t xcb_out
;
1066 xcb_out
.depth
= depth
;
1068 xcb_out
.parent
= parent
;
1071 xcb_out
.width
= width
;
1072 xcb_out
.height
= height
;
1073 xcb_out
.border_width
= border_width
;
1074 xcb_out
._class
= _class
;
1075 xcb_out
.visual
= visual
;
1076 xcb_out
.value_mask
= value_mask
;
1078 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1079 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1080 xcb_parts
[3].iov_base
= 0;
1081 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1082 /* uint32_t value_list */
1083 xcb_parts
[4].iov_base
= (char *) value_list
;
1084 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1085 xcb_parts
[5].iov_base
= 0;
1086 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1088 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1093 xcb_change_window_attributes_sizeof (const void *_buffer
/**< */)
1095 char *xcb_tmp
= (char *)_buffer
;
1096 const xcb_change_window_attributes_request_t
*_aux
= (xcb_change_window_attributes_request_t
*)_buffer
;
1097 unsigned int xcb_buffer_len
= 0;
1098 unsigned int xcb_block_len
= 0;
1099 unsigned int xcb_pad
= 0;
1100 unsigned int xcb_align_to
= 0;
1103 xcb_block_len
+= sizeof(xcb_change_window_attributes_request_t
);
1104 xcb_tmp
+= xcb_block_len
;
1105 xcb_buffer_len
+= xcb_block_len
;
1108 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
1109 xcb_tmp
+= xcb_block_len
;
1110 xcb_align_to
= ALIGNOF(uint32_t);
1111 /* insert padding */
1112 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1113 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1120 return xcb_buffer_len
;
1124 xcb_change_window_attributes_checked (xcb_connection_t
*c
/**< */,
1125 xcb_window_t window
/**< */,
1126 uint32_t value_mask
/**< */,
1127 const uint32_t *value_list
/**< */)
1129 static const xcb_protocol_request_t xcb_req
= {
1132 /* opcode */ XCB_CHANGE_WINDOW_ATTRIBUTES
,
1136 struct iovec xcb_parts
[6];
1137 xcb_void_cookie_t xcb_ret
;
1138 xcb_change_window_attributes_request_t xcb_out
;
1141 xcb_out
.window
= window
;
1142 xcb_out
.value_mask
= value_mask
;
1144 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1145 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1146 xcb_parts
[3].iov_base
= 0;
1147 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1148 /* uint32_t value_list */
1149 xcb_parts
[4].iov_base
= (char *) value_list
;
1150 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1151 xcb_parts
[5].iov_base
= 0;
1152 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1154 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1159 xcb_change_window_attributes (xcb_connection_t
*c
/**< */,
1160 xcb_window_t window
/**< */,
1161 uint32_t value_mask
/**< */,
1162 const uint32_t *value_list
/**< */)
1164 static const xcb_protocol_request_t xcb_req
= {
1167 /* opcode */ XCB_CHANGE_WINDOW_ATTRIBUTES
,
1171 struct iovec xcb_parts
[6];
1172 xcb_void_cookie_t xcb_ret
;
1173 xcb_change_window_attributes_request_t xcb_out
;
1176 xcb_out
.window
= window
;
1177 xcb_out
.value_mask
= value_mask
;
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;
1183 /* uint32_t value_list */
1184 xcb_parts
[4].iov_base
= (char *) value_list
;
1185 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1186 xcb_parts
[5].iov_base
= 0;
1187 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1189 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1193 xcb_get_window_attributes_cookie_t
1194 xcb_get_window_attributes (xcb_connection_t
*c
/**< */,
1195 xcb_window_t window
/**< */)
1197 static const xcb_protocol_request_t xcb_req
= {
1200 /* opcode */ XCB_GET_WINDOW_ATTRIBUTES
,
1204 struct iovec xcb_parts
[4];
1205 xcb_get_window_attributes_cookie_t xcb_ret
;
1206 xcb_get_window_attributes_request_t xcb_out
;
1209 xcb_out
.window
= window
;
1211 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1212 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1213 xcb_parts
[3].iov_base
= 0;
1214 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1216 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1220 xcb_get_window_attributes_cookie_t
1221 xcb_get_window_attributes_unchecked (xcb_connection_t
*c
/**< */,
1222 xcb_window_t window
/**< */)
1224 static const xcb_protocol_request_t xcb_req
= {
1227 /* opcode */ XCB_GET_WINDOW_ATTRIBUTES
,
1231 struct iovec xcb_parts
[4];
1232 xcb_get_window_attributes_cookie_t xcb_ret
;
1233 xcb_get_window_attributes_request_t xcb_out
;
1236 xcb_out
.window
= window
;
1238 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1239 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1240 xcb_parts
[3].iov_base
= 0;
1241 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1243 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1247 xcb_get_window_attributes_reply_t
*
1248 xcb_get_window_attributes_reply (xcb_connection_t
*c
/**< */,
1249 xcb_get_window_attributes_cookie_t cookie
/**< */,
1250 xcb_generic_error_t
**e
/**< */)
1252 return (xcb_get_window_attributes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1256 xcb_destroy_window_checked (xcb_connection_t
*c
/**< */,
1257 xcb_window_t window
/**< */)
1259 static const xcb_protocol_request_t xcb_req
= {
1262 /* opcode */ XCB_DESTROY_WINDOW
,
1266 struct iovec xcb_parts
[4];
1267 xcb_void_cookie_t xcb_ret
;
1268 xcb_destroy_window_request_t xcb_out
;
1271 xcb_out
.window
= window
;
1273 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1274 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1275 xcb_parts
[3].iov_base
= 0;
1276 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1278 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1283 xcb_destroy_window (xcb_connection_t
*c
/**< */,
1284 xcb_window_t window
/**< */)
1286 static const xcb_protocol_request_t xcb_req
= {
1289 /* opcode */ XCB_DESTROY_WINDOW
,
1293 struct iovec xcb_parts
[4];
1294 xcb_void_cookie_t xcb_ret
;
1295 xcb_destroy_window_request_t xcb_out
;
1298 xcb_out
.window
= window
;
1300 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1301 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1302 xcb_parts
[3].iov_base
= 0;
1303 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1305 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1310 xcb_destroy_subwindows_checked (xcb_connection_t
*c
/**< */,
1311 xcb_window_t window
/**< */)
1313 static const xcb_protocol_request_t xcb_req
= {
1316 /* opcode */ XCB_DESTROY_SUBWINDOWS
,
1320 struct iovec xcb_parts
[4];
1321 xcb_void_cookie_t xcb_ret
;
1322 xcb_destroy_subwindows_request_t xcb_out
;
1325 xcb_out
.window
= window
;
1327 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1328 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1329 xcb_parts
[3].iov_base
= 0;
1330 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1332 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1337 xcb_destroy_subwindows (xcb_connection_t
*c
/**< */,
1338 xcb_window_t window
/**< */)
1340 static const xcb_protocol_request_t xcb_req
= {
1343 /* opcode */ XCB_DESTROY_SUBWINDOWS
,
1347 struct iovec xcb_parts
[4];
1348 xcb_void_cookie_t xcb_ret
;
1349 xcb_destroy_subwindows_request_t xcb_out
;
1352 xcb_out
.window
= window
;
1354 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1355 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1356 xcb_parts
[3].iov_base
= 0;
1357 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1359 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1364 xcb_change_save_set_checked (xcb_connection_t
*c
/**< */,
1365 uint8_t mode
/**< */,
1366 xcb_window_t window
/**< */)
1368 static const xcb_protocol_request_t xcb_req
= {
1371 /* opcode */ XCB_CHANGE_SAVE_SET
,
1375 struct iovec xcb_parts
[4];
1376 xcb_void_cookie_t xcb_ret
;
1377 xcb_change_save_set_request_t xcb_out
;
1379 xcb_out
.mode
= mode
;
1380 xcb_out
.window
= window
;
1382 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1383 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1384 xcb_parts
[3].iov_base
= 0;
1385 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1387 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1392 xcb_change_save_set (xcb_connection_t
*c
/**< */,
1393 uint8_t mode
/**< */,
1394 xcb_window_t window
/**< */)
1396 static const xcb_protocol_request_t xcb_req
= {
1399 /* opcode */ XCB_CHANGE_SAVE_SET
,
1403 struct iovec xcb_parts
[4];
1404 xcb_void_cookie_t xcb_ret
;
1405 xcb_change_save_set_request_t xcb_out
;
1407 xcb_out
.mode
= mode
;
1408 xcb_out
.window
= window
;
1410 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1411 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1412 xcb_parts
[3].iov_base
= 0;
1413 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1415 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1420 xcb_reparent_window_checked (xcb_connection_t
*c
/**< */,
1421 xcb_window_t window
/**< */,
1422 xcb_window_t parent
/**< */,
1426 static const xcb_protocol_request_t xcb_req
= {
1429 /* opcode */ XCB_REPARENT_WINDOW
,
1433 struct iovec xcb_parts
[4];
1434 xcb_void_cookie_t xcb_ret
;
1435 xcb_reparent_window_request_t xcb_out
;
1438 xcb_out
.window
= window
;
1439 xcb_out
.parent
= parent
;
1443 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1444 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1445 xcb_parts
[3].iov_base
= 0;
1446 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1448 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1453 xcb_reparent_window (xcb_connection_t
*c
/**< */,
1454 xcb_window_t window
/**< */,
1455 xcb_window_t parent
/**< */,
1459 static const xcb_protocol_request_t xcb_req
= {
1462 /* opcode */ XCB_REPARENT_WINDOW
,
1466 struct iovec xcb_parts
[4];
1467 xcb_void_cookie_t xcb_ret
;
1468 xcb_reparent_window_request_t xcb_out
;
1471 xcb_out
.window
= window
;
1472 xcb_out
.parent
= parent
;
1476 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1477 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1478 xcb_parts
[3].iov_base
= 0;
1479 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1481 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1486 xcb_map_window_checked (xcb_connection_t
*c
/**< */,
1487 xcb_window_t window
/**< */)
1489 static const xcb_protocol_request_t xcb_req
= {
1492 /* opcode */ XCB_MAP_WINDOW
,
1496 struct iovec xcb_parts
[4];
1497 xcb_void_cookie_t xcb_ret
;
1498 xcb_map_window_request_t xcb_out
;
1501 xcb_out
.window
= window
;
1503 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1504 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1505 xcb_parts
[3].iov_base
= 0;
1506 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1508 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1513 xcb_map_window (xcb_connection_t
*c
/**< */,
1514 xcb_window_t window
/**< */)
1516 static const xcb_protocol_request_t xcb_req
= {
1519 /* opcode */ XCB_MAP_WINDOW
,
1523 struct iovec xcb_parts
[4];
1524 xcb_void_cookie_t xcb_ret
;
1525 xcb_map_window_request_t xcb_out
;
1528 xcb_out
.window
= window
;
1530 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1531 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1532 xcb_parts
[3].iov_base
= 0;
1533 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1535 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1540 xcb_map_subwindows_checked (xcb_connection_t
*c
/**< */,
1541 xcb_window_t window
/**< */)
1543 static const xcb_protocol_request_t xcb_req
= {
1546 /* opcode */ XCB_MAP_SUBWINDOWS
,
1550 struct iovec xcb_parts
[4];
1551 xcb_void_cookie_t xcb_ret
;
1552 xcb_map_subwindows_request_t xcb_out
;
1555 xcb_out
.window
= window
;
1557 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1558 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1559 xcb_parts
[3].iov_base
= 0;
1560 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1562 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1567 xcb_map_subwindows (xcb_connection_t
*c
/**< */,
1568 xcb_window_t window
/**< */)
1570 static const xcb_protocol_request_t xcb_req
= {
1573 /* opcode */ XCB_MAP_SUBWINDOWS
,
1577 struct iovec xcb_parts
[4];
1578 xcb_void_cookie_t xcb_ret
;
1579 xcb_map_subwindows_request_t xcb_out
;
1582 xcb_out
.window
= window
;
1584 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1585 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1586 xcb_parts
[3].iov_base
= 0;
1587 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1589 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1594 xcb_unmap_window_checked (xcb_connection_t
*c
/**< */,
1595 xcb_window_t window
/**< */)
1597 static const xcb_protocol_request_t xcb_req
= {
1600 /* opcode */ XCB_UNMAP_WINDOW
,
1604 struct iovec xcb_parts
[4];
1605 xcb_void_cookie_t xcb_ret
;
1606 xcb_unmap_window_request_t xcb_out
;
1609 xcb_out
.window
= window
;
1611 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1612 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1613 xcb_parts
[3].iov_base
= 0;
1614 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1616 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1621 xcb_unmap_window (xcb_connection_t
*c
/**< */,
1622 xcb_window_t window
/**< */)
1624 static const xcb_protocol_request_t xcb_req
= {
1627 /* opcode */ XCB_UNMAP_WINDOW
,
1631 struct iovec xcb_parts
[4];
1632 xcb_void_cookie_t xcb_ret
;
1633 xcb_unmap_window_request_t xcb_out
;
1636 xcb_out
.window
= window
;
1638 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1639 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1640 xcb_parts
[3].iov_base
= 0;
1641 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1643 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1648 xcb_unmap_subwindows_checked (xcb_connection_t
*c
/**< */,
1649 xcb_window_t window
/**< */)
1651 static const xcb_protocol_request_t xcb_req
= {
1654 /* opcode */ XCB_UNMAP_SUBWINDOWS
,
1658 struct iovec xcb_parts
[4];
1659 xcb_void_cookie_t xcb_ret
;
1660 xcb_unmap_subwindows_request_t xcb_out
;
1663 xcb_out
.window
= window
;
1665 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1666 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1667 xcb_parts
[3].iov_base
= 0;
1668 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1670 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1675 xcb_unmap_subwindows (xcb_connection_t
*c
/**< */,
1676 xcb_window_t window
/**< */)
1678 static const xcb_protocol_request_t xcb_req
= {
1681 /* opcode */ XCB_UNMAP_SUBWINDOWS
,
1685 struct iovec xcb_parts
[4];
1686 xcb_void_cookie_t xcb_ret
;
1687 xcb_unmap_subwindows_request_t xcb_out
;
1690 xcb_out
.window
= window
;
1692 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1693 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1694 xcb_parts
[3].iov_base
= 0;
1695 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1697 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1702 xcb_configure_window_sizeof (const void *_buffer
/**< */)
1704 char *xcb_tmp
= (char *)_buffer
;
1705 const xcb_configure_window_request_t
*_aux
= (xcb_configure_window_request_t
*)_buffer
;
1706 unsigned int xcb_buffer_len
= 0;
1707 unsigned int xcb_block_len
= 0;
1708 unsigned int xcb_pad
= 0;
1709 unsigned int xcb_align_to
= 0;
1712 xcb_block_len
+= sizeof(xcb_configure_window_request_t
);
1713 xcb_tmp
+= xcb_block_len
;
1714 xcb_buffer_len
+= xcb_block_len
;
1717 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
1718 xcb_tmp
+= xcb_block_len
;
1719 xcb_align_to
= ALIGNOF(uint32_t);
1720 /* insert padding */
1721 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1722 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1729 return xcb_buffer_len
;
1733 xcb_configure_window_checked (xcb_connection_t
*c
/**< */,
1734 xcb_window_t window
/**< */,
1735 uint16_t value_mask
/**< */,
1736 const uint32_t *value_list
/**< */)
1738 static const xcb_protocol_request_t xcb_req
= {
1741 /* opcode */ XCB_CONFIGURE_WINDOW
,
1745 struct iovec xcb_parts
[6];
1746 xcb_void_cookie_t xcb_ret
;
1747 xcb_configure_window_request_t xcb_out
;
1750 xcb_out
.window
= window
;
1751 xcb_out
.value_mask
= value_mask
;
1752 memset(xcb_out
.pad1
, 0, 2);
1754 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1755 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1756 xcb_parts
[3].iov_base
= 0;
1757 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1758 /* uint32_t value_list */
1759 xcb_parts
[4].iov_base
= (char *) value_list
;
1760 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1761 xcb_parts
[5].iov_base
= 0;
1762 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1764 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1769 xcb_configure_window (xcb_connection_t
*c
/**< */,
1770 xcb_window_t window
/**< */,
1771 uint16_t value_mask
/**< */,
1772 const uint32_t *value_list
/**< */)
1774 static const xcb_protocol_request_t xcb_req
= {
1777 /* opcode */ XCB_CONFIGURE_WINDOW
,
1781 struct iovec xcb_parts
[6];
1782 xcb_void_cookie_t xcb_ret
;
1783 xcb_configure_window_request_t xcb_out
;
1786 xcb_out
.window
= window
;
1787 xcb_out
.value_mask
= value_mask
;
1788 memset(xcb_out
.pad1
, 0, 2);
1790 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1791 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1792 xcb_parts
[3].iov_base
= 0;
1793 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1794 /* uint32_t value_list */
1795 xcb_parts
[4].iov_base
= (char *) value_list
;
1796 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
1797 xcb_parts
[5].iov_base
= 0;
1798 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1800 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1805 xcb_circulate_window_checked (xcb_connection_t
*c
/**< */,
1806 uint8_t direction
/**< */,
1807 xcb_window_t window
/**< */)
1809 static const xcb_protocol_request_t xcb_req
= {
1812 /* opcode */ XCB_CIRCULATE_WINDOW
,
1816 struct iovec xcb_parts
[4];
1817 xcb_void_cookie_t xcb_ret
;
1818 xcb_circulate_window_request_t xcb_out
;
1820 xcb_out
.direction
= direction
;
1821 xcb_out
.window
= window
;
1823 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1824 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1825 xcb_parts
[3].iov_base
= 0;
1826 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1828 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1833 xcb_circulate_window (xcb_connection_t
*c
/**< */,
1834 uint8_t direction
/**< */,
1835 xcb_window_t window
/**< */)
1837 static const xcb_protocol_request_t xcb_req
= {
1840 /* opcode */ XCB_CIRCULATE_WINDOW
,
1844 struct iovec xcb_parts
[4];
1845 xcb_void_cookie_t xcb_ret
;
1846 xcb_circulate_window_request_t xcb_out
;
1848 xcb_out
.direction
= direction
;
1849 xcb_out
.window
= window
;
1851 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1852 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1853 xcb_parts
[3].iov_base
= 0;
1854 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1856 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1860 xcb_get_geometry_cookie_t
1861 xcb_get_geometry (xcb_connection_t
*c
/**< */,
1862 xcb_drawable_t drawable
/**< */)
1864 static const xcb_protocol_request_t xcb_req
= {
1867 /* opcode */ XCB_GET_GEOMETRY
,
1871 struct iovec xcb_parts
[4];
1872 xcb_get_geometry_cookie_t xcb_ret
;
1873 xcb_get_geometry_request_t xcb_out
;
1876 xcb_out
.drawable
= drawable
;
1878 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1879 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1880 xcb_parts
[3].iov_base
= 0;
1881 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1883 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1887 xcb_get_geometry_cookie_t
1888 xcb_get_geometry_unchecked (xcb_connection_t
*c
/**< */,
1889 xcb_drawable_t drawable
/**< */)
1891 static const xcb_protocol_request_t xcb_req
= {
1894 /* opcode */ XCB_GET_GEOMETRY
,
1898 struct iovec xcb_parts
[4];
1899 xcb_get_geometry_cookie_t xcb_ret
;
1900 xcb_get_geometry_request_t xcb_out
;
1903 xcb_out
.drawable
= drawable
;
1905 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1906 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1907 xcb_parts
[3].iov_base
= 0;
1908 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1910 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1914 xcb_get_geometry_reply_t
*
1915 xcb_get_geometry_reply (xcb_connection_t
*c
/**< */,
1916 xcb_get_geometry_cookie_t cookie
/**< */,
1917 xcb_generic_error_t
**e
/**< */)
1919 return (xcb_get_geometry_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1923 xcb_query_tree_sizeof (const void *_buffer
/**< */)
1925 char *xcb_tmp
= (char *)_buffer
;
1926 const xcb_query_tree_reply_t
*_aux
= (xcb_query_tree_reply_t
*)_buffer
;
1927 unsigned int xcb_buffer_len
= 0;
1928 unsigned int xcb_block_len
= 0;
1929 unsigned int xcb_pad
= 0;
1930 unsigned int xcb_align_to
= 0;
1933 xcb_block_len
+= sizeof(xcb_query_tree_reply_t
);
1934 xcb_tmp
+= xcb_block_len
;
1935 xcb_buffer_len
+= xcb_block_len
;
1938 xcb_block_len
+= _aux
->children_len
* sizeof(xcb_window_t
);
1939 xcb_tmp
+= xcb_block_len
;
1940 xcb_align_to
= ALIGNOF(xcb_window_t
);
1941 /* insert padding */
1942 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1943 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1950 return xcb_buffer_len
;
1953 xcb_query_tree_cookie_t
1954 xcb_query_tree (xcb_connection_t
*c
/**< */,
1955 xcb_window_t window
/**< */)
1957 static const xcb_protocol_request_t xcb_req
= {
1960 /* opcode */ XCB_QUERY_TREE
,
1964 struct iovec xcb_parts
[4];
1965 xcb_query_tree_cookie_t xcb_ret
;
1966 xcb_query_tree_request_t xcb_out
;
1969 xcb_out
.window
= window
;
1971 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1972 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1973 xcb_parts
[3].iov_base
= 0;
1974 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1976 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1980 xcb_query_tree_cookie_t
1981 xcb_query_tree_unchecked (xcb_connection_t
*c
/**< */,
1982 xcb_window_t window
/**< */)
1984 static const xcb_protocol_request_t xcb_req
= {
1987 /* opcode */ XCB_QUERY_TREE
,
1991 struct iovec xcb_parts
[4];
1992 xcb_query_tree_cookie_t xcb_ret
;
1993 xcb_query_tree_request_t xcb_out
;
1996 xcb_out
.window
= window
;
1998 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1999 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2000 xcb_parts
[3].iov_base
= 0;
2001 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2003 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2008 xcb_query_tree_children (const xcb_query_tree_reply_t
*R
/**< */)
2010 return (xcb_window_t
*) (R
+ 1);
2014 xcb_query_tree_children_length (const xcb_query_tree_reply_t
*R
/**< */)
2016 return R
->children_len
;
2019 xcb_generic_iterator_t
2020 xcb_query_tree_children_end (const xcb_query_tree_reply_t
*R
/**< */)
2022 xcb_generic_iterator_t i
;
2023 i
.data
= ((xcb_window_t
*) (R
+ 1)) + (R
->children_len
);
2025 i
.index
= (char *) i
.data
- (char *) R
;
2029 xcb_query_tree_reply_t
*
2030 xcb_query_tree_reply (xcb_connection_t
*c
/**< */,
2031 xcb_query_tree_cookie_t cookie
/**< */,
2032 xcb_generic_error_t
**e
/**< */)
2034 return (xcb_query_tree_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2038 xcb_intern_atom_sizeof (const void *_buffer
/**< */)
2040 char *xcb_tmp
= (char *)_buffer
;
2041 const xcb_intern_atom_request_t
*_aux
= (xcb_intern_atom_request_t
*)_buffer
;
2042 unsigned int xcb_buffer_len
= 0;
2043 unsigned int xcb_block_len
= 0;
2044 unsigned int xcb_pad
= 0;
2045 unsigned int xcb_align_to
= 0;
2048 xcb_block_len
+= sizeof(xcb_intern_atom_request_t
);
2049 xcb_tmp
+= xcb_block_len
;
2050 xcb_buffer_len
+= xcb_block_len
;
2053 xcb_block_len
+= _aux
->name_len
* sizeof(char);
2054 xcb_tmp
+= xcb_block_len
;
2055 xcb_align_to
= ALIGNOF(char);
2056 /* insert padding */
2057 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2058 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2065 return xcb_buffer_len
;
2068 xcb_intern_atom_cookie_t
2069 xcb_intern_atom (xcb_connection_t
*c
/**< */,
2070 uint8_t only_if_exists
/**< */,
2071 uint16_t name_len
/**< */,
2072 const char *name
/**< */)
2074 static const xcb_protocol_request_t xcb_req
= {
2077 /* opcode */ XCB_INTERN_ATOM
,
2081 struct iovec xcb_parts
[6];
2082 xcb_intern_atom_cookie_t xcb_ret
;
2083 xcb_intern_atom_request_t xcb_out
;
2085 xcb_out
.only_if_exists
= only_if_exists
;
2086 xcb_out
.name_len
= name_len
;
2087 memset(xcb_out
.pad0
, 0, 2);
2089 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2090 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2091 xcb_parts
[3].iov_base
= 0;
2092 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2094 xcb_parts
[4].iov_base
= (char *) name
;
2095 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
2096 xcb_parts
[5].iov_base
= 0;
2097 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2099 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2103 xcb_intern_atom_cookie_t
2104 xcb_intern_atom_unchecked (xcb_connection_t
*c
/**< */,
2105 uint8_t only_if_exists
/**< */,
2106 uint16_t name_len
/**< */,
2107 const char *name
/**< */)
2109 static const xcb_protocol_request_t xcb_req
= {
2112 /* opcode */ XCB_INTERN_ATOM
,
2116 struct iovec xcb_parts
[6];
2117 xcb_intern_atom_cookie_t xcb_ret
;
2118 xcb_intern_atom_request_t xcb_out
;
2120 xcb_out
.only_if_exists
= only_if_exists
;
2121 xcb_out
.name_len
= name_len
;
2122 memset(xcb_out
.pad0
, 0, 2);
2124 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2125 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2126 xcb_parts
[3].iov_base
= 0;
2127 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2129 xcb_parts
[4].iov_base
= (char *) name
;
2130 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
2131 xcb_parts
[5].iov_base
= 0;
2132 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2134 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2138 xcb_intern_atom_reply_t
*
2139 xcb_intern_atom_reply (xcb_connection_t
*c
/**< */,
2140 xcb_intern_atom_cookie_t cookie
/**< */,
2141 xcb_generic_error_t
**e
/**< */)
2143 return (xcb_intern_atom_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2147 xcb_get_atom_name_sizeof (const void *_buffer
/**< */)
2149 char *xcb_tmp
= (char *)_buffer
;
2150 const xcb_get_atom_name_reply_t
*_aux
= (xcb_get_atom_name_reply_t
*)_buffer
;
2151 unsigned int xcb_buffer_len
= 0;
2152 unsigned int xcb_block_len
= 0;
2153 unsigned int xcb_pad
= 0;
2154 unsigned int xcb_align_to
= 0;
2157 xcb_block_len
+= sizeof(xcb_get_atom_name_reply_t
);
2158 xcb_tmp
+= xcb_block_len
;
2159 xcb_buffer_len
+= xcb_block_len
;
2162 xcb_block_len
+= _aux
->name_len
* sizeof(char);
2163 xcb_tmp
+= xcb_block_len
;
2164 xcb_align_to
= ALIGNOF(char);
2165 /* insert padding */
2166 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2167 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2174 return xcb_buffer_len
;
2177 xcb_get_atom_name_cookie_t
2178 xcb_get_atom_name (xcb_connection_t
*c
/**< */,
2179 xcb_atom_t atom
/**< */)
2181 static const xcb_protocol_request_t xcb_req
= {
2184 /* opcode */ XCB_GET_ATOM_NAME
,
2188 struct iovec xcb_parts
[4];
2189 xcb_get_atom_name_cookie_t xcb_ret
;
2190 xcb_get_atom_name_request_t xcb_out
;
2193 xcb_out
.atom
= atom
;
2195 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2196 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2197 xcb_parts
[3].iov_base
= 0;
2198 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2200 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2204 xcb_get_atom_name_cookie_t
2205 xcb_get_atom_name_unchecked (xcb_connection_t
*c
/**< */,
2206 xcb_atom_t atom
/**< */)
2208 static const xcb_protocol_request_t xcb_req
= {
2211 /* opcode */ XCB_GET_ATOM_NAME
,
2215 struct iovec xcb_parts
[4];
2216 xcb_get_atom_name_cookie_t xcb_ret
;
2217 xcb_get_atom_name_request_t xcb_out
;
2220 xcb_out
.atom
= atom
;
2222 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2223 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2224 xcb_parts
[3].iov_base
= 0;
2225 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2227 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2232 xcb_get_atom_name_name (const xcb_get_atom_name_reply_t
*R
/**< */)
2234 return (char *) (R
+ 1);
2238 xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t
*R
/**< */)
2243 xcb_generic_iterator_t
2244 xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t
*R
/**< */)
2246 xcb_generic_iterator_t i
;
2247 i
.data
= ((char *) (R
+ 1)) + (R
->name_len
);
2249 i
.index
= (char *) i
.data
- (char *) R
;
2253 xcb_get_atom_name_reply_t
*
2254 xcb_get_atom_name_reply (xcb_connection_t
*c
/**< */,
2255 xcb_get_atom_name_cookie_t cookie
/**< */,
2256 xcb_generic_error_t
**e
/**< */)
2258 return (xcb_get_atom_name_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2262 xcb_change_property_sizeof (const void *_buffer
/**< */)
2264 char *xcb_tmp
= (char *)_buffer
;
2265 const xcb_change_property_request_t
*_aux
= (xcb_change_property_request_t
*)_buffer
;
2266 unsigned int xcb_buffer_len
= 0;
2267 unsigned int xcb_block_len
= 0;
2268 unsigned int xcb_pad
= 0;
2269 unsigned int xcb_align_to
= 0;
2272 xcb_block_len
+= sizeof(xcb_change_property_request_t
);
2273 xcb_tmp
+= xcb_block_len
;
2274 xcb_buffer_len
+= xcb_block_len
;
2277 xcb_block_len
+= ((_aux
->data_len
* _aux
->format
) / 8) * sizeof(char);
2278 xcb_tmp
+= xcb_block_len
;
2279 xcb_align_to
= ALIGNOF(char);
2280 /* insert padding */
2281 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2282 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2289 return xcb_buffer_len
;
2293 xcb_change_property_checked (xcb_connection_t
*c
/**< */,
2294 uint8_t mode
/**< */,
2295 xcb_window_t window
/**< */,
2296 xcb_atom_t property
/**< */,
2297 xcb_atom_t type
/**< */,
2298 uint8_t format
/**< */,
2299 uint32_t data_len
/**< */,
2300 const void *data
/**< */)
2302 static const xcb_protocol_request_t xcb_req
= {
2305 /* opcode */ XCB_CHANGE_PROPERTY
,
2309 struct iovec xcb_parts
[6];
2310 xcb_void_cookie_t xcb_ret
;
2311 xcb_change_property_request_t xcb_out
;
2313 xcb_out
.mode
= mode
;
2314 xcb_out
.window
= window
;
2315 xcb_out
.property
= property
;
2316 xcb_out
.type
= type
;
2317 xcb_out
.format
= format
;
2318 memset(xcb_out
.pad0
, 0, 3);
2319 xcb_out
.data_len
= data_len
;
2321 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2322 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2323 xcb_parts
[3].iov_base
= 0;
2324 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2326 xcb_parts
[4].iov_base
= (char *) data
;
2327 xcb_parts
[4].iov_len
= ((data_len
* format
) / 8) * sizeof(char);
2328 xcb_parts
[5].iov_base
= 0;
2329 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2331 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2336 xcb_change_property (xcb_connection_t
*c
/**< */,
2337 uint8_t mode
/**< */,
2338 xcb_window_t window
/**< */,
2339 xcb_atom_t property
/**< */,
2340 xcb_atom_t type
/**< */,
2341 uint8_t format
/**< */,
2342 uint32_t data_len
/**< */,
2343 const void *data
/**< */)
2345 static const xcb_protocol_request_t xcb_req
= {
2348 /* opcode */ XCB_CHANGE_PROPERTY
,
2352 struct iovec xcb_parts
[6];
2353 xcb_void_cookie_t xcb_ret
;
2354 xcb_change_property_request_t xcb_out
;
2356 xcb_out
.mode
= mode
;
2357 xcb_out
.window
= window
;
2358 xcb_out
.property
= property
;
2359 xcb_out
.type
= type
;
2360 xcb_out
.format
= format
;
2361 memset(xcb_out
.pad0
, 0, 3);
2362 xcb_out
.data_len
= data_len
;
2364 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2365 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2366 xcb_parts
[3].iov_base
= 0;
2367 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2369 xcb_parts
[4].iov_base
= (char *) data
;
2370 xcb_parts
[4].iov_len
= ((data_len
* format
) / 8) * sizeof(char);
2371 xcb_parts
[5].iov_base
= 0;
2372 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
2374 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2379 xcb_delete_property_checked (xcb_connection_t
*c
/**< */,
2380 xcb_window_t window
/**< */,
2381 xcb_atom_t property
/**< */)
2383 static const xcb_protocol_request_t xcb_req
= {
2386 /* opcode */ XCB_DELETE_PROPERTY
,
2390 struct iovec xcb_parts
[4];
2391 xcb_void_cookie_t xcb_ret
;
2392 xcb_delete_property_request_t xcb_out
;
2395 xcb_out
.window
= window
;
2396 xcb_out
.property
= property
;
2398 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2399 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2400 xcb_parts
[3].iov_base
= 0;
2401 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2403 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2408 xcb_delete_property (xcb_connection_t
*c
/**< */,
2409 xcb_window_t window
/**< */,
2410 xcb_atom_t property
/**< */)
2412 static const xcb_protocol_request_t xcb_req
= {
2415 /* opcode */ XCB_DELETE_PROPERTY
,
2419 struct iovec xcb_parts
[4];
2420 xcb_void_cookie_t xcb_ret
;
2421 xcb_delete_property_request_t xcb_out
;
2424 xcb_out
.window
= window
;
2425 xcb_out
.property
= property
;
2427 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2428 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2429 xcb_parts
[3].iov_base
= 0;
2430 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2432 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2437 xcb_get_property_sizeof (const void *_buffer
/**< */)
2439 char *xcb_tmp
= (char *)_buffer
;
2440 const xcb_get_property_reply_t
*_aux
= (xcb_get_property_reply_t
*)_buffer
;
2441 unsigned int xcb_buffer_len
= 0;
2442 unsigned int xcb_block_len
= 0;
2443 unsigned int xcb_pad
= 0;
2444 unsigned int xcb_align_to
= 0;
2447 xcb_block_len
+= sizeof(xcb_get_property_reply_t
);
2448 xcb_tmp
+= xcb_block_len
;
2449 xcb_buffer_len
+= xcb_block_len
;
2452 xcb_block_len
+= (_aux
->value_len
* (_aux
->format
/ 8)) * sizeof(char);
2453 xcb_tmp
+= xcb_block_len
;
2454 xcb_align_to
= ALIGNOF(char);
2455 /* insert padding */
2456 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2457 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2464 return xcb_buffer_len
;
2467 xcb_get_property_cookie_t
2468 xcb_get_property (xcb_connection_t
*c
/**< */,
2469 uint8_t _delete
/**< */,
2470 xcb_window_t window
/**< */,
2471 xcb_atom_t property
/**< */,
2472 xcb_atom_t type
/**< */,
2473 uint32_t long_offset
/**< */,
2474 uint32_t long_length
/**< */)
2476 static const xcb_protocol_request_t xcb_req
= {
2479 /* opcode */ XCB_GET_PROPERTY
,
2483 struct iovec xcb_parts
[4];
2484 xcb_get_property_cookie_t xcb_ret
;
2485 xcb_get_property_request_t xcb_out
;
2487 xcb_out
._delete
= _delete
;
2488 xcb_out
.window
= window
;
2489 xcb_out
.property
= property
;
2490 xcb_out
.type
= type
;
2491 xcb_out
.long_offset
= long_offset
;
2492 xcb_out
.long_length
= long_length
;
2494 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2495 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2496 xcb_parts
[3].iov_base
= 0;
2497 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2499 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2503 xcb_get_property_cookie_t
2504 xcb_get_property_unchecked (xcb_connection_t
*c
/**< */,
2505 uint8_t _delete
/**< */,
2506 xcb_window_t window
/**< */,
2507 xcb_atom_t property
/**< */,
2508 xcb_atom_t type
/**< */,
2509 uint32_t long_offset
/**< */,
2510 uint32_t long_length
/**< */)
2512 static const xcb_protocol_request_t xcb_req
= {
2515 /* opcode */ XCB_GET_PROPERTY
,
2519 struct iovec xcb_parts
[4];
2520 xcb_get_property_cookie_t xcb_ret
;
2521 xcb_get_property_request_t xcb_out
;
2523 xcb_out
._delete
= _delete
;
2524 xcb_out
.window
= window
;
2525 xcb_out
.property
= property
;
2526 xcb_out
.type
= type
;
2527 xcb_out
.long_offset
= long_offset
;
2528 xcb_out
.long_length
= long_length
;
2530 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2531 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2532 xcb_parts
[3].iov_base
= 0;
2533 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2535 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2540 xcb_get_property_value (const xcb_get_property_reply_t
*R
/**< */)
2542 return (void *) (R
+ 1);
2546 xcb_get_property_value_length (const xcb_get_property_reply_t
*R
/**< */)
2548 return (R
->value_len
* (R
->format
/ 8));
2551 xcb_generic_iterator_t
2552 xcb_get_property_value_end (const xcb_get_property_reply_t
*R
/**< */)
2554 xcb_generic_iterator_t i
;
2555 i
.data
= ((char *) (R
+ 1)) + ((R
->value_len
* (R
->format
/ 8)));
2557 i
.index
= (char *) i
.data
- (char *) R
;
2561 xcb_get_property_reply_t
*
2562 xcb_get_property_reply (xcb_connection_t
*c
/**< */,
2563 xcb_get_property_cookie_t cookie
/**< */,
2564 xcb_generic_error_t
**e
/**< */)
2566 return (xcb_get_property_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2570 xcb_list_properties_sizeof (const void *_buffer
/**< */)
2572 char *xcb_tmp
= (char *)_buffer
;
2573 const xcb_list_properties_reply_t
*_aux
= (xcb_list_properties_reply_t
*)_buffer
;
2574 unsigned int xcb_buffer_len
= 0;
2575 unsigned int xcb_block_len
= 0;
2576 unsigned int xcb_pad
= 0;
2577 unsigned int xcb_align_to
= 0;
2580 xcb_block_len
+= sizeof(xcb_list_properties_reply_t
);
2581 xcb_tmp
+= xcb_block_len
;
2582 xcb_buffer_len
+= xcb_block_len
;
2585 xcb_block_len
+= _aux
->atoms_len
* sizeof(xcb_atom_t
);
2586 xcb_tmp
+= xcb_block_len
;
2587 xcb_align_to
= ALIGNOF(xcb_atom_t
);
2588 /* insert padding */
2589 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2590 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2597 return xcb_buffer_len
;
2600 xcb_list_properties_cookie_t
2601 xcb_list_properties (xcb_connection_t
*c
/**< */,
2602 xcb_window_t window
/**< */)
2604 static const xcb_protocol_request_t xcb_req
= {
2607 /* opcode */ XCB_LIST_PROPERTIES
,
2611 struct iovec xcb_parts
[4];
2612 xcb_list_properties_cookie_t xcb_ret
;
2613 xcb_list_properties_request_t xcb_out
;
2616 xcb_out
.window
= window
;
2618 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2619 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2620 xcb_parts
[3].iov_base
= 0;
2621 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2623 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2627 xcb_list_properties_cookie_t
2628 xcb_list_properties_unchecked (xcb_connection_t
*c
/**< */,
2629 xcb_window_t window
/**< */)
2631 static const xcb_protocol_request_t xcb_req
= {
2634 /* opcode */ XCB_LIST_PROPERTIES
,
2638 struct iovec xcb_parts
[4];
2639 xcb_list_properties_cookie_t xcb_ret
;
2640 xcb_list_properties_request_t xcb_out
;
2643 xcb_out
.window
= window
;
2645 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2646 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2647 xcb_parts
[3].iov_base
= 0;
2648 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2650 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2655 xcb_list_properties_atoms (const xcb_list_properties_reply_t
*R
/**< */)
2657 return (xcb_atom_t
*) (R
+ 1);
2661 xcb_list_properties_atoms_length (const xcb_list_properties_reply_t
*R
/**< */)
2663 return R
->atoms_len
;
2666 xcb_generic_iterator_t
2667 xcb_list_properties_atoms_end (const xcb_list_properties_reply_t
*R
/**< */)
2669 xcb_generic_iterator_t i
;
2670 i
.data
= ((xcb_atom_t
*) (R
+ 1)) + (R
->atoms_len
);
2672 i
.index
= (char *) i
.data
- (char *) R
;
2676 xcb_list_properties_reply_t
*
2677 xcb_list_properties_reply (xcb_connection_t
*c
/**< */,
2678 xcb_list_properties_cookie_t cookie
/**< */,
2679 xcb_generic_error_t
**e
/**< */)
2681 return (xcb_list_properties_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2685 xcb_set_selection_owner_checked (xcb_connection_t
*c
/**< */,
2686 xcb_window_t owner
/**< */,
2687 xcb_atom_t selection
/**< */,
2688 xcb_timestamp_t time
/**< */)
2690 static const xcb_protocol_request_t xcb_req
= {
2693 /* opcode */ XCB_SET_SELECTION_OWNER
,
2697 struct iovec xcb_parts
[4];
2698 xcb_void_cookie_t xcb_ret
;
2699 xcb_set_selection_owner_request_t xcb_out
;
2702 xcb_out
.owner
= owner
;
2703 xcb_out
.selection
= selection
;
2704 xcb_out
.time
= time
;
2706 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2707 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2708 xcb_parts
[3].iov_base
= 0;
2709 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2711 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2716 xcb_set_selection_owner (xcb_connection_t
*c
/**< */,
2717 xcb_window_t owner
/**< */,
2718 xcb_atom_t selection
/**< */,
2719 xcb_timestamp_t time
/**< */)
2721 static const xcb_protocol_request_t xcb_req
= {
2724 /* opcode */ XCB_SET_SELECTION_OWNER
,
2728 struct iovec xcb_parts
[4];
2729 xcb_void_cookie_t xcb_ret
;
2730 xcb_set_selection_owner_request_t xcb_out
;
2733 xcb_out
.owner
= owner
;
2734 xcb_out
.selection
= selection
;
2735 xcb_out
.time
= time
;
2737 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2738 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2739 xcb_parts
[3].iov_base
= 0;
2740 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2742 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2746 xcb_get_selection_owner_cookie_t
2747 xcb_get_selection_owner (xcb_connection_t
*c
/**< */,
2748 xcb_atom_t selection
/**< */)
2750 static const xcb_protocol_request_t xcb_req
= {
2753 /* opcode */ XCB_GET_SELECTION_OWNER
,
2757 struct iovec xcb_parts
[4];
2758 xcb_get_selection_owner_cookie_t xcb_ret
;
2759 xcb_get_selection_owner_request_t xcb_out
;
2762 xcb_out
.selection
= selection
;
2764 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2765 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2766 xcb_parts
[3].iov_base
= 0;
2767 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2769 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2773 xcb_get_selection_owner_cookie_t
2774 xcb_get_selection_owner_unchecked (xcb_connection_t
*c
/**< */,
2775 xcb_atom_t selection
/**< */)
2777 static const xcb_protocol_request_t xcb_req
= {
2780 /* opcode */ XCB_GET_SELECTION_OWNER
,
2784 struct iovec xcb_parts
[4];
2785 xcb_get_selection_owner_cookie_t xcb_ret
;
2786 xcb_get_selection_owner_request_t xcb_out
;
2789 xcb_out
.selection
= selection
;
2791 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2792 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2793 xcb_parts
[3].iov_base
= 0;
2794 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2796 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2800 xcb_get_selection_owner_reply_t
*
2801 xcb_get_selection_owner_reply (xcb_connection_t
*c
/**< */,
2802 xcb_get_selection_owner_cookie_t cookie
/**< */,
2803 xcb_generic_error_t
**e
/**< */)
2805 return (xcb_get_selection_owner_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2809 xcb_convert_selection_checked (xcb_connection_t
*c
/**< */,
2810 xcb_window_t requestor
/**< */,
2811 xcb_atom_t selection
/**< */,
2812 xcb_atom_t target
/**< */,
2813 xcb_atom_t property
/**< */,
2814 xcb_timestamp_t time
/**< */)
2816 static const xcb_protocol_request_t xcb_req
= {
2819 /* opcode */ XCB_CONVERT_SELECTION
,
2823 struct iovec xcb_parts
[4];
2824 xcb_void_cookie_t xcb_ret
;
2825 xcb_convert_selection_request_t xcb_out
;
2828 xcb_out
.requestor
= requestor
;
2829 xcb_out
.selection
= selection
;
2830 xcb_out
.target
= target
;
2831 xcb_out
.property
= property
;
2832 xcb_out
.time
= time
;
2834 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2835 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2836 xcb_parts
[3].iov_base
= 0;
2837 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2839 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2844 xcb_convert_selection (xcb_connection_t
*c
/**< */,
2845 xcb_window_t requestor
/**< */,
2846 xcb_atom_t selection
/**< */,
2847 xcb_atom_t target
/**< */,
2848 xcb_atom_t property
/**< */,
2849 xcb_timestamp_t time
/**< */)
2851 static const xcb_protocol_request_t xcb_req
= {
2854 /* opcode */ XCB_CONVERT_SELECTION
,
2858 struct iovec xcb_parts
[4];
2859 xcb_void_cookie_t xcb_ret
;
2860 xcb_convert_selection_request_t xcb_out
;
2863 xcb_out
.requestor
= requestor
;
2864 xcb_out
.selection
= selection
;
2865 xcb_out
.target
= target
;
2866 xcb_out
.property
= property
;
2867 xcb_out
.time
= time
;
2869 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2870 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2871 xcb_parts
[3].iov_base
= 0;
2872 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2874 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2879 xcb_send_event_checked (xcb_connection_t
*c
/**< */,
2880 uint8_t propagate
/**< */,
2881 xcb_window_t destination
/**< */,
2882 uint32_t event_mask
/**< */,
2883 const char *event
/**< */)
2885 static const xcb_protocol_request_t xcb_req
= {
2888 /* opcode */ XCB_SEND_EVENT
,
2892 struct iovec xcb_parts
[4];
2893 xcb_void_cookie_t xcb_ret
;
2894 xcb_send_event_request_t xcb_out
;
2896 xcb_out
.propagate
= propagate
;
2897 xcb_out
.destination
= destination
;
2898 xcb_out
.event_mask
= event_mask
;
2899 memcpy(xcb_out
.event
, event
, 32);
2901 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2902 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2903 xcb_parts
[3].iov_base
= 0;
2904 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2906 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2911 xcb_send_event (xcb_connection_t
*c
/**< */,
2912 uint8_t propagate
/**< */,
2913 xcb_window_t destination
/**< */,
2914 uint32_t event_mask
/**< */,
2915 const char *event
/**< */)
2917 static const xcb_protocol_request_t xcb_req
= {
2920 /* opcode */ XCB_SEND_EVENT
,
2924 struct iovec xcb_parts
[4];
2925 xcb_void_cookie_t xcb_ret
;
2926 xcb_send_event_request_t xcb_out
;
2928 xcb_out
.propagate
= propagate
;
2929 xcb_out
.destination
= destination
;
2930 xcb_out
.event_mask
= event_mask
;
2931 memcpy(xcb_out
.event
, event
, 32);
2933 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2934 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2935 xcb_parts
[3].iov_base
= 0;
2936 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2938 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2942 xcb_grab_pointer_cookie_t
2943 xcb_grab_pointer (xcb_connection_t
*c
/**< */,
2944 uint8_t owner_events
/**< */,
2945 xcb_window_t grab_window
/**< */,
2946 uint16_t event_mask
/**< */,
2947 uint8_t pointer_mode
/**< */,
2948 uint8_t keyboard_mode
/**< */,
2949 xcb_window_t confine_to
/**< */,
2950 xcb_cursor_t cursor
/**< */,
2951 xcb_timestamp_t time
/**< */)
2953 static const xcb_protocol_request_t xcb_req
= {
2956 /* opcode */ XCB_GRAB_POINTER
,
2960 struct iovec xcb_parts
[4];
2961 xcb_grab_pointer_cookie_t xcb_ret
;
2962 xcb_grab_pointer_request_t xcb_out
;
2964 xcb_out
.owner_events
= owner_events
;
2965 xcb_out
.grab_window
= grab_window
;
2966 xcb_out
.event_mask
= event_mask
;
2967 xcb_out
.pointer_mode
= pointer_mode
;
2968 xcb_out
.keyboard_mode
= keyboard_mode
;
2969 xcb_out
.confine_to
= confine_to
;
2970 xcb_out
.cursor
= cursor
;
2971 xcb_out
.time
= time
;
2973 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2974 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2975 xcb_parts
[3].iov_base
= 0;
2976 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2978 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2982 xcb_grab_pointer_cookie_t
2983 xcb_grab_pointer_unchecked (xcb_connection_t
*c
/**< */,
2984 uint8_t owner_events
/**< */,
2985 xcb_window_t grab_window
/**< */,
2986 uint16_t event_mask
/**< */,
2987 uint8_t pointer_mode
/**< */,
2988 uint8_t keyboard_mode
/**< */,
2989 xcb_window_t confine_to
/**< */,
2990 xcb_cursor_t cursor
/**< */,
2991 xcb_timestamp_t time
/**< */)
2993 static const xcb_protocol_request_t xcb_req
= {
2996 /* opcode */ XCB_GRAB_POINTER
,
3000 struct iovec xcb_parts
[4];
3001 xcb_grab_pointer_cookie_t xcb_ret
;
3002 xcb_grab_pointer_request_t xcb_out
;
3004 xcb_out
.owner_events
= owner_events
;
3005 xcb_out
.grab_window
= grab_window
;
3006 xcb_out
.event_mask
= event_mask
;
3007 xcb_out
.pointer_mode
= pointer_mode
;
3008 xcb_out
.keyboard_mode
= keyboard_mode
;
3009 xcb_out
.confine_to
= confine_to
;
3010 xcb_out
.cursor
= cursor
;
3011 xcb_out
.time
= time
;
3013 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3014 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3015 xcb_parts
[3].iov_base
= 0;
3016 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3018 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3022 xcb_grab_pointer_reply_t
*
3023 xcb_grab_pointer_reply (xcb_connection_t
*c
/**< */,
3024 xcb_grab_pointer_cookie_t cookie
/**< */,
3025 xcb_generic_error_t
**e
/**< */)
3027 return (xcb_grab_pointer_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3031 xcb_ungrab_pointer_checked (xcb_connection_t
*c
/**< */,
3032 xcb_timestamp_t time
/**< */)
3034 static const xcb_protocol_request_t xcb_req
= {
3037 /* opcode */ XCB_UNGRAB_POINTER
,
3041 struct iovec xcb_parts
[4];
3042 xcb_void_cookie_t xcb_ret
;
3043 xcb_ungrab_pointer_request_t xcb_out
;
3046 xcb_out
.time
= time
;
3048 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3049 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3050 xcb_parts
[3].iov_base
= 0;
3051 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3053 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3058 xcb_ungrab_pointer (xcb_connection_t
*c
/**< */,
3059 xcb_timestamp_t time
/**< */)
3061 static const xcb_protocol_request_t xcb_req
= {
3064 /* opcode */ XCB_UNGRAB_POINTER
,
3068 struct iovec xcb_parts
[4];
3069 xcb_void_cookie_t xcb_ret
;
3070 xcb_ungrab_pointer_request_t xcb_out
;
3073 xcb_out
.time
= time
;
3075 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3076 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3077 xcb_parts
[3].iov_base
= 0;
3078 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3080 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3085 xcb_grab_button_checked (xcb_connection_t
*c
/**< */,
3086 uint8_t owner_events
/**< */,
3087 xcb_window_t grab_window
/**< */,
3088 uint16_t event_mask
/**< */,
3089 uint8_t pointer_mode
/**< */,
3090 uint8_t keyboard_mode
/**< */,
3091 xcb_window_t confine_to
/**< */,
3092 xcb_cursor_t cursor
/**< */,
3093 uint8_t button
/**< */,
3094 uint16_t modifiers
/**< */)
3096 static const xcb_protocol_request_t xcb_req
= {
3099 /* opcode */ XCB_GRAB_BUTTON
,
3103 struct iovec xcb_parts
[4];
3104 xcb_void_cookie_t xcb_ret
;
3105 xcb_grab_button_request_t xcb_out
;
3107 xcb_out
.owner_events
= owner_events
;
3108 xcb_out
.grab_window
= grab_window
;
3109 xcb_out
.event_mask
= event_mask
;
3110 xcb_out
.pointer_mode
= pointer_mode
;
3111 xcb_out
.keyboard_mode
= keyboard_mode
;
3112 xcb_out
.confine_to
= confine_to
;
3113 xcb_out
.cursor
= cursor
;
3114 xcb_out
.button
= button
;
3116 xcb_out
.modifiers
= modifiers
;
3118 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3119 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3120 xcb_parts
[3].iov_base
= 0;
3121 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3123 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3128 xcb_grab_button (xcb_connection_t
*c
/**< */,
3129 uint8_t owner_events
/**< */,
3130 xcb_window_t grab_window
/**< */,
3131 uint16_t event_mask
/**< */,
3132 uint8_t pointer_mode
/**< */,
3133 uint8_t keyboard_mode
/**< */,
3134 xcb_window_t confine_to
/**< */,
3135 xcb_cursor_t cursor
/**< */,
3136 uint8_t button
/**< */,
3137 uint16_t modifiers
/**< */)
3139 static const xcb_protocol_request_t xcb_req
= {
3142 /* opcode */ XCB_GRAB_BUTTON
,
3146 struct iovec xcb_parts
[4];
3147 xcb_void_cookie_t xcb_ret
;
3148 xcb_grab_button_request_t xcb_out
;
3150 xcb_out
.owner_events
= owner_events
;
3151 xcb_out
.grab_window
= grab_window
;
3152 xcb_out
.event_mask
= event_mask
;
3153 xcb_out
.pointer_mode
= pointer_mode
;
3154 xcb_out
.keyboard_mode
= keyboard_mode
;
3155 xcb_out
.confine_to
= confine_to
;
3156 xcb_out
.cursor
= cursor
;
3157 xcb_out
.button
= button
;
3159 xcb_out
.modifiers
= modifiers
;
3161 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3162 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3163 xcb_parts
[3].iov_base
= 0;
3164 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3166 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3171 xcb_ungrab_button_checked (xcb_connection_t
*c
/**< */,
3172 uint8_t button
/**< */,
3173 xcb_window_t grab_window
/**< */,
3174 uint16_t modifiers
/**< */)
3176 static const xcb_protocol_request_t xcb_req
= {
3179 /* opcode */ XCB_UNGRAB_BUTTON
,
3183 struct iovec xcb_parts
[4];
3184 xcb_void_cookie_t xcb_ret
;
3185 xcb_ungrab_button_request_t xcb_out
;
3187 xcb_out
.button
= button
;
3188 xcb_out
.grab_window
= grab_window
;
3189 xcb_out
.modifiers
= modifiers
;
3190 memset(xcb_out
.pad0
, 0, 2);
3192 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3193 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3194 xcb_parts
[3].iov_base
= 0;
3195 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3197 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3202 xcb_ungrab_button (xcb_connection_t
*c
/**< */,
3203 uint8_t button
/**< */,
3204 xcb_window_t grab_window
/**< */,
3205 uint16_t modifiers
/**< */)
3207 static const xcb_protocol_request_t xcb_req
= {
3210 /* opcode */ XCB_UNGRAB_BUTTON
,
3214 struct iovec xcb_parts
[4];
3215 xcb_void_cookie_t xcb_ret
;
3216 xcb_ungrab_button_request_t xcb_out
;
3218 xcb_out
.button
= button
;
3219 xcb_out
.grab_window
= grab_window
;
3220 xcb_out
.modifiers
= modifiers
;
3221 memset(xcb_out
.pad0
, 0, 2);
3223 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3224 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3225 xcb_parts
[3].iov_base
= 0;
3226 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3228 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3233 xcb_change_active_pointer_grab_checked (xcb_connection_t
*c
/**< */,
3234 xcb_cursor_t cursor
/**< */,
3235 xcb_timestamp_t time
/**< */,
3236 uint16_t event_mask
/**< */)
3238 static const xcb_protocol_request_t xcb_req
= {
3241 /* opcode */ XCB_CHANGE_ACTIVE_POINTER_GRAB
,
3245 struct iovec xcb_parts
[4];
3246 xcb_void_cookie_t xcb_ret
;
3247 xcb_change_active_pointer_grab_request_t xcb_out
;
3250 xcb_out
.cursor
= cursor
;
3251 xcb_out
.time
= time
;
3252 xcb_out
.event_mask
= event_mask
;
3253 memset(xcb_out
.pad1
, 0, 2);
3255 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3256 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3257 xcb_parts
[3].iov_base
= 0;
3258 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3260 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3265 xcb_change_active_pointer_grab (xcb_connection_t
*c
/**< */,
3266 xcb_cursor_t cursor
/**< */,
3267 xcb_timestamp_t time
/**< */,
3268 uint16_t event_mask
/**< */)
3270 static const xcb_protocol_request_t xcb_req
= {
3273 /* opcode */ XCB_CHANGE_ACTIVE_POINTER_GRAB
,
3277 struct iovec xcb_parts
[4];
3278 xcb_void_cookie_t xcb_ret
;
3279 xcb_change_active_pointer_grab_request_t xcb_out
;
3282 xcb_out
.cursor
= cursor
;
3283 xcb_out
.time
= time
;
3284 xcb_out
.event_mask
= event_mask
;
3285 memset(xcb_out
.pad1
, 0, 2);
3287 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3288 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3289 xcb_parts
[3].iov_base
= 0;
3290 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3292 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3296 xcb_grab_keyboard_cookie_t
3297 xcb_grab_keyboard (xcb_connection_t
*c
/**< */,
3298 uint8_t owner_events
/**< */,
3299 xcb_window_t grab_window
/**< */,
3300 xcb_timestamp_t time
/**< */,
3301 uint8_t pointer_mode
/**< */,
3302 uint8_t keyboard_mode
/**< */)
3304 static const xcb_protocol_request_t xcb_req
= {
3307 /* opcode */ XCB_GRAB_KEYBOARD
,
3311 struct iovec xcb_parts
[4];
3312 xcb_grab_keyboard_cookie_t xcb_ret
;
3313 xcb_grab_keyboard_request_t xcb_out
;
3315 xcb_out
.owner_events
= owner_events
;
3316 xcb_out
.grab_window
= grab_window
;
3317 xcb_out
.time
= time
;
3318 xcb_out
.pointer_mode
= pointer_mode
;
3319 xcb_out
.keyboard_mode
= keyboard_mode
;
3320 memset(xcb_out
.pad0
, 0, 2);
3322 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3323 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3324 xcb_parts
[3].iov_base
= 0;
3325 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3327 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3331 xcb_grab_keyboard_cookie_t
3332 xcb_grab_keyboard_unchecked (xcb_connection_t
*c
/**< */,
3333 uint8_t owner_events
/**< */,
3334 xcb_window_t grab_window
/**< */,
3335 xcb_timestamp_t time
/**< */,
3336 uint8_t pointer_mode
/**< */,
3337 uint8_t keyboard_mode
/**< */)
3339 static const xcb_protocol_request_t xcb_req
= {
3342 /* opcode */ XCB_GRAB_KEYBOARD
,
3346 struct iovec xcb_parts
[4];
3347 xcb_grab_keyboard_cookie_t xcb_ret
;
3348 xcb_grab_keyboard_request_t xcb_out
;
3350 xcb_out
.owner_events
= owner_events
;
3351 xcb_out
.grab_window
= grab_window
;
3352 xcb_out
.time
= time
;
3353 xcb_out
.pointer_mode
= pointer_mode
;
3354 xcb_out
.keyboard_mode
= keyboard_mode
;
3355 memset(xcb_out
.pad0
, 0, 2);
3357 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3358 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3359 xcb_parts
[3].iov_base
= 0;
3360 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3362 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3366 xcb_grab_keyboard_reply_t
*
3367 xcb_grab_keyboard_reply (xcb_connection_t
*c
/**< */,
3368 xcb_grab_keyboard_cookie_t cookie
/**< */,
3369 xcb_generic_error_t
**e
/**< */)
3371 return (xcb_grab_keyboard_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3375 xcb_ungrab_keyboard_checked (xcb_connection_t
*c
/**< */,
3376 xcb_timestamp_t time
/**< */)
3378 static const xcb_protocol_request_t xcb_req
= {
3381 /* opcode */ XCB_UNGRAB_KEYBOARD
,
3385 struct iovec xcb_parts
[4];
3386 xcb_void_cookie_t xcb_ret
;
3387 xcb_ungrab_keyboard_request_t xcb_out
;
3390 xcb_out
.time
= time
;
3392 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3393 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3394 xcb_parts
[3].iov_base
= 0;
3395 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3397 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3402 xcb_ungrab_keyboard (xcb_connection_t
*c
/**< */,
3403 xcb_timestamp_t time
/**< */)
3405 static const xcb_protocol_request_t xcb_req
= {
3408 /* opcode */ XCB_UNGRAB_KEYBOARD
,
3412 struct iovec xcb_parts
[4];
3413 xcb_void_cookie_t xcb_ret
;
3414 xcb_ungrab_keyboard_request_t xcb_out
;
3417 xcb_out
.time
= time
;
3419 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3420 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3421 xcb_parts
[3].iov_base
= 0;
3422 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3424 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3429 xcb_grab_key_checked (xcb_connection_t
*c
/**< */,
3430 uint8_t owner_events
/**< */,
3431 xcb_window_t grab_window
/**< */,
3432 uint16_t modifiers
/**< */,
3433 xcb_keycode_t key
/**< */,
3434 uint8_t pointer_mode
/**< */,
3435 uint8_t keyboard_mode
/**< */)
3437 static const xcb_protocol_request_t xcb_req
= {
3440 /* opcode */ XCB_GRAB_KEY
,
3444 struct iovec xcb_parts
[4];
3445 xcb_void_cookie_t xcb_ret
;
3446 xcb_grab_key_request_t xcb_out
;
3448 xcb_out
.owner_events
= owner_events
;
3449 xcb_out
.grab_window
= grab_window
;
3450 xcb_out
.modifiers
= modifiers
;
3452 xcb_out
.pointer_mode
= pointer_mode
;
3453 xcb_out
.keyboard_mode
= keyboard_mode
;
3454 memset(xcb_out
.pad0
, 0, 3);
3456 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3457 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3458 xcb_parts
[3].iov_base
= 0;
3459 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3461 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3466 xcb_grab_key (xcb_connection_t
*c
/**< */,
3467 uint8_t owner_events
/**< */,
3468 xcb_window_t grab_window
/**< */,
3469 uint16_t modifiers
/**< */,
3470 xcb_keycode_t key
/**< */,
3471 uint8_t pointer_mode
/**< */,
3472 uint8_t keyboard_mode
/**< */)
3474 static const xcb_protocol_request_t xcb_req
= {
3477 /* opcode */ XCB_GRAB_KEY
,
3481 struct iovec xcb_parts
[4];
3482 xcb_void_cookie_t xcb_ret
;
3483 xcb_grab_key_request_t xcb_out
;
3485 xcb_out
.owner_events
= owner_events
;
3486 xcb_out
.grab_window
= grab_window
;
3487 xcb_out
.modifiers
= modifiers
;
3489 xcb_out
.pointer_mode
= pointer_mode
;
3490 xcb_out
.keyboard_mode
= keyboard_mode
;
3491 memset(xcb_out
.pad0
, 0, 3);
3493 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3494 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3495 xcb_parts
[3].iov_base
= 0;
3496 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3498 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3503 xcb_ungrab_key_checked (xcb_connection_t
*c
/**< */,
3504 xcb_keycode_t key
/**< */,
3505 xcb_window_t grab_window
/**< */,
3506 uint16_t modifiers
/**< */)
3508 static const xcb_protocol_request_t xcb_req
= {
3511 /* opcode */ XCB_UNGRAB_KEY
,
3515 struct iovec xcb_parts
[4];
3516 xcb_void_cookie_t xcb_ret
;
3517 xcb_ungrab_key_request_t xcb_out
;
3520 xcb_out
.grab_window
= grab_window
;
3521 xcb_out
.modifiers
= modifiers
;
3522 memset(xcb_out
.pad0
, 0, 2);
3524 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3525 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3526 xcb_parts
[3].iov_base
= 0;
3527 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3529 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3534 xcb_ungrab_key (xcb_connection_t
*c
/**< */,
3535 xcb_keycode_t key
/**< */,
3536 xcb_window_t grab_window
/**< */,
3537 uint16_t modifiers
/**< */)
3539 static const xcb_protocol_request_t xcb_req
= {
3542 /* opcode */ XCB_UNGRAB_KEY
,
3546 struct iovec xcb_parts
[4];
3547 xcb_void_cookie_t xcb_ret
;
3548 xcb_ungrab_key_request_t xcb_out
;
3551 xcb_out
.grab_window
= grab_window
;
3552 xcb_out
.modifiers
= modifiers
;
3553 memset(xcb_out
.pad0
, 0, 2);
3555 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3556 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3557 xcb_parts
[3].iov_base
= 0;
3558 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3560 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3565 xcb_allow_events_checked (xcb_connection_t
*c
/**< */,
3566 uint8_t mode
/**< */,
3567 xcb_timestamp_t time
/**< */)
3569 static const xcb_protocol_request_t xcb_req
= {
3572 /* opcode */ XCB_ALLOW_EVENTS
,
3576 struct iovec xcb_parts
[4];
3577 xcb_void_cookie_t xcb_ret
;
3578 xcb_allow_events_request_t xcb_out
;
3580 xcb_out
.mode
= mode
;
3581 xcb_out
.time
= time
;
3583 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3584 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3585 xcb_parts
[3].iov_base
= 0;
3586 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3588 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3593 xcb_allow_events (xcb_connection_t
*c
/**< */,
3594 uint8_t mode
/**< */,
3595 xcb_timestamp_t time
/**< */)
3597 static const xcb_protocol_request_t xcb_req
= {
3600 /* opcode */ XCB_ALLOW_EVENTS
,
3604 struct iovec xcb_parts
[4];
3605 xcb_void_cookie_t xcb_ret
;
3606 xcb_allow_events_request_t xcb_out
;
3608 xcb_out
.mode
= mode
;
3609 xcb_out
.time
= time
;
3611 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3612 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3613 xcb_parts
[3].iov_base
= 0;
3614 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3616 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3621 xcb_grab_server_checked (xcb_connection_t
*c
/**< */)
3623 static const xcb_protocol_request_t xcb_req
= {
3626 /* opcode */ XCB_GRAB_SERVER
,
3630 struct iovec xcb_parts
[4];
3631 xcb_void_cookie_t xcb_ret
;
3632 xcb_grab_server_request_t xcb_out
;
3636 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3637 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3638 xcb_parts
[3].iov_base
= 0;
3639 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3641 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3646 xcb_grab_server (xcb_connection_t
*c
/**< */)
3648 static const xcb_protocol_request_t xcb_req
= {
3651 /* opcode */ XCB_GRAB_SERVER
,
3655 struct iovec xcb_parts
[4];
3656 xcb_void_cookie_t xcb_ret
;
3657 xcb_grab_server_request_t xcb_out
;
3661 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3662 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3663 xcb_parts
[3].iov_base
= 0;
3664 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3666 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3671 xcb_ungrab_server_checked (xcb_connection_t
*c
/**< */)
3673 static const xcb_protocol_request_t xcb_req
= {
3676 /* opcode */ XCB_UNGRAB_SERVER
,
3680 struct iovec xcb_parts
[4];
3681 xcb_void_cookie_t xcb_ret
;
3682 xcb_ungrab_server_request_t xcb_out
;
3686 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3687 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3688 xcb_parts
[3].iov_base
= 0;
3689 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3691 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3696 xcb_ungrab_server (xcb_connection_t
*c
/**< */)
3698 static const xcb_protocol_request_t xcb_req
= {
3701 /* opcode */ XCB_UNGRAB_SERVER
,
3705 struct iovec xcb_parts
[4];
3706 xcb_void_cookie_t xcb_ret
;
3707 xcb_ungrab_server_request_t xcb_out
;
3711 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3712 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3713 xcb_parts
[3].iov_base
= 0;
3714 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3716 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3720 xcb_query_pointer_cookie_t
3721 xcb_query_pointer (xcb_connection_t
*c
/**< */,
3722 xcb_window_t window
/**< */)
3724 static const xcb_protocol_request_t xcb_req
= {
3727 /* opcode */ XCB_QUERY_POINTER
,
3731 struct iovec xcb_parts
[4];
3732 xcb_query_pointer_cookie_t xcb_ret
;
3733 xcb_query_pointer_request_t xcb_out
;
3736 xcb_out
.window
= window
;
3738 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3739 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3740 xcb_parts
[3].iov_base
= 0;
3741 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3743 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3747 xcb_query_pointer_cookie_t
3748 xcb_query_pointer_unchecked (xcb_connection_t
*c
/**< */,
3749 xcb_window_t window
/**< */)
3751 static const xcb_protocol_request_t xcb_req
= {
3754 /* opcode */ XCB_QUERY_POINTER
,
3758 struct iovec xcb_parts
[4];
3759 xcb_query_pointer_cookie_t xcb_ret
;
3760 xcb_query_pointer_request_t xcb_out
;
3763 xcb_out
.window
= window
;
3765 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3766 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3767 xcb_parts
[3].iov_base
= 0;
3768 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3770 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3774 xcb_query_pointer_reply_t
*
3775 xcb_query_pointer_reply (xcb_connection_t
*c
/**< */,
3776 xcb_query_pointer_cookie_t cookie
/**< */,
3777 xcb_generic_error_t
**e
/**< */)
3779 return (xcb_query_pointer_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3783 xcb_timecoord_next (xcb_timecoord_iterator_t
*i
/**< */)
3787 i
->index
+= sizeof(xcb_timecoord_t
);
3790 xcb_generic_iterator_t
3791 xcb_timecoord_end (xcb_timecoord_iterator_t i
/**< */)
3793 xcb_generic_iterator_t ret
;
3794 ret
.data
= i
.data
+ i
.rem
;
3795 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
3801 xcb_get_motion_events_sizeof (const void *_buffer
/**< */)
3803 char *xcb_tmp
= (char *)_buffer
;
3804 const xcb_get_motion_events_reply_t
*_aux
= (xcb_get_motion_events_reply_t
*)_buffer
;
3805 unsigned int xcb_buffer_len
= 0;
3806 unsigned int xcb_block_len
= 0;
3807 unsigned int xcb_pad
= 0;
3808 unsigned int xcb_align_to
= 0;
3811 xcb_block_len
+= sizeof(xcb_get_motion_events_reply_t
);
3812 xcb_tmp
+= xcb_block_len
;
3813 xcb_buffer_len
+= xcb_block_len
;
3816 xcb_block_len
+= _aux
->events_len
* sizeof(xcb_timecoord_t
);
3817 xcb_tmp
+= xcb_block_len
;
3818 xcb_align_to
= ALIGNOF(xcb_timecoord_t
);
3819 /* insert padding */
3820 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
3821 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
3828 return xcb_buffer_len
;
3831 xcb_get_motion_events_cookie_t
3832 xcb_get_motion_events (xcb_connection_t
*c
/**< */,
3833 xcb_window_t window
/**< */,
3834 xcb_timestamp_t start
/**< */,
3835 xcb_timestamp_t stop
/**< */)
3837 static const xcb_protocol_request_t xcb_req
= {
3840 /* opcode */ XCB_GET_MOTION_EVENTS
,
3844 struct iovec xcb_parts
[4];
3845 xcb_get_motion_events_cookie_t xcb_ret
;
3846 xcb_get_motion_events_request_t xcb_out
;
3849 xcb_out
.window
= window
;
3850 xcb_out
.start
= start
;
3851 xcb_out
.stop
= stop
;
3853 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3854 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3855 xcb_parts
[3].iov_base
= 0;
3856 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3858 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3862 xcb_get_motion_events_cookie_t
3863 xcb_get_motion_events_unchecked (xcb_connection_t
*c
/**< */,
3864 xcb_window_t window
/**< */,
3865 xcb_timestamp_t start
/**< */,
3866 xcb_timestamp_t stop
/**< */)
3868 static const xcb_protocol_request_t xcb_req
= {
3871 /* opcode */ XCB_GET_MOTION_EVENTS
,
3875 struct iovec xcb_parts
[4];
3876 xcb_get_motion_events_cookie_t xcb_ret
;
3877 xcb_get_motion_events_request_t xcb_out
;
3880 xcb_out
.window
= window
;
3881 xcb_out
.start
= start
;
3882 xcb_out
.stop
= stop
;
3884 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3885 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3886 xcb_parts
[3].iov_base
= 0;
3887 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3889 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3894 xcb_get_motion_events_events (const xcb_get_motion_events_reply_t
*R
/**< */)
3896 return (xcb_timecoord_t
*) (R
+ 1);
3900 xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t
*R
/**< */)
3902 return R
->events_len
;
3905 xcb_timecoord_iterator_t
3906 xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t
*R
/**< */)
3908 xcb_timecoord_iterator_t i
;
3909 i
.data
= (xcb_timecoord_t
*) (R
+ 1);
3910 i
.rem
= R
->events_len
;
3911 i
.index
= (char *) i
.data
- (char *) R
;
3915 xcb_get_motion_events_reply_t
*
3916 xcb_get_motion_events_reply (xcb_connection_t
*c
/**< */,
3917 xcb_get_motion_events_cookie_t cookie
/**< */,
3918 xcb_generic_error_t
**e
/**< */)
3920 return (xcb_get_motion_events_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3923 xcb_translate_coordinates_cookie_t
3924 xcb_translate_coordinates (xcb_connection_t
*c
/**< */,
3925 xcb_window_t src_window
/**< */,
3926 xcb_window_t dst_window
/**< */,
3927 int16_t src_x
/**< */,
3928 int16_t src_y
/**< */)
3930 static const xcb_protocol_request_t xcb_req
= {
3933 /* opcode */ XCB_TRANSLATE_COORDINATES
,
3937 struct iovec xcb_parts
[4];
3938 xcb_translate_coordinates_cookie_t xcb_ret
;
3939 xcb_translate_coordinates_request_t xcb_out
;
3942 xcb_out
.src_window
= src_window
;
3943 xcb_out
.dst_window
= dst_window
;
3944 xcb_out
.src_x
= src_x
;
3945 xcb_out
.src_y
= src_y
;
3947 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3948 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3949 xcb_parts
[3].iov_base
= 0;
3950 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3952 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
3956 xcb_translate_coordinates_cookie_t
3957 xcb_translate_coordinates_unchecked (xcb_connection_t
*c
/**< */,
3958 xcb_window_t src_window
/**< */,
3959 xcb_window_t dst_window
/**< */,
3960 int16_t src_x
/**< */,
3961 int16_t src_y
/**< */)
3963 static const xcb_protocol_request_t xcb_req
= {
3966 /* opcode */ XCB_TRANSLATE_COORDINATES
,
3970 struct iovec xcb_parts
[4];
3971 xcb_translate_coordinates_cookie_t xcb_ret
;
3972 xcb_translate_coordinates_request_t xcb_out
;
3975 xcb_out
.src_window
= src_window
;
3976 xcb_out
.dst_window
= dst_window
;
3977 xcb_out
.src_x
= src_x
;
3978 xcb_out
.src_y
= src_y
;
3980 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
3981 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
3982 xcb_parts
[3].iov_base
= 0;
3983 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
3985 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
3989 xcb_translate_coordinates_reply_t
*
3990 xcb_translate_coordinates_reply (xcb_connection_t
*c
/**< */,
3991 xcb_translate_coordinates_cookie_t cookie
/**< */,
3992 xcb_generic_error_t
**e
/**< */)
3994 return (xcb_translate_coordinates_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
3998 xcb_warp_pointer_checked (xcb_connection_t
*c
/**< */,
3999 xcb_window_t src_window
/**< */,
4000 xcb_window_t dst_window
/**< */,
4001 int16_t src_x
/**< */,
4002 int16_t src_y
/**< */,
4003 uint16_t src_width
/**< */,
4004 uint16_t src_height
/**< */,
4005 int16_t dst_x
/**< */,
4006 int16_t dst_y
/**< */)
4008 static const xcb_protocol_request_t xcb_req
= {
4011 /* opcode */ XCB_WARP_POINTER
,
4015 struct iovec xcb_parts
[4];
4016 xcb_void_cookie_t xcb_ret
;
4017 xcb_warp_pointer_request_t xcb_out
;
4020 xcb_out
.src_window
= src_window
;
4021 xcb_out
.dst_window
= dst_window
;
4022 xcb_out
.src_x
= src_x
;
4023 xcb_out
.src_y
= src_y
;
4024 xcb_out
.src_width
= src_width
;
4025 xcb_out
.src_height
= src_height
;
4026 xcb_out
.dst_x
= dst_x
;
4027 xcb_out
.dst_y
= dst_y
;
4029 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4030 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4031 xcb_parts
[3].iov_base
= 0;
4032 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4034 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4039 xcb_warp_pointer (xcb_connection_t
*c
/**< */,
4040 xcb_window_t src_window
/**< */,
4041 xcb_window_t dst_window
/**< */,
4042 int16_t src_x
/**< */,
4043 int16_t src_y
/**< */,
4044 uint16_t src_width
/**< */,
4045 uint16_t src_height
/**< */,
4046 int16_t dst_x
/**< */,
4047 int16_t dst_y
/**< */)
4049 static const xcb_protocol_request_t xcb_req
= {
4052 /* opcode */ XCB_WARP_POINTER
,
4056 struct iovec xcb_parts
[4];
4057 xcb_void_cookie_t xcb_ret
;
4058 xcb_warp_pointer_request_t xcb_out
;
4061 xcb_out
.src_window
= src_window
;
4062 xcb_out
.dst_window
= dst_window
;
4063 xcb_out
.src_x
= src_x
;
4064 xcb_out
.src_y
= src_y
;
4065 xcb_out
.src_width
= src_width
;
4066 xcb_out
.src_height
= src_height
;
4067 xcb_out
.dst_x
= dst_x
;
4068 xcb_out
.dst_y
= dst_y
;
4070 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4071 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4072 xcb_parts
[3].iov_base
= 0;
4073 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4075 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4080 xcb_set_input_focus_checked (xcb_connection_t
*c
/**< */,
4081 uint8_t revert_to
/**< */,
4082 xcb_window_t focus
/**< */,
4083 xcb_timestamp_t time
/**< */)
4085 static const xcb_protocol_request_t xcb_req
= {
4088 /* opcode */ XCB_SET_INPUT_FOCUS
,
4092 struct iovec xcb_parts
[4];
4093 xcb_void_cookie_t xcb_ret
;
4094 xcb_set_input_focus_request_t xcb_out
;
4096 xcb_out
.revert_to
= revert_to
;
4097 xcb_out
.focus
= focus
;
4098 xcb_out
.time
= time
;
4100 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4101 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4102 xcb_parts
[3].iov_base
= 0;
4103 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4105 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4110 xcb_set_input_focus (xcb_connection_t
*c
/**< */,
4111 uint8_t revert_to
/**< */,
4112 xcb_window_t focus
/**< */,
4113 xcb_timestamp_t time
/**< */)
4115 static const xcb_protocol_request_t xcb_req
= {
4118 /* opcode */ XCB_SET_INPUT_FOCUS
,
4122 struct iovec xcb_parts
[4];
4123 xcb_void_cookie_t xcb_ret
;
4124 xcb_set_input_focus_request_t xcb_out
;
4126 xcb_out
.revert_to
= revert_to
;
4127 xcb_out
.focus
= focus
;
4128 xcb_out
.time
= time
;
4130 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4131 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4132 xcb_parts
[3].iov_base
= 0;
4133 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4135 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4139 xcb_get_input_focus_cookie_t
4140 xcb_get_input_focus (xcb_connection_t
*c
/**< */)
4142 static const xcb_protocol_request_t xcb_req
= {
4145 /* opcode */ XCB_GET_INPUT_FOCUS
,
4149 struct iovec xcb_parts
[4];
4150 xcb_get_input_focus_cookie_t xcb_ret
;
4151 xcb_get_input_focus_request_t xcb_out
;
4155 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4156 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4157 xcb_parts
[3].iov_base
= 0;
4158 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4160 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4164 xcb_get_input_focus_cookie_t
4165 xcb_get_input_focus_unchecked (xcb_connection_t
*c
/**< */)
4167 static const xcb_protocol_request_t xcb_req
= {
4170 /* opcode */ XCB_GET_INPUT_FOCUS
,
4174 struct iovec xcb_parts
[4];
4175 xcb_get_input_focus_cookie_t xcb_ret
;
4176 xcb_get_input_focus_request_t xcb_out
;
4180 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4181 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4182 xcb_parts
[3].iov_base
= 0;
4183 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4185 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4189 xcb_get_input_focus_reply_t
*
4190 xcb_get_input_focus_reply (xcb_connection_t
*c
/**< */,
4191 xcb_get_input_focus_cookie_t cookie
/**< */,
4192 xcb_generic_error_t
**e
/**< */)
4194 return (xcb_get_input_focus_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4197 xcb_query_keymap_cookie_t
4198 xcb_query_keymap (xcb_connection_t
*c
/**< */)
4200 static const xcb_protocol_request_t xcb_req
= {
4203 /* opcode */ XCB_QUERY_KEYMAP
,
4207 struct iovec xcb_parts
[4];
4208 xcb_query_keymap_cookie_t xcb_ret
;
4209 xcb_query_keymap_request_t xcb_out
;
4213 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4214 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4215 xcb_parts
[3].iov_base
= 0;
4216 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4218 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4222 xcb_query_keymap_cookie_t
4223 xcb_query_keymap_unchecked (xcb_connection_t
*c
/**< */)
4225 static const xcb_protocol_request_t xcb_req
= {
4228 /* opcode */ XCB_QUERY_KEYMAP
,
4232 struct iovec xcb_parts
[4];
4233 xcb_query_keymap_cookie_t xcb_ret
;
4234 xcb_query_keymap_request_t xcb_out
;
4238 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4239 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4240 xcb_parts
[3].iov_base
= 0;
4241 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4243 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4247 xcb_query_keymap_reply_t
*
4248 xcb_query_keymap_reply (xcb_connection_t
*c
/**< */,
4249 xcb_query_keymap_cookie_t cookie
/**< */,
4250 xcb_generic_error_t
**e
/**< */)
4252 return (xcb_query_keymap_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4256 xcb_open_font_sizeof (const void *_buffer
/**< */)
4258 char *xcb_tmp
= (char *)_buffer
;
4259 const xcb_open_font_request_t
*_aux
= (xcb_open_font_request_t
*)_buffer
;
4260 unsigned int xcb_buffer_len
= 0;
4261 unsigned int xcb_block_len
= 0;
4262 unsigned int xcb_pad
= 0;
4263 unsigned int xcb_align_to
= 0;
4266 xcb_block_len
+= sizeof(xcb_open_font_request_t
);
4267 xcb_tmp
+= xcb_block_len
;
4268 xcb_buffer_len
+= xcb_block_len
;
4271 xcb_block_len
+= _aux
->name_len
* sizeof(char);
4272 xcb_tmp
+= xcb_block_len
;
4273 xcb_align_to
= ALIGNOF(char);
4274 /* insert padding */
4275 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4276 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4283 return xcb_buffer_len
;
4287 xcb_open_font_checked (xcb_connection_t
*c
/**< */,
4288 xcb_font_t fid
/**< */,
4289 uint16_t name_len
/**< */,
4290 const char *name
/**< */)
4292 static const xcb_protocol_request_t xcb_req
= {
4295 /* opcode */ XCB_OPEN_FONT
,
4299 struct iovec xcb_parts
[6];
4300 xcb_void_cookie_t xcb_ret
;
4301 xcb_open_font_request_t xcb_out
;
4305 xcb_out
.name_len
= name_len
;
4306 memset(xcb_out
.pad1
, 0, 2);
4308 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4309 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4310 xcb_parts
[3].iov_base
= 0;
4311 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4313 xcb_parts
[4].iov_base
= (char *) name
;
4314 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
4315 xcb_parts
[5].iov_base
= 0;
4316 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4318 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4323 xcb_open_font (xcb_connection_t
*c
/**< */,
4324 xcb_font_t fid
/**< */,
4325 uint16_t name_len
/**< */,
4326 const char *name
/**< */)
4328 static const xcb_protocol_request_t xcb_req
= {
4331 /* opcode */ XCB_OPEN_FONT
,
4335 struct iovec xcb_parts
[6];
4336 xcb_void_cookie_t xcb_ret
;
4337 xcb_open_font_request_t xcb_out
;
4341 xcb_out
.name_len
= name_len
;
4342 memset(xcb_out
.pad1
, 0, 2);
4344 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4345 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4346 xcb_parts
[3].iov_base
= 0;
4347 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4349 xcb_parts
[4].iov_base
= (char *) name
;
4350 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
4351 xcb_parts
[5].iov_base
= 0;
4352 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4354 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4359 xcb_close_font_checked (xcb_connection_t
*c
/**< */,
4360 xcb_font_t font
/**< */)
4362 static const xcb_protocol_request_t xcb_req
= {
4365 /* opcode */ XCB_CLOSE_FONT
,
4369 struct iovec xcb_parts
[4];
4370 xcb_void_cookie_t xcb_ret
;
4371 xcb_close_font_request_t xcb_out
;
4374 xcb_out
.font
= font
;
4376 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4377 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4378 xcb_parts
[3].iov_base
= 0;
4379 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4381 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4386 xcb_close_font (xcb_connection_t
*c
/**< */,
4387 xcb_font_t font
/**< */)
4389 static const xcb_protocol_request_t xcb_req
= {
4392 /* opcode */ XCB_CLOSE_FONT
,
4396 struct iovec xcb_parts
[4];
4397 xcb_void_cookie_t xcb_ret
;
4398 xcb_close_font_request_t xcb_out
;
4401 xcb_out
.font
= font
;
4403 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4404 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4405 xcb_parts
[3].iov_base
= 0;
4406 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4408 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4413 xcb_fontprop_next (xcb_fontprop_iterator_t
*i
/**< */)
4417 i
->index
+= sizeof(xcb_fontprop_t
);
4420 xcb_generic_iterator_t
4421 xcb_fontprop_end (xcb_fontprop_iterator_t i
/**< */)
4423 xcb_generic_iterator_t ret
;
4424 ret
.data
= i
.data
+ i
.rem
;
4425 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4431 xcb_charinfo_next (xcb_charinfo_iterator_t
*i
/**< */)
4435 i
->index
+= sizeof(xcb_charinfo_t
);
4438 xcb_generic_iterator_t
4439 xcb_charinfo_end (xcb_charinfo_iterator_t i
/**< */)
4441 xcb_generic_iterator_t ret
;
4442 ret
.data
= i
.data
+ i
.rem
;
4443 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
4449 xcb_query_font_sizeof (const void *_buffer
/**< */)
4451 char *xcb_tmp
= (char *)_buffer
;
4452 const xcb_query_font_reply_t
*_aux
= (xcb_query_font_reply_t
*)_buffer
;
4453 unsigned int xcb_buffer_len
= 0;
4454 unsigned int xcb_block_len
= 0;
4455 unsigned int xcb_pad
= 0;
4456 unsigned int xcb_align_to
= 0;
4459 xcb_block_len
+= sizeof(xcb_query_font_reply_t
);
4460 xcb_tmp
+= xcb_block_len
;
4461 xcb_buffer_len
+= xcb_block_len
;
4464 xcb_block_len
+= _aux
->properties_len
* sizeof(xcb_fontprop_t
);
4465 xcb_tmp
+= xcb_block_len
;
4466 xcb_align_to
= ALIGNOF(xcb_fontprop_t
);
4467 /* insert padding */
4468 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4469 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4476 xcb_block_len
+= _aux
->char_infos_len
* sizeof(xcb_charinfo_t
);
4477 xcb_tmp
+= xcb_block_len
;
4478 xcb_align_to
= ALIGNOF(xcb_charinfo_t
);
4479 /* insert padding */
4480 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4481 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4488 return xcb_buffer_len
;
4491 xcb_query_font_cookie_t
4492 xcb_query_font (xcb_connection_t
*c
/**< */,
4493 xcb_fontable_t font
/**< */)
4495 static const xcb_protocol_request_t xcb_req
= {
4498 /* opcode */ XCB_QUERY_FONT
,
4502 struct iovec xcb_parts
[4];
4503 xcb_query_font_cookie_t xcb_ret
;
4504 xcb_query_font_request_t xcb_out
;
4507 xcb_out
.font
= font
;
4509 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4510 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4511 xcb_parts
[3].iov_base
= 0;
4512 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4514 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4518 xcb_query_font_cookie_t
4519 xcb_query_font_unchecked (xcb_connection_t
*c
/**< */,
4520 xcb_fontable_t font
/**< */)
4522 static const xcb_protocol_request_t xcb_req
= {
4525 /* opcode */ XCB_QUERY_FONT
,
4529 struct iovec xcb_parts
[4];
4530 xcb_query_font_cookie_t xcb_ret
;
4531 xcb_query_font_request_t xcb_out
;
4534 xcb_out
.font
= font
;
4536 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4537 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4538 xcb_parts
[3].iov_base
= 0;
4539 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4541 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4546 xcb_query_font_properties (const xcb_query_font_reply_t
*R
/**< */)
4548 return (xcb_fontprop_t
*) (R
+ 1);
4552 xcb_query_font_properties_length (const xcb_query_font_reply_t
*R
/**< */)
4554 return R
->properties_len
;
4557 xcb_fontprop_iterator_t
4558 xcb_query_font_properties_iterator (const xcb_query_font_reply_t
*R
/**< */)
4560 xcb_fontprop_iterator_t i
;
4561 i
.data
= (xcb_fontprop_t
*) (R
+ 1);
4562 i
.rem
= R
->properties_len
;
4563 i
.index
= (char *) i
.data
- (char *) R
;
4568 xcb_query_font_char_infos (const xcb_query_font_reply_t
*R
/**< */)
4570 xcb_generic_iterator_t prev
= xcb_fontprop_end(xcb_query_font_properties_iterator(R
));
4571 return (xcb_charinfo_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_charinfo_t
, prev
.index
) + 0);
4575 xcb_query_font_char_infos_length (const xcb_query_font_reply_t
*R
/**< */)
4577 return R
->char_infos_len
;
4580 xcb_charinfo_iterator_t
4581 xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t
*R
/**< */)
4583 xcb_charinfo_iterator_t i
;
4584 xcb_generic_iterator_t prev
= xcb_fontprop_end(xcb_query_font_properties_iterator(R
));
4585 i
.data
= (xcb_charinfo_t
*) ((char *) prev
.data
+ XCB_TYPE_PAD(xcb_charinfo_t
, prev
.index
));
4586 i
.rem
= R
->char_infos_len
;
4587 i
.index
= (char *) i
.data
- (char *) R
;
4591 xcb_query_font_reply_t
*
4592 xcb_query_font_reply (xcb_connection_t
*c
/**< */,
4593 xcb_query_font_cookie_t cookie
/**< */,
4594 xcb_generic_error_t
**e
/**< */)
4596 return (xcb_query_font_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4600 xcb_query_text_extents_sizeof (const void *_buffer
/**< */,
4601 uint32_t string_len
/**< */)
4603 char *xcb_tmp
= (char *)_buffer
;
4604 unsigned int xcb_buffer_len
= 0;
4605 unsigned int xcb_block_len
= 0;
4606 unsigned int xcb_pad
= 0;
4607 unsigned int xcb_align_to
= 0;
4610 xcb_block_len
+= sizeof(xcb_query_text_extents_request_t
);
4611 xcb_tmp
+= xcb_block_len
;
4612 xcb_buffer_len
+= xcb_block_len
;
4615 xcb_block_len
+= string_len
* sizeof(xcb_char2b_t
);
4616 xcb_tmp
+= xcb_block_len
;
4617 xcb_align_to
= ALIGNOF(xcb_char2b_t
);
4618 /* insert padding */
4619 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4620 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4627 return xcb_buffer_len
;
4630 xcb_query_text_extents_cookie_t
4631 xcb_query_text_extents (xcb_connection_t
*c
/**< */,
4632 xcb_fontable_t font
/**< */,
4633 uint32_t string_len
/**< */,
4634 const xcb_char2b_t
*string
/**< */)
4636 static const xcb_protocol_request_t xcb_req
= {
4639 /* opcode */ XCB_QUERY_TEXT_EXTENTS
,
4643 struct iovec xcb_parts
[6];
4644 xcb_query_text_extents_cookie_t xcb_ret
;
4645 xcb_query_text_extents_request_t xcb_out
;
4647 xcb_out
.odd_length
= (string_len
& 1);
4648 xcb_out
.font
= font
;
4650 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4651 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4652 xcb_parts
[3].iov_base
= 0;
4653 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4654 /* xcb_char2b_t string */
4655 xcb_parts
[4].iov_base
= (char *) string
;
4656 xcb_parts
[4].iov_len
= string_len
* sizeof(xcb_char2b_t
);
4657 xcb_parts
[5].iov_base
= 0;
4658 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4660 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4664 xcb_query_text_extents_cookie_t
4665 xcb_query_text_extents_unchecked (xcb_connection_t
*c
/**< */,
4666 xcb_fontable_t font
/**< */,
4667 uint32_t string_len
/**< */,
4668 const xcb_char2b_t
*string
/**< */)
4670 static const xcb_protocol_request_t xcb_req
= {
4673 /* opcode */ XCB_QUERY_TEXT_EXTENTS
,
4677 struct iovec xcb_parts
[6];
4678 xcb_query_text_extents_cookie_t xcb_ret
;
4679 xcb_query_text_extents_request_t xcb_out
;
4681 xcb_out
.odd_length
= (string_len
& 1);
4682 xcb_out
.font
= font
;
4684 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4685 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4686 xcb_parts
[3].iov_base
= 0;
4687 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4688 /* xcb_char2b_t string */
4689 xcb_parts
[4].iov_base
= (char *) string
;
4690 xcb_parts
[4].iov_len
= string_len
* sizeof(xcb_char2b_t
);
4691 xcb_parts
[5].iov_base
= 0;
4692 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4694 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4698 xcb_query_text_extents_reply_t
*
4699 xcb_query_text_extents_reply (xcb_connection_t
*c
/**< */,
4700 xcb_query_text_extents_cookie_t cookie
/**< */,
4701 xcb_generic_error_t
**e
/**< */)
4703 return (xcb_query_text_extents_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4707 xcb_str_sizeof (const void *_buffer
/**< */)
4709 char *xcb_tmp
= (char *)_buffer
;
4710 const xcb_str_t
*_aux
= (xcb_str_t
*)_buffer
;
4711 unsigned int xcb_buffer_len
= 0;
4712 unsigned int xcb_block_len
= 0;
4713 unsigned int xcb_pad
= 0;
4714 unsigned int xcb_align_to
= 0;
4717 xcb_block_len
+= sizeof(xcb_str_t
);
4718 xcb_tmp
+= xcb_block_len
;
4719 xcb_buffer_len
+= xcb_block_len
;
4722 xcb_block_len
+= _aux
->name_len
* sizeof(char);
4723 xcb_tmp
+= xcb_block_len
;
4724 xcb_align_to
= ALIGNOF(char);
4725 /* insert padding */
4726 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4727 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4734 return xcb_buffer_len
;
4738 xcb_str_name (const xcb_str_t
*R
/**< */)
4740 return (char *) (R
+ 1);
4744 xcb_str_name_length (const xcb_str_t
*R
/**< */)
4749 xcb_generic_iterator_t
4750 xcb_str_name_end (const xcb_str_t
*R
/**< */)
4752 xcb_generic_iterator_t i
;
4753 i
.data
= ((char *) (R
+ 1)) + (R
->name_len
);
4755 i
.index
= (char *) i
.data
- (char *) R
;
4760 xcb_str_next (xcb_str_iterator_t
*i
/**< */)
4762 xcb_str_t
*R
= i
->data
;
4763 xcb_generic_iterator_t child
;
4764 child
.data
= (xcb_str_t
*)(((char *)R
) + xcb_str_sizeof(R
));
4765 i
->index
= (char *) child
.data
- (char *) i
->data
;
4767 i
->data
= (xcb_str_t
*) child
.data
;
4770 xcb_generic_iterator_t
4771 xcb_str_end (xcb_str_iterator_t i
/**< */)
4773 xcb_generic_iterator_t ret
;
4778 ret
.index
= i
.index
;
4783 xcb_list_fonts_sizeof (const void *_buffer
/**< */)
4785 char *xcb_tmp
= (char *)_buffer
;
4786 const xcb_list_fonts_request_t
*_aux
= (xcb_list_fonts_request_t
*)_buffer
;
4787 unsigned int xcb_buffer_len
= 0;
4788 unsigned int xcb_block_len
= 0;
4789 unsigned int xcb_pad
= 0;
4790 unsigned int xcb_align_to
= 0;
4793 xcb_block_len
+= sizeof(xcb_list_fonts_request_t
);
4794 xcb_tmp
+= xcb_block_len
;
4795 xcb_buffer_len
+= xcb_block_len
;
4798 xcb_block_len
+= _aux
->pattern_len
* sizeof(char);
4799 xcb_tmp
+= xcb_block_len
;
4800 xcb_align_to
= ALIGNOF(char);
4801 /* insert padding */
4802 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4803 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4810 return xcb_buffer_len
;
4813 xcb_list_fonts_cookie_t
4814 xcb_list_fonts (xcb_connection_t
*c
/**< */,
4815 uint16_t max_names
/**< */,
4816 uint16_t pattern_len
/**< */,
4817 const char *pattern
/**< */)
4819 static const xcb_protocol_request_t xcb_req
= {
4822 /* opcode */ XCB_LIST_FONTS
,
4826 struct iovec xcb_parts
[6];
4827 xcb_list_fonts_cookie_t xcb_ret
;
4828 xcb_list_fonts_request_t xcb_out
;
4831 xcb_out
.max_names
= max_names
;
4832 xcb_out
.pattern_len
= pattern_len
;
4834 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4835 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4836 xcb_parts
[3].iov_base
= 0;
4837 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4839 xcb_parts
[4].iov_base
= (char *) pattern
;
4840 xcb_parts
[4].iov_len
= pattern_len
* sizeof(char);
4841 xcb_parts
[5].iov_base
= 0;
4842 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4844 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4848 xcb_list_fonts_cookie_t
4849 xcb_list_fonts_unchecked (xcb_connection_t
*c
/**< */,
4850 uint16_t max_names
/**< */,
4851 uint16_t pattern_len
/**< */,
4852 const char *pattern
/**< */)
4854 static const xcb_protocol_request_t xcb_req
= {
4857 /* opcode */ XCB_LIST_FONTS
,
4861 struct iovec xcb_parts
[6];
4862 xcb_list_fonts_cookie_t xcb_ret
;
4863 xcb_list_fonts_request_t xcb_out
;
4866 xcb_out
.max_names
= max_names
;
4867 xcb_out
.pattern_len
= pattern_len
;
4869 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4870 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4871 xcb_parts
[3].iov_base
= 0;
4872 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4874 xcb_parts
[4].iov_base
= (char *) pattern
;
4875 xcb_parts
[4].iov_len
= pattern_len
* sizeof(char);
4876 xcb_parts
[5].iov_base
= 0;
4877 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4879 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
4884 xcb_list_fonts_names_length (const xcb_list_fonts_reply_t
*R
/**< */)
4886 return R
->names_len
;
4890 xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t
*R
/**< */)
4892 xcb_str_iterator_t i
;
4893 i
.data
= (xcb_str_t
*) (R
+ 1);
4894 i
.rem
= R
->names_len
;
4895 i
.index
= (char *) i
.data
- (char *) R
;
4899 xcb_list_fonts_reply_t
*
4900 xcb_list_fonts_reply (xcb_connection_t
*c
/**< */,
4901 xcb_list_fonts_cookie_t cookie
/**< */,
4902 xcb_generic_error_t
**e
/**< */)
4904 return (xcb_list_fonts_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
4908 xcb_list_fonts_with_info_sizeof (const void *_buffer
/**< */)
4910 char *xcb_tmp
= (char *)_buffer
;
4911 const xcb_list_fonts_with_info_request_t
*_aux
= (xcb_list_fonts_with_info_request_t
*)_buffer
;
4912 unsigned int xcb_buffer_len
= 0;
4913 unsigned int xcb_block_len
= 0;
4914 unsigned int xcb_pad
= 0;
4915 unsigned int xcb_align_to
= 0;
4918 xcb_block_len
+= sizeof(xcb_list_fonts_with_info_request_t
);
4919 xcb_tmp
+= xcb_block_len
;
4920 xcb_buffer_len
+= xcb_block_len
;
4923 xcb_block_len
+= _aux
->pattern_len
* sizeof(char);
4924 xcb_tmp
+= xcb_block_len
;
4925 xcb_align_to
= ALIGNOF(char);
4926 /* insert padding */
4927 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
4928 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
4935 return xcb_buffer_len
;
4938 xcb_list_fonts_with_info_cookie_t
4939 xcb_list_fonts_with_info (xcb_connection_t
*c
/**< */,
4940 uint16_t max_names
/**< */,
4941 uint16_t pattern_len
/**< */,
4942 const char *pattern
/**< */)
4944 static const xcb_protocol_request_t xcb_req
= {
4947 /* opcode */ XCB_LIST_FONTS_WITH_INFO
,
4951 struct iovec xcb_parts
[6];
4952 xcb_list_fonts_with_info_cookie_t xcb_ret
;
4953 xcb_list_fonts_with_info_request_t xcb_out
;
4956 xcb_out
.max_names
= max_names
;
4957 xcb_out
.pattern_len
= pattern_len
;
4959 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4960 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4961 xcb_parts
[3].iov_base
= 0;
4962 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4964 xcb_parts
[4].iov_base
= (char *) pattern
;
4965 xcb_parts
[4].iov_len
= pattern_len
* sizeof(char);
4966 xcb_parts
[5].iov_base
= 0;
4967 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
4969 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
4973 xcb_list_fonts_with_info_cookie_t
4974 xcb_list_fonts_with_info_unchecked (xcb_connection_t
*c
/**< */,
4975 uint16_t max_names
/**< */,
4976 uint16_t pattern_len
/**< */,
4977 const char *pattern
/**< */)
4979 static const xcb_protocol_request_t xcb_req
= {
4982 /* opcode */ XCB_LIST_FONTS_WITH_INFO
,
4986 struct iovec xcb_parts
[6];
4987 xcb_list_fonts_with_info_cookie_t xcb_ret
;
4988 xcb_list_fonts_with_info_request_t xcb_out
;
4991 xcb_out
.max_names
= max_names
;
4992 xcb_out
.pattern_len
= pattern_len
;
4994 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
4995 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
4996 xcb_parts
[3].iov_base
= 0;
4997 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
4999 xcb_parts
[4].iov_base
= (char *) pattern
;
5000 xcb_parts
[4].iov_len
= pattern_len
* sizeof(char);
5001 xcb_parts
[5].iov_base
= 0;
5002 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5004 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5009 xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5011 return (xcb_fontprop_t
*) (R
+ 1);
5015 xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5017 return R
->properties_len
;
5020 xcb_fontprop_iterator_t
5021 xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5023 xcb_fontprop_iterator_t i
;
5024 i
.data
= (xcb_fontprop_t
*) (R
+ 1);
5025 i
.rem
= R
->properties_len
;
5026 i
.index
= (char *) i
.data
- (char *) R
;
5031 xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5033 xcb_generic_iterator_t prev
= xcb_fontprop_end(xcb_list_fonts_with_info_properties_iterator(R
));
5034 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
5038 xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5043 xcb_generic_iterator_t
5044 xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t
*R
/**< */)
5046 xcb_generic_iterator_t i
;
5047 xcb_generic_iterator_t child
= xcb_fontprop_end(xcb_list_fonts_with_info_properties_iterator(R
));
5048 i
.data
= ((char *) child
.data
) + (R
->name_len
);
5050 i
.index
= (char *) i
.data
- (char *) R
;
5054 xcb_list_fonts_with_info_reply_t
*
5055 xcb_list_fonts_with_info_reply (xcb_connection_t
*c
/**< */,
5056 xcb_list_fonts_with_info_cookie_t cookie
/**< */,
5057 xcb_generic_error_t
**e
/**< */)
5059 return (xcb_list_fonts_with_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
5063 xcb_set_font_path_sizeof (const void *_buffer
/**< */)
5065 char *xcb_tmp
= (char *)_buffer
;
5066 const xcb_set_font_path_request_t
*_aux
= (xcb_set_font_path_request_t
*)_buffer
;
5067 unsigned int xcb_buffer_len
= 0;
5068 unsigned int xcb_block_len
= 0;
5069 unsigned int xcb_pad
= 0;
5070 unsigned int xcb_align_to
= 0;
5073 unsigned int xcb_tmp_len
;
5075 xcb_block_len
+= sizeof(xcb_set_font_path_request_t
);
5076 xcb_tmp
+= xcb_block_len
;
5077 xcb_buffer_len
+= xcb_block_len
;
5080 for(i
=0; i
<_aux
->font_qty
; i
++) {
5081 xcb_tmp_len
= xcb_str_sizeof(xcb_tmp
);
5082 xcb_block_len
+= xcb_tmp_len
;
5083 xcb_tmp
+= xcb_tmp_len
;
5085 xcb_align_to
= ALIGNOF(xcb_str_t
);
5086 /* insert padding */
5087 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5088 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5095 return xcb_buffer_len
;
5099 xcb_set_font_path_checked (xcb_connection_t
*c
/**< */,
5100 uint16_t font_qty
/**< */,
5101 const xcb_str_t
*font
/**< */)
5103 static const xcb_protocol_request_t xcb_req
= {
5106 /* opcode */ XCB_SET_FONT_PATH
,
5110 struct iovec xcb_parts
[6];
5111 xcb_void_cookie_t xcb_ret
;
5112 xcb_set_font_path_request_t xcb_out
;
5114 unsigned int xcb_tmp_len
;
5118 xcb_out
.font_qty
= font_qty
;
5119 memset(xcb_out
.pad1
, 0, 2);
5121 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5122 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5123 xcb_parts
[3].iov_base
= 0;
5124 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5125 /* xcb_str_t font */
5126 xcb_parts
[4].iov_base
= (char *) font
;
5127 xcb_parts
[4].iov_len
= 0;
5128 xcb_tmp
= (char *)font
;
5129 for(i
=0; i
<font_qty
; i
++) {
5130 xcb_tmp_len
= xcb_str_sizeof(xcb_tmp
);
5131 xcb_parts
[4].iov_len
+= xcb_tmp_len
;
5132 xcb_tmp
+= xcb_tmp_len
;
5134 xcb_parts
[5].iov_base
= 0;
5135 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5137 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5142 xcb_set_font_path (xcb_connection_t
*c
/**< */,
5143 uint16_t font_qty
/**< */,
5144 const xcb_str_t
*font
/**< */)
5146 static const xcb_protocol_request_t xcb_req
= {
5149 /* opcode */ XCB_SET_FONT_PATH
,
5153 struct iovec xcb_parts
[6];
5154 xcb_void_cookie_t xcb_ret
;
5155 xcb_set_font_path_request_t xcb_out
;
5157 unsigned int xcb_tmp_len
;
5161 xcb_out
.font_qty
= font_qty
;
5162 memset(xcb_out
.pad1
, 0, 2);
5164 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5165 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5166 xcb_parts
[3].iov_base
= 0;
5167 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5168 /* xcb_str_t font */
5169 xcb_parts
[4].iov_base
= (char *) font
;
5170 xcb_parts
[4].iov_len
= 0;
5171 xcb_tmp
= (char *)font
;
5172 for(i
=0; i
<font_qty
; i
++) {
5173 xcb_tmp_len
= xcb_str_sizeof(xcb_tmp
);
5174 xcb_parts
[4].iov_len
+= xcb_tmp_len
;
5175 xcb_tmp
+= xcb_tmp_len
;
5177 xcb_parts
[5].iov_base
= 0;
5178 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5180 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5185 xcb_get_font_path_sizeof (const void *_buffer
/**< */)
5187 char *xcb_tmp
= (char *)_buffer
;
5188 const xcb_get_font_path_reply_t
*_aux
= (xcb_get_font_path_reply_t
*)_buffer
;
5189 unsigned int xcb_buffer_len
= 0;
5190 unsigned int xcb_block_len
= 0;
5191 unsigned int xcb_pad
= 0;
5192 unsigned int xcb_align_to
= 0;
5195 unsigned int xcb_tmp_len
;
5197 xcb_block_len
+= sizeof(xcb_get_font_path_reply_t
);
5198 xcb_tmp
+= xcb_block_len
;
5199 xcb_buffer_len
+= xcb_block_len
;
5202 for(i
=0; i
<_aux
->path_len
; i
++) {
5203 xcb_tmp_len
= xcb_str_sizeof(xcb_tmp
);
5204 xcb_block_len
+= xcb_tmp_len
;
5205 xcb_tmp
+= xcb_tmp_len
;
5207 xcb_align_to
= ALIGNOF(xcb_str_t
);
5208 /* insert padding */
5209 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5210 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5217 return xcb_buffer_len
;
5220 xcb_get_font_path_cookie_t
5221 xcb_get_font_path (xcb_connection_t
*c
/**< */)
5223 static const xcb_protocol_request_t xcb_req
= {
5226 /* opcode */ XCB_GET_FONT_PATH
,
5230 struct iovec xcb_parts
[4];
5231 xcb_get_font_path_cookie_t xcb_ret
;
5232 xcb_get_font_path_request_t xcb_out
;
5236 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5237 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5238 xcb_parts
[3].iov_base
= 0;
5239 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5241 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5245 xcb_get_font_path_cookie_t
5246 xcb_get_font_path_unchecked (xcb_connection_t
*c
/**< */)
5248 static const xcb_protocol_request_t xcb_req
= {
5251 /* opcode */ XCB_GET_FONT_PATH
,
5255 struct iovec xcb_parts
[4];
5256 xcb_get_font_path_cookie_t xcb_ret
;
5257 xcb_get_font_path_request_t xcb_out
;
5261 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5262 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5263 xcb_parts
[3].iov_base
= 0;
5264 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5266 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5271 xcb_get_font_path_path_length (const xcb_get_font_path_reply_t
*R
/**< */)
5277 xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t
*R
/**< */)
5279 xcb_str_iterator_t i
;
5280 i
.data
= (xcb_str_t
*) (R
+ 1);
5281 i
.rem
= R
->path_len
;
5282 i
.index
= (char *) i
.data
- (char *) R
;
5286 xcb_get_font_path_reply_t
*
5287 xcb_get_font_path_reply (xcb_connection_t
*c
/**< */,
5288 xcb_get_font_path_cookie_t cookie
/**< */,
5289 xcb_generic_error_t
**e
/**< */)
5291 return (xcb_get_font_path_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
5295 xcb_create_pixmap_checked (xcb_connection_t
*c
/**< */,
5296 uint8_t depth
/**< */,
5297 xcb_pixmap_t pid
/**< */,
5298 xcb_drawable_t drawable
/**< */,
5299 uint16_t width
/**< */,
5300 uint16_t height
/**< */)
5302 static const xcb_protocol_request_t xcb_req
= {
5305 /* opcode */ XCB_CREATE_PIXMAP
,
5309 struct iovec xcb_parts
[4];
5310 xcb_void_cookie_t xcb_ret
;
5311 xcb_create_pixmap_request_t xcb_out
;
5313 xcb_out
.depth
= depth
;
5315 xcb_out
.drawable
= drawable
;
5316 xcb_out
.width
= width
;
5317 xcb_out
.height
= height
;
5319 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5320 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5321 xcb_parts
[3].iov_base
= 0;
5322 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5324 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5329 xcb_create_pixmap (xcb_connection_t
*c
/**< */,
5330 uint8_t depth
/**< */,
5331 xcb_pixmap_t pid
/**< */,
5332 xcb_drawable_t drawable
/**< */,
5333 uint16_t width
/**< */,
5334 uint16_t height
/**< */)
5336 static const xcb_protocol_request_t xcb_req
= {
5339 /* opcode */ XCB_CREATE_PIXMAP
,
5343 struct iovec xcb_parts
[4];
5344 xcb_void_cookie_t xcb_ret
;
5345 xcb_create_pixmap_request_t xcb_out
;
5347 xcb_out
.depth
= depth
;
5349 xcb_out
.drawable
= drawable
;
5350 xcb_out
.width
= width
;
5351 xcb_out
.height
= height
;
5353 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5354 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5355 xcb_parts
[3].iov_base
= 0;
5356 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5358 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5363 xcb_free_pixmap_checked (xcb_connection_t
*c
/**< */,
5364 xcb_pixmap_t pixmap
/**< */)
5366 static const xcb_protocol_request_t xcb_req
= {
5369 /* opcode */ XCB_FREE_PIXMAP
,
5373 struct iovec xcb_parts
[4];
5374 xcb_void_cookie_t xcb_ret
;
5375 xcb_free_pixmap_request_t xcb_out
;
5378 xcb_out
.pixmap
= pixmap
;
5380 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5381 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5382 xcb_parts
[3].iov_base
= 0;
5383 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5385 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5390 xcb_free_pixmap (xcb_connection_t
*c
/**< */,
5391 xcb_pixmap_t pixmap
/**< */)
5393 static const xcb_protocol_request_t xcb_req
= {
5396 /* opcode */ XCB_FREE_PIXMAP
,
5400 struct iovec xcb_parts
[4];
5401 xcb_void_cookie_t xcb_ret
;
5402 xcb_free_pixmap_request_t xcb_out
;
5405 xcb_out
.pixmap
= pixmap
;
5407 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5408 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5409 xcb_parts
[3].iov_base
= 0;
5410 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5412 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5417 xcb_create_gc_sizeof (const void *_buffer
/**< */)
5419 char *xcb_tmp
= (char *)_buffer
;
5420 const xcb_create_gc_request_t
*_aux
= (xcb_create_gc_request_t
*)_buffer
;
5421 unsigned int xcb_buffer_len
= 0;
5422 unsigned int xcb_block_len
= 0;
5423 unsigned int xcb_pad
= 0;
5424 unsigned int xcb_align_to
= 0;
5427 xcb_block_len
+= sizeof(xcb_create_gc_request_t
);
5428 xcb_tmp
+= xcb_block_len
;
5429 xcb_buffer_len
+= xcb_block_len
;
5432 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
5433 xcb_tmp
+= xcb_block_len
;
5434 xcb_align_to
= ALIGNOF(uint32_t);
5435 /* insert padding */
5436 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5437 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5444 return xcb_buffer_len
;
5448 xcb_create_gc_checked (xcb_connection_t
*c
/**< */,
5449 xcb_gcontext_t cid
/**< */,
5450 xcb_drawable_t drawable
/**< */,
5451 uint32_t value_mask
/**< */,
5452 const uint32_t *value_list
/**< */)
5454 static const xcb_protocol_request_t xcb_req
= {
5457 /* opcode */ XCB_CREATE_GC
,
5461 struct iovec xcb_parts
[6];
5462 xcb_void_cookie_t xcb_ret
;
5463 xcb_create_gc_request_t xcb_out
;
5467 xcb_out
.drawable
= drawable
;
5468 xcb_out
.value_mask
= value_mask
;
5470 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5471 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5472 xcb_parts
[3].iov_base
= 0;
5473 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5474 /* uint32_t value_list */
5475 xcb_parts
[4].iov_base
= (char *) value_list
;
5476 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
5477 xcb_parts
[5].iov_base
= 0;
5478 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5480 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5485 xcb_create_gc (xcb_connection_t
*c
/**< */,
5486 xcb_gcontext_t cid
/**< */,
5487 xcb_drawable_t drawable
/**< */,
5488 uint32_t value_mask
/**< */,
5489 const uint32_t *value_list
/**< */)
5491 static const xcb_protocol_request_t xcb_req
= {
5494 /* opcode */ XCB_CREATE_GC
,
5498 struct iovec xcb_parts
[6];
5499 xcb_void_cookie_t xcb_ret
;
5500 xcb_create_gc_request_t xcb_out
;
5504 xcb_out
.drawable
= drawable
;
5505 xcb_out
.value_mask
= value_mask
;
5507 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5508 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5509 xcb_parts
[3].iov_base
= 0;
5510 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5511 /* uint32_t value_list */
5512 xcb_parts
[4].iov_base
= (char *) value_list
;
5513 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
5514 xcb_parts
[5].iov_base
= 0;
5515 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5517 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5522 xcb_change_gc_sizeof (const void *_buffer
/**< */)
5524 char *xcb_tmp
= (char *)_buffer
;
5525 const xcb_change_gc_request_t
*_aux
= (xcb_change_gc_request_t
*)_buffer
;
5526 unsigned int xcb_buffer_len
= 0;
5527 unsigned int xcb_block_len
= 0;
5528 unsigned int xcb_pad
= 0;
5529 unsigned int xcb_align_to
= 0;
5532 xcb_block_len
+= sizeof(xcb_change_gc_request_t
);
5533 xcb_tmp
+= xcb_block_len
;
5534 xcb_buffer_len
+= xcb_block_len
;
5537 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
5538 xcb_tmp
+= xcb_block_len
;
5539 xcb_align_to
= ALIGNOF(uint32_t);
5540 /* insert padding */
5541 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5542 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5549 return xcb_buffer_len
;
5553 xcb_change_gc_checked (xcb_connection_t
*c
/**< */,
5554 xcb_gcontext_t gc
/**< */,
5555 uint32_t value_mask
/**< */,
5556 const uint32_t *value_list
/**< */)
5558 static const xcb_protocol_request_t xcb_req
= {
5561 /* opcode */ XCB_CHANGE_GC
,
5565 struct iovec xcb_parts
[6];
5566 xcb_void_cookie_t xcb_ret
;
5567 xcb_change_gc_request_t xcb_out
;
5571 xcb_out
.value_mask
= value_mask
;
5573 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5574 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5575 xcb_parts
[3].iov_base
= 0;
5576 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5577 /* uint32_t value_list */
5578 xcb_parts
[4].iov_base
= (char *) value_list
;
5579 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
5580 xcb_parts
[5].iov_base
= 0;
5581 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5583 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5588 xcb_change_gc (xcb_connection_t
*c
/**< */,
5589 xcb_gcontext_t gc
/**< */,
5590 uint32_t value_mask
/**< */,
5591 const uint32_t *value_list
/**< */)
5593 static const xcb_protocol_request_t xcb_req
= {
5596 /* opcode */ XCB_CHANGE_GC
,
5600 struct iovec xcb_parts
[6];
5601 xcb_void_cookie_t xcb_ret
;
5602 xcb_change_gc_request_t xcb_out
;
5606 xcb_out
.value_mask
= value_mask
;
5608 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5609 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5610 xcb_parts
[3].iov_base
= 0;
5611 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5612 /* uint32_t value_list */
5613 xcb_parts
[4].iov_base
= (char *) value_list
;
5614 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
5615 xcb_parts
[5].iov_base
= 0;
5616 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5618 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5623 xcb_copy_gc_checked (xcb_connection_t
*c
/**< */,
5624 xcb_gcontext_t src_gc
/**< */,
5625 xcb_gcontext_t dst_gc
/**< */,
5626 uint32_t value_mask
/**< */)
5628 static const xcb_protocol_request_t xcb_req
= {
5631 /* opcode */ XCB_COPY_GC
,
5635 struct iovec xcb_parts
[4];
5636 xcb_void_cookie_t xcb_ret
;
5637 xcb_copy_gc_request_t xcb_out
;
5640 xcb_out
.src_gc
= src_gc
;
5641 xcb_out
.dst_gc
= dst_gc
;
5642 xcb_out
.value_mask
= value_mask
;
5644 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5645 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5646 xcb_parts
[3].iov_base
= 0;
5647 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5649 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5654 xcb_copy_gc (xcb_connection_t
*c
/**< */,
5655 xcb_gcontext_t src_gc
/**< */,
5656 xcb_gcontext_t dst_gc
/**< */,
5657 uint32_t value_mask
/**< */)
5659 static const xcb_protocol_request_t xcb_req
= {
5662 /* opcode */ XCB_COPY_GC
,
5666 struct iovec xcb_parts
[4];
5667 xcb_void_cookie_t xcb_ret
;
5668 xcb_copy_gc_request_t xcb_out
;
5671 xcb_out
.src_gc
= src_gc
;
5672 xcb_out
.dst_gc
= dst_gc
;
5673 xcb_out
.value_mask
= value_mask
;
5675 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5676 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5677 xcb_parts
[3].iov_base
= 0;
5678 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5680 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5685 xcb_set_dashes_sizeof (const void *_buffer
/**< */)
5687 char *xcb_tmp
= (char *)_buffer
;
5688 const xcb_set_dashes_request_t
*_aux
= (xcb_set_dashes_request_t
*)_buffer
;
5689 unsigned int xcb_buffer_len
= 0;
5690 unsigned int xcb_block_len
= 0;
5691 unsigned int xcb_pad
= 0;
5692 unsigned int xcb_align_to
= 0;
5695 xcb_block_len
+= sizeof(xcb_set_dashes_request_t
);
5696 xcb_tmp
+= xcb_block_len
;
5697 xcb_buffer_len
+= xcb_block_len
;
5700 xcb_block_len
+= _aux
->dashes_len
* sizeof(uint8_t);
5701 xcb_tmp
+= xcb_block_len
;
5702 xcb_align_to
= ALIGNOF(uint8_t);
5703 /* insert padding */
5704 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5705 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5712 return xcb_buffer_len
;
5716 xcb_set_dashes_checked (xcb_connection_t
*c
/**< */,
5717 xcb_gcontext_t gc
/**< */,
5718 uint16_t dash_offset
/**< */,
5719 uint16_t dashes_len
/**< */,
5720 const uint8_t *dashes
/**< */)
5722 static const xcb_protocol_request_t xcb_req
= {
5725 /* opcode */ XCB_SET_DASHES
,
5729 struct iovec xcb_parts
[6];
5730 xcb_void_cookie_t xcb_ret
;
5731 xcb_set_dashes_request_t xcb_out
;
5735 xcb_out
.dash_offset
= dash_offset
;
5736 xcb_out
.dashes_len
= dashes_len
;
5738 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5739 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5740 xcb_parts
[3].iov_base
= 0;
5741 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5742 /* uint8_t dashes */
5743 xcb_parts
[4].iov_base
= (char *) dashes
;
5744 xcb_parts
[4].iov_len
= dashes_len
* sizeof(uint8_t);
5745 xcb_parts
[5].iov_base
= 0;
5746 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5748 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5753 xcb_set_dashes (xcb_connection_t
*c
/**< */,
5754 xcb_gcontext_t gc
/**< */,
5755 uint16_t dash_offset
/**< */,
5756 uint16_t dashes_len
/**< */,
5757 const uint8_t *dashes
/**< */)
5759 static const xcb_protocol_request_t xcb_req
= {
5762 /* opcode */ XCB_SET_DASHES
,
5766 struct iovec xcb_parts
[6];
5767 xcb_void_cookie_t xcb_ret
;
5768 xcb_set_dashes_request_t xcb_out
;
5772 xcb_out
.dash_offset
= dash_offset
;
5773 xcb_out
.dashes_len
= dashes_len
;
5775 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5776 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5777 xcb_parts
[3].iov_base
= 0;
5778 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5779 /* uint8_t dashes */
5780 xcb_parts
[4].iov_base
= (char *) dashes
;
5781 xcb_parts
[4].iov_len
= dashes_len
* sizeof(uint8_t);
5782 xcb_parts
[5].iov_base
= 0;
5783 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5785 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5790 xcb_set_clip_rectangles_sizeof (const void *_buffer
/**< */,
5791 uint32_t rectangles_len
/**< */)
5793 char *xcb_tmp
= (char *)_buffer
;
5794 unsigned int xcb_buffer_len
= 0;
5795 unsigned int xcb_block_len
= 0;
5796 unsigned int xcb_pad
= 0;
5797 unsigned int xcb_align_to
= 0;
5800 xcb_block_len
+= sizeof(xcb_set_clip_rectangles_request_t
);
5801 xcb_tmp
+= xcb_block_len
;
5802 xcb_buffer_len
+= xcb_block_len
;
5805 xcb_block_len
+= rectangles_len
* sizeof(xcb_rectangle_t
);
5806 xcb_tmp
+= xcb_block_len
;
5807 xcb_align_to
= ALIGNOF(xcb_rectangle_t
);
5808 /* insert padding */
5809 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
5810 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
5817 return xcb_buffer_len
;
5821 xcb_set_clip_rectangles_checked (xcb_connection_t
*c
/**< */,
5822 uint8_t ordering
/**< */,
5823 xcb_gcontext_t gc
/**< */,
5824 int16_t clip_x_origin
/**< */,
5825 int16_t clip_y_origin
/**< */,
5826 uint32_t rectangles_len
/**< */,
5827 const xcb_rectangle_t
*rectangles
/**< */)
5829 static const xcb_protocol_request_t xcb_req
= {
5832 /* opcode */ XCB_SET_CLIP_RECTANGLES
,
5836 struct iovec xcb_parts
[6];
5837 xcb_void_cookie_t xcb_ret
;
5838 xcb_set_clip_rectangles_request_t xcb_out
;
5840 xcb_out
.ordering
= ordering
;
5842 xcb_out
.clip_x_origin
= clip_x_origin
;
5843 xcb_out
.clip_y_origin
= clip_y_origin
;
5845 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5846 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5847 xcb_parts
[3].iov_base
= 0;
5848 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5849 /* xcb_rectangle_t rectangles */
5850 xcb_parts
[4].iov_base
= (char *) rectangles
;
5851 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
5852 xcb_parts
[5].iov_base
= 0;
5853 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5855 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5860 xcb_set_clip_rectangles (xcb_connection_t
*c
/**< */,
5861 uint8_t ordering
/**< */,
5862 xcb_gcontext_t gc
/**< */,
5863 int16_t clip_x_origin
/**< */,
5864 int16_t clip_y_origin
/**< */,
5865 uint32_t rectangles_len
/**< */,
5866 const xcb_rectangle_t
*rectangles
/**< */)
5868 static const xcb_protocol_request_t xcb_req
= {
5871 /* opcode */ XCB_SET_CLIP_RECTANGLES
,
5875 struct iovec xcb_parts
[6];
5876 xcb_void_cookie_t xcb_ret
;
5877 xcb_set_clip_rectangles_request_t xcb_out
;
5879 xcb_out
.ordering
= ordering
;
5881 xcb_out
.clip_x_origin
= clip_x_origin
;
5882 xcb_out
.clip_y_origin
= clip_y_origin
;
5884 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5885 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5886 xcb_parts
[3].iov_base
= 0;
5887 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5888 /* xcb_rectangle_t rectangles */
5889 xcb_parts
[4].iov_base
= (char *) rectangles
;
5890 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
5891 xcb_parts
[5].iov_base
= 0;
5892 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
5894 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5899 xcb_free_gc_checked (xcb_connection_t
*c
/**< */,
5900 xcb_gcontext_t gc
/**< */)
5902 static const xcb_protocol_request_t xcb_req
= {
5905 /* opcode */ XCB_FREE_GC
,
5909 struct iovec xcb_parts
[4];
5910 xcb_void_cookie_t xcb_ret
;
5911 xcb_free_gc_request_t xcb_out
;
5916 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5917 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5918 xcb_parts
[3].iov_base
= 0;
5919 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5921 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5926 xcb_free_gc (xcb_connection_t
*c
/**< */,
5927 xcb_gcontext_t gc
/**< */)
5929 static const xcb_protocol_request_t xcb_req
= {
5932 /* opcode */ XCB_FREE_GC
,
5936 struct iovec xcb_parts
[4];
5937 xcb_void_cookie_t xcb_ret
;
5938 xcb_free_gc_request_t xcb_out
;
5943 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5944 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5945 xcb_parts
[3].iov_base
= 0;
5946 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5948 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
5953 xcb_clear_area_checked (xcb_connection_t
*c
/**< */,
5954 uint8_t exposures
/**< */,
5955 xcb_window_t window
/**< */,
5958 uint16_t width
/**< */,
5959 uint16_t height
/**< */)
5961 static const xcb_protocol_request_t xcb_req
= {
5964 /* opcode */ XCB_CLEAR_AREA
,
5968 struct iovec xcb_parts
[4];
5969 xcb_void_cookie_t xcb_ret
;
5970 xcb_clear_area_request_t xcb_out
;
5972 xcb_out
.exposures
= exposures
;
5973 xcb_out
.window
= window
;
5976 xcb_out
.width
= width
;
5977 xcb_out
.height
= height
;
5979 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
5980 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
5981 xcb_parts
[3].iov_base
= 0;
5982 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
5984 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
5989 xcb_clear_area (xcb_connection_t
*c
/**< */,
5990 uint8_t exposures
/**< */,
5991 xcb_window_t window
/**< */,
5994 uint16_t width
/**< */,
5995 uint16_t height
/**< */)
5997 static const xcb_protocol_request_t xcb_req
= {
6000 /* opcode */ XCB_CLEAR_AREA
,
6004 struct iovec xcb_parts
[4];
6005 xcb_void_cookie_t xcb_ret
;
6006 xcb_clear_area_request_t xcb_out
;
6008 xcb_out
.exposures
= exposures
;
6009 xcb_out
.window
= window
;
6012 xcb_out
.width
= width
;
6013 xcb_out
.height
= height
;
6015 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6016 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6017 xcb_parts
[3].iov_base
= 0;
6018 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6020 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6025 xcb_copy_area_checked (xcb_connection_t
*c
/**< */,
6026 xcb_drawable_t src_drawable
/**< */,
6027 xcb_drawable_t dst_drawable
/**< */,
6028 xcb_gcontext_t gc
/**< */,
6029 int16_t src_x
/**< */,
6030 int16_t src_y
/**< */,
6031 int16_t dst_x
/**< */,
6032 int16_t dst_y
/**< */,
6033 uint16_t width
/**< */,
6034 uint16_t height
/**< */)
6036 static const xcb_protocol_request_t xcb_req
= {
6039 /* opcode */ XCB_COPY_AREA
,
6043 struct iovec xcb_parts
[4];
6044 xcb_void_cookie_t xcb_ret
;
6045 xcb_copy_area_request_t xcb_out
;
6048 xcb_out
.src_drawable
= src_drawable
;
6049 xcb_out
.dst_drawable
= dst_drawable
;
6051 xcb_out
.src_x
= src_x
;
6052 xcb_out
.src_y
= src_y
;
6053 xcb_out
.dst_x
= dst_x
;
6054 xcb_out
.dst_y
= dst_y
;
6055 xcb_out
.width
= width
;
6056 xcb_out
.height
= height
;
6058 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6059 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6060 xcb_parts
[3].iov_base
= 0;
6061 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6063 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6068 xcb_copy_area (xcb_connection_t
*c
/**< */,
6069 xcb_drawable_t src_drawable
/**< */,
6070 xcb_drawable_t dst_drawable
/**< */,
6071 xcb_gcontext_t gc
/**< */,
6072 int16_t src_x
/**< */,
6073 int16_t src_y
/**< */,
6074 int16_t dst_x
/**< */,
6075 int16_t dst_y
/**< */,
6076 uint16_t width
/**< */,
6077 uint16_t height
/**< */)
6079 static const xcb_protocol_request_t xcb_req
= {
6082 /* opcode */ XCB_COPY_AREA
,
6086 struct iovec xcb_parts
[4];
6087 xcb_void_cookie_t xcb_ret
;
6088 xcb_copy_area_request_t xcb_out
;
6091 xcb_out
.src_drawable
= src_drawable
;
6092 xcb_out
.dst_drawable
= dst_drawable
;
6094 xcb_out
.src_x
= src_x
;
6095 xcb_out
.src_y
= src_y
;
6096 xcb_out
.dst_x
= dst_x
;
6097 xcb_out
.dst_y
= dst_y
;
6098 xcb_out
.width
= width
;
6099 xcb_out
.height
= height
;
6101 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6102 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6103 xcb_parts
[3].iov_base
= 0;
6104 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6106 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6111 xcb_copy_plane_checked (xcb_connection_t
*c
/**< */,
6112 xcb_drawable_t src_drawable
/**< */,
6113 xcb_drawable_t dst_drawable
/**< */,
6114 xcb_gcontext_t gc
/**< */,
6115 int16_t src_x
/**< */,
6116 int16_t src_y
/**< */,
6117 int16_t dst_x
/**< */,
6118 int16_t dst_y
/**< */,
6119 uint16_t width
/**< */,
6120 uint16_t height
/**< */,
6121 uint32_t bit_plane
/**< */)
6123 static const xcb_protocol_request_t xcb_req
= {
6126 /* opcode */ XCB_COPY_PLANE
,
6130 struct iovec xcb_parts
[4];
6131 xcb_void_cookie_t xcb_ret
;
6132 xcb_copy_plane_request_t xcb_out
;
6135 xcb_out
.src_drawable
= src_drawable
;
6136 xcb_out
.dst_drawable
= dst_drawable
;
6138 xcb_out
.src_x
= src_x
;
6139 xcb_out
.src_y
= src_y
;
6140 xcb_out
.dst_x
= dst_x
;
6141 xcb_out
.dst_y
= dst_y
;
6142 xcb_out
.width
= width
;
6143 xcb_out
.height
= height
;
6144 xcb_out
.bit_plane
= bit_plane
;
6146 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6147 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6148 xcb_parts
[3].iov_base
= 0;
6149 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6151 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6156 xcb_copy_plane (xcb_connection_t
*c
/**< */,
6157 xcb_drawable_t src_drawable
/**< */,
6158 xcb_drawable_t dst_drawable
/**< */,
6159 xcb_gcontext_t gc
/**< */,
6160 int16_t src_x
/**< */,
6161 int16_t src_y
/**< */,
6162 int16_t dst_x
/**< */,
6163 int16_t dst_y
/**< */,
6164 uint16_t width
/**< */,
6165 uint16_t height
/**< */,
6166 uint32_t bit_plane
/**< */)
6168 static const xcb_protocol_request_t xcb_req
= {
6171 /* opcode */ XCB_COPY_PLANE
,
6175 struct iovec xcb_parts
[4];
6176 xcb_void_cookie_t xcb_ret
;
6177 xcb_copy_plane_request_t xcb_out
;
6180 xcb_out
.src_drawable
= src_drawable
;
6181 xcb_out
.dst_drawable
= dst_drawable
;
6183 xcb_out
.src_x
= src_x
;
6184 xcb_out
.src_y
= src_y
;
6185 xcb_out
.dst_x
= dst_x
;
6186 xcb_out
.dst_y
= dst_y
;
6187 xcb_out
.width
= width
;
6188 xcb_out
.height
= height
;
6189 xcb_out
.bit_plane
= bit_plane
;
6191 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6192 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6193 xcb_parts
[3].iov_base
= 0;
6194 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6196 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6201 xcb_poly_point_sizeof (const void *_buffer
/**< */,
6202 uint32_t points_len
/**< */)
6204 char *xcb_tmp
= (char *)_buffer
;
6205 unsigned int xcb_buffer_len
= 0;
6206 unsigned int xcb_block_len
= 0;
6207 unsigned int xcb_pad
= 0;
6208 unsigned int xcb_align_to
= 0;
6211 xcb_block_len
+= sizeof(xcb_poly_point_request_t
);
6212 xcb_tmp
+= xcb_block_len
;
6213 xcb_buffer_len
+= xcb_block_len
;
6216 xcb_block_len
+= points_len
* sizeof(xcb_point_t
);
6217 xcb_tmp
+= xcb_block_len
;
6218 xcb_align_to
= ALIGNOF(xcb_point_t
);
6219 /* insert padding */
6220 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6221 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6228 return xcb_buffer_len
;
6232 xcb_poly_point_checked (xcb_connection_t
*c
/**< */,
6233 uint8_t coordinate_mode
/**< */,
6234 xcb_drawable_t drawable
/**< */,
6235 xcb_gcontext_t gc
/**< */,
6236 uint32_t points_len
/**< */,
6237 const xcb_point_t
*points
/**< */)
6239 static const xcb_protocol_request_t xcb_req
= {
6242 /* opcode */ XCB_POLY_POINT
,
6246 struct iovec xcb_parts
[6];
6247 xcb_void_cookie_t xcb_ret
;
6248 xcb_poly_point_request_t xcb_out
;
6250 xcb_out
.coordinate_mode
= coordinate_mode
;
6251 xcb_out
.drawable
= drawable
;
6254 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6255 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6256 xcb_parts
[3].iov_base
= 0;
6257 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6258 /* xcb_point_t points */
6259 xcb_parts
[4].iov_base
= (char *) points
;
6260 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6261 xcb_parts
[5].iov_base
= 0;
6262 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6264 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6269 xcb_poly_point (xcb_connection_t
*c
/**< */,
6270 uint8_t coordinate_mode
/**< */,
6271 xcb_drawable_t drawable
/**< */,
6272 xcb_gcontext_t gc
/**< */,
6273 uint32_t points_len
/**< */,
6274 const xcb_point_t
*points
/**< */)
6276 static const xcb_protocol_request_t xcb_req
= {
6279 /* opcode */ XCB_POLY_POINT
,
6283 struct iovec xcb_parts
[6];
6284 xcb_void_cookie_t xcb_ret
;
6285 xcb_poly_point_request_t xcb_out
;
6287 xcb_out
.coordinate_mode
= coordinate_mode
;
6288 xcb_out
.drawable
= drawable
;
6291 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6292 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6293 xcb_parts
[3].iov_base
= 0;
6294 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6295 /* xcb_point_t points */
6296 xcb_parts
[4].iov_base
= (char *) points
;
6297 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6298 xcb_parts
[5].iov_base
= 0;
6299 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6301 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6306 xcb_poly_line_sizeof (const void *_buffer
/**< */,
6307 uint32_t points_len
/**< */)
6309 char *xcb_tmp
= (char *)_buffer
;
6310 unsigned int xcb_buffer_len
= 0;
6311 unsigned int xcb_block_len
= 0;
6312 unsigned int xcb_pad
= 0;
6313 unsigned int xcb_align_to
= 0;
6316 xcb_block_len
+= sizeof(xcb_poly_line_request_t
);
6317 xcb_tmp
+= xcb_block_len
;
6318 xcb_buffer_len
+= xcb_block_len
;
6321 xcb_block_len
+= points_len
* sizeof(xcb_point_t
);
6322 xcb_tmp
+= xcb_block_len
;
6323 xcb_align_to
= ALIGNOF(xcb_point_t
);
6324 /* insert padding */
6325 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6326 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6333 return xcb_buffer_len
;
6337 xcb_poly_line_checked (xcb_connection_t
*c
/**< */,
6338 uint8_t coordinate_mode
/**< */,
6339 xcb_drawable_t drawable
/**< */,
6340 xcb_gcontext_t gc
/**< */,
6341 uint32_t points_len
/**< */,
6342 const xcb_point_t
*points
/**< */)
6344 static const xcb_protocol_request_t xcb_req
= {
6347 /* opcode */ XCB_POLY_LINE
,
6351 struct iovec xcb_parts
[6];
6352 xcb_void_cookie_t xcb_ret
;
6353 xcb_poly_line_request_t xcb_out
;
6355 xcb_out
.coordinate_mode
= coordinate_mode
;
6356 xcb_out
.drawable
= drawable
;
6359 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6360 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6361 xcb_parts
[3].iov_base
= 0;
6362 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6363 /* xcb_point_t points */
6364 xcb_parts
[4].iov_base
= (char *) points
;
6365 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6366 xcb_parts
[5].iov_base
= 0;
6367 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6369 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6374 xcb_poly_line (xcb_connection_t
*c
/**< */,
6375 uint8_t coordinate_mode
/**< */,
6376 xcb_drawable_t drawable
/**< */,
6377 xcb_gcontext_t gc
/**< */,
6378 uint32_t points_len
/**< */,
6379 const xcb_point_t
*points
/**< */)
6381 static const xcb_protocol_request_t xcb_req
= {
6384 /* opcode */ XCB_POLY_LINE
,
6388 struct iovec xcb_parts
[6];
6389 xcb_void_cookie_t xcb_ret
;
6390 xcb_poly_line_request_t xcb_out
;
6392 xcb_out
.coordinate_mode
= coordinate_mode
;
6393 xcb_out
.drawable
= drawable
;
6396 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6397 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6398 xcb_parts
[3].iov_base
= 0;
6399 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6400 /* xcb_point_t points */
6401 xcb_parts
[4].iov_base
= (char *) points
;
6402 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6403 xcb_parts
[5].iov_base
= 0;
6404 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6406 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6411 xcb_segment_next (xcb_segment_iterator_t
*i
/**< */)
6415 i
->index
+= sizeof(xcb_segment_t
);
6418 xcb_generic_iterator_t
6419 xcb_segment_end (xcb_segment_iterator_t i
/**< */)
6421 xcb_generic_iterator_t ret
;
6422 ret
.data
= i
.data
+ i
.rem
;
6423 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
6429 xcb_poly_segment_sizeof (const void *_buffer
/**< */,
6430 uint32_t segments_len
/**< */)
6432 char *xcb_tmp
= (char *)_buffer
;
6433 unsigned int xcb_buffer_len
= 0;
6434 unsigned int xcb_block_len
= 0;
6435 unsigned int xcb_pad
= 0;
6436 unsigned int xcb_align_to
= 0;
6439 xcb_block_len
+= sizeof(xcb_poly_segment_request_t
);
6440 xcb_tmp
+= xcb_block_len
;
6441 xcb_buffer_len
+= xcb_block_len
;
6444 xcb_block_len
+= segments_len
* sizeof(xcb_segment_t
);
6445 xcb_tmp
+= xcb_block_len
;
6446 xcb_align_to
= ALIGNOF(xcb_segment_t
);
6447 /* insert padding */
6448 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6449 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6456 return xcb_buffer_len
;
6460 xcb_poly_segment_checked (xcb_connection_t
*c
/**< */,
6461 xcb_drawable_t drawable
/**< */,
6462 xcb_gcontext_t gc
/**< */,
6463 uint32_t segments_len
/**< */,
6464 const xcb_segment_t
*segments
/**< */)
6466 static const xcb_protocol_request_t xcb_req
= {
6469 /* opcode */ XCB_POLY_SEGMENT
,
6473 struct iovec xcb_parts
[6];
6474 xcb_void_cookie_t xcb_ret
;
6475 xcb_poly_segment_request_t xcb_out
;
6478 xcb_out
.drawable
= drawable
;
6481 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6482 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6483 xcb_parts
[3].iov_base
= 0;
6484 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6485 /* xcb_segment_t segments */
6486 xcb_parts
[4].iov_base
= (char *) segments
;
6487 xcb_parts
[4].iov_len
= segments_len
* sizeof(xcb_segment_t
);
6488 xcb_parts
[5].iov_base
= 0;
6489 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6491 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6496 xcb_poly_segment (xcb_connection_t
*c
/**< */,
6497 xcb_drawable_t drawable
/**< */,
6498 xcb_gcontext_t gc
/**< */,
6499 uint32_t segments_len
/**< */,
6500 const xcb_segment_t
*segments
/**< */)
6502 static const xcb_protocol_request_t xcb_req
= {
6505 /* opcode */ XCB_POLY_SEGMENT
,
6509 struct iovec xcb_parts
[6];
6510 xcb_void_cookie_t xcb_ret
;
6511 xcb_poly_segment_request_t xcb_out
;
6514 xcb_out
.drawable
= drawable
;
6517 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6518 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6519 xcb_parts
[3].iov_base
= 0;
6520 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6521 /* xcb_segment_t segments */
6522 xcb_parts
[4].iov_base
= (char *) segments
;
6523 xcb_parts
[4].iov_len
= segments_len
* sizeof(xcb_segment_t
);
6524 xcb_parts
[5].iov_base
= 0;
6525 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6527 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6532 xcb_poly_rectangle_sizeof (const void *_buffer
/**< */,
6533 uint32_t rectangles_len
/**< */)
6535 char *xcb_tmp
= (char *)_buffer
;
6536 unsigned int xcb_buffer_len
= 0;
6537 unsigned int xcb_block_len
= 0;
6538 unsigned int xcb_pad
= 0;
6539 unsigned int xcb_align_to
= 0;
6542 xcb_block_len
+= sizeof(xcb_poly_rectangle_request_t
);
6543 xcb_tmp
+= xcb_block_len
;
6544 xcb_buffer_len
+= xcb_block_len
;
6547 xcb_block_len
+= rectangles_len
* sizeof(xcb_rectangle_t
);
6548 xcb_tmp
+= xcb_block_len
;
6549 xcb_align_to
= ALIGNOF(xcb_rectangle_t
);
6550 /* insert padding */
6551 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6552 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6559 return xcb_buffer_len
;
6563 xcb_poly_rectangle_checked (xcb_connection_t
*c
/**< */,
6564 xcb_drawable_t drawable
/**< */,
6565 xcb_gcontext_t gc
/**< */,
6566 uint32_t rectangles_len
/**< */,
6567 const xcb_rectangle_t
*rectangles
/**< */)
6569 static const xcb_protocol_request_t xcb_req
= {
6572 /* opcode */ XCB_POLY_RECTANGLE
,
6576 struct iovec xcb_parts
[6];
6577 xcb_void_cookie_t xcb_ret
;
6578 xcb_poly_rectangle_request_t xcb_out
;
6581 xcb_out
.drawable
= drawable
;
6584 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6585 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6586 xcb_parts
[3].iov_base
= 0;
6587 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6588 /* xcb_rectangle_t rectangles */
6589 xcb_parts
[4].iov_base
= (char *) rectangles
;
6590 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
6591 xcb_parts
[5].iov_base
= 0;
6592 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6594 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6599 xcb_poly_rectangle (xcb_connection_t
*c
/**< */,
6600 xcb_drawable_t drawable
/**< */,
6601 xcb_gcontext_t gc
/**< */,
6602 uint32_t rectangles_len
/**< */,
6603 const xcb_rectangle_t
*rectangles
/**< */)
6605 static const xcb_protocol_request_t xcb_req
= {
6608 /* opcode */ XCB_POLY_RECTANGLE
,
6612 struct iovec xcb_parts
[6];
6613 xcb_void_cookie_t xcb_ret
;
6614 xcb_poly_rectangle_request_t xcb_out
;
6617 xcb_out
.drawable
= drawable
;
6620 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6621 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6622 xcb_parts
[3].iov_base
= 0;
6623 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6624 /* xcb_rectangle_t rectangles */
6625 xcb_parts
[4].iov_base
= (char *) rectangles
;
6626 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
6627 xcb_parts
[5].iov_base
= 0;
6628 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6630 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6635 xcb_poly_arc_sizeof (const void *_buffer
/**< */,
6636 uint32_t arcs_len
/**< */)
6638 char *xcb_tmp
= (char *)_buffer
;
6639 unsigned int xcb_buffer_len
= 0;
6640 unsigned int xcb_block_len
= 0;
6641 unsigned int xcb_pad
= 0;
6642 unsigned int xcb_align_to
= 0;
6645 xcb_block_len
+= sizeof(xcb_poly_arc_request_t
);
6646 xcb_tmp
+= xcb_block_len
;
6647 xcb_buffer_len
+= xcb_block_len
;
6650 xcb_block_len
+= arcs_len
* sizeof(xcb_arc_t
);
6651 xcb_tmp
+= xcb_block_len
;
6652 xcb_align_to
= ALIGNOF(xcb_arc_t
);
6653 /* insert padding */
6654 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6655 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6662 return xcb_buffer_len
;
6666 xcb_poly_arc_checked (xcb_connection_t
*c
/**< */,
6667 xcb_drawable_t drawable
/**< */,
6668 xcb_gcontext_t gc
/**< */,
6669 uint32_t arcs_len
/**< */,
6670 const xcb_arc_t
*arcs
/**< */)
6672 static const xcb_protocol_request_t xcb_req
= {
6675 /* opcode */ XCB_POLY_ARC
,
6679 struct iovec xcb_parts
[6];
6680 xcb_void_cookie_t xcb_ret
;
6681 xcb_poly_arc_request_t xcb_out
;
6684 xcb_out
.drawable
= drawable
;
6687 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6688 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6689 xcb_parts
[3].iov_base
= 0;
6690 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6691 /* xcb_arc_t arcs */
6692 xcb_parts
[4].iov_base
= (char *) arcs
;
6693 xcb_parts
[4].iov_len
= arcs_len
* sizeof(xcb_arc_t
);
6694 xcb_parts
[5].iov_base
= 0;
6695 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6697 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6702 xcb_poly_arc (xcb_connection_t
*c
/**< */,
6703 xcb_drawable_t drawable
/**< */,
6704 xcb_gcontext_t gc
/**< */,
6705 uint32_t arcs_len
/**< */,
6706 const xcb_arc_t
*arcs
/**< */)
6708 static const xcb_protocol_request_t xcb_req
= {
6711 /* opcode */ XCB_POLY_ARC
,
6715 struct iovec xcb_parts
[6];
6716 xcb_void_cookie_t xcb_ret
;
6717 xcb_poly_arc_request_t xcb_out
;
6720 xcb_out
.drawable
= drawable
;
6723 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6724 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6725 xcb_parts
[3].iov_base
= 0;
6726 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6727 /* xcb_arc_t arcs */
6728 xcb_parts
[4].iov_base
= (char *) arcs
;
6729 xcb_parts
[4].iov_len
= arcs_len
* sizeof(xcb_arc_t
);
6730 xcb_parts
[5].iov_base
= 0;
6731 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6733 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6738 xcb_fill_poly_sizeof (const void *_buffer
/**< */,
6739 uint32_t points_len
/**< */)
6741 char *xcb_tmp
= (char *)_buffer
;
6742 unsigned int xcb_buffer_len
= 0;
6743 unsigned int xcb_block_len
= 0;
6744 unsigned int xcb_pad
= 0;
6745 unsigned int xcb_align_to
= 0;
6748 xcb_block_len
+= sizeof(xcb_fill_poly_request_t
);
6749 xcb_tmp
+= xcb_block_len
;
6750 xcb_buffer_len
+= xcb_block_len
;
6753 xcb_block_len
+= points_len
* sizeof(xcb_point_t
);
6754 xcb_tmp
+= xcb_block_len
;
6755 xcb_align_to
= ALIGNOF(xcb_point_t
);
6756 /* insert padding */
6757 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6758 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6765 return xcb_buffer_len
;
6769 xcb_fill_poly_checked (xcb_connection_t
*c
/**< */,
6770 xcb_drawable_t drawable
/**< */,
6771 xcb_gcontext_t gc
/**< */,
6772 uint8_t shape
/**< */,
6773 uint8_t coordinate_mode
/**< */,
6774 uint32_t points_len
/**< */,
6775 const xcb_point_t
*points
/**< */)
6777 static const xcb_protocol_request_t xcb_req
= {
6780 /* opcode */ XCB_FILL_POLY
,
6784 struct iovec xcb_parts
[6];
6785 xcb_void_cookie_t xcb_ret
;
6786 xcb_fill_poly_request_t xcb_out
;
6789 xcb_out
.drawable
= drawable
;
6791 xcb_out
.shape
= shape
;
6792 xcb_out
.coordinate_mode
= coordinate_mode
;
6793 memset(xcb_out
.pad1
, 0, 2);
6795 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6796 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6797 xcb_parts
[3].iov_base
= 0;
6798 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6799 /* xcb_point_t points */
6800 xcb_parts
[4].iov_base
= (char *) points
;
6801 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6802 xcb_parts
[5].iov_base
= 0;
6803 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6805 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6810 xcb_fill_poly (xcb_connection_t
*c
/**< */,
6811 xcb_drawable_t drawable
/**< */,
6812 xcb_gcontext_t gc
/**< */,
6813 uint8_t shape
/**< */,
6814 uint8_t coordinate_mode
/**< */,
6815 uint32_t points_len
/**< */,
6816 const xcb_point_t
*points
/**< */)
6818 static const xcb_protocol_request_t xcb_req
= {
6821 /* opcode */ XCB_FILL_POLY
,
6825 struct iovec xcb_parts
[6];
6826 xcb_void_cookie_t xcb_ret
;
6827 xcb_fill_poly_request_t xcb_out
;
6830 xcb_out
.drawable
= drawable
;
6832 xcb_out
.shape
= shape
;
6833 xcb_out
.coordinate_mode
= coordinate_mode
;
6834 memset(xcb_out
.pad1
, 0, 2);
6836 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6837 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6838 xcb_parts
[3].iov_base
= 0;
6839 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6840 /* xcb_point_t points */
6841 xcb_parts
[4].iov_base
= (char *) points
;
6842 xcb_parts
[4].iov_len
= points_len
* sizeof(xcb_point_t
);
6843 xcb_parts
[5].iov_base
= 0;
6844 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6846 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6851 xcb_poly_fill_rectangle_sizeof (const void *_buffer
/**< */,
6852 uint32_t rectangles_len
/**< */)
6854 char *xcb_tmp
= (char *)_buffer
;
6855 unsigned int xcb_buffer_len
= 0;
6856 unsigned int xcb_block_len
= 0;
6857 unsigned int xcb_pad
= 0;
6858 unsigned int xcb_align_to
= 0;
6861 xcb_block_len
+= sizeof(xcb_poly_fill_rectangle_request_t
);
6862 xcb_tmp
+= xcb_block_len
;
6863 xcb_buffer_len
+= xcb_block_len
;
6866 xcb_block_len
+= rectangles_len
* sizeof(xcb_rectangle_t
);
6867 xcb_tmp
+= xcb_block_len
;
6868 xcb_align_to
= ALIGNOF(xcb_rectangle_t
);
6869 /* insert padding */
6870 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6871 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6878 return xcb_buffer_len
;
6882 xcb_poly_fill_rectangle_checked (xcb_connection_t
*c
/**< */,
6883 xcb_drawable_t drawable
/**< */,
6884 xcb_gcontext_t gc
/**< */,
6885 uint32_t rectangles_len
/**< */,
6886 const xcb_rectangle_t
*rectangles
/**< */)
6888 static const xcb_protocol_request_t xcb_req
= {
6891 /* opcode */ XCB_POLY_FILL_RECTANGLE
,
6895 struct iovec xcb_parts
[6];
6896 xcb_void_cookie_t xcb_ret
;
6897 xcb_poly_fill_rectangle_request_t xcb_out
;
6900 xcb_out
.drawable
= drawable
;
6903 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6904 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6905 xcb_parts
[3].iov_base
= 0;
6906 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6907 /* xcb_rectangle_t rectangles */
6908 xcb_parts
[4].iov_base
= (char *) rectangles
;
6909 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
6910 xcb_parts
[5].iov_base
= 0;
6911 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6913 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
6918 xcb_poly_fill_rectangle (xcb_connection_t
*c
/**< */,
6919 xcb_drawable_t drawable
/**< */,
6920 xcb_gcontext_t gc
/**< */,
6921 uint32_t rectangles_len
/**< */,
6922 const xcb_rectangle_t
*rectangles
/**< */)
6924 static const xcb_protocol_request_t xcb_req
= {
6927 /* opcode */ XCB_POLY_FILL_RECTANGLE
,
6931 struct iovec xcb_parts
[6];
6932 xcb_void_cookie_t xcb_ret
;
6933 xcb_poly_fill_rectangle_request_t xcb_out
;
6936 xcb_out
.drawable
= drawable
;
6939 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
6940 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
6941 xcb_parts
[3].iov_base
= 0;
6942 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
6943 /* xcb_rectangle_t rectangles */
6944 xcb_parts
[4].iov_base
= (char *) rectangles
;
6945 xcb_parts
[4].iov_len
= rectangles_len
* sizeof(xcb_rectangle_t
);
6946 xcb_parts
[5].iov_base
= 0;
6947 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
6949 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
6954 xcb_poly_fill_arc_sizeof (const void *_buffer
/**< */,
6955 uint32_t arcs_len
/**< */)
6957 char *xcb_tmp
= (char *)_buffer
;
6958 unsigned int xcb_buffer_len
= 0;
6959 unsigned int xcb_block_len
= 0;
6960 unsigned int xcb_pad
= 0;
6961 unsigned int xcb_align_to
= 0;
6964 xcb_block_len
+= sizeof(xcb_poly_fill_arc_request_t
);
6965 xcb_tmp
+= xcb_block_len
;
6966 xcb_buffer_len
+= xcb_block_len
;
6969 xcb_block_len
+= arcs_len
* sizeof(xcb_arc_t
);
6970 xcb_tmp
+= xcb_block_len
;
6971 xcb_align_to
= ALIGNOF(xcb_arc_t
);
6972 /* insert padding */
6973 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
6974 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
6981 return xcb_buffer_len
;
6985 xcb_poly_fill_arc_checked (xcb_connection_t
*c
/**< */,
6986 xcb_drawable_t drawable
/**< */,
6987 xcb_gcontext_t gc
/**< */,
6988 uint32_t arcs_len
/**< */,
6989 const xcb_arc_t
*arcs
/**< */)
6991 static const xcb_protocol_request_t xcb_req
= {
6994 /* opcode */ XCB_POLY_FILL_ARC
,
6998 struct iovec xcb_parts
[6];
6999 xcb_void_cookie_t xcb_ret
;
7000 xcb_poly_fill_arc_request_t xcb_out
;
7003 xcb_out
.drawable
= drawable
;
7006 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7007 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7008 xcb_parts
[3].iov_base
= 0;
7009 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7010 /* xcb_arc_t arcs */
7011 xcb_parts
[4].iov_base
= (char *) arcs
;
7012 xcb_parts
[4].iov_len
= arcs_len
* sizeof(xcb_arc_t
);
7013 xcb_parts
[5].iov_base
= 0;
7014 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7016 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7021 xcb_poly_fill_arc (xcb_connection_t
*c
/**< */,
7022 xcb_drawable_t drawable
/**< */,
7023 xcb_gcontext_t gc
/**< */,
7024 uint32_t arcs_len
/**< */,
7025 const xcb_arc_t
*arcs
/**< */)
7027 static const xcb_protocol_request_t xcb_req
= {
7030 /* opcode */ XCB_POLY_FILL_ARC
,
7034 struct iovec xcb_parts
[6];
7035 xcb_void_cookie_t xcb_ret
;
7036 xcb_poly_fill_arc_request_t xcb_out
;
7039 xcb_out
.drawable
= drawable
;
7042 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7043 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7044 xcb_parts
[3].iov_base
= 0;
7045 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7046 /* xcb_arc_t arcs */
7047 xcb_parts
[4].iov_base
= (char *) arcs
;
7048 xcb_parts
[4].iov_len
= arcs_len
* sizeof(xcb_arc_t
);
7049 xcb_parts
[5].iov_base
= 0;
7050 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7052 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7057 xcb_put_image_sizeof (const void *_buffer
/**< */,
7058 uint32_t data_len
/**< */)
7060 char *xcb_tmp
= (char *)_buffer
;
7061 unsigned int xcb_buffer_len
= 0;
7062 unsigned int xcb_block_len
= 0;
7063 unsigned int xcb_pad
= 0;
7064 unsigned int xcb_align_to
= 0;
7067 xcb_block_len
+= sizeof(xcb_put_image_request_t
);
7068 xcb_tmp
+= xcb_block_len
;
7069 xcb_buffer_len
+= xcb_block_len
;
7072 xcb_block_len
+= data_len
* sizeof(uint8_t);
7073 xcb_tmp
+= xcb_block_len
;
7074 xcb_align_to
= ALIGNOF(uint8_t);
7075 /* insert padding */
7076 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7077 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7084 return xcb_buffer_len
;
7088 xcb_put_image_checked (xcb_connection_t
*c
/**< */,
7089 uint8_t format
/**< */,
7090 xcb_drawable_t drawable
/**< */,
7091 xcb_gcontext_t gc
/**< */,
7092 uint16_t width
/**< */,
7093 uint16_t height
/**< */,
7094 int16_t dst_x
/**< */,
7095 int16_t dst_y
/**< */,
7096 uint8_t left_pad
/**< */,
7097 uint8_t depth
/**< */,
7098 uint32_t data_len
/**< */,
7099 const uint8_t *data
/**< */)
7101 static const xcb_protocol_request_t xcb_req
= {
7104 /* opcode */ XCB_PUT_IMAGE
,
7108 struct iovec xcb_parts
[6];
7109 xcb_void_cookie_t xcb_ret
;
7110 xcb_put_image_request_t xcb_out
;
7112 xcb_out
.format
= format
;
7113 xcb_out
.drawable
= drawable
;
7115 xcb_out
.width
= width
;
7116 xcb_out
.height
= height
;
7117 xcb_out
.dst_x
= dst_x
;
7118 xcb_out
.dst_y
= dst_y
;
7119 xcb_out
.left_pad
= left_pad
;
7120 xcb_out
.depth
= depth
;
7121 memset(xcb_out
.pad0
, 0, 2);
7123 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7124 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7125 xcb_parts
[3].iov_base
= 0;
7126 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7128 xcb_parts
[4].iov_base
= (char *) data
;
7129 xcb_parts
[4].iov_len
= data_len
* sizeof(uint8_t);
7130 xcb_parts
[5].iov_base
= 0;
7131 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7133 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7138 xcb_put_image (xcb_connection_t
*c
/**< */,
7139 uint8_t format
/**< */,
7140 xcb_drawable_t drawable
/**< */,
7141 xcb_gcontext_t gc
/**< */,
7142 uint16_t width
/**< */,
7143 uint16_t height
/**< */,
7144 int16_t dst_x
/**< */,
7145 int16_t dst_y
/**< */,
7146 uint8_t left_pad
/**< */,
7147 uint8_t depth
/**< */,
7148 uint32_t data_len
/**< */,
7149 const uint8_t *data
/**< */)
7151 static const xcb_protocol_request_t xcb_req
= {
7154 /* opcode */ XCB_PUT_IMAGE
,
7158 struct iovec xcb_parts
[6];
7159 xcb_void_cookie_t xcb_ret
;
7160 xcb_put_image_request_t xcb_out
;
7162 xcb_out
.format
= format
;
7163 xcb_out
.drawable
= drawable
;
7165 xcb_out
.width
= width
;
7166 xcb_out
.height
= height
;
7167 xcb_out
.dst_x
= dst_x
;
7168 xcb_out
.dst_y
= dst_y
;
7169 xcb_out
.left_pad
= left_pad
;
7170 xcb_out
.depth
= depth
;
7171 memset(xcb_out
.pad0
, 0, 2);
7173 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7174 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7175 xcb_parts
[3].iov_base
= 0;
7176 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7178 xcb_parts
[4].iov_base
= (char *) data
;
7179 xcb_parts
[4].iov_len
= data_len
* sizeof(uint8_t);
7180 xcb_parts
[5].iov_base
= 0;
7181 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7183 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7188 xcb_get_image_sizeof (const void *_buffer
/**< */)
7190 char *xcb_tmp
= (char *)_buffer
;
7191 const xcb_get_image_reply_t
*_aux
= (xcb_get_image_reply_t
*)_buffer
;
7192 unsigned int xcb_buffer_len
= 0;
7193 unsigned int xcb_block_len
= 0;
7194 unsigned int xcb_pad
= 0;
7195 unsigned int xcb_align_to
= 0;
7198 xcb_block_len
+= sizeof(xcb_get_image_reply_t
);
7199 xcb_tmp
+= xcb_block_len
;
7200 xcb_buffer_len
+= xcb_block_len
;
7203 xcb_block_len
+= (_aux
->length
* 4) * sizeof(uint8_t);
7204 xcb_tmp
+= xcb_block_len
;
7205 xcb_align_to
= ALIGNOF(uint8_t);
7206 /* insert padding */
7207 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7208 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7215 return xcb_buffer_len
;
7218 xcb_get_image_cookie_t
7219 xcb_get_image (xcb_connection_t
*c
/**< */,
7220 uint8_t format
/**< */,
7221 xcb_drawable_t drawable
/**< */,
7224 uint16_t width
/**< */,
7225 uint16_t height
/**< */,
7226 uint32_t plane_mask
/**< */)
7228 static const xcb_protocol_request_t xcb_req
= {
7231 /* opcode */ XCB_GET_IMAGE
,
7235 struct iovec xcb_parts
[4];
7236 xcb_get_image_cookie_t xcb_ret
;
7237 xcb_get_image_request_t xcb_out
;
7239 xcb_out
.format
= format
;
7240 xcb_out
.drawable
= drawable
;
7243 xcb_out
.width
= width
;
7244 xcb_out
.height
= height
;
7245 xcb_out
.plane_mask
= plane_mask
;
7247 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7248 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7249 xcb_parts
[3].iov_base
= 0;
7250 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7252 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7256 xcb_get_image_cookie_t
7257 xcb_get_image_unchecked (xcb_connection_t
*c
/**< */,
7258 uint8_t format
/**< */,
7259 xcb_drawable_t drawable
/**< */,
7262 uint16_t width
/**< */,
7263 uint16_t height
/**< */,
7264 uint32_t plane_mask
/**< */)
7266 static const xcb_protocol_request_t xcb_req
= {
7269 /* opcode */ XCB_GET_IMAGE
,
7273 struct iovec xcb_parts
[4];
7274 xcb_get_image_cookie_t xcb_ret
;
7275 xcb_get_image_request_t xcb_out
;
7277 xcb_out
.format
= format
;
7278 xcb_out
.drawable
= drawable
;
7281 xcb_out
.width
= width
;
7282 xcb_out
.height
= height
;
7283 xcb_out
.plane_mask
= plane_mask
;
7285 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7286 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7287 xcb_parts
[3].iov_base
= 0;
7288 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7290 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7295 xcb_get_image_data (const xcb_get_image_reply_t
*R
/**< */)
7297 return (uint8_t *) (R
+ 1);
7301 xcb_get_image_data_length (const xcb_get_image_reply_t
*R
/**< */)
7303 return (R
->length
* 4);
7306 xcb_generic_iterator_t
7307 xcb_get_image_data_end (const xcb_get_image_reply_t
*R
/**< */)
7309 xcb_generic_iterator_t i
;
7310 i
.data
= ((uint8_t *) (R
+ 1)) + ((R
->length
* 4));
7312 i
.index
= (char *) i
.data
- (char *) R
;
7316 xcb_get_image_reply_t
*
7317 xcb_get_image_reply (xcb_connection_t
*c
/**< */,
7318 xcb_get_image_cookie_t cookie
/**< */,
7319 xcb_generic_error_t
**e
/**< */)
7321 return (xcb_get_image_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
7325 xcb_poly_text_8_sizeof (const void *_buffer
/**< */,
7326 uint32_t items_len
/**< */)
7328 char *xcb_tmp
= (char *)_buffer
;
7329 unsigned int xcb_buffer_len
= 0;
7330 unsigned int xcb_block_len
= 0;
7331 unsigned int xcb_pad
= 0;
7332 unsigned int xcb_align_to
= 0;
7335 xcb_block_len
+= sizeof(xcb_poly_text_8_request_t
);
7336 xcb_tmp
+= xcb_block_len
;
7337 xcb_buffer_len
+= xcb_block_len
;
7340 xcb_block_len
+= items_len
* sizeof(uint8_t);
7341 xcb_tmp
+= xcb_block_len
;
7342 xcb_align_to
= ALIGNOF(uint8_t);
7343 /* insert padding */
7344 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7345 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7352 return xcb_buffer_len
;
7356 xcb_poly_text_8_checked (xcb_connection_t
*c
/**< */,
7357 xcb_drawable_t drawable
/**< */,
7358 xcb_gcontext_t gc
/**< */,
7361 uint32_t items_len
/**< */,
7362 const uint8_t *items
/**< */)
7364 static const xcb_protocol_request_t xcb_req
= {
7367 /* opcode */ XCB_POLY_TEXT_8
,
7371 struct iovec xcb_parts
[6];
7372 xcb_void_cookie_t xcb_ret
;
7373 xcb_poly_text_8_request_t xcb_out
;
7376 xcb_out
.drawable
= drawable
;
7381 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7382 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7383 xcb_parts
[3].iov_base
= 0;
7384 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7386 xcb_parts
[4].iov_base
= (char *) items
;
7387 xcb_parts
[4].iov_len
= items_len
* sizeof(uint8_t);
7388 xcb_parts
[5].iov_base
= 0;
7389 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7391 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7396 xcb_poly_text_8 (xcb_connection_t
*c
/**< */,
7397 xcb_drawable_t drawable
/**< */,
7398 xcb_gcontext_t gc
/**< */,
7401 uint32_t items_len
/**< */,
7402 const uint8_t *items
/**< */)
7404 static const xcb_protocol_request_t xcb_req
= {
7407 /* opcode */ XCB_POLY_TEXT_8
,
7411 struct iovec xcb_parts
[6];
7412 xcb_void_cookie_t xcb_ret
;
7413 xcb_poly_text_8_request_t xcb_out
;
7416 xcb_out
.drawable
= drawable
;
7421 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7422 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7423 xcb_parts
[3].iov_base
= 0;
7424 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7426 xcb_parts
[4].iov_base
= (char *) items
;
7427 xcb_parts
[4].iov_len
= items_len
* sizeof(uint8_t);
7428 xcb_parts
[5].iov_base
= 0;
7429 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7431 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7436 xcb_poly_text_16_sizeof (const void *_buffer
/**< */,
7437 uint32_t items_len
/**< */)
7439 char *xcb_tmp
= (char *)_buffer
;
7440 unsigned int xcb_buffer_len
= 0;
7441 unsigned int xcb_block_len
= 0;
7442 unsigned int xcb_pad
= 0;
7443 unsigned int xcb_align_to
= 0;
7446 xcb_block_len
+= sizeof(xcb_poly_text_16_request_t
);
7447 xcb_tmp
+= xcb_block_len
;
7448 xcb_buffer_len
+= xcb_block_len
;
7451 xcb_block_len
+= items_len
* sizeof(uint8_t);
7452 xcb_tmp
+= xcb_block_len
;
7453 xcb_align_to
= ALIGNOF(uint8_t);
7454 /* insert padding */
7455 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7456 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7463 return xcb_buffer_len
;
7467 xcb_poly_text_16_checked (xcb_connection_t
*c
/**< */,
7468 xcb_drawable_t drawable
/**< */,
7469 xcb_gcontext_t gc
/**< */,
7472 uint32_t items_len
/**< */,
7473 const uint8_t *items
/**< */)
7475 static const xcb_protocol_request_t xcb_req
= {
7478 /* opcode */ XCB_POLY_TEXT_16
,
7482 struct iovec xcb_parts
[6];
7483 xcb_void_cookie_t xcb_ret
;
7484 xcb_poly_text_16_request_t xcb_out
;
7487 xcb_out
.drawable
= drawable
;
7492 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7493 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7494 xcb_parts
[3].iov_base
= 0;
7495 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7497 xcb_parts
[4].iov_base
= (char *) items
;
7498 xcb_parts
[4].iov_len
= items_len
* sizeof(uint8_t);
7499 xcb_parts
[5].iov_base
= 0;
7500 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7502 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7507 xcb_poly_text_16 (xcb_connection_t
*c
/**< */,
7508 xcb_drawable_t drawable
/**< */,
7509 xcb_gcontext_t gc
/**< */,
7512 uint32_t items_len
/**< */,
7513 const uint8_t *items
/**< */)
7515 static const xcb_protocol_request_t xcb_req
= {
7518 /* opcode */ XCB_POLY_TEXT_16
,
7522 struct iovec xcb_parts
[6];
7523 xcb_void_cookie_t xcb_ret
;
7524 xcb_poly_text_16_request_t xcb_out
;
7527 xcb_out
.drawable
= drawable
;
7532 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7533 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7534 xcb_parts
[3].iov_base
= 0;
7535 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7537 xcb_parts
[4].iov_base
= (char *) items
;
7538 xcb_parts
[4].iov_len
= items_len
* sizeof(uint8_t);
7539 xcb_parts
[5].iov_base
= 0;
7540 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7542 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7547 xcb_image_text_8_sizeof (const void *_buffer
/**< */)
7549 char *xcb_tmp
= (char *)_buffer
;
7550 const xcb_image_text_8_request_t
*_aux
= (xcb_image_text_8_request_t
*)_buffer
;
7551 unsigned int xcb_buffer_len
= 0;
7552 unsigned int xcb_block_len
= 0;
7553 unsigned int xcb_pad
= 0;
7554 unsigned int xcb_align_to
= 0;
7557 xcb_block_len
+= sizeof(xcb_image_text_8_request_t
);
7558 xcb_tmp
+= xcb_block_len
;
7559 xcb_buffer_len
+= xcb_block_len
;
7562 xcb_block_len
+= _aux
->string_len
* sizeof(char);
7563 xcb_tmp
+= xcb_block_len
;
7564 xcb_align_to
= ALIGNOF(char);
7565 /* insert padding */
7566 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7567 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7574 return xcb_buffer_len
;
7578 xcb_image_text_8_checked (xcb_connection_t
*c
/**< */,
7579 uint8_t string_len
/**< */,
7580 xcb_drawable_t drawable
/**< */,
7581 xcb_gcontext_t gc
/**< */,
7584 const char *string
/**< */)
7586 static const xcb_protocol_request_t xcb_req
= {
7589 /* opcode */ XCB_IMAGE_TEXT_8
,
7593 struct iovec xcb_parts
[6];
7594 xcb_void_cookie_t xcb_ret
;
7595 xcb_image_text_8_request_t xcb_out
;
7597 xcb_out
.string_len
= string_len
;
7598 xcb_out
.drawable
= drawable
;
7603 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7604 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7605 xcb_parts
[3].iov_base
= 0;
7606 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7608 xcb_parts
[4].iov_base
= (char *) string
;
7609 xcb_parts
[4].iov_len
= string_len
* sizeof(char);
7610 xcb_parts
[5].iov_base
= 0;
7611 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7613 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7618 xcb_image_text_8 (xcb_connection_t
*c
/**< */,
7619 uint8_t string_len
/**< */,
7620 xcb_drawable_t drawable
/**< */,
7621 xcb_gcontext_t gc
/**< */,
7624 const char *string
/**< */)
7626 static const xcb_protocol_request_t xcb_req
= {
7629 /* opcode */ XCB_IMAGE_TEXT_8
,
7633 struct iovec xcb_parts
[6];
7634 xcb_void_cookie_t xcb_ret
;
7635 xcb_image_text_8_request_t xcb_out
;
7637 xcb_out
.string_len
= string_len
;
7638 xcb_out
.drawable
= drawable
;
7643 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7644 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7645 xcb_parts
[3].iov_base
= 0;
7646 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7648 xcb_parts
[4].iov_base
= (char *) string
;
7649 xcb_parts
[4].iov_len
= string_len
* sizeof(char);
7650 xcb_parts
[5].iov_base
= 0;
7651 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7653 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7658 xcb_image_text_16_sizeof (const void *_buffer
/**< */)
7660 char *xcb_tmp
= (char *)_buffer
;
7661 const xcb_image_text_16_request_t
*_aux
= (xcb_image_text_16_request_t
*)_buffer
;
7662 unsigned int xcb_buffer_len
= 0;
7663 unsigned int xcb_block_len
= 0;
7664 unsigned int xcb_pad
= 0;
7665 unsigned int xcb_align_to
= 0;
7668 xcb_block_len
+= sizeof(xcb_image_text_16_request_t
);
7669 xcb_tmp
+= xcb_block_len
;
7670 xcb_buffer_len
+= xcb_block_len
;
7673 xcb_block_len
+= _aux
->string_len
* sizeof(xcb_char2b_t
);
7674 xcb_tmp
+= xcb_block_len
;
7675 xcb_align_to
= ALIGNOF(xcb_char2b_t
);
7676 /* insert padding */
7677 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
7678 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
7685 return xcb_buffer_len
;
7689 xcb_image_text_16_checked (xcb_connection_t
*c
/**< */,
7690 uint8_t string_len
/**< */,
7691 xcb_drawable_t drawable
/**< */,
7692 xcb_gcontext_t gc
/**< */,
7695 const xcb_char2b_t
*string
/**< */)
7697 static const xcb_protocol_request_t xcb_req
= {
7700 /* opcode */ XCB_IMAGE_TEXT_16
,
7704 struct iovec xcb_parts
[6];
7705 xcb_void_cookie_t xcb_ret
;
7706 xcb_image_text_16_request_t xcb_out
;
7708 xcb_out
.string_len
= string_len
;
7709 xcb_out
.drawable
= drawable
;
7714 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7715 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7716 xcb_parts
[3].iov_base
= 0;
7717 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7718 /* xcb_char2b_t string */
7719 xcb_parts
[4].iov_base
= (char *) string
;
7720 xcb_parts
[4].iov_len
= string_len
* sizeof(xcb_char2b_t
);
7721 xcb_parts
[5].iov_base
= 0;
7722 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7724 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7729 xcb_image_text_16 (xcb_connection_t
*c
/**< */,
7730 uint8_t string_len
/**< */,
7731 xcb_drawable_t drawable
/**< */,
7732 xcb_gcontext_t gc
/**< */,
7735 const xcb_char2b_t
*string
/**< */)
7737 static const xcb_protocol_request_t xcb_req
= {
7740 /* opcode */ XCB_IMAGE_TEXT_16
,
7744 struct iovec xcb_parts
[6];
7745 xcb_void_cookie_t xcb_ret
;
7746 xcb_image_text_16_request_t xcb_out
;
7748 xcb_out
.string_len
= string_len
;
7749 xcb_out
.drawable
= drawable
;
7754 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7755 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7756 xcb_parts
[3].iov_base
= 0;
7757 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7758 /* xcb_char2b_t string */
7759 xcb_parts
[4].iov_base
= (char *) string
;
7760 xcb_parts
[4].iov_len
= string_len
* sizeof(xcb_char2b_t
);
7761 xcb_parts
[5].iov_base
= 0;
7762 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
7764 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7769 xcb_create_colormap_checked (xcb_connection_t
*c
/**< */,
7770 uint8_t alloc
/**< */,
7771 xcb_colormap_t mid
/**< */,
7772 xcb_window_t window
/**< */,
7773 xcb_visualid_t visual
/**< */)
7775 static const xcb_protocol_request_t xcb_req
= {
7778 /* opcode */ XCB_CREATE_COLORMAP
,
7782 struct iovec xcb_parts
[4];
7783 xcb_void_cookie_t xcb_ret
;
7784 xcb_create_colormap_request_t xcb_out
;
7786 xcb_out
.alloc
= alloc
;
7788 xcb_out
.window
= window
;
7789 xcb_out
.visual
= visual
;
7791 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7792 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7793 xcb_parts
[3].iov_base
= 0;
7794 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7796 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7801 xcb_create_colormap (xcb_connection_t
*c
/**< */,
7802 uint8_t alloc
/**< */,
7803 xcb_colormap_t mid
/**< */,
7804 xcb_window_t window
/**< */,
7805 xcb_visualid_t visual
/**< */)
7807 static const xcb_protocol_request_t xcb_req
= {
7810 /* opcode */ XCB_CREATE_COLORMAP
,
7814 struct iovec xcb_parts
[4];
7815 xcb_void_cookie_t xcb_ret
;
7816 xcb_create_colormap_request_t xcb_out
;
7818 xcb_out
.alloc
= alloc
;
7820 xcb_out
.window
= window
;
7821 xcb_out
.visual
= visual
;
7823 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7824 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7825 xcb_parts
[3].iov_base
= 0;
7826 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7828 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7833 xcb_free_colormap_checked (xcb_connection_t
*c
/**< */,
7834 xcb_colormap_t cmap
/**< */)
7836 static const xcb_protocol_request_t xcb_req
= {
7839 /* opcode */ XCB_FREE_COLORMAP
,
7843 struct iovec xcb_parts
[4];
7844 xcb_void_cookie_t xcb_ret
;
7845 xcb_free_colormap_request_t xcb_out
;
7848 xcb_out
.cmap
= cmap
;
7850 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7851 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7852 xcb_parts
[3].iov_base
= 0;
7853 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7855 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7860 xcb_free_colormap (xcb_connection_t
*c
/**< */,
7861 xcb_colormap_t cmap
/**< */)
7863 static const xcb_protocol_request_t xcb_req
= {
7866 /* opcode */ XCB_FREE_COLORMAP
,
7870 struct iovec xcb_parts
[4];
7871 xcb_void_cookie_t xcb_ret
;
7872 xcb_free_colormap_request_t xcb_out
;
7875 xcb_out
.cmap
= cmap
;
7877 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7878 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7879 xcb_parts
[3].iov_base
= 0;
7880 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7882 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7887 xcb_copy_colormap_and_free_checked (xcb_connection_t
*c
/**< */,
7888 xcb_colormap_t mid
/**< */,
7889 xcb_colormap_t src_cmap
/**< */)
7891 static const xcb_protocol_request_t xcb_req
= {
7894 /* opcode */ XCB_COPY_COLORMAP_AND_FREE
,
7898 struct iovec xcb_parts
[4];
7899 xcb_void_cookie_t xcb_ret
;
7900 xcb_copy_colormap_and_free_request_t xcb_out
;
7904 xcb_out
.src_cmap
= src_cmap
;
7906 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7907 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7908 xcb_parts
[3].iov_base
= 0;
7909 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7911 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7916 xcb_copy_colormap_and_free (xcb_connection_t
*c
/**< */,
7917 xcb_colormap_t mid
/**< */,
7918 xcb_colormap_t src_cmap
/**< */)
7920 static const xcb_protocol_request_t xcb_req
= {
7923 /* opcode */ XCB_COPY_COLORMAP_AND_FREE
,
7927 struct iovec xcb_parts
[4];
7928 xcb_void_cookie_t xcb_ret
;
7929 xcb_copy_colormap_and_free_request_t xcb_out
;
7933 xcb_out
.src_cmap
= src_cmap
;
7935 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7936 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7937 xcb_parts
[3].iov_base
= 0;
7938 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7940 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7945 xcb_install_colormap_checked (xcb_connection_t
*c
/**< */,
7946 xcb_colormap_t cmap
/**< */)
7948 static const xcb_protocol_request_t xcb_req
= {
7951 /* opcode */ XCB_INSTALL_COLORMAP
,
7955 struct iovec xcb_parts
[4];
7956 xcb_void_cookie_t xcb_ret
;
7957 xcb_install_colormap_request_t xcb_out
;
7960 xcb_out
.cmap
= cmap
;
7962 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7963 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7964 xcb_parts
[3].iov_base
= 0;
7965 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7967 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
7972 xcb_install_colormap (xcb_connection_t
*c
/**< */,
7973 xcb_colormap_t cmap
/**< */)
7975 static const xcb_protocol_request_t xcb_req
= {
7978 /* opcode */ XCB_INSTALL_COLORMAP
,
7982 struct iovec xcb_parts
[4];
7983 xcb_void_cookie_t xcb_ret
;
7984 xcb_install_colormap_request_t xcb_out
;
7987 xcb_out
.cmap
= cmap
;
7989 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
7990 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
7991 xcb_parts
[3].iov_base
= 0;
7992 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
7994 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
7999 xcb_uninstall_colormap_checked (xcb_connection_t
*c
/**< */,
8000 xcb_colormap_t cmap
/**< */)
8002 static const xcb_protocol_request_t xcb_req
= {
8005 /* opcode */ XCB_UNINSTALL_COLORMAP
,
8009 struct iovec xcb_parts
[4];
8010 xcb_void_cookie_t xcb_ret
;
8011 xcb_uninstall_colormap_request_t xcb_out
;
8014 xcb_out
.cmap
= cmap
;
8016 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8017 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8018 xcb_parts
[3].iov_base
= 0;
8019 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8021 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8026 xcb_uninstall_colormap (xcb_connection_t
*c
/**< */,
8027 xcb_colormap_t cmap
/**< */)
8029 static const xcb_protocol_request_t xcb_req
= {
8032 /* opcode */ XCB_UNINSTALL_COLORMAP
,
8036 struct iovec xcb_parts
[4];
8037 xcb_void_cookie_t xcb_ret
;
8038 xcb_uninstall_colormap_request_t xcb_out
;
8041 xcb_out
.cmap
= cmap
;
8043 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8044 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8045 xcb_parts
[3].iov_base
= 0;
8046 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8048 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8053 xcb_list_installed_colormaps_sizeof (const void *_buffer
/**< */)
8055 char *xcb_tmp
= (char *)_buffer
;
8056 const xcb_list_installed_colormaps_reply_t
*_aux
= (xcb_list_installed_colormaps_reply_t
*)_buffer
;
8057 unsigned int xcb_buffer_len
= 0;
8058 unsigned int xcb_block_len
= 0;
8059 unsigned int xcb_pad
= 0;
8060 unsigned int xcb_align_to
= 0;
8063 xcb_block_len
+= sizeof(xcb_list_installed_colormaps_reply_t
);
8064 xcb_tmp
+= xcb_block_len
;
8065 xcb_buffer_len
+= xcb_block_len
;
8068 xcb_block_len
+= _aux
->cmaps_len
* sizeof(xcb_colormap_t
);
8069 xcb_tmp
+= xcb_block_len
;
8070 xcb_align_to
= ALIGNOF(xcb_colormap_t
);
8071 /* insert padding */
8072 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8073 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8080 return xcb_buffer_len
;
8083 xcb_list_installed_colormaps_cookie_t
8084 xcb_list_installed_colormaps (xcb_connection_t
*c
/**< */,
8085 xcb_window_t window
/**< */)
8087 static const xcb_protocol_request_t xcb_req
= {
8090 /* opcode */ XCB_LIST_INSTALLED_COLORMAPS
,
8094 struct iovec xcb_parts
[4];
8095 xcb_list_installed_colormaps_cookie_t xcb_ret
;
8096 xcb_list_installed_colormaps_request_t xcb_out
;
8099 xcb_out
.window
= window
;
8101 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8102 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8103 xcb_parts
[3].iov_base
= 0;
8104 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8106 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8110 xcb_list_installed_colormaps_cookie_t
8111 xcb_list_installed_colormaps_unchecked (xcb_connection_t
*c
/**< */,
8112 xcb_window_t window
/**< */)
8114 static const xcb_protocol_request_t xcb_req
= {
8117 /* opcode */ XCB_LIST_INSTALLED_COLORMAPS
,
8121 struct iovec xcb_parts
[4];
8122 xcb_list_installed_colormaps_cookie_t xcb_ret
;
8123 xcb_list_installed_colormaps_request_t xcb_out
;
8126 xcb_out
.window
= window
;
8128 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8129 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8130 xcb_parts
[3].iov_base
= 0;
8131 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8133 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8138 xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t
*R
/**< */)
8140 return (xcb_colormap_t
*) (R
+ 1);
8144 xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t
*R
/**< */)
8146 return R
->cmaps_len
;
8149 xcb_generic_iterator_t
8150 xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t
*R
/**< */)
8152 xcb_generic_iterator_t i
;
8153 i
.data
= ((xcb_colormap_t
*) (R
+ 1)) + (R
->cmaps_len
);
8155 i
.index
= (char *) i
.data
- (char *) R
;
8159 xcb_list_installed_colormaps_reply_t
*
8160 xcb_list_installed_colormaps_reply (xcb_connection_t
*c
/**< */,
8161 xcb_list_installed_colormaps_cookie_t cookie
/**< */,
8162 xcb_generic_error_t
**e
/**< */)
8164 return (xcb_list_installed_colormaps_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
8167 xcb_alloc_color_cookie_t
8168 xcb_alloc_color (xcb_connection_t
*c
/**< */,
8169 xcb_colormap_t cmap
/**< */,
8170 uint16_t red
/**< */,
8171 uint16_t green
/**< */,
8172 uint16_t blue
/**< */)
8174 static const xcb_protocol_request_t xcb_req
= {
8177 /* opcode */ XCB_ALLOC_COLOR
,
8181 struct iovec xcb_parts
[4];
8182 xcb_alloc_color_cookie_t xcb_ret
;
8183 xcb_alloc_color_request_t xcb_out
;
8186 xcb_out
.cmap
= cmap
;
8188 xcb_out
.green
= green
;
8189 xcb_out
.blue
= blue
;
8190 memset(xcb_out
.pad1
, 0, 2);
8192 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8193 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8194 xcb_parts
[3].iov_base
= 0;
8195 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8197 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8201 xcb_alloc_color_cookie_t
8202 xcb_alloc_color_unchecked (xcb_connection_t
*c
/**< */,
8203 xcb_colormap_t cmap
/**< */,
8204 uint16_t red
/**< */,
8205 uint16_t green
/**< */,
8206 uint16_t blue
/**< */)
8208 static const xcb_protocol_request_t xcb_req
= {
8211 /* opcode */ XCB_ALLOC_COLOR
,
8215 struct iovec xcb_parts
[4];
8216 xcb_alloc_color_cookie_t xcb_ret
;
8217 xcb_alloc_color_request_t xcb_out
;
8220 xcb_out
.cmap
= cmap
;
8222 xcb_out
.green
= green
;
8223 xcb_out
.blue
= blue
;
8224 memset(xcb_out
.pad1
, 0, 2);
8226 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8227 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8228 xcb_parts
[3].iov_base
= 0;
8229 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8231 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8235 xcb_alloc_color_reply_t
*
8236 xcb_alloc_color_reply (xcb_connection_t
*c
/**< */,
8237 xcb_alloc_color_cookie_t cookie
/**< */,
8238 xcb_generic_error_t
**e
/**< */)
8240 return (xcb_alloc_color_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
8244 xcb_alloc_named_color_sizeof (const void *_buffer
/**< */)
8246 char *xcb_tmp
= (char *)_buffer
;
8247 const xcb_alloc_named_color_request_t
*_aux
= (xcb_alloc_named_color_request_t
*)_buffer
;
8248 unsigned int xcb_buffer_len
= 0;
8249 unsigned int xcb_block_len
= 0;
8250 unsigned int xcb_pad
= 0;
8251 unsigned int xcb_align_to
= 0;
8254 xcb_block_len
+= sizeof(xcb_alloc_named_color_request_t
);
8255 xcb_tmp
+= xcb_block_len
;
8256 xcb_buffer_len
+= xcb_block_len
;
8259 xcb_block_len
+= _aux
->name_len
* sizeof(char);
8260 xcb_tmp
+= xcb_block_len
;
8261 xcb_align_to
= ALIGNOF(char);
8262 /* insert padding */
8263 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8264 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8271 return xcb_buffer_len
;
8274 xcb_alloc_named_color_cookie_t
8275 xcb_alloc_named_color (xcb_connection_t
*c
/**< */,
8276 xcb_colormap_t cmap
/**< */,
8277 uint16_t name_len
/**< */,
8278 const char *name
/**< */)
8280 static const xcb_protocol_request_t xcb_req
= {
8283 /* opcode */ XCB_ALLOC_NAMED_COLOR
,
8287 struct iovec xcb_parts
[6];
8288 xcb_alloc_named_color_cookie_t xcb_ret
;
8289 xcb_alloc_named_color_request_t xcb_out
;
8292 xcb_out
.cmap
= cmap
;
8293 xcb_out
.name_len
= name_len
;
8294 memset(xcb_out
.pad1
, 0, 2);
8296 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8297 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8298 xcb_parts
[3].iov_base
= 0;
8299 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8301 xcb_parts
[4].iov_base
= (char *) name
;
8302 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
8303 xcb_parts
[5].iov_base
= 0;
8304 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8306 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8310 xcb_alloc_named_color_cookie_t
8311 xcb_alloc_named_color_unchecked (xcb_connection_t
*c
/**< */,
8312 xcb_colormap_t cmap
/**< */,
8313 uint16_t name_len
/**< */,
8314 const char *name
/**< */)
8316 static const xcb_protocol_request_t xcb_req
= {
8319 /* opcode */ XCB_ALLOC_NAMED_COLOR
,
8323 struct iovec xcb_parts
[6];
8324 xcb_alloc_named_color_cookie_t xcb_ret
;
8325 xcb_alloc_named_color_request_t xcb_out
;
8328 xcb_out
.cmap
= cmap
;
8329 xcb_out
.name_len
= name_len
;
8330 memset(xcb_out
.pad1
, 0, 2);
8332 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8333 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8334 xcb_parts
[3].iov_base
= 0;
8335 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8337 xcb_parts
[4].iov_base
= (char *) name
;
8338 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
8339 xcb_parts
[5].iov_base
= 0;
8340 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8342 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8346 xcb_alloc_named_color_reply_t
*
8347 xcb_alloc_named_color_reply (xcb_connection_t
*c
/**< */,
8348 xcb_alloc_named_color_cookie_t cookie
/**< */,
8349 xcb_generic_error_t
**e
/**< */)
8351 return (xcb_alloc_named_color_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
8355 xcb_alloc_color_cells_sizeof (const void *_buffer
/**< */)
8357 char *xcb_tmp
= (char *)_buffer
;
8358 const xcb_alloc_color_cells_reply_t
*_aux
= (xcb_alloc_color_cells_reply_t
*)_buffer
;
8359 unsigned int xcb_buffer_len
= 0;
8360 unsigned int xcb_block_len
= 0;
8361 unsigned int xcb_pad
= 0;
8362 unsigned int xcb_align_to
= 0;
8365 xcb_block_len
+= sizeof(xcb_alloc_color_cells_reply_t
);
8366 xcb_tmp
+= xcb_block_len
;
8367 xcb_buffer_len
+= xcb_block_len
;
8370 xcb_block_len
+= _aux
->pixels_len
* sizeof(uint32_t);
8371 xcb_tmp
+= xcb_block_len
;
8372 xcb_align_to
= ALIGNOF(uint32_t);
8373 /* insert padding */
8374 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8375 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8382 xcb_block_len
+= _aux
->masks_len
* sizeof(uint32_t);
8383 xcb_tmp
+= xcb_block_len
;
8384 xcb_align_to
= ALIGNOF(uint32_t);
8385 /* insert padding */
8386 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8387 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8394 return xcb_buffer_len
;
8397 xcb_alloc_color_cells_cookie_t
8398 xcb_alloc_color_cells (xcb_connection_t
*c
/**< */,
8399 uint8_t contiguous
/**< */,
8400 xcb_colormap_t cmap
/**< */,
8401 uint16_t colors
/**< */,
8402 uint16_t planes
/**< */)
8404 static const xcb_protocol_request_t xcb_req
= {
8407 /* opcode */ XCB_ALLOC_COLOR_CELLS
,
8411 struct iovec xcb_parts
[4];
8412 xcb_alloc_color_cells_cookie_t xcb_ret
;
8413 xcb_alloc_color_cells_request_t xcb_out
;
8415 xcb_out
.contiguous
= contiguous
;
8416 xcb_out
.cmap
= cmap
;
8417 xcb_out
.colors
= colors
;
8418 xcb_out
.planes
= planes
;
8420 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8421 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8422 xcb_parts
[3].iov_base
= 0;
8423 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8425 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8429 xcb_alloc_color_cells_cookie_t
8430 xcb_alloc_color_cells_unchecked (xcb_connection_t
*c
/**< */,
8431 uint8_t contiguous
/**< */,
8432 xcb_colormap_t cmap
/**< */,
8433 uint16_t colors
/**< */,
8434 uint16_t planes
/**< */)
8436 static const xcb_protocol_request_t xcb_req
= {
8439 /* opcode */ XCB_ALLOC_COLOR_CELLS
,
8443 struct iovec xcb_parts
[4];
8444 xcb_alloc_color_cells_cookie_t xcb_ret
;
8445 xcb_alloc_color_cells_request_t xcb_out
;
8447 xcb_out
.contiguous
= contiguous
;
8448 xcb_out
.cmap
= cmap
;
8449 xcb_out
.colors
= colors
;
8450 xcb_out
.planes
= planes
;
8452 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8453 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8454 xcb_parts
[3].iov_base
= 0;
8455 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8457 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8462 xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8464 return (uint32_t *) (R
+ 1);
8468 xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8470 return R
->pixels_len
;
8473 xcb_generic_iterator_t
8474 xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8476 xcb_generic_iterator_t i
;
8477 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->pixels_len
);
8479 i
.index
= (char *) i
.data
- (char *) R
;
8484 xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8486 xcb_generic_iterator_t prev
= xcb_alloc_color_cells_pixels_end(R
);
8487 return (uint32_t *) ((char *) prev
.data
+ XCB_TYPE_PAD(uint32_t, prev
.index
) + 0);
8491 xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8493 return R
->masks_len
;
8496 xcb_generic_iterator_t
8497 xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t
*R
/**< */)
8499 xcb_generic_iterator_t i
;
8500 xcb_generic_iterator_t child
= xcb_alloc_color_cells_pixels_end(R
);
8501 i
.data
= ((uint32_t *) child
.data
) + (R
->masks_len
);
8503 i
.index
= (char *) i
.data
- (char *) R
;
8507 xcb_alloc_color_cells_reply_t
*
8508 xcb_alloc_color_cells_reply (xcb_connection_t
*c
/**< */,
8509 xcb_alloc_color_cells_cookie_t cookie
/**< */,
8510 xcb_generic_error_t
**e
/**< */)
8512 return (xcb_alloc_color_cells_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
8516 xcb_alloc_color_planes_sizeof (const void *_buffer
/**< */)
8518 char *xcb_tmp
= (char *)_buffer
;
8519 const xcb_alloc_color_planes_reply_t
*_aux
= (xcb_alloc_color_planes_reply_t
*)_buffer
;
8520 unsigned int xcb_buffer_len
= 0;
8521 unsigned int xcb_block_len
= 0;
8522 unsigned int xcb_pad
= 0;
8523 unsigned int xcb_align_to
= 0;
8526 xcb_block_len
+= sizeof(xcb_alloc_color_planes_reply_t
);
8527 xcb_tmp
+= xcb_block_len
;
8528 xcb_buffer_len
+= xcb_block_len
;
8531 xcb_block_len
+= _aux
->pixels_len
* sizeof(uint32_t);
8532 xcb_tmp
+= xcb_block_len
;
8533 xcb_align_to
= ALIGNOF(uint32_t);
8534 /* insert padding */
8535 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8536 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8543 return xcb_buffer_len
;
8546 xcb_alloc_color_planes_cookie_t
8547 xcb_alloc_color_planes (xcb_connection_t
*c
/**< */,
8548 uint8_t contiguous
/**< */,
8549 xcb_colormap_t cmap
/**< */,
8550 uint16_t colors
/**< */,
8551 uint16_t reds
/**< */,
8552 uint16_t greens
/**< */,
8553 uint16_t blues
/**< */)
8555 static const xcb_protocol_request_t xcb_req
= {
8558 /* opcode */ XCB_ALLOC_COLOR_PLANES
,
8562 struct iovec xcb_parts
[4];
8563 xcb_alloc_color_planes_cookie_t xcb_ret
;
8564 xcb_alloc_color_planes_request_t xcb_out
;
8566 xcb_out
.contiguous
= contiguous
;
8567 xcb_out
.cmap
= cmap
;
8568 xcb_out
.colors
= colors
;
8569 xcb_out
.reds
= reds
;
8570 xcb_out
.greens
= greens
;
8571 xcb_out
.blues
= blues
;
8573 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8574 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8575 xcb_parts
[3].iov_base
= 0;
8576 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8578 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8582 xcb_alloc_color_planes_cookie_t
8583 xcb_alloc_color_planes_unchecked (xcb_connection_t
*c
/**< */,
8584 uint8_t contiguous
/**< */,
8585 xcb_colormap_t cmap
/**< */,
8586 uint16_t colors
/**< */,
8587 uint16_t reds
/**< */,
8588 uint16_t greens
/**< */,
8589 uint16_t blues
/**< */)
8591 static const xcb_protocol_request_t xcb_req
= {
8594 /* opcode */ XCB_ALLOC_COLOR_PLANES
,
8598 struct iovec xcb_parts
[4];
8599 xcb_alloc_color_planes_cookie_t xcb_ret
;
8600 xcb_alloc_color_planes_request_t xcb_out
;
8602 xcb_out
.contiguous
= contiguous
;
8603 xcb_out
.cmap
= cmap
;
8604 xcb_out
.colors
= colors
;
8605 xcb_out
.reds
= reds
;
8606 xcb_out
.greens
= greens
;
8607 xcb_out
.blues
= blues
;
8609 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8610 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8611 xcb_parts
[3].iov_base
= 0;
8612 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8614 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8619 xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t
*R
/**< */)
8621 return (uint32_t *) (R
+ 1);
8625 xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t
*R
/**< */)
8627 return R
->pixels_len
;
8630 xcb_generic_iterator_t
8631 xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t
*R
/**< */)
8633 xcb_generic_iterator_t i
;
8634 i
.data
= ((uint32_t *) (R
+ 1)) + (R
->pixels_len
);
8636 i
.index
= (char *) i
.data
- (char *) R
;
8640 xcb_alloc_color_planes_reply_t
*
8641 xcb_alloc_color_planes_reply (xcb_connection_t
*c
/**< */,
8642 xcb_alloc_color_planes_cookie_t cookie
/**< */,
8643 xcb_generic_error_t
**e
/**< */)
8645 return (xcb_alloc_color_planes_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
8649 xcb_free_colors_sizeof (const void *_buffer
/**< */,
8650 uint32_t pixels_len
/**< */)
8652 char *xcb_tmp
= (char *)_buffer
;
8653 unsigned int xcb_buffer_len
= 0;
8654 unsigned int xcb_block_len
= 0;
8655 unsigned int xcb_pad
= 0;
8656 unsigned int xcb_align_to
= 0;
8659 xcb_block_len
+= sizeof(xcb_free_colors_request_t
);
8660 xcb_tmp
+= xcb_block_len
;
8661 xcb_buffer_len
+= xcb_block_len
;
8664 xcb_block_len
+= pixels_len
* sizeof(uint32_t);
8665 xcb_tmp
+= xcb_block_len
;
8666 xcb_align_to
= ALIGNOF(uint32_t);
8667 /* insert padding */
8668 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8669 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8676 return xcb_buffer_len
;
8680 xcb_free_colors_checked (xcb_connection_t
*c
/**< */,
8681 xcb_colormap_t cmap
/**< */,
8682 uint32_t plane_mask
/**< */,
8683 uint32_t pixels_len
/**< */,
8684 const uint32_t *pixels
/**< */)
8686 static const xcb_protocol_request_t xcb_req
= {
8689 /* opcode */ XCB_FREE_COLORS
,
8693 struct iovec xcb_parts
[6];
8694 xcb_void_cookie_t xcb_ret
;
8695 xcb_free_colors_request_t xcb_out
;
8698 xcb_out
.cmap
= cmap
;
8699 xcb_out
.plane_mask
= plane_mask
;
8701 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8702 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8703 xcb_parts
[3].iov_base
= 0;
8704 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8705 /* uint32_t pixels */
8706 xcb_parts
[4].iov_base
= (char *) pixels
;
8707 xcb_parts
[4].iov_len
= pixels_len
* sizeof(uint32_t);
8708 xcb_parts
[5].iov_base
= 0;
8709 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8711 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8716 xcb_free_colors (xcb_connection_t
*c
/**< */,
8717 xcb_colormap_t cmap
/**< */,
8718 uint32_t plane_mask
/**< */,
8719 uint32_t pixels_len
/**< */,
8720 const uint32_t *pixels
/**< */)
8722 static const xcb_protocol_request_t xcb_req
= {
8725 /* opcode */ XCB_FREE_COLORS
,
8729 struct iovec xcb_parts
[6];
8730 xcb_void_cookie_t xcb_ret
;
8731 xcb_free_colors_request_t xcb_out
;
8734 xcb_out
.cmap
= cmap
;
8735 xcb_out
.plane_mask
= plane_mask
;
8737 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8738 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8739 xcb_parts
[3].iov_base
= 0;
8740 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8741 /* uint32_t pixels */
8742 xcb_parts
[4].iov_base
= (char *) pixels
;
8743 xcb_parts
[4].iov_len
= pixels_len
* sizeof(uint32_t);
8744 xcb_parts
[5].iov_base
= 0;
8745 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8747 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8752 xcb_coloritem_next (xcb_coloritem_iterator_t
*i
/**< */)
8756 i
->index
+= sizeof(xcb_coloritem_t
);
8759 xcb_generic_iterator_t
8760 xcb_coloritem_end (xcb_coloritem_iterator_t i
/**< */)
8762 xcb_generic_iterator_t ret
;
8763 ret
.data
= i
.data
+ i
.rem
;
8764 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
8770 xcb_store_colors_sizeof (const void *_buffer
/**< */,
8771 uint32_t items_len
/**< */)
8773 char *xcb_tmp
= (char *)_buffer
;
8774 unsigned int xcb_buffer_len
= 0;
8775 unsigned int xcb_block_len
= 0;
8776 unsigned int xcb_pad
= 0;
8777 unsigned int xcb_align_to
= 0;
8780 xcb_block_len
+= sizeof(xcb_store_colors_request_t
);
8781 xcb_tmp
+= xcb_block_len
;
8782 xcb_buffer_len
+= xcb_block_len
;
8785 xcb_block_len
+= items_len
* sizeof(xcb_coloritem_t
);
8786 xcb_tmp
+= xcb_block_len
;
8787 xcb_align_to
= ALIGNOF(xcb_coloritem_t
);
8788 /* insert padding */
8789 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8790 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8797 return xcb_buffer_len
;
8801 xcb_store_colors_checked (xcb_connection_t
*c
/**< */,
8802 xcb_colormap_t cmap
/**< */,
8803 uint32_t items_len
/**< */,
8804 const xcb_coloritem_t
*items
/**< */)
8806 static const xcb_protocol_request_t xcb_req
= {
8809 /* opcode */ XCB_STORE_COLORS
,
8813 struct iovec xcb_parts
[6];
8814 xcb_void_cookie_t xcb_ret
;
8815 xcb_store_colors_request_t xcb_out
;
8818 xcb_out
.cmap
= cmap
;
8820 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8821 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8822 xcb_parts
[3].iov_base
= 0;
8823 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8824 /* xcb_coloritem_t items */
8825 xcb_parts
[4].iov_base
= (char *) items
;
8826 xcb_parts
[4].iov_len
= items_len
* sizeof(xcb_coloritem_t
);
8827 xcb_parts
[5].iov_base
= 0;
8828 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8830 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8835 xcb_store_colors (xcb_connection_t
*c
/**< */,
8836 xcb_colormap_t cmap
/**< */,
8837 uint32_t items_len
/**< */,
8838 const xcb_coloritem_t
*items
/**< */)
8840 static const xcb_protocol_request_t xcb_req
= {
8843 /* opcode */ XCB_STORE_COLORS
,
8847 struct iovec xcb_parts
[6];
8848 xcb_void_cookie_t xcb_ret
;
8849 xcb_store_colors_request_t xcb_out
;
8852 xcb_out
.cmap
= cmap
;
8854 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8855 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8856 xcb_parts
[3].iov_base
= 0;
8857 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8858 /* xcb_coloritem_t items */
8859 xcb_parts
[4].iov_base
= (char *) items
;
8860 xcb_parts
[4].iov_len
= items_len
* sizeof(xcb_coloritem_t
);
8861 xcb_parts
[5].iov_base
= 0;
8862 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8864 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8869 xcb_store_named_color_sizeof (const void *_buffer
/**< */)
8871 char *xcb_tmp
= (char *)_buffer
;
8872 const xcb_store_named_color_request_t
*_aux
= (xcb_store_named_color_request_t
*)_buffer
;
8873 unsigned int xcb_buffer_len
= 0;
8874 unsigned int xcb_block_len
= 0;
8875 unsigned int xcb_pad
= 0;
8876 unsigned int xcb_align_to
= 0;
8879 xcb_block_len
+= sizeof(xcb_store_named_color_request_t
);
8880 xcb_tmp
+= xcb_block_len
;
8881 xcb_buffer_len
+= xcb_block_len
;
8884 xcb_block_len
+= _aux
->name_len
* sizeof(char);
8885 xcb_tmp
+= xcb_block_len
;
8886 xcb_align_to
= ALIGNOF(char);
8887 /* insert padding */
8888 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
8889 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
8896 return xcb_buffer_len
;
8900 xcb_store_named_color_checked (xcb_connection_t
*c
/**< */,
8901 uint8_t flags
/**< */,
8902 xcb_colormap_t cmap
/**< */,
8903 uint32_t pixel
/**< */,
8904 uint16_t name_len
/**< */,
8905 const char *name
/**< */)
8907 static const xcb_protocol_request_t xcb_req
= {
8910 /* opcode */ XCB_STORE_NAMED_COLOR
,
8914 struct iovec xcb_parts
[6];
8915 xcb_void_cookie_t xcb_ret
;
8916 xcb_store_named_color_request_t xcb_out
;
8918 xcb_out
.flags
= flags
;
8919 xcb_out
.cmap
= cmap
;
8920 xcb_out
.pixel
= pixel
;
8921 xcb_out
.name_len
= name_len
;
8922 memset(xcb_out
.pad0
, 0, 2);
8924 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8925 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8926 xcb_parts
[3].iov_base
= 0;
8927 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8929 xcb_parts
[4].iov_base
= (char *) name
;
8930 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
8931 xcb_parts
[5].iov_base
= 0;
8932 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8934 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
8939 xcb_store_named_color (xcb_connection_t
*c
/**< */,
8940 uint8_t flags
/**< */,
8941 xcb_colormap_t cmap
/**< */,
8942 uint32_t pixel
/**< */,
8943 uint16_t name_len
/**< */,
8944 const char *name
/**< */)
8946 static const xcb_protocol_request_t xcb_req
= {
8949 /* opcode */ XCB_STORE_NAMED_COLOR
,
8953 struct iovec xcb_parts
[6];
8954 xcb_void_cookie_t xcb_ret
;
8955 xcb_store_named_color_request_t xcb_out
;
8957 xcb_out
.flags
= flags
;
8958 xcb_out
.cmap
= cmap
;
8959 xcb_out
.pixel
= pixel
;
8960 xcb_out
.name_len
= name_len
;
8961 memset(xcb_out
.pad0
, 0, 2);
8963 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
8964 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
8965 xcb_parts
[3].iov_base
= 0;
8966 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
8968 xcb_parts
[4].iov_base
= (char *) name
;
8969 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
8970 xcb_parts
[5].iov_base
= 0;
8971 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
8973 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
8978 xcb_rgb_next (xcb_rgb_iterator_t
*i
/**< */)
8982 i
->index
+= sizeof(xcb_rgb_t
);
8985 xcb_generic_iterator_t
8986 xcb_rgb_end (xcb_rgb_iterator_t i
/**< */)
8988 xcb_generic_iterator_t ret
;
8989 ret
.data
= i
.data
+ i
.rem
;
8990 ret
.index
= i
.index
+ ((char *) ret
.data
- (char *) i
.data
);
8996 xcb_query_colors_sizeof (const void *_buffer
/**< */,
8997 uint32_t pixels_len
/**< */)
8999 char *xcb_tmp
= (char *)_buffer
;
9000 unsigned int xcb_buffer_len
= 0;
9001 unsigned int xcb_block_len
= 0;
9002 unsigned int xcb_pad
= 0;
9003 unsigned int xcb_align_to
= 0;
9006 xcb_block_len
+= sizeof(xcb_query_colors_request_t
);
9007 xcb_tmp
+= xcb_block_len
;
9008 xcb_buffer_len
+= xcb_block_len
;
9011 xcb_block_len
+= pixels_len
* sizeof(uint32_t);
9012 xcb_tmp
+= xcb_block_len
;
9013 xcb_align_to
= ALIGNOF(uint32_t);
9014 /* insert padding */
9015 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9016 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9023 return xcb_buffer_len
;
9026 xcb_query_colors_cookie_t
9027 xcb_query_colors (xcb_connection_t
*c
/**< */,
9028 xcb_colormap_t cmap
/**< */,
9029 uint32_t pixels_len
/**< */,
9030 const uint32_t *pixels
/**< */)
9032 static const xcb_protocol_request_t xcb_req
= {
9035 /* opcode */ XCB_QUERY_COLORS
,
9039 struct iovec xcb_parts
[6];
9040 xcb_query_colors_cookie_t xcb_ret
;
9041 xcb_query_colors_request_t xcb_out
;
9044 xcb_out
.cmap
= cmap
;
9046 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9047 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9048 xcb_parts
[3].iov_base
= 0;
9049 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9050 /* uint32_t pixels */
9051 xcb_parts
[4].iov_base
= (char *) pixels
;
9052 xcb_parts
[4].iov_len
= pixels_len
* sizeof(uint32_t);
9053 xcb_parts
[5].iov_base
= 0;
9054 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9056 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9060 xcb_query_colors_cookie_t
9061 xcb_query_colors_unchecked (xcb_connection_t
*c
/**< */,
9062 xcb_colormap_t cmap
/**< */,
9063 uint32_t pixels_len
/**< */,
9064 const uint32_t *pixels
/**< */)
9066 static const xcb_protocol_request_t xcb_req
= {
9069 /* opcode */ XCB_QUERY_COLORS
,
9073 struct iovec xcb_parts
[6];
9074 xcb_query_colors_cookie_t xcb_ret
;
9075 xcb_query_colors_request_t xcb_out
;
9078 xcb_out
.cmap
= cmap
;
9080 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9081 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9082 xcb_parts
[3].iov_base
= 0;
9083 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9084 /* uint32_t pixels */
9085 xcb_parts
[4].iov_base
= (char *) pixels
;
9086 xcb_parts
[4].iov_len
= pixels_len
* sizeof(uint32_t);
9087 xcb_parts
[5].iov_base
= 0;
9088 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9090 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9095 xcb_query_colors_colors (const xcb_query_colors_reply_t
*R
/**< */)
9097 return (xcb_rgb_t
*) (R
+ 1);
9101 xcb_query_colors_colors_length (const xcb_query_colors_reply_t
*R
/**< */)
9103 return R
->colors_len
;
9107 xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t
*R
/**< */)
9109 xcb_rgb_iterator_t i
;
9110 i
.data
= (xcb_rgb_t
*) (R
+ 1);
9111 i
.rem
= R
->colors_len
;
9112 i
.index
= (char *) i
.data
- (char *) R
;
9116 xcb_query_colors_reply_t
*
9117 xcb_query_colors_reply (xcb_connection_t
*c
/**< */,
9118 xcb_query_colors_cookie_t cookie
/**< */,
9119 xcb_generic_error_t
**e
/**< */)
9121 return (xcb_query_colors_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
9125 xcb_lookup_color_sizeof (const void *_buffer
/**< */)
9127 char *xcb_tmp
= (char *)_buffer
;
9128 const xcb_lookup_color_request_t
*_aux
= (xcb_lookup_color_request_t
*)_buffer
;
9129 unsigned int xcb_buffer_len
= 0;
9130 unsigned int xcb_block_len
= 0;
9131 unsigned int xcb_pad
= 0;
9132 unsigned int xcb_align_to
= 0;
9135 xcb_block_len
+= sizeof(xcb_lookup_color_request_t
);
9136 xcb_tmp
+= xcb_block_len
;
9137 xcb_buffer_len
+= xcb_block_len
;
9140 xcb_block_len
+= _aux
->name_len
* sizeof(char);
9141 xcb_tmp
+= xcb_block_len
;
9142 xcb_align_to
= ALIGNOF(char);
9143 /* insert padding */
9144 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9145 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9152 return xcb_buffer_len
;
9155 xcb_lookup_color_cookie_t
9156 xcb_lookup_color (xcb_connection_t
*c
/**< */,
9157 xcb_colormap_t cmap
/**< */,
9158 uint16_t name_len
/**< */,
9159 const char *name
/**< */)
9161 static const xcb_protocol_request_t xcb_req
= {
9164 /* opcode */ XCB_LOOKUP_COLOR
,
9168 struct iovec xcb_parts
[6];
9169 xcb_lookup_color_cookie_t xcb_ret
;
9170 xcb_lookup_color_request_t xcb_out
;
9173 xcb_out
.cmap
= cmap
;
9174 xcb_out
.name_len
= name_len
;
9175 memset(xcb_out
.pad1
, 0, 2);
9177 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9178 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9179 xcb_parts
[3].iov_base
= 0;
9180 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9182 xcb_parts
[4].iov_base
= (char *) name
;
9183 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
9184 xcb_parts
[5].iov_base
= 0;
9185 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9187 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9191 xcb_lookup_color_cookie_t
9192 xcb_lookup_color_unchecked (xcb_connection_t
*c
/**< */,
9193 xcb_colormap_t cmap
/**< */,
9194 uint16_t name_len
/**< */,
9195 const char *name
/**< */)
9197 static const xcb_protocol_request_t xcb_req
= {
9200 /* opcode */ XCB_LOOKUP_COLOR
,
9204 struct iovec xcb_parts
[6];
9205 xcb_lookup_color_cookie_t xcb_ret
;
9206 xcb_lookup_color_request_t xcb_out
;
9209 xcb_out
.cmap
= cmap
;
9210 xcb_out
.name_len
= name_len
;
9211 memset(xcb_out
.pad1
, 0, 2);
9213 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9214 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9215 xcb_parts
[3].iov_base
= 0;
9216 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9218 xcb_parts
[4].iov_base
= (char *) name
;
9219 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
9220 xcb_parts
[5].iov_base
= 0;
9221 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9223 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9227 xcb_lookup_color_reply_t
*
9228 xcb_lookup_color_reply (xcb_connection_t
*c
/**< */,
9229 xcb_lookup_color_cookie_t cookie
/**< */,
9230 xcb_generic_error_t
**e
/**< */)
9232 return (xcb_lookup_color_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
9236 xcb_create_cursor_checked (xcb_connection_t
*c
/**< */,
9237 xcb_cursor_t cid
/**< */,
9238 xcb_pixmap_t source
/**< */,
9239 xcb_pixmap_t mask
/**< */,
9240 uint16_t fore_red
/**< */,
9241 uint16_t fore_green
/**< */,
9242 uint16_t fore_blue
/**< */,
9243 uint16_t back_red
/**< */,
9244 uint16_t back_green
/**< */,
9245 uint16_t back_blue
/**< */,
9249 static const xcb_protocol_request_t xcb_req
= {
9252 /* opcode */ XCB_CREATE_CURSOR
,
9256 struct iovec xcb_parts
[4];
9257 xcb_void_cookie_t xcb_ret
;
9258 xcb_create_cursor_request_t xcb_out
;
9262 xcb_out
.source
= source
;
9263 xcb_out
.mask
= mask
;
9264 xcb_out
.fore_red
= fore_red
;
9265 xcb_out
.fore_green
= fore_green
;
9266 xcb_out
.fore_blue
= fore_blue
;
9267 xcb_out
.back_red
= back_red
;
9268 xcb_out
.back_green
= back_green
;
9269 xcb_out
.back_blue
= back_blue
;
9273 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9274 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9275 xcb_parts
[3].iov_base
= 0;
9276 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9278 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9283 xcb_create_cursor (xcb_connection_t
*c
/**< */,
9284 xcb_cursor_t cid
/**< */,
9285 xcb_pixmap_t source
/**< */,
9286 xcb_pixmap_t mask
/**< */,
9287 uint16_t fore_red
/**< */,
9288 uint16_t fore_green
/**< */,
9289 uint16_t fore_blue
/**< */,
9290 uint16_t back_red
/**< */,
9291 uint16_t back_green
/**< */,
9292 uint16_t back_blue
/**< */,
9296 static const xcb_protocol_request_t xcb_req
= {
9299 /* opcode */ XCB_CREATE_CURSOR
,
9303 struct iovec xcb_parts
[4];
9304 xcb_void_cookie_t xcb_ret
;
9305 xcb_create_cursor_request_t xcb_out
;
9309 xcb_out
.source
= source
;
9310 xcb_out
.mask
= mask
;
9311 xcb_out
.fore_red
= fore_red
;
9312 xcb_out
.fore_green
= fore_green
;
9313 xcb_out
.fore_blue
= fore_blue
;
9314 xcb_out
.back_red
= back_red
;
9315 xcb_out
.back_green
= back_green
;
9316 xcb_out
.back_blue
= back_blue
;
9320 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9321 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9322 xcb_parts
[3].iov_base
= 0;
9323 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9325 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9330 xcb_create_glyph_cursor_checked (xcb_connection_t
*c
/**< */,
9331 xcb_cursor_t cid
/**< */,
9332 xcb_font_t source_font
/**< */,
9333 xcb_font_t mask_font
/**< */,
9334 uint16_t source_char
/**< */,
9335 uint16_t mask_char
/**< */,
9336 uint16_t fore_red
/**< */,
9337 uint16_t fore_green
/**< */,
9338 uint16_t fore_blue
/**< */,
9339 uint16_t back_red
/**< */,
9340 uint16_t back_green
/**< */,
9341 uint16_t back_blue
/**< */)
9343 static const xcb_protocol_request_t xcb_req
= {
9346 /* opcode */ XCB_CREATE_GLYPH_CURSOR
,
9350 struct iovec xcb_parts
[4];
9351 xcb_void_cookie_t xcb_ret
;
9352 xcb_create_glyph_cursor_request_t xcb_out
;
9356 xcb_out
.source_font
= source_font
;
9357 xcb_out
.mask_font
= mask_font
;
9358 xcb_out
.source_char
= source_char
;
9359 xcb_out
.mask_char
= mask_char
;
9360 xcb_out
.fore_red
= fore_red
;
9361 xcb_out
.fore_green
= fore_green
;
9362 xcb_out
.fore_blue
= fore_blue
;
9363 xcb_out
.back_red
= back_red
;
9364 xcb_out
.back_green
= back_green
;
9365 xcb_out
.back_blue
= back_blue
;
9367 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9368 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9369 xcb_parts
[3].iov_base
= 0;
9370 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9372 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9377 xcb_create_glyph_cursor (xcb_connection_t
*c
/**< */,
9378 xcb_cursor_t cid
/**< */,
9379 xcb_font_t source_font
/**< */,
9380 xcb_font_t mask_font
/**< */,
9381 uint16_t source_char
/**< */,
9382 uint16_t mask_char
/**< */,
9383 uint16_t fore_red
/**< */,
9384 uint16_t fore_green
/**< */,
9385 uint16_t fore_blue
/**< */,
9386 uint16_t back_red
/**< */,
9387 uint16_t back_green
/**< */,
9388 uint16_t back_blue
/**< */)
9390 static const xcb_protocol_request_t xcb_req
= {
9393 /* opcode */ XCB_CREATE_GLYPH_CURSOR
,
9397 struct iovec xcb_parts
[4];
9398 xcb_void_cookie_t xcb_ret
;
9399 xcb_create_glyph_cursor_request_t xcb_out
;
9403 xcb_out
.source_font
= source_font
;
9404 xcb_out
.mask_font
= mask_font
;
9405 xcb_out
.source_char
= source_char
;
9406 xcb_out
.mask_char
= mask_char
;
9407 xcb_out
.fore_red
= fore_red
;
9408 xcb_out
.fore_green
= fore_green
;
9409 xcb_out
.fore_blue
= fore_blue
;
9410 xcb_out
.back_red
= back_red
;
9411 xcb_out
.back_green
= back_green
;
9412 xcb_out
.back_blue
= back_blue
;
9414 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9415 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9416 xcb_parts
[3].iov_base
= 0;
9417 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9419 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9424 xcb_free_cursor_checked (xcb_connection_t
*c
/**< */,
9425 xcb_cursor_t cursor
/**< */)
9427 static const xcb_protocol_request_t xcb_req
= {
9430 /* opcode */ XCB_FREE_CURSOR
,
9434 struct iovec xcb_parts
[4];
9435 xcb_void_cookie_t xcb_ret
;
9436 xcb_free_cursor_request_t xcb_out
;
9439 xcb_out
.cursor
= cursor
;
9441 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9442 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9443 xcb_parts
[3].iov_base
= 0;
9444 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9446 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9451 xcb_free_cursor (xcb_connection_t
*c
/**< */,
9452 xcb_cursor_t cursor
/**< */)
9454 static const xcb_protocol_request_t xcb_req
= {
9457 /* opcode */ XCB_FREE_CURSOR
,
9461 struct iovec xcb_parts
[4];
9462 xcb_void_cookie_t xcb_ret
;
9463 xcb_free_cursor_request_t xcb_out
;
9466 xcb_out
.cursor
= cursor
;
9468 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9469 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9470 xcb_parts
[3].iov_base
= 0;
9471 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9473 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9478 xcb_recolor_cursor_checked (xcb_connection_t
*c
/**< */,
9479 xcb_cursor_t cursor
/**< */,
9480 uint16_t fore_red
/**< */,
9481 uint16_t fore_green
/**< */,
9482 uint16_t fore_blue
/**< */,
9483 uint16_t back_red
/**< */,
9484 uint16_t back_green
/**< */,
9485 uint16_t back_blue
/**< */)
9487 static const xcb_protocol_request_t xcb_req
= {
9490 /* opcode */ XCB_RECOLOR_CURSOR
,
9494 struct iovec xcb_parts
[4];
9495 xcb_void_cookie_t xcb_ret
;
9496 xcb_recolor_cursor_request_t xcb_out
;
9499 xcb_out
.cursor
= cursor
;
9500 xcb_out
.fore_red
= fore_red
;
9501 xcb_out
.fore_green
= fore_green
;
9502 xcb_out
.fore_blue
= fore_blue
;
9503 xcb_out
.back_red
= back_red
;
9504 xcb_out
.back_green
= back_green
;
9505 xcb_out
.back_blue
= back_blue
;
9507 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9508 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9509 xcb_parts
[3].iov_base
= 0;
9510 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9512 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9517 xcb_recolor_cursor (xcb_connection_t
*c
/**< */,
9518 xcb_cursor_t cursor
/**< */,
9519 uint16_t fore_red
/**< */,
9520 uint16_t fore_green
/**< */,
9521 uint16_t fore_blue
/**< */,
9522 uint16_t back_red
/**< */,
9523 uint16_t back_green
/**< */,
9524 uint16_t back_blue
/**< */)
9526 static const xcb_protocol_request_t xcb_req
= {
9529 /* opcode */ XCB_RECOLOR_CURSOR
,
9533 struct iovec xcb_parts
[4];
9534 xcb_void_cookie_t xcb_ret
;
9535 xcb_recolor_cursor_request_t xcb_out
;
9538 xcb_out
.cursor
= cursor
;
9539 xcb_out
.fore_red
= fore_red
;
9540 xcb_out
.fore_green
= fore_green
;
9541 xcb_out
.fore_blue
= fore_blue
;
9542 xcb_out
.back_red
= back_red
;
9543 xcb_out
.back_green
= back_green
;
9544 xcb_out
.back_blue
= back_blue
;
9546 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9547 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9548 xcb_parts
[3].iov_base
= 0;
9549 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9551 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9555 xcb_query_best_size_cookie_t
9556 xcb_query_best_size (xcb_connection_t
*c
/**< */,
9557 uint8_t _class
/**< */,
9558 xcb_drawable_t drawable
/**< */,
9559 uint16_t width
/**< */,
9560 uint16_t height
/**< */)
9562 static const xcb_protocol_request_t xcb_req
= {
9565 /* opcode */ XCB_QUERY_BEST_SIZE
,
9569 struct iovec xcb_parts
[4];
9570 xcb_query_best_size_cookie_t xcb_ret
;
9571 xcb_query_best_size_request_t xcb_out
;
9573 xcb_out
._class
= _class
;
9574 xcb_out
.drawable
= drawable
;
9575 xcb_out
.width
= width
;
9576 xcb_out
.height
= height
;
9578 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9579 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9580 xcb_parts
[3].iov_base
= 0;
9581 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9583 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9587 xcb_query_best_size_cookie_t
9588 xcb_query_best_size_unchecked (xcb_connection_t
*c
/**< */,
9589 uint8_t _class
/**< */,
9590 xcb_drawable_t drawable
/**< */,
9591 uint16_t width
/**< */,
9592 uint16_t height
/**< */)
9594 static const xcb_protocol_request_t xcb_req
= {
9597 /* opcode */ XCB_QUERY_BEST_SIZE
,
9601 struct iovec xcb_parts
[4];
9602 xcb_query_best_size_cookie_t xcb_ret
;
9603 xcb_query_best_size_request_t xcb_out
;
9605 xcb_out
._class
= _class
;
9606 xcb_out
.drawable
= drawable
;
9607 xcb_out
.width
= width
;
9608 xcb_out
.height
= height
;
9610 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9611 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9612 xcb_parts
[3].iov_base
= 0;
9613 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9615 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9619 xcb_query_best_size_reply_t
*
9620 xcb_query_best_size_reply (xcb_connection_t
*c
/**< */,
9621 xcb_query_best_size_cookie_t cookie
/**< */,
9622 xcb_generic_error_t
**e
/**< */)
9624 return (xcb_query_best_size_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
9628 xcb_query_extension_sizeof (const void *_buffer
/**< */)
9630 char *xcb_tmp
= (char *)_buffer
;
9631 const xcb_query_extension_request_t
*_aux
= (xcb_query_extension_request_t
*)_buffer
;
9632 unsigned int xcb_buffer_len
= 0;
9633 unsigned int xcb_block_len
= 0;
9634 unsigned int xcb_pad
= 0;
9635 unsigned int xcb_align_to
= 0;
9638 xcb_block_len
+= sizeof(xcb_query_extension_request_t
);
9639 xcb_tmp
+= xcb_block_len
;
9640 xcb_buffer_len
+= xcb_block_len
;
9643 xcb_block_len
+= _aux
->name_len
* sizeof(char);
9644 xcb_tmp
+= xcb_block_len
;
9645 xcb_align_to
= ALIGNOF(char);
9646 /* insert padding */
9647 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9648 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9655 return xcb_buffer_len
;
9658 xcb_query_extension_cookie_t
9659 xcb_query_extension (xcb_connection_t
*c
/**< */,
9660 uint16_t name_len
/**< */,
9661 const char *name
/**< */)
9663 static const xcb_protocol_request_t xcb_req
= {
9666 /* opcode */ XCB_QUERY_EXTENSION
,
9670 struct iovec xcb_parts
[6];
9671 xcb_query_extension_cookie_t xcb_ret
;
9672 xcb_query_extension_request_t xcb_out
;
9675 xcb_out
.name_len
= name_len
;
9676 memset(xcb_out
.pad1
, 0, 2);
9678 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9679 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9680 xcb_parts
[3].iov_base
= 0;
9681 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9683 xcb_parts
[4].iov_base
= (char *) name
;
9684 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
9685 xcb_parts
[5].iov_base
= 0;
9686 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9688 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9692 xcb_query_extension_cookie_t
9693 xcb_query_extension_unchecked (xcb_connection_t
*c
/**< */,
9694 uint16_t name_len
/**< */,
9695 const char *name
/**< */)
9697 static const xcb_protocol_request_t xcb_req
= {
9700 /* opcode */ XCB_QUERY_EXTENSION
,
9704 struct iovec xcb_parts
[6];
9705 xcb_query_extension_cookie_t xcb_ret
;
9706 xcb_query_extension_request_t xcb_out
;
9709 xcb_out
.name_len
= name_len
;
9710 memset(xcb_out
.pad1
, 0, 2);
9712 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9713 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9714 xcb_parts
[3].iov_base
= 0;
9715 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9717 xcb_parts
[4].iov_base
= (char *) name
;
9718 xcb_parts
[4].iov_len
= name_len
* sizeof(char);
9719 xcb_parts
[5].iov_base
= 0;
9720 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9722 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9726 xcb_query_extension_reply_t
*
9727 xcb_query_extension_reply (xcb_connection_t
*c
/**< */,
9728 xcb_query_extension_cookie_t cookie
/**< */,
9729 xcb_generic_error_t
**e
/**< */)
9731 return (xcb_query_extension_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
9735 xcb_list_extensions_sizeof (const void *_buffer
/**< */)
9737 char *xcb_tmp
= (char *)_buffer
;
9738 const xcb_list_extensions_reply_t
*_aux
= (xcb_list_extensions_reply_t
*)_buffer
;
9739 unsigned int xcb_buffer_len
= 0;
9740 unsigned int xcb_block_len
= 0;
9741 unsigned int xcb_pad
= 0;
9742 unsigned int xcb_align_to
= 0;
9745 unsigned int xcb_tmp_len
;
9747 xcb_block_len
+= sizeof(xcb_list_extensions_reply_t
);
9748 xcb_tmp
+= xcb_block_len
;
9749 xcb_buffer_len
+= xcb_block_len
;
9752 for(i
=0; i
<_aux
->names_len
; i
++) {
9753 xcb_tmp_len
= xcb_str_sizeof(xcb_tmp
);
9754 xcb_block_len
+= xcb_tmp_len
;
9755 xcb_tmp
+= xcb_tmp_len
;
9757 xcb_align_to
= ALIGNOF(xcb_str_t
);
9758 /* insert padding */
9759 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9760 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9767 return xcb_buffer_len
;
9770 xcb_list_extensions_cookie_t
9771 xcb_list_extensions (xcb_connection_t
*c
/**< */)
9773 static const xcb_protocol_request_t xcb_req
= {
9776 /* opcode */ XCB_LIST_EXTENSIONS
,
9780 struct iovec xcb_parts
[4];
9781 xcb_list_extensions_cookie_t xcb_ret
;
9782 xcb_list_extensions_request_t xcb_out
;
9786 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9787 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9788 xcb_parts
[3].iov_base
= 0;
9789 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9791 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9795 xcb_list_extensions_cookie_t
9796 xcb_list_extensions_unchecked (xcb_connection_t
*c
/**< */)
9798 static const xcb_protocol_request_t xcb_req
= {
9801 /* opcode */ XCB_LIST_EXTENSIONS
,
9805 struct iovec xcb_parts
[4];
9806 xcb_list_extensions_cookie_t xcb_ret
;
9807 xcb_list_extensions_request_t xcb_out
;
9811 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9812 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9813 xcb_parts
[3].iov_base
= 0;
9814 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9816 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9821 xcb_list_extensions_names_length (const xcb_list_extensions_reply_t
*R
/**< */)
9823 return R
->names_len
;
9827 xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t
*R
/**< */)
9829 xcb_str_iterator_t i
;
9830 i
.data
= (xcb_str_t
*) (R
+ 1);
9831 i
.rem
= R
->names_len
;
9832 i
.index
= (char *) i
.data
- (char *) R
;
9836 xcb_list_extensions_reply_t
*
9837 xcb_list_extensions_reply (xcb_connection_t
*c
/**< */,
9838 xcb_list_extensions_cookie_t cookie
/**< */,
9839 xcb_generic_error_t
**e
/**< */)
9841 return (xcb_list_extensions_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
9845 xcb_change_keyboard_mapping_sizeof (const void *_buffer
/**< */)
9847 char *xcb_tmp
= (char *)_buffer
;
9848 const xcb_change_keyboard_mapping_request_t
*_aux
= (xcb_change_keyboard_mapping_request_t
*)_buffer
;
9849 unsigned int xcb_buffer_len
= 0;
9850 unsigned int xcb_block_len
= 0;
9851 unsigned int xcb_pad
= 0;
9852 unsigned int xcb_align_to
= 0;
9855 xcb_block_len
+= sizeof(xcb_change_keyboard_mapping_request_t
);
9856 xcb_tmp
+= xcb_block_len
;
9857 xcb_buffer_len
+= xcb_block_len
;
9860 xcb_block_len
+= (_aux
->keycode_count
* _aux
->keysyms_per_keycode
) * sizeof(xcb_keysym_t
);
9861 xcb_tmp
+= xcb_block_len
;
9862 xcb_align_to
= ALIGNOF(xcb_keysym_t
);
9863 /* insert padding */
9864 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9865 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9872 return xcb_buffer_len
;
9876 xcb_change_keyboard_mapping_checked (xcb_connection_t
*c
/**< */,
9877 uint8_t keycode_count
/**< */,
9878 xcb_keycode_t first_keycode
/**< */,
9879 uint8_t keysyms_per_keycode
/**< */,
9880 const xcb_keysym_t
*keysyms
/**< */)
9882 static const xcb_protocol_request_t xcb_req
= {
9885 /* opcode */ XCB_CHANGE_KEYBOARD_MAPPING
,
9889 struct iovec xcb_parts
[6];
9890 xcb_void_cookie_t xcb_ret
;
9891 xcb_change_keyboard_mapping_request_t xcb_out
;
9893 xcb_out
.keycode_count
= keycode_count
;
9894 xcb_out
.first_keycode
= first_keycode
;
9895 xcb_out
.keysyms_per_keycode
= keysyms_per_keycode
;
9896 memset(xcb_out
.pad0
, 0, 2);
9898 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9899 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9900 xcb_parts
[3].iov_base
= 0;
9901 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9902 /* xcb_keysym_t keysyms */
9903 xcb_parts
[4].iov_base
= (char *) keysyms
;
9904 xcb_parts
[4].iov_len
= (keycode_count
* keysyms_per_keycode
) * sizeof(xcb_keysym_t
);
9905 xcb_parts
[5].iov_base
= 0;
9906 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9908 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
9913 xcb_change_keyboard_mapping (xcb_connection_t
*c
/**< */,
9914 uint8_t keycode_count
/**< */,
9915 xcb_keycode_t first_keycode
/**< */,
9916 uint8_t keysyms_per_keycode
/**< */,
9917 const xcb_keysym_t
*keysyms
/**< */)
9919 static const xcb_protocol_request_t xcb_req
= {
9922 /* opcode */ XCB_CHANGE_KEYBOARD_MAPPING
,
9926 struct iovec xcb_parts
[6];
9927 xcb_void_cookie_t xcb_ret
;
9928 xcb_change_keyboard_mapping_request_t xcb_out
;
9930 xcb_out
.keycode_count
= keycode_count
;
9931 xcb_out
.first_keycode
= first_keycode
;
9932 xcb_out
.keysyms_per_keycode
= keysyms_per_keycode
;
9933 memset(xcb_out
.pad0
, 0, 2);
9935 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
9936 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
9937 xcb_parts
[3].iov_base
= 0;
9938 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
9939 /* xcb_keysym_t keysyms */
9940 xcb_parts
[4].iov_base
= (char *) keysyms
;
9941 xcb_parts
[4].iov_len
= (keycode_count
* keysyms_per_keycode
) * sizeof(xcb_keysym_t
);
9942 xcb_parts
[5].iov_base
= 0;
9943 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
9945 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
9950 xcb_get_keyboard_mapping_sizeof (const void *_buffer
/**< */)
9952 char *xcb_tmp
= (char *)_buffer
;
9953 const xcb_get_keyboard_mapping_reply_t
*_aux
= (xcb_get_keyboard_mapping_reply_t
*)_buffer
;
9954 unsigned int xcb_buffer_len
= 0;
9955 unsigned int xcb_block_len
= 0;
9956 unsigned int xcb_pad
= 0;
9957 unsigned int xcb_align_to
= 0;
9960 xcb_block_len
+= sizeof(xcb_get_keyboard_mapping_reply_t
);
9961 xcb_tmp
+= xcb_block_len
;
9962 xcb_buffer_len
+= xcb_block_len
;
9965 xcb_block_len
+= _aux
->length
* sizeof(xcb_keysym_t
);
9966 xcb_tmp
+= xcb_block_len
;
9967 xcb_align_to
= ALIGNOF(xcb_keysym_t
);
9968 /* insert padding */
9969 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
9970 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
9977 return xcb_buffer_len
;
9980 xcb_get_keyboard_mapping_cookie_t
9981 xcb_get_keyboard_mapping (xcb_connection_t
*c
/**< */,
9982 xcb_keycode_t first_keycode
/**< */,
9983 uint8_t count
/**< */)
9985 static const xcb_protocol_request_t xcb_req
= {
9988 /* opcode */ XCB_GET_KEYBOARD_MAPPING
,
9992 struct iovec xcb_parts
[4];
9993 xcb_get_keyboard_mapping_cookie_t xcb_ret
;
9994 xcb_get_keyboard_mapping_request_t xcb_out
;
9997 xcb_out
.first_keycode
= first_keycode
;
9998 xcb_out
.count
= count
;
10000 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10001 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10002 xcb_parts
[3].iov_base
= 0;
10003 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10005 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10009 xcb_get_keyboard_mapping_cookie_t
10010 xcb_get_keyboard_mapping_unchecked (xcb_connection_t
*c
/**< */,
10011 xcb_keycode_t first_keycode
/**< */,
10012 uint8_t count
/**< */)
10014 static const xcb_protocol_request_t xcb_req
= {
10017 /* opcode */ XCB_GET_KEYBOARD_MAPPING
,
10021 struct iovec xcb_parts
[4];
10022 xcb_get_keyboard_mapping_cookie_t xcb_ret
;
10023 xcb_get_keyboard_mapping_request_t xcb_out
;
10026 xcb_out
.first_keycode
= first_keycode
;
10027 xcb_out
.count
= count
;
10029 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10030 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10031 xcb_parts
[3].iov_base
= 0;
10032 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10034 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10039 xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t
*R
/**< */)
10041 return (xcb_keysym_t
*) (R
+ 1);
10045 xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t
*R
/**< */)
10050 xcb_generic_iterator_t
10051 xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t
*R
/**< */)
10053 xcb_generic_iterator_t i
;
10054 i
.data
= ((xcb_keysym_t
*) (R
+ 1)) + (R
->length
);
10056 i
.index
= (char *) i
.data
- (char *) R
;
10060 xcb_get_keyboard_mapping_reply_t
*
10061 xcb_get_keyboard_mapping_reply (xcb_connection_t
*c
/**< */,
10062 xcb_get_keyboard_mapping_cookie_t cookie
/**< */,
10063 xcb_generic_error_t
**e
/**< */)
10065 return (xcb_get_keyboard_mapping_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
10069 xcb_change_keyboard_control_sizeof (const void *_buffer
/**< */)
10071 char *xcb_tmp
= (char *)_buffer
;
10072 const xcb_change_keyboard_control_request_t
*_aux
= (xcb_change_keyboard_control_request_t
*)_buffer
;
10073 unsigned int xcb_buffer_len
= 0;
10074 unsigned int xcb_block_len
= 0;
10075 unsigned int xcb_pad
= 0;
10076 unsigned int xcb_align_to
= 0;
10079 xcb_block_len
+= sizeof(xcb_change_keyboard_control_request_t
);
10080 xcb_tmp
+= xcb_block_len
;
10081 xcb_buffer_len
+= xcb_block_len
;
10084 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
10085 xcb_tmp
+= xcb_block_len
;
10086 xcb_align_to
= ALIGNOF(uint32_t);
10087 /* insert padding */
10088 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
10089 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
10090 if (0 != xcb_pad
) {
10091 xcb_tmp
+= xcb_pad
;
10096 return xcb_buffer_len
;
10100 xcb_change_keyboard_control_checked (xcb_connection_t
*c
/**< */,
10101 uint32_t value_mask
/**< */,
10102 const uint32_t *value_list
/**< */)
10104 static const xcb_protocol_request_t xcb_req
= {
10107 /* opcode */ XCB_CHANGE_KEYBOARD_CONTROL
,
10111 struct iovec xcb_parts
[6];
10112 xcb_void_cookie_t xcb_ret
;
10113 xcb_change_keyboard_control_request_t xcb_out
;
10116 xcb_out
.value_mask
= value_mask
;
10118 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10119 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10120 xcb_parts
[3].iov_base
= 0;
10121 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10122 /* uint32_t value_list */
10123 xcb_parts
[4].iov_base
= (char *) value_list
;
10124 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
10125 xcb_parts
[5].iov_base
= 0;
10126 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
10128 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10133 xcb_change_keyboard_control (xcb_connection_t
*c
/**< */,
10134 uint32_t value_mask
/**< */,
10135 const uint32_t *value_list
/**< */)
10137 static const xcb_protocol_request_t xcb_req
= {
10140 /* opcode */ XCB_CHANGE_KEYBOARD_CONTROL
,
10144 struct iovec xcb_parts
[6];
10145 xcb_void_cookie_t xcb_ret
;
10146 xcb_change_keyboard_control_request_t xcb_out
;
10149 xcb_out
.value_mask
= value_mask
;
10151 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10152 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10153 xcb_parts
[3].iov_base
= 0;
10154 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10155 /* uint32_t value_list */
10156 xcb_parts
[4].iov_base
= (char *) value_list
;
10157 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
10158 xcb_parts
[5].iov_base
= 0;
10159 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
10161 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10165 xcb_get_keyboard_control_cookie_t
10166 xcb_get_keyboard_control (xcb_connection_t
*c
/**< */)
10168 static const xcb_protocol_request_t xcb_req
= {
10171 /* opcode */ XCB_GET_KEYBOARD_CONTROL
,
10175 struct iovec xcb_parts
[4];
10176 xcb_get_keyboard_control_cookie_t xcb_ret
;
10177 xcb_get_keyboard_control_request_t xcb_out
;
10181 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10182 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10183 xcb_parts
[3].iov_base
= 0;
10184 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10186 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10190 xcb_get_keyboard_control_cookie_t
10191 xcb_get_keyboard_control_unchecked (xcb_connection_t
*c
/**< */)
10193 static const xcb_protocol_request_t xcb_req
= {
10196 /* opcode */ XCB_GET_KEYBOARD_CONTROL
,
10200 struct iovec xcb_parts
[4];
10201 xcb_get_keyboard_control_cookie_t xcb_ret
;
10202 xcb_get_keyboard_control_request_t xcb_out
;
10206 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10207 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10208 xcb_parts
[3].iov_base
= 0;
10209 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10211 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10215 xcb_get_keyboard_control_reply_t
*
10216 xcb_get_keyboard_control_reply (xcb_connection_t
*c
/**< */,
10217 xcb_get_keyboard_control_cookie_t cookie
/**< */,
10218 xcb_generic_error_t
**e
/**< */)
10220 return (xcb_get_keyboard_control_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
10224 xcb_bell_checked (xcb_connection_t
*c
/**< */,
10225 int8_t percent
/**< */)
10227 static const xcb_protocol_request_t xcb_req
= {
10230 /* opcode */ XCB_BELL
,
10234 struct iovec xcb_parts
[4];
10235 xcb_void_cookie_t xcb_ret
;
10236 xcb_bell_request_t xcb_out
;
10238 xcb_out
.percent
= percent
;
10240 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10241 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10242 xcb_parts
[3].iov_base
= 0;
10243 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10245 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10250 xcb_bell (xcb_connection_t
*c
/**< */,
10251 int8_t percent
/**< */)
10253 static const xcb_protocol_request_t xcb_req
= {
10256 /* opcode */ XCB_BELL
,
10260 struct iovec xcb_parts
[4];
10261 xcb_void_cookie_t xcb_ret
;
10262 xcb_bell_request_t xcb_out
;
10264 xcb_out
.percent
= percent
;
10266 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10267 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10268 xcb_parts
[3].iov_base
= 0;
10269 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10271 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10276 xcb_change_pointer_control_checked (xcb_connection_t
*c
/**< */,
10277 int16_t acceleration_numerator
/**< */,
10278 int16_t acceleration_denominator
/**< */,
10279 int16_t threshold
/**< */,
10280 uint8_t do_acceleration
/**< */,
10281 uint8_t do_threshold
/**< */)
10283 static const xcb_protocol_request_t xcb_req
= {
10286 /* opcode */ XCB_CHANGE_POINTER_CONTROL
,
10290 struct iovec xcb_parts
[4];
10291 xcb_void_cookie_t xcb_ret
;
10292 xcb_change_pointer_control_request_t xcb_out
;
10295 xcb_out
.acceleration_numerator
= acceleration_numerator
;
10296 xcb_out
.acceleration_denominator
= acceleration_denominator
;
10297 xcb_out
.threshold
= threshold
;
10298 xcb_out
.do_acceleration
= do_acceleration
;
10299 xcb_out
.do_threshold
= do_threshold
;
10301 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10302 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10303 xcb_parts
[3].iov_base
= 0;
10304 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10306 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10311 xcb_change_pointer_control (xcb_connection_t
*c
/**< */,
10312 int16_t acceleration_numerator
/**< */,
10313 int16_t acceleration_denominator
/**< */,
10314 int16_t threshold
/**< */,
10315 uint8_t do_acceleration
/**< */,
10316 uint8_t do_threshold
/**< */)
10318 static const xcb_protocol_request_t xcb_req
= {
10321 /* opcode */ XCB_CHANGE_POINTER_CONTROL
,
10325 struct iovec xcb_parts
[4];
10326 xcb_void_cookie_t xcb_ret
;
10327 xcb_change_pointer_control_request_t xcb_out
;
10330 xcb_out
.acceleration_numerator
= acceleration_numerator
;
10331 xcb_out
.acceleration_denominator
= acceleration_denominator
;
10332 xcb_out
.threshold
= threshold
;
10333 xcb_out
.do_acceleration
= do_acceleration
;
10334 xcb_out
.do_threshold
= do_threshold
;
10336 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10337 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10338 xcb_parts
[3].iov_base
= 0;
10339 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10341 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10345 xcb_get_pointer_control_cookie_t
10346 xcb_get_pointer_control (xcb_connection_t
*c
/**< */)
10348 static const xcb_protocol_request_t xcb_req
= {
10351 /* opcode */ XCB_GET_POINTER_CONTROL
,
10355 struct iovec xcb_parts
[4];
10356 xcb_get_pointer_control_cookie_t xcb_ret
;
10357 xcb_get_pointer_control_request_t xcb_out
;
10361 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10362 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10363 xcb_parts
[3].iov_base
= 0;
10364 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10366 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10370 xcb_get_pointer_control_cookie_t
10371 xcb_get_pointer_control_unchecked (xcb_connection_t
*c
/**< */)
10373 static const xcb_protocol_request_t xcb_req
= {
10376 /* opcode */ XCB_GET_POINTER_CONTROL
,
10380 struct iovec xcb_parts
[4];
10381 xcb_get_pointer_control_cookie_t xcb_ret
;
10382 xcb_get_pointer_control_request_t xcb_out
;
10386 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10387 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10388 xcb_parts
[3].iov_base
= 0;
10389 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10391 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10395 xcb_get_pointer_control_reply_t
*
10396 xcb_get_pointer_control_reply (xcb_connection_t
*c
/**< */,
10397 xcb_get_pointer_control_cookie_t cookie
/**< */,
10398 xcb_generic_error_t
**e
/**< */)
10400 return (xcb_get_pointer_control_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
10404 xcb_set_screen_saver_checked (xcb_connection_t
*c
/**< */,
10405 int16_t timeout
/**< */,
10406 int16_t interval
/**< */,
10407 uint8_t prefer_blanking
/**< */,
10408 uint8_t allow_exposures
/**< */)
10410 static const xcb_protocol_request_t xcb_req
= {
10413 /* opcode */ XCB_SET_SCREEN_SAVER
,
10417 struct iovec xcb_parts
[4];
10418 xcb_void_cookie_t xcb_ret
;
10419 xcb_set_screen_saver_request_t xcb_out
;
10422 xcb_out
.timeout
= timeout
;
10423 xcb_out
.interval
= interval
;
10424 xcb_out
.prefer_blanking
= prefer_blanking
;
10425 xcb_out
.allow_exposures
= allow_exposures
;
10427 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10428 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10429 xcb_parts
[3].iov_base
= 0;
10430 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10432 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10437 xcb_set_screen_saver (xcb_connection_t
*c
/**< */,
10438 int16_t timeout
/**< */,
10439 int16_t interval
/**< */,
10440 uint8_t prefer_blanking
/**< */,
10441 uint8_t allow_exposures
/**< */)
10443 static const xcb_protocol_request_t xcb_req
= {
10446 /* opcode */ XCB_SET_SCREEN_SAVER
,
10450 struct iovec xcb_parts
[4];
10451 xcb_void_cookie_t xcb_ret
;
10452 xcb_set_screen_saver_request_t xcb_out
;
10455 xcb_out
.timeout
= timeout
;
10456 xcb_out
.interval
= interval
;
10457 xcb_out
.prefer_blanking
= prefer_blanking
;
10458 xcb_out
.allow_exposures
= allow_exposures
;
10460 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10461 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10462 xcb_parts
[3].iov_base
= 0;
10463 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10465 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10469 xcb_get_screen_saver_cookie_t
10470 xcb_get_screen_saver (xcb_connection_t
*c
/**< */)
10472 static const xcb_protocol_request_t xcb_req
= {
10475 /* opcode */ XCB_GET_SCREEN_SAVER
,
10479 struct iovec xcb_parts
[4];
10480 xcb_get_screen_saver_cookie_t xcb_ret
;
10481 xcb_get_screen_saver_request_t xcb_out
;
10485 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10486 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10487 xcb_parts
[3].iov_base
= 0;
10488 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10490 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10494 xcb_get_screen_saver_cookie_t
10495 xcb_get_screen_saver_unchecked (xcb_connection_t
*c
/**< */)
10497 static const xcb_protocol_request_t xcb_req
= {
10500 /* opcode */ XCB_GET_SCREEN_SAVER
,
10504 struct iovec xcb_parts
[4];
10505 xcb_get_screen_saver_cookie_t xcb_ret
;
10506 xcb_get_screen_saver_request_t xcb_out
;
10510 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10511 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10512 xcb_parts
[3].iov_base
= 0;
10513 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10515 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10519 xcb_get_screen_saver_reply_t
*
10520 xcb_get_screen_saver_reply (xcb_connection_t
*c
/**< */,
10521 xcb_get_screen_saver_cookie_t cookie
/**< */,
10522 xcb_generic_error_t
**e
/**< */)
10524 return (xcb_get_screen_saver_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
10528 xcb_change_hosts_sizeof (const void *_buffer
/**< */)
10530 char *xcb_tmp
= (char *)_buffer
;
10531 const xcb_change_hosts_request_t
*_aux
= (xcb_change_hosts_request_t
*)_buffer
;
10532 unsigned int xcb_buffer_len
= 0;
10533 unsigned int xcb_block_len
= 0;
10534 unsigned int xcb_pad
= 0;
10535 unsigned int xcb_align_to
= 0;
10538 xcb_block_len
+= sizeof(xcb_change_hosts_request_t
);
10539 xcb_tmp
+= xcb_block_len
;
10540 xcb_buffer_len
+= xcb_block_len
;
10543 xcb_block_len
+= _aux
->address_len
* sizeof(uint8_t);
10544 xcb_tmp
+= xcb_block_len
;
10545 xcb_align_to
= ALIGNOF(uint8_t);
10546 /* insert padding */
10547 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
10548 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
10549 if (0 != xcb_pad
) {
10550 xcb_tmp
+= xcb_pad
;
10555 return xcb_buffer_len
;
10559 xcb_change_hosts_checked (xcb_connection_t
*c
/**< */,
10560 uint8_t mode
/**< */,
10561 uint8_t family
/**< */,
10562 uint16_t address_len
/**< */,
10563 const uint8_t *address
/**< */)
10565 static const xcb_protocol_request_t xcb_req
= {
10568 /* opcode */ XCB_CHANGE_HOSTS
,
10572 struct iovec xcb_parts
[6];
10573 xcb_void_cookie_t xcb_ret
;
10574 xcb_change_hosts_request_t xcb_out
;
10576 xcb_out
.mode
= mode
;
10577 xcb_out
.family
= family
;
10579 xcb_out
.address_len
= address_len
;
10581 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10582 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10583 xcb_parts
[3].iov_base
= 0;
10584 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10585 /* uint8_t address */
10586 xcb_parts
[4].iov_base
= (char *) address
;
10587 xcb_parts
[4].iov_len
= address_len
* sizeof(uint8_t);
10588 xcb_parts
[5].iov_base
= 0;
10589 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
10591 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10596 xcb_change_hosts (xcb_connection_t
*c
/**< */,
10597 uint8_t mode
/**< */,
10598 uint8_t family
/**< */,
10599 uint16_t address_len
/**< */,
10600 const uint8_t *address
/**< */)
10602 static const xcb_protocol_request_t xcb_req
= {
10605 /* opcode */ XCB_CHANGE_HOSTS
,
10609 struct iovec xcb_parts
[6];
10610 xcb_void_cookie_t xcb_ret
;
10611 xcb_change_hosts_request_t xcb_out
;
10613 xcb_out
.mode
= mode
;
10614 xcb_out
.family
= family
;
10616 xcb_out
.address_len
= address_len
;
10618 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10619 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10620 xcb_parts
[3].iov_base
= 0;
10621 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10622 /* uint8_t address */
10623 xcb_parts
[4].iov_base
= (char *) address
;
10624 xcb_parts
[4].iov_len
= address_len
* sizeof(uint8_t);
10625 xcb_parts
[5].iov_base
= 0;
10626 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
10628 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10633 xcb_host_sizeof (const void *_buffer
/**< */)
10635 char *xcb_tmp
= (char *)_buffer
;
10636 const xcb_host_t
*_aux
= (xcb_host_t
*)_buffer
;
10637 unsigned int xcb_buffer_len
= 0;
10638 unsigned int xcb_block_len
= 0;
10639 unsigned int xcb_pad
= 0;
10640 unsigned int xcb_align_to
= 0;
10643 xcb_block_len
+= sizeof(xcb_host_t
);
10644 xcb_tmp
+= xcb_block_len
;
10645 xcb_buffer_len
+= xcb_block_len
;
10648 xcb_block_len
+= _aux
->address_len
* sizeof(uint8_t);
10649 xcb_tmp
+= xcb_block_len
;
10650 xcb_align_to
= ALIGNOF(uint8_t);
10651 /* insert padding */
10652 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
10653 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
10654 if (0 != xcb_pad
) {
10655 xcb_tmp
+= xcb_pad
;
10660 return xcb_buffer_len
;
10664 xcb_host_address (const xcb_host_t
*R
/**< */)
10666 return (uint8_t *) (R
+ 1);
10670 xcb_host_address_length (const xcb_host_t
*R
/**< */)
10672 return R
->address_len
;
10675 xcb_generic_iterator_t
10676 xcb_host_address_end (const xcb_host_t
*R
/**< */)
10678 xcb_generic_iterator_t i
;
10679 i
.data
= ((uint8_t *) (R
+ 1)) + (R
->address_len
);
10681 i
.index
= (char *) i
.data
- (char *) R
;
10686 xcb_host_next (xcb_host_iterator_t
*i
/**< */)
10688 xcb_host_t
*R
= i
->data
;
10689 xcb_generic_iterator_t child
;
10690 child
.data
= (xcb_host_t
*)(((char *)R
) + xcb_host_sizeof(R
));
10691 i
->index
= (char *) child
.data
- (char *) i
->data
;
10693 i
->data
= (xcb_host_t
*) child
.data
;
10696 xcb_generic_iterator_t
10697 xcb_host_end (xcb_host_iterator_t i
/**< */)
10699 xcb_generic_iterator_t ret
;
10704 ret
.index
= i
.index
;
10709 xcb_list_hosts_sizeof (const void *_buffer
/**< */)
10711 char *xcb_tmp
= (char *)_buffer
;
10712 const xcb_list_hosts_reply_t
*_aux
= (xcb_list_hosts_reply_t
*)_buffer
;
10713 unsigned int xcb_buffer_len
= 0;
10714 unsigned int xcb_block_len
= 0;
10715 unsigned int xcb_pad
= 0;
10716 unsigned int xcb_align_to
= 0;
10719 unsigned int xcb_tmp_len
;
10721 xcb_block_len
+= sizeof(xcb_list_hosts_reply_t
);
10722 xcb_tmp
+= xcb_block_len
;
10723 xcb_buffer_len
+= xcb_block_len
;
10726 for(i
=0; i
<_aux
->hosts_len
; i
++) {
10727 xcb_tmp_len
= xcb_host_sizeof(xcb_tmp
);
10728 xcb_block_len
+= xcb_tmp_len
;
10729 xcb_tmp
+= xcb_tmp_len
;
10731 xcb_align_to
= ALIGNOF(xcb_host_t
);
10732 /* insert padding */
10733 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
10734 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
10735 if (0 != xcb_pad
) {
10736 xcb_tmp
+= xcb_pad
;
10741 return xcb_buffer_len
;
10744 xcb_list_hosts_cookie_t
10745 xcb_list_hosts (xcb_connection_t
*c
/**< */)
10747 static const xcb_protocol_request_t xcb_req
= {
10750 /* opcode */ XCB_LIST_HOSTS
,
10754 struct iovec xcb_parts
[4];
10755 xcb_list_hosts_cookie_t xcb_ret
;
10756 xcb_list_hosts_request_t xcb_out
;
10760 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10761 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10762 xcb_parts
[3].iov_base
= 0;
10763 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10765 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10769 xcb_list_hosts_cookie_t
10770 xcb_list_hosts_unchecked (xcb_connection_t
*c
/**< */)
10772 static const xcb_protocol_request_t xcb_req
= {
10775 /* opcode */ XCB_LIST_HOSTS
,
10779 struct iovec xcb_parts
[4];
10780 xcb_list_hosts_cookie_t xcb_ret
;
10781 xcb_list_hosts_request_t xcb_out
;
10785 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10786 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10787 xcb_parts
[3].iov_base
= 0;
10788 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10790 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10795 xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t
*R
/**< */)
10797 return R
->hosts_len
;
10800 xcb_host_iterator_t
10801 xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t
*R
/**< */)
10803 xcb_host_iterator_t i
;
10804 i
.data
= (xcb_host_t
*) (R
+ 1);
10805 i
.rem
= R
->hosts_len
;
10806 i
.index
= (char *) i
.data
- (char *) R
;
10810 xcb_list_hosts_reply_t
*
10811 xcb_list_hosts_reply (xcb_connection_t
*c
/**< */,
10812 xcb_list_hosts_cookie_t cookie
/**< */,
10813 xcb_generic_error_t
**e
/**< */)
10815 return (xcb_list_hosts_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
10819 xcb_set_access_control_checked (xcb_connection_t
*c
/**< */,
10820 uint8_t mode
/**< */)
10822 static const xcb_protocol_request_t xcb_req
= {
10825 /* opcode */ XCB_SET_ACCESS_CONTROL
,
10829 struct iovec xcb_parts
[4];
10830 xcb_void_cookie_t xcb_ret
;
10831 xcb_set_access_control_request_t xcb_out
;
10833 xcb_out
.mode
= mode
;
10835 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10836 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10837 xcb_parts
[3].iov_base
= 0;
10838 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10840 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10845 xcb_set_access_control (xcb_connection_t
*c
/**< */,
10846 uint8_t mode
/**< */)
10848 static const xcb_protocol_request_t xcb_req
= {
10851 /* opcode */ XCB_SET_ACCESS_CONTROL
,
10855 struct iovec xcb_parts
[4];
10856 xcb_void_cookie_t xcb_ret
;
10857 xcb_set_access_control_request_t xcb_out
;
10859 xcb_out
.mode
= mode
;
10861 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10862 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10863 xcb_parts
[3].iov_base
= 0;
10864 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10866 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10871 xcb_set_close_down_mode_checked (xcb_connection_t
*c
/**< */,
10872 uint8_t mode
/**< */)
10874 static const xcb_protocol_request_t xcb_req
= {
10877 /* opcode */ XCB_SET_CLOSE_DOWN_MODE
,
10881 struct iovec xcb_parts
[4];
10882 xcb_void_cookie_t xcb_ret
;
10883 xcb_set_close_down_mode_request_t xcb_out
;
10885 xcb_out
.mode
= mode
;
10887 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10888 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10889 xcb_parts
[3].iov_base
= 0;
10890 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10892 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10897 xcb_set_close_down_mode (xcb_connection_t
*c
/**< */,
10898 uint8_t mode
/**< */)
10900 static const xcb_protocol_request_t xcb_req
= {
10903 /* opcode */ XCB_SET_CLOSE_DOWN_MODE
,
10907 struct iovec xcb_parts
[4];
10908 xcb_void_cookie_t xcb_ret
;
10909 xcb_set_close_down_mode_request_t xcb_out
;
10911 xcb_out
.mode
= mode
;
10913 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10914 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10915 xcb_parts
[3].iov_base
= 0;
10916 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10918 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10923 xcb_kill_client_checked (xcb_connection_t
*c
/**< */,
10924 uint32_t resource
/**< */)
10926 static const xcb_protocol_request_t xcb_req
= {
10929 /* opcode */ XCB_KILL_CLIENT
,
10933 struct iovec xcb_parts
[4];
10934 xcb_void_cookie_t xcb_ret
;
10935 xcb_kill_client_request_t xcb_out
;
10938 xcb_out
.resource
= resource
;
10940 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10941 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10942 xcb_parts
[3].iov_base
= 0;
10943 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10945 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
10950 xcb_kill_client (xcb_connection_t
*c
/**< */,
10951 uint32_t resource
/**< */)
10953 static const xcb_protocol_request_t xcb_req
= {
10956 /* opcode */ XCB_KILL_CLIENT
,
10960 struct iovec xcb_parts
[4];
10961 xcb_void_cookie_t xcb_ret
;
10962 xcb_kill_client_request_t xcb_out
;
10965 xcb_out
.resource
= resource
;
10967 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
10968 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
10969 xcb_parts
[3].iov_base
= 0;
10970 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
10972 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
10977 xcb_rotate_properties_sizeof (const void *_buffer
/**< */)
10979 char *xcb_tmp
= (char *)_buffer
;
10980 const xcb_rotate_properties_request_t
*_aux
= (xcb_rotate_properties_request_t
*)_buffer
;
10981 unsigned int xcb_buffer_len
= 0;
10982 unsigned int xcb_block_len
= 0;
10983 unsigned int xcb_pad
= 0;
10984 unsigned int xcb_align_to
= 0;
10987 xcb_block_len
+= sizeof(xcb_rotate_properties_request_t
);
10988 xcb_tmp
+= xcb_block_len
;
10989 xcb_buffer_len
+= xcb_block_len
;
10992 xcb_block_len
+= _aux
->atoms_len
* sizeof(xcb_atom_t
);
10993 xcb_tmp
+= xcb_block_len
;
10994 xcb_align_to
= ALIGNOF(xcb_atom_t
);
10995 /* insert padding */
10996 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
10997 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
10998 if (0 != xcb_pad
) {
10999 xcb_tmp
+= xcb_pad
;
11004 return xcb_buffer_len
;
11008 xcb_rotate_properties_checked (xcb_connection_t
*c
/**< */,
11009 xcb_window_t window
/**< */,
11010 uint16_t atoms_len
/**< */,
11011 int16_t delta
/**< */,
11012 const xcb_atom_t
*atoms
/**< */)
11014 static const xcb_protocol_request_t xcb_req
= {
11017 /* opcode */ XCB_ROTATE_PROPERTIES
,
11021 struct iovec xcb_parts
[6];
11022 xcb_void_cookie_t xcb_ret
;
11023 xcb_rotate_properties_request_t xcb_out
;
11026 xcb_out
.window
= window
;
11027 xcb_out
.atoms_len
= atoms_len
;
11028 xcb_out
.delta
= delta
;
11030 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11031 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11032 xcb_parts
[3].iov_base
= 0;
11033 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11034 /* xcb_atom_t atoms */
11035 xcb_parts
[4].iov_base
= (char *) atoms
;
11036 xcb_parts
[4].iov_len
= atoms_len
* sizeof(xcb_atom_t
);
11037 xcb_parts
[5].iov_base
= 0;
11038 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11040 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11045 xcb_rotate_properties (xcb_connection_t
*c
/**< */,
11046 xcb_window_t window
/**< */,
11047 uint16_t atoms_len
/**< */,
11048 int16_t delta
/**< */,
11049 const xcb_atom_t
*atoms
/**< */)
11051 static const xcb_protocol_request_t xcb_req
= {
11054 /* opcode */ XCB_ROTATE_PROPERTIES
,
11058 struct iovec xcb_parts
[6];
11059 xcb_void_cookie_t xcb_ret
;
11060 xcb_rotate_properties_request_t xcb_out
;
11063 xcb_out
.window
= window
;
11064 xcb_out
.atoms_len
= atoms_len
;
11065 xcb_out
.delta
= delta
;
11067 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11068 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11069 xcb_parts
[3].iov_base
= 0;
11070 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11071 /* xcb_atom_t atoms */
11072 xcb_parts
[4].iov_base
= (char *) atoms
;
11073 xcb_parts
[4].iov_len
= atoms_len
* sizeof(xcb_atom_t
);
11074 xcb_parts
[5].iov_base
= 0;
11075 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11077 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11082 xcb_force_screen_saver_checked (xcb_connection_t
*c
/**< */,
11083 uint8_t mode
/**< */)
11085 static const xcb_protocol_request_t xcb_req
= {
11088 /* opcode */ XCB_FORCE_SCREEN_SAVER
,
11092 struct iovec xcb_parts
[4];
11093 xcb_void_cookie_t xcb_ret
;
11094 xcb_force_screen_saver_request_t xcb_out
;
11096 xcb_out
.mode
= mode
;
11098 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11099 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11100 xcb_parts
[3].iov_base
= 0;
11101 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11103 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11108 xcb_force_screen_saver (xcb_connection_t
*c
/**< */,
11109 uint8_t mode
/**< */)
11111 static const xcb_protocol_request_t xcb_req
= {
11114 /* opcode */ XCB_FORCE_SCREEN_SAVER
,
11118 struct iovec xcb_parts
[4];
11119 xcb_void_cookie_t xcb_ret
;
11120 xcb_force_screen_saver_request_t xcb_out
;
11122 xcb_out
.mode
= mode
;
11124 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11125 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11126 xcb_parts
[3].iov_base
= 0;
11127 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11129 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11134 xcb_set_pointer_mapping_sizeof (const void *_buffer
/**< */)
11136 char *xcb_tmp
= (char *)_buffer
;
11137 const xcb_set_pointer_mapping_request_t
*_aux
= (xcb_set_pointer_mapping_request_t
*)_buffer
;
11138 unsigned int xcb_buffer_len
= 0;
11139 unsigned int xcb_block_len
= 0;
11140 unsigned int xcb_pad
= 0;
11141 unsigned int xcb_align_to
= 0;
11144 xcb_block_len
+= sizeof(xcb_set_pointer_mapping_request_t
);
11145 xcb_tmp
+= xcb_block_len
;
11146 xcb_buffer_len
+= xcb_block_len
;
11149 xcb_block_len
+= _aux
->map_len
* sizeof(uint8_t);
11150 xcb_tmp
+= xcb_block_len
;
11151 xcb_align_to
= ALIGNOF(uint8_t);
11152 /* insert padding */
11153 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
11154 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
11155 if (0 != xcb_pad
) {
11156 xcb_tmp
+= xcb_pad
;
11161 return xcb_buffer_len
;
11164 xcb_set_pointer_mapping_cookie_t
11165 xcb_set_pointer_mapping (xcb_connection_t
*c
/**< */,
11166 uint8_t map_len
/**< */,
11167 const uint8_t *map
/**< */)
11169 static const xcb_protocol_request_t xcb_req
= {
11172 /* opcode */ XCB_SET_POINTER_MAPPING
,
11176 struct iovec xcb_parts
[6];
11177 xcb_set_pointer_mapping_cookie_t xcb_ret
;
11178 xcb_set_pointer_mapping_request_t xcb_out
;
11180 xcb_out
.map_len
= map_len
;
11182 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11183 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11184 xcb_parts
[3].iov_base
= 0;
11185 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11187 xcb_parts
[4].iov_base
= (char *) map
;
11188 xcb_parts
[4].iov_len
= map_len
* sizeof(uint8_t);
11189 xcb_parts
[5].iov_base
= 0;
11190 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11192 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11196 xcb_set_pointer_mapping_cookie_t
11197 xcb_set_pointer_mapping_unchecked (xcb_connection_t
*c
/**< */,
11198 uint8_t map_len
/**< */,
11199 const uint8_t *map
/**< */)
11201 static const xcb_protocol_request_t xcb_req
= {
11204 /* opcode */ XCB_SET_POINTER_MAPPING
,
11208 struct iovec xcb_parts
[6];
11209 xcb_set_pointer_mapping_cookie_t xcb_ret
;
11210 xcb_set_pointer_mapping_request_t xcb_out
;
11212 xcb_out
.map_len
= map_len
;
11214 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11215 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11216 xcb_parts
[3].iov_base
= 0;
11217 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11219 xcb_parts
[4].iov_base
= (char *) map
;
11220 xcb_parts
[4].iov_len
= map_len
* sizeof(uint8_t);
11221 xcb_parts
[5].iov_base
= 0;
11222 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11224 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11228 xcb_set_pointer_mapping_reply_t
*
11229 xcb_set_pointer_mapping_reply (xcb_connection_t
*c
/**< */,
11230 xcb_set_pointer_mapping_cookie_t cookie
/**< */,
11231 xcb_generic_error_t
**e
/**< */)
11233 return (xcb_set_pointer_mapping_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
11237 xcb_get_pointer_mapping_sizeof (const void *_buffer
/**< */)
11239 char *xcb_tmp
= (char *)_buffer
;
11240 const xcb_get_pointer_mapping_reply_t
*_aux
= (xcb_get_pointer_mapping_reply_t
*)_buffer
;
11241 unsigned int xcb_buffer_len
= 0;
11242 unsigned int xcb_block_len
= 0;
11243 unsigned int xcb_pad
= 0;
11244 unsigned int xcb_align_to
= 0;
11247 xcb_block_len
+= sizeof(xcb_get_pointer_mapping_reply_t
);
11248 xcb_tmp
+= xcb_block_len
;
11249 xcb_buffer_len
+= xcb_block_len
;
11252 xcb_block_len
+= _aux
->map_len
* sizeof(uint8_t);
11253 xcb_tmp
+= xcb_block_len
;
11254 xcb_align_to
= ALIGNOF(uint8_t);
11255 /* insert padding */
11256 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
11257 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
11258 if (0 != xcb_pad
) {
11259 xcb_tmp
+= xcb_pad
;
11264 return xcb_buffer_len
;
11267 xcb_get_pointer_mapping_cookie_t
11268 xcb_get_pointer_mapping (xcb_connection_t
*c
/**< */)
11270 static const xcb_protocol_request_t xcb_req
= {
11273 /* opcode */ XCB_GET_POINTER_MAPPING
,
11277 struct iovec xcb_parts
[4];
11278 xcb_get_pointer_mapping_cookie_t xcb_ret
;
11279 xcb_get_pointer_mapping_request_t xcb_out
;
11283 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11284 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11285 xcb_parts
[3].iov_base
= 0;
11286 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11288 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11292 xcb_get_pointer_mapping_cookie_t
11293 xcb_get_pointer_mapping_unchecked (xcb_connection_t
*c
/**< */)
11295 static const xcb_protocol_request_t xcb_req
= {
11298 /* opcode */ XCB_GET_POINTER_MAPPING
,
11302 struct iovec xcb_parts
[4];
11303 xcb_get_pointer_mapping_cookie_t xcb_ret
;
11304 xcb_get_pointer_mapping_request_t xcb_out
;
11308 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11309 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11310 xcb_parts
[3].iov_base
= 0;
11311 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11313 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11318 xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t
*R
/**< */)
11320 return (uint8_t *) (R
+ 1);
11324 xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t
*R
/**< */)
11329 xcb_generic_iterator_t
11330 xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t
*R
/**< */)
11332 xcb_generic_iterator_t i
;
11333 i
.data
= ((uint8_t *) (R
+ 1)) + (R
->map_len
);
11335 i
.index
= (char *) i
.data
- (char *) R
;
11339 xcb_get_pointer_mapping_reply_t
*
11340 xcb_get_pointer_mapping_reply (xcb_connection_t
*c
/**< */,
11341 xcb_get_pointer_mapping_cookie_t cookie
/**< */,
11342 xcb_generic_error_t
**e
/**< */)
11344 return (xcb_get_pointer_mapping_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
11348 xcb_set_modifier_mapping_sizeof (const void *_buffer
/**< */)
11350 char *xcb_tmp
= (char *)_buffer
;
11351 const xcb_set_modifier_mapping_request_t
*_aux
= (xcb_set_modifier_mapping_request_t
*)_buffer
;
11352 unsigned int xcb_buffer_len
= 0;
11353 unsigned int xcb_block_len
= 0;
11354 unsigned int xcb_pad
= 0;
11355 unsigned int xcb_align_to
= 0;
11358 xcb_block_len
+= sizeof(xcb_set_modifier_mapping_request_t
);
11359 xcb_tmp
+= xcb_block_len
;
11360 xcb_buffer_len
+= xcb_block_len
;
11363 xcb_block_len
+= (_aux
->keycodes_per_modifier
* 8) * sizeof(xcb_keycode_t
);
11364 xcb_tmp
+= xcb_block_len
;
11365 xcb_align_to
= ALIGNOF(xcb_keycode_t
);
11366 /* insert padding */
11367 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
11368 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
11369 if (0 != xcb_pad
) {
11370 xcb_tmp
+= xcb_pad
;
11375 return xcb_buffer_len
;
11378 xcb_set_modifier_mapping_cookie_t
11379 xcb_set_modifier_mapping (xcb_connection_t
*c
/**< */,
11380 uint8_t keycodes_per_modifier
/**< */,
11381 const xcb_keycode_t
*keycodes
/**< */)
11383 static const xcb_protocol_request_t xcb_req
= {
11386 /* opcode */ XCB_SET_MODIFIER_MAPPING
,
11390 struct iovec xcb_parts
[6];
11391 xcb_set_modifier_mapping_cookie_t xcb_ret
;
11392 xcb_set_modifier_mapping_request_t xcb_out
;
11394 xcb_out
.keycodes_per_modifier
= keycodes_per_modifier
;
11396 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11397 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11398 xcb_parts
[3].iov_base
= 0;
11399 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11400 /* xcb_keycode_t keycodes */
11401 xcb_parts
[4].iov_base
= (char *) keycodes
;
11402 xcb_parts
[4].iov_len
= (keycodes_per_modifier
* 8) * sizeof(uint8_t);
11403 xcb_parts
[5].iov_base
= 0;
11404 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11406 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11410 xcb_set_modifier_mapping_cookie_t
11411 xcb_set_modifier_mapping_unchecked (xcb_connection_t
*c
/**< */,
11412 uint8_t keycodes_per_modifier
/**< */,
11413 const xcb_keycode_t
*keycodes
/**< */)
11415 static const xcb_protocol_request_t xcb_req
= {
11418 /* opcode */ XCB_SET_MODIFIER_MAPPING
,
11422 struct iovec xcb_parts
[6];
11423 xcb_set_modifier_mapping_cookie_t xcb_ret
;
11424 xcb_set_modifier_mapping_request_t xcb_out
;
11426 xcb_out
.keycodes_per_modifier
= keycodes_per_modifier
;
11428 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11429 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11430 xcb_parts
[3].iov_base
= 0;
11431 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11432 /* xcb_keycode_t keycodes */
11433 xcb_parts
[4].iov_base
= (char *) keycodes
;
11434 xcb_parts
[4].iov_len
= (keycodes_per_modifier
* 8) * sizeof(uint8_t);
11435 xcb_parts
[5].iov_base
= 0;
11436 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
11438 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11442 xcb_set_modifier_mapping_reply_t
*
11443 xcb_set_modifier_mapping_reply (xcb_connection_t
*c
/**< */,
11444 xcb_set_modifier_mapping_cookie_t cookie
/**< */,
11445 xcb_generic_error_t
**e
/**< */)
11447 return (xcb_set_modifier_mapping_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
11451 xcb_get_modifier_mapping_sizeof (const void *_buffer
/**< */)
11453 char *xcb_tmp
= (char *)_buffer
;
11454 const xcb_get_modifier_mapping_reply_t
*_aux
= (xcb_get_modifier_mapping_reply_t
*)_buffer
;
11455 unsigned int xcb_buffer_len
= 0;
11456 unsigned int xcb_block_len
= 0;
11457 unsigned int xcb_pad
= 0;
11458 unsigned int xcb_align_to
= 0;
11461 xcb_block_len
+= sizeof(xcb_get_modifier_mapping_reply_t
);
11462 xcb_tmp
+= xcb_block_len
;
11463 xcb_buffer_len
+= xcb_block_len
;
11466 xcb_block_len
+= (_aux
->keycodes_per_modifier
* 8) * sizeof(xcb_keycode_t
);
11467 xcb_tmp
+= xcb_block_len
;
11468 xcb_align_to
= ALIGNOF(xcb_keycode_t
);
11469 /* insert padding */
11470 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
11471 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
11472 if (0 != xcb_pad
) {
11473 xcb_tmp
+= xcb_pad
;
11478 return xcb_buffer_len
;
11481 xcb_get_modifier_mapping_cookie_t
11482 xcb_get_modifier_mapping (xcb_connection_t
*c
/**< */)
11484 static const xcb_protocol_request_t xcb_req
= {
11487 /* opcode */ XCB_GET_MODIFIER_MAPPING
,
11491 struct iovec xcb_parts
[4];
11492 xcb_get_modifier_mapping_cookie_t xcb_ret
;
11493 xcb_get_modifier_mapping_request_t xcb_out
;
11497 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11498 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11499 xcb_parts
[3].iov_base
= 0;
11500 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11502 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11506 xcb_get_modifier_mapping_cookie_t
11507 xcb_get_modifier_mapping_unchecked (xcb_connection_t
*c
/**< */)
11509 static const xcb_protocol_request_t xcb_req
= {
11512 /* opcode */ XCB_GET_MODIFIER_MAPPING
,
11516 struct iovec xcb_parts
[4];
11517 xcb_get_modifier_mapping_cookie_t xcb_ret
;
11518 xcb_get_modifier_mapping_request_t xcb_out
;
11522 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11523 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11524 xcb_parts
[3].iov_base
= 0;
11525 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11527 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
11532 xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t
*R
/**< */)
11534 return (xcb_keycode_t
*) (R
+ 1);
11538 xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t
*R
/**< */)
11540 return (R
->keycodes_per_modifier
* 8);
11543 xcb_generic_iterator_t
11544 xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t
*R
/**< */)
11546 xcb_generic_iterator_t i
;
11547 i
.data
= ((xcb_keycode_t
*) (R
+ 1)) + ((R
->keycodes_per_modifier
* 8));
11549 i
.index
= (char *) i
.data
- (char *) R
;
11553 xcb_get_modifier_mapping_reply_t
*
11554 xcb_get_modifier_mapping_reply (xcb_connection_t
*c
/**< */,
11555 xcb_get_modifier_mapping_cookie_t cookie
/**< */,
11556 xcb_generic_error_t
**e
/**< */)
11558 return (xcb_get_modifier_mapping_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
11562 xcb_no_operation_checked (xcb_connection_t
*c
/**< */)
11564 static const xcb_protocol_request_t xcb_req
= {
11567 /* opcode */ XCB_NO_OPERATION
,
11571 struct iovec xcb_parts
[4];
11572 xcb_void_cookie_t xcb_ret
;
11573 xcb_no_operation_request_t xcb_out
;
11577 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11578 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11579 xcb_parts
[3].iov_base
= 0;
11580 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11582 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
11587 xcb_no_operation (xcb_connection_t
*c
/**< */)
11589 static const xcb_protocol_request_t xcb_req
= {
11592 /* opcode */ XCB_NO_OPERATION
,
11596 struct iovec xcb_parts
[4];
11597 xcb_void_cookie_t xcb_ret
;
11598 xcb_no_operation_request_t xcb_out
;
11602 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
11603 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
11604 xcb_parts
[3].iov_base
= 0;
11605 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
11607 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);