1/*
2 * This file generated automatically from xproto.xml by c_client.py.
3 * Edit at your peril.
4 */
5
6/**
7 * @defgroup XCB__API XCB API
8 * @brief XCB Protocol Implementation.
9 * @{
10 **/
11
12#ifndef __XPROTO_H
13#define __XPROTO_H
14
15#include "xcb.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/**
22 * @brief xcb_char2b_t
23 **/
24typedef struct xcb_char2b_t {
25 uint8_t byte1;
26 uint8_t byte2;
27} xcb_char2b_t;
28
29/**
30 * @brief xcb_char2b_iterator_t
31 **/
32typedef struct xcb_char2b_iterator_t {
33 xcb_char2b_t *data;
34 int rem;
35 int index;
36} xcb_char2b_iterator_t;
37
38typedef uint32_t xcb_window_t;
39
40/**
41 * @brief xcb_window_iterator_t
42 **/
43typedef struct xcb_window_iterator_t {
44 xcb_window_t *data;
45 int rem;
46 int index;
47} xcb_window_iterator_t;
48
49typedef uint32_t xcb_pixmap_t;
50
51/**
52 * @brief xcb_pixmap_iterator_t
53 **/
54typedef struct xcb_pixmap_iterator_t {
55 xcb_pixmap_t *data;
56 int rem;
57 int index;
58} xcb_pixmap_iterator_t;
59
60typedef uint32_t xcb_cursor_t;
61
62/**
63 * @brief xcb_cursor_iterator_t
64 **/
65typedef struct xcb_cursor_iterator_t {
66 xcb_cursor_t *data;
67 int rem;
68 int index;
69} xcb_cursor_iterator_t;
70
71typedef uint32_t xcb_font_t;
72
73/**
74 * @brief xcb_font_iterator_t
75 **/
76typedef struct xcb_font_iterator_t {
77 xcb_font_t *data;
78 int rem;
79 int index;
80} xcb_font_iterator_t;
81
82typedef uint32_t xcb_gcontext_t;
83
84/**
85 * @brief xcb_gcontext_iterator_t
86 **/
87typedef struct xcb_gcontext_iterator_t {
88 xcb_gcontext_t *data;
89 int rem;
90 int index;
91} xcb_gcontext_iterator_t;
92
93typedef uint32_t xcb_colormap_t;
94
95/**
96 * @brief xcb_colormap_iterator_t
97 **/
98typedef struct xcb_colormap_iterator_t {
99 xcb_colormap_t *data;
100 int rem;
101 int index;
102} xcb_colormap_iterator_t;
103
104typedef uint32_t xcb_atom_t;
105
106/**
107 * @brief xcb_atom_iterator_t
108 **/
109typedef struct xcb_atom_iterator_t {
110 xcb_atom_t *data;
111 int rem;
112 int index;
113} xcb_atom_iterator_t;
114
115typedef uint32_t xcb_drawable_t;
116
117/**
118 * @brief xcb_drawable_iterator_t
119 **/
120typedef struct xcb_drawable_iterator_t {
121 xcb_drawable_t *data;
122 int rem;
123 int index;
124} xcb_drawable_iterator_t;
125
126typedef uint32_t xcb_fontable_t;
127
128/**
129 * @brief xcb_fontable_iterator_t
130 **/
131typedef struct xcb_fontable_iterator_t {
132 xcb_fontable_t *data;
133 int rem;
134 int index;
135} xcb_fontable_iterator_t;
136
137typedef uint32_t xcb_bool32_t;
138
139/**
140 * @brief xcb_bool32_iterator_t
141 **/
142typedef struct xcb_bool32_iterator_t {
143 xcb_bool32_t *data;
144 int rem;
145 int index;
146} xcb_bool32_iterator_t;
147
148typedef uint32_t xcb_visualid_t;
149
150/**
151 * @brief xcb_visualid_iterator_t
152 **/
153typedef struct xcb_visualid_iterator_t {
154 xcb_visualid_t *data;
155 int rem;
156 int index;
157} xcb_visualid_iterator_t;
158
159typedef uint32_t xcb_timestamp_t;
160
161/**
162 * @brief xcb_timestamp_iterator_t
163 **/
164typedef struct xcb_timestamp_iterator_t {
165 xcb_timestamp_t *data;
166 int rem;
167 int index;
168} xcb_timestamp_iterator_t;
169
170typedef uint32_t xcb_keysym_t;
171
172/**
173 * @brief xcb_keysym_iterator_t
174 **/
175typedef struct xcb_keysym_iterator_t {
176 xcb_keysym_t *data;
177 int rem;
178 int index;
179} xcb_keysym_iterator_t;
180
181typedef uint8_t xcb_keycode_t;
182
183/**
184 * @brief xcb_keycode_iterator_t
185 **/
186typedef struct xcb_keycode_iterator_t {
187 xcb_keycode_t *data;
188 int rem;
189 int index;
190} xcb_keycode_iterator_t;
191
192typedef uint32_t xcb_keycode32_t;
193
194/**
195 * @brief xcb_keycode32_iterator_t
196 **/
197typedef struct xcb_keycode32_iterator_t {
198 xcb_keycode32_t *data;
199 int rem;
200 int index;
201} xcb_keycode32_iterator_t;
202
203typedef uint8_t xcb_button_t;
204
205/**
206 * @brief xcb_button_iterator_t
207 **/
208typedef struct xcb_button_iterator_t {
209 xcb_button_t *data;
210 int rem;
211 int index;
212} xcb_button_iterator_t;
213
214/**
215 * @brief xcb_point_t
216 **/
217typedef struct xcb_point_t {
218 int16_t x;
219 int16_t y;
220} xcb_point_t;
221
222/**
223 * @brief xcb_point_iterator_t
224 **/
225typedef struct xcb_point_iterator_t {
226 xcb_point_t *data;
227 int rem;
228 int index;
229} xcb_point_iterator_t;
230
231/**
232 * @brief xcb_rectangle_t
233 **/
234typedef struct xcb_rectangle_t {
235 int16_t x;
236 int16_t y;
237 uint16_t width;
238 uint16_t height;
239} xcb_rectangle_t;
240
241/**
242 * @brief xcb_rectangle_iterator_t
243 **/
244typedef struct xcb_rectangle_iterator_t {
245 xcb_rectangle_t *data;
246 int rem;
247 int index;
248} xcb_rectangle_iterator_t;
249
250/**
251 * @brief xcb_arc_t
252 **/
253typedef struct xcb_arc_t {
254 int16_t x;
255 int16_t y;
256 uint16_t width;
257 uint16_t height;
258 int16_t angle1;
259 int16_t angle2;
260} xcb_arc_t;
261
262/**
263 * @brief xcb_arc_iterator_t
264 **/
265typedef struct xcb_arc_iterator_t {
266 xcb_arc_t *data;
267 int rem;
268 int index;
269} xcb_arc_iterator_t;
270
271/**
272 * @brief xcb_format_t
273 **/
274typedef struct xcb_format_t {
275 uint8_t depth;
276 uint8_t bits_per_pixel;
277 uint8_t scanline_pad;
278 uint8_t pad0[5];
279} xcb_format_t;
280
281/**
282 * @brief xcb_format_iterator_t
283 **/
284typedef struct xcb_format_iterator_t {
285 xcb_format_t *data;
286 int rem;
287 int index;
288} xcb_format_iterator_t;
289
290typedef enum xcb_visual_class_t {
291 XCB_VISUAL_CLASS_STATIC_GRAY = 0,
292 XCB_VISUAL_CLASS_GRAY_SCALE = 1,
293 XCB_VISUAL_CLASS_STATIC_COLOR = 2,
294 XCB_VISUAL_CLASS_PSEUDO_COLOR = 3,
295 XCB_VISUAL_CLASS_TRUE_COLOR = 4,
296 XCB_VISUAL_CLASS_DIRECT_COLOR = 5
297} xcb_visual_class_t;
298
299/**
300 * @brief xcb_visualtype_t
301 **/
302typedef struct xcb_visualtype_t {
303 xcb_visualid_t visual_id;
304 uint8_t _class;
305 uint8_t bits_per_rgb_value;
306 uint16_t colormap_entries;
307 uint32_t red_mask;
308 uint32_t green_mask;
309 uint32_t blue_mask;
310 uint8_t pad0[4];
311} xcb_visualtype_t;
312
313/**
314 * @brief xcb_visualtype_iterator_t
315 **/
316typedef struct xcb_visualtype_iterator_t {
317 xcb_visualtype_t *data;
318 int rem;
319 int index;
320} xcb_visualtype_iterator_t;
321
322/**
323 * @brief xcb_depth_t
324 **/
325typedef struct xcb_depth_t {
326 uint8_t depth;
327 uint8_t pad0;
328 uint16_t visuals_len;
329 uint8_t pad1[4];
330} xcb_depth_t;
331
332/**
333 * @brief xcb_depth_iterator_t
334 **/
335typedef struct xcb_depth_iterator_t {
336 xcb_depth_t *data;
337 int rem;
338 int index;
339} xcb_depth_iterator_t;
340
341typedef enum xcb_event_mask_t {
342 XCB_EVENT_MASK_NO_EVENT = 0,
343 XCB_EVENT_MASK_KEY_PRESS = 1,
344 XCB_EVENT_MASK_KEY_RELEASE = 2,
345 XCB_EVENT_MASK_BUTTON_PRESS = 4,
346 XCB_EVENT_MASK_BUTTON_RELEASE = 8,
347 XCB_EVENT_MASK_ENTER_WINDOW = 16,
348 XCB_EVENT_MASK_LEAVE_WINDOW = 32,
349 XCB_EVENT_MASK_POINTER_MOTION = 64,
350 XCB_EVENT_MASK_POINTER_MOTION_HINT = 128,
351 XCB_EVENT_MASK_BUTTON_1_MOTION = 256,
352 XCB_EVENT_MASK_BUTTON_2_MOTION = 512,
353 XCB_EVENT_MASK_BUTTON_3_MOTION = 1024,
354 XCB_EVENT_MASK_BUTTON_4_MOTION = 2048,
355 XCB_EVENT_MASK_BUTTON_5_MOTION = 4096,
356 XCB_EVENT_MASK_BUTTON_MOTION = 8192,
357 XCB_EVENT_MASK_KEYMAP_STATE = 16384,
358 XCB_EVENT_MASK_EXPOSURE = 32768,
359 XCB_EVENT_MASK_VISIBILITY_CHANGE = 65536,
360 XCB_EVENT_MASK_STRUCTURE_NOTIFY = 131072,
361 XCB_EVENT_MASK_RESIZE_REDIRECT = 262144,
362 XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY = 524288,
363 XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT = 1048576,
364 XCB_EVENT_MASK_FOCUS_CHANGE = 2097152,
365 XCB_EVENT_MASK_PROPERTY_CHANGE = 4194304,
366 XCB_EVENT_MASK_COLOR_MAP_CHANGE = 8388608,
367 XCB_EVENT_MASK_OWNER_GRAB_BUTTON = 16777216
368} xcb_event_mask_t;
369
370typedef enum xcb_backing_store_t {
371 XCB_BACKING_STORE_NOT_USEFUL = 0,
372 XCB_BACKING_STORE_WHEN_MAPPED = 1,
373 XCB_BACKING_STORE_ALWAYS = 2
374} xcb_backing_store_t;
375
376/**
377 * @brief xcb_screen_t
378 **/
379typedef struct xcb_screen_t {
380 xcb_window_t root;
381 xcb_colormap_t default_colormap;
382 uint32_t white_pixel;
383 uint32_t black_pixel;
384 uint32_t current_input_masks;
385 uint16_t width_in_pixels;
386 uint16_t height_in_pixels;
387 uint16_t width_in_millimeters;
388 uint16_t height_in_millimeters;
389 uint16_t min_installed_maps;
390 uint16_t max_installed_maps;
391 xcb_visualid_t root_visual;
392 uint8_t backing_stores;
393 uint8_t save_unders;
394 uint8_t root_depth;
395 uint8_t allowed_depths_len;
396} xcb_screen_t;
397
398/**
399 * @brief xcb_screen_iterator_t
400 **/
401typedef struct xcb_screen_iterator_t {
402 xcb_screen_t *data;
403 int rem;
404 int index;
405} xcb_screen_iterator_t;
406
407/**
408 * @brief xcb_setup_request_t
409 **/
410typedef struct xcb_setup_request_t {
411 uint8_t byte_order;
412 uint8_t pad0;
413 uint16_t protocol_major_version;
414 uint16_t protocol_minor_version;
415 uint16_t authorization_protocol_name_len;
416 uint16_t authorization_protocol_data_len;
417 uint8_t pad1[2];
418} xcb_setup_request_t;
419
420/**
421 * @brief xcb_setup_request_iterator_t
422 **/
423typedef struct xcb_setup_request_iterator_t {
424 xcb_setup_request_t *data;
425 int rem;
426 int index;
427} xcb_setup_request_iterator_t;
428
429/**
430 * @brief xcb_setup_failed_t
431 **/
432typedef struct xcb_setup_failed_t {
433 uint8_t status;
434 uint8_t reason_len;
435 uint16_t protocol_major_version;
436 uint16_t protocol_minor_version;
437 uint16_t length;
438} xcb_setup_failed_t;
439
440/**
441 * @brief xcb_setup_failed_iterator_t
442 **/
443typedef struct xcb_setup_failed_iterator_t {
444 xcb_setup_failed_t *data;
445 int rem;
446 int index;
447} xcb_setup_failed_iterator_t;
448
449/**
450 * @brief xcb_setup_authenticate_t
451 **/
452typedef struct xcb_setup_authenticate_t {
453 uint8_t status;
454 uint8_t pad0[5];
455 uint16_t length;
456} xcb_setup_authenticate_t;
457
458/**
459 * @brief xcb_setup_authenticate_iterator_t
460 **/
461typedef struct xcb_setup_authenticate_iterator_t {
462 xcb_setup_authenticate_t *data;
463 int rem;
464 int index;
465} xcb_setup_authenticate_iterator_t;
466
467typedef enum xcb_image_order_t {
468 XCB_IMAGE_ORDER_LSB_FIRST = 0,
469 XCB_IMAGE_ORDER_MSB_FIRST = 1
470} xcb_image_order_t;
471
472/**
473 * @brief xcb_setup_t
474 **/
475typedef struct xcb_setup_t {
476 uint8_t status;
477 uint8_t pad0;
478 uint16_t protocol_major_version;
479 uint16_t protocol_minor_version;
480 uint16_t length;
481 uint32_t release_number;
482 uint32_t resource_id_base;
483 uint32_t resource_id_mask;
484 uint32_t motion_buffer_size;
485 uint16_t vendor_len;
486 uint16_t maximum_request_length;
487 uint8_t roots_len;
488 uint8_t pixmap_formats_len;
489 uint8_t image_byte_order;
490 uint8_t bitmap_format_bit_order;
491 uint8_t bitmap_format_scanline_unit;
492 uint8_t bitmap_format_scanline_pad;
493 xcb_keycode_t min_keycode;
494 xcb_keycode_t max_keycode;
495 uint8_t pad1[4];
496} xcb_setup_t;
497
498/**
499 * @brief xcb_setup_iterator_t
500 **/
501typedef struct xcb_setup_iterator_t {
502 xcb_setup_t *data;
503 int rem;
504 int index;
505} xcb_setup_iterator_t;
506
507typedef enum xcb_mod_mask_t {
508 XCB_MOD_MASK_SHIFT = 1,
509 XCB_MOD_MASK_LOCK = 2,
510 XCB_MOD_MASK_CONTROL = 4,
511 XCB_MOD_MASK_1 = 8,
512 XCB_MOD_MASK_2 = 16,
513 XCB_MOD_MASK_3 = 32,
514 XCB_MOD_MASK_4 = 64,
515 XCB_MOD_MASK_5 = 128,
516 XCB_MOD_MASK_ANY = 32768
517} xcb_mod_mask_t;
518
519typedef enum xcb_key_but_mask_t {
520 XCB_KEY_BUT_MASK_SHIFT = 1,
521 XCB_KEY_BUT_MASK_LOCK = 2,
522 XCB_KEY_BUT_MASK_CONTROL = 4,
523 XCB_KEY_BUT_MASK_MOD_1 = 8,
524 XCB_KEY_BUT_MASK_MOD_2 = 16,
525 XCB_KEY_BUT_MASK_MOD_3 = 32,
526 XCB_KEY_BUT_MASK_MOD_4 = 64,
527 XCB_KEY_BUT_MASK_MOD_5 = 128,
528 XCB_KEY_BUT_MASK_BUTTON_1 = 256,
529 XCB_KEY_BUT_MASK_BUTTON_2 = 512,
530 XCB_KEY_BUT_MASK_BUTTON_3 = 1024,
531 XCB_KEY_BUT_MASK_BUTTON_4 = 2048,
532 XCB_KEY_BUT_MASK_BUTTON_5 = 4096
533} xcb_key_but_mask_t;
534
535typedef enum xcb_window_enum_t {
536 XCB_WINDOW_NONE = 0
537} xcb_window_enum_t;
538
539/** Opcode for xcb_key_press. */
540#define XCB_KEY_PRESS 2
541
542/**
543 * @brief xcb_key_press_event_t
544 **/
545typedef struct xcb_key_press_event_t {
546 uint8_t response_type;
547 xcb_keycode_t detail;
548 uint16_t sequence;
549 xcb_timestamp_t time;
550 xcb_window_t root;
551 xcb_window_t event;
552 xcb_window_t child;
553 int16_t root_x;
554 int16_t root_y;
555 int16_t event_x;
556 int16_t event_y;
557 uint16_t state;
558 uint8_t same_screen;
559 uint8_t pad0;
560} xcb_key_press_event_t;
561
562/** Opcode for xcb_key_release. */
563#define XCB_KEY_RELEASE 3
564
565typedef xcb_key_press_event_t xcb_key_release_event_t;
566
567typedef enum xcb_button_mask_t {
568 XCB_BUTTON_MASK_1 = 256,
569 XCB_BUTTON_MASK_2 = 512,
570 XCB_BUTTON_MASK_3 = 1024,
571 XCB_BUTTON_MASK_4 = 2048,
572 XCB_BUTTON_MASK_5 = 4096,
573 XCB_BUTTON_MASK_ANY = 32768
574} xcb_button_mask_t;
575
576/** Opcode for xcb_button_press. */
577#define XCB_BUTTON_PRESS 4
578
579/**
580 * @brief xcb_button_press_event_t
581 **/
582typedef struct xcb_button_press_event_t {
583 uint8_t response_type;
584 xcb_button_t detail;
585 uint16_t sequence;
586 xcb_timestamp_t time;
587 xcb_window_t root;
588 xcb_window_t event;
589 xcb_window_t child;
590 int16_t root_x;
591 int16_t root_y;
592 int16_t event_x;
593 int16_t event_y;
594 uint16_t state;
595 uint8_t same_screen;
596 uint8_t pad0;
597} xcb_button_press_event_t;
598
599/** Opcode for xcb_button_release. */
600#define XCB_BUTTON_RELEASE 5
601
602typedef xcb_button_press_event_t xcb_button_release_event_t;
603
604typedef enum xcb_motion_t {
605 XCB_MOTION_NORMAL = 0,
606 XCB_MOTION_HINT = 1
607} xcb_motion_t;
608
609/** Opcode for xcb_motion_notify. */
610#define XCB_MOTION_NOTIFY 6
611
612/**
613 * @brief xcb_motion_notify_event_t
614 **/
615typedef struct xcb_motion_notify_event_t {
616 uint8_t response_type;
617 uint8_t detail;
618 uint16_t sequence;
619 xcb_timestamp_t time;
620 xcb_window_t root;
621 xcb_window_t event;
622 xcb_window_t child;
623 int16_t root_x;
624 int16_t root_y;
625 int16_t event_x;
626 int16_t event_y;
627 uint16_t state;
628 uint8_t same_screen;
629 uint8_t pad0;
630} xcb_motion_notify_event_t;
631
632typedef enum xcb_notify_detail_t {
633 XCB_NOTIFY_DETAIL_ANCESTOR = 0,
634 XCB_NOTIFY_DETAIL_VIRTUAL = 1,
635 XCB_NOTIFY_DETAIL_INFERIOR = 2,
636 XCB_NOTIFY_DETAIL_NONLINEAR = 3,
637 XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL = 4,
638 XCB_NOTIFY_DETAIL_POINTER = 5,
639 XCB_NOTIFY_DETAIL_POINTER_ROOT = 6,
640 XCB_NOTIFY_DETAIL_NONE = 7
641} xcb_notify_detail_t;
642
643typedef enum xcb_notify_mode_t {
644 XCB_NOTIFY_MODE_NORMAL = 0,
645 XCB_NOTIFY_MODE_GRAB = 1,
646 XCB_NOTIFY_MODE_UNGRAB = 2,
647 XCB_NOTIFY_MODE_WHILE_GRABBED = 3
648} xcb_notify_mode_t;
649
650/** Opcode for xcb_enter_notify. */
651#define XCB_ENTER_NOTIFY 7
652
653/**
654 * @brief xcb_enter_notify_event_t
655 **/
656typedef struct xcb_enter_notify_event_t {
657 uint8_t response_type;
658 uint8_t detail;
659 uint16_t sequence;
660 xcb_timestamp_t time;
661 xcb_window_t root;
662 xcb_window_t event;
663 xcb_window_t child;
664 int16_t root_x;
665 int16_t root_y;
666 int16_t event_x;
667 int16_t event_y;
668 uint16_t state;
669 uint8_t mode;
670 uint8_t same_screen_focus;
671} xcb_enter_notify_event_t;
672
673/** Opcode for xcb_leave_notify. */
674#define XCB_LEAVE_NOTIFY 8
675
676typedef xcb_enter_notify_event_t xcb_leave_notify_event_t;
677
678/** Opcode for xcb_focus_in. */
679#define XCB_FOCUS_IN 9
680
681/**
682 * @brief xcb_focus_in_event_t
683 **/
684typedef struct xcb_focus_in_event_t {
685 uint8_t response_type;
686 uint8_t detail;
687 uint16_t sequence;
688 xcb_window_t event;
689 uint8_t mode;
690 uint8_t pad0[3];
691} xcb_focus_in_event_t;
692
693/** Opcode for xcb_focus_out. */
694#define XCB_FOCUS_OUT 10
695
696typedef xcb_focus_in_event_t xcb_focus_out_event_t;
697
698/** Opcode for xcb_keymap_notify. */
699#define XCB_KEYMAP_NOTIFY 11
700
701/**
702 * @brief xcb_keymap_notify_event_t
703 **/
704typedef struct xcb_keymap_notify_event_t {
705 uint8_t response_type;
706 uint8_t keys[31];
707} xcb_keymap_notify_event_t;
708
709/** Opcode for xcb_expose. */
710#define XCB_EXPOSE 12
711
712/**
713 * @brief xcb_expose_event_t
714 **/
715typedef struct xcb_expose_event_t {
716 uint8_t response_type;
717 uint8_t pad0;
718 uint16_t sequence;
719 xcb_window_t window;
720 uint16_t x;
721 uint16_t y;
722 uint16_t width;
723 uint16_t height;
724 uint16_t count;
725 uint8_t pad1[2];
726} xcb_expose_event_t;
727
728/** Opcode for xcb_graphics_exposure. */
729#define XCB_GRAPHICS_EXPOSURE 13
730
731/**
732 * @brief xcb_graphics_exposure_event_t
733 **/
734typedef struct xcb_graphics_exposure_event_t {
735 uint8_t response_type;
736 uint8_t pad0;
737 uint16_t sequence;
738 xcb_drawable_t drawable;
739 uint16_t x;
740 uint16_t y;
741 uint16_t width;
742 uint16_t height;
743 uint16_t minor_opcode;
744 uint16_t count;
745 uint8_t major_opcode;
746 uint8_t pad1[3];
747} xcb_graphics_exposure_event_t;
748
749/** Opcode for xcb_no_exposure. */
750#define XCB_NO_EXPOSURE 14
751
752/**
753 * @brief xcb_no_exposure_event_t
754 **/
755typedef struct xcb_no_exposure_event_t {
756 uint8_t response_type;
757 uint8_t pad0;
758 uint16_t sequence;
759 xcb_drawable_t drawable;
760 uint16_t minor_opcode;
761 uint8_t major_opcode;
762 uint8_t pad1;
763} xcb_no_exposure_event_t;
764
765typedef enum xcb_visibility_t {
766 XCB_VISIBILITY_UNOBSCURED = 0,
767 XCB_VISIBILITY_PARTIALLY_OBSCURED = 1,
768 XCB_VISIBILITY_FULLY_OBSCURED = 2
769} xcb_visibility_t;
770
771/** Opcode for xcb_visibility_notify. */
772#define XCB_VISIBILITY_NOTIFY 15
773
774/**
775 * @brief xcb_visibility_notify_event_t
776 **/
777typedef struct xcb_visibility_notify_event_t {
778 uint8_t response_type;
779 uint8_t pad0;
780 uint16_t sequence;
781 xcb_window_t window;
782 uint8_t state;
783 uint8_t pad1[3];
784} xcb_visibility_notify_event_t;
785
786/** Opcode for xcb_create_notify. */
787#define XCB_CREATE_NOTIFY 16
788
789/**
790 * @brief xcb_create_notify_event_t
791 **/
792typedef struct xcb_create_notify_event_t {
793 uint8_t response_type;
794 uint8_t pad0;
795 uint16_t sequence;
796 xcb_window_t parent;
797 xcb_window_t window;
798 int16_t x;
799 int16_t y;
800 uint16_t width;
801 uint16_t height;
802 uint16_t border_width;
803 uint8_t override_redirect;
804 uint8_t pad1;
805} xcb_create_notify_event_t;
806
807/** Opcode for xcb_destroy_notify. */
808#define XCB_DESTROY_NOTIFY 17
809
810/**
811 * @brief xcb_destroy_notify_event_t
812 **/
813typedef struct xcb_destroy_notify_event_t {
814 uint8_t response_type;
815 uint8_t pad0;
816 uint16_t sequence;
817 xcb_window_t event;
818 xcb_window_t window;
819} xcb_destroy_notify_event_t;
820
821/** Opcode for xcb_unmap_notify. */
822#define XCB_UNMAP_NOTIFY 18
823
824/**
825 * @brief xcb_unmap_notify_event_t
826 **/
827typedef struct xcb_unmap_notify_event_t {
828 uint8_t response_type;
829 uint8_t pad0;
830 uint16_t sequence;
831 xcb_window_t event;
832 xcb_window_t window;
833 uint8_t from_configure;
834 uint8_t pad1[3];
835} xcb_unmap_notify_event_t;
836
837/** Opcode for xcb_map_notify. */
838#define XCB_MAP_NOTIFY 19
839
840/**
841 * @brief xcb_map_notify_event_t
842 **/
843typedef struct xcb_map_notify_event_t {
844 uint8_t response_type;
845 uint8_t pad0;
846 uint16_t sequence;
847 xcb_window_t event;
848 xcb_window_t window;
849 uint8_t override_redirect;
850 uint8_t pad1[3];
851} xcb_map_notify_event_t;
852
853/** Opcode for xcb_map_request. */
854#define XCB_MAP_REQUEST 20
855
856/**
857 * @brief xcb_map_request_event_t
858 **/
859typedef struct xcb_map_request_event_t {
860 uint8_t response_type;
861 uint8_t pad0;
862 uint16_t sequence;
863 xcb_window_t parent;
864 xcb_window_t window;
865} xcb_map_request_event_t;
866
867/** Opcode for xcb_reparent_notify. */
868#define XCB_REPARENT_NOTIFY 21
869
870/**
871 * @brief xcb_reparent_notify_event_t
872 **/
873typedef struct xcb_reparent_notify_event_t {
874 uint8_t response_type;
875 uint8_t pad0;
876 uint16_t sequence;
877 xcb_window_t event;
878 xcb_window_t window;
879 xcb_window_t parent;
880 int16_t x;
881 int16_t y;
882 uint8_t override_redirect;
883 uint8_t pad1[3];
884} xcb_reparent_notify_event_t;
885
886/** Opcode for xcb_configure_notify. */
887#define XCB_CONFIGURE_NOTIFY 22
888
889/**
890 * @brief xcb_configure_notify_event_t
891 **/
892typedef struct xcb_configure_notify_event_t {
893 uint8_t response_type;
894 uint8_t pad0;
895 uint16_t sequence;
896 xcb_window_t event;
897 xcb_window_t window;
898 xcb_window_t above_sibling;
899 int16_t x;
900 int16_t y;
901 uint16_t width;
902 uint16_t height;
903 uint16_t border_width;
904 uint8_t override_redirect;
905 uint8_t pad1;
906} xcb_configure_notify_event_t;
907
908/** Opcode for xcb_configure_request. */
909#define XCB_CONFIGURE_REQUEST 23
910
911/**
912 * @brief xcb_configure_request_event_t
913 **/
914typedef struct xcb_configure_request_event_t {
915 uint8_t response_type;
916 uint8_t stack_mode;
917 uint16_t sequence;
918 xcb_window_t parent;
919 xcb_window_t window;
920 xcb_window_t sibling;
921 int16_t x;
922 int16_t y;
923 uint16_t width;
924 uint16_t height;
925 uint16_t border_width;
926 uint16_t value_mask;
927} xcb_configure_request_event_t;
928
929/** Opcode for xcb_gravity_notify. */
930#define XCB_GRAVITY_NOTIFY 24
931
932/**
933 * @brief xcb_gravity_notify_event_t
934 **/
935typedef struct xcb_gravity_notify_event_t {
936 uint8_t response_type;
937 uint8_t pad0;
938 uint16_t sequence;
939 xcb_window_t event;
940 xcb_window_t window;
941 int16_t x;
942 int16_t y;
943} xcb_gravity_notify_event_t;
944
945/** Opcode for xcb_resize_request. */
946#define XCB_RESIZE_REQUEST 25
947
948/**
949 * @brief xcb_resize_request_event_t
950 **/
951typedef struct xcb_resize_request_event_t {
952 uint8_t response_type;
953 uint8_t pad0;
954 uint16_t sequence;
955 xcb_window_t window;
956 uint16_t width;
957 uint16_t height;
958} xcb_resize_request_event_t;
959
960typedef enum xcb_place_t {
961 XCB_PLACE_ON_TOP = 0,
962/**< The window is now on top of all siblings. */
963
964 XCB_PLACE_ON_BOTTOM = 1
965/**< The window is now below all siblings. */
966
967} xcb_place_t;
968
969/** Opcode for xcb_circulate_notify. */
970#define XCB_CIRCULATE_NOTIFY 26
971
972/**
973 * @brief xcb_circulate_notify_event_t
974 **/
975typedef struct xcb_circulate_notify_event_t {
976 uint8_t response_type;
977 uint8_t pad0;
978 uint16_t sequence;
979 xcb_window_t event;
980 xcb_window_t window;
981 uint8_t pad1[4];
982 uint8_t place;
983 uint8_t pad2[3];
984} xcb_circulate_notify_event_t;
985
986/** Opcode for xcb_circulate_request. */
987#define XCB_CIRCULATE_REQUEST 27
988
989typedef xcb_circulate_notify_event_t xcb_circulate_request_event_t;
990
991typedef enum xcb_property_t {
992 XCB_PROPERTY_NEW_VALUE = 0,
993 XCB_PROPERTY_DELETE = 1
994} xcb_property_t;
995
996/** Opcode for xcb_property_notify. */
997#define XCB_PROPERTY_NOTIFY 28
998
999/**
1000 * @brief xcb_property_notify_event_t
1001 **/
1002typedef struct xcb_property_notify_event_t {
1003 uint8_t response_type;
1004 uint8_t pad0;
1005 uint16_t sequence;
1006 xcb_window_t window;
1007 xcb_atom_t atom;
1008 xcb_timestamp_t time;
1009 uint8_t state;
1010 uint8_t pad1[3];
1011} xcb_property_notify_event_t;
1012
1013/** Opcode for xcb_selection_clear. */
1014#define XCB_SELECTION_CLEAR 29
1015
1016/**
1017 * @brief xcb_selection_clear_event_t
1018 **/
1019typedef struct xcb_selection_clear_event_t {
1020 uint8_t response_type;
1021 uint8_t pad0;
1022 uint16_t sequence;
1023 xcb_timestamp_t time;
1024 xcb_window_t owner;
1025 xcb_atom_t selection;
1026} xcb_selection_clear_event_t;
1027
1028typedef enum xcb_time_t {
1029 XCB_TIME_CURRENT_TIME = 0
1030} xcb_time_t;
1031
1032typedef enum xcb_atom_enum_t {
1033 XCB_ATOM_NONE = 0,
1034 XCB_ATOM_ANY = 0,
1035 XCB_ATOM_PRIMARY = 1,
1036 XCB_ATOM_SECONDARY = 2,
1037 XCB_ATOM_ARC = 3,
1038 XCB_ATOM_ATOM = 4,
1039 XCB_ATOM_BITMAP = 5,
1040 XCB_ATOM_CARDINAL = 6,
1041 XCB_ATOM_COLORMAP = 7,
1042 XCB_ATOM_CURSOR = 8,
1043 XCB_ATOM_CUT_BUFFER0 = 9,
1044 XCB_ATOM_CUT_BUFFER1 = 10,
1045 XCB_ATOM_CUT_BUFFER2 = 11,
1046 XCB_ATOM_CUT_BUFFER3 = 12,
1047 XCB_ATOM_CUT_BUFFER4 = 13,
1048 XCB_ATOM_CUT_BUFFER5 = 14,
1049 XCB_ATOM_CUT_BUFFER6 = 15,
1050 XCB_ATOM_CUT_BUFFER7 = 16,
1051 XCB_ATOM_DRAWABLE = 17,
1052 XCB_ATOM_FONT = 18,
1053 XCB_ATOM_INTEGER = 19,
1054 XCB_ATOM_PIXMAP = 20,
1055 XCB_ATOM_POINT = 21,
1056 XCB_ATOM_RECTANGLE = 22,
1057 XCB_ATOM_RESOURCE_MANAGER = 23,
1058 XCB_ATOM_RGB_COLOR_MAP = 24,
1059 XCB_ATOM_RGB_BEST_MAP = 25,
1060 XCB_ATOM_RGB_BLUE_MAP = 26,
1061 XCB_ATOM_RGB_DEFAULT_MAP = 27,
1062 XCB_ATOM_RGB_GRAY_MAP = 28,
1063 XCB_ATOM_RGB_GREEN_MAP = 29,
1064 XCB_ATOM_RGB_RED_MAP = 30,
1065 XCB_ATOM_STRING = 31,
1066 XCB_ATOM_VISUALID = 32,
1067 XCB_ATOM_WINDOW = 33,
1068 XCB_ATOM_WM_COMMAND = 34,
1069 XCB_ATOM_WM_HINTS = 35,
1070 XCB_ATOM_WM_CLIENT_MACHINE = 36,
1071 XCB_ATOM_WM_ICON_NAME = 37,
1072 XCB_ATOM_WM_ICON_SIZE = 38,
1073 XCB_ATOM_WM_NAME = 39,
1074 XCB_ATOM_WM_NORMAL_HINTS = 40,
1075 XCB_ATOM_WM_SIZE_HINTS = 41,
1076 XCB_ATOM_WM_ZOOM_HINTS = 42,
1077 XCB_ATOM_MIN_SPACE = 43,
1078 XCB_ATOM_NORM_SPACE = 44,
1079 XCB_ATOM_MAX_SPACE = 45,
1080 XCB_ATOM_END_SPACE = 46,
1081 XCB_ATOM_SUPERSCRIPT_X = 47,
1082 XCB_ATOM_SUPERSCRIPT_Y = 48,
1083 XCB_ATOM_SUBSCRIPT_X = 49,
1084 XCB_ATOM_SUBSCRIPT_Y = 50,
1085 XCB_ATOM_UNDERLINE_POSITION = 51,
1086 XCB_ATOM_UNDERLINE_THICKNESS = 52,
1087 XCB_ATOM_STRIKEOUT_ASCENT = 53,
1088 XCB_ATOM_STRIKEOUT_DESCENT = 54,
1089 XCB_ATOM_ITALIC_ANGLE = 55,
1090 XCB_ATOM_X_HEIGHT = 56,
1091 XCB_ATOM_QUAD_WIDTH = 57,
1092 XCB_ATOM_WEIGHT = 58,
1093 XCB_ATOM_POINT_SIZE = 59,
1094 XCB_ATOM_RESOLUTION = 60,
1095 XCB_ATOM_COPYRIGHT = 61,
1096 XCB_ATOM_NOTICE = 62,
1097 XCB_ATOM_FONT_NAME = 63,
1098 XCB_ATOM_FAMILY_NAME = 64,
1099 XCB_ATOM_FULL_NAME = 65,
1100 XCB_ATOM_CAP_HEIGHT = 66,
1101 XCB_ATOM_WM_CLASS = 67,
1102 XCB_ATOM_WM_TRANSIENT_FOR = 68
1103} xcb_atom_enum_t;
1104
1105/** Opcode for xcb_selection_request. */
1106#define XCB_SELECTION_REQUEST 30
1107
1108/**
1109 * @brief xcb_selection_request_event_t
1110 **/
1111typedef struct xcb_selection_request_event_t {
1112 uint8_t response_type;
1113 uint8_t pad0;
1114 uint16_t sequence;
1115 xcb_timestamp_t time;
1116 xcb_window_t owner;
1117 xcb_window_t requestor;
1118 xcb_atom_t selection;
1119 xcb_atom_t target;
1120 xcb_atom_t property;
1121} xcb_selection_request_event_t;
1122
1123/** Opcode for xcb_selection_notify. */
1124#define XCB_SELECTION_NOTIFY 31
1125
1126/**
1127 * @brief xcb_selection_notify_event_t
1128 **/
1129typedef struct xcb_selection_notify_event_t {
1130 uint8_t response_type;
1131 uint8_t pad0;
1132 uint16_t sequence;
1133 xcb_timestamp_t time;
1134 xcb_window_t requestor;
1135 xcb_atom_t selection;
1136 xcb_atom_t target;
1137 xcb_atom_t property;
1138} xcb_selection_notify_event_t;
1139
1140typedef enum xcb_colormap_state_t {
1141 XCB_COLORMAP_STATE_UNINSTALLED = 0,
1142/**< The colormap was uninstalled. */
1143
1144 XCB_COLORMAP_STATE_INSTALLED = 1
1145/**< The colormap was installed. */
1146
1147} xcb_colormap_state_t;
1148
1149typedef enum xcb_colormap_enum_t {
1150 XCB_COLORMAP_NONE = 0
1151} xcb_colormap_enum_t;
1152
1153/** Opcode for xcb_colormap_notify. */
1154#define XCB_COLORMAP_NOTIFY 32
1155
1156/**
1157 * @brief xcb_colormap_notify_event_t
1158 **/
1159typedef struct xcb_colormap_notify_event_t {
1160 uint8_t response_type;
1161 uint8_t pad0;
1162 uint16_t sequence;
1163 xcb_window_t window;
1164 xcb_colormap_t colormap;
1165 uint8_t _new;
1166 uint8_t state;
1167 uint8_t pad1[2];
1168} xcb_colormap_notify_event_t;
1169
1170/**
1171 * @brief xcb_client_message_data_t
1172 **/
1173typedef union xcb_client_message_data_t {
1174 uint8_t data8[20];
1175 uint16_t data16[10];
1176 uint32_t data32[5];
1177} xcb_client_message_data_t;
1178
1179/**
1180 * @brief xcb_client_message_data_iterator_t
1181 **/
1182typedef struct xcb_client_message_data_iterator_t {
1183 xcb_client_message_data_t *data;
1184 int rem;
1185 int index;
1186} xcb_client_message_data_iterator_t;
1187
1188/** Opcode for xcb_client_message. */
1189#define XCB_CLIENT_MESSAGE 33
1190
1191/**
1192 * @brief xcb_client_message_event_t
1193 **/
1194typedef struct xcb_client_message_event_t {
1195 uint8_t response_type;
1196 uint8_t format;
1197 uint16_t sequence;
1198 xcb_window_t window;
1199 xcb_atom_t type;
1200 xcb_client_message_data_t data;
1201} xcb_client_message_event_t;
1202
1203typedef enum xcb_mapping_t {
1204 XCB_MAPPING_MODIFIER = 0,
1205 XCB_MAPPING_KEYBOARD = 1,
1206 XCB_MAPPING_POINTER = 2
1207} xcb_mapping_t;
1208
1209/** Opcode for xcb_mapping_notify. */
1210#define XCB_MAPPING_NOTIFY 34
1211
1212/**
1213 * @brief xcb_mapping_notify_event_t
1214 **/
1215typedef struct xcb_mapping_notify_event_t {
1216 uint8_t response_type;
1217 uint8_t pad0;
1218 uint16_t sequence;
1219 uint8_t request;
1220 xcb_keycode_t first_keycode;
1221 uint8_t count;
1222 uint8_t pad1;
1223} xcb_mapping_notify_event_t;
1224
1225/** Opcode for xcb_ge_generic. */
1226#define XCB_GE_GENERIC 35
1227
1228/**
1229 * @brief xcb_ge_generic_event_t
1230 **/
1231typedef struct xcb_ge_generic_event_t {
1232 uint8_t response_type;
1233 uint8_t extension;
1234 uint16_t sequence;
1235 uint32_t length;
1236 uint16_t event_type;
1237 uint8_t pad0[22];
1238 uint32_t full_sequence;
1239} xcb_ge_generic_event_t;
1240
1241/** Opcode for xcb_request. */
1242#define XCB_REQUEST 1
1243
1244/**
1245 * @brief xcb_request_error_t
1246 **/
1247typedef struct xcb_request_error_t {
1248 uint8_t response_type;
1249 uint8_t error_code;
1250 uint16_t sequence;
1251 uint32_t bad_value;
1252 uint16_t minor_opcode;
1253 uint8_t major_opcode;
1254 uint8_t pad0;
1255} xcb_request_error_t;
1256
1257/** Opcode for xcb_value. */
1258#define XCB_VALUE 2
1259
1260/**
1261 * @brief xcb_value_error_t
1262 **/
1263typedef struct xcb_value_error_t {
1264 uint8_t response_type;
1265 uint8_t error_code;
1266 uint16_t sequence;
1267 uint32_t bad_value;
1268 uint16_t minor_opcode;
1269 uint8_t major_opcode;
1270 uint8_t pad0;
1271} xcb_value_error_t;
1272
1273/** Opcode for xcb_window. */
1274#define XCB_WINDOW 3
1275
1276typedef xcb_value_error_t xcb_window_error_t;
1277
1278/** Opcode for xcb_pixmap. */
1279#define XCB_PIXMAP 4
1280
1281typedef xcb_value_error_t xcb_pixmap_error_t;
1282
1283/** Opcode for xcb_atom. */
1284#define XCB_ATOM 5
1285
1286typedef xcb_value_error_t xcb_atom_error_t;
1287
1288/** Opcode for xcb_cursor. */
1289#define XCB_CURSOR 6
1290
1291typedef xcb_value_error_t xcb_cursor_error_t;
1292
1293/** Opcode for xcb_font. */
1294#define XCB_FONT 7
1295
1296typedef xcb_value_error_t xcb_font_error_t;
1297
1298/** Opcode for xcb_match. */
1299#define XCB_MATCH 8
1300
1301typedef xcb_request_error_t xcb_match_error_t;
1302
1303/** Opcode for xcb_drawable. */
1304#define XCB_DRAWABLE 9
1305
1306typedef xcb_value_error_t xcb_drawable_error_t;
1307
1308/** Opcode for xcb_access. */
1309#define XCB_ACCESS 10
1310
1311typedef xcb_request_error_t xcb_access_error_t;
1312
1313/** Opcode for xcb_alloc. */
1314#define XCB_ALLOC 11
1315
1316typedef xcb_request_error_t xcb_alloc_error_t;
1317
1318/** Opcode for xcb_colormap. */
1319#define XCB_COLORMAP 12
1320
1321typedef xcb_value_error_t xcb_colormap_error_t;
1322
1323/** Opcode for xcb_g_context. */
1324#define XCB_G_CONTEXT 13
1325
1326typedef xcb_value_error_t xcb_g_context_error_t;
1327
1328/** Opcode for xcb_id_choice. */
1329#define XCB_ID_CHOICE 14
1330
1331typedef xcb_value_error_t xcb_id_choice_error_t;
1332
1333/** Opcode for xcb_name. */
1334#define XCB_NAME 15
1335
1336typedef xcb_request_error_t xcb_name_error_t;
1337
1338/** Opcode for xcb_length. */
1339#define XCB_LENGTH 16
1340
1341typedef xcb_request_error_t xcb_length_error_t;
1342
1343/** Opcode for xcb_implementation. */
1344#define XCB_IMPLEMENTATION 17
1345
1346typedef xcb_request_error_t xcb_implementation_error_t;
1347
1348typedef enum xcb_window_class_t {
1349 XCB_WINDOW_CLASS_COPY_FROM_PARENT = 0,
1350 XCB_WINDOW_CLASS_INPUT_OUTPUT = 1,
1351 XCB_WINDOW_CLASS_INPUT_ONLY = 2
1352} xcb_window_class_t;
1353
1354typedef enum xcb_cw_t {
1355 XCB_CW_BACK_PIXMAP = 1,
1356/**< Overrides the default background-pixmap. The background pixmap and window must
1357have the same root and same depth. Any size pixmap can be used, although some
1358sizes may be faster than others.
1359
1360If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background.
1361The server may fill the contents with the previous screen contents or with
1362contents of its own choosing.
1363
1364If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is
1365used, but the window must have the same depth as the parent (or a Match error
1366results). The parent's background is tracked, and the current version is
1367used each time the window background is required. */
1368
1369 XCB_CW_BACK_PIXEL = 2,
1370/**< Overrides `BackPixmap`. A pixmap of undefined size filled with the specified
1371background pixel is used for the background. Range-checking is not performed,
1372the background pixel is truncated to the appropriate number of bits. */
1373
1374 XCB_CW_BORDER_PIXMAP = 4,
1375/**< Overrides the default border-pixmap. The border pixmap and window must have the
1376same root and the same depth. Any size pixmap can be used, although some sizes
1377may be faster than others.
1378
1379The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is
1380copied (subsequent changes to the parent's border attribute do not affect the
1381child), but the window must have the same depth as the parent. */
1382
1383 XCB_CW_BORDER_PIXEL = 8,
1384/**< Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified
1385border pixel is used for the border. Range checking is not performed on the
1386border-pixel value, it is truncated to the appropriate number of bits. */
1387
1388 XCB_CW_BIT_GRAVITY = 16,
1389/**< Defines which region of the window should be retained if the window is resized. */
1390
1391 XCB_CW_WIN_GRAVITY = 32,
1392/**< Defines how the window should be repositioned if the parent is resized (see
1393`ConfigureWindow`). */
1394
1395 XCB_CW_BACKING_STORE = 64,
1396/**< A backing-store of `WhenMapped` advises the server that maintaining contents of
1397obscured regions when the window is mapped would be beneficial. A backing-store
1398of `Always` advises the server that maintaining contents even when the window
1399is unmapped would be beneficial. In this case, the server may generate an
1400exposure event when the window is created. A value of `NotUseful` advises the
1401server that maintaining contents is unnecessary, although a server may still
1402choose to maintain contents while the window is mapped. Note that if the server
1403maintains contents, then the server should maintain complete contents not just
1404the region within the parent boundaries, even if the window is larger than its
1405parent. While the server maintains contents, exposure events will not normally
1406be generated, but the server may stop maintaining contents at any time. */
1407
1408 XCB_CW_BACKING_PLANES = 128,
1409/**< The backing-planes indicates (with bits set to 1) which bit planes of the
1410window hold dynamic data that must be preserved in backing-stores and during
1411save-unders. */
1412
1413 XCB_CW_BACKING_PIXEL = 256,
1414/**< The backing-pixel specifies what value to use in planes not covered by
1415backing-planes. The server is free to save only the specified bit planes in the
1416backing-store or save-under and regenerate the remaining planes with the
1417specified pixel value. Any bits beyond the specified depth of the window in
1418these values are simply ignored. */
1419
1420 XCB_CW_OVERRIDE_REDIRECT = 512,
1421/**< The override-redirect specifies whether map and configure requests on this
1422window should override a SubstructureRedirect on the parent, typically to
1423inform a window manager not to tamper with the window. */
1424
1425 XCB_CW_SAVE_UNDER = 1024,
1426/**< If 1, the server is advised that when this window is mapped, saving the
1427contents of windows it obscures would be beneficial. */
1428
1429 XCB_CW_EVENT_MASK = 2048,
1430/**< The event-mask defines which events the client is interested in for this window
1431(or for some event types, inferiors of the window). */
1432
1433 XCB_CW_DONT_PROPAGATE = 4096,
1434/**< The do-not-propagate-mask defines which events should not be propagated to
1435ancestor windows when no client has the event type selected in this window. */
1436
1437 XCB_CW_COLORMAP = 8192,
1438/**< The colormap specifies the colormap that best reflects the true colors of the window. Servers
1439capable of supporting multiple hardware colormaps may use this information, and window man-
1440agers may use it for InstallColormap requests. The colormap must have the same visual type
1441and root as the window (or a Match error results). If CopyFromParent is specified, the parent's
1442colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child).
1443However, the window must have the same visual type as the parent (or a Match error results),
1444and the parent must not have a colormap of None (or a Match error results). For an explanation
1445of None, see FreeColormap request. The colormap is copied by sharing the colormap object
1446between the child and the parent, not by making a complete copy of the colormap contents. */
1447
1448 XCB_CW_CURSOR = 16384
1449/**< If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci-
1450fied, the parent's cursor will be used when the pointer is in the window, and any change in the
1451parent's cursor will cause an immediate change in the displayed cursor. */
1452
1453} xcb_cw_t;
1454
1455typedef enum xcb_back_pixmap_t {
1456 XCB_BACK_PIXMAP_NONE = 0,
1457 XCB_BACK_PIXMAP_PARENT_RELATIVE = 1
1458} xcb_back_pixmap_t;
1459
1460typedef enum xcb_gravity_t {
1461 XCB_GRAVITY_BIT_FORGET = 0,
1462 XCB_GRAVITY_WIN_UNMAP = 0,
1463 XCB_GRAVITY_NORTH_WEST = 1,
1464 XCB_GRAVITY_NORTH = 2,
1465 XCB_GRAVITY_NORTH_EAST = 3,
1466 XCB_GRAVITY_WEST = 4,
1467 XCB_GRAVITY_CENTER = 5,
1468 XCB_GRAVITY_EAST = 6,
1469 XCB_GRAVITY_SOUTH_WEST = 7,
1470 XCB_GRAVITY_SOUTH = 8,
1471 XCB_GRAVITY_SOUTH_EAST = 9,
1472 XCB_GRAVITY_STATIC = 10
1473} xcb_gravity_t;
1474
1475/**
1476 * @brief xcb_create_window_value_list_t
1477 **/
1478typedef struct xcb_create_window_value_list_t {
1479 xcb_pixmap_t background_pixmap;
1480 uint32_t background_pixel;
1481 xcb_pixmap_t border_pixmap;
1482 uint32_t border_pixel;
1483 uint32_t bit_gravity;
1484 uint32_t win_gravity;
1485 uint32_t backing_store;
1486 uint32_t backing_planes;
1487 uint32_t backing_pixel;
1488 xcb_bool32_t override_redirect;
1489 xcb_bool32_t save_under;
1490 uint32_t event_mask;
1491 uint32_t do_not_propogate_mask;
1492 xcb_colormap_t colormap;
1493 xcb_cursor_t cursor;
1494} xcb_create_window_value_list_t;
1495
1496/** Opcode for xcb_create_window. */
1497#define XCB_CREATE_WINDOW 1
1498
1499/**
1500 * @brief xcb_create_window_request_t
1501 **/
1502typedef struct xcb_create_window_request_t {
1503 uint8_t major_opcode;
1504 uint8_t depth;
1505 uint16_t length;
1506 xcb_window_t wid;
1507 xcb_window_t parent;
1508 int16_t x;
1509 int16_t y;
1510 uint16_t width;
1511 uint16_t height;
1512 uint16_t border_width;
1513 uint16_t _class;
1514 xcb_visualid_t visual;
1515 uint32_t value_mask;
1516} xcb_create_window_request_t;
1517
1518/**
1519 * @brief xcb_change_window_attributes_value_list_t
1520 **/
1521typedef struct xcb_change_window_attributes_value_list_t {
1522 xcb_pixmap_t background_pixmap;
1523 uint32_t background_pixel;
1524 xcb_pixmap_t border_pixmap;
1525 uint32_t border_pixel;
1526 uint32_t bit_gravity;
1527 uint32_t win_gravity;
1528 uint32_t backing_store;
1529 uint32_t backing_planes;
1530 uint32_t backing_pixel;
1531 xcb_bool32_t override_redirect;
1532 xcb_bool32_t save_under;
1533 uint32_t event_mask;
1534 uint32_t do_not_propogate_mask;
1535 xcb_colormap_t colormap;
1536 xcb_cursor_t cursor;
1537} xcb_change_window_attributes_value_list_t;
1538
1539/** Opcode for xcb_change_window_attributes. */
1540#define XCB_CHANGE_WINDOW_ATTRIBUTES 2
1541
1542/**
1543 * @brief xcb_change_window_attributes_request_t
1544 **/
1545typedef struct xcb_change_window_attributes_request_t {
1546 uint8_t major_opcode;
1547 uint8_t pad0;
1548 uint16_t length;
1549 xcb_window_t window;
1550 uint32_t value_mask;
1551} xcb_change_window_attributes_request_t;
1552
1553typedef enum xcb_map_state_t {
1554 XCB_MAP_STATE_UNMAPPED = 0,
1555 XCB_MAP_STATE_UNVIEWABLE = 1,
1556 XCB_MAP_STATE_VIEWABLE = 2
1557} xcb_map_state_t;
1558
1559/**
1560 * @brief xcb_get_window_attributes_cookie_t
1561 **/
1562typedef struct xcb_get_window_attributes_cookie_t {
1563 unsigned int sequence;
1564} xcb_get_window_attributes_cookie_t;
1565
1566/** Opcode for xcb_get_window_attributes. */
1567#define XCB_GET_WINDOW_ATTRIBUTES 3
1568
1569/**
1570 * @brief xcb_get_window_attributes_request_t
1571 **/
1572typedef struct xcb_get_window_attributes_request_t {
1573 uint8_t major_opcode;
1574 uint8_t pad0;
1575 uint16_t length;
1576 xcb_window_t window;
1577} xcb_get_window_attributes_request_t;
1578
1579/**
1580 * @brief xcb_get_window_attributes_reply_t
1581 **/
1582typedef struct xcb_get_window_attributes_reply_t {
1583 uint8_t response_type;
1584 uint8_t backing_store;
1585 uint16_t sequence;
1586 uint32_t length;
1587 xcb_visualid_t visual;
1588 uint16_t _class;
1589 uint8_t bit_gravity;
1590 uint8_t win_gravity;
1591 uint32_t backing_planes;
1592 uint32_t backing_pixel;
1593 uint8_t save_under;
1594 uint8_t map_is_installed;
1595 uint8_t map_state;
1596 uint8_t override_redirect;
1597 xcb_colormap_t colormap;
1598 uint32_t all_event_masks;
1599 uint32_t your_event_mask;
1600 uint16_t do_not_propagate_mask;
1601 uint8_t pad0[2];
1602} xcb_get_window_attributes_reply_t;
1603
1604/** Opcode for xcb_destroy_window. */
1605#define XCB_DESTROY_WINDOW 4
1606
1607/**
1608 * @brief xcb_destroy_window_request_t
1609 **/
1610typedef struct xcb_destroy_window_request_t {
1611 uint8_t major_opcode;
1612 uint8_t pad0;
1613 uint16_t length;
1614 xcb_window_t window;
1615} xcb_destroy_window_request_t;
1616
1617/** Opcode for xcb_destroy_subwindows. */
1618#define XCB_DESTROY_SUBWINDOWS 5
1619
1620/**
1621 * @brief xcb_destroy_subwindows_request_t
1622 **/
1623typedef struct xcb_destroy_subwindows_request_t {
1624 uint8_t major_opcode;
1625 uint8_t pad0;
1626 uint16_t length;
1627 xcb_window_t window;
1628} xcb_destroy_subwindows_request_t;
1629
1630typedef enum xcb_set_mode_t {
1631 XCB_SET_MODE_INSERT = 0,
1632 XCB_SET_MODE_DELETE = 1
1633} xcb_set_mode_t;
1634
1635/** Opcode for xcb_change_save_set. */
1636#define XCB_CHANGE_SAVE_SET 6
1637
1638/**
1639 * @brief xcb_change_save_set_request_t
1640 **/
1641typedef struct xcb_change_save_set_request_t {
1642 uint8_t major_opcode;
1643 uint8_t mode;
1644 uint16_t length;
1645 xcb_window_t window;
1646} xcb_change_save_set_request_t;
1647
1648/** Opcode for xcb_reparent_window. */
1649#define XCB_REPARENT_WINDOW 7
1650
1651/**
1652 * @brief xcb_reparent_window_request_t
1653 **/
1654typedef struct xcb_reparent_window_request_t {
1655 uint8_t major_opcode;
1656 uint8_t pad0;
1657 uint16_t length;
1658 xcb_window_t window;
1659 xcb_window_t parent;
1660 int16_t x;
1661 int16_t y;
1662} xcb_reparent_window_request_t;
1663
1664/** Opcode for xcb_map_window. */
1665#define XCB_MAP_WINDOW 8
1666
1667/**
1668 * @brief xcb_map_window_request_t
1669 **/
1670typedef struct xcb_map_window_request_t {
1671 uint8_t major_opcode;
1672 uint8_t pad0;
1673 uint16_t length;
1674 xcb_window_t window;
1675} xcb_map_window_request_t;
1676
1677/** Opcode for xcb_map_subwindows. */
1678#define XCB_MAP_SUBWINDOWS 9
1679
1680/**
1681 * @brief xcb_map_subwindows_request_t
1682 **/
1683typedef struct xcb_map_subwindows_request_t {
1684 uint8_t major_opcode;
1685 uint8_t pad0;
1686 uint16_t length;
1687 xcb_window_t window;
1688} xcb_map_subwindows_request_t;
1689
1690/** Opcode for xcb_unmap_window. */
1691#define XCB_UNMAP_WINDOW 10
1692
1693/**
1694 * @brief xcb_unmap_window_request_t
1695 **/
1696typedef struct xcb_unmap_window_request_t {
1697 uint8_t major_opcode;
1698 uint8_t pad0;
1699 uint16_t length;
1700 xcb_window_t window;
1701} xcb_unmap_window_request_t;
1702
1703/** Opcode for xcb_unmap_subwindows. */
1704#define XCB_UNMAP_SUBWINDOWS 11
1705
1706/**
1707 * @brief xcb_unmap_subwindows_request_t
1708 **/
1709typedef struct xcb_unmap_subwindows_request_t {
1710 uint8_t major_opcode;
1711 uint8_t pad0;
1712 uint16_t length;
1713 xcb_window_t window;
1714} xcb_unmap_subwindows_request_t;
1715
1716typedef enum xcb_config_window_t {
1717 XCB_CONFIG_WINDOW_X = 1,
1718 XCB_CONFIG_WINDOW_Y = 2,
1719 XCB_CONFIG_WINDOW_WIDTH = 4,
1720 XCB_CONFIG_WINDOW_HEIGHT = 8,
1721 XCB_CONFIG_WINDOW_BORDER_WIDTH = 16,
1722 XCB_CONFIG_WINDOW_SIBLING = 32,
1723 XCB_CONFIG_WINDOW_STACK_MODE = 64
1724} xcb_config_window_t;
1725
1726typedef enum xcb_stack_mode_t {
1727 XCB_STACK_MODE_ABOVE = 0,
1728 XCB_STACK_MODE_BELOW = 1,
1729 XCB_STACK_MODE_TOP_IF = 2,
1730 XCB_STACK_MODE_BOTTOM_IF = 3,
1731 XCB_STACK_MODE_OPPOSITE = 4
1732} xcb_stack_mode_t;
1733
1734/**
1735 * @brief xcb_configure_window_value_list_t
1736 **/
1737typedef struct xcb_configure_window_value_list_t {
1738 int32_t x;
1739 int32_t y;
1740 uint32_t width;
1741 uint32_t height;
1742 uint32_t border_width;
1743 xcb_window_t sibling;
1744 uint32_t stack_mode;
1745} xcb_configure_window_value_list_t;
1746
1747/** Opcode for xcb_configure_window. */
1748#define XCB_CONFIGURE_WINDOW 12
1749
1750/**
1751 * @brief xcb_configure_window_request_t
1752 **/
1753typedef struct xcb_configure_window_request_t {
1754 uint8_t major_opcode;
1755 uint8_t pad0;
1756 uint16_t length;
1757 xcb_window_t window;
1758 uint16_t value_mask;
1759 uint8_t pad1[2];
1760} xcb_configure_window_request_t;
1761
1762typedef enum xcb_circulate_t {
1763 XCB_CIRCULATE_RAISE_LOWEST = 0,
1764 XCB_CIRCULATE_LOWER_HIGHEST = 1
1765} xcb_circulate_t;
1766
1767/** Opcode for xcb_circulate_window. */
1768#define XCB_CIRCULATE_WINDOW 13
1769
1770/**
1771 * @brief xcb_circulate_window_request_t
1772 **/
1773typedef struct xcb_circulate_window_request_t {
1774 uint8_t major_opcode;
1775 uint8_t direction;
1776 uint16_t length;
1777 xcb_window_t window;
1778} xcb_circulate_window_request_t;
1779
1780/**
1781 * @brief xcb_get_geometry_cookie_t
1782 **/
1783typedef struct xcb_get_geometry_cookie_t {
1784 unsigned int sequence;
1785} xcb_get_geometry_cookie_t;
1786
1787/** Opcode for xcb_get_geometry. */
1788#define XCB_GET_GEOMETRY 14
1789
1790/**
1791 * @brief xcb_get_geometry_request_t
1792 **/
1793typedef struct xcb_get_geometry_request_t {
1794 uint8_t major_opcode;
1795 uint8_t pad0;
1796 uint16_t length;
1797 xcb_drawable_t drawable;
1798} xcb_get_geometry_request_t;
1799
1800/**
1801 * @brief xcb_get_geometry_reply_t
1802 **/
1803typedef struct xcb_get_geometry_reply_t {
1804 uint8_t response_type;
1805 uint8_t depth;
1806 uint16_t sequence;
1807 uint32_t length;
1808 xcb_window_t root;
1809 int16_t x;
1810 int16_t y;
1811 uint16_t width;
1812 uint16_t height;
1813 uint16_t border_width;
1814 uint8_t pad0[2];
1815} xcb_get_geometry_reply_t;
1816
1817/**
1818 * @brief xcb_query_tree_cookie_t
1819 **/
1820typedef struct xcb_query_tree_cookie_t {
1821 unsigned int sequence;
1822} xcb_query_tree_cookie_t;
1823
1824/** Opcode for xcb_query_tree. */
1825#define XCB_QUERY_TREE 15
1826
1827/**
1828 * @brief xcb_query_tree_request_t
1829 **/
1830typedef struct xcb_query_tree_request_t {
1831 uint8_t major_opcode;
1832 uint8_t pad0;
1833 uint16_t length;
1834 xcb_window_t window;
1835} xcb_query_tree_request_t;
1836
1837/**
1838 * @brief xcb_query_tree_reply_t
1839 **/
1840typedef struct xcb_query_tree_reply_t {
1841 uint8_t response_type;
1842 uint8_t pad0;
1843 uint16_t sequence;
1844 uint32_t length;
1845 xcb_window_t root;
1846 xcb_window_t parent;
1847 uint16_t children_len;
1848 uint8_t pad1[14];
1849} xcb_query_tree_reply_t;
1850
1851/**
1852 * @brief xcb_intern_atom_cookie_t
1853 **/
1854typedef struct xcb_intern_atom_cookie_t {
1855 unsigned int sequence;
1856} xcb_intern_atom_cookie_t;
1857
1858/** Opcode for xcb_intern_atom. */
1859#define XCB_INTERN_ATOM 16
1860
1861/**
1862 * @brief xcb_intern_atom_request_t
1863 **/
1864typedef struct xcb_intern_atom_request_t {
1865 uint8_t major_opcode;
1866 uint8_t only_if_exists;
1867 uint16_t length;
1868 uint16_t name_len;
1869 uint8_t pad0[2];
1870} xcb_intern_atom_request_t;
1871
1872/**
1873 * @brief xcb_intern_atom_reply_t
1874 **/
1875typedef struct xcb_intern_atom_reply_t {
1876 uint8_t response_type;
1877 uint8_t pad0;
1878 uint16_t sequence;
1879 uint32_t length;
1880 xcb_atom_t atom;
1881} xcb_intern_atom_reply_t;
1882
1883/**
1884 * @brief xcb_get_atom_name_cookie_t
1885 **/
1886typedef struct xcb_get_atom_name_cookie_t {
1887 unsigned int sequence;
1888} xcb_get_atom_name_cookie_t;
1889
1890/** Opcode for xcb_get_atom_name. */
1891#define XCB_GET_ATOM_NAME 17
1892
1893/**
1894 * @brief xcb_get_atom_name_request_t
1895 **/
1896typedef struct xcb_get_atom_name_request_t {
1897 uint8_t major_opcode;
1898 uint8_t pad0;
1899 uint16_t length;
1900 xcb_atom_t atom;
1901} xcb_get_atom_name_request_t;
1902
1903/**
1904 * @brief xcb_get_atom_name_reply_t
1905 **/
1906typedef struct xcb_get_atom_name_reply_t {
1907 uint8_t response_type;
1908 uint8_t pad0;
1909 uint16_t sequence;
1910 uint32_t length;
1911 uint16_t name_len;
1912 uint8_t pad1[22];
1913} xcb_get_atom_name_reply_t;
1914
1915typedef enum xcb_prop_mode_t {
1916 XCB_PROP_MODE_REPLACE = 0,
1917/**< Discard the previous property value and store the new data. */
1918
1919 XCB_PROP_MODE_PREPEND = 1,
1920/**< Insert the new data before the beginning of existing data. The `format` must
1921match existing property value. If the property is undefined, it is treated as
1922defined with the correct type and format with zero-length data. */
1923
1924 XCB_PROP_MODE_APPEND = 2
1925/**< Insert the new data after the beginning of existing data. The `format` must
1926match existing property value. If the property is undefined, it is treated as
1927defined with the correct type and format with zero-length data. */
1928
1929} xcb_prop_mode_t;
1930
1931/** Opcode for xcb_change_property. */
1932#define XCB_CHANGE_PROPERTY 18
1933
1934/**
1935 * @brief xcb_change_property_request_t
1936 **/
1937typedef struct xcb_change_property_request_t {
1938 uint8_t major_opcode;
1939 uint8_t mode;
1940 uint16_t length;
1941 xcb_window_t window;
1942 xcb_atom_t property;
1943 xcb_atom_t type;
1944 uint8_t format;
1945 uint8_t pad0[3];
1946 uint32_t data_len;
1947} xcb_change_property_request_t;
1948
1949/** Opcode for xcb_delete_property. */
1950#define XCB_DELETE_PROPERTY 19
1951
1952/**
1953 * @brief xcb_delete_property_request_t
1954 **/
1955typedef struct xcb_delete_property_request_t {
1956 uint8_t major_opcode;
1957 uint8_t pad0;
1958 uint16_t length;
1959 xcb_window_t window;
1960 xcb_atom_t property;
1961} xcb_delete_property_request_t;
1962
1963typedef enum xcb_get_property_type_t {
1964 XCB_GET_PROPERTY_TYPE_ANY = 0
1965} xcb_get_property_type_t;
1966
1967/**
1968 * @brief xcb_get_property_cookie_t
1969 **/
1970typedef struct xcb_get_property_cookie_t {
1971 unsigned int sequence;
1972} xcb_get_property_cookie_t;
1973
1974/** Opcode for xcb_get_property. */
1975#define XCB_GET_PROPERTY 20
1976
1977/**
1978 * @brief xcb_get_property_request_t
1979 **/
1980typedef struct xcb_get_property_request_t {
1981 uint8_t major_opcode;
1982 uint8_t _delete;
1983 uint16_t length;
1984 xcb_window_t window;
1985 xcb_atom_t property;
1986 xcb_atom_t type;
1987 uint32_t long_offset;
1988 uint32_t long_length;
1989} xcb_get_property_request_t;
1990
1991/**
1992 * @brief xcb_get_property_reply_t
1993 **/
1994typedef struct xcb_get_property_reply_t {
1995 uint8_t response_type;
1996 uint8_t format;
1997 uint16_t sequence;
1998 uint32_t length;
1999 xcb_atom_t type;
2000 uint32_t bytes_after;
2001 uint32_t value_len;
2002 uint8_t pad0[12];
2003} xcb_get_property_reply_t;
2004
2005/**
2006 * @brief xcb_list_properties_cookie_t
2007 **/
2008typedef struct xcb_list_properties_cookie_t {
2009 unsigned int sequence;
2010} xcb_list_properties_cookie_t;
2011
2012/** Opcode for xcb_list_properties. */
2013#define XCB_LIST_PROPERTIES 21
2014
2015/**
2016 * @brief xcb_list_properties_request_t
2017 **/
2018typedef struct xcb_list_properties_request_t {
2019 uint8_t major_opcode;
2020 uint8_t pad0;
2021 uint16_t length;
2022 xcb_window_t window;
2023} xcb_list_properties_request_t;
2024
2025/**
2026 * @brief xcb_list_properties_reply_t
2027 **/
2028typedef struct xcb_list_properties_reply_t {
2029 uint8_t response_type;
2030 uint8_t pad0;
2031 uint16_t sequence;
2032 uint32_t length;
2033 uint16_t atoms_len;
2034 uint8_t pad1[22];
2035} xcb_list_properties_reply_t;
2036
2037/** Opcode for xcb_set_selection_owner. */
2038#define XCB_SET_SELECTION_OWNER 22
2039
2040/**
2041 * @brief xcb_set_selection_owner_request_t
2042 **/
2043typedef struct xcb_set_selection_owner_request_t {
2044 uint8_t major_opcode;
2045 uint8_t pad0;
2046 uint16_t length;
2047 xcb_window_t owner;
2048 xcb_atom_t selection;
2049 xcb_timestamp_t time;
2050} xcb_set_selection_owner_request_t;
2051
2052/**
2053 * @brief xcb_get_selection_owner_cookie_t
2054 **/
2055typedef struct xcb_get_selection_owner_cookie_t {
2056 unsigned int sequence;
2057} xcb_get_selection_owner_cookie_t;
2058
2059/** Opcode for xcb_get_selection_owner. */
2060#define XCB_GET_SELECTION_OWNER 23
2061
2062/**
2063 * @brief xcb_get_selection_owner_request_t
2064 **/
2065typedef struct xcb_get_selection_owner_request_t {
2066 uint8_t major_opcode;
2067 uint8_t pad0;
2068 uint16_t length;
2069 xcb_atom_t selection;
2070} xcb_get_selection_owner_request_t;
2071
2072/**
2073 * @brief xcb_get_selection_owner_reply_t
2074 **/
2075typedef struct xcb_get_selection_owner_reply_t {
2076 uint8_t response_type;
2077 uint8_t pad0;
2078 uint16_t sequence;
2079 uint32_t length;
2080 xcb_window_t owner;
2081} xcb_get_selection_owner_reply_t;
2082
2083/** Opcode for xcb_convert_selection. */
2084#define XCB_CONVERT_SELECTION 24
2085
2086/**
2087 * @brief xcb_convert_selection_request_t
2088 **/
2089typedef struct xcb_convert_selection_request_t {
2090 uint8_t major_opcode;
2091 uint8_t pad0;
2092 uint16_t length;
2093 xcb_window_t requestor;
2094 xcb_atom_t selection;
2095 xcb_atom_t target;
2096 xcb_atom_t property;
2097 xcb_timestamp_t time;
2098} xcb_convert_selection_request_t;
2099
2100typedef enum xcb_send_event_dest_t {
2101 XCB_SEND_EVENT_DEST_POINTER_WINDOW = 0,
2102 XCB_SEND_EVENT_DEST_ITEM_FOCUS = 1
2103} xcb_send_event_dest_t;
2104
2105/** Opcode for xcb_send_event. */
2106#define XCB_SEND_EVENT 25
2107
2108/**
2109 * @brief xcb_send_event_request_t
2110 **/
2111typedef struct xcb_send_event_request_t {
2112 uint8_t major_opcode;
2113 uint8_t propagate;
2114 uint16_t length;
2115 xcb_window_t destination;
2116 uint32_t event_mask;
2117 char event[32];
2118} xcb_send_event_request_t;
2119
2120typedef enum xcb_grab_mode_t {
2121 XCB_GRAB_MODE_SYNC = 0,
2122/**< The state of the keyboard appears to freeze: No further keyboard events are
2123generated by the server until the grabbing client issues a releasing
2124`AllowEvents` request or until the keyboard grab is released. */
2125
2126 XCB_GRAB_MODE_ASYNC = 1
2127/**< Keyboard event processing continues normally. */
2128
2129} xcb_grab_mode_t;
2130
2131typedef enum xcb_grab_status_t {
2132 XCB_GRAB_STATUS_SUCCESS = 0,
2133 XCB_GRAB_STATUS_ALREADY_GRABBED = 1,
2134 XCB_GRAB_STATUS_INVALID_TIME = 2,
2135 XCB_GRAB_STATUS_NOT_VIEWABLE = 3,
2136 XCB_GRAB_STATUS_FROZEN = 4
2137} xcb_grab_status_t;
2138
2139typedef enum xcb_cursor_enum_t {
2140 XCB_CURSOR_NONE = 0
2141} xcb_cursor_enum_t;
2142
2143/**
2144 * @brief xcb_grab_pointer_cookie_t
2145 **/
2146typedef struct xcb_grab_pointer_cookie_t {
2147 unsigned int sequence;
2148} xcb_grab_pointer_cookie_t;
2149
2150/** Opcode for xcb_grab_pointer. */
2151#define XCB_GRAB_POINTER 26
2152
2153/**
2154 * @brief xcb_grab_pointer_request_t
2155 **/
2156typedef struct xcb_grab_pointer_request_t {
2157 uint8_t major_opcode;
2158 uint8_t owner_events;
2159 uint16_t length;
2160 xcb_window_t grab_window;
2161 uint16_t event_mask;
2162 uint8_t pointer_mode;
2163 uint8_t keyboard_mode;
2164 xcb_window_t confine_to;
2165 xcb_cursor_t cursor;
2166 xcb_timestamp_t time;
2167} xcb_grab_pointer_request_t;
2168
2169/**
2170 * @brief xcb_grab_pointer_reply_t
2171 **/
2172typedef struct xcb_grab_pointer_reply_t {
2173 uint8_t response_type;
2174 uint8_t status;
2175 uint16_t sequence;
2176 uint32_t length;
2177} xcb_grab_pointer_reply_t;
2178
2179/** Opcode for xcb_ungrab_pointer. */
2180#define XCB_UNGRAB_POINTER 27
2181
2182/**
2183 * @brief xcb_ungrab_pointer_request_t
2184 **/
2185typedef struct xcb_ungrab_pointer_request_t {
2186 uint8_t major_opcode;
2187 uint8_t pad0;
2188 uint16_t length;
2189 xcb_timestamp_t time;
2190} xcb_ungrab_pointer_request_t;
2191
2192typedef enum xcb_button_index_t {
2193 XCB_BUTTON_INDEX_ANY = 0,
2194/**< Any of the following (or none): */
2195
2196 XCB_BUTTON_INDEX_1 = 1,
2197/**< The left mouse button. */
2198
2199 XCB_BUTTON_INDEX_2 = 2,
2200/**< The right mouse button. */
2201
2202 XCB_BUTTON_INDEX_3 = 3,
2203/**< The middle mouse button. */
2204
2205 XCB_BUTTON_INDEX_4 = 4,
2206/**< Scroll wheel. TODO: direction? */
2207
2208 XCB_BUTTON_INDEX_5 = 5
2209/**< Scroll wheel. TODO: direction? */
2210
2211} xcb_button_index_t;
2212
2213/** Opcode for xcb_grab_button. */
2214#define XCB_GRAB_BUTTON 28
2215
2216/**
2217 * @brief xcb_grab_button_request_t
2218 **/
2219typedef struct xcb_grab_button_request_t {
2220 uint8_t major_opcode;
2221 uint8_t owner_events;
2222 uint16_t length;
2223 xcb_window_t grab_window;
2224 uint16_t event_mask;
2225 uint8_t pointer_mode;
2226 uint8_t keyboard_mode;
2227 xcb_window_t confine_to;
2228 xcb_cursor_t cursor;
2229 uint8_t button;
2230 uint8_t pad0;
2231 uint16_t modifiers;
2232} xcb_grab_button_request_t;
2233
2234/** Opcode for xcb_ungrab_button. */
2235#define XCB_UNGRAB_BUTTON 29
2236
2237/**
2238 * @brief xcb_ungrab_button_request_t
2239 **/
2240typedef struct xcb_ungrab_button_request_t {
2241 uint8_t major_opcode;
2242 uint8_t button;
2243 uint16_t length;
2244 xcb_window_t grab_window;
2245 uint16_t modifiers;
2246 uint8_t pad0[2];
2247} xcb_ungrab_button_request_t;
2248
2249/** Opcode for xcb_change_active_pointer_grab. */
2250#define XCB_CHANGE_ACTIVE_POINTER_GRAB 30
2251
2252/**
2253 * @brief xcb_change_active_pointer_grab_request_t
2254 **/
2255typedef struct xcb_change_active_pointer_grab_request_t {
2256 uint8_t major_opcode;
2257 uint8_t pad0;
2258 uint16_t length;
2259 xcb_cursor_t cursor;
2260 xcb_timestamp_t time;
2261 uint16_t event_mask;
2262 uint8_t pad1[2];
2263} xcb_change_active_pointer_grab_request_t;
2264
2265/**
2266 * @brief xcb_grab_keyboard_cookie_t
2267 **/
2268typedef struct xcb_grab_keyboard_cookie_t {
2269 unsigned int sequence;
2270} xcb_grab_keyboard_cookie_t;
2271
2272/** Opcode for xcb_grab_keyboard. */
2273#define XCB_GRAB_KEYBOARD 31
2274
2275/**
2276 * @brief xcb_grab_keyboard_request_t
2277 **/
2278typedef struct xcb_grab_keyboard_request_t {
2279 uint8_t major_opcode;
2280 uint8_t owner_events;
2281 uint16_t length;
2282 xcb_window_t grab_window;
2283 xcb_timestamp_t time;
2284 uint8_t pointer_mode;
2285 uint8_t keyboard_mode;
2286 uint8_t pad0[2];
2287} xcb_grab_keyboard_request_t;
2288
2289/**
2290 * @brief xcb_grab_keyboard_reply_t
2291 **/
2292typedef struct xcb_grab_keyboard_reply_t {
2293 uint8_t response_type;
2294 uint8_t status;
2295 uint16_t sequence;
2296 uint32_t length;
2297} xcb_grab_keyboard_reply_t;
2298
2299/** Opcode for xcb_ungrab_keyboard. */
2300#define XCB_UNGRAB_KEYBOARD 32
2301
2302/**
2303 * @brief xcb_ungrab_keyboard_request_t
2304 **/
2305typedef struct xcb_ungrab_keyboard_request_t {
2306 uint8_t major_opcode;
2307 uint8_t pad0;
2308 uint16_t length;
2309 xcb_timestamp_t time;
2310} xcb_ungrab_keyboard_request_t;
2311
2312typedef enum xcb_grab_t {
2313 XCB_GRAB_ANY = 0
2314} xcb_grab_t;
2315
2316/** Opcode for xcb_grab_key. */
2317#define XCB_GRAB_KEY 33
2318
2319/**
2320 * @brief xcb_grab_key_request_t
2321 **/
2322typedef struct xcb_grab_key_request_t {
2323 uint8_t major_opcode;
2324 uint8_t owner_events;
2325 uint16_t length;
2326 xcb_window_t grab_window;
2327 uint16_t modifiers;
2328 xcb_keycode_t key;
2329 uint8_t pointer_mode;
2330 uint8_t keyboard_mode;
2331 uint8_t pad0[3];
2332} xcb_grab_key_request_t;
2333
2334/** Opcode for xcb_ungrab_key. */
2335#define XCB_UNGRAB_KEY 34
2336
2337/**
2338 * @brief xcb_ungrab_key_request_t
2339 **/
2340typedef struct xcb_ungrab_key_request_t {
2341 uint8_t major_opcode;
2342 xcb_keycode_t key;
2343 uint16_t length;
2344 xcb_window_t grab_window;
2345 uint16_t modifiers;
2346 uint8_t pad0[2];
2347} xcb_ungrab_key_request_t;
2348
2349typedef enum xcb_allow_t {
2350 XCB_ALLOW_ASYNC_POINTER = 0,
2351/**< For AsyncPointer, if the pointer is frozen by the client, pointer event
2352processing continues normally. If the pointer is frozen twice by the client on
2353behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no
2354effect if the pointer is not frozen by the client, but the pointer need not be
2355grabbed by the client.
2356
2357TODO: rewrite this in more understandable terms. */
2358
2359 XCB_ALLOW_SYNC_POINTER = 1,
2360/**< For SyncPointer, if the pointer is frozen and actively grabbed by the client,
2361pointer event processing continues normally until the next ButtonPress or
2362ButtonRelease event is reported to the client, at which time the pointer again
2363appears to freeze. However, if the reported event causes the pointer grab to be
2364released, then the pointer does not freeze. SyncPointer has no effect if the
2365pointer is not frozen by the client or if the pointer is not grabbed by the
2366client. */
2367
2368 XCB_ALLOW_REPLAY_POINTER = 2,
2369/**< For ReplayPointer, if the pointer is actively grabbed by the client and is
2370frozen as the result of an event having been sent to the client (either from
2371the activation of a GrabButton or from a previous AllowEvents with mode
2372SyncPointer but not from a GrabPointer), then the pointer grab is released and
2373that event is completely reprocessed, this time ignoring any passive grabs at
2374or above (towards the root) the grab-window of the grab just released. The
2375request has no effect if the pointer is not grabbed by the client or if the
2376pointer is not frozen as the result of an event. */
2377
2378 XCB_ALLOW_ASYNC_KEYBOARD = 3,
2379/**< For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event
2380processing continues normally. If the keyboard is frozen twice by the client on
2381behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has
2382no effect if the keyboard is not frozen by the client, but the keyboard need
2383not be grabbed by the client. */
2384
2385 XCB_ALLOW_SYNC_KEYBOARD = 4,
2386/**< For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client,
2387keyboard event processing continues normally until the next KeyPress or
2388KeyRelease event is reported to the client, at which time the keyboard again
2389appears to freeze. However, if the reported event causes the keyboard grab to
2390be released, then the keyboard does not freeze. SyncKeyboard has no effect if
2391the keyboard is not frozen by the client or if the keyboard is not grabbed by
2392the client. */
2393
2394 XCB_ALLOW_REPLAY_KEYBOARD = 5,
2395/**< For ReplayKeyboard, if the keyboard is actively grabbed by the client and is
2396frozen as the result of an event having been sent to the client (either from
2397the activation of a GrabKey or from a previous AllowEvents with mode
2398SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released
2399and that event is completely reprocessed, this time ignoring any passive grabs
2400at or above (towards the root) the grab-window of the grab just released. The
2401request has no effect if the keyboard is not grabbed by the client or if the
2402keyboard is not frozen as the result of an event. */
2403
2404 XCB_ALLOW_ASYNC_BOTH = 6,
2405/**< For AsyncBoth, if the pointer and the keyboard are frozen by the client, event
2406processing for both devices continues normally. If a device is frozen twice by
2407the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth
2408has no effect unless both pointer and keyboard are frozen by the client. */
2409
2410 XCB_ALLOW_SYNC_BOTH = 7
2411/**< For SyncBoth, if both pointer and keyboard are frozen by the client, event
2412processing (for both devices) continues normally until the next ButtonPress,
2413ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a
2414grabbed device (button event for the pointer, key event for the keyboard), at
2415which time the devices again appear to freeze. However, if the reported event
2416causes the grab to be released, then the devices do not freeze (but if the
2417other device is still grabbed, then a subsequent event for it will still cause
2418both devices to freeze). SyncBoth has no effect unless both pointer and
2419keyboard are frozen by the client. If the pointer or keyboard is frozen twice
2420by the client on behalf of two separate grabs, SyncBoth thaws for both (but a
2421subsequent freeze for SyncBoth will only freeze each device once). */
2422
2423} xcb_allow_t;
2424
2425/** Opcode for xcb_allow_events. */
2426#define XCB_ALLOW_EVENTS 35
2427
2428/**
2429 * @brief xcb_allow_events_request_t
2430 **/
2431typedef struct xcb_allow_events_request_t {
2432 uint8_t major_opcode;
2433 uint8_t mode;
2434 uint16_t length;
2435 xcb_timestamp_t time;
2436} xcb_allow_events_request_t;
2437
2438/** Opcode for xcb_grab_server. */
2439#define XCB_GRAB_SERVER 36
2440
2441/**
2442 * @brief xcb_grab_server_request_t
2443 **/
2444typedef struct xcb_grab_server_request_t {
2445 uint8_t major_opcode;
2446 uint8_t pad0;
2447 uint16_t length;
2448} xcb_grab_server_request_t;
2449
2450/** Opcode for xcb_ungrab_server. */
2451#define XCB_UNGRAB_SERVER 37
2452
2453/**
2454 * @brief xcb_ungrab_server_request_t
2455 **/
2456typedef struct xcb_ungrab_server_request_t {
2457 uint8_t major_opcode;
2458 uint8_t pad0;
2459 uint16_t length;
2460} xcb_ungrab_server_request_t;
2461
2462/**
2463 * @brief xcb_query_pointer_cookie_t
2464 **/
2465typedef struct xcb_query_pointer_cookie_t {
2466 unsigned int sequence;
2467} xcb_query_pointer_cookie_t;
2468
2469/** Opcode for xcb_query_pointer. */
2470#define XCB_QUERY_POINTER 38
2471
2472/**
2473 * @brief xcb_query_pointer_request_t
2474 **/
2475typedef struct xcb_query_pointer_request_t {
2476 uint8_t major_opcode;
2477 uint8_t pad0;
2478 uint16_t length;
2479 xcb_window_t window;
2480} xcb_query_pointer_request_t;
2481
2482/**
2483 * @brief xcb_query_pointer_reply_t
2484 **/
2485typedef struct xcb_query_pointer_reply_t {
2486 uint8_t response_type;
2487 uint8_t same_screen;
2488 uint16_t sequence;
2489 uint32_t length;
2490 xcb_window_t root;
2491 xcb_window_t child;
2492 int16_t root_x;
2493 int16_t root_y;
2494 int16_t win_x;
2495 int16_t win_y;
2496 uint16_t mask;
2497 uint8_t pad0[2];
2498} xcb_query_pointer_reply_t;
2499
2500/**
2501 * @brief xcb_timecoord_t
2502 **/
2503typedef struct xcb_timecoord_t {
2504 xcb_timestamp_t time;
2505 int16_t x;
2506 int16_t y;
2507} xcb_timecoord_t;
2508
2509/**
2510 * @brief xcb_timecoord_iterator_t
2511 **/
2512typedef struct xcb_timecoord_iterator_t {
2513 xcb_timecoord_t *data;
2514 int rem;
2515 int index;
2516} xcb_timecoord_iterator_t;
2517
2518/**
2519 * @brief xcb_get_motion_events_cookie_t
2520 **/
2521typedef struct xcb_get_motion_events_cookie_t {
2522 unsigned int sequence;
2523} xcb_get_motion_events_cookie_t;
2524
2525/** Opcode for xcb_get_motion_events. */
2526#define XCB_GET_MOTION_EVENTS 39
2527
2528/**
2529 * @brief xcb_get_motion_events_request_t
2530 **/
2531typedef struct xcb_get_motion_events_request_t {
2532 uint8_t major_opcode;
2533 uint8_t pad0;
2534 uint16_t length;
2535 xcb_window_t window;
2536 xcb_timestamp_t start;
2537 xcb_timestamp_t stop;
2538} xcb_get_motion_events_request_t;
2539
2540/**
2541 * @brief xcb_get_motion_events_reply_t
2542 **/
2543typedef struct xcb_get_motion_events_reply_t {
2544 uint8_t response_type;
2545 uint8_t pad0;
2546 uint16_t sequence;
2547 uint32_t length;
2548 uint32_t events_len;
2549 uint8_t pad1[20];
2550} xcb_get_motion_events_reply_t;
2551
2552/**
2553 * @brief xcb_translate_coordinates_cookie_t
2554 **/
2555typedef struct xcb_translate_coordinates_cookie_t {
2556 unsigned int sequence;
2557} xcb_translate_coordinates_cookie_t;
2558
2559/** Opcode for xcb_translate_coordinates. */
2560#define XCB_TRANSLATE_COORDINATES 40
2561
2562/**
2563 * @brief xcb_translate_coordinates_request_t
2564 **/
2565typedef struct xcb_translate_coordinates_request_t {
2566 uint8_t major_opcode;
2567 uint8_t pad0;
2568 uint16_t length;
2569 xcb_window_t src_window;
2570 xcb_window_t dst_window;
2571 int16_t src_x;
2572 int16_t src_y;
2573} xcb_translate_coordinates_request_t;
2574
2575/**
2576 * @brief xcb_translate_coordinates_reply_t
2577 **/
2578typedef struct xcb_translate_coordinates_reply_t {
2579 uint8_t response_type;
2580 uint8_t same_screen;
2581 uint16_t sequence;
2582 uint32_t length;
2583 xcb_window_t child;
2584 int16_t dst_x;
2585 int16_t dst_y;
2586} xcb_translate_coordinates_reply_t;
2587
2588/** Opcode for xcb_warp_pointer. */
2589#define XCB_WARP_POINTER 41
2590
2591/**
2592 * @brief xcb_warp_pointer_request_t
2593 **/
2594typedef struct xcb_warp_pointer_request_t {
2595 uint8_t major_opcode;
2596 uint8_t pad0;
2597 uint16_t length;
2598 xcb_window_t src_window;
2599 xcb_window_t dst_window;
2600 int16_t src_x;
2601 int16_t src_y;
2602 uint16_t src_width;
2603 uint16_t src_height;
2604 int16_t dst_x;
2605 int16_t dst_y;
2606} xcb_warp_pointer_request_t;
2607
2608typedef enum xcb_input_focus_t {
2609 XCB_INPUT_FOCUS_NONE = 0,
2610/**< The focus reverts to `XCB_NONE`, so no window will have the input focus. */
2611
2612 XCB_INPUT_FOCUS_POINTER_ROOT = 1,
2613/**< The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts,
2614FocusIn and FocusOut events are generated, but the last-focus-change time is
2615not changed. */
2616
2617 XCB_INPUT_FOCUS_PARENT = 2,
2618/**< The focus reverts to the parent (or closest viewable ancestor) and the new
2619revert_to value is `XCB_INPUT_FOCUS_NONE`. */
2620
2621 XCB_INPUT_FOCUS_FOLLOW_KEYBOARD = 3
2622/**< NOT YET DOCUMENTED. Only relevant for the xinput extension. */
2623
2624} xcb_input_focus_t;
2625
2626/** Opcode for xcb_set_input_focus. */
2627#define XCB_SET_INPUT_FOCUS 42
2628
2629/**
2630 * @brief xcb_set_input_focus_request_t
2631 **/
2632typedef struct xcb_set_input_focus_request_t {
2633 uint8_t major_opcode;
2634 uint8_t revert_to;
2635 uint16_t length;
2636 xcb_window_t focus;
2637 xcb_timestamp_t time;
2638} xcb_set_input_focus_request_t;
2639
2640/**
2641 * @brief xcb_get_input_focus_cookie_t
2642 **/
2643typedef struct xcb_get_input_focus_cookie_t {
2644 unsigned int sequence;
2645} xcb_get_input_focus_cookie_t;
2646
2647/** Opcode for xcb_get_input_focus. */
2648#define XCB_GET_INPUT_FOCUS 43
2649
2650/**
2651 * @brief xcb_get_input_focus_request_t
2652 **/
2653typedef struct xcb_get_input_focus_request_t {
2654 uint8_t major_opcode;
2655 uint8_t pad0;
2656 uint16_t length;
2657} xcb_get_input_focus_request_t;
2658
2659/**
2660 * @brief xcb_get_input_focus_reply_t
2661 **/
2662typedef struct xcb_get_input_focus_reply_t {
2663 uint8_t response_type;
2664 uint8_t revert_to;
2665 uint16_t sequence;
2666 uint32_t length;
2667 xcb_window_t focus;
2668} xcb_get_input_focus_reply_t;
2669
2670/**
2671 * @brief xcb_query_keymap_cookie_t
2672 **/
2673typedef struct xcb_query_keymap_cookie_t {
2674 unsigned int sequence;
2675} xcb_query_keymap_cookie_t;
2676
2677/** Opcode for xcb_query_keymap. */
2678#define XCB_QUERY_KEYMAP 44
2679
2680/**
2681 * @brief xcb_query_keymap_request_t
2682 **/
2683typedef struct xcb_query_keymap_request_t {
2684 uint8_t major_opcode;
2685 uint8_t pad0;
2686 uint16_t length;
2687} xcb_query_keymap_request_t;
2688
2689/**
2690 * @brief xcb_query_keymap_reply_t
2691 **/
2692typedef struct xcb_query_keymap_reply_t {
2693 uint8_t response_type;
2694 uint8_t pad0;
2695 uint16_t sequence;
2696 uint32_t length;
2697 uint8_t keys[32];
2698} xcb_query_keymap_reply_t;
2699
2700/** Opcode for xcb_open_font. */
2701#define XCB_OPEN_FONT 45
2702
2703/**
2704 * @brief xcb_open_font_request_t
2705 **/
2706typedef struct xcb_open_font_request_t {
2707 uint8_t major_opcode;
2708 uint8_t pad0;
2709 uint16_t length;
2710 xcb_font_t fid;
2711 uint16_t name_len;
2712 uint8_t pad1[2];
2713} xcb_open_font_request_t;
2714
2715/** Opcode for xcb_close_font. */
2716#define XCB_CLOSE_FONT 46
2717
2718/**
2719 * @brief xcb_close_font_request_t
2720 **/
2721typedef struct xcb_close_font_request_t {
2722 uint8_t major_opcode;
2723 uint8_t pad0;
2724 uint16_t length;
2725 xcb_font_t font;
2726} xcb_close_font_request_t;
2727
2728typedef enum xcb_font_draw_t {
2729 XCB_FONT_DRAW_LEFT_TO_RIGHT = 0,
2730 XCB_FONT_DRAW_RIGHT_TO_LEFT = 1
2731} xcb_font_draw_t;
2732
2733/**
2734 * @brief xcb_fontprop_t
2735 **/
2736typedef struct xcb_fontprop_t {
2737 xcb_atom_t name;
2738 uint32_t value;
2739} xcb_fontprop_t;
2740
2741/**
2742 * @brief xcb_fontprop_iterator_t
2743 **/
2744typedef struct xcb_fontprop_iterator_t {
2745 xcb_fontprop_t *data;
2746 int rem;
2747 int index;
2748} xcb_fontprop_iterator_t;
2749
2750/**
2751 * @brief xcb_charinfo_t
2752 **/
2753typedef struct xcb_charinfo_t {
2754 int16_t left_side_bearing;
2755 int16_t right_side_bearing;
2756 int16_t character_width;
2757 int16_t ascent;
2758 int16_t descent;
2759 uint16_t attributes;
2760} xcb_charinfo_t;
2761
2762/**
2763 * @brief xcb_charinfo_iterator_t
2764 **/
2765typedef struct xcb_charinfo_iterator_t {
2766 xcb_charinfo_t *data;
2767 int rem;
2768 int index;
2769} xcb_charinfo_iterator_t;
2770
2771/**
2772 * @brief xcb_query_font_cookie_t
2773 **/
2774typedef struct xcb_query_font_cookie_t {
2775 unsigned int sequence;
2776} xcb_query_font_cookie_t;
2777
2778/** Opcode for xcb_query_font. */
2779#define XCB_QUERY_FONT 47
2780
2781/**
2782 * @brief xcb_query_font_request_t
2783 **/
2784typedef struct xcb_query_font_request_t {
2785 uint8_t major_opcode;
2786 uint8_t pad0;
2787 uint16_t length;
2788 xcb_fontable_t font;
2789} xcb_query_font_request_t;
2790
2791/**
2792 * @brief xcb_query_font_reply_t
2793 **/
2794typedef struct xcb_query_font_reply_t {
2795 uint8_t response_type;
2796 uint8_t pad0;
2797 uint16_t sequence;
2798 uint32_t length;
2799 xcb_charinfo_t min_bounds;
2800 uint8_t pad1[4];
2801 xcb_charinfo_t max_bounds;
2802 uint8_t pad2[4];
2803 uint16_t min_char_or_byte2;
2804 uint16_t max_char_or_byte2;
2805 uint16_t default_char;
2806 uint16_t properties_len;
2807 uint8_t draw_direction;
2808 uint8_t min_byte1;
2809 uint8_t max_byte1;
2810 uint8_t all_chars_exist;
2811 int16_t font_ascent;
2812 int16_t font_descent;
2813 uint32_t char_infos_len;
2814} xcb_query_font_reply_t;
2815
2816/**
2817 * @brief xcb_query_text_extents_cookie_t
2818 **/
2819typedef struct xcb_query_text_extents_cookie_t {
2820 unsigned int sequence;
2821} xcb_query_text_extents_cookie_t;
2822
2823/** Opcode for xcb_query_text_extents. */
2824#define XCB_QUERY_TEXT_EXTENTS 48
2825
2826/**
2827 * @brief xcb_query_text_extents_request_t
2828 **/
2829typedef struct xcb_query_text_extents_request_t {
2830 uint8_t major_opcode;
2831 uint8_t odd_length;
2832 uint16_t length;
2833 xcb_fontable_t font;
2834} xcb_query_text_extents_request_t;
2835
2836/**
2837 * @brief xcb_query_text_extents_reply_t
2838 **/
2839typedef struct xcb_query_text_extents_reply_t {
2840 uint8_t response_type;
2841 uint8_t draw_direction;
2842 uint16_t sequence;
2843 uint32_t length;
2844 int16_t font_ascent;
2845 int16_t font_descent;
2846 int16_t overall_ascent;
2847 int16_t overall_descent;
2848 int32_t overall_width;
2849 int32_t overall_left;
2850 int32_t overall_right;
2851} xcb_query_text_extents_reply_t;
2852
2853/**
2854 * @brief xcb_str_t
2855 **/
2856typedef struct xcb_str_t {
2857 uint8_t name_len;
2858} xcb_str_t;
2859
2860/**
2861 * @brief xcb_str_iterator_t
2862 **/
2863typedef struct xcb_str_iterator_t {
2864 xcb_str_t *data;
2865 int rem;
2866 int index;
2867} xcb_str_iterator_t;
2868
2869/**
2870 * @brief xcb_list_fonts_cookie_t
2871 **/
2872typedef struct xcb_list_fonts_cookie_t {
2873 unsigned int sequence;
2874} xcb_list_fonts_cookie_t;
2875
2876/** Opcode for xcb_list_fonts. */
2877#define XCB_LIST_FONTS 49
2878
2879/**
2880 * @brief xcb_list_fonts_request_t
2881 **/
2882typedef struct xcb_list_fonts_request_t {
2883 uint8_t major_opcode;
2884 uint8_t pad0;
2885 uint16_t length;
2886 uint16_t max_names;
2887 uint16_t pattern_len;
2888} xcb_list_fonts_request_t;
2889
2890/**
2891 * @brief xcb_list_fonts_reply_t
2892 **/
2893typedef struct xcb_list_fonts_reply_t {
2894 uint8_t response_type;
2895 uint8_t pad0;
2896 uint16_t sequence;
2897 uint32_t length;
2898 uint16_t names_len;
2899 uint8_t pad1[22];
2900} xcb_list_fonts_reply_t;
2901
2902/**
2903 * @brief xcb_list_fonts_with_info_cookie_t
2904 **/
2905typedef struct xcb_list_fonts_with_info_cookie_t {
2906 unsigned int sequence;
2907} xcb_list_fonts_with_info_cookie_t;
2908
2909/** Opcode for xcb_list_fonts_with_info. */
2910#define XCB_LIST_FONTS_WITH_INFO 50
2911
2912/**
2913 * @brief xcb_list_fonts_with_info_request_t
2914 **/
2915typedef struct xcb_list_fonts_with_info_request_t {
2916 uint8_t major_opcode;
2917 uint8_t pad0;
2918 uint16_t length;
2919 uint16_t max_names;
2920 uint16_t pattern_len;
2921} xcb_list_fonts_with_info_request_t;
2922
2923/**
2924 * @brief xcb_list_fonts_with_info_reply_t
2925 **/
2926typedef struct xcb_list_fonts_with_info_reply_t {
2927 uint8_t response_type;
2928 uint8_t name_len;
2929 uint16_t sequence;
2930 uint32_t length;
2931 xcb_charinfo_t min_bounds;
2932 uint8_t pad0[4];
2933 xcb_charinfo_t max_bounds;
2934 uint8_t pad1[4];
2935 uint16_t min_char_or_byte2;
2936 uint16_t max_char_or_byte2;
2937 uint16_t default_char;
2938 uint16_t properties_len;
2939 uint8_t draw_direction;
2940 uint8_t min_byte1;
2941 uint8_t max_byte1;
2942 uint8_t all_chars_exist;
2943 int16_t font_ascent;
2944 int16_t font_descent;
2945 uint32_t replies_hint;
2946} xcb_list_fonts_with_info_reply_t;
2947
2948/** Opcode for xcb_set_font_path. */
2949#define XCB_SET_FONT_PATH 51
2950
2951/**
2952 * @brief xcb_set_font_path_request_t
2953 **/
2954typedef struct xcb_set_font_path_request_t {
2955 uint8_t major_opcode;
2956 uint8_t pad0;
2957 uint16_t length;
2958 uint16_t font_qty;
2959 uint8_t pad1[2];
2960} xcb_set_font_path_request_t;
2961
2962/**
2963 * @brief xcb_get_font_path_cookie_t
2964 **/
2965typedef struct xcb_get_font_path_cookie_t {
2966 unsigned int sequence;
2967} xcb_get_font_path_cookie_t;
2968
2969/** Opcode for xcb_get_font_path. */
2970#define XCB_GET_FONT_PATH 52
2971
2972/**
2973 * @brief xcb_get_font_path_request_t
2974 **/
2975typedef struct xcb_get_font_path_request_t {
2976 uint8_t major_opcode;
2977 uint8_t pad0;
2978 uint16_t length;
2979} xcb_get_font_path_request_t;
2980
2981/**
2982 * @brief xcb_get_font_path_reply_t
2983 **/
2984typedef struct xcb_get_font_path_reply_t {
2985 uint8_t response_type;
2986 uint8_t pad0;
2987 uint16_t sequence;
2988 uint32_t length;
2989 uint16_t path_len;
2990 uint8_t pad1[22];
2991} xcb_get_font_path_reply_t;
2992
2993/** Opcode for xcb_create_pixmap. */
2994#define XCB_CREATE_PIXMAP 53
2995
2996/**
2997 * @brief xcb_create_pixmap_request_t
2998 **/
2999typedef struct xcb_create_pixmap_request_t {
3000 uint8_t major_opcode;
3001 uint8_t depth;
3002 uint16_t length;
3003 xcb_pixmap_t pid;
3004 xcb_drawable_t drawable;
3005 uint16_t width;
3006 uint16_t height;
3007} xcb_create_pixmap_request_t;
3008
3009/** Opcode for xcb_free_pixmap. */
3010#define XCB_FREE_PIXMAP 54
3011
3012/**
3013 * @brief xcb_free_pixmap_request_t
3014 **/
3015typedef struct xcb_free_pixmap_request_t {
3016 uint8_t major_opcode;
3017 uint8_t pad0;
3018 uint16_t length;
3019 xcb_pixmap_t pixmap;
3020} xcb_free_pixmap_request_t;
3021
3022typedef enum xcb_gc_t {
3023 XCB_GC_FUNCTION = 1,
3024/**< TODO: Refer to GX */
3025
3026 XCB_GC_PLANE_MASK = 2,
3027/**< In graphics operations, given a source and destination pixel, the result is
3028computed bitwise on corresponding bits of the pixels; that is, a Boolean
3029operation is performed in each bit plane. The plane-mask restricts the
3030operation to a subset of planes, so the result is:
3031
3032 ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) */
3033
3034 XCB_GC_FOREGROUND = 4,
3035/**< Foreground colorpixel. */
3036
3037 XCB_GC_BACKGROUND = 8,
3038/**< Background colorpixel. */
3039
3040 XCB_GC_LINE_WIDTH = 16,
3041/**< The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the
3042special value zero, a thin line. */
3043
3044 XCB_GC_LINE_STYLE = 32,
3045/**< The line-style defines which sections of a line are drawn:
3046Solid The full path of the line is drawn.
3047DoubleDash The full path of the line is drawn, but the even dashes are filled differently
3048 than the odd dashes (see fill-style), with Butt cap-style used where even and
3049 odd dashes meet.
3050OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of
3051 the individual dashes (except NotLast is treated as Butt). */
3052
3053 XCB_GC_CAP_STYLE = 64,
3054/**< The cap-style defines how the endpoints of a path are drawn:
3055NotLast The result is equivalent to Butt, except that for a line-width of zero the final
3056 endpoint is not drawn.
3057Butt The result is square at the endpoint (perpendicular to the slope of the line)
3058 with no projection beyond.
3059Round The result is a circular arc with its diameter equal to the line-width, centered
3060 on the endpoint; it is equivalent to Butt for line-width zero.
3061Projecting The result is square at the end, but the path continues beyond the endpoint for
3062 a distance equal to half the line-width; it is equivalent to Butt for line-width
3063 zero. */
3064
3065 XCB_GC_JOIN_STYLE = 128,
3066/**< The join-style defines how corners are drawn for wide lines:
3067Miter The outer edges of the two lines extend to meet at an angle. However, if the
3068 angle is less than 11 degrees, a Bevel join-style is used instead.
3069Round The result is a circular arc with a diameter equal to the line-width, centered
3070 on the joinpoint.
3071Bevel The result is Butt endpoint styles, and then the triangular notch is filled. */
3072
3073 XCB_GC_FILL_STYLE = 256,
3074/**< The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill
3075requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc)
3076as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment,
3077PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash
3078or DoubleDash:
3079Solid Foreground
3080Tiled Tile
3081OpaqueStippled A tile with the same width and height as stipple but with background
3082 everywhere stipple has a zero and with foreground everywhere stipple
3083 has a one
3084Stippled Foreground masked by stipple
3085For the odd dashes for line requests with line-style DoubleDash:
3086Solid Background
3087Tiled Same as for even dashes
3088OpaqueStippled Same as for even dashes
3089Stippled Background masked by stipple */
3090
3091 XCB_GC_FILL_RULE = 512,
3092/**< */
3093
3094 XCB_GC_TILE = 1024,
3095/**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
3096dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
3097the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
3098specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
3099origin of whatever destination drawable is specified in a graphics request.
3100The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
3101The stipple pixmap must have depth one and must have the same root as the gcontext (or a
3102Match error results). For fill-style Stippled (but not fill-style
3103OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
3104additional clip mask to be ANDed with the clip-mask.
3105Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
3106others. */
3107
3108 XCB_GC_STIPPLE = 2048,
3109/**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all
3110dimensions. When that plane is superimposed on the drawable for use in a graphics operation,
3111the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable
3112specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the
3113origin of whatever destination drawable is specified in a graphics request.
3114The tile pixmap must have the same root and depth as the gcontext (or a Match error results).
3115The stipple pixmap must have depth one and must have the same root as the gcontext (or a
3116Match error results). For fill-style Stippled (but not fill-style
3117OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an
3118additional clip mask to be ANDed with the clip-mask.
3119Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than
3120others. */
3121
3122 XCB_GC_TILE_STIPPLE_ORIGIN_X = 4096,
3123/**< TODO */
3124
3125 XCB_GC_TILE_STIPPLE_ORIGIN_Y = 8192,
3126/**< TODO */
3127
3128 XCB_GC_FONT = 16384,
3129/**< Which font to use for the `ImageText8` and `ImageText16` requests. */
3130
3131 XCB_GC_SUBWINDOW_MODE = 32768,
3132/**< For ClipByChildren, both source and destination windows are additionally
3133clipped by all viewable InputOutput children. For IncludeInferiors, neither
3134source nor destination window is
3135clipped by inferiors. This will result in including subwindow contents in the source and drawing
3136through subwindow boundaries of the destination. The use of IncludeInferiors with a source or
3137destination window of one depth with mapped inferiors of differing depth is not illegal, but the
3138semantics is undefined by the core protocol. */
3139
3140 XCB_GC_GRAPHICS_EXPOSURES = 65536,
3141/**< Whether ExposureEvents should be generated (1) or not (0).
3142
3143The default is 1. */
3144
3145 XCB_GC_CLIP_ORIGIN_X = 131072,
3146/**< TODO */
3147
3148 XCB_GC_CLIP_ORIGIN_Y = 262144,
3149/**< TODO */
3150
3151 XCB_GC_CLIP_MASK = 524288,
3152/**< The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has
3153bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where
3154the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip
3155sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have
3156depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None,
3157then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the
3158SetClipRectangles request. */
3159
3160 XCB_GC_DASH_OFFSET = 1048576,
3161/**< TODO */
3162
3163 XCB_GC_DASH_LIST = 2097152,
3164/**< TODO */
3165
3166 XCB_GC_ARC_MODE = 4194304
3167/**< TODO */
3168
3169} xcb_gc_t;
3170
3171typedef enum xcb_gx_t {
3172 XCB_GX_CLEAR = 0,
3173 XCB_GX_AND = 1,
3174 XCB_GX_AND_REVERSE = 2,
3175 XCB_GX_COPY = 3,
3176 XCB_GX_AND_INVERTED = 4,
3177 XCB_GX_NOOP = 5,
3178 XCB_GX_XOR = 6,
3179 XCB_GX_OR = 7,
3180 XCB_GX_NOR = 8,
3181 XCB_GX_EQUIV = 9,
3182 XCB_GX_INVERT = 10,
3183 XCB_GX_OR_REVERSE = 11,
3184 XCB_GX_COPY_INVERTED = 12,
3185 XCB_GX_OR_INVERTED = 13,
3186 XCB_GX_NAND = 14,
3187 XCB_GX_SET = 15
3188} xcb_gx_t;
3189
3190typedef enum xcb_line_style_t {
3191 XCB_LINE_STYLE_SOLID = 0,
3192 XCB_LINE_STYLE_ON_OFF_DASH = 1,
3193 XCB_LINE_STYLE_DOUBLE_DASH = 2
3194} xcb_line_style_t;
3195
3196typedef enum xcb_cap_style_t {
3197 XCB_CAP_STYLE_NOT_LAST = 0,
3198 XCB_CAP_STYLE_BUTT = 1,
3199 XCB_CAP_STYLE_ROUND = 2,
3200 XCB_CAP_STYLE_PROJECTING = 3
3201} xcb_cap_style_t;
3202
3203typedef enum xcb_join_style_t {
3204 XCB_JOIN_STYLE_MITER = 0,
3205 XCB_JOIN_STYLE_ROUND = 1,
3206 XCB_JOIN_STYLE_BEVEL = 2
3207} xcb_join_style_t;
3208
3209typedef enum xcb_fill_style_t {
3210 XCB_FILL_STYLE_SOLID = 0,
3211 XCB_FILL_STYLE_TILED = 1,
3212 XCB_FILL_STYLE_STIPPLED = 2,
3213 XCB_FILL_STYLE_OPAQUE_STIPPLED = 3
3214} xcb_fill_style_t;
3215
3216typedef enum xcb_fill_rule_t {
3217 XCB_FILL_RULE_EVEN_ODD = 0,
3218 XCB_FILL_RULE_WINDING = 1
3219} xcb_fill_rule_t;
3220
3221typedef enum xcb_subwindow_mode_t {
3222 XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN = 0,
3223 XCB_SUBWINDOW_MODE_INCLUDE_INFERIORS = 1
3224} xcb_subwindow_mode_t;
3225
3226typedef enum xcb_arc_mode_t {
3227 XCB_ARC_MODE_CHORD = 0,
3228 XCB_ARC_MODE_PIE_SLICE = 1
3229} xcb_arc_mode_t;
3230
3231/**
3232 * @brief xcb_create_gc_value_list_t
3233 **/
3234typedef struct xcb_create_gc_value_list_t {
3235 uint32_t function;
3236 uint32_t plane_mask;
3237 uint32_t foreground;
3238 uint32_t background;
3239 uint32_t line_width;
3240 uint32_t line_style;
3241 uint32_t cap_style;
3242 uint32_t join_style;
3243 uint32_t fill_style;
3244 uint32_t fill_rule;
3245 xcb_pixmap_t tile;
3246 xcb_pixmap_t stipple;
3247 int32_t tile_stipple_x_origin;
3248 int32_t tile_stipple_y_origin;
3249 xcb_font_t font;
3250 uint32_t subwindow_mode;
3251 xcb_bool32_t graphics_exposures;
3252 int32_t clip_x_origin;
3253 int32_t clip_y_origin;
3254 xcb_pixmap_t clip_mask;
3255 uint32_t dash_offset;
3256 uint32_t dashes;
3257 uint32_t arc_mode;
3258} xcb_create_gc_value_list_t;
3259
3260/** Opcode for xcb_create_gc. */
3261#define XCB_CREATE_GC 55
3262
3263/**
3264 * @brief xcb_create_gc_request_t
3265 **/
3266typedef struct xcb_create_gc_request_t {
3267 uint8_t major_opcode;
3268 uint8_t pad0;
3269 uint16_t length;
3270 xcb_gcontext_t cid;
3271 xcb_drawable_t drawable;
3272 uint32_t value_mask;
3273} xcb_create_gc_request_t;
3274
3275/**
3276 * @brief xcb_change_gc_value_list_t
3277 **/
3278typedef struct xcb_change_gc_value_list_t {
3279 uint32_t function;
3280 uint32_t plane_mask;
3281 uint32_t foreground;
3282 uint32_t background;
3283 uint32_t line_width;
3284 uint32_t line_style;
3285 uint32_t cap_style;
3286 uint32_t join_style;
3287 uint32_t fill_style;
3288 uint32_t fill_rule;
3289 xcb_pixmap_t tile;
3290 xcb_pixmap_t stipple;
3291 int32_t tile_stipple_x_origin;
3292 int32_t tile_stipple_y_origin;
3293 xcb_font_t font;
3294 uint32_t subwindow_mode;
3295 xcb_bool32_t graphics_exposures;
3296 int32_t clip_x_origin;
3297 int32_t clip_y_origin;
3298 xcb_pixmap_t clip_mask;
3299 uint32_t dash_offset;
3300 uint32_t dashes;
3301 uint32_t arc_mode;
3302} xcb_change_gc_value_list_t;
3303
3304/** Opcode for xcb_change_gc. */
3305#define XCB_CHANGE_GC 56
3306
3307/**
3308 * @brief xcb_change_gc_request_t
3309 **/
3310typedef struct xcb_change_gc_request_t {
3311 uint8_t major_opcode;
3312 uint8_t pad0;
3313 uint16_t length;
3314 xcb_gcontext_t gc;
3315 uint32_t value_mask;
3316} xcb_change_gc_request_t;
3317
3318/** Opcode for xcb_copy_gc. */
3319#define XCB_COPY_GC 57
3320
3321/**
3322 * @brief xcb_copy_gc_request_t
3323 **/
3324typedef struct xcb_copy_gc_request_t {
3325 uint8_t major_opcode;
3326 uint8_t pad0;
3327 uint16_t length;
3328 xcb_gcontext_t src_gc;
3329 xcb_gcontext_t dst_gc;
3330 uint32_t value_mask;
3331} xcb_copy_gc_request_t;
3332
3333/** Opcode for xcb_set_dashes. */
3334#define XCB_SET_DASHES 58
3335
3336/**
3337 * @brief xcb_set_dashes_request_t
3338 **/
3339typedef struct xcb_set_dashes_request_t {
3340 uint8_t major_opcode;
3341 uint8_t pad0;
3342 uint16_t length;
3343 xcb_gcontext_t gc;
3344 uint16_t dash_offset;
3345 uint16_t dashes_len;
3346} xcb_set_dashes_request_t;
3347
3348typedef enum xcb_clip_ordering_t {
3349 XCB_CLIP_ORDERING_UNSORTED = 0,
3350 XCB_CLIP_ORDERING_Y_SORTED = 1,
3351 XCB_CLIP_ORDERING_YX_SORTED = 2,
3352 XCB_CLIP_ORDERING_YX_BANDED = 3
3353} xcb_clip_ordering_t;
3354
3355/** Opcode for xcb_set_clip_rectangles. */
3356#define XCB_SET_CLIP_RECTANGLES 59
3357
3358/**
3359 * @brief xcb_set_clip_rectangles_request_t
3360 **/
3361typedef struct xcb_set_clip_rectangles_request_t {
3362 uint8_t major_opcode;
3363 uint8_t ordering;
3364 uint16_t length;
3365 xcb_gcontext_t gc;
3366 int16_t clip_x_origin;
3367 int16_t clip_y_origin;
3368} xcb_set_clip_rectangles_request_t;
3369
3370/** Opcode for xcb_free_gc. */
3371#define XCB_FREE_GC 60
3372
3373/**
3374 * @brief xcb_free_gc_request_t
3375 **/
3376typedef struct xcb_free_gc_request_t {
3377 uint8_t major_opcode;
3378 uint8_t pad0;
3379 uint16_t length;
3380 xcb_gcontext_t gc;
3381} xcb_free_gc_request_t;
3382
3383/** Opcode for xcb_clear_area. */
3384#define XCB_CLEAR_AREA 61
3385
3386/**
3387 * @brief xcb_clear_area_request_t
3388 **/
3389typedef struct xcb_clear_area_request_t {
3390 uint8_t major_opcode;
3391 uint8_t exposures;
3392 uint16_t length;
3393 xcb_window_t window;
3394 int16_t x;
3395 int16_t y;
3396 uint16_t width;
3397 uint16_t height;
3398} xcb_clear_area_request_t;
3399
3400/** Opcode for xcb_copy_area. */
3401#define XCB_COPY_AREA 62
3402
3403/**
3404 * @brief xcb_copy_area_request_t
3405 **/
3406typedef struct xcb_copy_area_request_t {
3407 uint8_t major_opcode;
3408 uint8_t pad0;
3409 uint16_t length;
3410 xcb_drawable_t src_drawable;
3411 xcb_drawable_t dst_drawable;
3412 xcb_gcontext_t gc;
3413 int16_t src_x;
3414 int16_t src_y;
3415 int16_t dst_x;
3416 int16_t dst_y;
3417 uint16_t width;
3418 uint16_t height;
3419} xcb_copy_area_request_t;
3420
3421/** Opcode for xcb_copy_plane. */
3422#define XCB_COPY_PLANE 63
3423
3424/**
3425 * @brief xcb_copy_plane_request_t
3426 **/
3427typedef struct xcb_copy_plane_request_t {
3428 uint8_t major_opcode;
3429 uint8_t pad0;
3430 uint16_t length;
3431 xcb_drawable_t src_drawable;
3432 xcb_drawable_t dst_drawable;
3433 xcb_gcontext_t gc;
3434 int16_t src_x;
3435 int16_t src_y;
3436 int16_t dst_x;
3437 int16_t dst_y;
3438 uint16_t width;
3439 uint16_t height;
3440 uint32_t bit_plane;
3441} xcb_copy_plane_request_t;
3442
3443typedef enum xcb_coord_mode_t {
3444 XCB_COORD_MODE_ORIGIN = 0,
3445/**< Treats all coordinates as relative to the origin. */
3446
3447 XCB_COORD_MODE_PREVIOUS = 1
3448/**< Treats all coordinates after the first as relative to the previous coordinate. */
3449
3450} xcb_coord_mode_t;
3451
3452/** Opcode for xcb_poly_point. */
3453#define XCB_POLY_POINT 64
3454
3455/**
3456 * @brief xcb_poly_point_request_t
3457 **/
3458typedef struct xcb_poly_point_request_t {
3459 uint8_t major_opcode;
3460 uint8_t coordinate_mode;
3461 uint16_t length;
3462 xcb_drawable_t drawable;
3463 xcb_gcontext_t gc;
3464} xcb_poly_point_request_t;
3465
3466/** Opcode for xcb_poly_line. */
3467#define XCB_POLY_LINE 65
3468
3469/**
3470 * @brief xcb_poly_line_request_t
3471 **/
3472typedef struct xcb_poly_line_request_t {
3473 uint8_t major_opcode;
3474 uint8_t coordinate_mode;
3475 uint16_t length;
3476 xcb_drawable_t drawable;
3477 xcb_gcontext_t gc;
3478} xcb_poly_line_request_t;
3479
3480/**
3481 * @brief xcb_segment_t
3482 **/
3483typedef struct xcb_segment_t {
3484 int16_t x1;
3485 int16_t y1;
3486 int16_t x2;
3487 int16_t y2;
3488} xcb_segment_t;
3489
3490/**
3491 * @brief xcb_segment_iterator_t
3492 **/
3493typedef struct xcb_segment_iterator_t {
3494 xcb_segment_t *data;
3495 int rem;
3496 int index;
3497} xcb_segment_iterator_t;
3498
3499/** Opcode for xcb_poly_segment. */
3500#define XCB_POLY_SEGMENT 66
3501
3502/**
3503 * @brief xcb_poly_segment_request_t
3504 **/
3505typedef struct xcb_poly_segment_request_t {
3506 uint8_t major_opcode;
3507 uint8_t pad0;
3508 uint16_t length;
3509 xcb_drawable_t drawable;
3510 xcb_gcontext_t gc;
3511} xcb_poly_segment_request_t;
3512
3513/** Opcode for xcb_poly_rectangle. */
3514#define XCB_POLY_RECTANGLE 67
3515
3516/**
3517 * @brief xcb_poly_rectangle_request_t
3518 **/
3519typedef struct xcb_poly_rectangle_request_t {
3520 uint8_t major_opcode;
3521 uint8_t pad0;
3522 uint16_t length;
3523 xcb_drawable_t drawable;
3524 xcb_gcontext_t gc;
3525} xcb_poly_rectangle_request_t;
3526
3527/** Opcode for xcb_poly_arc. */
3528#define XCB_POLY_ARC 68
3529
3530/**
3531 * @brief xcb_poly_arc_request_t
3532 **/
3533typedef struct xcb_poly_arc_request_t {
3534 uint8_t major_opcode;
3535 uint8_t pad0;
3536 uint16_t length;
3537 xcb_drawable_t drawable;
3538 xcb_gcontext_t gc;
3539} xcb_poly_arc_request_t;
3540
3541typedef enum xcb_poly_shape_t {
3542 XCB_POLY_SHAPE_COMPLEX = 0,
3543 XCB_POLY_SHAPE_NONCONVEX = 1,
3544 XCB_POLY_SHAPE_CONVEX = 2
3545} xcb_poly_shape_t;
3546
3547/** Opcode for xcb_fill_poly. */
3548#define XCB_FILL_POLY 69
3549
3550/**
3551 * @brief xcb_fill_poly_request_t
3552 **/
3553typedef struct xcb_fill_poly_request_t {
3554 uint8_t major_opcode;
3555 uint8_t pad0;
3556 uint16_t length;
3557 xcb_drawable_t drawable;
3558 xcb_gcontext_t gc;
3559 uint8_t shape;
3560 uint8_t coordinate_mode;
3561 uint8_t pad1[2];
3562} xcb_fill_poly_request_t;
3563
3564/** Opcode for xcb_poly_fill_rectangle. */
3565#define XCB_POLY_FILL_RECTANGLE 70
3566
3567/**
3568 * @brief xcb_poly_fill_rectangle_request_t
3569 **/
3570typedef struct xcb_poly_fill_rectangle_request_t {
3571 uint8_t major_opcode;
3572 uint8_t pad0;
3573 uint16_t length;
3574 xcb_drawable_t drawable;
3575 xcb_gcontext_t gc;
3576} xcb_poly_fill_rectangle_request_t;
3577
3578/** Opcode for xcb_poly_fill_arc. */
3579#define XCB_POLY_FILL_ARC 71
3580
3581/**
3582 * @brief xcb_poly_fill_arc_request_t
3583 **/
3584typedef struct xcb_poly_fill_arc_request_t {
3585 uint8_t major_opcode;
3586 uint8_t pad0;
3587 uint16_t length;
3588 xcb_drawable_t drawable;
3589 xcb_gcontext_t gc;
3590} xcb_poly_fill_arc_request_t;
3591
3592typedef enum xcb_image_format_t {
3593 XCB_IMAGE_FORMAT_XY_BITMAP = 0,
3594 XCB_IMAGE_FORMAT_XY_PIXMAP = 1,
3595 XCB_IMAGE_FORMAT_Z_PIXMAP = 2
3596} xcb_image_format_t;
3597
3598/** Opcode for xcb_put_image. */
3599#define XCB_PUT_IMAGE 72
3600
3601/**
3602 * @brief xcb_put_image_request_t
3603 **/
3604typedef struct xcb_put_image_request_t {
3605 uint8_t major_opcode;
3606 uint8_t format;
3607 uint16_t length;
3608 xcb_drawable_t drawable;
3609 xcb_gcontext_t gc;
3610 uint16_t width;
3611 uint16_t height;
3612 int16_t dst_x;
3613 int16_t dst_y;
3614 uint8_t left_pad;
3615 uint8_t depth;
3616 uint8_t pad0[2];
3617} xcb_put_image_request_t;
3618
3619/**
3620 * @brief xcb_get_image_cookie_t
3621 **/
3622typedef struct xcb_get_image_cookie_t {
3623 unsigned int sequence;
3624} xcb_get_image_cookie_t;
3625
3626/** Opcode for xcb_get_image. */
3627#define XCB_GET_IMAGE 73
3628
3629/**
3630 * @brief xcb_get_image_request_t
3631 **/
3632typedef struct xcb_get_image_request_t {
3633 uint8_t major_opcode;
3634 uint8_t format;
3635 uint16_t length;
3636 xcb_drawable_t drawable;
3637 int16_t x;
3638 int16_t y;
3639 uint16_t width;
3640 uint16_t height;
3641 uint32_t plane_mask;
3642} xcb_get_image_request_t;
3643
3644/**
3645 * @brief xcb_get_image_reply_t
3646 **/
3647typedef struct xcb_get_image_reply_t {
3648 uint8_t response_type;
3649 uint8_t depth;
3650 uint16_t sequence;
3651 uint32_t length;
3652 xcb_visualid_t visual;
3653 uint8_t pad0[20];
3654} xcb_get_image_reply_t;
3655
3656/** Opcode for xcb_poly_text_8. */
3657#define XCB_POLY_TEXT_8 74
3658
3659/**
3660 * @brief xcb_poly_text_8_request_t
3661 **/
3662typedef struct xcb_poly_text_8_request_t {
3663 uint8_t major_opcode;
3664 uint8_t pad0;
3665 uint16_t length;
3666 xcb_drawable_t drawable;
3667 xcb_gcontext_t gc;
3668 int16_t x;
3669 int16_t y;
3670} xcb_poly_text_8_request_t;
3671
3672/** Opcode for xcb_poly_text_16. */
3673#define XCB_POLY_TEXT_16 75
3674
3675/**
3676 * @brief xcb_poly_text_16_request_t
3677 **/
3678typedef struct xcb_poly_text_16_request_t {
3679 uint8_t major_opcode;
3680 uint8_t pad0;
3681 uint16_t length;
3682 xcb_drawable_t drawable;
3683 xcb_gcontext_t gc;
3684 int16_t x;
3685 int16_t y;
3686} xcb_poly_text_16_request_t;
3687
3688/** Opcode for xcb_image_text_8. */
3689#define XCB_IMAGE_TEXT_8 76
3690
3691/**
3692 * @brief xcb_image_text_8_request_t
3693 **/
3694typedef struct xcb_image_text_8_request_t {
3695 uint8_t major_opcode;
3696 uint8_t string_len;
3697 uint16_t length;
3698 xcb_drawable_t drawable;
3699 xcb_gcontext_t gc;
3700 int16_t x;
3701 int16_t y;
3702} xcb_image_text_8_request_t;
3703
3704/** Opcode for xcb_image_text_16. */
3705#define XCB_IMAGE_TEXT_16 77
3706
3707/**
3708 * @brief xcb_image_text_16_request_t
3709 **/
3710typedef struct xcb_image_text_16_request_t {
3711 uint8_t major_opcode;
3712 uint8_t string_len;
3713 uint16_t length;
3714 xcb_drawable_t drawable;
3715 xcb_gcontext_t gc;
3716 int16_t x;
3717 int16_t y;
3718} xcb_image_text_16_request_t;
3719
3720typedef enum xcb_colormap_alloc_t {
3721 XCB_COLORMAP_ALLOC_NONE = 0,
3722 XCB_COLORMAP_ALLOC_ALL = 1
3723} xcb_colormap_alloc_t;
3724
3725/** Opcode for xcb_create_colormap. */
3726#define XCB_CREATE_COLORMAP 78
3727
3728/**
3729 * @brief xcb_create_colormap_request_t
3730 **/
3731typedef struct xcb_create_colormap_request_t {
3732 uint8_t major_opcode;
3733 uint8_t alloc;
3734 uint16_t length;
3735 xcb_colormap_t mid;
3736 xcb_window_t window;
3737 xcb_visualid_t visual;
3738} xcb_create_colormap_request_t;
3739
3740/** Opcode for xcb_free_colormap. */
3741#define XCB_FREE_COLORMAP 79
3742
3743/**
3744 * @brief xcb_free_colormap_request_t
3745 **/
3746typedef struct xcb_free_colormap_request_t {
3747 uint8_t major_opcode;
3748 uint8_t pad0;
3749 uint16_t length;
3750 xcb_colormap_t cmap;
3751} xcb_free_colormap_request_t;
3752
3753/** Opcode for xcb_copy_colormap_and_free. */
3754#define XCB_COPY_COLORMAP_AND_FREE 80
3755
3756/**
3757 * @brief xcb_copy_colormap_and_free_request_t
3758 **/
3759typedef struct xcb_copy_colormap_and_free_request_t {
3760 uint8_t major_opcode;
3761 uint8_t pad0;
3762 uint16_t length;
3763 xcb_colormap_t mid;
3764 xcb_colormap_t src_cmap;
3765} xcb_copy_colormap_and_free_request_t;
3766
3767/** Opcode for xcb_install_colormap. */
3768#define XCB_INSTALL_COLORMAP 81
3769
3770/**
3771 * @brief xcb_install_colormap_request_t
3772 **/
3773typedef struct xcb_install_colormap_request_t {
3774 uint8_t major_opcode;
3775 uint8_t pad0;
3776 uint16_t length;
3777 xcb_colormap_t cmap;
3778} xcb_install_colormap_request_t;
3779
3780/** Opcode for xcb_uninstall_colormap. */
3781#define XCB_UNINSTALL_COLORMAP 82
3782
3783/**
3784 * @brief xcb_uninstall_colormap_request_t
3785 **/
3786typedef struct xcb_uninstall_colormap_request_t {
3787 uint8_t major_opcode;
3788 uint8_t pad0;
3789 uint16_t length;
3790 xcb_colormap_t cmap;
3791} xcb_uninstall_colormap_request_t;
3792
3793/**
3794 * @brief xcb_list_installed_colormaps_cookie_t
3795 **/
3796typedef struct xcb_list_installed_colormaps_cookie_t {
3797 unsigned int sequence;
3798} xcb_list_installed_colormaps_cookie_t;
3799
3800/** Opcode for xcb_list_installed_colormaps. */
3801#define XCB_LIST_INSTALLED_COLORMAPS 83
3802
3803/**
3804 * @brief xcb_list_installed_colormaps_request_t
3805 **/
3806typedef struct xcb_list_installed_colormaps_request_t {
3807 uint8_t major_opcode;
3808 uint8_t pad0;
3809 uint16_t length;
3810 xcb_window_t window;
3811} xcb_list_installed_colormaps_request_t;
3812
3813/**
3814 * @brief xcb_list_installed_colormaps_reply_t
3815 **/
3816typedef struct xcb_list_installed_colormaps_reply_t {
3817 uint8_t response_type;
3818 uint8_t pad0;
3819 uint16_t sequence;
3820 uint32_t length;
3821 uint16_t cmaps_len;
3822 uint8_t pad1[22];
3823} xcb_list_installed_colormaps_reply_t;
3824
3825/**
3826 * @brief xcb_alloc_color_cookie_t
3827 **/
3828typedef struct xcb_alloc_color_cookie_t {
3829 unsigned int sequence;
3830} xcb_alloc_color_cookie_t;
3831
3832/** Opcode for xcb_alloc_color. */
3833#define XCB_ALLOC_COLOR 84
3834
3835/**
3836 * @brief xcb_alloc_color_request_t
3837 **/
3838typedef struct xcb_alloc_color_request_t {
3839 uint8_t major_opcode;
3840 uint8_t pad0;
3841 uint16_t length;
3842 xcb_colormap_t cmap;
3843 uint16_t red;
3844 uint16_t green;
3845 uint16_t blue;
3846 uint8_t pad1[2];
3847} xcb_alloc_color_request_t;
3848
3849/**
3850 * @brief xcb_alloc_color_reply_t
3851 **/
3852typedef struct xcb_alloc_color_reply_t {
3853 uint8_t response_type;
3854 uint8_t pad0;
3855 uint16_t sequence;
3856 uint32_t length;
3857 uint16_t red;
3858 uint16_t green;
3859 uint16_t blue;
3860 uint8_t pad1[2];
3861 uint32_t pixel;
3862} xcb_alloc_color_reply_t;
3863
3864/**
3865 * @brief xcb_alloc_named_color_cookie_t
3866 **/
3867typedef struct xcb_alloc_named_color_cookie_t {
3868 unsigned int sequence;
3869} xcb_alloc_named_color_cookie_t;
3870
3871/** Opcode for xcb_alloc_named_color. */
3872#define XCB_ALLOC_NAMED_COLOR 85
3873
3874/**
3875 * @brief xcb_alloc_named_color_request_t
3876 **/
3877typedef struct xcb_alloc_named_color_request_t {
3878 uint8_t major_opcode;
3879 uint8_t pad0;
3880 uint16_t length;
3881 xcb_colormap_t cmap;
3882 uint16_t name_len;
3883 uint8_t pad1[2];
3884} xcb_alloc_named_color_request_t;
3885
3886/**
3887 * @brief xcb_alloc_named_color_reply_t
3888 **/
3889typedef struct xcb_alloc_named_color_reply_t {
3890 uint8_t response_type;
3891 uint8_t pad0;
3892 uint16_t sequence;
3893 uint32_t length;
3894 uint32_t pixel;
3895 uint16_t exact_red;
3896 uint16_t exact_green;
3897 uint16_t exact_blue;
3898 uint16_t visual_red;
3899 uint16_t visual_green;
3900 uint16_t visual_blue;
3901} xcb_alloc_named_color_reply_t;
3902
3903/**
3904 * @brief xcb_alloc_color_cells_cookie_t
3905 **/
3906typedef struct xcb_alloc_color_cells_cookie_t {
3907 unsigned int sequence;
3908} xcb_alloc_color_cells_cookie_t;
3909
3910/** Opcode for xcb_alloc_color_cells. */
3911#define XCB_ALLOC_COLOR_CELLS 86
3912
3913/**
3914 * @brief xcb_alloc_color_cells_request_t
3915 **/
3916typedef struct xcb_alloc_color_cells_request_t {
3917 uint8_t major_opcode;
3918 uint8_t contiguous;
3919 uint16_t length;
3920 xcb_colormap_t cmap;
3921 uint16_t colors;
3922 uint16_t planes;
3923} xcb_alloc_color_cells_request_t;
3924
3925/**
3926 * @brief xcb_alloc_color_cells_reply_t
3927 **/
3928typedef struct xcb_alloc_color_cells_reply_t {
3929 uint8_t response_type;
3930 uint8_t pad0;
3931 uint16_t sequence;
3932 uint32_t length;
3933 uint16_t pixels_len;
3934 uint16_t masks_len;
3935 uint8_t pad1[20];
3936} xcb_alloc_color_cells_reply_t;
3937
3938/**
3939 * @brief xcb_alloc_color_planes_cookie_t
3940 **/
3941typedef struct xcb_alloc_color_planes_cookie_t {
3942 unsigned int sequence;
3943} xcb_alloc_color_planes_cookie_t;
3944
3945/** Opcode for xcb_alloc_color_planes. */
3946#define XCB_ALLOC_COLOR_PLANES 87
3947
3948/**
3949 * @brief xcb_alloc_color_planes_request_t
3950 **/
3951typedef struct xcb_alloc_color_planes_request_t {
3952 uint8_t major_opcode;
3953 uint8_t contiguous;
3954 uint16_t length;
3955 xcb_colormap_t cmap;
3956 uint16_t colors;
3957 uint16_t reds;
3958 uint16_t greens;
3959 uint16_t blues;
3960} xcb_alloc_color_planes_request_t;
3961
3962/**
3963 * @brief xcb_alloc_color_planes_reply_t
3964 **/
3965typedef struct xcb_alloc_color_planes_reply_t {
3966 uint8_t response_type;
3967 uint8_t pad0;
3968 uint16_t sequence;
3969 uint32_t length;
3970 uint16_t pixels_len;
3971 uint8_t pad1[2];
3972 uint32_t red_mask;
3973 uint32_t green_mask;
3974 uint32_t blue_mask;
3975 uint8_t pad2[8];
3976} xcb_alloc_color_planes_reply_t;
3977
3978/** Opcode for xcb_free_colors. */
3979#define XCB_FREE_COLORS 88
3980
3981/**
3982 * @brief xcb_free_colors_request_t
3983 **/
3984typedef struct xcb_free_colors_request_t {
3985 uint8_t major_opcode;
3986 uint8_t pad0;
3987 uint16_t length;
3988 xcb_colormap_t cmap;
3989 uint32_t plane_mask;
3990} xcb_free_colors_request_t;
3991
3992typedef enum xcb_color_flag_t {
3993 XCB_COLOR_FLAG_RED = 1,
3994 XCB_COLOR_FLAG_GREEN = 2,
3995 XCB_COLOR_FLAG_BLUE = 4
3996} xcb_color_flag_t;
3997
3998/**
3999 * @brief xcb_coloritem_t
4000 **/
4001typedef struct xcb_coloritem_t {
4002 uint32_t pixel;
4003 uint16_t red;
4004 uint16_t green;
4005 uint16_t blue;
4006 uint8_t flags;
4007 uint8_t pad0;
4008} xcb_coloritem_t;
4009
4010/**
4011 * @brief xcb_coloritem_iterator_t
4012 **/
4013typedef struct xcb_coloritem_iterator_t {
4014 xcb_coloritem_t *data;
4015 int rem;
4016 int index;
4017} xcb_coloritem_iterator_t;
4018
4019/** Opcode for xcb_store_colors. */
4020#define XCB_STORE_COLORS 89
4021
4022/**
4023 * @brief xcb_store_colors_request_t
4024 **/
4025typedef struct xcb_store_colors_request_t {
4026 uint8_t major_opcode;
4027 uint8_t pad0;
4028 uint16_t length;
4029 xcb_colormap_t cmap;
4030} xcb_store_colors_request_t;
4031
4032/** Opcode for xcb_store_named_color. */
4033#define XCB_STORE_NAMED_COLOR 90
4034
4035/**
4036 * @brief xcb_store_named_color_request_t
4037 **/
4038typedef struct xcb_store_named_color_request_t {
4039 uint8_t major_opcode;
4040 uint8_t flags;
4041 uint16_t length;
4042 xcb_colormap_t cmap;
4043 uint32_t pixel;
4044 uint16_t name_len;
4045 uint8_t pad0[2];
4046} xcb_store_named_color_request_t;
4047
4048/**
4049 * @brief xcb_rgb_t
4050 **/
4051typedef struct xcb_rgb_t {
4052 uint16_t red;
4053 uint16_t green;
4054 uint16_t blue;
4055 uint8_t pad0[2];
4056} xcb_rgb_t;
4057
4058/**
4059 * @brief xcb_rgb_iterator_t
4060 **/
4061typedef struct xcb_rgb_iterator_t {
4062 xcb_rgb_t *data;
4063 int rem;
4064 int index;
4065} xcb_rgb_iterator_t;
4066
4067/**
4068 * @brief xcb_query_colors_cookie_t
4069 **/
4070typedef struct xcb_query_colors_cookie_t {
4071 unsigned int sequence;
4072} xcb_query_colors_cookie_t;
4073
4074/** Opcode for xcb_query_colors. */
4075#define XCB_QUERY_COLORS 91
4076
4077/**
4078 * @brief xcb_query_colors_request_t
4079 **/
4080typedef struct xcb_query_colors_request_t {
4081 uint8_t major_opcode;
4082 uint8_t pad0;
4083 uint16_t length;
4084 xcb_colormap_t cmap;
4085} xcb_query_colors_request_t;
4086
4087/**
4088 * @brief xcb_query_colors_reply_t
4089 **/
4090typedef struct xcb_query_colors_reply_t {
4091 uint8_t response_type;
4092 uint8_t pad0;
4093 uint16_t sequence;
4094 uint32_t length;
4095 uint16_t colors_len;
4096 uint8_t pad1[22];
4097} xcb_query_colors_reply_t;
4098
4099/**
4100 * @brief xcb_lookup_color_cookie_t
4101 **/
4102typedef struct xcb_lookup_color_cookie_t {
4103 unsigned int sequence;
4104} xcb_lookup_color_cookie_t;
4105
4106/** Opcode for xcb_lookup_color. */
4107#define XCB_LOOKUP_COLOR 92
4108
4109/**
4110 * @brief xcb_lookup_color_request_t
4111 **/
4112typedef struct xcb_lookup_color_request_t {
4113 uint8_t major_opcode;
4114 uint8_t pad0;
4115 uint16_t length;
4116 xcb_colormap_t cmap;
4117 uint16_t name_len;
4118 uint8_t pad1[2];
4119} xcb_lookup_color_request_t;
4120
4121/**
4122 * @brief xcb_lookup_color_reply_t
4123 **/
4124typedef struct xcb_lookup_color_reply_t {
4125 uint8_t response_type;
4126 uint8_t pad0;
4127 uint16_t sequence;
4128 uint32_t length;
4129 uint16_t exact_red;
4130 uint16_t exact_green;
4131 uint16_t exact_blue;
4132 uint16_t visual_red;
4133 uint16_t visual_green;
4134 uint16_t visual_blue;
4135} xcb_lookup_color_reply_t;
4136
4137typedef enum xcb_pixmap_enum_t {
4138 XCB_PIXMAP_NONE = 0
4139} xcb_pixmap_enum_t;
4140
4141/** Opcode for xcb_create_cursor. */
4142#define XCB_CREATE_CURSOR 93
4143
4144/**
4145 * @brief xcb_create_cursor_request_t
4146 **/
4147typedef struct xcb_create_cursor_request_t {
4148 uint8_t major_opcode;
4149 uint8_t pad0;
4150 uint16_t length;
4151 xcb_cursor_t cid;
4152 xcb_pixmap_t source;
4153 xcb_pixmap_t mask;
4154 uint16_t fore_red;
4155 uint16_t fore_green;
4156 uint16_t fore_blue;
4157 uint16_t back_red;
4158 uint16_t back_green;
4159 uint16_t back_blue;
4160 uint16_t x;
4161 uint16_t y;
4162} xcb_create_cursor_request_t;
4163
4164typedef enum xcb_font_enum_t {
4165 XCB_FONT_NONE = 0
4166} xcb_font_enum_t;
4167
4168/** Opcode for xcb_create_glyph_cursor. */
4169#define XCB_CREATE_GLYPH_CURSOR 94
4170
4171/**
4172 * @brief xcb_create_glyph_cursor_request_t
4173 **/
4174typedef struct xcb_create_glyph_cursor_request_t {
4175 uint8_t major_opcode;
4176 uint8_t pad0;
4177 uint16_t length;
4178 xcb_cursor_t cid;
4179 xcb_font_t source_font;
4180 xcb_font_t mask_font;
4181 uint16_t source_char;
4182 uint16_t mask_char;
4183 uint16_t fore_red;
4184 uint16_t fore_green;
4185 uint16_t fore_blue;
4186 uint16_t back_red;
4187 uint16_t back_green;
4188 uint16_t back_blue;
4189} xcb_create_glyph_cursor_request_t;
4190
4191/** Opcode for xcb_free_cursor. */
4192#define XCB_FREE_CURSOR 95
4193
4194/**
4195 * @brief xcb_free_cursor_request_t
4196 **/
4197typedef struct xcb_free_cursor_request_t {
4198 uint8_t major_opcode;
4199 uint8_t pad0;
4200 uint16_t length;
4201 xcb_cursor_t cursor;
4202} xcb_free_cursor_request_t;
4203
4204/** Opcode for xcb_recolor_cursor. */
4205#define XCB_RECOLOR_CURSOR 96
4206
4207/**
4208 * @brief xcb_recolor_cursor_request_t
4209 **/
4210typedef struct xcb_recolor_cursor_request_t {
4211 uint8_t major_opcode;
4212 uint8_t pad0;
4213 uint16_t length;
4214 xcb_cursor_t cursor;
4215 uint16_t fore_red;
4216 uint16_t fore_green;
4217 uint16_t fore_blue;
4218 uint16_t back_red;
4219 uint16_t back_green;
4220 uint16_t back_blue;
4221} xcb_recolor_cursor_request_t;
4222
4223typedef enum xcb_query_shape_of_t {
4224 XCB_QUERY_SHAPE_OF_LARGEST_CURSOR = 0,
4225 XCB_QUERY_SHAPE_OF_FASTEST_TILE = 1,
4226 XCB_QUERY_SHAPE_OF_FASTEST_STIPPLE = 2
4227} xcb_query_shape_of_t;
4228
4229/**
4230 * @brief xcb_query_best_size_cookie_t
4231 **/
4232typedef struct xcb_query_best_size_cookie_t {
4233 unsigned int sequence;
4234} xcb_query_best_size_cookie_t;
4235
4236/** Opcode for xcb_query_best_size. */
4237#define XCB_QUERY_BEST_SIZE 97
4238
4239/**
4240 * @brief xcb_query_best_size_request_t
4241 **/
4242typedef struct xcb_query_best_size_request_t {
4243 uint8_t major_opcode;
4244 uint8_t _class;
4245 uint16_t length;
4246 xcb_drawable_t drawable;
4247 uint16_t width;
4248 uint16_t height;
4249} xcb_query_best_size_request_t;
4250
4251/**
4252 * @brief xcb_query_best_size_reply_t
4253 **/
4254typedef struct xcb_query_best_size_reply_t {
4255 uint8_t response_type;
4256 uint8_t pad0;
4257 uint16_t sequence;
4258 uint32_t length;
4259 uint16_t width;
4260 uint16_t height;
4261} xcb_query_best_size_reply_t;
4262
4263/**
4264 * @brief xcb_query_extension_cookie_t
4265 **/
4266typedef struct xcb_query_extension_cookie_t {
4267 unsigned int sequence;
4268} xcb_query_extension_cookie_t;
4269
4270/** Opcode for xcb_query_extension. */
4271#define XCB_QUERY_EXTENSION 98
4272
4273/**
4274 * @brief xcb_query_extension_request_t
4275 **/
4276typedef struct xcb_query_extension_request_t {
4277 uint8_t major_opcode;
4278 uint8_t pad0;
4279 uint16_t length;
4280 uint16_t name_len;
4281 uint8_t pad1[2];
4282} xcb_query_extension_request_t;
4283
4284/**
4285 * @brief xcb_query_extension_reply_t
4286 **/
4287typedef struct xcb_query_extension_reply_t {
4288 uint8_t response_type;
4289 uint8_t pad0;
4290 uint16_t sequence;
4291 uint32_t length;
4292 uint8_t present;
4293 uint8_t major_opcode;
4294 uint8_t first_event;
4295 uint8_t first_error;
4296} xcb_query_extension_reply_t;
4297
4298/**
4299 * @brief xcb_list_extensions_cookie_t
4300 **/
4301typedef struct xcb_list_extensions_cookie_t {
4302 unsigned int sequence;
4303} xcb_list_extensions_cookie_t;
4304
4305/** Opcode for xcb_list_extensions. */
4306#define XCB_LIST_EXTENSIONS 99
4307
4308/**
4309 * @brief xcb_list_extensions_request_t
4310 **/
4311typedef struct xcb_list_extensions_request_t {
4312 uint8_t major_opcode;
4313 uint8_t pad0;
4314 uint16_t length;
4315} xcb_list_extensions_request_t;
4316
4317/**
4318 * @brief xcb_list_extensions_reply_t
4319 **/
4320typedef struct xcb_list_extensions_reply_t {
4321 uint8_t response_type;
4322 uint8_t names_len;
4323 uint16_t sequence;
4324 uint32_t length;
4325 uint8_t pad0[24];
4326} xcb_list_extensions_reply_t;
4327
4328/** Opcode for xcb_change_keyboard_mapping. */
4329#define XCB_CHANGE_KEYBOARD_MAPPING 100
4330
4331/**
4332 * @brief xcb_change_keyboard_mapping_request_t
4333 **/
4334typedef struct xcb_change_keyboard_mapping_request_t {
4335 uint8_t major_opcode;
4336 uint8_t keycode_count;
4337 uint16_t length;
4338 xcb_keycode_t first_keycode;
4339 uint8_t keysyms_per_keycode;
4340 uint8_t pad0[2];
4341} xcb_change_keyboard_mapping_request_t;
4342
4343/**
4344 * @brief xcb_get_keyboard_mapping_cookie_t
4345 **/
4346typedef struct xcb_get_keyboard_mapping_cookie_t {
4347 unsigned int sequence;
4348} xcb_get_keyboard_mapping_cookie_t;
4349
4350/** Opcode for xcb_get_keyboard_mapping. */
4351#define XCB_GET_KEYBOARD_MAPPING 101
4352
4353/**
4354 * @brief xcb_get_keyboard_mapping_request_t
4355 **/
4356typedef struct xcb_get_keyboard_mapping_request_t {
4357 uint8_t major_opcode;
4358 uint8_t pad0;
4359 uint16_t length;
4360 xcb_keycode_t first_keycode;
4361 uint8_t count;
4362} xcb_get_keyboard_mapping_request_t;
4363
4364/**
4365 * @brief xcb_get_keyboard_mapping_reply_t
4366 **/
4367typedef struct xcb_get_keyboard_mapping_reply_t {
4368 uint8_t response_type;
4369 uint8_t keysyms_per_keycode;
4370 uint16_t sequence;
4371 uint32_t length;
4372 uint8_t pad0[24];
4373} xcb_get_keyboard_mapping_reply_t;
4374
4375typedef enum xcb_kb_t {
4376 XCB_KB_KEY_CLICK_PERCENT = 1,
4377 XCB_KB_BELL_PERCENT = 2,
4378 XCB_KB_BELL_PITCH = 4,
4379 XCB_KB_BELL_DURATION = 8,
4380 XCB_KB_LED = 16,
4381 XCB_KB_LED_MODE = 32,
4382 XCB_KB_KEY = 64,
4383 XCB_KB_AUTO_REPEAT_MODE = 128
4384} xcb_kb_t;
4385
4386typedef enum xcb_led_mode_t {
4387 XCB_LED_MODE_OFF = 0,
4388 XCB_LED_MODE_ON = 1
4389} xcb_led_mode_t;
4390
4391typedef enum xcb_auto_repeat_mode_t {
4392 XCB_AUTO_REPEAT_MODE_OFF = 0,
4393 XCB_AUTO_REPEAT_MODE_ON = 1,
4394 XCB_AUTO_REPEAT_MODE_DEFAULT = 2
4395} xcb_auto_repeat_mode_t;
4396
4397/**
4398 * @brief xcb_change_keyboard_control_value_list_t
4399 **/
4400typedef struct xcb_change_keyboard_control_value_list_t {
4401 int32_t key_click_percent;
4402 int32_t bell_percent;
4403 int32_t bell_pitch;
4404 int32_t bell_duration;
4405 uint32_t led;
4406 uint32_t led_mode;
4407 xcb_keycode32_t key;
4408 uint32_t auto_repeat_mode;
4409} xcb_change_keyboard_control_value_list_t;
4410
4411/** Opcode for xcb_change_keyboard_control. */
4412#define XCB_CHANGE_KEYBOARD_CONTROL 102
4413
4414/**
4415 * @brief xcb_change_keyboard_control_request_t
4416 **/
4417typedef struct xcb_change_keyboard_control_request_t {
4418 uint8_t major_opcode;
4419 uint8_t pad0;
4420 uint16_t length;
4421 uint32_t value_mask;
4422} xcb_change_keyboard_control_request_t;
4423
4424/**
4425 * @brief xcb_get_keyboard_control_cookie_t
4426 **/
4427typedef struct xcb_get_keyboard_control_cookie_t {
4428 unsigned int sequence;
4429} xcb_get_keyboard_control_cookie_t;
4430
4431/** Opcode for xcb_get_keyboard_control. */
4432#define XCB_GET_KEYBOARD_CONTROL 103
4433
4434/**
4435 * @brief xcb_get_keyboard_control_request_t
4436 **/
4437typedef struct xcb_get_keyboard_control_request_t {
4438 uint8_t major_opcode;
4439 uint8_t pad0;
4440 uint16_t length;
4441} xcb_get_keyboard_control_request_t;
4442
4443/**
4444 * @brief xcb_get_keyboard_control_reply_t
4445 **/
4446typedef struct xcb_get_keyboard_control_reply_t {
4447 uint8_t response_type;
4448 uint8_t global_auto_repeat;
4449 uint16_t sequence;
4450 uint32_t length;
4451 uint32_t led_mask;
4452 uint8_t key_click_percent;
4453 uint8_t bell_percent;
4454 uint16_t bell_pitch;
4455 uint16_t bell_duration;
4456 uint8_t pad0[2];
4457 uint8_t auto_repeats[32];
4458} xcb_get_keyboard_control_reply_t;
4459
4460/** Opcode for xcb_bell. */
4461#define XCB_BELL 104
4462
4463/**
4464 * @brief xcb_bell_request_t
4465 **/
4466typedef struct xcb_bell_request_t {
4467 uint8_t major_opcode;
4468 int8_t percent;
4469 uint16_t length;
4470} xcb_bell_request_t;
4471
4472/** Opcode for xcb_change_pointer_control. */
4473#define XCB_CHANGE_POINTER_CONTROL 105
4474
4475/**
4476 * @brief xcb_change_pointer_control_request_t
4477 **/
4478typedef struct xcb_change_pointer_control_request_t {
4479 uint8_t major_opcode;
4480 uint8_t pad0;
4481 uint16_t length;
4482 int16_t acceleration_numerator;
4483 int16_t acceleration_denominator;
4484 int16_t threshold;
4485 uint8_t do_acceleration;
4486 uint8_t do_threshold;
4487} xcb_change_pointer_control_request_t;
4488
4489/**
4490 * @brief xcb_get_pointer_control_cookie_t
4491 **/
4492typedef struct xcb_get_pointer_control_cookie_t {
4493 unsigned int sequence;
4494} xcb_get_pointer_control_cookie_t;
4495
4496/** Opcode for xcb_get_pointer_control. */
4497#define XCB_GET_POINTER_CONTROL 106
4498
4499/**
4500 * @brief xcb_get_pointer_control_request_t
4501 **/
4502typedef struct xcb_get_pointer_control_request_t {
4503 uint8_t major_opcode;
4504 uint8_t pad0;
4505 uint16_t length;
4506} xcb_get_pointer_control_request_t;
4507
4508/**
4509 * @brief xcb_get_pointer_control_reply_t
4510 **/
4511typedef struct xcb_get_pointer_control_reply_t {
4512 uint8_t response_type;
4513 uint8_t pad0;
4514 uint16_t sequence;
4515 uint32_t length;
4516 uint16_t acceleration_numerator;
4517 uint16_t acceleration_denominator;
4518 uint16_t threshold;
4519 uint8_t pad1[18];
4520} xcb_get_pointer_control_reply_t;
4521
4522typedef enum xcb_blanking_t {
4523 XCB_BLANKING_NOT_PREFERRED = 0,
4524 XCB_BLANKING_PREFERRED = 1,
4525 XCB_BLANKING_DEFAULT = 2
4526} xcb_blanking_t;
4527
4528typedef enum xcb_exposures_t {
4529 XCB_EXPOSURES_NOT_ALLOWED = 0,
4530 XCB_EXPOSURES_ALLOWED = 1,
4531 XCB_EXPOSURES_DEFAULT = 2
4532} xcb_exposures_t;
4533
4534/** Opcode for xcb_set_screen_saver. */
4535#define XCB_SET_SCREEN_SAVER 107
4536
4537/**
4538 * @brief xcb_set_screen_saver_request_t
4539 **/
4540typedef struct xcb_set_screen_saver_request_t {
4541 uint8_t major_opcode;
4542 uint8_t pad0;
4543 uint16_t length;
4544 int16_t timeout;
4545 int16_t interval;
4546 uint8_t prefer_blanking;
4547 uint8_t allow_exposures;
4548} xcb_set_screen_saver_request_t;
4549
4550/**
4551 * @brief xcb_get_screen_saver_cookie_t
4552 **/
4553typedef struct xcb_get_screen_saver_cookie_t {
4554 unsigned int sequence;
4555} xcb_get_screen_saver_cookie_t;
4556
4557/** Opcode for xcb_get_screen_saver. */
4558#define XCB_GET_SCREEN_SAVER 108
4559
4560/**
4561 * @brief xcb_get_screen_saver_request_t
4562 **/
4563typedef struct xcb_get_screen_saver_request_t {
4564 uint8_t major_opcode;
4565 uint8_t pad0;
4566 uint16_t length;
4567} xcb_get_screen_saver_request_t;
4568
4569/**
4570 * @brief xcb_get_screen_saver_reply_t
4571 **/
4572typedef struct xcb_get_screen_saver_reply_t {
4573 uint8_t response_type;
4574 uint8_t pad0;
4575 uint16_t sequence;
4576 uint32_t length;
4577 uint16_t timeout;
4578 uint16_t interval;
4579 uint8_t prefer_blanking;
4580 uint8_t allow_exposures;
4581 uint8_t pad1[18];
4582} xcb_get_screen_saver_reply_t;
4583
4584typedef enum xcb_host_mode_t {
4585 XCB_HOST_MODE_INSERT = 0,
4586 XCB_HOST_MODE_DELETE = 1
4587} xcb_host_mode_t;
4588
4589typedef enum xcb_family_t {
4590 XCB_FAMILY_INTERNET = 0,
4591 XCB_FAMILY_DECNET = 1,
4592 XCB_FAMILY_CHAOS = 2,
4593 XCB_FAMILY_SERVER_INTERPRETED = 5,
4594 XCB_FAMILY_INTERNET_6 = 6
4595} xcb_family_t;
4596
4597/** Opcode for xcb_change_hosts. */
4598#define XCB_CHANGE_HOSTS 109
4599
4600/**
4601 * @brief xcb_change_hosts_request_t
4602 **/
4603typedef struct xcb_change_hosts_request_t {
4604 uint8_t major_opcode;
4605 uint8_t mode;
4606 uint16_t length;
4607 uint8_t family;
4608 uint8_t pad0;
4609 uint16_t address_len;
4610} xcb_change_hosts_request_t;
4611
4612/**
4613 * @brief xcb_host_t
4614 **/
4615typedef struct xcb_host_t {
4616 uint8_t family;
4617 uint8_t pad0;
4618 uint16_t address_len;
4619} xcb_host_t;
4620
4621/**
4622 * @brief xcb_host_iterator_t
4623 **/
4624typedef struct xcb_host_iterator_t {
4625 xcb_host_t *data;
4626 int rem;
4627 int index;
4628} xcb_host_iterator_t;
4629
4630/**
4631 * @brief xcb_list_hosts_cookie_t
4632 **/
4633typedef struct xcb_list_hosts_cookie_t {
4634 unsigned int sequence;
4635} xcb_list_hosts_cookie_t;
4636
4637/** Opcode for xcb_list_hosts. */
4638#define XCB_LIST_HOSTS 110
4639
4640/**
4641 * @brief xcb_list_hosts_request_t
4642 **/
4643typedef struct xcb_list_hosts_request_t {
4644 uint8_t major_opcode;
4645 uint8_t pad0;
4646 uint16_t length;
4647} xcb_list_hosts_request_t;
4648
4649/**
4650 * @brief xcb_list_hosts_reply_t
4651 **/
4652typedef struct xcb_list_hosts_reply_t {
4653 uint8_t response_type;
4654 uint8_t mode;
4655 uint16_t sequence;
4656 uint32_t length;
4657 uint16_t hosts_len;
4658 uint8_t pad0[22];
4659} xcb_list_hosts_reply_t;
4660
4661typedef enum xcb_access_control_t {
4662 XCB_ACCESS_CONTROL_DISABLE = 0,
4663 XCB_ACCESS_CONTROL_ENABLE = 1
4664} xcb_access_control_t;
4665
4666/** Opcode for xcb_set_access_control. */
4667#define XCB_SET_ACCESS_CONTROL 111
4668
4669/**
4670 * @brief xcb_set_access_control_request_t
4671 **/
4672typedef struct xcb_set_access_control_request_t {
4673 uint8_t major_opcode;
4674 uint8_t mode;
4675 uint16_t length;
4676} xcb_set_access_control_request_t;
4677
4678typedef enum xcb_close_down_t {
4679 XCB_CLOSE_DOWN_DESTROY_ALL = 0,
4680 XCB_CLOSE_DOWN_RETAIN_PERMANENT = 1,
4681 XCB_CLOSE_DOWN_RETAIN_TEMPORARY = 2
4682} xcb_close_down_t;
4683
4684/** Opcode for xcb_set_close_down_mode. */
4685#define XCB_SET_CLOSE_DOWN_MODE 112
4686
4687/**
4688 * @brief xcb_set_close_down_mode_request_t
4689 **/
4690typedef struct xcb_set_close_down_mode_request_t {
4691 uint8_t major_opcode;
4692 uint8_t mode;
4693 uint16_t length;
4694} xcb_set_close_down_mode_request_t;
4695
4696typedef enum xcb_kill_t {
4697 XCB_KILL_ALL_TEMPORARY = 0
4698} xcb_kill_t;
4699
4700/** Opcode for xcb_kill_client. */
4701#define XCB_KILL_CLIENT 113
4702
4703/**
4704 * @brief xcb_kill_client_request_t
4705 **/
4706typedef struct xcb_kill_client_request_t {
4707 uint8_t major_opcode;
4708 uint8_t pad0;
4709 uint16_t length;
4710 uint32_t resource;
4711} xcb_kill_client_request_t;
4712
4713/** Opcode for xcb_rotate_properties. */
4714#define XCB_ROTATE_PROPERTIES 114
4715
4716/**
4717 * @brief xcb_rotate_properties_request_t
4718 **/
4719typedef struct xcb_rotate_properties_request_t {
4720 uint8_t major_opcode;
4721 uint8_t pad0;
4722 uint16_t length;
4723 xcb_window_t window;
4724 uint16_t atoms_len;
4725 int16_t delta;
4726} xcb_rotate_properties_request_t;
4727
4728typedef enum xcb_screen_saver_t {
4729 XCB_SCREEN_SAVER_RESET = 0,
4730 XCB_SCREEN_SAVER_ACTIVE = 1
4731} xcb_screen_saver_t;
4732
4733/** Opcode for xcb_force_screen_saver. */
4734#define XCB_FORCE_SCREEN_SAVER 115
4735
4736/**
4737 * @brief xcb_force_screen_saver_request_t
4738 **/
4739typedef struct xcb_force_screen_saver_request_t {
4740 uint8_t major_opcode;
4741 uint8_t mode;
4742 uint16_t length;
4743} xcb_force_screen_saver_request_t;
4744
4745typedef enum xcb_mapping_status_t {
4746 XCB_MAPPING_STATUS_SUCCESS = 0,
4747 XCB_MAPPING_STATUS_BUSY = 1,
4748 XCB_MAPPING_STATUS_FAILURE = 2
4749} xcb_mapping_status_t;
4750
4751/**
4752 * @brief xcb_set_pointer_mapping_cookie_t
4753 **/
4754typedef struct xcb_set_pointer_mapping_cookie_t {
4755 unsigned int sequence;
4756} xcb_set_pointer_mapping_cookie_t;
4757
4758/** Opcode for xcb_set_pointer_mapping. */
4759#define XCB_SET_POINTER_MAPPING 116
4760
4761/**
4762 * @brief xcb_set_pointer_mapping_request_t
4763 **/
4764typedef struct xcb_set_pointer_mapping_request_t {
4765 uint8_t major_opcode;
4766 uint8_t map_len;
4767 uint16_t length;
4768} xcb_set_pointer_mapping_request_t;
4769
4770/**
4771 * @brief xcb_set_pointer_mapping_reply_t
4772 **/
4773typedef struct xcb_set_pointer_mapping_reply_t {
4774 uint8_t response_type;
4775 uint8_t status;
4776 uint16_t sequence;
4777 uint32_t length;
4778} xcb_set_pointer_mapping_reply_t;
4779
4780/**
4781 * @brief xcb_get_pointer_mapping_cookie_t
4782 **/
4783typedef struct xcb_get_pointer_mapping_cookie_t {
4784 unsigned int sequence;
4785} xcb_get_pointer_mapping_cookie_t;
4786
4787/** Opcode for xcb_get_pointer_mapping. */
4788#define XCB_GET_POINTER_MAPPING 117
4789
4790/**
4791 * @brief xcb_get_pointer_mapping_request_t
4792 **/
4793typedef struct xcb_get_pointer_mapping_request_t {
4794 uint8_t major_opcode;
4795 uint8_t pad0;
4796 uint16_t length;
4797} xcb_get_pointer_mapping_request_t;
4798
4799/**
4800 * @brief xcb_get_pointer_mapping_reply_t
4801 **/
4802typedef struct xcb_get_pointer_mapping_reply_t {
4803 uint8_t response_type;
4804 uint8_t map_len;
4805 uint16_t sequence;
4806 uint32_t length;
4807 uint8_t pad0[24];
4808} xcb_get_pointer_mapping_reply_t;
4809
4810typedef enum xcb_map_index_t {
4811 XCB_MAP_INDEX_SHIFT = 0,
4812 XCB_MAP_INDEX_LOCK = 1,
4813 XCB_MAP_INDEX_CONTROL = 2,
4814 XCB_MAP_INDEX_1 = 3,
4815 XCB_MAP_INDEX_2 = 4,
4816 XCB_MAP_INDEX_3 = 5,
4817 XCB_MAP_INDEX_4 = 6,
4818 XCB_MAP_INDEX_5 = 7
4819} xcb_map_index_t;
4820
4821/**
4822 * @brief xcb_set_modifier_mapping_cookie_t
4823 **/
4824typedef struct xcb_set_modifier_mapping_cookie_t {
4825 unsigned int sequence;
4826} xcb_set_modifier_mapping_cookie_t;
4827
4828/** Opcode for xcb_set_modifier_mapping. */
4829#define XCB_SET_MODIFIER_MAPPING 118
4830
4831/**
4832 * @brief xcb_set_modifier_mapping_request_t
4833 **/
4834typedef struct xcb_set_modifier_mapping_request_t {
4835 uint8_t