github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xkbcommon/include/xcb/xproto.h (about) 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 18 extern "C" { 19 #endif 20 21 /** 22 * @brief xcb_char2b_t 23 **/ 24 typedef 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 **/ 32 typedef struct xcb_char2b_iterator_t { 33 xcb_char2b_t *data; 34 int rem; 35 int index; 36 } xcb_char2b_iterator_t; 37 38 typedef uint32_t xcb_window_t; 39 40 /** 41 * @brief xcb_window_iterator_t 42 **/ 43 typedef struct xcb_window_iterator_t { 44 xcb_window_t *data; 45 int rem; 46 int index; 47 } xcb_window_iterator_t; 48 49 typedef uint32_t xcb_pixmap_t; 50 51 /** 52 * @brief xcb_pixmap_iterator_t 53 **/ 54 typedef struct xcb_pixmap_iterator_t { 55 xcb_pixmap_t *data; 56 int rem; 57 int index; 58 } xcb_pixmap_iterator_t; 59 60 typedef uint32_t xcb_cursor_t; 61 62 /** 63 * @brief xcb_cursor_iterator_t 64 **/ 65 typedef struct xcb_cursor_iterator_t { 66 xcb_cursor_t *data; 67 int rem; 68 int index; 69 } xcb_cursor_iterator_t; 70 71 typedef uint32_t xcb_font_t; 72 73 /** 74 * @brief xcb_font_iterator_t 75 **/ 76 typedef struct xcb_font_iterator_t { 77 xcb_font_t *data; 78 int rem; 79 int index; 80 } xcb_font_iterator_t; 81 82 typedef uint32_t xcb_gcontext_t; 83 84 /** 85 * @brief xcb_gcontext_iterator_t 86 **/ 87 typedef struct xcb_gcontext_iterator_t { 88 xcb_gcontext_t *data; 89 int rem; 90 int index; 91 } xcb_gcontext_iterator_t; 92 93 typedef uint32_t xcb_colormap_t; 94 95 /** 96 * @brief xcb_colormap_iterator_t 97 **/ 98 typedef struct xcb_colormap_iterator_t { 99 xcb_colormap_t *data; 100 int rem; 101 int index; 102 } xcb_colormap_iterator_t; 103 104 typedef uint32_t xcb_atom_t; 105 106 /** 107 * @brief xcb_atom_iterator_t 108 **/ 109 typedef struct xcb_atom_iterator_t { 110 xcb_atom_t *data; 111 int rem; 112 int index; 113 } xcb_atom_iterator_t; 114 115 typedef uint32_t xcb_drawable_t; 116 117 /** 118 * @brief xcb_drawable_iterator_t 119 **/ 120 typedef struct xcb_drawable_iterator_t { 121 xcb_drawable_t *data; 122 int rem; 123 int index; 124 } xcb_drawable_iterator_t; 125 126 typedef uint32_t xcb_fontable_t; 127 128 /** 129 * @brief xcb_fontable_iterator_t 130 **/ 131 typedef struct xcb_fontable_iterator_t { 132 xcb_fontable_t *data; 133 int rem; 134 int index; 135 } xcb_fontable_iterator_t; 136 137 typedef uint32_t xcb_bool32_t; 138 139 /** 140 * @brief xcb_bool32_iterator_t 141 **/ 142 typedef struct xcb_bool32_iterator_t { 143 xcb_bool32_t *data; 144 int rem; 145 int index; 146 } xcb_bool32_iterator_t; 147 148 typedef uint32_t xcb_visualid_t; 149 150 /** 151 * @brief xcb_visualid_iterator_t 152 **/ 153 typedef struct xcb_visualid_iterator_t { 154 xcb_visualid_t *data; 155 int rem; 156 int index; 157 } xcb_visualid_iterator_t; 158 159 typedef uint32_t xcb_timestamp_t; 160 161 /** 162 * @brief xcb_timestamp_iterator_t 163 **/ 164 typedef struct xcb_timestamp_iterator_t { 165 xcb_timestamp_t *data; 166 int rem; 167 int index; 168 } xcb_timestamp_iterator_t; 169 170 typedef uint32_t xcb_keysym_t; 171 172 /** 173 * @brief xcb_keysym_iterator_t 174 **/ 175 typedef struct xcb_keysym_iterator_t { 176 xcb_keysym_t *data; 177 int rem; 178 int index; 179 } xcb_keysym_iterator_t; 180 181 typedef uint8_t xcb_keycode_t; 182 183 /** 184 * @brief xcb_keycode_iterator_t 185 **/ 186 typedef struct xcb_keycode_iterator_t { 187 xcb_keycode_t *data; 188 int rem; 189 int index; 190 } xcb_keycode_iterator_t; 191 192 typedef uint32_t xcb_keycode32_t; 193 194 /** 195 * @brief xcb_keycode32_iterator_t 196 **/ 197 typedef struct xcb_keycode32_iterator_t { 198 xcb_keycode32_t *data; 199 int rem; 200 int index; 201 } xcb_keycode32_iterator_t; 202 203 typedef uint8_t xcb_button_t; 204 205 /** 206 * @brief xcb_button_iterator_t 207 **/ 208 typedef 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 **/ 217 typedef 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 **/ 225 typedef 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 **/ 234 typedef 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 **/ 244 typedef 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 **/ 253 typedef 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 **/ 265 typedef 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 **/ 274 typedef 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 **/ 284 typedef struct xcb_format_iterator_t { 285 xcb_format_t *data; 286 int rem; 287 int index; 288 } xcb_format_iterator_t; 289 290 typedef 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 **/ 302 typedef 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 **/ 316 typedef 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 **/ 325 typedef 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 **/ 335 typedef struct xcb_depth_iterator_t { 336 xcb_depth_t *data; 337 int rem; 338 int index; 339 } xcb_depth_iterator_t; 340 341 typedef 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 370 typedef 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 **/ 379 typedef 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 **/ 401 typedef 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 **/ 410 typedef 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 **/ 423 typedef 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 **/ 432 typedef 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 **/ 443 typedef 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 **/ 452 typedef 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 **/ 461 typedef 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 467 typedef 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 **/ 475 typedef 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 **/ 501 typedef struct xcb_setup_iterator_t { 502 xcb_setup_t *data; 503 int rem; 504 int index; 505 } xcb_setup_iterator_t; 506 507 typedef 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 519 typedef 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 535 typedef 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 **/ 545 typedef 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 565 typedef xcb_key_press_event_t xcb_key_release_event_t; 566 567 typedef 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 **/ 582 typedef 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 602 typedef xcb_button_press_event_t xcb_button_release_event_t; 603 604 typedef 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 **/ 615 typedef 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 632 typedef 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 643 typedef 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 **/ 656 typedef 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 676 typedef 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 **/ 684 typedef 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 696 typedef 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 **/ 704 typedef 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 **/ 715 typedef 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 **/ 734 typedef 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 **/ 755 typedef 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 765 typedef 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 **/ 777 typedef 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 **/ 792 typedef 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 **/ 813 typedef 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 **/ 827 typedef 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 **/ 843 typedef 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 **/ 859 typedef 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 **/ 873 typedef 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 **/ 892 typedef 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 **/ 914 typedef 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 **/ 935 typedef 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 **/ 951 typedef 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 960 typedef 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 **/ 975 typedef 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 989 typedef xcb_circulate_notify_event_t xcb_circulate_request_event_t; 990 991 typedef 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 **/ 1002 typedef 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 **/ 1019 typedef 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 1028 typedef enum xcb_time_t { 1029 XCB_TIME_CURRENT_TIME = 0 1030 } xcb_time_t; 1031 1032 typedef 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 **/ 1111 typedef 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 **/ 1129 typedef 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 1140 typedef 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 1149 typedef 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 **/ 1159 typedef 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 **/ 1173 typedef 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 **/ 1182 typedef 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 **/ 1194 typedef 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 1203 typedef 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 **/ 1215 typedef 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 **/ 1231 typedef 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 **/ 1247 typedef 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 **/ 1263 typedef 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 1276 typedef xcb_value_error_t xcb_window_error_t; 1277 1278 /** Opcode for xcb_pixmap. */ 1279 #define XCB_PIXMAP 4 1280 1281 typedef xcb_value_error_t xcb_pixmap_error_t; 1282 1283 /** Opcode for xcb_atom. */ 1284 #define XCB_ATOM 5 1285 1286 typedef xcb_value_error_t xcb_atom_error_t; 1287 1288 /** Opcode for xcb_cursor. */ 1289 #define XCB_CURSOR 6 1290 1291 typedef xcb_value_error_t xcb_cursor_error_t; 1292 1293 /** Opcode for xcb_font. */ 1294 #define XCB_FONT 7 1295 1296 typedef xcb_value_error_t xcb_font_error_t; 1297 1298 /** Opcode for xcb_match. */ 1299 #define XCB_MATCH 8 1300 1301 typedef xcb_request_error_t xcb_match_error_t; 1302 1303 /** Opcode for xcb_drawable. */ 1304 #define XCB_DRAWABLE 9 1305 1306 typedef xcb_value_error_t xcb_drawable_error_t; 1307 1308 /** Opcode for xcb_access. */ 1309 #define XCB_ACCESS 10 1310 1311 typedef xcb_request_error_t xcb_access_error_t; 1312 1313 /** Opcode for xcb_alloc. */ 1314 #define XCB_ALLOC 11 1315 1316 typedef xcb_request_error_t xcb_alloc_error_t; 1317 1318 /** Opcode for xcb_colormap. */ 1319 #define XCB_COLORMAP 12 1320 1321 typedef xcb_value_error_t xcb_colormap_error_t; 1322 1323 /** Opcode for xcb_g_context. */ 1324 #define XCB_G_CONTEXT 13 1325 1326 typedef xcb_value_error_t xcb_g_context_error_t; 1327 1328 /** Opcode for xcb_id_choice. */ 1329 #define XCB_ID_CHOICE 14 1330 1331 typedef xcb_value_error_t xcb_id_choice_error_t; 1332 1333 /** Opcode for xcb_name. */ 1334 #define XCB_NAME 15 1335 1336 typedef xcb_request_error_t xcb_name_error_t; 1337 1338 /** Opcode for xcb_length. */ 1339 #define XCB_LENGTH 16 1340 1341 typedef xcb_request_error_t xcb_length_error_t; 1342 1343 /** Opcode for xcb_implementation. */ 1344 #define XCB_IMPLEMENTATION 17 1345 1346 typedef xcb_request_error_t xcb_implementation_error_t; 1347 1348 typedef 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 1354 typedef enum xcb_cw_t { 1355 XCB_CW_BACK_PIXMAP = 1, 1356 /**< Overrides the default background-pixmap. The background pixmap and window must 1357 have the same root and same depth. Any size pixmap can be used, although some 1358 sizes may be faster than others. 1359 1360 If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background. 1361 The server may fill the contents with the previous screen contents or with 1362 contents of its own choosing. 1363 1364 If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is 1365 used, but the window must have the same depth as the parent (or a Match error 1366 results). The parent's background is tracked, and the current version is 1367 used 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 1371 background pixel is used for the background. Range-checking is not performed, 1372 the 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 1376 same root and the same depth. Any size pixmap can be used, although some sizes 1377 may be faster than others. 1378 1379 The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is 1380 copied (subsequent changes to the parent's border attribute do not affect the 1381 child), 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 1385 border pixel is used for the border. Range checking is not performed on the 1386 border-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 1397 obscured regions when the window is mapped would be beneficial. A backing-store 1398 of `Always` advises the server that maintaining contents even when the window 1399 is unmapped would be beneficial. In this case, the server may generate an 1400 exposure event when the window is created. A value of `NotUseful` advises the 1401 server that maintaining contents is unnecessary, although a server may still 1402 choose to maintain contents while the window is mapped. Note that if the server 1403 maintains contents, then the server should maintain complete contents not just 1404 the region within the parent boundaries, even if the window is larger than its 1405 parent. While the server maintains contents, exposure events will not normally 1406 be 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 1410 window hold dynamic data that must be preserved in backing-stores and during 1411 save-unders. */ 1412 1413 XCB_CW_BACKING_PIXEL = 256, 1414 /**< The backing-pixel specifies what value to use in planes not covered by 1415 backing-planes. The server is free to save only the specified bit planes in the 1416 backing-store or save-under and regenerate the remaining planes with the 1417 specified pixel value. Any bits beyond the specified depth of the window in 1418 these values are simply ignored. */ 1419 1420 XCB_CW_OVERRIDE_REDIRECT = 512, 1421 /**< The override-redirect specifies whether map and configure requests on this 1422 window should override a SubstructureRedirect on the parent, typically to 1423 inform 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 1427 contents 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 1435 ancestor 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 1439 capable of supporting multiple hardware colormaps may use this information, and window man- 1440 agers may use it for InstallColormap requests. The colormap must have the same visual type 1441 and root as the window (or a Match error results). If CopyFromParent is specified, the parent's 1442 colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child). 1443 However, the window must have the same visual type as the parent (or a Match error results), 1444 and the parent must not have a colormap of None (or a Match error results). For an explanation 1445 of None, see FreeColormap request. The colormap is copied by sharing the colormap object 1446 between 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- 1450 fied, the parent's cursor will be used when the pointer is in the window, and any change in the 1451 parent's cursor will cause an immediate change in the displayed cursor. */ 1452 1453 } xcb_cw_t; 1454 1455 typedef enum xcb_back_pixmap_t { 1456 XCB_BACK_PIXMAP_NONE = 0, 1457 XCB_BACK_PIXMAP_PARENT_RELATIVE = 1 1458 } xcb_back_pixmap_t; 1459 1460 typedef 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 **/ 1478 typedef 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 **/ 1502 typedef 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 **/ 1521 typedef 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 **/ 1545 typedef 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 1553 typedef 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 **/ 1562 typedef 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 **/ 1572 typedef 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 **/ 1582 typedef 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 **/ 1610 typedef 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 **/ 1623 typedef 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 1630 typedef 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 **/ 1641 typedef 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 **/ 1654 typedef 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 **/ 1670 typedef 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 **/ 1683 typedef 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 **/ 1696 typedef 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 **/ 1709 typedef 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 1716 typedef 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 1726 typedef 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 **/ 1737 typedef 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 **/ 1753 typedef 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 1762 typedef 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 **/ 1773 typedef 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 **/ 1783 typedef 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 **/ 1793 typedef 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 **/ 1803 typedef 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 **/ 1820 typedef 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 **/ 1830 typedef 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 **/ 1840 typedef 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 **/ 1854 typedef 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 **/ 1864 typedef 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 **/ 1875 typedef 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 **/ 1886 typedef 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 **/ 1896 typedef 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 **/ 1906 typedef 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 1915 typedef 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 1921 match existing property value. If the property is undefined, it is treated as 1922 defined 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 1926 match existing property value. If the property is undefined, it is treated as 1927 defined 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 **/ 1937 typedef 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 **/ 1955 typedef 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 1963 typedef 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 **/ 1970 typedef 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 **/ 1980 typedef 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 **/ 1994 typedef 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 **/ 2008 typedef 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 **/ 2018 typedef 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 **/ 2028 typedef 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 **/ 2043 typedef 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 **/ 2055 typedef 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 **/ 2065 typedef 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 **/ 2075 typedef 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 **/ 2089 typedef 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 2100 typedef 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 **/ 2111 typedef 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 2120 typedef 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 2123 generated 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 2131 typedef 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 2139 typedef 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 **/ 2146 typedef 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 **/ 2156 typedef 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 **/ 2172 typedef 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 **/ 2185 typedef 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 2192 typedef 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 **/ 2219 typedef 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 **/ 2240 typedef 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 **/ 2255 typedef 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 **/ 2268 typedef 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 **/ 2278 typedef 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 **/ 2292 typedef 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 **/ 2305 typedef 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 2312 typedef 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 **/ 2322 typedef 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 **/ 2340 typedef 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 2349 typedef enum xcb_allow_t { 2350 XCB_ALLOW_ASYNC_POINTER = 0, 2351 /**< For AsyncPointer, if the pointer is frozen by the client, pointer event 2352 processing continues normally. If the pointer is frozen twice by the client on 2353 behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no 2354 effect if the pointer is not frozen by the client, but the pointer need not be 2355 grabbed by the client. 2356 2357 TODO: 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, 2361 pointer event processing continues normally until the next ButtonPress or 2362 ButtonRelease event is reported to the client, at which time the pointer again 2363 appears to freeze. However, if the reported event causes the pointer grab to be 2364 released, then the pointer does not freeze. SyncPointer has no effect if the 2365 pointer is not frozen by the client or if the pointer is not grabbed by the 2366 client. */ 2367 2368 XCB_ALLOW_REPLAY_POINTER = 2, 2369 /**< For ReplayPointer, if the pointer is actively grabbed by the client and is 2370 frozen as the result of an event having been sent to the client (either from 2371 the activation of a GrabButton or from a previous AllowEvents with mode 2372 SyncPointer but not from a GrabPointer), then the pointer grab is released and 2373 that event is completely reprocessed, this time ignoring any passive grabs at 2374 or above (towards the root) the grab-window of the grab just released. The 2375 request has no effect if the pointer is not grabbed by the client or if the 2376 pointer 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 2380 processing continues normally. If the keyboard is frozen twice by the client on 2381 behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has 2382 no effect if the keyboard is not frozen by the client, but the keyboard need 2383 not 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, 2387 keyboard event processing continues normally until the next KeyPress or 2388 KeyRelease event is reported to the client, at which time the keyboard again 2389 appears to freeze. However, if the reported event causes the keyboard grab to 2390 be released, then the keyboard does not freeze. SyncKeyboard has no effect if 2391 the keyboard is not frozen by the client or if the keyboard is not grabbed by 2392 the client. */ 2393 2394 XCB_ALLOW_REPLAY_KEYBOARD = 5, 2395 /**< For ReplayKeyboard, if the keyboard is actively grabbed by the client and is 2396 frozen as the result of an event having been sent to the client (either from 2397 the activation of a GrabKey or from a previous AllowEvents with mode 2398 SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released 2399 and that event is completely reprocessed, this time ignoring any passive grabs 2400 at or above (towards the root) the grab-window of the grab just released. The 2401 request has no effect if the keyboard is not grabbed by the client or if the 2402 keyboard 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 2406 processing for both devices continues normally. If a device is frozen twice by 2407 the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth 2408 has 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 2412 processing (for both devices) continues normally until the next ButtonPress, 2413 ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a 2414 grabbed device (button event for the pointer, key event for the keyboard), at 2415 which time the devices again appear to freeze. However, if the reported event 2416 causes the grab to be released, then the devices do not freeze (but if the 2417 other device is still grabbed, then a subsequent event for it will still cause 2418 both devices to freeze). SyncBoth has no effect unless both pointer and 2419 keyboard are frozen by the client. If the pointer or keyboard is frozen twice 2420 by the client on behalf of two separate grabs, SyncBoth thaws for both (but a 2421 subsequent 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 **/ 2431 typedef 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 **/ 2444 typedef 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 **/ 2456 typedef 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 **/ 2465 typedef 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 **/ 2475 typedef 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 **/ 2485 typedef 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 **/ 2503 typedef 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 **/ 2512 typedef 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 **/ 2521 typedef 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 **/ 2531 typedef 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 **/ 2543 typedef 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 **/ 2555 typedef 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 **/ 2565 typedef 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 **/ 2578 typedef 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 **/ 2594 typedef 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 2608 typedef 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, 2614 FocusIn and FocusOut events are generated, but the last-focus-change time is 2615 not changed. */ 2616 2617 XCB_INPUT_FOCUS_PARENT = 2, 2618 /**< The focus reverts to the parent (or closest viewable ancestor) and the new 2619 revert_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 **/ 2632 typedef 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 **/ 2643 typedef 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 **/ 2653 typedef 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 **/ 2662 typedef 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 **/ 2673 typedef 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 **/ 2683 typedef 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 **/ 2692 typedef 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 **/ 2706 typedef 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 **/ 2721 typedef 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 2728 typedef 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 **/ 2736 typedef 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 **/ 2744 typedef 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 **/ 2753 typedef 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 **/ 2765 typedef 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 **/ 2774 typedef 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 **/ 2784 typedef 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 **/ 2794 typedef 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 **/ 2819 typedef 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 **/ 2829 typedef 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 **/ 2839 typedef 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 **/ 2856 typedef struct xcb_str_t { 2857 uint8_t name_len; 2858 } xcb_str_t; 2859 2860 /** 2861 * @brief xcb_str_iterator_t 2862 **/ 2863 typedef 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 **/ 2872 typedef 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 **/ 2882 typedef 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 **/ 2893 typedef 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 **/ 2905 typedef 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 **/ 2915 typedef 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 **/ 2926 typedef 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 **/ 2954 typedef 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 **/ 2965 typedef 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 **/ 2975 typedef 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 **/ 2984 typedef 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 **/ 2999 typedef 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 **/ 3015 typedef 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 3022 typedef 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 3028 computed bitwise on corresponding bits of the pixels; that is, a Boolean 3029 operation is performed in each bit plane. The plane-mask restricts the 3030 operation 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 3042 special value zero, a thin line. */ 3043 3044 XCB_GC_LINE_STYLE = 32, 3045 /**< The line-style defines which sections of a line are drawn: 3046 Solid The full path of the line is drawn. 3047 DoubleDash 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. 3050 OnOffDash 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: 3055 NotLast The result is equivalent to Butt, except that for a line-width of zero the final 3056 endpoint is not drawn. 3057 Butt The result is square at the endpoint (perpendicular to the slope of the line) 3058 with no projection beyond. 3059 Round 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. 3061 Projecting 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: 3067 Miter 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. 3069 Round The result is a circular arc with a diameter equal to the line-width, centered 3070 on the joinpoint. 3071 Bevel 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 3075 requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc) 3076 as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment, 3077 PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash 3078 or DoubleDash: 3079 Solid Foreground 3080 Tiled Tile 3081 OpaqueStippled 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 3084 Stippled Foreground masked by stipple 3085 For the odd dashes for line requests with line-style DoubleDash: 3086 Solid Background 3087 Tiled Same as for even dashes 3088 OpaqueStippled Same as for even dashes 3089 Stippled 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 3096 dimensions. When that plane is superimposed on the drawable for use in a graphics operation, 3097 the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable 3098 specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the 3099 origin of whatever destination drawable is specified in a graphics request. 3100 The tile pixmap must have the same root and depth as the gcontext (or a Match error results). 3101 The stipple pixmap must have depth one and must have the same root as the gcontext (or a 3102 Match error results). For fill-style Stippled (but not fill-style 3103 OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an 3104 additional clip mask to be ANDed with the clip-mask. 3105 Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than 3106 others. */ 3107 3108 XCB_GC_STIPPLE = 2048, 3109 /**< The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all 3110 dimensions. When that plane is superimposed on the drawable for use in a graphics operation, 3111 the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable 3112 specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the 3113 origin of whatever destination drawable is specified in a graphics request. 3114 The tile pixmap must have the same root and depth as the gcontext (or a Match error results). 3115 The stipple pixmap must have depth one and must have the same root as the gcontext (or a 3116 Match error results). For fill-style Stippled (but not fill-style 3117 OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an 3118 additional clip mask to be ANDed with the clip-mask. 3119 Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than 3120 others. */ 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 3133 clipped by all viewable InputOutput children. For IncludeInferiors, neither 3134 source nor destination window is 3135 clipped by inferiors. This will result in including subwindow contents in the source and drawing 3136 through subwindow boundaries of the destination. The use of IncludeInferiors with a source or 3137 destination window of one depth with mapped inferiors of differing depth is not illegal, but the 3138 semantics is undefined by the core protocol. */ 3139 3140 XCB_GC_GRAPHICS_EXPOSURES = 65536, 3141 /**< Whether ExposureEvents should be generated (1) or not (0). 3142 3143 The 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 3153 bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where 3154 the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip 3155 sources. 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 3156 depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None, 3157 then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the 3158 SetClipRectangles 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 3171 typedef 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 3190 typedef 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 3196 typedef 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 3203 typedef 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 3209 typedef 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 3216 typedef enum xcb_fill_rule_t { 3217 XCB_FILL_RULE_EVEN_ODD = 0, 3218 XCB_FILL_RULE_WINDING = 1 3219 } xcb_fill_rule_t; 3220 3221 typedef 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 3226 typedef 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 **/ 3234 typedef 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 **/ 3266 typedef 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 **/ 3278 typedef 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 **/ 3310 typedef 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 **/ 3324 typedef 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 **/ 3339 typedef 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 3348 typedef 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 **/ 3361 typedef 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 **/ 3376 typedef 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 **/ 3389 typedef 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 **/ 3406 typedef 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 **/ 3427 typedef 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 3443 typedef 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 **/ 3458 typedef 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 **/ 3472 typedef 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 **/ 3483 typedef 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 **/ 3493 typedef 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 **/ 3505 typedef 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 **/ 3519 typedef 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 **/ 3533 typedef 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 3541 typedef 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 **/ 3553 typedef 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 **/ 3570 typedef 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 **/ 3584 typedef 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 3592 typedef 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 **/ 3604 typedef 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 **/ 3622 typedef 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 **/ 3632 typedef 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 **/ 3647 typedef 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 **/ 3662 typedef 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 **/ 3678 typedef 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 **/ 3694 typedef 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 **/ 3710 typedef 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 3720 typedef 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 **/ 3731 typedef 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 **/ 3746 typedef 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 **/ 3759 typedef 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 **/ 3773 typedef 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 **/ 3786 typedef 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 **/ 3796 typedef 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 **/ 3806 typedef 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 **/ 3816 typedef 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 **/ 3828 typedef 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 **/ 3838 typedef 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 **/ 3852 typedef 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 **/ 3867 typedef 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 **/ 3877 typedef 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 **/ 3889 typedef 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 **/ 3906 typedef 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 **/ 3916 typedef 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 **/ 3928 typedef 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 **/ 3941 typedef 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 **/ 3951 typedef 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 **/ 3965 typedef 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 **/ 3984 typedef 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 3992 typedef 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 **/ 4001 typedef 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 **/ 4013 typedef 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 **/ 4025 typedef 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 **/ 4038 typedef 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 **/ 4051 typedef 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 **/ 4061 typedef 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 **/ 4070 typedef 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 **/ 4080 typedef 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 **/ 4090 typedef 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 **/ 4102 typedef 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 **/ 4112 typedef 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 **/ 4124 typedef 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 4137 typedef 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 **/ 4147 typedef 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 4164 typedef 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 **/ 4174 typedef 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 **/ 4197 typedef 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 **/ 4210 typedef 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 4223 typedef 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 **/ 4232 typedef 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 **/ 4242 typedef 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 **/ 4254 typedef 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 **/ 4266 typedef 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 **/ 4276 typedef 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 **/ 4287 typedef 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 **/ 4301 typedef 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 **/ 4311 typedef 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 **/ 4320 typedef 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 **/ 4334 typedef 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 **/ 4346 typedef 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 **/ 4356 typedef 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 **/ 4367 typedef 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 4375 typedef 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 4386 typedef enum xcb_led_mode_t { 4387 XCB_LED_MODE_OFF = 0, 4388 XCB_LED_MODE_ON = 1 4389 } xcb_led_mode_t; 4390 4391 typedef 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 **/ 4400 typedef 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 **/ 4417 typedef 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 **/ 4427 typedef 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 **/ 4437 typedef 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 **/ 4446 typedef 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 **/ 4466 typedef 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 **/ 4478 typedef 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 **/ 4492 typedef 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 **/ 4502 typedef 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 **/ 4511 typedef 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 4522 typedef 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 4528 typedef 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 **/ 4540 typedef 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 **/ 4553 typedef 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 **/ 4563 typedef 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 **/ 4572 typedef 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 4584 typedef enum xcb_host_mode_t { 4585 XCB_HOST_MODE_INSERT = 0, 4586 XCB_HOST_MODE_DELETE = 1 4587 } xcb_host_mode_t; 4588 4589 typedef 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 **/ 4603 typedef 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 **/ 4615 typedef 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 **/ 4624 typedef 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 **/ 4633 typedef 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 **/ 4643 typedef 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 **/ 4652 typedef 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 4661 typedef 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 **/ 4672 typedef 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 4678 typedef 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 **/ 4690 typedef 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 4696 typedef 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 **/ 4706 typedef 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 **/ 4719 typedef 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 4728 typedef 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 **/ 4739 typedef 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 4745 typedef 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 **/ 4754 typedef 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 **/ 4764 typedef 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 **/ 4773 typedef 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 **/ 4783 typedef 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 **/ 4793 typedef 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 **/ 4802 typedef 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 4810 typedef 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 **/ 4824 typedef 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 **/ 4834 typedef struct xcb_set_modifier_mapping_request_t { 4835 uint8_t major_opcode; 4836 uint8_t keycodes_per_modifier; 4837 uint16_t length; 4838 } xcb_set_modifier_mapping_request_t; 4839 4840 /** 4841 * @brief xcb_set_modifier_mapping_reply_t 4842 **/ 4843 typedef struct xcb_set_modifier_mapping_reply_t { 4844 uint8_t response_type; 4845 uint8_t status; 4846 uint16_t sequence; 4847 uint32_t length; 4848 } xcb_set_modifier_mapping_reply_t; 4849 4850 /** 4851 * @brief xcb_get_modifier_mapping_cookie_t 4852 **/ 4853 typedef struct xcb_get_modifier_mapping_cookie_t { 4854 unsigned int sequence; 4855 } xcb_get_modifier_mapping_cookie_t; 4856 4857 /** Opcode for xcb_get_modifier_mapping. */ 4858 #define XCB_GET_MODIFIER_MAPPING 119 4859 4860 /** 4861 * @brief xcb_get_modifier_mapping_request_t 4862 **/ 4863 typedef struct xcb_get_modifier_mapping_request_t { 4864 uint8_t major_opcode; 4865 uint8_t pad0; 4866 uint16_t length; 4867 } xcb_get_modifier_mapping_request_t; 4868 4869 /** 4870 * @brief xcb_get_modifier_mapping_reply_t 4871 **/ 4872 typedef struct xcb_get_modifier_mapping_reply_t { 4873 uint8_t response_type; 4874 uint8_t keycodes_per_modifier; 4875 uint16_t sequence; 4876 uint32_t length; 4877 uint8_t pad0[24]; 4878 } xcb_get_modifier_mapping_reply_t; 4879 4880 /** Opcode for xcb_no_operation. */ 4881 #define XCB_NO_OPERATION 127 4882 4883 /** 4884 * @brief xcb_no_operation_request_t 4885 **/ 4886 typedef struct xcb_no_operation_request_t { 4887 uint8_t major_opcode; 4888 uint8_t pad0; 4889 uint16_t length; 4890 } xcb_no_operation_request_t; 4891 4892 /** 4893 * Get the next element of the iterator 4894 * @param i Pointer to a xcb_char2b_iterator_t 4895 * 4896 * Get the next element in the iterator. The member rem is 4897 * decreased by one. The member data points to the next 4898 * element. The member index is increased by sizeof(xcb_char2b_t) 4899 */ 4900 void 4901 xcb_char2b_next (xcb_char2b_iterator_t *i); 4902 4903 /** 4904 * Return the iterator pointing to the last element 4905 * @param i An xcb_char2b_iterator_t 4906 * @return The iterator pointing to the last element 4907 * 4908 * Set the current element in the iterator to the last element. 4909 * The member rem is set to 0. The member data points to the 4910 * last element. 4911 */ 4912 xcb_generic_iterator_t 4913 xcb_char2b_end (xcb_char2b_iterator_t i); 4914 4915 /** 4916 * Get the next element of the iterator 4917 * @param i Pointer to a xcb_window_iterator_t 4918 * 4919 * Get the next element in the iterator. The member rem is 4920 * decreased by one. The member data points to the next 4921 * element. The member index is increased by sizeof(xcb_window_t) 4922 */ 4923 void 4924 xcb_window_next (xcb_window_iterator_t *i); 4925 4926 /** 4927 * Return the iterator pointing to the last element 4928 * @param i An xcb_window_iterator_t 4929 * @return The iterator pointing to the last element 4930 * 4931 * Set the current element in the iterator to the last element. 4932 * The member rem is set to 0. The member data points to the 4933 * last element. 4934 */ 4935 xcb_generic_iterator_t 4936 xcb_window_end (xcb_window_iterator_t i); 4937 4938 /** 4939 * Get the next element of the iterator 4940 * @param i Pointer to a xcb_pixmap_iterator_t 4941 * 4942 * Get the next element in the iterator. The member rem is 4943 * decreased by one. The member data points to the next 4944 * element. The member index is increased by sizeof(xcb_pixmap_t) 4945 */ 4946 void 4947 xcb_pixmap_next (xcb_pixmap_iterator_t *i); 4948 4949 /** 4950 * Return the iterator pointing to the last element 4951 * @param i An xcb_pixmap_iterator_t 4952 * @return The iterator pointing to the last element 4953 * 4954 * Set the current element in the iterator to the last element. 4955 * The member rem is set to 0. The member data points to the 4956 * last element. 4957 */ 4958 xcb_generic_iterator_t 4959 xcb_pixmap_end (xcb_pixmap_iterator_t i); 4960 4961 /** 4962 * Get the next element of the iterator 4963 * @param i Pointer to a xcb_cursor_iterator_t 4964 * 4965 * Get the next element in the iterator. The member rem is 4966 * decreased by one. The member data points to the next 4967 * element. The member index is increased by sizeof(xcb_cursor_t) 4968 */ 4969 void 4970 xcb_cursor_next (xcb_cursor_iterator_t *i); 4971 4972 /** 4973 * Return the iterator pointing to the last element 4974 * @param i An xcb_cursor_iterator_t 4975 * @return The iterator pointing to the last element 4976 * 4977 * Set the current element in the iterator to the last element. 4978 * The member rem is set to 0. The member data points to the 4979 * last element. 4980 */ 4981 xcb_generic_iterator_t 4982 xcb_cursor_end (xcb_cursor_iterator_t i); 4983 4984 /** 4985 * Get the next element of the iterator 4986 * @param i Pointer to a xcb_font_iterator_t 4987 * 4988 * Get the next element in the iterator. The member rem is 4989 * decreased by one. The member data points to the next 4990 * element. The member index is increased by sizeof(xcb_font_t) 4991 */ 4992 void 4993 xcb_font_next (xcb_font_iterator_t *i); 4994 4995 /** 4996 * Return the iterator pointing to the last element 4997 * @param i An xcb_font_iterator_t 4998 * @return The iterator pointing to the last element 4999 * 5000 * Set the current element in the iterator to the last element. 5001 * The member rem is set to 0. The member data points to the 5002 * last element. 5003 */ 5004 xcb_generic_iterator_t 5005 xcb_font_end (xcb_font_iterator_t i); 5006 5007 /** 5008 * Get the next element of the iterator 5009 * @param i Pointer to a xcb_gcontext_iterator_t 5010 * 5011 * Get the next element in the iterator. The member rem is 5012 * decreased by one. The member data points to the next 5013 * element. The member index is increased by sizeof(xcb_gcontext_t) 5014 */ 5015 void 5016 xcb_gcontext_next (xcb_gcontext_iterator_t *i); 5017 5018 /** 5019 * Return the iterator pointing to the last element 5020 * @param i An xcb_gcontext_iterator_t 5021 * @return The iterator pointing to the last element 5022 * 5023 * Set the current element in the iterator to the last element. 5024 * The member rem is set to 0. The member data points to the 5025 * last element. 5026 */ 5027 xcb_generic_iterator_t 5028 xcb_gcontext_end (xcb_gcontext_iterator_t i); 5029 5030 /** 5031 * Get the next element of the iterator 5032 * @param i Pointer to a xcb_colormap_iterator_t 5033 * 5034 * Get the next element in the iterator. The member rem is 5035 * decreased by one. The member data points to the next 5036 * element. The member index is increased by sizeof(xcb_colormap_t) 5037 */ 5038 void 5039 xcb_colormap_next (xcb_colormap_iterator_t *i); 5040 5041 /** 5042 * Return the iterator pointing to the last element 5043 * @param i An xcb_colormap_iterator_t 5044 * @return The iterator pointing to the last element 5045 * 5046 * Set the current element in the iterator to the last element. 5047 * The member rem is set to 0. The member data points to the 5048 * last element. 5049 */ 5050 xcb_generic_iterator_t 5051 xcb_colormap_end (xcb_colormap_iterator_t i); 5052 5053 /** 5054 * Get the next element of the iterator 5055 * @param i Pointer to a xcb_atom_iterator_t 5056 * 5057 * Get the next element in the iterator. The member rem is 5058 * decreased by one. The member data points to the next 5059 * element. The member index is increased by sizeof(xcb_atom_t) 5060 */ 5061 void 5062 xcb_atom_next (xcb_atom_iterator_t *i); 5063 5064 /** 5065 * Return the iterator pointing to the last element 5066 * @param i An xcb_atom_iterator_t 5067 * @return The iterator pointing to the last element 5068 * 5069 * Set the current element in the iterator to the last element. 5070 * The member rem is set to 0. The member data points to the 5071 * last element. 5072 */ 5073 xcb_generic_iterator_t 5074 xcb_atom_end (xcb_atom_iterator_t i); 5075 5076 /** 5077 * Get the next element of the iterator 5078 * @param i Pointer to a xcb_drawable_iterator_t 5079 * 5080 * Get the next element in the iterator. The member rem is 5081 * decreased by one. The member data points to the next 5082 * element. The member index is increased by sizeof(xcb_drawable_t) 5083 */ 5084 void 5085 xcb_drawable_next (xcb_drawable_iterator_t *i); 5086 5087 /** 5088 * Return the iterator pointing to the last element 5089 * @param i An xcb_drawable_iterator_t 5090 * @return The iterator pointing to the last element 5091 * 5092 * Set the current element in the iterator to the last element. 5093 * The member rem is set to 0. The member data points to the 5094 * last element. 5095 */ 5096 xcb_generic_iterator_t 5097 xcb_drawable_end (xcb_drawable_iterator_t i); 5098 5099 /** 5100 * Get the next element of the iterator 5101 * @param i Pointer to a xcb_fontable_iterator_t 5102 * 5103 * Get the next element in the iterator. The member rem is 5104 * decreased by one. The member data points to the next 5105 * element. The member index is increased by sizeof(xcb_fontable_t) 5106 */ 5107 void 5108 xcb_fontable_next (xcb_fontable_iterator_t *i); 5109 5110 /** 5111 * Return the iterator pointing to the last element 5112 * @param i An xcb_fontable_iterator_t 5113 * @return The iterator pointing to the last element 5114 * 5115 * Set the current element in the iterator to the last element. 5116 * The member rem is set to 0. The member data points to the 5117 * last element. 5118 */ 5119 xcb_generic_iterator_t 5120 xcb_fontable_end (xcb_fontable_iterator_t i); 5121 5122 /** 5123 * Get the next element of the iterator 5124 * @param i Pointer to a xcb_bool32_iterator_t 5125 * 5126 * Get the next element in the iterator. The member rem is 5127 * decreased by one. The member data points to the next 5128 * element. The member index is increased by sizeof(xcb_bool32_t) 5129 */ 5130 void 5131 xcb_bool32_next (xcb_bool32_iterator_t *i); 5132 5133 /** 5134 * Return the iterator pointing to the last element 5135 * @param i An xcb_bool32_iterator_t 5136 * @return The iterator pointing to the last element 5137 * 5138 * Set the current element in the iterator to the last element. 5139 * The member rem is set to 0. The member data points to the 5140 * last element. 5141 */ 5142 xcb_generic_iterator_t 5143 xcb_bool32_end (xcb_bool32_iterator_t i); 5144 5145 /** 5146 * Get the next element of the iterator 5147 * @param i Pointer to a xcb_visualid_iterator_t 5148 * 5149 * Get the next element in the iterator. The member rem is 5150 * decreased by one. The member data points to the next 5151 * element. The member index is increased by sizeof(xcb_visualid_t) 5152 */ 5153 void 5154 xcb_visualid_next (xcb_visualid_iterator_t *i); 5155 5156 /** 5157 * Return the iterator pointing to the last element 5158 * @param i An xcb_visualid_iterator_t 5159 * @return The iterator pointing to the last element 5160 * 5161 * Set the current element in the iterator to the last element. 5162 * The member rem is set to 0. The member data points to the 5163 * last element. 5164 */ 5165 xcb_generic_iterator_t 5166 xcb_visualid_end (xcb_visualid_iterator_t i); 5167 5168 /** 5169 * Get the next element of the iterator 5170 * @param i Pointer to a xcb_timestamp_iterator_t 5171 * 5172 * Get the next element in the iterator. The member rem is 5173 * decreased by one. The member data points to the next 5174 * element. The member index is increased by sizeof(xcb_timestamp_t) 5175 */ 5176 void 5177 xcb_timestamp_next (xcb_timestamp_iterator_t *i); 5178 5179 /** 5180 * Return the iterator pointing to the last element 5181 * @param i An xcb_timestamp_iterator_t 5182 * @return The iterator pointing to the last element 5183 * 5184 * Set the current element in the iterator to the last element. 5185 * The member rem is set to 0. The member data points to the 5186 * last element. 5187 */ 5188 xcb_generic_iterator_t 5189 xcb_timestamp_end (xcb_timestamp_iterator_t i); 5190 5191 /** 5192 * Get the next element of the iterator 5193 * @param i Pointer to a xcb_keysym_iterator_t 5194 * 5195 * Get the next element in the iterator. The member rem is 5196 * decreased by one. The member data points to the next 5197 * element. The member index is increased by sizeof(xcb_keysym_t) 5198 */ 5199 void 5200 xcb_keysym_next (xcb_keysym_iterator_t *i); 5201 5202 /** 5203 * Return the iterator pointing to the last element 5204 * @param i An xcb_keysym_iterator_t 5205 * @return The iterator pointing to the last element 5206 * 5207 * Set the current element in the iterator to the last element. 5208 * The member rem is set to 0. The member data points to the 5209 * last element. 5210 */ 5211 xcb_generic_iterator_t 5212 xcb_keysym_end (xcb_keysym_iterator_t i); 5213 5214 /** 5215 * Get the next element of the iterator 5216 * @param i Pointer to a xcb_keycode_iterator_t 5217 * 5218 * Get the next element in the iterator. The member rem is 5219 * decreased by one. The member data points to the next 5220 * element. The member index is increased by sizeof(xcb_keycode_t) 5221 */ 5222 void 5223 xcb_keycode_next (xcb_keycode_iterator_t *i); 5224 5225 /** 5226 * Return the iterator pointing to the last element 5227 * @param i An xcb_keycode_iterator_t 5228 * @return The iterator pointing to the last element 5229 * 5230 * Set the current element in the iterator to the last element. 5231 * The member rem is set to 0. The member data points to the 5232 * last element. 5233 */ 5234 xcb_generic_iterator_t 5235 xcb_keycode_end (xcb_keycode_iterator_t i); 5236 5237 /** 5238 * Get the next element of the iterator 5239 * @param i Pointer to a xcb_keycode32_iterator_t 5240 * 5241 * Get the next element in the iterator. The member rem is 5242 * decreased by one. The member data points to the next 5243 * element. The member index is increased by sizeof(xcb_keycode32_t) 5244 */ 5245 void 5246 xcb_keycode32_next (xcb_keycode32_iterator_t *i); 5247 5248 /** 5249 * Return the iterator pointing to the last element 5250 * @param i An xcb_keycode32_iterator_t 5251 * @return The iterator pointing to the last element 5252 * 5253 * Set the current element in the iterator to the last element. 5254 * The member rem is set to 0. The member data points to the 5255 * last element. 5256 */ 5257 xcb_generic_iterator_t 5258 xcb_keycode32_end (xcb_keycode32_iterator_t i); 5259 5260 /** 5261 * Get the next element of the iterator 5262 * @param i Pointer to a xcb_button_iterator_t 5263 * 5264 * Get the next element in the iterator. The member rem is 5265 * decreased by one. The member data points to the next 5266 * element. The member index is increased by sizeof(xcb_button_t) 5267 */ 5268 void 5269 xcb_button_next (xcb_button_iterator_t *i); 5270 5271 /** 5272 * Return the iterator pointing to the last element 5273 * @param i An xcb_button_iterator_t 5274 * @return The iterator pointing to the last element 5275 * 5276 * Set the current element in the iterator to the last element. 5277 * The member rem is set to 0. The member data points to the 5278 * last element. 5279 */ 5280 xcb_generic_iterator_t 5281 xcb_button_end (xcb_button_iterator_t i); 5282 5283 /** 5284 * Get the next element of the iterator 5285 * @param i Pointer to a xcb_point_iterator_t 5286 * 5287 * Get the next element in the iterator. The member rem is 5288 * decreased by one. The member data points to the next 5289 * element. The member index is increased by sizeof(xcb_point_t) 5290 */ 5291 void 5292 xcb_point_next (xcb_point_iterator_t *i); 5293 5294 /** 5295 * Return the iterator pointing to the last element 5296 * @param i An xcb_point_iterator_t 5297 * @return The iterator pointing to the last element 5298 * 5299 * Set the current element in the iterator to the last element. 5300 * The member rem is set to 0. The member data points to the 5301 * last element. 5302 */ 5303 xcb_generic_iterator_t 5304 xcb_point_end (xcb_point_iterator_t i); 5305 5306 /** 5307 * Get the next element of the iterator 5308 * @param i Pointer to a xcb_rectangle_iterator_t 5309 * 5310 * Get the next element in the iterator. The member rem is 5311 * decreased by one. The member data points to the next 5312 * element. The member index is increased by sizeof(xcb_rectangle_t) 5313 */ 5314 void 5315 xcb_rectangle_next (xcb_rectangle_iterator_t *i); 5316 5317 /** 5318 * Return the iterator pointing to the last element 5319 * @param i An xcb_rectangle_iterator_t 5320 * @return The iterator pointing to the last element 5321 * 5322 * Set the current element in the iterator to the last element. 5323 * The member rem is set to 0. The member data points to the 5324 * last element. 5325 */ 5326 xcb_generic_iterator_t 5327 xcb_rectangle_end (xcb_rectangle_iterator_t i); 5328 5329 /** 5330 * Get the next element of the iterator 5331 * @param i Pointer to a xcb_arc_iterator_t 5332 * 5333 * Get the next element in the iterator. The member rem is 5334 * decreased by one. The member data points to the next 5335 * element. The member index is increased by sizeof(xcb_arc_t) 5336 */ 5337 void 5338 xcb_arc_next (xcb_arc_iterator_t *i); 5339 5340 /** 5341 * Return the iterator pointing to the last element 5342 * @param i An xcb_arc_iterator_t 5343 * @return The iterator pointing to the last element 5344 * 5345 * Set the current element in the iterator to the last element. 5346 * The member rem is set to 0. The member data points to the 5347 * last element. 5348 */ 5349 xcb_generic_iterator_t 5350 xcb_arc_end (xcb_arc_iterator_t i); 5351 5352 /** 5353 * Get the next element of the iterator 5354 * @param i Pointer to a xcb_format_iterator_t 5355 * 5356 * Get the next element in the iterator. The member rem is 5357 * decreased by one. The member data points to the next 5358 * element. The member index is increased by sizeof(xcb_format_t) 5359 */ 5360 void 5361 xcb_format_next (xcb_format_iterator_t *i); 5362 5363 /** 5364 * Return the iterator pointing to the last element 5365 * @param i An xcb_format_iterator_t 5366 * @return The iterator pointing to the last element 5367 * 5368 * Set the current element in the iterator to the last element. 5369 * The member rem is set to 0. The member data points to the 5370 * last element. 5371 */ 5372 xcb_generic_iterator_t 5373 xcb_format_end (xcb_format_iterator_t i); 5374 5375 /** 5376 * Get the next element of the iterator 5377 * @param i Pointer to a xcb_visualtype_iterator_t 5378 * 5379 * Get the next element in the iterator. The member rem is 5380 * decreased by one. The member data points to the next 5381 * element. The member index is increased by sizeof(xcb_visualtype_t) 5382 */ 5383 void 5384 xcb_visualtype_next (xcb_visualtype_iterator_t *i); 5385 5386 /** 5387 * Return the iterator pointing to the last element 5388 * @param i An xcb_visualtype_iterator_t 5389 * @return The iterator pointing to the last element 5390 * 5391 * Set the current element in the iterator to the last element. 5392 * The member rem is set to 0. The member data points to the 5393 * last element. 5394 */ 5395 xcb_generic_iterator_t 5396 xcb_visualtype_end (xcb_visualtype_iterator_t i); 5397 5398 int 5399 xcb_depth_sizeof (const void *_buffer); 5400 5401 xcb_visualtype_t * 5402 xcb_depth_visuals (const xcb_depth_t *R); 5403 5404 int 5405 xcb_depth_visuals_length (const xcb_depth_t *R); 5406 5407 xcb_visualtype_iterator_t 5408 xcb_depth_visuals_iterator (const xcb_depth_t *R); 5409 5410 /** 5411 * Get the next element of the iterator 5412 * @param i Pointer to a xcb_depth_iterator_t 5413 * 5414 * Get the next element in the iterator. The member rem is 5415 * decreased by one. The member data points to the next 5416 * element. The member index is increased by sizeof(xcb_depth_t) 5417 */ 5418 void 5419 xcb_depth_next (xcb_depth_iterator_t *i); 5420 5421 /** 5422 * Return the iterator pointing to the last element 5423 * @param i An xcb_depth_iterator_t 5424 * @return The iterator pointing to the last element 5425 * 5426 * Set the current element in the iterator to the last element. 5427 * The member rem is set to 0. The member data points to the 5428 * last element. 5429 */ 5430 xcb_generic_iterator_t 5431 xcb_depth_end (xcb_depth_iterator_t i); 5432 5433 int 5434 xcb_screen_sizeof (const void *_buffer); 5435 5436 int 5437 xcb_screen_allowed_depths_length (const xcb_screen_t *R); 5438 5439 xcb_depth_iterator_t 5440 xcb_screen_allowed_depths_iterator (const xcb_screen_t *R); 5441 5442 /** 5443 * Get the next element of the iterator 5444 * @param i Pointer to a xcb_screen_iterator_t 5445 * 5446 * Get the next element in the iterator. The member rem is 5447 * decreased by one. The member data points to the next 5448 * element. The member index is increased by sizeof(xcb_screen_t) 5449 */ 5450 void 5451 xcb_screen_next (xcb_screen_iterator_t *i); 5452 5453 /** 5454 * Return the iterator pointing to the last element 5455 * @param i An xcb_screen_iterator_t 5456 * @return The iterator pointing to the last element 5457 * 5458 * Set the current element in the iterator to the last element. 5459 * The member rem is set to 0. The member data points to the 5460 * last element. 5461 */ 5462 xcb_generic_iterator_t 5463 xcb_screen_end (xcb_screen_iterator_t i); 5464 5465 int 5466 xcb_setup_request_sizeof (const void *_buffer); 5467 5468 char * 5469 xcb_setup_request_authorization_protocol_name (const xcb_setup_request_t *R); 5470 5471 int 5472 xcb_setup_request_authorization_protocol_name_length (const xcb_setup_request_t *R); 5473 5474 xcb_generic_iterator_t 5475 xcb_setup_request_authorization_protocol_name_end (const xcb_setup_request_t *R); 5476 5477 char * 5478 xcb_setup_request_authorization_protocol_data (const xcb_setup_request_t *R); 5479 5480 int 5481 xcb_setup_request_authorization_protocol_data_length (const xcb_setup_request_t *R); 5482 5483 xcb_generic_iterator_t 5484 xcb_setup_request_authorization_protocol_data_end (const xcb_setup_request_t *R); 5485 5486 /** 5487 * Get the next element of the iterator 5488 * @param i Pointer to a xcb_setup_request_iterator_t 5489 * 5490 * Get the next element in the iterator. The member rem is 5491 * decreased by one. The member data points to the next 5492 * element. The member index is increased by sizeof(xcb_setup_request_t) 5493 */ 5494 void 5495 xcb_setup_request_next (xcb_setup_request_iterator_t *i); 5496 5497 /** 5498 * Return the iterator pointing to the last element 5499 * @param i An xcb_setup_request_iterator_t 5500 * @return The iterator pointing to the last element 5501 * 5502 * Set the current element in the iterator to the last element. 5503 * The member rem is set to 0. The member data points to the 5504 * last element. 5505 */ 5506 xcb_generic_iterator_t 5507 xcb_setup_request_end (xcb_setup_request_iterator_t i); 5508 5509 int 5510 xcb_setup_failed_sizeof (const void *_buffer); 5511 5512 char * 5513 xcb_setup_failed_reason (const xcb_setup_failed_t *R); 5514 5515 int 5516 xcb_setup_failed_reason_length (const xcb_setup_failed_t *R); 5517 5518 xcb_generic_iterator_t 5519 xcb_setup_failed_reason_end (const xcb_setup_failed_t *R); 5520 5521 /** 5522 * Get the next element of the iterator 5523 * @param i Pointer to a xcb_setup_failed_iterator_t 5524 * 5525 * Get the next element in the iterator. The member rem is 5526 * decreased by one. The member data points to the next 5527 * element. The member index is increased by sizeof(xcb_setup_failed_t) 5528 */ 5529 void 5530 xcb_setup_failed_next (xcb_setup_failed_iterator_t *i); 5531 5532 /** 5533 * Return the iterator pointing to the last element 5534 * @param i An xcb_setup_failed_iterator_t 5535 * @return The iterator pointing to the last element 5536 * 5537 * Set the current element in the iterator to the last element. 5538 * The member rem is set to 0. The member data points to the 5539 * last element. 5540 */ 5541 xcb_generic_iterator_t 5542 xcb_setup_failed_end (xcb_setup_failed_iterator_t i); 5543 5544 int 5545 xcb_setup_authenticate_sizeof (const void *_buffer); 5546 5547 char * 5548 xcb_setup_authenticate_reason (const xcb_setup_authenticate_t *R); 5549 5550 int 5551 xcb_setup_authenticate_reason_length (const xcb_setup_authenticate_t *R); 5552 5553 xcb_generic_iterator_t 5554 xcb_setup_authenticate_reason_end (const xcb_setup_authenticate_t *R); 5555 5556 /** 5557 * Get the next element of the iterator 5558 * @param i Pointer to a xcb_setup_authenticate_iterator_t 5559 * 5560 * Get the next element in the iterator. The member rem is 5561 * decreased by one. The member data points to the next 5562 * element. The member index is increased by sizeof(xcb_setup_authenticate_t) 5563 */ 5564 void 5565 xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i); 5566 5567 /** 5568 * Return the iterator pointing to the last element 5569 * @param i An xcb_setup_authenticate_iterator_t 5570 * @return The iterator pointing to the last element 5571 * 5572 * Set the current element in the iterator to the last element. 5573 * The member rem is set to 0. The member data points to the 5574 * last element. 5575 */ 5576 xcb_generic_iterator_t 5577 xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i); 5578 5579 int 5580 xcb_setup_sizeof (const void *_buffer); 5581 5582 char * 5583 xcb_setup_vendor (const xcb_setup_t *R); 5584 5585 int 5586 xcb_setup_vendor_length (const xcb_setup_t *R); 5587 5588 xcb_generic_iterator_t 5589 xcb_setup_vendor_end (const xcb_setup_t *R); 5590 5591 xcb_format_t * 5592 xcb_setup_pixmap_formats (const xcb_setup_t *R); 5593 5594 int 5595 xcb_setup_pixmap_formats_length (const xcb_setup_t *R); 5596 5597 xcb_format_iterator_t 5598 xcb_setup_pixmap_formats_iterator (const xcb_setup_t *R); 5599 5600 int 5601 xcb_setup_roots_length (const xcb_setup_t *R); 5602 5603 xcb_screen_iterator_t 5604 xcb_setup_roots_iterator (const xcb_setup_t *R); 5605 5606 /** 5607 * Get the next element of the iterator 5608 * @param i Pointer to a xcb_setup_iterator_t 5609 * 5610 * Get the next element in the iterator. The member rem is 5611 * decreased by one. The member data points to the next 5612 * element. The member index is increased by sizeof(xcb_setup_t) 5613 */ 5614 void 5615 xcb_setup_next (xcb_setup_iterator_t *i); 5616 5617 /** 5618 * Return the iterator pointing to the last element 5619 * @param i An xcb_setup_iterator_t 5620 * @return The iterator pointing to the last element 5621 * 5622 * Set the current element in the iterator to the last element. 5623 * The member rem is set to 0. The member data points to the 5624 * last element. 5625 */ 5626 xcb_generic_iterator_t 5627 xcb_setup_end (xcb_setup_iterator_t i); 5628 5629 /** 5630 * Get the next element of the iterator 5631 * @param i Pointer to a xcb_client_message_data_iterator_t 5632 * 5633 * Get the next element in the iterator. The member rem is 5634 * decreased by one. The member data points to the next 5635 * element. The member index is increased by sizeof(xcb_client_message_data_t) 5636 */ 5637 void 5638 xcb_client_message_data_next (xcb_client_message_data_iterator_t *i); 5639 5640 /** 5641 * Return the iterator pointing to the last element 5642 * @param i An xcb_client_message_data_iterator_t 5643 * @return The iterator pointing to the last element 5644 * 5645 * Set the current element in the iterator to the last element. 5646 * The member rem is set to 0. The member data points to the 5647 * last element. 5648 */ 5649 xcb_generic_iterator_t 5650 xcb_client_message_data_end (xcb_client_message_data_iterator_t i); 5651 5652 int 5653 xcb_create_window_value_list_serialize (void **_buffer, 5654 uint32_t value_mask, 5655 const xcb_create_window_value_list_t *_aux); 5656 5657 int 5658 xcb_create_window_value_list_unpack (const void *_buffer, 5659 uint32_t value_mask, 5660 xcb_create_window_value_list_t *_aux); 5661 5662 int 5663 xcb_create_window_value_list_sizeof (const void *_buffer, 5664 uint32_t value_mask); 5665 5666 int 5667 xcb_create_window_sizeof (const void *_buffer); 5668 5669 /** 5670 * @brief Creates a window 5671 * 5672 * @param c The connection 5673 * @param depth Specifies the new window's depth (TODO: what unit?). 5674 * \n 5675 * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the 5676 * \a parent window. 5677 * @param wid The ID with which you will refer to the new window, created by 5678 * `xcb_generate_id`. 5679 * @param parent The parent window of the new window. 5680 * @param x The X coordinate of the new window. 5681 * @param y The Y coordinate of the new window. 5682 * @param width The width of the new window. 5683 * @param height The height of the new window. 5684 * @param border_width TODO: 5685 * \n 5686 * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. 5687 * @param _class A bitmask of #xcb_window_class_t values. 5688 * @param _class \n 5689 * @param visual Specifies the id for the new window's visual. 5690 * \n 5691 * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the 5692 * \a parent window. 5693 * @param value_mask A bitmask of #xcb_cw_t values. 5694 * @return A cookie 5695 * 5696 * Creates an unmapped window as child of the specified \a parent window. A 5697 * CreateNotify event will be generated. The new window is placed on top in the 5698 * stacking order with respect to siblings. 5699 * 5700 * The coordinate system has the X axis horizontal and the Y axis vertical with 5701 * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms 5702 * of pixels, and coincide with pixel centers. Each window and pixmap has its own 5703 * coordinate system. For a window, the origin is inside the border at the inside, 5704 * upper-left corner. 5705 * 5706 * The created window is not yet displayed (mapped), call `xcb_map_window` to 5707 * display it. 5708 * 5709 * The created window will initially use the same cursor as its parent. 5710 * 5711 * This form can be used only if the request will not cause 5712 * a reply to be generated. Any returned error will be 5713 * saved for handling by xcb_request_check(). 5714 */ 5715 xcb_void_cookie_t 5716 xcb_create_window_checked (xcb_connection_t *c, 5717 uint8_t depth, 5718 xcb_window_t wid, 5719 xcb_window_t parent, 5720 int16_t x, 5721 int16_t y, 5722 uint16_t width, 5723 uint16_t height, 5724 uint16_t border_width, 5725 uint16_t _class, 5726 xcb_visualid_t visual, 5727 uint32_t value_mask, 5728 const void *value_list); 5729 5730 /** 5731 * @brief Creates a window 5732 * 5733 * @param c The connection 5734 * @param depth Specifies the new window's depth (TODO: what unit?). 5735 * \n 5736 * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the 5737 * \a parent window. 5738 * @param wid The ID with which you will refer to the new window, created by 5739 * `xcb_generate_id`. 5740 * @param parent The parent window of the new window. 5741 * @param x The X coordinate of the new window. 5742 * @param y The Y coordinate of the new window. 5743 * @param width The width of the new window. 5744 * @param height The height of the new window. 5745 * @param border_width TODO: 5746 * \n 5747 * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. 5748 * @param _class A bitmask of #xcb_window_class_t values. 5749 * @param _class \n 5750 * @param visual Specifies the id for the new window's visual. 5751 * \n 5752 * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the 5753 * \a parent window. 5754 * @param value_mask A bitmask of #xcb_cw_t values. 5755 * @return A cookie 5756 * 5757 * Creates an unmapped window as child of the specified \a parent window. A 5758 * CreateNotify event will be generated. The new window is placed on top in the 5759 * stacking order with respect to siblings. 5760 * 5761 * The coordinate system has the X axis horizontal and the Y axis vertical with 5762 * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms 5763 * of pixels, and coincide with pixel centers. Each window and pixmap has its own 5764 * coordinate system. For a window, the origin is inside the border at the inside, 5765 * upper-left corner. 5766 * 5767 * The created window is not yet displayed (mapped), call `xcb_map_window` to 5768 * display it. 5769 * 5770 * The created window will initially use the same cursor as its parent. 5771 * 5772 */ 5773 xcb_void_cookie_t 5774 xcb_create_window (xcb_connection_t *c, 5775 uint8_t depth, 5776 xcb_window_t wid, 5777 xcb_window_t parent, 5778 int16_t x, 5779 int16_t y, 5780 uint16_t width, 5781 uint16_t height, 5782 uint16_t border_width, 5783 uint16_t _class, 5784 xcb_visualid_t visual, 5785 uint32_t value_mask, 5786 const void *value_list); 5787 5788 /** 5789 * @brief Creates a window 5790 * 5791 * @param c The connection 5792 * @param depth Specifies the new window's depth (TODO: what unit?). 5793 * \n 5794 * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the 5795 * \a parent window. 5796 * @param wid The ID with which you will refer to the new window, created by 5797 * `xcb_generate_id`. 5798 * @param parent The parent window of the new window. 5799 * @param x The X coordinate of the new window. 5800 * @param y The Y coordinate of the new window. 5801 * @param width The width of the new window. 5802 * @param height The height of the new window. 5803 * @param border_width TODO: 5804 * \n 5805 * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. 5806 * @param _class A bitmask of #xcb_window_class_t values. 5807 * @param _class \n 5808 * @param visual Specifies the id for the new window's visual. 5809 * \n 5810 * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the 5811 * \a parent window. 5812 * @param value_mask A bitmask of #xcb_cw_t values. 5813 * @return A cookie 5814 * 5815 * Creates an unmapped window as child of the specified \a parent window. A 5816 * CreateNotify event will be generated. The new window is placed on top in the 5817 * stacking order with respect to siblings. 5818 * 5819 * The coordinate system has the X axis horizontal and the Y axis vertical with 5820 * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms 5821 * of pixels, and coincide with pixel centers. Each window and pixmap has its own 5822 * coordinate system. For a window, the origin is inside the border at the inside, 5823 * upper-left corner. 5824 * 5825 * The created window is not yet displayed (mapped), call `xcb_map_window` to 5826 * display it. 5827 * 5828 * The created window will initially use the same cursor as its parent. 5829 * 5830 * This form can be used only if the request will not cause 5831 * a reply to be generated. Any returned error will be 5832 * saved for handling by xcb_request_check(). 5833 */ 5834 xcb_void_cookie_t 5835 xcb_create_window_aux_checked (xcb_connection_t *c, 5836 uint8_t depth, 5837 xcb_window_t wid, 5838 xcb_window_t parent, 5839 int16_t x, 5840 int16_t y, 5841 uint16_t width, 5842 uint16_t height, 5843 uint16_t border_width, 5844 uint16_t _class, 5845 xcb_visualid_t visual, 5846 uint32_t value_mask, 5847 const xcb_create_window_value_list_t *value_list); 5848 5849 /** 5850 * @brief Creates a window 5851 * 5852 * @param c The connection 5853 * @param depth Specifies the new window's depth (TODO: what unit?). 5854 * \n 5855 * The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the 5856 * \a parent window. 5857 * @param wid The ID with which you will refer to the new window, created by 5858 * `xcb_generate_id`. 5859 * @param parent The parent window of the new window. 5860 * @param x The X coordinate of the new window. 5861 * @param y The Y coordinate of the new window. 5862 * @param width The width of the new window. 5863 * @param height The height of the new window. 5864 * @param border_width TODO: 5865 * \n 5866 * Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. 5867 * @param _class A bitmask of #xcb_window_class_t values. 5868 * @param _class \n 5869 * @param visual Specifies the id for the new window's visual. 5870 * \n 5871 * The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the 5872 * \a parent window. 5873 * @param value_mask A bitmask of #xcb_cw_t values. 5874 * @return A cookie 5875 * 5876 * Creates an unmapped window as child of the specified \a parent window. A 5877 * CreateNotify event will be generated. The new window is placed on top in the 5878 * stacking order with respect to siblings. 5879 * 5880 * The coordinate system has the X axis horizontal and the Y axis vertical with 5881 * the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms 5882 * of pixels, and coincide with pixel centers. Each window and pixmap has its own 5883 * coordinate system. For a window, the origin is inside the border at the inside, 5884 * upper-left corner. 5885 * 5886 * The created window is not yet displayed (mapped), call `xcb_map_window` to 5887 * display it. 5888 * 5889 * The created window will initially use the same cursor as its parent. 5890 * 5891 */ 5892 xcb_void_cookie_t 5893 xcb_create_window_aux (xcb_connection_t *c, 5894 uint8_t depth, 5895 xcb_window_t wid, 5896 xcb_window_t parent, 5897 int16_t x, 5898 int16_t y, 5899 uint16_t width, 5900 uint16_t height, 5901 uint16_t border_width, 5902 uint16_t _class, 5903 xcb_visualid_t visual, 5904 uint32_t value_mask, 5905 const xcb_create_window_value_list_t *value_list); 5906 5907 void * 5908 xcb_create_window_value_list (const xcb_create_window_request_t *R); 5909 5910 int 5911 xcb_change_window_attributes_value_list_serialize (void **_buffer, 5912 uint32_t value_mask, 5913 const xcb_change_window_attributes_value_list_t *_aux); 5914 5915 int 5916 xcb_change_window_attributes_value_list_unpack (const void *_buffer, 5917 uint32_t value_mask, 5918 xcb_change_window_attributes_value_list_t *_aux); 5919 5920 int 5921 xcb_change_window_attributes_value_list_sizeof (const void *_buffer, 5922 uint32_t value_mask); 5923 5924 int 5925 xcb_change_window_attributes_sizeof (const void *_buffer); 5926 5927 /** 5928 * @brief change window attributes 5929 * 5930 * @param c The connection 5931 * @param window The window to change. 5932 * @param value_mask A bitmask of #xcb_cw_t values. 5933 * @param value_mask \n 5934 * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The 5935 * order has to correspond to the order of possible \a value_mask bits. See the 5936 * example. 5937 * @return A cookie 5938 * 5939 * Changes the attributes specified by \a value_mask for the specified \a window. 5940 * 5941 * This form can be used only if the request will not cause 5942 * a reply to be generated. Any returned error will be 5943 * saved for handling by xcb_request_check(). 5944 */ 5945 xcb_void_cookie_t 5946 xcb_change_window_attributes_checked (xcb_connection_t *c, 5947 xcb_window_t window, 5948 uint32_t value_mask, 5949 const void *value_list); 5950 5951 /** 5952 * @brief change window attributes 5953 * 5954 * @param c The connection 5955 * @param window The window to change. 5956 * @param value_mask A bitmask of #xcb_cw_t values. 5957 * @param value_mask \n 5958 * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The 5959 * order has to correspond to the order of possible \a value_mask bits. See the 5960 * example. 5961 * @return A cookie 5962 * 5963 * Changes the attributes specified by \a value_mask for the specified \a window. 5964 * 5965 */ 5966 xcb_void_cookie_t 5967 xcb_change_window_attributes (xcb_connection_t *c, 5968 xcb_window_t window, 5969 uint32_t value_mask, 5970 const void *value_list); 5971 5972 /** 5973 * @brief change window attributes 5974 * 5975 * @param c The connection 5976 * @param window The window to change. 5977 * @param value_mask A bitmask of #xcb_cw_t values. 5978 * @param value_mask \n 5979 * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The 5980 * order has to correspond to the order of possible \a value_mask bits. See the 5981 * example. 5982 * @return A cookie 5983 * 5984 * Changes the attributes specified by \a value_mask for the specified \a window. 5985 * 5986 * This form can be used only if the request will not cause 5987 * a reply to be generated. Any returned error will be 5988 * saved for handling by xcb_request_check(). 5989 */ 5990 xcb_void_cookie_t 5991 xcb_change_window_attributes_aux_checked (xcb_connection_t *c, 5992 xcb_window_t window, 5993 uint32_t value_mask, 5994 const xcb_change_window_attributes_value_list_t *value_list); 5995 5996 /** 5997 * @brief change window attributes 5998 * 5999 * @param c The connection 6000 * @param window The window to change. 6001 * @param value_mask A bitmask of #xcb_cw_t values. 6002 * @param value_mask \n 6003 * @param value_list Values for each of the attributes specified in the bitmask \a value_mask. The 6004 * order has to correspond to the order of possible \a value_mask bits. See the 6005 * example. 6006 * @return A cookie 6007 * 6008 * Changes the attributes specified by \a value_mask for the specified \a window. 6009 * 6010 */ 6011 xcb_void_cookie_t 6012 xcb_change_window_attributes_aux (xcb_connection_t *c, 6013 xcb_window_t window, 6014 uint32_t value_mask, 6015 const xcb_change_window_attributes_value_list_t *value_list); 6016 6017 void * 6018 xcb_change_window_attributes_value_list (const xcb_change_window_attributes_request_t *R); 6019 6020 /** 6021 * @brief Gets window attributes 6022 * 6023 * @param c The connection 6024 * @param window The window to get the attributes from. 6025 * @return A cookie 6026 * 6027 * Gets the current attributes for the specified \a window. 6028 * 6029 */ 6030 xcb_get_window_attributes_cookie_t 6031 xcb_get_window_attributes (xcb_connection_t *c, 6032 xcb_window_t window); 6033 6034 /** 6035 * @brief Gets window attributes 6036 * 6037 * @param c The connection 6038 * @param window The window to get the attributes from. 6039 * @return A cookie 6040 * 6041 * Gets the current attributes for the specified \a window. 6042 * 6043 * This form can be used only if the request will cause 6044 * a reply to be generated. Any returned error will be 6045 * placed in the event queue. 6046 */ 6047 xcb_get_window_attributes_cookie_t 6048 xcb_get_window_attributes_unchecked (xcb_connection_t *c, 6049 xcb_window_t window); 6050 6051 /** 6052 * Return the reply 6053 * @param c The connection 6054 * @param cookie The cookie 6055 * @param e The xcb_generic_error_t supplied 6056 * 6057 * Returns the reply of the request asked by 6058 * 6059 * The parameter @p e supplied to this function must be NULL if 6060 * xcb_get_window_attributes_unchecked(). is used. 6061 * Otherwise, it stores the error if any. 6062 * 6063 * The returned value must be freed by the caller using free(). 6064 */ 6065 xcb_get_window_attributes_reply_t * 6066 xcb_get_window_attributes_reply (xcb_connection_t *c, 6067 xcb_get_window_attributes_cookie_t cookie /**< */, 6068 xcb_generic_error_t **e); 6069 6070 /** 6071 * @brief Destroys a window 6072 * 6073 * @param c The connection 6074 * @param window The window to destroy. 6075 * @return A cookie 6076 * 6077 * Destroys the specified window and all of its subwindows. A DestroyNotify event 6078 * is generated for each destroyed window (a DestroyNotify event is first generated 6079 * for any given window's inferiors). If the window was mapped, it will be 6080 * automatically unmapped before destroying. 6081 * 6082 * Calling DestroyWindow on the root window will do nothing. 6083 * 6084 * This form can be used only if the request will not cause 6085 * a reply to be generated. Any returned error will be 6086 * saved for handling by xcb_request_check(). 6087 */ 6088 xcb_void_cookie_t 6089 xcb_destroy_window_checked (xcb_connection_t *c, 6090 xcb_window_t window); 6091 6092 /** 6093 * @brief Destroys a window 6094 * 6095 * @param c The connection 6096 * @param window The window to destroy. 6097 * @return A cookie 6098 * 6099 * Destroys the specified window and all of its subwindows. A DestroyNotify event 6100 * is generated for each destroyed window (a DestroyNotify event is first generated 6101 * for any given window's inferiors). If the window was mapped, it will be 6102 * automatically unmapped before destroying. 6103 * 6104 * Calling DestroyWindow on the root window will do nothing. 6105 * 6106 */ 6107 xcb_void_cookie_t 6108 xcb_destroy_window (xcb_connection_t *c, 6109 xcb_window_t window); 6110 6111 /** 6112 * 6113 * @param c The connection 6114 * @return A cookie 6115 * 6116 * Delivers a request to the X server. 6117 * 6118 * This form can be used only if the request will not cause 6119 * a reply to be generated. Any returned error will be 6120 * saved for handling by xcb_request_check(). 6121 */ 6122 xcb_void_cookie_t 6123 xcb_destroy_subwindows_checked (xcb_connection_t *c, 6124 xcb_window_t window); 6125 6126 /** 6127 * 6128 * @param c The connection 6129 * @return A cookie 6130 * 6131 * Delivers a request to the X server. 6132 * 6133 */ 6134 xcb_void_cookie_t 6135 xcb_destroy_subwindows (xcb_connection_t *c, 6136 xcb_window_t window); 6137 6138 /** 6139 * @brief Changes a client's save set 6140 * 6141 * @param c The connection 6142 * @param mode A bitmask of #xcb_set_mode_t values. 6143 * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. 6144 * @param window The window to add or delete to/from your save set. 6145 * @return A cookie 6146 * 6147 * TODO: explain what the save set is for. 6148 * 6149 * This function either adds or removes the specified window to the client's (your 6150 * application's) save set. 6151 * 6152 * This form can be used only if the request will not cause 6153 * a reply to be generated. Any returned error will be 6154 * saved for handling by xcb_request_check(). 6155 */ 6156 xcb_void_cookie_t 6157 xcb_change_save_set_checked (xcb_connection_t *c, 6158 uint8_t mode, 6159 xcb_window_t window); 6160 6161 /** 6162 * @brief Changes a client's save set 6163 * 6164 * @param c The connection 6165 * @param mode A bitmask of #xcb_set_mode_t values. 6166 * @param mode Insert to add the specified window to the save set or Delete to delete it from the save set. 6167 * @param window The window to add or delete to/from your save set. 6168 * @return A cookie 6169 * 6170 * TODO: explain what the save set is for. 6171 * 6172 * This function either adds or removes the specified window to the client's (your 6173 * application's) save set. 6174 * 6175 */ 6176 xcb_void_cookie_t 6177 xcb_change_save_set (xcb_connection_t *c, 6178 uint8_t mode, 6179 xcb_window_t window); 6180 6181 /** 6182 * @brief Reparents a window 6183 * 6184 * @param c The connection 6185 * @param window The window to reparent. 6186 * @param parent The new parent of the window. 6187 * @param x The X position of the window within its new parent. 6188 * @param y The Y position of the window within its new parent. 6189 * @return A cookie 6190 * 6191 * Makes the specified window a child of the specified parent window. If the 6192 * window is mapped, it will automatically be unmapped before reparenting and 6193 * re-mapped after reparenting. The window is placed in the stacking order on top 6194 * with respect to sibling windows. 6195 * 6196 * After reparenting, a ReparentNotify event is generated. 6197 * 6198 * This form can be used only if the request will not cause 6199 * a reply to be generated. Any returned error will be 6200 * saved for handling by xcb_request_check(). 6201 */ 6202 xcb_void_cookie_t 6203 xcb_reparent_window_checked (xcb_connection_t *c, 6204 xcb_window_t window, 6205 xcb_window_t parent, 6206 int16_t x, 6207 int16_t y); 6208 6209 /** 6210 * @brief Reparents a window 6211 * 6212 * @param c The connection 6213 * @param window The window to reparent. 6214 * @param parent The new parent of the window. 6215 * @param x The X position of the window within its new parent. 6216 * @param y The Y position of the window within its new parent. 6217 * @return A cookie 6218 * 6219 * Makes the specified window a child of the specified parent window. If the 6220 * window is mapped, it will automatically be unmapped before reparenting and 6221 * re-mapped after reparenting. The window is placed in the stacking order on top 6222 * with respect to sibling windows. 6223 * 6224 * After reparenting, a ReparentNotify event is generated. 6225 * 6226 */ 6227 xcb_void_cookie_t 6228 xcb_reparent_window (xcb_connection_t *c, 6229 xcb_window_t window, 6230 xcb_window_t parent, 6231 int16_t x, 6232 int16_t y); 6233 6234 /** 6235 * @brief Makes a window visible 6236 * 6237 * @param c The connection 6238 * @param window The window to make visible. 6239 * @return A cookie 6240 * 6241 * Maps the specified window. This means making the window visible (as long as its 6242 * parent is visible). 6243 * 6244 * This MapWindow request will be translated to a MapRequest request if a window 6245 * manager is running. The window manager then decides to either map the window or 6246 * not. Set the override-redirect window attribute to true if you want to bypass 6247 * this mechanism. 6248 * 6249 * If the window manager decides to map the window (or if no window manager is 6250 * running), a MapNotify event is generated. 6251 * 6252 * If the window becomes viewable and no earlier contents for it are remembered, 6253 * the X server tiles the window with its background. If the window's background 6254 * is undefined, the existing screen contents are not altered, and the X server 6255 * generates zero or more Expose events. 6256 * 6257 * If the window type is InputOutput, an Expose event will be generated when the 6258 * window becomes visible. The normal response to an Expose event should be to 6259 * repaint the window. 6260 * 6261 * This form can be used only if the request will not cause 6262 * a reply to be generated. Any returned error will be 6263 * saved for handling by xcb_request_check(). 6264 */ 6265 xcb_void_cookie_t 6266 xcb_map_window_checked (xcb_connection_t *c, 6267 xcb_window_t window); 6268 6269 /** 6270 * @brief Makes a window visible 6271 * 6272 * @param c The connection 6273 * @param window The window to make visible. 6274 * @return A cookie 6275 * 6276 * Maps the specified window. This means making the window visible (as long as its 6277 * parent is visible). 6278 * 6279 * This MapWindow request will be translated to a MapRequest request if a window 6280 * manager is running. The window manager then decides to either map the window or 6281 * not. Set the override-redirect window attribute to true if you want to bypass 6282 * this mechanism. 6283 * 6284 * If the window manager decides to map the window (or if no window manager is 6285 * running), a MapNotify event is generated. 6286 * 6287 * If the window becomes viewable and no earlier contents for it are remembered, 6288 * the X server tiles the window with its background. If the window's background 6289 * is undefined, the existing screen contents are not altered, and the X server 6290 * generates zero or more Expose events. 6291 * 6292 * If the window type is InputOutput, an Expose event will be generated when the 6293 * window becomes visible. The normal response to an Expose event should be to 6294 * repaint the window. 6295 * 6296 */ 6297 xcb_void_cookie_t 6298 xcb_map_window (xcb_connection_t *c, 6299 xcb_window_t window); 6300 6301 /** 6302 * 6303 * @param c The connection 6304 * @return A cookie 6305 * 6306 * Delivers a request to the X server. 6307 * 6308 * This form can be used only if the request will not cause 6309 * a reply to be generated. Any returned error will be 6310 * saved for handling by xcb_request_check(). 6311 */ 6312 xcb_void_cookie_t 6313 xcb_map_subwindows_checked (xcb_connection_t *c, 6314 xcb_window_t window); 6315 6316 /** 6317 * 6318 * @param c The connection 6319 * @return A cookie 6320 * 6321 * Delivers a request to the X server. 6322 * 6323 */ 6324 xcb_void_cookie_t 6325 xcb_map_subwindows (xcb_connection_t *c, 6326 xcb_window_t window); 6327 6328 /** 6329 * @brief Makes a window invisible 6330 * 6331 * @param c The connection 6332 * @param window The window to make invisible. 6333 * @return A cookie 6334 * 6335 * Unmaps the specified window. This means making the window invisible (and all 6336 * its child windows). 6337 * 6338 * Unmapping a window leads to the `UnmapNotify` event being generated. Also, 6339 * `Expose` events are generated for formerly obscured windows. 6340 * 6341 * This form can be used only if the request will not cause 6342 * a reply to be generated. Any returned error will be 6343 * saved for handling by xcb_request_check(). 6344 */ 6345 xcb_void_cookie_t 6346 xcb_unmap_window_checked (xcb_connection_t *c, 6347 xcb_window_t window); 6348 6349 /** 6350 * @brief Makes a window invisible 6351 * 6352 * @param c The connection 6353 * @param window The window to make invisible. 6354 * @return A cookie 6355 * 6356 * Unmaps the specified window. This means making the window invisible (and all 6357 * its child windows). 6358 * 6359 * Unmapping a window leads to the `UnmapNotify` event being generated. Also, 6360 * `Expose` events are generated for formerly obscured windows. 6361 * 6362 */ 6363 xcb_void_cookie_t 6364 xcb_unmap_window (xcb_connection_t *c, 6365 xcb_window_t window); 6366 6367 /** 6368 * 6369 * @param c The connection 6370 * @return A cookie 6371 * 6372 * Delivers a request to the X server. 6373 * 6374 * This form can be used only if the request will not cause 6375 * a reply to be generated. Any returned error will be 6376 * saved for handling by xcb_request_check(). 6377 */ 6378 xcb_void_cookie_t 6379 xcb_unmap_subwindows_checked (xcb_connection_t *c, 6380 xcb_window_t window); 6381 6382 /** 6383 * 6384 * @param c The connection 6385 * @return A cookie 6386 * 6387 * Delivers a request to the X server. 6388 * 6389 */ 6390 xcb_void_cookie_t 6391 xcb_unmap_subwindows (xcb_connection_t *c, 6392 xcb_window_t window); 6393 6394 int 6395 xcb_configure_window_value_list_serialize (void **_buffer, 6396 uint16_t value_mask, 6397 const xcb_configure_window_value_list_t *_aux); 6398 6399 int 6400 xcb_configure_window_value_list_unpack (const void *_buffer, 6401 uint16_t value_mask, 6402 xcb_configure_window_value_list_t *_aux); 6403 6404 int 6405 xcb_configure_window_value_list_sizeof (const void *_buffer, 6406 uint16_t value_mask); 6407 6408 int 6409 xcb_configure_window_sizeof (const void *_buffer); 6410 6411 /** 6412 * @brief Configures window attributes 6413 * 6414 * @param c The connection 6415 * @param window The window to configure. 6416 * @param value_mask Bitmask of attributes to change. 6417 * @param value_list New values, corresponding to the attributes in value_mask. The order has to 6418 * correspond to the order of possible \a value_mask bits. See the example. 6419 * @return A cookie 6420 * 6421 * Configures a window's size, position, border width and stacking order. 6422 * 6423 * This form can be used only if the request will not cause 6424 * a reply to be generated. Any returned error will be 6425 * saved for handling by xcb_request_check(). 6426 */ 6427 xcb_void_cookie_t 6428 xcb_configure_window_checked (xcb_connection_t *c, 6429 xcb_window_t window, 6430 uint16_t value_mask, 6431 const void *value_list); 6432 6433 /** 6434 * @brief Configures window attributes 6435 * 6436 * @param c The connection 6437 * @param window The window to configure. 6438 * @param value_mask Bitmask of attributes to change. 6439 * @param value_list New values, corresponding to the attributes in value_mask. The order has to 6440 * correspond to the order of possible \a value_mask bits. See the example. 6441 * @return A cookie 6442 * 6443 * Configures a window's size, position, border width and stacking order. 6444 * 6445 */ 6446 xcb_void_cookie_t 6447 xcb_configure_window (xcb_connection_t *c, 6448 xcb_window_t window, 6449 uint16_t value_mask, 6450 const void *value_list); 6451 6452 /** 6453 * @brief Configures window attributes 6454 * 6455 * @param c The connection 6456 * @param window The window to configure. 6457 * @param value_mask Bitmask of attributes to change. 6458 * @param value_list New values, corresponding to the attributes in value_mask. The order has to 6459 * correspond to the order of possible \a value_mask bits. See the example. 6460 * @return A cookie 6461 * 6462 * Configures a window's size, position, border width and stacking order. 6463 * 6464 * This form can be used only if the request will not cause 6465 * a reply to be generated. Any returned error will be 6466 * saved for handling by xcb_request_check(). 6467 */ 6468 xcb_void_cookie_t 6469 xcb_configure_window_aux_checked (xcb_connection_t *c, 6470 xcb_window_t window, 6471 uint16_t value_mask, 6472 const xcb_configure_window_value_list_t *value_list); 6473 6474 /** 6475 * @brief Configures window attributes 6476 * 6477 * @param c The connection 6478 * @param window The window to configure. 6479 * @param value_mask Bitmask of attributes to change. 6480 * @param value_list New values, corresponding to the attributes in value_mask. The order has to 6481 * correspond to the order of possible \a value_mask bits. See the example. 6482 * @return A cookie 6483 * 6484 * Configures a window's size, position, border width and stacking order. 6485 * 6486 */ 6487 xcb_void_cookie_t 6488 xcb_configure_window_aux (xcb_connection_t *c, 6489 xcb_window_t window, 6490 uint16_t value_mask, 6491 const xcb_configure_window_value_list_t *value_list); 6492 6493 void * 6494 xcb_configure_window_value_list (const xcb_configure_window_request_t *R); 6495 6496 /** 6497 * @brief Change window stacking order 6498 * 6499 * @param c The connection 6500 * @param direction A bitmask of #xcb_circulate_t values. 6501 * @param direction \n 6502 * @param window The window to raise/lower (depending on \a direction). 6503 * @return A cookie 6504 * 6505 * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if 6506 * any) will be raised to the top of the stack. 6507 * 6508 * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will 6509 * be lowered to the bottom of the stack. 6510 * 6511 * This form can be used only if the request will not cause 6512 * a reply to be generated. Any returned error will be 6513 * saved for handling by xcb_request_check(). 6514 */ 6515 xcb_void_cookie_t 6516 xcb_circulate_window_checked (xcb_connection_t *c, 6517 uint8_t direction, 6518 xcb_window_t window); 6519 6520 /** 6521 * @brief Change window stacking order 6522 * 6523 * @param c The connection 6524 * @param direction A bitmask of #xcb_circulate_t values. 6525 * @param direction \n 6526 * @param window The window to raise/lower (depending on \a direction). 6527 * @return A cookie 6528 * 6529 * If \a direction is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if 6530 * any) will be raised to the top of the stack. 6531 * 6532 * If \a direction is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will 6533 * be lowered to the bottom of the stack. 6534 * 6535 */ 6536 xcb_void_cookie_t 6537 xcb_circulate_window (xcb_connection_t *c, 6538 uint8_t direction, 6539 xcb_window_t window); 6540 6541 /** 6542 * @brief Get current window geometry 6543 * 6544 * @param c The connection 6545 * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. 6546 * @return A cookie 6547 * 6548 * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). 6549 * 6550 */ 6551 xcb_get_geometry_cookie_t 6552 xcb_get_geometry (xcb_connection_t *c, 6553 xcb_drawable_t drawable); 6554 6555 /** 6556 * @brief Get current window geometry 6557 * 6558 * @param c The connection 6559 * @param drawable The drawable (`Window` or `Pixmap`) of which the geometry will be received. 6560 * @return A cookie 6561 * 6562 * Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). 6563 * 6564 * This form can be used only if the request will cause 6565 * a reply to be generated. Any returned error will be 6566 * placed in the event queue. 6567 */ 6568 xcb_get_geometry_cookie_t 6569 xcb_get_geometry_unchecked (xcb_connection_t *c, 6570 xcb_drawable_t drawable); 6571 6572 /** 6573 * Return the reply 6574 * @param c The connection 6575 * @param cookie The cookie 6576 * @param e The xcb_generic_error_t supplied 6577 * 6578 * Returns the reply of the request asked by 6579 * 6580 * The parameter @p e supplied to this function must be NULL if 6581 * xcb_get_geometry_unchecked(). is used. 6582 * Otherwise, it stores the error if any. 6583 * 6584 * The returned value must be freed by the caller using free(). 6585 */ 6586 xcb_get_geometry_reply_t * 6587 xcb_get_geometry_reply (xcb_connection_t *c, 6588 xcb_get_geometry_cookie_t cookie /**< */, 6589 xcb_generic_error_t **e); 6590 6591 int 6592 xcb_query_tree_sizeof (const void *_buffer); 6593 6594 /** 6595 * @brief query the window tree 6596 * 6597 * @param c The connection 6598 * @param window The \a window to query. 6599 * @return A cookie 6600 * 6601 * Gets the root window ID, parent window ID and list of children windows for the 6602 * specified \a window. The children are listed in bottom-to-top stacking order. 6603 * 6604 */ 6605 xcb_query_tree_cookie_t 6606 xcb_query_tree (xcb_connection_t *c, 6607 xcb_window_t window); 6608 6609 /** 6610 * @brief query the window tree 6611 * 6612 * @param c The connection 6613 * @param window The \a window to query. 6614 * @return A cookie 6615 * 6616 * Gets the root window ID, parent window ID and list of children windows for the 6617 * specified \a window. The children are listed in bottom-to-top stacking order. 6618 * 6619 * This form can be used only if the request will cause 6620 * a reply to be generated. Any returned error will be 6621 * placed in the event queue. 6622 */ 6623 xcb_query_tree_cookie_t 6624 xcb_query_tree_unchecked (xcb_connection_t *c, 6625 xcb_window_t window); 6626 6627 xcb_window_t * 6628 xcb_query_tree_children (const xcb_query_tree_reply_t *R); 6629 6630 int 6631 xcb_query_tree_children_length (const xcb_query_tree_reply_t *R); 6632 6633 xcb_generic_iterator_t 6634 xcb_query_tree_children_end (const xcb_query_tree_reply_t *R); 6635 6636 /** 6637 * Return the reply 6638 * @param c The connection 6639 * @param cookie The cookie 6640 * @param e The xcb_generic_error_t supplied 6641 * 6642 * Returns the reply of the request asked by 6643 * 6644 * The parameter @p e supplied to this function must be NULL if 6645 * xcb_query_tree_unchecked(). is used. 6646 * Otherwise, it stores the error if any. 6647 * 6648 * The returned value must be freed by the caller using free(). 6649 */ 6650 xcb_query_tree_reply_t * 6651 xcb_query_tree_reply (xcb_connection_t *c, 6652 xcb_query_tree_cookie_t cookie /**< */, 6653 xcb_generic_error_t **e); 6654 6655 int 6656 xcb_intern_atom_sizeof (const void *_buffer); 6657 6658 /** 6659 * @brief Get atom identifier by name 6660 * 6661 * @param c The connection 6662 * @param only_if_exists Return a valid atom id only if the atom already exists. 6663 * @param name_len The length of the following \a name. 6664 * @param name The name of the atom. 6665 * @return A cookie 6666 * 6667 * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified 6668 * name. Atoms are used in protocols like EWMH, for example to store window titles 6669 * (`_NET_WM_NAME` atom) as property of a window. 6670 * 6671 * If \a only_if_exists is 0, the atom will be created if it does not already exist. 6672 * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does 6673 * not yet exist. 6674 * 6675 */ 6676 xcb_intern_atom_cookie_t 6677 xcb_intern_atom (xcb_connection_t *c, 6678 uint8_t only_if_exists, 6679 uint16_t name_len, 6680 const char *name); 6681 6682 /** 6683 * @brief Get atom identifier by name 6684 * 6685 * @param c The connection 6686 * @param only_if_exists Return a valid atom id only if the atom already exists. 6687 * @param name_len The length of the following \a name. 6688 * @param name The name of the atom. 6689 * @return A cookie 6690 * 6691 * Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified 6692 * name. Atoms are used in protocols like EWMH, for example to store window titles 6693 * (`_NET_WM_NAME` atom) as property of a window. 6694 * 6695 * If \a only_if_exists is 0, the atom will be created if it does not already exist. 6696 * If \a only_if_exists is 1, `XCB_ATOM_NONE` will be returned if the atom does 6697 * not yet exist. 6698 * 6699 * This form can be used only if the request will cause 6700 * a reply to be generated. Any returned error will be 6701 * placed in the event queue. 6702 */ 6703 xcb_intern_atom_cookie_t 6704 xcb_intern_atom_unchecked (xcb_connection_t *c, 6705 uint8_t only_if_exists, 6706 uint16_t name_len, 6707 const char *name); 6708 6709 /** 6710 * Return the reply 6711 * @param c The connection 6712 * @param cookie The cookie 6713 * @param e The xcb_generic_error_t supplied 6714 * 6715 * Returns the reply of the request asked by 6716 * 6717 * The parameter @p e supplied to this function must be NULL if 6718 * xcb_intern_atom_unchecked(). is used. 6719 * Otherwise, it stores the error if any. 6720 * 6721 * The returned value must be freed by the caller using free(). 6722 */ 6723 xcb_intern_atom_reply_t * 6724 xcb_intern_atom_reply (xcb_connection_t *c, 6725 xcb_intern_atom_cookie_t cookie /**< */, 6726 xcb_generic_error_t **e); 6727 6728 int 6729 xcb_get_atom_name_sizeof (const void *_buffer); 6730 6731 /** 6732 * 6733 * @param c The connection 6734 * @return A cookie 6735 * 6736 * Delivers a request to the X server. 6737 * 6738 */ 6739 xcb_get_atom_name_cookie_t 6740 xcb_get_atom_name (xcb_connection_t *c, 6741 xcb_atom_t atom); 6742 6743 /** 6744 * 6745 * @param c The connection 6746 * @return A cookie 6747 * 6748 * Delivers a request to the X server. 6749 * 6750 * This form can be used only if the request will cause 6751 * a reply to be generated. Any returned error will be 6752 * placed in the event queue. 6753 */ 6754 xcb_get_atom_name_cookie_t 6755 xcb_get_atom_name_unchecked (xcb_connection_t *c, 6756 xcb_atom_t atom); 6757 6758 char * 6759 xcb_get_atom_name_name (const xcb_get_atom_name_reply_t *R); 6760 6761 int 6762 xcb_get_atom_name_name_length (const xcb_get_atom_name_reply_t *R); 6763 6764 xcb_generic_iterator_t 6765 xcb_get_atom_name_name_end (const xcb_get_atom_name_reply_t *R); 6766 6767 /** 6768 * Return the reply 6769 * @param c The connection 6770 * @param cookie The cookie 6771 * @param e The xcb_generic_error_t supplied 6772 * 6773 * Returns the reply of the request asked by 6774 * 6775 * The parameter @p e supplied to this function must be NULL if 6776 * xcb_get_atom_name_unchecked(). is used. 6777 * Otherwise, it stores the error if any. 6778 * 6779 * The returned value must be freed by the caller using free(). 6780 */ 6781 xcb_get_atom_name_reply_t * 6782 xcb_get_atom_name_reply (xcb_connection_t *c, 6783 xcb_get_atom_name_cookie_t cookie /**< */, 6784 xcb_generic_error_t **e); 6785 6786 int 6787 xcb_change_property_sizeof (const void *_buffer); 6788 6789 /** 6790 * @brief Changes a window property 6791 * 6792 * @param c The connection 6793 * @param mode A bitmask of #xcb_prop_mode_t values. 6794 * @param mode \n 6795 * @param window The window whose property you want to change. 6796 * @param property The property you want to change (an atom). 6797 * @param type The type of the property you want to change (an atom). 6798 * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or 6799 * 32-bit quantities. Possible values are 8, 16 and 32. This information allows 6800 * the X server to correctly perform byte-swap operations as necessary. 6801 * @param data_len Specifies the number of elements (see \a format). 6802 * @param data The property data. 6803 * @return A cookie 6804 * 6805 * Sets or updates a property on the specified \a window. Properties are for 6806 * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). 6807 * Protocols such as EWMH also use properties - for example EWMH defines the 6808 * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. 6809 * 6810 * This form can be used only if the request will not cause 6811 * a reply to be generated. Any returned error will be 6812 * saved for handling by xcb_request_check(). 6813 */ 6814 xcb_void_cookie_t 6815 xcb_change_property_checked (xcb_connection_t *c, 6816 uint8_t mode, 6817 xcb_window_t window, 6818 xcb_atom_t property, 6819 xcb_atom_t type, 6820 uint8_t format, 6821 uint32_t data_len, 6822 const void *data); 6823 6824 /** 6825 * @brief Changes a window property 6826 * 6827 * @param c The connection 6828 * @param mode A bitmask of #xcb_prop_mode_t values. 6829 * @param mode \n 6830 * @param window The window whose property you want to change. 6831 * @param property The property you want to change (an atom). 6832 * @param type The type of the property you want to change (an atom). 6833 * @param format Specifies whether the data should be viewed as a list of 8-bit, 16-bit or 6834 * 32-bit quantities. Possible values are 8, 16 and 32. This information allows 6835 * the X server to correctly perform byte-swap operations as necessary. 6836 * @param data_len Specifies the number of elements (see \a format). 6837 * @param data The property data. 6838 * @return A cookie 6839 * 6840 * Sets or updates a property on the specified \a window. Properties are for 6841 * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). 6842 * Protocols such as EWMH also use properties - for example EWMH defines the 6843 * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. 6844 * 6845 */ 6846 xcb_void_cookie_t 6847 xcb_change_property (xcb_connection_t *c, 6848 uint8_t mode, 6849 xcb_window_t window, 6850 xcb_atom_t property, 6851 xcb_atom_t type, 6852 uint8_t format, 6853 uint32_t data_len, 6854 const void *data); 6855 6856 void * 6857 xcb_change_property_data (const xcb_change_property_request_t *R); 6858 6859 int 6860 xcb_change_property_data_length (const xcb_change_property_request_t *R); 6861 6862 xcb_generic_iterator_t 6863 xcb_change_property_data_end (const xcb_change_property_request_t *R); 6864 6865 /** 6866 * 6867 * @param c The connection 6868 * @return A cookie 6869 * 6870 * Delivers a request to the X server. 6871 * 6872 * This form can be used only if the request will not cause 6873 * a reply to be generated. Any returned error will be 6874 * saved for handling by xcb_request_check(). 6875 */ 6876 xcb_void_cookie_t 6877 xcb_delete_property_checked (xcb_connection_t *c, 6878 xcb_window_t window, 6879 xcb_atom_t property); 6880 6881 /** 6882 * 6883 * @param c The connection 6884 * @return A cookie 6885 * 6886 * Delivers a request to the X server. 6887 * 6888 */ 6889 xcb_void_cookie_t 6890 xcb_delete_property (xcb_connection_t *c, 6891 xcb_window_t window, 6892 xcb_atom_t property); 6893 6894 int 6895 xcb_get_property_sizeof (const void *_buffer); 6896 6897 /** 6898 * @brief Gets a window property 6899 * 6900 * @param c The connection 6901 * @param _delete Whether the property should actually be deleted. For deleting a property, the 6902 * specified \a type has to match the actual property type. 6903 * @param window The window whose property you want to get. 6904 * @param property The property you want to get (an atom). 6905 * @param type The type of the property you want to get (an atom). 6906 * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the 6907 * data is to be retrieved. 6908 * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you 6909 * set \a long_length to 4, you will receive 16 bytes of data). 6910 * @return A cookie 6911 * 6912 * Gets the specified \a property from the specified \a window. Properties are for 6913 * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). 6914 * Protocols such as EWMH also use properties - for example EWMH defines the 6915 * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. 6916 * 6917 * TODO: talk about \a type 6918 * 6919 * TODO: talk about `delete` 6920 * 6921 * TODO: talk about the offset/length thing. what's a valid use case? 6922 * 6923 */ 6924 xcb_get_property_cookie_t 6925 xcb_get_property (xcb_connection_t *c, 6926 uint8_t _delete, 6927 xcb_window_t window, 6928 xcb_atom_t property, 6929 xcb_atom_t type, 6930 uint32_t long_offset, 6931 uint32_t long_length); 6932 6933 /** 6934 * @brief Gets a window property 6935 * 6936 * @param c The connection 6937 * @param _delete Whether the property should actually be deleted. For deleting a property, the 6938 * specified \a type has to match the actual property type. 6939 * @param window The window whose property you want to get. 6940 * @param property The property you want to get (an atom). 6941 * @param type The type of the property you want to get (an atom). 6942 * @param long_offset Specifies the offset (in 32-bit multiples) in the specified property where the 6943 * data is to be retrieved. 6944 * @param long_length Specifies how many 32-bit multiples of data should be retrieved (e.g. if you 6945 * set \a long_length to 4, you will receive 16 bytes of data). 6946 * @return A cookie 6947 * 6948 * Gets the specified \a property from the specified \a window. Properties are for 6949 * example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). 6950 * Protocols such as EWMH also use properties - for example EWMH defines the 6951 * window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. 6952 * 6953 * TODO: talk about \a type 6954 * 6955 * TODO: talk about `delete` 6956 * 6957 * TODO: talk about the offset/length thing. what's a valid use case? 6958 * 6959 * This form can be used only if the request will cause 6960 * a reply to be generated. Any returned error will be 6961 * placed in the event queue. 6962 */ 6963 xcb_get_property_cookie_t 6964 xcb_get_property_unchecked (xcb_connection_t *c, 6965 uint8_t _delete, 6966 xcb_window_t window, 6967 xcb_atom_t property, 6968 xcb_atom_t type, 6969 uint32_t long_offset, 6970 uint32_t long_length); 6971 6972 void * 6973 xcb_get_property_value (const xcb_get_property_reply_t *R); 6974 6975 int 6976 xcb_get_property_value_length (const xcb_get_property_reply_t *R); 6977 6978 xcb_generic_iterator_t 6979 xcb_get_property_value_end (const xcb_get_property_reply_t *R); 6980 6981 /** 6982 * Return the reply 6983 * @param c The connection 6984 * @param cookie The cookie 6985 * @param e The xcb_generic_error_t supplied 6986 * 6987 * Returns the reply of the request asked by 6988 * 6989 * The parameter @p e supplied to this function must be NULL if 6990 * xcb_get_property_unchecked(). is used. 6991 * Otherwise, it stores the error if any. 6992 * 6993 * The returned value must be freed by the caller using free(). 6994 */ 6995 xcb_get_property_reply_t * 6996 xcb_get_property_reply (xcb_connection_t *c, 6997 xcb_get_property_cookie_t cookie /**< */, 6998 xcb_generic_error_t **e); 6999 7000 int 7001 xcb_list_properties_sizeof (const void *_buffer); 7002 7003 /** 7004 * 7005 * @param c The connection 7006 * @return A cookie 7007 * 7008 * Delivers a request to the X server. 7009 * 7010 */ 7011 xcb_list_properties_cookie_t 7012 xcb_list_properties (xcb_connection_t *c, 7013 xcb_window_t window); 7014 7015 /** 7016 * 7017 * @param c The connection 7018 * @return A cookie 7019 * 7020 * Delivers a request to the X server. 7021 * 7022 * This form can be used only if the request will cause 7023 * a reply to be generated. Any returned error will be 7024 * placed in the event queue. 7025 */ 7026 xcb_list_properties_cookie_t 7027 xcb_list_properties_unchecked (xcb_connection_t *c, 7028 xcb_window_t window); 7029 7030 xcb_atom_t * 7031 xcb_list_properties_atoms (const xcb_list_properties_reply_t *R); 7032 7033 int 7034 xcb_list_properties_atoms_length (const xcb_list_properties_reply_t *R); 7035 7036 xcb_generic_iterator_t 7037 xcb_list_properties_atoms_end (const xcb_list_properties_reply_t *R); 7038 7039 /** 7040 * Return the reply 7041 * @param c The connection 7042 * @param cookie The cookie 7043 * @param e The xcb_generic_error_t supplied 7044 * 7045 * Returns the reply of the request asked by 7046 * 7047 * The parameter @p e supplied to this function must be NULL if 7048 * xcb_list_properties_unchecked(). is used. 7049 * Otherwise, it stores the error if any. 7050 * 7051 * The returned value must be freed by the caller using free(). 7052 */ 7053 xcb_list_properties_reply_t * 7054 xcb_list_properties_reply (xcb_connection_t *c, 7055 xcb_list_properties_cookie_t cookie /**< */, 7056 xcb_generic_error_t **e); 7057 7058 /** 7059 * @brief Sets the owner of a selection 7060 * 7061 * @param c The connection 7062 * @param owner The new owner of the selection. 7063 * \n 7064 * The special value `XCB_NONE` means that the selection will have no owner. 7065 * @param selection The selection. 7066 * @param time Timestamp to avoid race conditions when running X over the network. 7067 * \n 7068 * The selection will not be changed if \a time is earlier than the current 7069 * last-change time of the \a selection or is later than the current X server time. 7070 * Otherwise, the last-change time is set to the specified time. 7071 * \n 7072 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7073 * time. 7074 * @return A cookie 7075 * 7076 * Makes `window` the owner of the selection \a selection and updates the 7077 * last-change time of the specified selection. 7078 * 7079 * TODO: briefly explain what a selection is. 7080 * 7081 * This form can be used only if the request will not cause 7082 * a reply to be generated. Any returned error will be 7083 * saved for handling by xcb_request_check(). 7084 */ 7085 xcb_void_cookie_t 7086 xcb_set_selection_owner_checked (xcb_connection_t *c, 7087 xcb_window_t owner, 7088 xcb_atom_t selection, 7089 xcb_timestamp_t time); 7090 7091 /** 7092 * @brief Sets the owner of a selection 7093 * 7094 * @param c The connection 7095 * @param owner The new owner of the selection. 7096 * \n 7097 * The special value `XCB_NONE` means that the selection will have no owner. 7098 * @param selection The selection. 7099 * @param time Timestamp to avoid race conditions when running X over the network. 7100 * \n 7101 * The selection will not be changed if \a time is earlier than the current 7102 * last-change time of the \a selection or is later than the current X server time. 7103 * Otherwise, the last-change time is set to the specified time. 7104 * \n 7105 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7106 * time. 7107 * @return A cookie 7108 * 7109 * Makes `window` the owner of the selection \a selection and updates the 7110 * last-change time of the specified selection. 7111 * 7112 * TODO: briefly explain what a selection is. 7113 * 7114 */ 7115 xcb_void_cookie_t 7116 xcb_set_selection_owner (xcb_connection_t *c, 7117 xcb_window_t owner, 7118 xcb_atom_t selection, 7119 xcb_timestamp_t time); 7120 7121 /** 7122 * @brief Gets the owner of a selection 7123 * 7124 * @param c The connection 7125 * @param selection The selection. 7126 * @return A cookie 7127 * 7128 * Gets the owner of the specified selection. 7129 * 7130 * TODO: briefly explain what a selection is. 7131 * 7132 */ 7133 xcb_get_selection_owner_cookie_t 7134 xcb_get_selection_owner (xcb_connection_t *c, 7135 xcb_atom_t selection); 7136 7137 /** 7138 * @brief Gets the owner of a selection 7139 * 7140 * @param c The connection 7141 * @param selection The selection. 7142 * @return A cookie 7143 * 7144 * Gets the owner of the specified selection. 7145 * 7146 * TODO: briefly explain what a selection is. 7147 * 7148 * This form can be used only if the request will cause 7149 * a reply to be generated. Any returned error will be 7150 * placed in the event queue. 7151 */ 7152 xcb_get_selection_owner_cookie_t 7153 xcb_get_selection_owner_unchecked (xcb_connection_t *c, 7154 xcb_atom_t selection); 7155 7156 /** 7157 * Return the reply 7158 * @param c The connection 7159 * @param cookie The cookie 7160 * @param e The xcb_generic_error_t supplied 7161 * 7162 * Returns the reply of the request asked by 7163 * 7164 * The parameter @p e supplied to this function must be NULL if 7165 * xcb_get_selection_owner_unchecked(). is used. 7166 * Otherwise, it stores the error if any. 7167 * 7168 * The returned value must be freed by the caller using free(). 7169 */ 7170 xcb_get_selection_owner_reply_t * 7171 xcb_get_selection_owner_reply (xcb_connection_t *c, 7172 xcb_get_selection_owner_cookie_t cookie /**< */, 7173 xcb_generic_error_t **e); 7174 7175 /** 7176 * 7177 * @param c The connection 7178 * @return A cookie 7179 * 7180 * Delivers a request to the X server. 7181 * 7182 * This form can be used only if the request will not cause 7183 * a reply to be generated. Any returned error will be 7184 * saved for handling by xcb_request_check(). 7185 */ 7186 xcb_void_cookie_t 7187 xcb_convert_selection_checked (xcb_connection_t *c, 7188 xcb_window_t requestor, 7189 xcb_atom_t selection, 7190 xcb_atom_t target, 7191 xcb_atom_t property, 7192 xcb_timestamp_t time); 7193 7194 /** 7195 * 7196 * @param c The connection 7197 * @return A cookie 7198 * 7199 * Delivers a request to the X server. 7200 * 7201 */ 7202 xcb_void_cookie_t 7203 xcb_convert_selection (xcb_connection_t *c, 7204 xcb_window_t requestor, 7205 xcb_atom_t selection, 7206 xcb_atom_t target, 7207 xcb_atom_t property, 7208 xcb_timestamp_t time); 7209 7210 /** 7211 * @brief send an event 7212 * 7213 * @param c The connection 7214 * @param propagate If \a propagate is true and no clients have selected any event on \a destination, 7215 * the destination is replaced with the closest ancestor of \a destination for 7216 * which some client has selected a type in \a event_mask and for which no 7217 * intervening window has that type in its do-not-propagate-mask. If no such 7218 * window exists or if the window is an ancestor of the focus window and 7219 * `InputFocus` was originally specified as the destination, the event is not sent 7220 * to any clients. Otherwise, the event is reported to every client selecting on 7221 * the final destination any of the types specified in \a event_mask. 7222 * @param destination The window to send this event to. Every client which selects any event within 7223 * \a event_mask on \a destination will get the event. 7224 * \n 7225 * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window 7226 * that contains the mouse pointer. 7227 * \n 7228 * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which 7229 * has the keyboard focus. 7230 * @param event_mask Event_mask for determining which clients should receive the specified event. 7231 * See \a destination and \a propagate. 7232 * @param event The event to send to the specified \a destination. 7233 * @return A cookie 7234 * 7235 * Identifies the \a destination window, determines which clients should receive 7236 * the specified event and ignores any active grabs. 7237 * 7238 * The \a event must be one of the core events or an event defined by an extension, 7239 * so that the X server can correctly byte-swap the contents as necessary. The 7240 * contents of \a event are otherwise unaltered and unchecked except for the 7241 * `send_event` field which is forced to 'true'. 7242 * 7243 * This form can be used only if the request will not cause 7244 * a reply to be generated. Any returned error will be 7245 * saved for handling by xcb_request_check(). 7246 */ 7247 xcb_void_cookie_t 7248 xcb_send_event_checked (xcb_connection_t *c, 7249 uint8_t propagate, 7250 xcb_window_t destination, 7251 uint32_t event_mask, 7252 const char *event); 7253 7254 /** 7255 * @brief send an event 7256 * 7257 * @param c The connection 7258 * @param propagate If \a propagate is true and no clients have selected any event on \a destination, 7259 * the destination is replaced with the closest ancestor of \a destination for 7260 * which some client has selected a type in \a event_mask and for which no 7261 * intervening window has that type in its do-not-propagate-mask. If no such 7262 * window exists or if the window is an ancestor of the focus window and 7263 * `InputFocus` was originally specified as the destination, the event is not sent 7264 * to any clients. Otherwise, the event is reported to every client selecting on 7265 * the final destination any of the types specified in \a event_mask. 7266 * @param destination The window to send this event to. Every client which selects any event within 7267 * \a event_mask on \a destination will get the event. 7268 * \n 7269 * The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window 7270 * that contains the mouse pointer. 7271 * \n 7272 * The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which 7273 * has the keyboard focus. 7274 * @param event_mask Event_mask for determining which clients should receive the specified event. 7275 * See \a destination and \a propagate. 7276 * @param event The event to send to the specified \a destination. 7277 * @return A cookie 7278 * 7279 * Identifies the \a destination window, determines which clients should receive 7280 * the specified event and ignores any active grabs. 7281 * 7282 * The \a event must be one of the core events or an event defined by an extension, 7283 * so that the X server can correctly byte-swap the contents as necessary. The 7284 * contents of \a event are otherwise unaltered and unchecked except for the 7285 * `send_event` field which is forced to 'true'. 7286 * 7287 */ 7288 xcb_void_cookie_t 7289 xcb_send_event (xcb_connection_t *c, 7290 uint8_t propagate, 7291 xcb_window_t destination, 7292 uint32_t event_mask, 7293 const char *event); 7294 7295 /** 7296 * @brief Grab the pointer 7297 * 7298 * @param c The connection 7299 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7300 * reported to the \a grab_window. 7301 * @param grab_window Specifies the window on which the pointer should be grabbed. 7302 * @param event_mask Specifies which pointer events are reported to the client. 7303 * \n 7304 * TODO: which values? 7305 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7306 * @param pointer_mode \n 7307 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7308 * @param keyboard_mode \n 7309 * @param confine_to Specifies the window to confine the pointer in (the user will not be able to 7310 * move the pointer out of that window). 7311 * \n 7312 * The special value `XCB_NONE` means don't confine the pointer. 7313 * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the 7314 * cursor. 7315 * @param time The time argument allows you to avoid certain circumstances that come up if 7316 * applications take a long time to respond or if there are long network delays. 7317 * Consider a situation where you have two applications, both of which normally 7318 * grab the pointer when clicked on. If both applications specify the timestamp 7319 * from the event, the second application may wake up faster and successfully grab 7320 * the pointer before the first application. The first application then will get 7321 * an indication that the other application grabbed the pointer before its request 7322 * was processed. 7323 * \n 7324 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7325 * time. 7326 * @return A cookie 7327 * 7328 * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. 7329 * 7330 */ 7331 xcb_grab_pointer_cookie_t 7332 xcb_grab_pointer (xcb_connection_t *c, 7333 uint8_t owner_events, 7334 xcb_window_t grab_window, 7335 uint16_t event_mask, 7336 uint8_t pointer_mode, 7337 uint8_t keyboard_mode, 7338 xcb_window_t confine_to, 7339 xcb_cursor_t cursor, 7340 xcb_timestamp_t time); 7341 7342 /** 7343 * @brief Grab the pointer 7344 * 7345 * @param c The connection 7346 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7347 * reported to the \a grab_window. 7348 * @param grab_window Specifies the window on which the pointer should be grabbed. 7349 * @param event_mask Specifies which pointer events are reported to the client. 7350 * \n 7351 * TODO: which values? 7352 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7353 * @param pointer_mode \n 7354 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7355 * @param keyboard_mode \n 7356 * @param confine_to Specifies the window to confine the pointer in (the user will not be able to 7357 * move the pointer out of that window). 7358 * \n 7359 * The special value `XCB_NONE` means don't confine the pointer. 7360 * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the 7361 * cursor. 7362 * @param time The time argument allows you to avoid certain circumstances that come up if 7363 * applications take a long time to respond or if there are long network delays. 7364 * Consider a situation where you have two applications, both of which normally 7365 * grab the pointer when clicked on. If both applications specify the timestamp 7366 * from the event, the second application may wake up faster and successfully grab 7367 * the pointer before the first application. The first application then will get 7368 * an indication that the other application grabbed the pointer before its request 7369 * was processed. 7370 * \n 7371 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7372 * time. 7373 * @return A cookie 7374 * 7375 * Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. 7376 * 7377 * This form can be used only if the request will cause 7378 * a reply to be generated. Any returned error will be 7379 * placed in the event queue. 7380 */ 7381 xcb_grab_pointer_cookie_t 7382 xcb_grab_pointer_unchecked (xcb_connection_t *c, 7383 uint8_t owner_events, 7384 xcb_window_t grab_window, 7385 uint16_t event_mask, 7386 uint8_t pointer_mode, 7387 uint8_t keyboard_mode, 7388 xcb_window_t confine_to, 7389 xcb_cursor_t cursor, 7390 xcb_timestamp_t time); 7391 7392 /** 7393 * Return the reply 7394 * @param c The connection 7395 * @param cookie The cookie 7396 * @param e The xcb_generic_error_t supplied 7397 * 7398 * Returns the reply of the request asked by 7399 * 7400 * The parameter @p e supplied to this function must be NULL if 7401 * xcb_grab_pointer_unchecked(). is used. 7402 * Otherwise, it stores the error if any. 7403 * 7404 * The returned value must be freed by the caller using free(). 7405 */ 7406 xcb_grab_pointer_reply_t * 7407 xcb_grab_pointer_reply (xcb_connection_t *c, 7408 xcb_grab_pointer_cookie_t cookie /**< */, 7409 xcb_generic_error_t **e); 7410 7411 /** 7412 * @brief release the pointer 7413 * 7414 * @param c The connection 7415 * @param time Timestamp to avoid race conditions when running X over the network. 7416 * \n 7417 * The pointer will not be released if \a time is earlier than the 7418 * last-pointer-grab time or later than the current X server time. 7419 * @return A cookie 7420 * 7421 * Releases the pointer and any queued events if you actively grabbed the pointer 7422 * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button 7423 * press. 7424 * 7425 * EnterNotify and LeaveNotify events are generated. 7426 * 7427 * This form can be used only if the request will not cause 7428 * a reply to be generated. Any returned error will be 7429 * saved for handling by xcb_request_check(). 7430 */ 7431 xcb_void_cookie_t 7432 xcb_ungrab_pointer_checked (xcb_connection_t *c, 7433 xcb_timestamp_t time); 7434 7435 /** 7436 * @brief release the pointer 7437 * 7438 * @param c The connection 7439 * @param time Timestamp to avoid race conditions when running X over the network. 7440 * \n 7441 * The pointer will not be released if \a time is earlier than the 7442 * last-pointer-grab time or later than the current X server time. 7443 * @return A cookie 7444 * 7445 * Releases the pointer and any queued events if you actively grabbed the pointer 7446 * before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button 7447 * press. 7448 * 7449 * EnterNotify and LeaveNotify events are generated. 7450 * 7451 */ 7452 xcb_void_cookie_t 7453 xcb_ungrab_pointer (xcb_connection_t *c, 7454 xcb_timestamp_t time); 7455 7456 /** 7457 * @brief Grab pointer button(s) 7458 * 7459 * @param c The connection 7460 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7461 * reported to the \a grab_window. 7462 * @param grab_window Specifies the window on which the pointer should be grabbed. 7463 * @param event_mask Specifies which pointer events are reported to the client. 7464 * \n 7465 * TODO: which values? 7466 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7467 * @param pointer_mode \n 7468 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7469 * @param keyboard_mode \n 7470 * @param confine_to Specifies the window to confine the pointer in (the user will not be able to 7471 * move the pointer out of that window). 7472 * \n 7473 * The special value `XCB_NONE` means don't confine the pointer. 7474 * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the 7475 * cursor. 7476 * @param button A bitmask of #xcb_button_index_t values. 7477 * @param button \n 7478 * @param modifiers The modifiers to grab. 7479 * \n 7480 * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all 7481 * possible modifier combinations. 7482 * @return A cookie 7483 * 7484 * This request establishes a passive grab. The pointer is actively grabbed as 7485 * described in GrabPointer, the last-pointer-grab time is set to the time at 7486 * which the button was pressed (as transmitted in the ButtonPress event), and the 7487 * ButtonPress event is reported if all of the following conditions are true: 7488 * 7489 * The pointer is not grabbed and the specified button is logically pressed when 7490 * the specified modifier keys are logically down, and no other buttons or 7491 * modifier keys are logically down. 7492 * 7493 * The grab-window contains the pointer. 7494 * 7495 * The confine-to window (if any) is viewable. 7496 * 7497 * A passive grab on the same button/key combination does not exist on any 7498 * ancestor of grab-window. 7499 * 7500 * The interpretation of the remaining arguments is the same as for GrabPointer. 7501 * The active grab is terminated automatically when the logical state of the 7502 * pointer has all buttons released, independent of the logical state of modifier 7503 * keys. Note that the logical state of a device (as seen by means of the 7504 * protocol) may lag the physical state if device event processing is frozen. This 7505 * request overrides all previous passive grabs by the same client on the same 7506 * button/key combinations on the same window. A modifier of AnyModifier is 7507 * equivalent to issuing the request for all possible modifier combinations 7508 * (including the combination of no modifiers). It is not required that all 7509 * specified modifiers have currently assigned keycodes. A button of AnyButton is 7510 * equivalent to issuing the request for all possible buttons. Otherwise, it is 7511 * not required that the button specified currently be assigned to a physical 7512 * button. 7513 * 7514 * An Access error is generated if some other client has already issued a 7515 * GrabButton request with the same button/key combination on the same window. 7516 * When using AnyModifier or AnyButton, the request fails completely (no grabs are 7517 * established), and an Access error is generated if there is a conflicting grab 7518 * for any combination. The request has no effect on an active grab. 7519 * 7520 * This form can be used only if the request will not cause 7521 * a reply to be generated. Any returned error will be 7522 * saved for handling by xcb_request_check(). 7523 */ 7524 xcb_void_cookie_t 7525 xcb_grab_button_checked (xcb_connection_t *c, 7526 uint8_t owner_events, 7527 xcb_window_t grab_window, 7528 uint16_t event_mask, 7529 uint8_t pointer_mode, 7530 uint8_t keyboard_mode, 7531 xcb_window_t confine_to, 7532 xcb_cursor_t cursor, 7533 uint8_t button, 7534 uint16_t modifiers); 7535 7536 /** 7537 * @brief Grab pointer button(s) 7538 * 7539 * @param c The connection 7540 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7541 * reported to the \a grab_window. 7542 * @param grab_window Specifies the window on which the pointer should be grabbed. 7543 * @param event_mask Specifies which pointer events are reported to the client. 7544 * \n 7545 * TODO: which values? 7546 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7547 * @param pointer_mode \n 7548 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7549 * @param keyboard_mode \n 7550 * @param confine_to Specifies the window to confine the pointer in (the user will not be able to 7551 * move the pointer out of that window). 7552 * \n 7553 * The special value `XCB_NONE` means don't confine the pointer. 7554 * @param cursor Specifies the cursor that should be displayed or `XCB_NONE` to not change the 7555 * cursor. 7556 * @param button A bitmask of #xcb_button_index_t values. 7557 * @param button \n 7558 * @param modifiers The modifiers to grab. 7559 * \n 7560 * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all 7561 * possible modifier combinations. 7562 * @return A cookie 7563 * 7564 * This request establishes a passive grab. The pointer is actively grabbed as 7565 * described in GrabPointer, the last-pointer-grab time is set to the time at 7566 * which the button was pressed (as transmitted in the ButtonPress event), and the 7567 * ButtonPress event is reported if all of the following conditions are true: 7568 * 7569 * The pointer is not grabbed and the specified button is logically pressed when 7570 * the specified modifier keys are logically down, and no other buttons or 7571 * modifier keys are logically down. 7572 * 7573 * The grab-window contains the pointer. 7574 * 7575 * The confine-to window (if any) is viewable. 7576 * 7577 * A passive grab on the same button/key combination does not exist on any 7578 * ancestor of grab-window. 7579 * 7580 * The interpretation of the remaining arguments is the same as for GrabPointer. 7581 * The active grab is terminated automatically when the logical state of the 7582 * pointer has all buttons released, independent of the logical state of modifier 7583 * keys. Note that the logical state of a device (as seen by means of the 7584 * protocol) may lag the physical state if device event processing is frozen. This 7585 * request overrides all previous passive grabs by the same client on the same 7586 * button/key combinations on the same window. A modifier of AnyModifier is 7587 * equivalent to issuing the request for all possible modifier combinations 7588 * (including the combination of no modifiers). It is not required that all 7589 * specified modifiers have currently assigned keycodes. A button of AnyButton is 7590 * equivalent to issuing the request for all possible buttons. Otherwise, it is 7591 * not required that the button specified currently be assigned to a physical 7592 * button. 7593 * 7594 * An Access error is generated if some other client has already issued a 7595 * GrabButton request with the same button/key combination on the same window. 7596 * When using AnyModifier or AnyButton, the request fails completely (no grabs are 7597 * established), and an Access error is generated if there is a conflicting grab 7598 * for any combination. The request has no effect on an active grab. 7599 * 7600 */ 7601 xcb_void_cookie_t 7602 xcb_grab_button (xcb_connection_t *c, 7603 uint8_t owner_events, 7604 xcb_window_t grab_window, 7605 uint16_t event_mask, 7606 uint8_t pointer_mode, 7607 uint8_t keyboard_mode, 7608 xcb_window_t confine_to, 7609 xcb_cursor_t cursor, 7610 uint8_t button, 7611 uint16_t modifiers); 7612 7613 /** 7614 * 7615 * @param c The connection 7616 * @return A cookie 7617 * 7618 * Delivers a request to the X server. 7619 * 7620 * This form can be used only if the request will not cause 7621 * a reply to be generated. Any returned error will be 7622 * saved for handling by xcb_request_check(). 7623 */ 7624 xcb_void_cookie_t 7625 xcb_ungrab_button_checked (xcb_connection_t *c, 7626 uint8_t button, 7627 xcb_window_t grab_window, 7628 uint16_t modifiers); 7629 7630 /** 7631 * 7632 * @param c The connection 7633 * @return A cookie 7634 * 7635 * Delivers a request to the X server. 7636 * 7637 */ 7638 xcb_void_cookie_t 7639 xcb_ungrab_button (xcb_connection_t *c, 7640 uint8_t button, 7641 xcb_window_t grab_window, 7642 uint16_t modifiers); 7643 7644 /** 7645 * 7646 * @param c The connection 7647 * @return A cookie 7648 * 7649 * Delivers a request to the X server. 7650 * 7651 * This form can be used only if the request will not cause 7652 * a reply to be generated. Any returned error will be 7653 * saved for handling by xcb_request_check(). 7654 */ 7655 xcb_void_cookie_t 7656 xcb_change_active_pointer_grab_checked (xcb_connection_t *c, 7657 xcb_cursor_t cursor, 7658 xcb_timestamp_t time, 7659 uint16_t event_mask); 7660 7661 /** 7662 * 7663 * @param c The connection 7664 * @return A cookie 7665 * 7666 * Delivers a request to the X server. 7667 * 7668 */ 7669 xcb_void_cookie_t 7670 xcb_change_active_pointer_grab (xcb_connection_t *c, 7671 xcb_cursor_t cursor, 7672 xcb_timestamp_t time, 7673 uint16_t event_mask); 7674 7675 /** 7676 * @brief Grab the keyboard 7677 * 7678 * @param c The connection 7679 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7680 * reported to the \a grab_window. 7681 * @param grab_window Specifies the window on which the pointer should be grabbed. 7682 * @param time Timestamp to avoid race conditions when running X over the network. 7683 * \n 7684 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7685 * time. 7686 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7687 * @param pointer_mode \n 7688 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7689 * @param keyboard_mode \n 7690 * @return A cookie 7691 * 7692 * Actively grabs control of the keyboard and generates FocusIn and FocusOut 7693 * events. Further key events are reported only to the grabbing client. 7694 * 7695 * Any active keyboard grab by this client is overridden. If the keyboard is 7696 * actively grabbed by some other client, `AlreadyGrabbed` is returned. If 7697 * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard 7698 * is frozen by an active grab of another client, `GrabFrozen` is returned. If the 7699 * specified \a time is earlier than the last-keyboard-grab time or later than the 7700 * current X server time, `GrabInvalidTime` is returned. Otherwise, the 7701 * last-keyboard-grab time is set to the specified time. 7702 * 7703 */ 7704 xcb_grab_keyboard_cookie_t 7705 xcb_grab_keyboard (xcb_connection_t *c, 7706 uint8_t owner_events, 7707 xcb_window_t grab_window, 7708 xcb_timestamp_t time, 7709 uint8_t pointer_mode, 7710 uint8_t keyboard_mode); 7711 7712 /** 7713 * @brief Grab the keyboard 7714 * 7715 * @param c The connection 7716 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7717 * reported to the \a grab_window. 7718 * @param grab_window Specifies the window on which the pointer should be grabbed. 7719 * @param time Timestamp to avoid race conditions when running X over the network. 7720 * \n 7721 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7722 * time. 7723 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7724 * @param pointer_mode \n 7725 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7726 * @param keyboard_mode \n 7727 * @return A cookie 7728 * 7729 * Actively grabs control of the keyboard and generates FocusIn and FocusOut 7730 * events. Further key events are reported only to the grabbing client. 7731 * 7732 * Any active keyboard grab by this client is overridden. If the keyboard is 7733 * actively grabbed by some other client, `AlreadyGrabbed` is returned. If 7734 * \a grab_window is not viewable, `GrabNotViewable` is returned. If the keyboard 7735 * is frozen by an active grab of another client, `GrabFrozen` is returned. If the 7736 * specified \a time is earlier than the last-keyboard-grab time or later than the 7737 * current X server time, `GrabInvalidTime` is returned. Otherwise, the 7738 * last-keyboard-grab time is set to the specified time. 7739 * 7740 * This form can be used only if the request will cause 7741 * a reply to be generated. Any returned error will be 7742 * placed in the event queue. 7743 */ 7744 xcb_grab_keyboard_cookie_t 7745 xcb_grab_keyboard_unchecked (xcb_connection_t *c, 7746 uint8_t owner_events, 7747 xcb_window_t grab_window, 7748 xcb_timestamp_t time, 7749 uint8_t pointer_mode, 7750 uint8_t keyboard_mode); 7751 7752 /** 7753 * Return the reply 7754 * @param c The connection 7755 * @param cookie The cookie 7756 * @param e The xcb_generic_error_t supplied 7757 * 7758 * Returns the reply of the request asked by 7759 * 7760 * The parameter @p e supplied to this function must be NULL if 7761 * xcb_grab_keyboard_unchecked(). is used. 7762 * Otherwise, it stores the error if any. 7763 * 7764 * The returned value must be freed by the caller using free(). 7765 */ 7766 xcb_grab_keyboard_reply_t * 7767 xcb_grab_keyboard_reply (xcb_connection_t *c, 7768 xcb_grab_keyboard_cookie_t cookie /**< */, 7769 xcb_generic_error_t **e); 7770 7771 /** 7772 * 7773 * @param c The connection 7774 * @return A cookie 7775 * 7776 * Delivers a request to the X server. 7777 * 7778 * This form can be used only if the request will not cause 7779 * a reply to be generated. Any returned error will be 7780 * saved for handling by xcb_request_check(). 7781 */ 7782 xcb_void_cookie_t 7783 xcb_ungrab_keyboard_checked (xcb_connection_t *c, 7784 xcb_timestamp_t time); 7785 7786 /** 7787 * 7788 * @param c The connection 7789 * @return A cookie 7790 * 7791 * Delivers a request to the X server. 7792 * 7793 */ 7794 xcb_void_cookie_t 7795 xcb_ungrab_keyboard (xcb_connection_t *c, 7796 xcb_timestamp_t time); 7797 7798 /** 7799 * @brief Grab keyboard key(s) 7800 * 7801 * @param c The connection 7802 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7803 * reported to the \a grab_window. 7804 * @param grab_window Specifies the window on which the pointer should be grabbed. 7805 * @param modifiers The modifiers to grab. 7806 * \n 7807 * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all 7808 * possible modifier combinations. 7809 * @param key The keycode of the key to grab. 7810 * \n 7811 * The special value `XCB_GRAB_ANY` means grab any key. 7812 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7813 * @param pointer_mode \n 7814 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7815 * @param keyboard_mode \n 7816 * @return A cookie 7817 * 7818 * Establishes a passive grab on the keyboard. In the future, the keyboard is 7819 * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to 7820 * the time at which the key was pressed (as transmitted in the KeyPress event), 7821 * and the KeyPress event is reported if all of the following conditions are true: 7822 * 7823 * The keyboard is not grabbed and the specified key (which can itself be a 7824 * modifier key) is logically pressed when the specified modifier keys are 7825 * logically down, and no other modifier keys are logically down. 7826 * 7827 * Either the grab_window is an ancestor of (or is) the focus window, or the 7828 * grab_window is a descendant of the focus window and contains the pointer. 7829 * 7830 * A passive grab on the same key combination does not exist on any ancestor of 7831 * grab_window. 7832 * 7833 * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated 7834 * automatically when the logical state of the keyboard has the specified key released (independent of the 7835 * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. 7836 * 7837 * Note that the logical state of a device (as seen by client applications) may lag the physical state if 7838 * device event processing is frozen. 7839 * 7840 * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified 7841 * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for 7842 * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode 7843 * and max_keycode in the connection setup, or a BadValue error results. 7844 * 7845 * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess 7846 * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error 7847 * results (no grabs are established) if there is a conflicting grab for any combination. 7848 * 7849 * This form can be used only if the request will not cause 7850 * a reply to be generated. Any returned error will be 7851 * saved for handling by xcb_request_check(). 7852 */ 7853 xcb_void_cookie_t 7854 xcb_grab_key_checked (xcb_connection_t *c, 7855 uint8_t owner_events, 7856 xcb_window_t grab_window, 7857 uint16_t modifiers, 7858 xcb_keycode_t key, 7859 uint8_t pointer_mode, 7860 uint8_t keyboard_mode); 7861 7862 /** 7863 * @brief Grab keyboard key(s) 7864 * 7865 * @param c The connection 7866 * @param owner_events If 1, the \a grab_window will still get the pointer events. If 0, events are not 7867 * reported to the \a grab_window. 7868 * @param grab_window Specifies the window on which the pointer should be grabbed. 7869 * @param modifiers The modifiers to grab. 7870 * \n 7871 * Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all 7872 * possible modifier combinations. 7873 * @param key The keycode of the key to grab. 7874 * \n 7875 * The special value `XCB_GRAB_ANY` means grab any key. 7876 * @param pointer_mode A bitmask of #xcb_grab_mode_t values. 7877 * @param pointer_mode \n 7878 * @param keyboard_mode A bitmask of #xcb_grab_mode_t values. 7879 * @param keyboard_mode \n 7880 * @return A cookie 7881 * 7882 * Establishes a passive grab on the keyboard. In the future, the keyboard is 7883 * actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to 7884 * the time at which the key was pressed (as transmitted in the KeyPress event), 7885 * and the KeyPress event is reported if all of the following conditions are true: 7886 * 7887 * The keyboard is not grabbed and the specified key (which can itself be a 7888 * modifier key) is logically pressed when the specified modifier keys are 7889 * logically down, and no other modifier keys are logically down. 7890 * 7891 * Either the grab_window is an ancestor of (or is) the focus window, or the 7892 * grab_window is a descendant of the focus window and contains the pointer. 7893 * 7894 * A passive grab on the same key combination does not exist on any ancestor of 7895 * grab_window. 7896 * 7897 * The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated 7898 * automatically when the logical state of the keyboard has the specified key released (independent of the 7899 * logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. 7900 * 7901 * Note that the logical state of a device (as seen by client applications) may lag the physical state if 7902 * device event processing is frozen. 7903 * 7904 * A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified 7905 * have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for 7906 * all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode 7907 * and max_keycode in the connection setup, or a BadValue error results. 7908 * 7909 * If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess 7910 * error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error 7911 * results (no grabs are established) if there is a conflicting grab for any combination. 7912 * 7913 */ 7914 xcb_void_cookie_t 7915 xcb_grab_key (xcb_connection_t *c, 7916 uint8_t owner_events, 7917 xcb_window_t grab_window, 7918 uint16_t modifiers, 7919 xcb_keycode_t key, 7920 uint8_t pointer_mode, 7921 uint8_t keyboard_mode); 7922 7923 /** 7924 * @brief release a key combination 7925 * 7926 * @param c The connection 7927 * @param key The keycode of the specified key combination. 7928 * \n 7929 * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. 7930 * @param grab_window The window on which the grabbed key combination will be released. 7931 * @param modifiers The modifiers of the specified key combination. 7932 * \n 7933 * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination 7934 * with every possible modifier combination. 7935 * @return A cookie 7936 * 7937 * Releases the key combination on \a grab_window if you grabbed it using 7938 * `xcb_grab_key` before. 7939 * 7940 * This form can be used only if the request will not cause 7941 * a reply to be generated. Any returned error will be 7942 * saved for handling by xcb_request_check(). 7943 */ 7944 xcb_void_cookie_t 7945 xcb_ungrab_key_checked (xcb_connection_t *c, 7946 xcb_keycode_t key, 7947 xcb_window_t grab_window, 7948 uint16_t modifiers); 7949 7950 /** 7951 * @brief release a key combination 7952 * 7953 * @param c The connection 7954 * @param key The keycode of the specified key combination. 7955 * \n 7956 * Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. 7957 * @param grab_window The window on which the grabbed key combination will be released. 7958 * @param modifiers The modifiers of the specified key combination. 7959 * \n 7960 * Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination 7961 * with every possible modifier combination. 7962 * @return A cookie 7963 * 7964 * Releases the key combination on \a grab_window if you grabbed it using 7965 * `xcb_grab_key` before. 7966 * 7967 */ 7968 xcb_void_cookie_t 7969 xcb_ungrab_key (xcb_connection_t *c, 7970 xcb_keycode_t key, 7971 xcb_window_t grab_window, 7972 uint16_t modifiers); 7973 7974 /** 7975 * @brief release queued events 7976 * 7977 * @param c The connection 7978 * @param mode A bitmask of #xcb_allow_t values. 7979 * @param mode \n 7980 * @param time Timestamp to avoid race conditions when running X over the network. 7981 * \n 7982 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 7983 * time. 7984 * @return A cookie 7985 * 7986 * Releases queued events if the client has caused a device (pointer/keyboard) to 7987 * freeze due to grabbing it actively. This request has no effect if \a time is 7988 * earlier than the last-grab time of the most recent active grab for this client 7989 * or if \a time is later than the current X server time. 7990 * 7991 * This form can be used only if the request will not cause 7992 * a reply to be generated. Any returned error will be 7993 * saved for handling by xcb_request_check(). 7994 */ 7995 xcb_void_cookie_t 7996 xcb_allow_events_checked (xcb_connection_t *c, 7997 uint8_t mode, 7998 xcb_timestamp_t time); 7999 8000 /** 8001 * @brief release queued events 8002 * 8003 * @param c The connection 8004 * @param mode A bitmask of #xcb_allow_t values. 8005 * @param mode \n 8006 * @param time Timestamp to avoid race conditions when running X over the network. 8007 * \n 8008 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 8009 * time. 8010 * @return A cookie 8011 * 8012 * Releases queued events if the client has caused a device (pointer/keyboard) to 8013 * freeze due to grabbing it actively. This request has no effect if \a time is 8014 * earlier than the last-grab time of the most recent active grab for this client 8015 * or if \a time is later than the current X server time. 8016 * 8017 */ 8018 xcb_void_cookie_t 8019 xcb_allow_events (xcb_connection_t *c, 8020 uint8_t mode, 8021 xcb_timestamp_t time); 8022 8023 /** 8024 * 8025 * @param c The connection 8026 * @return A cookie 8027 * 8028 * Delivers a request to the X server. 8029 * 8030 * This form can be used only if the request will not cause 8031 * a reply to be generated. Any returned error will be 8032 * saved for handling by xcb_request_check(). 8033 */ 8034 xcb_void_cookie_t 8035 xcb_grab_server_checked (xcb_connection_t *c); 8036 8037 /** 8038 * 8039 * @param c The connection 8040 * @return A cookie 8041 * 8042 * Delivers a request to the X server. 8043 * 8044 */ 8045 xcb_void_cookie_t 8046 xcb_grab_server (xcb_connection_t *c); 8047 8048 /** 8049 * 8050 * @param c The connection 8051 * @return A cookie 8052 * 8053 * Delivers a request to the X server. 8054 * 8055 * This form can be used only if the request will not cause 8056 * a reply to be generated. Any returned error will be 8057 * saved for handling by xcb_request_check(). 8058 */ 8059 xcb_void_cookie_t 8060 xcb_ungrab_server_checked (xcb_connection_t *c); 8061 8062 /** 8063 * 8064 * @param c The connection 8065 * @return A cookie 8066 * 8067 * Delivers a request to the X server. 8068 * 8069 */ 8070 xcb_void_cookie_t 8071 xcb_ungrab_server (xcb_connection_t *c); 8072 8073 /** 8074 * @brief get pointer coordinates 8075 * 8076 * @param c The connection 8077 * @param window A window to check if the pointer is on the same screen as \a window (see the 8078 * `same_screen` field in the reply). 8079 * @return A cookie 8080 * 8081 * Gets the root window the pointer is logically on and the pointer coordinates 8082 * relative to the root window's origin. 8083 * 8084 */ 8085 xcb_query_pointer_cookie_t 8086 xcb_query_pointer (xcb_connection_t *c, 8087 xcb_window_t window); 8088 8089 /** 8090 * @brief get pointer coordinates 8091 * 8092 * @param c The connection 8093 * @param window A window to check if the pointer is on the same screen as \a window (see the 8094 * `same_screen` field in the reply). 8095 * @return A cookie 8096 * 8097 * Gets the root window the pointer is logically on and the pointer coordinates 8098 * relative to the root window's origin. 8099 * 8100 * This form can be used only if the request will cause 8101 * a reply to be generated. Any returned error will be 8102 * placed in the event queue. 8103 */ 8104 xcb_query_pointer_cookie_t 8105 xcb_query_pointer_unchecked (xcb_connection_t *c, 8106 xcb_window_t window); 8107 8108 /** 8109 * Return the reply 8110 * @param c The connection 8111 * @param cookie The cookie 8112 * @param e The xcb_generic_error_t supplied 8113 * 8114 * Returns the reply of the request asked by 8115 * 8116 * The parameter @p e supplied to this function must be NULL if 8117 * xcb_query_pointer_unchecked(). is used. 8118 * Otherwise, it stores the error if any. 8119 * 8120 * The returned value must be freed by the caller using free(). 8121 */ 8122 xcb_query_pointer_reply_t * 8123 xcb_query_pointer_reply (xcb_connection_t *c, 8124 xcb_query_pointer_cookie_t cookie /**< */, 8125 xcb_generic_error_t **e); 8126 8127 /** 8128 * Get the next element of the iterator 8129 * @param i Pointer to a xcb_timecoord_iterator_t 8130 * 8131 * Get the next element in the iterator. The member rem is 8132 * decreased by one. The member data points to the next 8133 * element. The member index is increased by sizeof(xcb_timecoord_t) 8134 */ 8135 void 8136 xcb_timecoord_next (xcb_timecoord_iterator_t *i); 8137 8138 /** 8139 * Return the iterator pointing to the last element 8140 * @param i An xcb_timecoord_iterator_t 8141 * @return The iterator pointing to the last element 8142 * 8143 * Set the current element in the iterator to the last element. 8144 * The member rem is set to 0. The member data points to the 8145 * last element. 8146 */ 8147 xcb_generic_iterator_t 8148 xcb_timecoord_end (xcb_timecoord_iterator_t i); 8149 8150 int 8151 xcb_get_motion_events_sizeof (const void *_buffer); 8152 8153 /** 8154 * 8155 * @param c The connection 8156 * @return A cookie 8157 * 8158 * Delivers a request to the X server. 8159 * 8160 */ 8161 xcb_get_motion_events_cookie_t 8162 xcb_get_motion_events (xcb_connection_t *c, 8163 xcb_window_t window, 8164 xcb_timestamp_t start, 8165 xcb_timestamp_t stop); 8166 8167 /** 8168 * 8169 * @param c The connection 8170 * @return A cookie 8171 * 8172 * Delivers a request to the X server. 8173 * 8174 * This form can be used only if the request will cause 8175 * a reply to be generated. Any returned error will be 8176 * placed in the event queue. 8177 */ 8178 xcb_get_motion_events_cookie_t 8179 xcb_get_motion_events_unchecked (xcb_connection_t *c, 8180 xcb_window_t window, 8181 xcb_timestamp_t start, 8182 xcb_timestamp_t stop); 8183 8184 xcb_timecoord_t * 8185 xcb_get_motion_events_events (const xcb_get_motion_events_reply_t *R); 8186 8187 int 8188 xcb_get_motion_events_events_length (const xcb_get_motion_events_reply_t *R); 8189 8190 xcb_timecoord_iterator_t 8191 xcb_get_motion_events_events_iterator (const xcb_get_motion_events_reply_t *R); 8192 8193 /** 8194 * Return the reply 8195 * @param c The connection 8196 * @param cookie The cookie 8197 * @param e The xcb_generic_error_t supplied 8198 * 8199 * Returns the reply of the request asked by 8200 * 8201 * The parameter @p e supplied to this function must be NULL if 8202 * xcb_get_motion_events_unchecked(). is used. 8203 * Otherwise, it stores the error if any. 8204 * 8205 * The returned value must be freed by the caller using free(). 8206 */ 8207 xcb_get_motion_events_reply_t * 8208 xcb_get_motion_events_reply (xcb_connection_t *c, 8209 xcb_get_motion_events_cookie_t cookie /**< */, 8210 xcb_generic_error_t **e); 8211 8212 /** 8213 * 8214 * @param c The connection 8215 * @return A cookie 8216 * 8217 * Delivers a request to the X server. 8218 * 8219 */ 8220 xcb_translate_coordinates_cookie_t 8221 xcb_translate_coordinates (xcb_connection_t *c, 8222 xcb_window_t src_window, 8223 xcb_window_t dst_window, 8224 int16_t src_x, 8225 int16_t src_y); 8226 8227 /** 8228 * 8229 * @param c The connection 8230 * @return A cookie 8231 * 8232 * Delivers a request to the X server. 8233 * 8234 * This form can be used only if the request will cause 8235 * a reply to be generated. Any returned error will be 8236 * placed in the event queue. 8237 */ 8238 xcb_translate_coordinates_cookie_t 8239 xcb_translate_coordinates_unchecked (xcb_connection_t *c, 8240 xcb_window_t src_window, 8241 xcb_window_t dst_window, 8242 int16_t src_x, 8243 int16_t src_y); 8244 8245 /** 8246 * Return the reply 8247 * @param c The connection 8248 * @param cookie The cookie 8249 * @param e The xcb_generic_error_t supplied 8250 * 8251 * Returns the reply of the request asked by 8252 * 8253 * The parameter @p e supplied to this function must be NULL if 8254 * xcb_translate_coordinates_unchecked(). is used. 8255 * Otherwise, it stores the error if any. 8256 * 8257 * The returned value must be freed by the caller using free(). 8258 */ 8259 xcb_translate_coordinates_reply_t * 8260 xcb_translate_coordinates_reply (xcb_connection_t *c, 8261 xcb_translate_coordinates_cookie_t cookie /**< */, 8262 xcb_generic_error_t **e); 8263 8264 /** 8265 * @brief move mouse pointer 8266 * 8267 * @param c The connection 8268 * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the 8269 * pointer is inside \a src_window and within the rectangle specified by (\a src_x, 8270 * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to 8271 * \a src_window. 8272 * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the 8273 * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is 8274 * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) 8275 * relative to the current position of the pointer. 8276 * @return A cookie 8277 * 8278 * Moves the mouse pointer to the specified position. 8279 * 8280 * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the 8281 * pointer is inside \a src_window and within the rectangle specified by (\a src_x, 8282 * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to 8283 * \a src_window. 8284 * 8285 * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the 8286 * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is 8287 * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) 8288 * relative to the current position of the pointer. 8289 * 8290 * This form can be used only if the request will not cause 8291 * a reply to be generated. Any returned error will be 8292 * saved for handling by xcb_request_check(). 8293 */ 8294 xcb_void_cookie_t 8295 xcb_warp_pointer_checked (xcb_connection_t *c, 8296 xcb_window_t src_window, 8297 xcb_window_t dst_window, 8298 int16_t src_x, 8299 int16_t src_y, 8300 uint16_t src_width, 8301 uint16_t src_height, 8302 int16_t dst_x, 8303 int16_t dst_y); 8304 8305 /** 8306 * @brief move mouse pointer 8307 * 8308 * @param c The connection 8309 * @param src_window If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the 8310 * pointer is inside \a src_window and within the rectangle specified by (\a src_x, 8311 * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to 8312 * \a src_window. 8313 * @param dst_window If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the 8314 * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is 8315 * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) 8316 * relative to the current position of the pointer. 8317 * @return A cookie 8318 * 8319 * Moves the mouse pointer to the specified position. 8320 * 8321 * If \a src_window is not `XCB_NONE` (TODO), the move will only take place if the 8322 * pointer is inside \a src_window and within the rectangle specified by (\a src_x, 8323 * \a src_y, \a src_width, \a src_height). The rectangle coordinates are relative to 8324 * \a src_window. 8325 * 8326 * If \a dst_window is not `XCB_NONE` (TODO), the pointer will be moved to the 8327 * offsets (\a dst_x, \a dst_y) relative to \a dst_window. If \a dst_window is 8328 * `XCB_NONE` (TODO), the pointer will be moved by the offsets (\a dst_x, \a dst_y) 8329 * relative to the current position of the pointer. 8330 * 8331 */ 8332 xcb_void_cookie_t 8333 xcb_warp_pointer (xcb_connection_t *c, 8334 xcb_window_t src_window, 8335 xcb_window_t dst_window, 8336 int16_t src_x, 8337 int16_t src_y, 8338 uint16_t src_width, 8339 uint16_t src_height, 8340 int16_t dst_x, 8341 int16_t dst_y); 8342 8343 /** 8344 * @brief Sets input focus 8345 * 8346 * @param c The connection 8347 * @param revert_to A bitmask of #xcb_input_focus_t values. 8348 * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus 8349 * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). 8350 * @param focus The window to focus. All keyboard events will be reported to this window. The 8351 * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). 8352 * \n 8353 * If \a focus is `XCB_NONE` (TODO), all keyboard events are 8354 * discarded until a new focus window is set. 8355 * \n 8356 * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the 8357 * screen on which the pointer is on currently. 8358 * @param time Timestamp to avoid race conditions when running X over the network. 8359 * \n 8360 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 8361 * time. 8362 * @return A cookie 8363 * 8364 * Changes the input focus and the last-focus-change time. If the specified \a time 8365 * is earlier than the current last-focus-change time, the request is ignored (to 8366 * avoid race conditions when running X over the network). 8367 * 8368 * A FocusIn and FocusOut event is generated when focus is changed. 8369 * 8370 * This form can be used only if the request will not cause 8371 * a reply to be generated. Any returned error will be 8372 * saved for handling by xcb_request_check(). 8373 */ 8374 xcb_void_cookie_t 8375 xcb_set_input_focus_checked (xcb_connection_t *c, 8376 uint8_t revert_to, 8377 xcb_window_t focus, 8378 xcb_timestamp_t time); 8379 8380 /** 8381 * @brief Sets input focus 8382 * 8383 * @param c The connection 8384 * @param revert_to A bitmask of #xcb_input_focus_t values. 8385 * @param revert_to Specifies what happens when the \a focus window becomes unviewable (if \a focus 8386 * is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). 8387 * @param focus The window to focus. All keyboard events will be reported to this window. The 8388 * window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). 8389 * \n 8390 * If \a focus is `XCB_NONE` (TODO), all keyboard events are 8391 * discarded until a new focus window is set. 8392 * \n 8393 * If \a focus is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the 8394 * screen on which the pointer is on currently. 8395 * @param time Timestamp to avoid race conditions when running X over the network. 8396 * \n 8397 * The special value `XCB_CURRENT_TIME` will be replaced with the current server 8398 * time. 8399 * @return A cookie 8400 * 8401 * Changes the input focus and the last-focus-change time. If the specified \a time 8402 * is earlier than the current last-focus-change time, the request is ignored (to 8403 * avoid race conditions when running X over the network). 8404 * 8405 * A FocusIn and FocusOut event is generated when focus is changed. 8406 * 8407 */ 8408 xcb_void_cookie_t 8409 xcb_set_input_focus (xcb_connection_t *c, 8410 uint8_t revert_to, 8411 xcb_window_t focus, 8412 xcb_timestamp_t time); 8413 8414 /** 8415 * 8416 * @param c The connection 8417 * @return A cookie 8418 * 8419 * Delivers a request to the X server. 8420 * 8421 */ 8422 xcb_get_input_focus_cookie_t 8423 xcb_get_input_focus (xcb_connection_t *c); 8424 8425 /** 8426 * 8427 * @param c The connection 8428 * @return A cookie 8429 * 8430 * Delivers a request to the X server. 8431 * 8432 * This form can be used only if the request will cause 8433 * a reply to be generated. Any returned error will be 8434 * placed in the event queue. 8435 */ 8436 xcb_get_input_focus_cookie_t 8437 xcb_get_input_focus_unchecked (xcb_connection_t *c); 8438 8439 /** 8440 * Return the reply 8441 * @param c The connection 8442 * @param cookie The cookie 8443 * @param e The xcb_generic_error_t supplied 8444 * 8445 * Returns the reply of the request asked by 8446 * 8447 * The parameter @p e supplied to this function must be NULL if 8448 * xcb_get_input_focus_unchecked(). is used. 8449 * Otherwise, it stores the error if any. 8450 * 8451 * The returned value must be freed by the caller using free(). 8452 */ 8453 xcb_get_input_focus_reply_t * 8454 xcb_get_input_focus_reply (xcb_connection_t *c, 8455 xcb_get_input_focus_cookie_t cookie /**< */, 8456 xcb_generic_error_t **e); 8457 8458 /** 8459 * 8460 * @param c The connection 8461 * @return A cookie 8462 * 8463 * Delivers a request to the X server. 8464 * 8465 */ 8466 xcb_query_keymap_cookie_t 8467 xcb_query_keymap (xcb_connection_t *c); 8468 8469 /** 8470 * 8471 * @param c The connection 8472 * @return A cookie 8473 * 8474 * Delivers a request to the X server. 8475 * 8476 * This form can be used only if the request will cause 8477 * a reply to be generated. Any returned error will be 8478 * placed in the event queue. 8479 */ 8480 xcb_query_keymap_cookie_t 8481 xcb_query_keymap_unchecked (xcb_connection_t *c); 8482 8483 /** 8484 * Return the reply 8485 * @param c The connection 8486 * @param cookie The cookie 8487 * @param e The xcb_generic_error_t supplied 8488 * 8489 * Returns the reply of the request asked by 8490 * 8491 * The parameter @p e supplied to this function must be NULL if 8492 * xcb_query_keymap_unchecked(). is used. 8493 * Otherwise, it stores the error if any. 8494 * 8495 * The returned value must be freed by the caller using free(). 8496 */ 8497 xcb_query_keymap_reply_t * 8498 xcb_query_keymap_reply (xcb_connection_t *c, 8499 xcb_query_keymap_cookie_t cookie /**< */, 8500 xcb_generic_error_t **e); 8501 8502 int 8503 xcb_open_font_sizeof (const void *_buffer); 8504 8505 /** 8506 * @brief opens a font 8507 * 8508 * @param c The connection 8509 * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. 8510 * @param name_len Length (in bytes) of \a name. 8511 * @param name A pattern describing an X core font. 8512 * @return A cookie 8513 * 8514 * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). 8515 * 8516 * Note that X core fonts are deprecated (but still supported) in favor of 8517 * client-side rendering using Xft. 8518 * 8519 * This form can be used only if the request will not cause 8520 * a reply to be generated. Any returned error will be 8521 * saved for handling by xcb_request_check(). 8522 */ 8523 xcb_void_cookie_t 8524 xcb_open_font_checked (xcb_connection_t *c, 8525 xcb_font_t fid, 8526 uint16_t name_len, 8527 const char *name); 8528 8529 /** 8530 * @brief opens a font 8531 * 8532 * @param c The connection 8533 * @param fid The ID with which you will refer to the font, created by `xcb_generate_id`. 8534 * @param name_len Length (in bytes) of \a name. 8535 * @param name A pattern describing an X core font. 8536 * @return A cookie 8537 * 8538 * Opens any X core font matching the given \a name (for example "-misc-fixed-*"). 8539 * 8540 * Note that X core fonts are deprecated (but still supported) in favor of 8541 * client-side rendering using Xft. 8542 * 8543 */ 8544 xcb_void_cookie_t 8545 xcb_open_font (xcb_connection_t *c, 8546 xcb_font_t fid, 8547 uint16_t name_len, 8548 const char *name); 8549 8550 char * 8551 xcb_open_font_name (const xcb_open_font_request_t *R); 8552 8553 int 8554 xcb_open_font_name_length (const xcb_open_font_request_t *R); 8555 8556 xcb_generic_iterator_t 8557 xcb_open_font_name_end (const xcb_open_font_request_t *R); 8558 8559 /** 8560 * 8561 * @param c The connection 8562 * @return A cookie 8563 * 8564 * Delivers a request to the X server. 8565 * 8566 * This form can be used only if the request will not cause 8567 * a reply to be generated. Any returned error will be 8568 * saved for handling by xcb_request_check(). 8569 */ 8570 xcb_void_cookie_t 8571 xcb_close_font_checked (xcb_connection_t *c, 8572 xcb_font_t font); 8573 8574 /** 8575 * 8576 * @param c The connection 8577 * @return A cookie 8578 * 8579 * Delivers a request to the X server. 8580 * 8581 */ 8582 xcb_void_cookie_t 8583 xcb_close_font (xcb_connection_t *c, 8584 xcb_font_t font); 8585 8586 /** 8587 * Get the next element of the iterator 8588 * @param i Pointer to a xcb_fontprop_iterator_t 8589 * 8590 * Get the next element in the iterator. The member rem is 8591 * decreased by one. The member data points to the next 8592 * element. The member index is increased by sizeof(xcb_fontprop_t) 8593 */ 8594 void 8595 xcb_fontprop_next (xcb_fontprop_iterator_t *i); 8596 8597 /** 8598 * Return the iterator pointing to the last element 8599 * @param i An xcb_fontprop_iterator_t 8600 * @return The iterator pointing to the last element 8601 * 8602 * Set the current element in the iterator to the last element. 8603 * The member rem is set to 0. The member data points to the 8604 * last element. 8605 */ 8606 xcb_generic_iterator_t 8607 xcb_fontprop_end (xcb_fontprop_iterator_t i); 8608 8609 /** 8610 * Get the next element of the iterator 8611 * @param i Pointer to a xcb_charinfo_iterator_t 8612 * 8613 * Get the next element in the iterator. The member rem is 8614 * decreased by one. The member data points to the next 8615 * element. The member index is increased by sizeof(xcb_charinfo_t) 8616 */ 8617 void 8618 xcb_charinfo_next (xcb_charinfo_iterator_t *i); 8619 8620 /** 8621 * Return the iterator pointing to the last element 8622 * @param i An xcb_charinfo_iterator_t 8623 * @return The iterator pointing to the last element 8624 * 8625 * Set the current element in the iterator to the last element. 8626 * The member rem is set to 0. The member data points to the 8627 * last element. 8628 */ 8629 xcb_generic_iterator_t 8630 xcb_charinfo_end (xcb_charinfo_iterator_t i); 8631 8632 int 8633 xcb_query_font_sizeof (const void *_buffer); 8634 8635 /** 8636 * @brief query font metrics 8637 * 8638 * @param c The connection 8639 * @param font The fontable (Font or Graphics Context) to query. 8640 * @return A cookie 8641 * 8642 * Queries information associated with the font. 8643 * 8644 */ 8645 xcb_query_font_cookie_t 8646 xcb_query_font (xcb_connection_t *c, 8647 xcb_fontable_t font); 8648 8649 /** 8650 * @brief query font metrics 8651 * 8652 * @param c The connection 8653 * @param font The fontable (Font or Graphics Context) to query. 8654 * @return A cookie 8655 * 8656 * Queries information associated with the font. 8657 * 8658 * This form can be used only if the request will cause 8659 * a reply to be generated. Any returned error will be 8660 * placed in the event queue. 8661 */ 8662 xcb_query_font_cookie_t 8663 xcb_query_font_unchecked (xcb_connection_t *c, 8664 xcb_fontable_t font); 8665 8666 xcb_fontprop_t * 8667 xcb_query_font_properties (const xcb_query_font_reply_t *R); 8668 8669 int 8670 xcb_query_font_properties_length (const xcb_query_font_reply_t *R); 8671 8672 xcb_fontprop_iterator_t 8673 xcb_query_font_properties_iterator (const xcb_query_font_reply_t *R); 8674 8675 xcb_charinfo_t * 8676 xcb_query_font_char_infos (const xcb_query_font_reply_t *R); 8677 8678 int 8679 xcb_query_font_char_infos_length (const xcb_query_font_reply_t *R); 8680 8681 xcb_charinfo_iterator_t 8682 xcb_query_font_char_infos_iterator (const xcb_query_font_reply_t *R); 8683 8684 /** 8685 * Return the reply 8686 * @param c The connection 8687 * @param cookie The cookie 8688 * @param e The xcb_generic_error_t supplied 8689 * 8690 * Returns the reply of the request asked by 8691 * 8692 * The parameter @p e supplied to this function must be NULL if 8693 * xcb_query_font_unchecked(). is used. 8694 * Otherwise, it stores the error if any. 8695 * 8696 * The returned value must be freed by the caller using free(). 8697 */ 8698 xcb_query_font_reply_t * 8699 xcb_query_font_reply (xcb_connection_t *c, 8700 xcb_query_font_cookie_t cookie /**< */, 8701 xcb_generic_error_t **e); 8702 8703 int 8704 xcb_query_text_extents_sizeof (const void *_buffer, 8705 uint32_t string_len); 8706 8707 /** 8708 * @brief get text extents 8709 * 8710 * @param c The connection 8711 * @param font The \a font to calculate text extents in. You can also pass a graphics context. 8712 * @param string_len The number of characters in \a string. 8713 * @param string The text to get text extents for. 8714 * @return A cookie 8715 * 8716 * Query text extents from the X11 server. This request returns the bounding box 8717 * of the specified 16-bit character string in the specified \a font or the font 8718 * contained in the specified graphics context. 8719 * 8720 * `font_ascent` is set to the maximum of the ascent metrics of all characters in 8721 * the string. `font_descent` is set to the maximum of the descent metrics. 8722 * `overall_width` is set to the sum of the character-width metrics of all 8723 * characters in the string. For each character in the string, let W be the sum of 8724 * the character-width metrics of all characters preceding it in the string. Let L 8725 * be the left-side-bearing metric of the character plus W. Let R be the 8726 * right-side-bearing metric of the character plus W. The lbearing member is set 8727 * to the minimum L of all characters in the string. The rbearing member is set to 8728 * the maximum R. 8729 * 8730 * For fonts defined with linear indexing rather than 2-byte matrix indexing, each 8731 * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the 8732 * most significant byte. If the font has no defined default character, undefined 8733 * characters in the string are taken to have all zero metrics. 8734 * 8735 * Characters with all zero metrics are ignored. If the font has no defined 8736 * default_char, the undefined characters in the string are also ignored. 8737 * 8738 */ 8739 xcb_query_text_extents_cookie_t 8740 xcb_query_text_extents (xcb_connection_t *c, 8741 xcb_fontable_t font, 8742 uint32_t string_len, 8743 const xcb_char2b_t *string); 8744 8745 /** 8746 * @brief get text extents 8747 * 8748 * @param c The connection 8749 * @param font The \a font to calculate text extents in. You can also pass a graphics context. 8750 * @param string_len The number of characters in \a string. 8751 * @param string The text to get text extents for. 8752 * @return A cookie 8753 * 8754 * Query text extents from the X11 server. This request returns the bounding box 8755 * of the specified 16-bit character string in the specified \a font or the font 8756 * contained in the specified graphics context. 8757 * 8758 * `font_ascent` is set to the maximum of the ascent metrics of all characters in 8759 * the string. `font_descent` is set to the maximum of the descent metrics. 8760 * `overall_width` is set to the sum of the character-width metrics of all 8761 * characters in the string. For each character in the string, let W be the sum of 8762 * the character-width metrics of all characters preceding it in the string. Let L 8763 * be the left-side-bearing metric of the character plus W. Let R be the 8764 * right-side-bearing metric of the character plus W. The lbearing member is set 8765 * to the minimum L of all characters in the string. The rbearing member is set to 8766 * the maximum R. 8767 * 8768 * For fonts defined with linear indexing rather than 2-byte matrix indexing, each 8769 * `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the 8770 * most significant byte. If the font has no defined default character, undefined 8771 * characters in the string are taken to have all zero metrics. 8772 * 8773 * Characters with all zero metrics are ignored. If the font has no defined 8774 * default_char, the undefined characters in the string are also ignored. 8775 * 8776 * This form can be used only if the request will cause 8777 * a reply to be generated. Any returned error will be 8778 * placed in the event queue. 8779 */ 8780 xcb_query_text_extents_cookie_t 8781 xcb_query_text_extents_unchecked (xcb_connection_t *c, 8782 xcb_fontable_t font, 8783 uint32_t string_len, 8784 const xcb_char2b_t *string); 8785 8786 /** 8787 * Return the reply 8788 * @param c The connection 8789 * @param cookie The cookie 8790 * @param e The xcb_generic_error_t supplied 8791 * 8792 * Returns the reply of the request asked by 8793 * 8794 * The parameter @p e supplied to this function must be NULL if 8795 * xcb_query_text_extents_unchecked(). is used. 8796 * Otherwise, it stores the error if any. 8797 * 8798 * The returned value must be freed by the caller using free(). 8799 */ 8800 xcb_query_text_extents_reply_t * 8801 xcb_query_text_extents_reply (xcb_connection_t *c, 8802 xcb_query_text_extents_cookie_t cookie /**< */, 8803 xcb_generic_error_t **e); 8804 8805 int 8806 xcb_str_sizeof (const void *_buffer); 8807 8808 char * 8809 xcb_str_name (const xcb_str_t *R); 8810 8811 int 8812 xcb_str_name_length (const xcb_str_t *R); 8813 8814 xcb_generic_iterator_t 8815 xcb_str_name_end (const xcb_str_t *R); 8816 8817 /** 8818 * Get the next element of the iterator 8819 * @param i Pointer to a xcb_str_iterator_t 8820 * 8821 * Get the next element in the iterator. The member rem is 8822 * decreased by one. The member data points to the next 8823 * element. The member index is increased by sizeof(xcb_str_t) 8824 */ 8825 void 8826 xcb_str_next (xcb_str_iterator_t *i); 8827 8828 /** 8829 * Return the iterator pointing to the last element 8830 * @param i An xcb_str_iterator_t 8831 * @return The iterator pointing to the last element 8832 * 8833 * Set the current element in the iterator to the last element. 8834 * The member rem is set to 0. The member data points to the 8835 * last element. 8836 */ 8837 xcb_generic_iterator_t 8838 xcb_str_end (xcb_str_iterator_t i); 8839 8840 int 8841 xcb_list_fonts_sizeof (const void *_buffer); 8842 8843 /** 8844 * @brief get matching font names 8845 * 8846 * @param c The connection 8847 * @param max_names The maximum number of fonts to be returned. 8848 * @param pattern_len The length (in bytes) of \a pattern. 8849 * @param pattern A font pattern, for example "-misc-fixed-*". 8850 * \n 8851 * The asterisk (*) is a wildcard for any number of characters. The question mark 8852 * (?) is a wildcard for a single character. Use of uppercase or lowercase does 8853 * not matter. 8854 * @return A cookie 8855 * 8856 * Gets a list of available font names which match the given \a pattern. 8857 * 8858 */ 8859 xcb_list_fonts_cookie_t 8860 xcb_list_fonts (xcb_connection_t *c, 8861 uint16_t max_names, 8862 uint16_t pattern_len, 8863 const char *pattern); 8864 8865 /** 8866 * @brief get matching font names 8867 * 8868 * @param c The connection 8869 * @param max_names The maximum number of fonts to be returned. 8870 * @param pattern_len The length (in bytes) of \a pattern. 8871 * @param pattern A font pattern, for example "-misc-fixed-*". 8872 * \n 8873 * The asterisk (*) is a wildcard for any number of characters. The question mark 8874 * (?) is a wildcard for a single character. Use of uppercase or lowercase does 8875 * not matter. 8876 * @return A cookie 8877 * 8878 * Gets a list of available font names which match the given \a pattern. 8879 * 8880 * This form can be used only if the request will cause 8881 * a reply to be generated. Any returned error will be 8882 * placed in the event queue. 8883 */ 8884 xcb_list_fonts_cookie_t 8885 xcb_list_fonts_unchecked (xcb_connection_t *c, 8886 uint16_t max_names, 8887 uint16_t pattern_len, 8888 const char *pattern); 8889 8890 int 8891 xcb_list_fonts_names_length (const xcb_list_fonts_reply_t *R); 8892 8893 xcb_str_iterator_t 8894 xcb_list_fonts_names_iterator (const xcb_list_fonts_reply_t *R); 8895 8896 /** 8897 * Return the reply 8898 * @param c The connection 8899 * @param cookie The cookie 8900 * @param e The xcb_generic_error_t supplied 8901 * 8902 * Returns the reply of the request asked by 8903 * 8904 * The parameter @p e supplied to this function must be NULL if 8905 * xcb_list_fonts_unchecked(). is used. 8906 * Otherwise, it stores the error if any. 8907 * 8908 * The returned value must be freed by the caller using free(). 8909 */ 8910 xcb_list_fonts_reply_t * 8911 xcb_list_fonts_reply (xcb_connection_t *c, 8912 xcb_list_fonts_cookie_t cookie /**< */, 8913 xcb_generic_error_t **e); 8914 8915 int 8916 xcb_list_fonts_with_info_sizeof (const void *_buffer); 8917 8918 /** 8919 * @brief get matching font names and information 8920 * 8921 * @param c The connection 8922 * @param max_names The maximum number of fonts to be returned. 8923 * @param pattern_len The length (in bytes) of \a pattern. 8924 * @param pattern A font pattern, for example "-misc-fixed-*". 8925 * \n 8926 * The asterisk (*) is a wildcard for any number of characters. The question mark 8927 * (?) is a wildcard for a single character. Use of uppercase or lowercase does 8928 * not matter. 8929 * @return A cookie 8930 * 8931 * Gets a list of available font names which match the given \a pattern. 8932 * 8933 */ 8934 xcb_list_fonts_with_info_cookie_t 8935 xcb_list_fonts_with_info (xcb_connection_t *c, 8936 uint16_t max_names, 8937 uint16_t pattern_len, 8938 const char *pattern); 8939 8940 /** 8941 * @brief get matching font names and information 8942 * 8943 * @param c The connection 8944 * @param max_names The maximum number of fonts to be returned. 8945 * @param pattern_len The length (in bytes) of \a pattern. 8946 * @param pattern A font pattern, for example "-misc-fixed-*". 8947 * \n 8948 * The asterisk (*) is a wildcard for any number of characters. The question mark 8949 * (?) is a wildcard for a single character. Use of uppercase or lowercase does 8950 * not matter. 8951 * @return A cookie 8952 * 8953 * Gets a list of available font names which match the given \a pattern. 8954 * 8955 * This form can be used only if the request will cause 8956 * a reply to be generated. Any returned error will be 8957 * placed in the event queue. 8958 */ 8959 xcb_list_fonts_with_info_cookie_t 8960 xcb_list_fonts_with_info_unchecked (xcb_connection_t *c, 8961 uint16_t max_names, 8962 uint16_t pattern_len, 8963 const char *pattern); 8964 8965 xcb_fontprop_t * 8966 xcb_list_fonts_with_info_properties (const xcb_list_fonts_with_info_reply_t *R); 8967 8968 int 8969 xcb_list_fonts_with_info_properties_length (const xcb_list_fonts_with_info_reply_t *R); 8970 8971 xcb_fontprop_iterator_t 8972 xcb_list_fonts_with_info_properties_iterator (const xcb_list_fonts_with_info_reply_t *R); 8973 8974 char * 8975 xcb_list_fonts_with_info_name (const xcb_list_fonts_with_info_reply_t *R); 8976 8977 int 8978 xcb_list_fonts_with_info_name_length (const xcb_list_fonts_with_info_reply_t *R); 8979 8980 xcb_generic_iterator_t 8981 xcb_list_fonts_with_info_name_end (const xcb_list_fonts_with_info_reply_t *R); 8982 8983 /** 8984 * Return the reply 8985 * @param c The connection 8986 * @param cookie The cookie 8987 * @param e The xcb_generic_error_t supplied 8988 * 8989 * Returns the reply of the request asked by 8990 * 8991 * The parameter @p e supplied to this function must be NULL if 8992 * xcb_list_fonts_with_info_unchecked(). is used. 8993 * Otherwise, it stores the error if any. 8994 * 8995 * The returned value must be freed by the caller using free(). 8996 */ 8997 xcb_list_fonts_with_info_reply_t * 8998 xcb_list_fonts_with_info_reply (xcb_connection_t *c, 8999 xcb_list_fonts_with_info_cookie_t cookie /**< */, 9000 xcb_generic_error_t **e); 9001 9002 int 9003 xcb_set_font_path_sizeof (const void *_buffer); 9004 9005 /** 9006 * 9007 * @param c The connection 9008 * @return A cookie 9009 * 9010 * Delivers a request to the X server. 9011 * 9012 * This form can be used only if the request will not cause 9013 * a reply to be generated. Any returned error will be 9014 * saved for handling by xcb_request_check(). 9015 */ 9016 xcb_void_cookie_t 9017 xcb_set_font_path_checked (xcb_connection_t *c, 9018 uint16_t font_qty, 9019 const xcb_str_t *font); 9020 9021 /** 9022 * 9023 * @param c The connection 9024 * @return A cookie 9025 * 9026 * Delivers a request to the X server. 9027 * 9028 */ 9029 xcb_void_cookie_t 9030 xcb_set_font_path (xcb_connection_t *c, 9031 uint16_t font_qty, 9032 const xcb_str_t *font); 9033 9034 int 9035 xcb_set_font_path_font_length (const xcb_set_font_path_request_t *R); 9036 9037 xcb_str_iterator_t 9038 xcb_set_font_path_font_iterator (const xcb_set_font_path_request_t *R); 9039 9040 int 9041 xcb_get_font_path_sizeof (const void *_buffer); 9042 9043 /** 9044 * 9045 * @param c The connection 9046 * @return A cookie 9047 * 9048 * Delivers a request to the X server. 9049 * 9050 */ 9051 xcb_get_font_path_cookie_t 9052 xcb_get_font_path (xcb_connection_t *c); 9053 9054 /** 9055 * 9056 * @param c The connection 9057 * @return A cookie 9058 * 9059 * Delivers a request to the X server. 9060 * 9061 * This form can be used only if the request will cause 9062 * a reply to be generated. Any returned error will be 9063 * placed in the event queue. 9064 */ 9065 xcb_get_font_path_cookie_t 9066 xcb_get_font_path_unchecked (xcb_connection_t *c); 9067 9068 int 9069 xcb_get_font_path_path_length (const xcb_get_font_path_reply_t *R); 9070 9071 xcb_str_iterator_t 9072 xcb_get_font_path_path_iterator (const xcb_get_font_path_reply_t *R); 9073 9074 /** 9075 * Return the reply 9076 * @param c The connection 9077 * @param cookie The cookie 9078 * @param e The xcb_generic_error_t supplied 9079 * 9080 * Returns the reply of the request asked by 9081 * 9082 * The parameter @p e supplied to this function must be NULL if 9083 * xcb_get_font_path_unchecked(). is used. 9084 * Otherwise, it stores the error if any. 9085 * 9086 * The returned value must be freed by the caller using free(). 9087 */ 9088 xcb_get_font_path_reply_t * 9089 xcb_get_font_path_reply (xcb_connection_t *c, 9090 xcb_get_font_path_cookie_t cookie /**< */, 9091 xcb_generic_error_t **e); 9092 9093 /** 9094 * @brief Creates a pixmap 9095 * 9096 * @param c The connection 9097 * @param depth TODO 9098 * @param pid The ID with which you will refer to the new pixmap, created by 9099 * `xcb_generate_id`. 9100 * @param drawable Drawable to get the screen from. 9101 * @param width The width of the new pixmap. 9102 * @param height The height of the new pixmap. 9103 * @return A cookie 9104 * 9105 * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable 9106 * is on and only with drawables of the same \a depth. 9107 * 9108 * This form can be used only if the request will not cause 9109 * a reply to be generated. Any returned error will be 9110 * saved for handling by xcb_request_check(). 9111 */ 9112 xcb_void_cookie_t 9113 xcb_create_pixmap_checked (xcb_connection_t *c, 9114 uint8_t depth, 9115 xcb_pixmap_t pid, 9116 xcb_drawable_t drawable, 9117 uint16_t width, 9118 uint16_t height); 9119 9120 /** 9121 * @brief Creates a pixmap 9122 * 9123 * @param c The connection 9124 * @param depth TODO 9125 * @param pid The ID with which you will refer to the new pixmap, created by 9126 * `xcb_generate_id`. 9127 * @param drawable Drawable to get the screen from. 9128 * @param width The width of the new pixmap. 9129 * @param height The height of the new pixmap. 9130 * @return A cookie 9131 * 9132 * Creates a pixmap. The pixmap can only be used on the same screen as \a drawable 9133 * is on and only with drawables of the same \a depth. 9134 * 9135 */ 9136 xcb_void_cookie_t 9137 xcb_create_pixmap (xcb_connection_t *c, 9138 uint8_t depth, 9139 xcb_pixmap_t pid, 9140 xcb_drawable_t drawable, 9141 uint16_t width, 9142 uint16_t height); 9143 9144 /** 9145 * @brief Destroys a pixmap 9146 * 9147 * @param c The connection 9148 * @param pixmap The pixmap to destroy. 9149 * @return A cookie 9150 * 9151 * Deletes the association between the pixmap ID and the pixmap. The pixmap 9152 * storage will be freed when there are no more references to it. 9153 * 9154 * This form can be used only if the request will not cause 9155 * a reply to be generated. Any returned error will be 9156 * saved for handling by xcb_request_check(). 9157 */ 9158 xcb_void_cookie_t 9159 xcb_free_pixmap_checked (xcb_connection_t *c, 9160 xcb_pixmap_t pixmap); 9161 9162 /** 9163 * @brief Destroys a pixmap 9164 * 9165 * @param c The connection 9166 * @param pixmap The pixmap to destroy. 9167 * @return A cookie 9168 * 9169 * Deletes the association between the pixmap ID and the pixmap. The pixmap 9170 * storage will be freed when there are no more references to it. 9171 * 9172 */ 9173 xcb_void_cookie_t 9174 xcb_free_pixmap (xcb_connection_t *c, 9175 xcb_pixmap_t pixmap); 9176 9177 int 9178 xcb_create_gc_value_list_serialize (void **_buffer, 9179 uint32_t value_mask, 9180 const xcb_create_gc_value_list_t *_aux); 9181 9182 int 9183 xcb_create_gc_value_list_unpack (const void *_buffer, 9184 uint32_t value_mask, 9185 xcb_create_gc_value_list_t *_aux); 9186 9187 int 9188 xcb_create_gc_value_list_sizeof (const void *_buffer, 9189 uint32_t value_mask); 9190 9191 int 9192 xcb_create_gc_sizeof (const void *_buffer); 9193 9194 /** 9195 * @brief Creates a graphics context 9196 * 9197 * @param c The connection 9198 * @param cid The ID with which you will refer to the graphics context, created by 9199 * `xcb_generate_id`. 9200 * @param drawable Drawable to get the root/depth from. 9201 * @return A cookie 9202 * 9203 * Creates a graphics context. The graphics context can be used with any drawable 9204 * that has the same root and depth as the specified drawable. 9205 * 9206 * This form can be used only if the request will not cause 9207 * a reply to be generated. Any returned error will be 9208 * saved for handling by xcb_request_check(). 9209 */ 9210 xcb_void_cookie_t 9211 xcb_create_gc_checked (xcb_connection_t *c, 9212 xcb_gcontext_t cid, 9213 xcb_drawable_t drawable, 9214 uint32_t value_mask, 9215 const void *value_list); 9216 9217 /** 9218 * @brief Creates a graphics context 9219 * 9220 * @param c The connection 9221 * @param cid The ID with which you will refer to the graphics context, created by 9222 * `xcb_generate_id`. 9223 * @param drawable Drawable to get the root/depth from. 9224 * @return A cookie 9225 * 9226 * Creates a graphics context. The graphics context can be used with any drawable 9227 * that has the same root and depth as the specified drawable. 9228 * 9229 */ 9230 xcb_void_cookie_t 9231 xcb_create_gc (xcb_connection_t *c, 9232 xcb_gcontext_t cid, 9233 xcb_drawable_t drawable, 9234 uint32_t value_mask, 9235 const void *value_list); 9236 9237 /** 9238 * @brief Creates a graphics context 9239 * 9240 * @param c The connection 9241 * @param cid The ID with which you will refer to the graphics context, created by 9242 * `xcb_generate_id`. 9243 * @param drawable Drawable to get the root/depth from. 9244 * @return A cookie 9245 * 9246 * Creates a graphics context. The graphics context can be used with any drawable 9247 * that has the same root and depth as the specified drawable. 9248 * 9249 * This form can be used only if the request will not cause 9250 * a reply to be generated. Any returned error will be 9251 * saved for handling by xcb_request_check(). 9252 */ 9253 xcb_void_cookie_t 9254 xcb_create_gc_aux_checked (xcb_connection_t *c, 9255 xcb_gcontext_t cid, 9256 xcb_drawable_t drawable, 9257 uint32_t value_mask, 9258 const xcb_create_gc_value_list_t *value_list); 9259 9260 /** 9261 * @brief Creates a graphics context 9262 * 9263 * @param c The connection 9264 * @param cid The ID with which you will refer to the graphics context, created by 9265 * `xcb_generate_id`. 9266 * @param drawable Drawable to get the root/depth from. 9267 * @return A cookie 9268 * 9269 * Creates a graphics context. The graphics context can be used with any drawable 9270 * that has the same root and depth as the specified drawable. 9271 * 9272 */ 9273 xcb_void_cookie_t 9274 xcb_create_gc_aux (xcb_connection_t *c, 9275 xcb_gcontext_t cid, 9276 xcb_drawable_t drawable, 9277 uint32_t value_mask, 9278 const xcb_create_gc_value_list_t *value_list); 9279 9280 void * 9281 xcb_create_gc_value_list (const xcb_create_gc_request_t *R); 9282 9283 int 9284 xcb_change_gc_value_list_serialize (void **_buffer, 9285 uint32_t value_mask, 9286 const xcb_change_gc_value_list_t *_aux); 9287 9288 int 9289 xcb_change_gc_value_list_unpack (const void *_buffer, 9290 uint32_t value_mask, 9291 xcb_change_gc_value_list_t *_aux); 9292 9293 int 9294 xcb_change_gc_value_list_sizeof (const void *_buffer, 9295 uint32_t value_mask); 9296 9297 int 9298 xcb_change_gc_sizeof (const void *_buffer); 9299 9300 /** 9301 * @brief change graphics context components 9302 * 9303 * @param c The connection 9304 * @param gc The graphics context to change. 9305 * @param value_mask A bitmask of #xcb_gc_t values. 9306 * @param value_mask \n 9307 * @param value_list Values for each of the components specified in the bitmask \a value_mask. The 9308 * order has to correspond to the order of possible \a value_mask bits. See the 9309 * example. 9310 * @return A cookie 9311 * 9312 * Changes the components specified by \a value_mask for the specified graphics context. 9313 * 9314 * This form can be used only if the request will not cause 9315 * a reply to be generated. Any returned error will be 9316 * saved for handling by xcb_request_check(). 9317 */ 9318 xcb_void_cookie_t 9319 xcb_change_gc_checked (xcb_connection_t *c, 9320 xcb_gcontext_t gc, 9321 uint32_t value_mask, 9322 const void *value_list); 9323 9324 /** 9325 * @brief change graphics context components 9326 * 9327 * @param c The connection 9328 * @param gc The graphics context to change. 9329 * @param value_mask A bitmask of #xcb_gc_t values. 9330 * @param value_mask \n 9331 * @param value_list Values for each of the components specified in the bitmask \a value_mask. The 9332 * order has to correspond to the order of possible \a value_mask bits. See the 9333 * example. 9334 * @return A cookie 9335 * 9336 * Changes the components specified by \a value_mask for the specified graphics context. 9337 * 9338 */ 9339 xcb_void_cookie_t 9340 xcb_change_gc (xcb_connection_t *c, 9341 xcb_gcontext_t gc, 9342 uint32_t value_mask, 9343 const void *value_list); 9344 9345 /** 9346 * @brief change graphics context components 9347 * 9348 * @param c The connection 9349 * @param gc The graphics context to change. 9350 * @param value_mask A bitmask of #xcb_gc_t values. 9351 * @param value_mask \n 9352 * @param value_list Values for each of the components specified in the bitmask \a value_mask. The 9353 * order has to correspond to the order of possible \a value_mask bits. See the 9354 * example. 9355 * @return A cookie 9356 * 9357 * Changes the components specified by \a value_mask for the specified graphics context. 9358 * 9359 * This form can be used only if the request will not cause 9360 * a reply to be generated. Any returned error will be 9361 * saved for handling by xcb_request_check(). 9362 */ 9363 xcb_void_cookie_t 9364 xcb_change_gc_aux_checked (xcb_connection_t *c, 9365 xcb_gcontext_t gc, 9366 uint32_t value_mask, 9367 const xcb_change_gc_value_list_t *value_list); 9368 9369 /** 9370 * @brief change graphics context components 9371 * 9372 * @param c The connection 9373 * @param gc The graphics context to change. 9374 * @param value_mask A bitmask of #xcb_gc_t values. 9375 * @param value_mask \n 9376 * @param value_list Values for each of the components specified in the bitmask \a value_mask. The 9377 * order has to correspond to the order of possible \a value_mask bits. See the 9378 * example. 9379 * @return A cookie 9380 * 9381 * Changes the components specified by \a value_mask for the specified graphics context. 9382 * 9383 */ 9384 xcb_void_cookie_t 9385 xcb_change_gc_aux (xcb_connection_t *c, 9386 xcb_gcontext_t gc, 9387 uint32_t value_mask, 9388 const xcb_change_gc_value_list_t *value_list); 9389 9390 void * 9391 xcb_change_gc_value_list (const xcb_change_gc_request_t *R); 9392 9393 /** 9394 * 9395 * @param c The connection 9396 * @return A cookie 9397 * 9398 * Delivers a request to the X server. 9399 * 9400 * This form can be used only if the request will not cause 9401 * a reply to be generated. Any returned error will be 9402 * saved for handling by xcb_request_check(). 9403 */ 9404 xcb_void_cookie_t 9405 xcb_copy_gc_checked (xcb_connection_t *c, 9406 xcb_gcontext_t src_gc, 9407 xcb_gcontext_t dst_gc, 9408 uint32_t value_mask); 9409 9410 /** 9411 * 9412 * @param c The connection 9413 * @return A cookie 9414 * 9415 * Delivers a request to the X server. 9416 * 9417 */ 9418 xcb_void_cookie_t 9419 xcb_copy_gc (xcb_connection_t *c, 9420 xcb_gcontext_t src_gc, 9421 xcb_gcontext_t dst_gc, 9422 uint32_t value_mask); 9423 9424 int 9425 xcb_set_dashes_sizeof (const void *_buffer); 9426 9427 /** 9428 * 9429 * @param c The connection 9430 * @return A cookie 9431 * 9432 * Delivers a request to the X server. 9433 * 9434 * This form can be used only if the request will not cause 9435 * a reply to be generated. Any returned error will be 9436 * saved for handling by xcb_request_check(). 9437 */ 9438 xcb_void_cookie_t 9439 xcb_set_dashes_checked (xcb_connection_t *c, 9440 xcb_gcontext_t gc, 9441 uint16_t dash_offset, 9442 uint16_t dashes_len, 9443 const uint8_t *dashes); 9444 9445 /** 9446 * 9447 * @param c The connection 9448 * @return A cookie 9449 * 9450 * Delivers a request to the X server. 9451 * 9452 */ 9453 xcb_void_cookie_t 9454 xcb_set_dashes (xcb_connection_t *c, 9455 xcb_gcontext_t gc, 9456 uint16_t dash_offset, 9457 uint16_t dashes_len, 9458 const uint8_t *dashes); 9459 9460 uint8_t * 9461 xcb_set_dashes_dashes (const xcb_set_dashes_request_t *R); 9462 9463 int 9464 xcb_set_dashes_dashes_length (const xcb_set_dashes_request_t *R); 9465 9466 xcb_generic_iterator_t 9467 xcb_set_dashes_dashes_end (const xcb_set_dashes_request_t *R); 9468 9469 int 9470 xcb_set_clip_rectangles_sizeof (const void *_buffer, 9471 uint32_t rectangles_len); 9472 9473 /** 9474 * 9475 * @param c The connection 9476 * @return A cookie 9477 * 9478 * Delivers a request to the X server. 9479 * 9480 * This form can be used only if the request will not cause 9481 * a reply to be generated. Any returned error will be 9482 * saved for handling by xcb_request_check(). 9483 */ 9484 xcb_void_cookie_t 9485 xcb_set_clip_rectangles_checked (xcb_connection_t *c, 9486 uint8_t ordering, 9487 xcb_gcontext_t gc, 9488 int16_t clip_x_origin, 9489 int16_t clip_y_origin, 9490 uint32_t rectangles_len, 9491 const xcb_rectangle_t *rectangles); 9492 9493 /** 9494 * 9495 * @param c The connection 9496 * @return A cookie 9497 * 9498 * Delivers a request to the X server. 9499 * 9500 */ 9501 xcb_void_cookie_t 9502 xcb_set_clip_rectangles (xcb_connection_t *c, 9503 uint8_t ordering, 9504 xcb_gcontext_t gc, 9505 int16_t clip_x_origin, 9506 int16_t clip_y_origin, 9507 uint32_t rectangles_len, 9508 const xcb_rectangle_t *rectangles); 9509 9510 xcb_rectangle_t * 9511 xcb_set_clip_rectangles_rectangles (const xcb_set_clip_rectangles_request_t *R); 9512 9513 int 9514 xcb_set_clip_rectangles_rectangles_length (const xcb_set_clip_rectangles_request_t *R); 9515 9516 xcb_rectangle_iterator_t 9517 xcb_set_clip_rectangles_rectangles_iterator (const xcb_set_clip_rectangles_request_t *R); 9518 9519 /** 9520 * @brief Destroys a graphics context 9521 * 9522 * @param c The connection 9523 * @param gc The graphics context to destroy. 9524 * @return A cookie 9525 * 9526 * Destroys the specified \a gc and all associated storage. 9527 * 9528 * This form can be used only if the request will not cause 9529 * a reply to be generated. Any returned error will be 9530 * saved for handling by xcb_request_check(). 9531 */ 9532 xcb_void_cookie_t 9533 xcb_free_gc_checked (xcb_connection_t *c, 9534 xcb_gcontext_t gc); 9535 9536 /** 9537 * @brief Destroys a graphics context 9538 * 9539 * @param c The connection 9540 * @param gc The graphics context to destroy. 9541 * @return A cookie 9542 * 9543 * Destroys the specified \a gc and all associated storage. 9544 * 9545 */ 9546 xcb_void_cookie_t 9547 xcb_free_gc (xcb_connection_t *c, 9548 xcb_gcontext_t gc); 9549 9550 /** 9551 * 9552 * @param c The connection 9553 * @return A cookie 9554 * 9555 * Delivers a request to the X server. 9556 * 9557 * This form can be used only if the request will not cause 9558 * a reply to be generated. Any returned error will be 9559 * saved for handling by xcb_request_check(). 9560 */ 9561 xcb_void_cookie_t 9562 xcb_clear_area_checked (xcb_connection_t *c, 9563 uint8_t exposures, 9564 xcb_window_t window, 9565 int16_t x, 9566 int16_t y, 9567 uint16_t width, 9568 uint16_t height); 9569 9570 /** 9571 * 9572 * @param c The connection 9573 * @return A cookie 9574 * 9575 * Delivers a request to the X server. 9576 * 9577 */ 9578 xcb_void_cookie_t 9579 xcb_clear_area (xcb_connection_t *c, 9580 uint8_t exposures, 9581 xcb_window_t window, 9582 int16_t x, 9583 int16_t y, 9584 uint16_t width, 9585 uint16_t height); 9586 9587 /** 9588 * @brief copy areas 9589 * 9590 * @param c The connection 9591 * @param src_drawable The source drawable (Window or Pixmap). 9592 * @param dst_drawable The destination drawable (Window or Pixmap). 9593 * @param gc The graphics context to use. 9594 * @param src_x The source X coordinate. 9595 * @param src_y The source Y coordinate. 9596 * @param dst_x The destination X coordinate. 9597 * @param dst_y The destination Y coordinate. 9598 * @param width The width of the area to copy (in pixels). 9599 * @param height The height of the area to copy (in pixels). 9600 * @return A cookie 9601 * 9602 * Copies the specified rectangle from \a src_drawable to \a dst_drawable. 9603 * 9604 * This form can be used only if the request will not cause 9605 * a reply to be generated. Any returned error will be 9606 * saved for handling by xcb_request_check(). 9607 */ 9608 xcb_void_cookie_t 9609 xcb_copy_area_checked (xcb_connection_t *c, 9610 xcb_drawable_t src_drawable, 9611 xcb_drawable_t dst_drawable, 9612 xcb_gcontext_t gc, 9613 int16_t src_x, 9614 int16_t src_y, 9615 int16_t dst_x, 9616 int16_t dst_y, 9617 uint16_t width, 9618 uint16_t height); 9619 9620 /** 9621 * @brief copy areas 9622 * 9623 * @param c The connection 9624 * @param src_drawable The source drawable (Window or Pixmap). 9625 * @param dst_drawable The destination drawable (Window or Pixmap). 9626 * @param gc The graphics context to use. 9627 * @param src_x The source X coordinate. 9628 * @param src_y The source Y coordinate. 9629 * @param dst_x The destination X coordinate. 9630 * @param dst_y The destination Y coordinate. 9631 * @param width The width of the area to copy (in pixels). 9632 * @param height The height of the area to copy (in pixels). 9633 * @return A cookie 9634 * 9635 * Copies the specified rectangle from \a src_drawable to \a dst_drawable. 9636 * 9637 */ 9638 xcb_void_cookie_t 9639 xcb_copy_area (xcb_connection_t *c, 9640 xcb_drawable_t src_drawable, 9641 xcb_drawable_t dst_drawable, 9642 xcb_gcontext_t gc, 9643 int16_t src_x, 9644 int16_t src_y, 9645 int16_t dst_x, 9646 int16_t dst_y, 9647 uint16_t width, 9648 uint16_t height); 9649 9650 /** 9651 * 9652 * @param c The connection 9653 * @return A cookie 9654 * 9655 * Delivers a request to the X server. 9656 * 9657 * This form can be used only if the request will not cause 9658 * a reply to be generated. Any returned error will be 9659 * saved for handling by xcb_request_check(). 9660 */ 9661 xcb_void_cookie_t 9662 xcb_copy_plane_checked (xcb_connection_t *c, 9663 xcb_drawable_t src_drawable, 9664 xcb_drawable_t dst_drawable, 9665 xcb_gcontext_t gc, 9666 int16_t src_x, 9667 int16_t src_y, 9668 int16_t dst_x, 9669 int16_t dst_y, 9670 uint16_t width, 9671 uint16_t height, 9672 uint32_t bit_plane); 9673 9674 /** 9675 * 9676 * @param c The connection 9677 * @return A cookie 9678 * 9679 * Delivers a request to the X server. 9680 * 9681 */ 9682 xcb_void_cookie_t 9683 xcb_copy_plane (xcb_connection_t *c, 9684 xcb_drawable_t src_drawable, 9685 xcb_drawable_t dst_drawable, 9686 xcb_gcontext_t gc, 9687 int16_t src_x, 9688 int16_t src_y, 9689 int16_t dst_x, 9690 int16_t dst_y, 9691 uint16_t width, 9692 uint16_t height, 9693 uint32_t bit_plane); 9694 9695 int 9696 xcb_poly_point_sizeof (const void *_buffer, 9697 uint32_t points_len); 9698 9699 /** 9700 * 9701 * @param c The connection 9702 * @return A cookie 9703 * 9704 * Delivers a request to the X server. 9705 * 9706 * This form can be used only if the request will not cause 9707 * a reply to be generated. Any returned error will be 9708 * saved for handling by xcb_request_check(). 9709 */ 9710 xcb_void_cookie_t 9711 xcb_poly_point_checked (xcb_connection_t *c, 9712 uint8_t coordinate_mode, 9713 xcb_drawable_t drawable, 9714 xcb_gcontext_t gc, 9715 uint32_t points_len, 9716 const xcb_point_t *points); 9717 9718 /** 9719 * 9720 * @param c The connection 9721 * @return A cookie 9722 * 9723 * Delivers a request to the X server. 9724 * 9725 */ 9726 xcb_void_cookie_t 9727 xcb_poly_point (xcb_connection_t *c, 9728 uint8_t coordinate_mode, 9729 xcb_drawable_t drawable, 9730 xcb_gcontext_t gc, 9731 uint32_t points_len, 9732 const xcb_point_t *points); 9733 9734 xcb_point_t * 9735 xcb_poly_point_points (const xcb_poly_point_request_t *R); 9736 9737 int 9738 xcb_poly_point_points_length (const xcb_poly_point_request_t *R); 9739 9740 xcb_point_iterator_t 9741 xcb_poly_point_points_iterator (const xcb_poly_point_request_t *R); 9742 9743 int 9744 xcb_poly_line_sizeof (const void *_buffer, 9745 uint32_t points_len); 9746 9747 /** 9748 * @brief draw lines 9749 * 9750 * @param c The connection 9751 * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. 9752 * @param coordinate_mode \n 9753 * @param drawable The drawable to draw the line(s) on. 9754 * @param gc The graphics context to use. 9755 * @param points_len The number of `xcb_point_t` structures in \a points. 9756 * @param points An array of points. 9757 * @return A cookie 9758 * 9759 * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) 9760 * in the \a points array. The lines are drawn in the order listed in the array. 9761 * They join correctly at all intermediate points, and if the first and last 9762 * points coincide, the first and last lines also join correctly. For any given 9763 * line, a pixel is not drawn more than once. If thin (zero line-width) lines 9764 * intersect, the intersecting pixels are drawn multiple times. If wide lines 9765 * intersect, the intersecting pixels are drawn only once, as though the entire 9766 * request were a single, filled shape. 9767 * 9768 * This form can be used only if the request will not cause 9769 * a reply to be generated. Any returned error will be 9770 * saved for handling by xcb_request_check(). 9771 */ 9772 xcb_void_cookie_t 9773 xcb_poly_line_checked (xcb_connection_t *c, 9774 uint8_t coordinate_mode, 9775 xcb_drawable_t drawable, 9776 xcb_gcontext_t gc, 9777 uint32_t points_len, 9778 const xcb_point_t *points); 9779 9780 /** 9781 * @brief draw lines 9782 * 9783 * @param c The connection 9784 * @param coordinate_mode A bitmask of #xcb_coord_mode_t values. 9785 * @param coordinate_mode \n 9786 * @param drawable The drawable to draw the line(s) on. 9787 * @param gc The graphics context to use. 9788 * @param points_len The number of `xcb_point_t` structures in \a points. 9789 * @param points An array of points. 9790 * @return A cookie 9791 * 9792 * Draws \a points_len-1 lines between each pair of points (point[i], point[i+1]) 9793 * in the \a points array. The lines are drawn in the order listed in the array. 9794 * They join correctly at all intermediate points, and if the first and last 9795 * points coincide, the first and last lines also join correctly. For any given 9796 * line, a pixel is not drawn more than once. If thin (zero line-width) lines 9797 * intersect, the intersecting pixels are drawn multiple times. If wide lines 9798 * intersect, the intersecting pixels are drawn only once, as though the entire 9799 * request were a single, filled shape. 9800 * 9801 */ 9802 xcb_void_cookie_t 9803 xcb_poly_line (xcb_connection_t *c, 9804 uint8_t coordinate_mode, 9805 xcb_drawable_t drawable, 9806 xcb_gcontext_t gc, 9807 uint32_t points_len, 9808 const xcb_point_t *points); 9809 9810 xcb_point_t * 9811 xcb_poly_line_points (const xcb_poly_line_request_t *R); 9812 9813 int 9814 xcb_poly_line_points_length (const xcb_poly_line_request_t *R); 9815 9816 xcb_point_iterator_t 9817 xcb_poly_line_points_iterator (const xcb_poly_line_request_t *R); 9818 9819 /** 9820 * Get the next element of the iterator 9821 * @param i Pointer to a xcb_segment_iterator_t 9822 * 9823 * Get the next element in the iterator. The member rem is 9824 * decreased by one. The member data points to the next 9825 * element. The member index is increased by sizeof(xcb_segment_t) 9826 */ 9827 void 9828 xcb_segment_next (xcb_segment_iterator_t *i); 9829 9830 /** 9831 * Return the iterator pointing to the last element 9832 * @param i An xcb_segment_iterator_t 9833 * @return The iterator pointing to the last element 9834 * 9835 * Set the current element in the iterator to the last element. 9836 * The member rem is set to 0. The member data points to the 9837 * last element. 9838 */ 9839 xcb_generic_iterator_t 9840 xcb_segment_end (xcb_segment_iterator_t i); 9841 9842 int 9843 xcb_poly_segment_sizeof (const void *_buffer, 9844 uint32_t segments_len); 9845 9846 /** 9847 * @brief draw lines 9848 * 9849 * @param c The connection 9850 * @param drawable A drawable (Window or Pixmap) to draw on. 9851 * @param gc The graphics context to use. 9852 * \n 9853 * TODO: document which attributes of a gc are used 9854 * @param segments_len The number of `xcb_segment_t` structures in \a segments. 9855 * @param segments An array of `xcb_segment_t` structures. 9856 * @return A cookie 9857 * 9858 * Draws multiple, unconnected lines. For each segment, a line is drawn between 9859 * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of 9860 * `xcb_segment_t` structures and does not perform joining at coincident 9861 * endpoints. For any given line, a pixel is not drawn more than once. If lines 9862 * intersect, the intersecting pixels are drawn multiple times. 9863 * 9864 * TODO: include the xcb_segment_t data structure 9865 * 9866 * TODO: an example 9867 * 9868 * This form can be used only if the request will not cause 9869 * a reply to be generated. Any returned error will be 9870 * saved for handling by xcb_request_check(). 9871 */ 9872 xcb_void_cookie_t 9873 xcb_poly_segment_checked (xcb_connection_t *c, 9874 xcb_drawable_t drawable, 9875 xcb_gcontext_t gc, 9876 uint32_t segments_len, 9877 const xcb_segment_t *segments); 9878 9879 /** 9880 * @brief draw lines 9881 * 9882 * @param c The connection 9883 * @param drawable A drawable (Window or Pixmap) to draw on. 9884 * @param gc The graphics context to use. 9885 * \n 9886 * TODO: document which attributes of a gc are used 9887 * @param segments_len The number of `xcb_segment_t` structures in \a segments. 9888 * @param segments An array of `xcb_segment_t` structures. 9889 * @return A cookie 9890 * 9891 * Draws multiple, unconnected lines. For each segment, a line is drawn between 9892 * (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of 9893 * `xcb_segment_t` structures and does not perform joining at coincident 9894 * endpoints. For any given line, a pixel is not drawn more than once. If lines 9895 * intersect, the intersecting pixels are drawn multiple times. 9896 * 9897 * TODO: include the xcb_segment_t data structure 9898 * 9899 * TODO: an example 9900 * 9901 */ 9902 xcb_void_cookie_t 9903 xcb_poly_segment (xcb_connection_t *c, 9904 xcb_drawable_t drawable, 9905 xcb_gcontext_t gc, 9906 uint32_t segments_len, 9907 const xcb_segment_t *segments); 9908 9909 xcb_segment_t * 9910 xcb_poly_segment_segments (const xcb_poly_segment_request_t *R); 9911 9912 int 9913 xcb_poly_segment_segments_length (const xcb_poly_segment_request_t *R); 9914 9915 xcb_segment_iterator_t 9916 xcb_poly_segment_segments_iterator (const xcb_poly_segment_request_t *R); 9917 9918 int 9919 xcb_poly_rectangle_sizeof (const void *_buffer, 9920 uint32_t rectangles_len); 9921 9922 /** 9923 * 9924 * @param c The connection 9925 * @return A cookie 9926 * 9927 * Delivers a request to the X server. 9928 * 9929 * This form can be used only if the request will not cause 9930 * a reply to be generated. Any returned error will be 9931 * saved for handling by xcb_request_check(). 9932 */ 9933 xcb_void_cookie_t 9934 xcb_poly_rectangle_checked (xcb_connection_t *c, 9935 xcb_drawable_t drawable, 9936 xcb_gcontext_t gc, 9937 uint32_t rectangles_len, 9938 const xcb_rectangle_t *rectangles); 9939 9940 /** 9941 * 9942 * @param c The connection 9943 * @return A cookie 9944 * 9945 * Delivers a request to the X server. 9946 * 9947 */ 9948 xcb_void_cookie_t 9949 xcb_poly_rectangle (xcb_connection_t *c, 9950 xcb_drawable_t drawable, 9951 xcb_gcontext_t gc, 9952 uint32_t rectangles_len, 9953 const xcb_rectangle_t *rectangles); 9954 9955 xcb_rectangle_t * 9956 xcb_poly_rectangle_rectangles (const xcb_poly_rectangle_request_t *R); 9957 9958 int 9959 xcb_poly_rectangle_rectangles_length (const xcb_poly_rectangle_request_t *R); 9960 9961 xcb_rectangle_iterator_t 9962 xcb_poly_rectangle_rectangles_iterator (const xcb_poly_rectangle_request_t *R); 9963 9964 int 9965 xcb_poly_arc_sizeof (const void *_buffer, 9966 uint32_t arcs_len); 9967 9968 /** 9969 * 9970 * @param c The connection 9971 * @return A cookie 9972 * 9973 * Delivers a request to the X server. 9974 * 9975 * This form can be used only if the request will not cause 9976 * a reply to be generated. Any returned error will be 9977 * saved for handling by xcb_request_check(). 9978 */ 9979 xcb_void_cookie_t 9980 xcb_poly_arc_checked (xcb_connection_t *c, 9981 xcb_drawable_t drawable, 9982 xcb_gcontext_t gc, 9983 uint32_t arcs_len, 9984 const xcb_arc_t *arcs); 9985 9986 /** 9987 * 9988 * @param c The connection 9989 * @return A cookie 9990 * 9991 * Delivers a request to the X server. 9992 * 9993 */ 9994 xcb_void_cookie_t 9995 xcb_poly_arc (xcb_connection_t *c, 9996 xcb_drawable_t drawable, 9997 xcb_gcontext_t gc, 9998 uint32_t arcs_len, 9999 const xcb_arc_t *arcs); 10000 10001 xcb_arc_t * 10002 xcb_poly_arc_arcs (const xcb_poly_arc_request_t *R); 10003 10004 int 10005 xcb_poly_arc_arcs_length (const xcb_poly_arc_request_t *R); 10006 10007 xcb_arc_iterator_t 10008 xcb_poly_arc_arcs_iterator (const xcb_poly_arc_request_t *R); 10009 10010 int 10011 xcb_fill_poly_sizeof (const void *_buffer, 10012 uint32_t points_len); 10013 10014 /** 10015 * 10016 * @param c The connection 10017 * @return A cookie 10018 * 10019 * Delivers a request to the X server. 10020 * 10021 * This form can be used only if the request will not cause 10022 * a reply to be generated. Any returned error will be 10023 * saved for handling by xcb_request_check(). 10024 */ 10025 xcb_void_cookie_t 10026 xcb_fill_poly_checked (xcb_connection_t *c, 10027 xcb_drawable_t drawable, 10028 xcb_gcontext_t gc, 10029 uint8_t shape, 10030 uint8_t coordinate_mode, 10031 uint32_t points_len, 10032 const xcb_point_t *points); 10033 10034 /** 10035 * 10036 * @param c The connection 10037 * @return A cookie 10038 * 10039 * Delivers a request to the X server. 10040 * 10041 */ 10042 xcb_void_cookie_t 10043 xcb_fill_poly (xcb_connection_t *c, 10044 xcb_drawable_t drawable, 10045 xcb_gcontext_t gc, 10046 uint8_t shape, 10047 uint8_t coordinate_mode, 10048 uint32_t points_len, 10049 const xcb_point_t *points); 10050 10051 xcb_point_t * 10052 xcb_fill_poly_points (const xcb_fill_poly_request_t *R); 10053 10054 int 10055 xcb_fill_poly_points_length (const xcb_fill_poly_request_t *R); 10056 10057 xcb_point_iterator_t 10058 xcb_fill_poly_points_iterator (const xcb_fill_poly_request_t *R); 10059 10060 int 10061 xcb_poly_fill_rectangle_sizeof (const void *_buffer, 10062 uint32_t rectangles_len); 10063 10064 /** 10065 * @brief Fills rectangles 10066 * 10067 * @param c The connection 10068 * @param drawable The drawable (Window or Pixmap) to draw on. 10069 * @param gc The graphics context to use. 10070 * \n 10071 * The following graphics context components are used: function, plane-mask, 10072 * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10073 * \n 10074 * The following graphics context mode-dependent components are used: 10075 * foreground, background, tile, stipple, tile-stipple-x-origin, and 10076 * tile-stipple-y-origin. 10077 * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. 10078 * @param rectangles The rectangles to fill. 10079 * @return A cookie 10080 * 10081 * Fills the specified rectangle(s) in the order listed in the array. For any 10082 * given rectangle, each pixel is not drawn more than once. If rectangles 10083 * intersect, the intersecting pixels are drawn multiple times. 10084 * 10085 * This form can be used only if the request will not cause 10086 * a reply to be generated. Any returned error will be 10087 * saved for handling by xcb_request_check(). 10088 */ 10089 xcb_void_cookie_t 10090 xcb_poly_fill_rectangle_checked (xcb_connection_t *c, 10091 xcb_drawable_t drawable, 10092 xcb_gcontext_t gc, 10093 uint32_t rectangles_len, 10094 const xcb_rectangle_t *rectangles); 10095 10096 /** 10097 * @brief Fills rectangles 10098 * 10099 * @param c The connection 10100 * @param drawable The drawable (Window or Pixmap) to draw on. 10101 * @param gc The graphics context to use. 10102 * \n 10103 * The following graphics context components are used: function, plane-mask, 10104 * fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10105 * \n 10106 * The following graphics context mode-dependent components are used: 10107 * foreground, background, tile, stipple, tile-stipple-x-origin, and 10108 * tile-stipple-y-origin. 10109 * @param rectangles_len The number of `xcb_rectangle_t` structures in \a rectangles. 10110 * @param rectangles The rectangles to fill. 10111 * @return A cookie 10112 * 10113 * Fills the specified rectangle(s) in the order listed in the array. For any 10114 * given rectangle, each pixel is not drawn more than once. If rectangles 10115 * intersect, the intersecting pixels are drawn multiple times. 10116 * 10117 */ 10118 xcb_void_cookie_t 10119 xcb_poly_fill_rectangle (xcb_connection_t *c, 10120 xcb_drawable_t drawable, 10121 xcb_gcontext_t gc, 10122 uint32_t rectangles_len, 10123 const xcb_rectangle_t *rectangles); 10124 10125 xcb_rectangle_t * 10126 xcb_poly_fill_rectangle_rectangles (const xcb_poly_fill_rectangle_request_t *R); 10127 10128 int 10129 xcb_poly_fill_rectangle_rectangles_length (const xcb_poly_fill_rectangle_request_t *R); 10130 10131 xcb_rectangle_iterator_t 10132 xcb_poly_fill_rectangle_rectangles_iterator (const xcb_poly_fill_rectangle_request_t *R); 10133 10134 int 10135 xcb_poly_fill_arc_sizeof (const void *_buffer, 10136 uint32_t arcs_len); 10137 10138 /** 10139 * 10140 * @param c The connection 10141 * @return A cookie 10142 * 10143 * Delivers a request to the X server. 10144 * 10145 * This form can be used only if the request will not cause 10146 * a reply to be generated. Any returned error will be 10147 * saved for handling by xcb_request_check(). 10148 */ 10149 xcb_void_cookie_t 10150 xcb_poly_fill_arc_checked (xcb_connection_t *c, 10151 xcb_drawable_t drawable, 10152 xcb_gcontext_t gc, 10153 uint32_t arcs_len, 10154 const xcb_arc_t *arcs); 10155 10156 /** 10157 * 10158 * @param c The connection 10159 * @return A cookie 10160 * 10161 * Delivers a request to the X server. 10162 * 10163 */ 10164 xcb_void_cookie_t 10165 xcb_poly_fill_arc (xcb_connection_t *c, 10166 xcb_drawable_t drawable, 10167 xcb_gcontext_t gc, 10168 uint32_t arcs_len, 10169 const xcb_arc_t *arcs); 10170 10171 xcb_arc_t * 10172 xcb_poly_fill_arc_arcs (const xcb_poly_fill_arc_request_t *R); 10173 10174 int 10175 xcb_poly_fill_arc_arcs_length (const xcb_poly_fill_arc_request_t *R); 10176 10177 xcb_arc_iterator_t 10178 xcb_poly_fill_arc_arcs_iterator (const xcb_poly_fill_arc_request_t *R); 10179 10180 int 10181 xcb_put_image_sizeof (const void *_buffer, 10182 uint32_t data_len); 10183 10184 /** 10185 * 10186 * @param c The connection 10187 * @return A cookie 10188 * 10189 * Delivers a request to the X server. 10190 * 10191 * This form can be used only if the request will not cause 10192 * a reply to be generated. Any returned error will be 10193 * saved for handling by xcb_request_check(). 10194 */ 10195 xcb_void_cookie_t 10196 xcb_put_image_checked (xcb_connection_t *c, 10197 uint8_t format, 10198 xcb_drawable_t drawable, 10199 xcb_gcontext_t gc, 10200 uint16_t width, 10201 uint16_t height, 10202 int16_t dst_x, 10203 int16_t dst_y, 10204 uint8_t left_pad, 10205 uint8_t depth, 10206 uint32_t data_len, 10207 const uint8_t *data); 10208 10209 /** 10210 * 10211 * @param c The connection 10212 * @return A cookie 10213 * 10214 * Delivers a request to the X server. 10215 * 10216 */ 10217 xcb_void_cookie_t 10218 xcb_put_image (xcb_connection_t *c, 10219 uint8_t format, 10220 xcb_drawable_t drawable, 10221 xcb_gcontext_t gc, 10222 uint16_t width, 10223 uint16_t height, 10224 int16_t dst_x, 10225 int16_t dst_y, 10226 uint8_t left_pad, 10227 uint8_t depth, 10228 uint32_t data_len, 10229 const uint8_t *data); 10230 10231 uint8_t * 10232 xcb_put_image_data (const xcb_put_image_request_t *R); 10233 10234 int 10235 xcb_put_image_data_length (const xcb_put_image_request_t *R); 10236 10237 xcb_generic_iterator_t 10238 xcb_put_image_data_end (const xcb_put_image_request_t *R); 10239 10240 int 10241 xcb_get_image_sizeof (const void *_buffer); 10242 10243 /** 10244 * 10245 * @param c The connection 10246 * @return A cookie 10247 * 10248 * Delivers a request to the X server. 10249 * 10250 */ 10251 xcb_get_image_cookie_t 10252 xcb_get_image (xcb_connection_t *c, 10253 uint8_t format, 10254 xcb_drawable_t drawable, 10255 int16_t x, 10256 int16_t y, 10257 uint16_t width, 10258 uint16_t height, 10259 uint32_t plane_mask); 10260 10261 /** 10262 * 10263 * @param c The connection 10264 * @return A cookie 10265 * 10266 * Delivers a request to the X server. 10267 * 10268 * This form can be used only if the request will cause 10269 * a reply to be generated. Any returned error will be 10270 * placed in the event queue. 10271 */ 10272 xcb_get_image_cookie_t 10273 xcb_get_image_unchecked (xcb_connection_t *c, 10274 uint8_t format, 10275 xcb_drawable_t drawable, 10276 int16_t x, 10277 int16_t y, 10278 uint16_t width, 10279 uint16_t height, 10280 uint32_t plane_mask); 10281 10282 uint8_t * 10283 xcb_get_image_data (const xcb_get_image_reply_t *R); 10284 10285 int 10286 xcb_get_image_data_length (const xcb_get_image_reply_t *R); 10287 10288 xcb_generic_iterator_t 10289 xcb_get_image_data_end (const xcb_get_image_reply_t *R); 10290 10291 /** 10292 * Return the reply 10293 * @param c The connection 10294 * @param cookie The cookie 10295 * @param e The xcb_generic_error_t supplied 10296 * 10297 * Returns the reply of the request asked by 10298 * 10299 * The parameter @p e supplied to this function must be NULL if 10300 * xcb_get_image_unchecked(). is used. 10301 * Otherwise, it stores the error if any. 10302 * 10303 * The returned value must be freed by the caller using free(). 10304 */ 10305 xcb_get_image_reply_t * 10306 xcb_get_image_reply (xcb_connection_t *c, 10307 xcb_get_image_cookie_t cookie /**< */, 10308 xcb_generic_error_t **e); 10309 10310 int 10311 xcb_poly_text_8_sizeof (const void *_buffer, 10312 uint32_t items_len); 10313 10314 /** 10315 * 10316 * @param c The connection 10317 * @return A cookie 10318 * 10319 * Delivers a request to the X server. 10320 * 10321 * This form can be used only if the request will not cause 10322 * a reply to be generated. Any returned error will be 10323 * saved for handling by xcb_request_check(). 10324 */ 10325 xcb_void_cookie_t 10326 xcb_poly_text_8_checked (xcb_connection_t *c, 10327 xcb_drawable_t drawable, 10328 xcb_gcontext_t gc, 10329 int16_t x, 10330 int16_t y, 10331 uint32_t items_len, 10332 const uint8_t *items); 10333 10334 /** 10335 * 10336 * @param c The connection 10337 * @return A cookie 10338 * 10339 * Delivers a request to the X server. 10340 * 10341 */ 10342 xcb_void_cookie_t 10343 xcb_poly_text_8 (xcb_connection_t *c, 10344 xcb_drawable_t drawable, 10345 xcb_gcontext_t gc, 10346 int16_t x, 10347 int16_t y, 10348 uint32_t items_len, 10349 const uint8_t *items); 10350 10351 uint8_t * 10352 xcb_poly_text_8_items (const xcb_poly_text_8_request_t *R); 10353 10354 int 10355 xcb_poly_text_8_items_length (const xcb_poly_text_8_request_t *R); 10356 10357 xcb_generic_iterator_t 10358 xcb_poly_text_8_items_end (const xcb_poly_text_8_request_t *R); 10359 10360 int 10361 xcb_poly_text_16_sizeof (const void *_buffer, 10362 uint32_t items_len); 10363 10364 /** 10365 * 10366 * @param c The connection 10367 * @return A cookie 10368 * 10369 * Delivers a request to the X server. 10370 * 10371 * This form can be used only if the request will not cause 10372 * a reply to be generated. Any returned error will be 10373 * saved for handling by xcb_request_check(). 10374 */ 10375 xcb_void_cookie_t 10376 xcb_poly_text_16_checked (xcb_connection_t *c, 10377 xcb_drawable_t drawable, 10378 xcb_gcontext_t gc, 10379 int16_t x, 10380 int16_t y, 10381 uint32_t items_len, 10382 const uint8_t *items); 10383 10384 /** 10385 * 10386 * @param c The connection 10387 * @return A cookie 10388 * 10389 * Delivers a request to the X server. 10390 * 10391 */ 10392 xcb_void_cookie_t 10393 xcb_poly_text_16 (xcb_connection_t *c, 10394 xcb_drawable_t drawable, 10395 xcb_gcontext_t gc, 10396 int16_t x, 10397 int16_t y, 10398 uint32_t items_len, 10399 const uint8_t *items); 10400 10401 uint8_t * 10402 xcb_poly_text_16_items (const xcb_poly_text_16_request_t *R); 10403 10404 int 10405 xcb_poly_text_16_items_length (const xcb_poly_text_16_request_t *R); 10406 10407 xcb_generic_iterator_t 10408 xcb_poly_text_16_items_end (const xcb_poly_text_16_request_t *R); 10409 10410 int 10411 xcb_image_text_8_sizeof (const void *_buffer); 10412 10413 /** 10414 * @brief Draws text 10415 * 10416 * @param c The connection 10417 * @param string_len The length of the \a string. Note that this parameter limited by 255 due to 10418 * using 8 bits! 10419 * @param drawable The drawable (Window or Pixmap) to draw text on. 10420 * @param gc The graphics context to use. 10421 * \n 10422 * The following graphics context components are used: plane-mask, foreground, 10423 * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10424 * @param x The x coordinate of the first character, relative to the origin of \a drawable. 10425 * @param y The y coordinate of the first character, relative to the origin of \a drawable. 10426 * @param string The string to draw. Only the first 255 characters are relevant due to the data 10427 * type of \a string_len. 10428 * @return A cookie 10429 * 10430 * Fills the destination rectangle with the background pixel from \a gc, then 10431 * paints the text with the foreground pixel from \a gc. The upper-left corner of 10432 * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, 10433 * the height is font-ascent + font-descent. The overall-width, font-ascent and 10434 * font-descent are as returned by `xcb_query_text_extents` (TODO). 10435 * 10436 * Note that using X core fonts is deprecated (but still supported) in favor of 10437 * client-side rendering using Xft. 10438 * 10439 * This form can be used only if the request will not cause 10440 * a reply to be generated. Any returned error will be 10441 * saved for handling by xcb_request_check(). 10442 */ 10443 xcb_void_cookie_t 10444 xcb_image_text_8_checked (xcb_connection_t *c, 10445 uint8_t string_len, 10446 xcb_drawable_t drawable, 10447 xcb_gcontext_t gc, 10448 int16_t x, 10449 int16_t y, 10450 const char *string); 10451 10452 /** 10453 * @brief Draws text 10454 * 10455 * @param c The connection 10456 * @param string_len The length of the \a string. Note that this parameter limited by 255 due to 10457 * using 8 bits! 10458 * @param drawable The drawable (Window or Pixmap) to draw text on. 10459 * @param gc The graphics context to use. 10460 * \n 10461 * The following graphics context components are used: plane-mask, foreground, 10462 * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10463 * @param x The x coordinate of the first character, relative to the origin of \a drawable. 10464 * @param y The y coordinate of the first character, relative to the origin of \a drawable. 10465 * @param string The string to draw. Only the first 255 characters are relevant due to the data 10466 * type of \a string_len. 10467 * @return A cookie 10468 * 10469 * Fills the destination rectangle with the background pixel from \a gc, then 10470 * paints the text with the foreground pixel from \a gc. The upper-left corner of 10471 * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, 10472 * the height is font-ascent + font-descent. The overall-width, font-ascent and 10473 * font-descent are as returned by `xcb_query_text_extents` (TODO). 10474 * 10475 * Note that using X core fonts is deprecated (but still supported) in favor of 10476 * client-side rendering using Xft. 10477 * 10478 */ 10479 xcb_void_cookie_t 10480 xcb_image_text_8 (xcb_connection_t *c, 10481 uint8_t string_len, 10482 xcb_drawable_t drawable, 10483 xcb_gcontext_t gc, 10484 int16_t x, 10485 int16_t y, 10486 const char *string); 10487 10488 char * 10489 xcb_image_text_8_string (const xcb_image_text_8_request_t *R); 10490 10491 int 10492 xcb_image_text_8_string_length (const xcb_image_text_8_request_t *R); 10493 10494 xcb_generic_iterator_t 10495 xcb_image_text_8_string_end (const xcb_image_text_8_request_t *R); 10496 10497 int 10498 xcb_image_text_16_sizeof (const void *_buffer); 10499 10500 /** 10501 * @brief Draws text 10502 * 10503 * @param c The connection 10504 * @param string_len The length of the \a string in characters. Note that this parameter limited by 10505 * 255 due to using 8 bits! 10506 * @param drawable The drawable (Window or Pixmap) to draw text on. 10507 * @param gc The graphics context to use. 10508 * \n 10509 * The following graphics context components are used: plane-mask, foreground, 10510 * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10511 * @param x The x coordinate of the first character, relative to the origin of \a drawable. 10512 * @param y The y coordinate of the first character, relative to the origin of \a drawable. 10513 * @param string The string to draw. Only the first 255 characters are relevant due to the data 10514 * type of \a string_len. Every character uses 2 bytes (hence the 16 in this 10515 * request's name). 10516 * @return A cookie 10517 * 10518 * Fills the destination rectangle with the background pixel from \a gc, then 10519 * paints the text with the foreground pixel from \a gc. The upper-left corner of 10520 * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, 10521 * the height is font-ascent + font-descent. The overall-width, font-ascent and 10522 * font-descent are as returned by `xcb_query_text_extents` (TODO). 10523 * 10524 * Note that using X core fonts is deprecated (but still supported) in favor of 10525 * client-side rendering using Xft. 10526 * 10527 * This form can be used only if the request will not cause 10528 * a reply to be generated. Any returned error will be 10529 * saved for handling by xcb_request_check(). 10530 */ 10531 xcb_void_cookie_t 10532 xcb_image_text_16_checked (xcb_connection_t *c, 10533 uint8_t string_len, 10534 xcb_drawable_t drawable, 10535 xcb_gcontext_t gc, 10536 int16_t x, 10537 int16_t y, 10538 const xcb_char2b_t *string); 10539 10540 /** 10541 * @brief Draws text 10542 * 10543 * @param c The connection 10544 * @param string_len The length of the \a string in characters. Note that this parameter limited by 10545 * 255 due to using 8 bits! 10546 * @param drawable The drawable (Window or Pixmap) to draw text on. 10547 * @param gc The graphics context to use. 10548 * \n 10549 * The following graphics context components are used: plane-mask, foreground, 10550 * background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. 10551 * @param x The x coordinate of the first character, relative to the origin of \a drawable. 10552 * @param y The y coordinate of the first character, relative to the origin of \a drawable. 10553 * @param string The string to draw. Only the first 255 characters are relevant due to the data 10554 * type of \a string_len. Every character uses 2 bytes (hence the 16 in this 10555 * request's name). 10556 * @return A cookie 10557 * 10558 * Fills the destination rectangle with the background pixel from \a gc, then 10559 * paints the text with the foreground pixel from \a gc. The upper-left corner of 10560 * the filled rectangle is at [x, y - font-ascent]. The width is overall-width, 10561 * the height is font-ascent + font-descent. The overall-width, font-ascent and 10562 * font-descent are as returned by `xcb_query_text_extents` (TODO). 10563 * 10564 * Note that using X core fonts is deprecated (but still supported) in favor of 10565 * client-side rendering using Xft. 10566 * 10567 */ 10568 xcb_void_cookie_t 10569 xcb_image_text_16 (xcb_connection_t *c, 10570 uint8_t string_len, 10571 xcb_drawable_t drawable, 10572 xcb_gcontext_t gc, 10573 int16_t x, 10574 int16_t y, 10575 const xcb_char2b_t *string); 10576 10577 xcb_char2b_t * 10578 xcb_image_text_16_string (const xcb_image_text_16_request_t *R); 10579 10580 int 10581 xcb_image_text_16_string_length (const xcb_image_text_16_request_t *R); 10582 10583 xcb_char2b_iterator_t 10584 xcb_image_text_16_string_iterator (const xcb_image_text_16_request_t *R); 10585 10586 /** 10587 * 10588 * @param c The connection 10589 * @return A cookie 10590 * 10591 * Delivers a request to the X server. 10592 * 10593 * This form can be used only if the request will not cause 10594 * a reply to be generated. Any returned error will be 10595 * saved for handling by xcb_request_check(). 10596 */ 10597 xcb_void_cookie_t 10598 xcb_create_colormap_checked (xcb_connection_t *c, 10599 uint8_t alloc, 10600 xcb_colormap_t mid, 10601 xcb_window_t window, 10602 xcb_visualid_t visual); 10603 10604 /** 10605 * 10606 * @param c The connection 10607 * @return A cookie 10608 * 10609 * Delivers a request to the X server. 10610 * 10611 */ 10612 xcb_void_cookie_t 10613 xcb_create_colormap (xcb_connection_t *c, 10614 uint8_t alloc, 10615 xcb_colormap_t mid, 10616 xcb_window_t window, 10617 xcb_visualid_t visual); 10618 10619 /** 10620 * 10621 * @param c The connection 10622 * @return A cookie 10623 * 10624 * Delivers a request to the X server. 10625 * 10626 * This form can be used only if the request will not cause 10627 * a reply to be generated. Any returned error will be 10628 * saved for handling by xcb_request_check(). 10629 */ 10630 xcb_void_cookie_t 10631 xcb_free_colormap_checked (xcb_connection_t *c, 10632 xcb_colormap_t cmap); 10633 10634 /** 10635 * 10636 * @param c The connection 10637 * @return A cookie 10638 * 10639 * Delivers a request to the X server. 10640 * 10641 */ 10642 xcb_void_cookie_t 10643 xcb_free_colormap (xcb_connection_t *c, 10644 xcb_colormap_t cmap); 10645 10646 /** 10647 * 10648 * @param c The connection 10649 * @return A cookie 10650 * 10651 * Delivers a request to the X server. 10652 * 10653 * This form can be used only if the request will not cause 10654 * a reply to be generated. Any returned error will be 10655 * saved for handling by xcb_request_check(). 10656 */ 10657 xcb_void_cookie_t 10658 xcb_copy_colormap_and_free_checked (xcb_connection_t *c, 10659 xcb_colormap_t mid, 10660 xcb_colormap_t src_cmap); 10661 10662 /** 10663 * 10664 * @param c The connection 10665 * @return A cookie 10666 * 10667 * Delivers a request to the X server. 10668 * 10669 */ 10670 xcb_void_cookie_t 10671 xcb_copy_colormap_and_free (xcb_connection_t *c, 10672 xcb_colormap_t mid, 10673 xcb_colormap_t src_cmap); 10674 10675 /** 10676 * 10677 * @param c The connection 10678 * @return A cookie 10679 * 10680 * Delivers a request to the X server. 10681 * 10682 * This form can be used only if the request will not cause 10683 * a reply to be generated. Any returned error will be 10684 * saved for handling by xcb_request_check(). 10685 */ 10686 xcb_void_cookie_t 10687 xcb_install_colormap_checked (xcb_connection_t *c, 10688 xcb_colormap_t cmap); 10689 10690 /** 10691 * 10692 * @param c The connection 10693 * @return A cookie 10694 * 10695 * Delivers a request to the X server. 10696 * 10697 */ 10698 xcb_void_cookie_t 10699 xcb_install_colormap (xcb_connection_t *c, 10700 xcb_colormap_t cmap); 10701 10702 /** 10703 * 10704 * @param c The connection 10705 * @return A cookie 10706 * 10707 * Delivers a request to the X server. 10708 * 10709 * This form can be used only if the request will not cause 10710 * a reply to be generated. Any returned error will be 10711 * saved for handling by xcb_request_check(). 10712 */ 10713 xcb_void_cookie_t 10714 xcb_uninstall_colormap_checked (xcb_connection_t *c, 10715 xcb_colormap_t cmap); 10716 10717 /** 10718 * 10719 * @param c The connection 10720 * @return A cookie 10721 * 10722 * Delivers a request to the X server. 10723 * 10724 */ 10725 xcb_void_cookie_t 10726 xcb_uninstall_colormap (xcb_connection_t *c, 10727 xcb_colormap_t cmap); 10728 10729 int 10730 xcb_list_installed_colormaps_sizeof (const void *_buffer); 10731 10732 /** 10733 * 10734 * @param c The connection 10735 * @return A cookie 10736 * 10737 * Delivers a request to the X server. 10738 * 10739 */ 10740 xcb_list_installed_colormaps_cookie_t 10741 xcb_list_installed_colormaps (xcb_connection_t *c, 10742 xcb_window_t window); 10743 10744 /** 10745 * 10746 * @param c The connection 10747 * @return A cookie 10748 * 10749 * Delivers a request to the X server. 10750 * 10751 * This form can be used only if the request will cause 10752 * a reply to be generated. Any returned error will be 10753 * placed in the event queue. 10754 */ 10755 xcb_list_installed_colormaps_cookie_t 10756 xcb_list_installed_colormaps_unchecked (xcb_connection_t *c, 10757 xcb_window_t window); 10758 10759 xcb_colormap_t * 10760 xcb_list_installed_colormaps_cmaps (const xcb_list_installed_colormaps_reply_t *R); 10761 10762 int 10763 xcb_list_installed_colormaps_cmaps_length (const xcb_list_installed_colormaps_reply_t *R); 10764 10765 xcb_generic_iterator_t 10766 xcb_list_installed_colormaps_cmaps_end (const xcb_list_installed_colormaps_reply_t *R); 10767 10768 /** 10769 * Return the reply 10770 * @param c The connection 10771 * @param cookie The cookie 10772 * @param e The xcb_generic_error_t supplied 10773 * 10774 * Returns the reply of the request asked by 10775 * 10776 * The parameter @p e supplied to this function must be NULL if 10777 * xcb_list_installed_colormaps_unchecked(). is used. 10778 * Otherwise, it stores the error if any. 10779 * 10780 * The returned value must be freed by the caller using free(). 10781 */ 10782 xcb_list_installed_colormaps_reply_t * 10783 xcb_list_installed_colormaps_reply (xcb_connection_t *c, 10784 xcb_list_installed_colormaps_cookie_t cookie /**< */, 10785 xcb_generic_error_t **e); 10786 10787 /** 10788 * @brief Allocate a color 10789 * 10790 * @param c The connection 10791 * @param cmap TODO 10792 * @param red The red value of your color. 10793 * @param green The green value of your color. 10794 * @param blue The blue value of your color. 10795 * @return A cookie 10796 * 10797 * Allocates a read-only colormap entry corresponding to the closest RGB value 10798 * supported by the hardware. If you are using TrueColor, you can take a shortcut 10799 * and directly calculate the color pixel value to avoid the round trip. But, for 10800 * example, on 16-bit color setups (VNC), you can easily get the closest supported 10801 * RGB value to the RGB value you are specifying. 10802 * 10803 */ 10804 xcb_alloc_color_cookie_t 10805 xcb_alloc_color (xcb_connection_t *c, 10806 xcb_colormap_t cmap, 10807 uint16_t red, 10808 uint16_t green, 10809 uint16_t blue); 10810 10811 /** 10812 * @brief Allocate a color 10813 * 10814 * @param c The connection 10815 * @param cmap TODO 10816 * @param red The red value of your color. 10817 * @param green The green value of your color. 10818 * @param blue The blue value of your color. 10819 * @return A cookie 10820 * 10821 * Allocates a read-only colormap entry corresponding to the closest RGB value 10822 * supported by the hardware. If you are using TrueColor, you can take a shortcut 10823 * and directly calculate the color pixel value to avoid the round trip. But, for 10824 * example, on 16-bit color setups (VNC), you can easily get the closest supported 10825 * RGB value to the RGB value you are specifying. 10826 * 10827 * This form can be used only if the request will cause 10828 * a reply to be generated. Any returned error will be 10829 * placed in the event queue. 10830 */ 10831 xcb_alloc_color_cookie_t 10832 xcb_alloc_color_unchecked (xcb_connection_t *c, 10833 xcb_colormap_t cmap, 10834 uint16_t red, 10835 uint16_t green, 10836 uint16_t blue); 10837 10838 /** 10839 * Return the reply 10840 * @param c The connection 10841 * @param cookie The cookie 10842 * @param e The xcb_generic_error_t supplied 10843 * 10844 * Returns the reply of the request asked by 10845 * 10846 * The parameter @p e supplied to this function must be NULL if 10847 * xcb_alloc_color_unchecked(). is used. 10848 * Otherwise, it stores the error if any. 10849 * 10850 * The returned value must be freed by the caller using free(). 10851 */ 10852 xcb_alloc_color_reply_t * 10853 xcb_alloc_color_reply (xcb_connection_t *c, 10854 xcb_alloc_color_cookie_t cookie /**< */, 10855 xcb_generic_error_t **e); 10856 10857 int 10858 xcb_alloc_named_color_sizeof (const void *_buffer); 10859 10860 /** 10861 * 10862 * @param c The connection 10863 * @return A cookie 10864 * 10865 * Delivers a request to the X server. 10866 * 10867 */ 10868 xcb_alloc_named_color_cookie_t 10869 xcb_alloc_named_color (xcb_connection_t *c, 10870 xcb_colormap_t cmap, 10871 uint16_t name_len, 10872 const char *name); 10873 10874 /** 10875 * 10876 * @param c The connection 10877 * @return A cookie 10878 * 10879 * Delivers a request to the X server. 10880 * 10881 * This form can be used only if the request will cause 10882 * a reply to be generated. Any returned error will be 10883 * placed in the event queue. 10884 */ 10885 xcb_alloc_named_color_cookie_t 10886 xcb_alloc_named_color_unchecked (xcb_connection_t *c, 10887 xcb_colormap_t cmap, 10888 uint16_t name_len, 10889 const char *name); 10890 10891 /** 10892 * Return the reply 10893 * @param c The connection 10894 * @param cookie The cookie 10895 * @param e The xcb_generic_error_t supplied 10896 * 10897 * Returns the reply of the request asked by 10898 * 10899 * The parameter @p e supplied to this function must be NULL if 10900 * xcb_alloc_named_color_unchecked(). is used. 10901 * Otherwise, it stores the error if any. 10902 * 10903 * The returned value must be freed by the caller using free(). 10904 */ 10905 xcb_alloc_named_color_reply_t * 10906 xcb_alloc_named_color_reply (xcb_connection_t *c, 10907 xcb_alloc_named_color_cookie_t cookie /**< */, 10908 xcb_generic_error_t **e); 10909 10910 int 10911 xcb_alloc_color_cells_sizeof (const void *_buffer); 10912 10913 /** 10914 * 10915 * @param c The connection 10916 * @return A cookie 10917 * 10918 * Delivers a request to the X server. 10919 * 10920 */ 10921 xcb_alloc_color_cells_cookie_t 10922 xcb_alloc_color_cells (xcb_connection_t *c, 10923 uint8_t contiguous, 10924 xcb_colormap_t cmap, 10925 uint16_t colors, 10926 uint16_t planes); 10927 10928 /** 10929 * 10930 * @param c The connection 10931 * @return A cookie 10932 * 10933 * Delivers a request to the X server. 10934 * 10935 * This form can be used only if the request will cause 10936 * a reply to be generated. Any returned error will be 10937 * placed in the event queue. 10938 */ 10939 xcb_alloc_color_cells_cookie_t 10940 xcb_alloc_color_cells_unchecked (xcb_connection_t *c, 10941 uint8_t contiguous, 10942 xcb_colormap_t cmap, 10943 uint16_t colors, 10944 uint16_t planes); 10945 10946 uint32_t * 10947 xcb_alloc_color_cells_pixels (const xcb_alloc_color_cells_reply_t *R); 10948 10949 int 10950 xcb_alloc_color_cells_pixels_length (const xcb_alloc_color_cells_reply_t *R); 10951 10952 xcb_generic_iterator_t 10953 xcb_alloc_color_cells_pixels_end (const xcb_alloc_color_cells_reply_t *R); 10954 10955 uint32_t * 10956 xcb_alloc_color_cells_masks (const xcb_alloc_color_cells_reply_t *R); 10957 10958 int 10959 xcb_alloc_color_cells_masks_length (const xcb_alloc_color_cells_reply_t *R); 10960 10961 xcb_generic_iterator_t 10962 xcb_alloc_color_cells_masks_end (const xcb_alloc_color_cells_reply_t *R); 10963 10964 /** 10965 * Return the reply 10966 * @param c The connection 10967 * @param cookie The cookie 10968 * @param e The xcb_generic_error_t supplied 10969 * 10970 * Returns the reply of the request asked by 10971 * 10972 * The parameter @p e supplied to this function must be NULL if 10973 * xcb_alloc_color_cells_unchecked(). is used. 10974 * Otherwise, it stores the error if any. 10975 * 10976 * The returned value must be freed by the caller using free(). 10977 */ 10978 xcb_alloc_color_cells_reply_t * 10979 xcb_alloc_color_cells_reply (xcb_connection_t *c, 10980 xcb_alloc_color_cells_cookie_t cookie /**< */, 10981 xcb_generic_error_t **e); 10982 10983 int 10984 xcb_alloc_color_planes_sizeof (const void *_buffer); 10985 10986 /** 10987 * 10988 * @param c The connection 10989 * @return A cookie 10990 * 10991 * Delivers a request to the X server. 10992 * 10993 */ 10994 xcb_alloc_color_planes_cookie_t 10995 xcb_alloc_color_planes (xcb_connection_t *c, 10996 uint8_t contiguous, 10997 xcb_colormap_t cmap, 10998 uint16_t colors, 10999 uint16_t reds, 11000 uint16_t greens, 11001 uint16_t blues); 11002 11003 /** 11004 * 11005 * @param c The connection 11006 * @return A cookie 11007 * 11008 * Delivers a request to the X server. 11009 * 11010 * This form can be used only if the request will cause 11011 * a reply to be generated. Any returned error will be 11012 * placed in the event queue. 11013 */ 11014 xcb_alloc_color_planes_cookie_t 11015 xcb_alloc_color_planes_unchecked (xcb_connection_t *c, 11016 uint8_t contiguous, 11017 xcb_colormap_t cmap, 11018 uint16_t colors, 11019 uint16_t reds, 11020 uint16_t greens, 11021 uint16_t blues); 11022 11023 uint32_t * 11024 xcb_alloc_color_planes_pixels (const xcb_alloc_color_planes_reply_t *R); 11025 11026 int 11027 xcb_alloc_color_planes_pixels_length (const xcb_alloc_color_planes_reply_t *R); 11028 11029 xcb_generic_iterator_t 11030 xcb_alloc_color_planes_pixels_end (const xcb_alloc_color_planes_reply_t *R); 11031 11032 /** 11033 * Return the reply 11034 * @param c The connection 11035 * @param cookie The cookie 11036 * @param e The xcb_generic_error_t supplied 11037 * 11038 * Returns the reply of the request asked by 11039 * 11040 * The parameter @p e supplied to this function must be NULL if 11041 * xcb_alloc_color_planes_unchecked(). is used. 11042 * Otherwise, it stores the error if any. 11043 * 11044 * The returned value must be freed by the caller using free(). 11045 */ 11046 xcb_alloc_color_planes_reply_t * 11047 xcb_alloc_color_planes_reply (xcb_connection_t *c, 11048 xcb_alloc_color_planes_cookie_t cookie /**< */, 11049 xcb_generic_error_t **e); 11050 11051 int 11052 xcb_free_colors_sizeof (const void *_buffer, 11053 uint32_t pixels_len); 11054 11055 /** 11056 * 11057 * @param c The connection 11058 * @return A cookie 11059 * 11060 * Delivers a request to the X server. 11061 * 11062 * This form can be used only if the request will not cause 11063 * a reply to be generated. Any returned error will be 11064 * saved for handling by xcb_request_check(). 11065 */ 11066 xcb_void_cookie_t 11067 xcb_free_colors_checked (xcb_connection_t *c, 11068 xcb_colormap_t cmap, 11069 uint32_t plane_mask, 11070 uint32_t pixels_len, 11071 const uint32_t *pixels); 11072 11073 /** 11074 * 11075 * @param c The connection 11076 * @return A cookie 11077 * 11078 * Delivers a request to the X server. 11079 * 11080 */ 11081 xcb_void_cookie_t 11082 xcb_free_colors (xcb_connection_t *c, 11083 xcb_colormap_t cmap, 11084 uint32_t plane_mask, 11085 uint32_t pixels_len, 11086 const uint32_t *pixels); 11087 11088 uint32_t * 11089 xcb_free_colors_pixels (const xcb_free_colors_request_t *R); 11090 11091 int 11092 xcb_free_colors_pixels_length (const xcb_free_colors_request_t *R); 11093 11094 xcb_generic_iterator_t 11095 xcb_free_colors_pixels_end (const xcb_free_colors_request_t *R); 11096 11097 /** 11098 * Get the next element of the iterator 11099 * @param i Pointer to a xcb_coloritem_iterator_t 11100 * 11101 * Get the next element in the iterator. The member rem is 11102 * decreased by one. The member data points to the next 11103 * element. The member index is increased by sizeof(xcb_coloritem_t) 11104 */ 11105 void 11106 xcb_coloritem_next (xcb_coloritem_iterator_t *i); 11107 11108 /** 11109 * Return the iterator pointing to the last element 11110 * @param i An xcb_coloritem_iterator_t 11111 * @return The iterator pointing to the last element 11112 * 11113 * Set the current element in the iterator to the last element. 11114 * The member rem is set to 0. The member data points to the 11115 * last element. 11116 */ 11117 xcb_generic_iterator_t 11118 xcb_coloritem_end (xcb_coloritem_iterator_t i); 11119 11120 int 11121 xcb_store_colors_sizeof (const void *_buffer, 11122 uint32_t items_len); 11123 11124 /** 11125 * 11126 * @param c The connection 11127 * @return A cookie 11128 * 11129 * Delivers a request to the X server. 11130 * 11131 * This form can be used only if the request will not cause 11132 * a reply to be generated. Any returned error will be 11133 * saved for handling by xcb_request_check(). 11134 */ 11135 xcb_void_cookie_t 11136 xcb_store_colors_checked (xcb_connection_t *c, 11137 xcb_colormap_t cmap, 11138 uint32_t items_len, 11139 const xcb_coloritem_t *items); 11140 11141 /** 11142 * 11143 * @param c The connection 11144 * @return A cookie 11145 * 11146 * Delivers a request to the X server. 11147 * 11148 */ 11149 xcb_void_cookie_t 11150 xcb_store_colors (xcb_connection_t *c, 11151 xcb_colormap_t cmap, 11152 uint32_t items_len, 11153 const xcb_coloritem_t *items); 11154 11155 xcb_coloritem_t * 11156 xcb_store_colors_items (const xcb_store_colors_request_t *R); 11157 11158 int 11159 xcb_store_colors_items_length (const xcb_store_colors_request_t *R); 11160 11161 xcb_coloritem_iterator_t 11162 xcb_store_colors_items_iterator (const xcb_store_colors_request_t *R); 11163 11164 int 11165 xcb_store_named_color_sizeof (const void *_buffer); 11166 11167 /** 11168 * 11169 * @param c The connection 11170 * @return A cookie 11171 * 11172 * Delivers a request to the X server. 11173 * 11174 * This form can be used only if the request will not cause 11175 * a reply to be generated. Any returned error will be 11176 * saved for handling by xcb_request_check(). 11177 */ 11178 xcb_void_cookie_t 11179 xcb_store_named_color_checked (xcb_connection_t *c, 11180 uint8_t flags, 11181 xcb_colormap_t cmap, 11182 uint32_t pixel, 11183 uint16_t name_len, 11184 const char *name); 11185 11186 /** 11187 * 11188 * @param c The connection 11189 * @return A cookie 11190 * 11191 * Delivers a request to the X server. 11192 * 11193 */ 11194 xcb_void_cookie_t 11195 xcb_store_named_color (xcb_connection_t *c, 11196 uint8_t flags, 11197 xcb_colormap_t cmap, 11198 uint32_t pixel, 11199 uint16_t name_len, 11200 const char *name); 11201 11202 char * 11203 xcb_store_named_color_name (const xcb_store_named_color_request_t *R); 11204 11205 int 11206 xcb_store_named_color_name_length (const xcb_store_named_color_request_t *R); 11207 11208 xcb_generic_iterator_t 11209 xcb_store_named_color_name_end (const xcb_store_named_color_request_t *R); 11210 11211 /** 11212 * Get the next element of the iterator 11213 * @param i Pointer to a xcb_rgb_iterator_t 11214 * 11215 * Get the next element in the iterator. The member rem is 11216 * decreased by one. The member data points to the next 11217 * element. The member index is increased by sizeof(xcb_rgb_t) 11218 */ 11219 void 11220 xcb_rgb_next (xcb_rgb_iterator_t *i); 11221 11222 /** 11223 * Return the iterator pointing to the last element 11224 * @param i An xcb_rgb_iterator_t 11225 * @return The iterator pointing to the last element 11226 * 11227 * Set the current element in the iterator to the last element. 11228 * The member rem is set to 0. The member data points to the 11229 * last element. 11230 */ 11231 xcb_generic_iterator_t 11232 xcb_rgb_end (xcb_rgb_iterator_t i); 11233 11234 int 11235 xcb_query_colors_sizeof (const void *_buffer, 11236 uint32_t pixels_len); 11237 11238 /** 11239 * 11240 * @param c The connection 11241 * @return A cookie 11242 * 11243 * Delivers a request to the X server. 11244 * 11245 */ 11246 xcb_query_colors_cookie_t 11247 xcb_query_colors (xcb_connection_t *c, 11248 xcb_colormap_t cmap, 11249 uint32_t pixels_len, 11250 const uint32_t *pixels); 11251 11252 /** 11253 * 11254 * @param c The connection 11255 * @return A cookie 11256 * 11257 * Delivers a request to the X server. 11258 * 11259 * This form can be used only if the request will cause 11260 * a reply to be generated. Any returned error will be 11261 * placed in the event queue. 11262 */ 11263 xcb_query_colors_cookie_t 11264 xcb_query_colors_unchecked (xcb_connection_t *c, 11265 xcb_colormap_t cmap, 11266 uint32_t pixels_len, 11267 const uint32_t *pixels); 11268 11269 xcb_rgb_t * 11270 xcb_query_colors_colors (const xcb_query_colors_reply_t *R); 11271 11272 int 11273 xcb_query_colors_colors_length (const xcb_query_colors_reply_t *R); 11274 11275 xcb_rgb_iterator_t 11276 xcb_query_colors_colors_iterator (const xcb_query_colors_reply_t *R); 11277 11278 /** 11279 * Return the reply 11280 * @param c The connection 11281 * @param cookie The cookie 11282 * @param e The xcb_generic_error_t supplied 11283 * 11284 * Returns the reply of the request asked by 11285 * 11286 * The parameter @p e supplied to this function must be NULL if 11287 * xcb_query_colors_unchecked(). is used. 11288 * Otherwise, it stores the error if any. 11289 * 11290 * The returned value must be freed by the caller using free(). 11291 */ 11292 xcb_query_colors_reply_t * 11293 xcb_query_colors_reply (xcb_connection_t *c, 11294 xcb_query_colors_cookie_t cookie /**< */, 11295 xcb_generic_error_t **e); 11296 11297 int 11298 xcb_lookup_color_sizeof (const void *_buffer); 11299 11300 /** 11301 * 11302 * @param c The connection 11303 * @return A cookie 11304 * 11305 * Delivers a request to the X server. 11306 * 11307 */ 11308 xcb_lookup_color_cookie_t 11309 xcb_lookup_color (xcb_connection_t *c, 11310 xcb_colormap_t cmap, 11311 uint16_t name_len, 11312 const char *name); 11313 11314 /** 11315 * 11316 * @param c The connection 11317 * @return A cookie 11318 * 11319 * Delivers a request to the X server. 11320 * 11321 * This form can be used only if the request will cause 11322 * a reply to be generated. Any returned error will be 11323 * placed in the event queue. 11324 */ 11325 xcb_lookup_color_cookie_t 11326 xcb_lookup_color_unchecked (xcb_connection_t *c, 11327 xcb_colormap_t cmap, 11328 uint16_t name_len, 11329 const char *name); 11330 11331 /** 11332 * Return the reply 11333 * @param c The connection 11334 * @param cookie The cookie 11335 * @param e The xcb_generic_error_t supplied 11336 * 11337 * Returns the reply of the request asked by 11338 * 11339 * The parameter @p e supplied to this function must be NULL if 11340 * xcb_lookup_color_unchecked(). is used. 11341 * Otherwise, it stores the error if any. 11342 * 11343 * The returned value must be freed by the caller using free(). 11344 */ 11345 xcb_lookup_color_reply_t * 11346 xcb_lookup_color_reply (xcb_connection_t *c, 11347 xcb_lookup_color_cookie_t cookie /**< */, 11348 xcb_generic_error_t **e); 11349 11350 /** 11351 * 11352 * @param c The connection 11353 * @return A cookie 11354 * 11355 * Delivers a request to the X server. 11356 * 11357 * This form can be used only if the request will not cause 11358 * a reply to be generated. Any returned error will be 11359 * saved for handling by xcb_request_check(). 11360 */ 11361 xcb_void_cookie_t 11362 xcb_create_cursor_checked (xcb_connection_t *c, 11363 xcb_cursor_t cid, 11364 xcb_pixmap_t source, 11365 xcb_pixmap_t mask, 11366 uint16_t fore_red, 11367 uint16_t fore_green, 11368 uint16_t fore_blue, 11369 uint16_t back_red, 11370 uint16_t back_green, 11371 uint16_t back_blue, 11372 uint16_t x, 11373 uint16_t y); 11374 11375 /** 11376 * 11377 * @param c The connection 11378 * @return A cookie 11379 * 11380 * Delivers a request to the X server. 11381 * 11382 */ 11383 xcb_void_cookie_t 11384 xcb_create_cursor (xcb_connection_t *c, 11385 xcb_cursor_t cid, 11386 xcb_pixmap_t source, 11387 xcb_pixmap_t mask, 11388 uint16_t fore_red, 11389 uint16_t fore_green, 11390 uint16_t fore_blue, 11391 uint16_t back_red, 11392 uint16_t back_green, 11393 uint16_t back_blue, 11394 uint16_t x, 11395 uint16_t y); 11396 11397 /** 11398 * @brief create cursor 11399 * 11400 * @param c The connection 11401 * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. 11402 * @param source_font In which font to look for the cursor glyph. 11403 * @param mask_font In which font to look for the mask glyph. 11404 * @param source_char The glyph of \a source_font to use. 11405 * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define 11406 * which source pixels are displayed. All pixels which are set to 0 are not 11407 * displayed. 11408 * @param fore_red The red value of the foreground color. 11409 * @param fore_green The green value of the foreground color. 11410 * @param fore_blue The blue value of the foreground color. 11411 * @param back_red The red value of the background color. 11412 * @param back_green The green value of the background color. 11413 * @param back_blue The blue value of the background color. 11414 * @return A cookie 11415 * 11416 * Creates a cursor from a font glyph. X provides a set of standard cursor shapes 11417 * in a special font named cursor. Applications are encouraged to use this 11418 * interface for their cursors because the font can be customized for the 11419 * individual display type. 11420 * 11421 * All pixels which are set to 1 in the source will use the foreground color (as 11422 * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 11423 * will use the background color (as specified by \a back_red, \a back_green and 11424 * \a back_blue). 11425 * 11426 * This form can be used only if the request will not cause 11427 * a reply to be generated. Any returned error will be 11428 * saved for handling by xcb_request_check(). 11429 */ 11430 xcb_void_cookie_t 11431 xcb_create_glyph_cursor_checked (xcb_connection_t *c, 11432 xcb_cursor_t cid, 11433 xcb_font_t source_font, 11434 xcb_font_t mask_font, 11435 uint16_t source_char, 11436 uint16_t mask_char, 11437 uint16_t fore_red, 11438 uint16_t fore_green, 11439 uint16_t fore_blue, 11440 uint16_t back_red, 11441 uint16_t back_green, 11442 uint16_t back_blue); 11443 11444 /** 11445 * @brief create cursor 11446 * 11447 * @param c The connection 11448 * @param cid The ID with which you will refer to the cursor, created by `xcb_generate_id`. 11449 * @param source_font In which font to look for the cursor glyph. 11450 * @param mask_font In which font to look for the mask glyph. 11451 * @param source_char The glyph of \a source_font to use. 11452 * @param mask_char The glyph of \a mask_font to use as a mask: Pixels which are set to 1 define 11453 * which source pixels are displayed. All pixels which are set to 0 are not 11454 * displayed. 11455 * @param fore_red The red value of the foreground color. 11456 * @param fore_green The green value of the foreground color. 11457 * @param fore_blue The blue value of the foreground color. 11458 * @param back_red The red value of the background color. 11459 * @param back_green The green value of the background color. 11460 * @param back_blue The blue value of the background color. 11461 * @return A cookie 11462 * 11463 * Creates a cursor from a font glyph. X provides a set of standard cursor shapes 11464 * in a special font named cursor. Applications are encouraged to use this 11465 * interface for their cursors because the font can be customized for the 11466 * individual display type. 11467 * 11468 * All pixels which are set to 1 in the source will use the foreground color (as 11469 * specified by \a fore_red, \a fore_green and \a fore_blue). All pixels set to 0 11470 * will use the background color (as specified by \a back_red, \a back_green and 11471 * \a back_blue). 11472 * 11473 */ 11474 xcb_void_cookie_t 11475 xcb_create_glyph_cursor (xcb_connection_t *c, 11476 xcb_cursor_t cid, 11477 xcb_font_t source_font, 11478 xcb_font_t mask_font, 11479 uint16_t source_char, 11480 uint16_t mask_char, 11481 uint16_t fore_red, 11482 uint16_t fore_green, 11483 uint16_t fore_blue, 11484 uint16_t back_red, 11485 uint16_t back_green, 11486 uint16_t back_blue); 11487 11488 /** 11489 * @brief Deletes a cursor 11490 * 11491 * @param c The connection 11492 * @param cursor The cursor to destroy. 11493 * @return A cookie 11494 * 11495 * Deletes the association between the cursor resource ID and the specified 11496 * cursor. The cursor is freed when no other resource references it. 11497 * 11498 * This form can be used only if the request will not cause 11499 * a reply to be generated. Any returned error will be 11500 * saved for handling by xcb_request_check(). 11501 */ 11502 xcb_void_cookie_t 11503 xcb_free_cursor_checked (xcb_connection_t *c, 11504 xcb_cursor_t cursor); 11505 11506 /** 11507 * @brief Deletes a cursor 11508 * 11509 * @param c The connection 11510 * @param cursor The cursor to destroy. 11511 * @return A cookie 11512 * 11513 * Deletes the association between the cursor resource ID and the specified 11514 * cursor. The cursor is freed when no other resource references it. 11515 * 11516 */ 11517 xcb_void_cookie_t 11518 xcb_free_cursor (xcb_connection_t *c, 11519 xcb_cursor_t cursor); 11520 11521 /** 11522 * 11523 * @param c The connection 11524 * @return A cookie 11525 * 11526 * Delivers a request to the X server. 11527 * 11528 * This form can be used only if the request will not cause 11529 * a reply to be generated. Any returned error will be 11530 * saved for handling by xcb_request_check(). 11531 */ 11532 xcb_void_cookie_t 11533 xcb_recolor_cursor_checked (xcb_connection_t *c, 11534 xcb_cursor_t cursor, 11535 uint16_t fore_red, 11536 uint16_t fore_green, 11537 uint16_t fore_blue, 11538 uint16_t back_red, 11539 uint16_t back_green, 11540 uint16_t back_blue); 11541 11542 /** 11543 * 11544 * @param c The connection 11545 * @return A cookie 11546 * 11547 * Delivers a request to the X server. 11548 * 11549 */ 11550 xcb_void_cookie_t 11551 xcb_recolor_cursor (xcb_connection_t *c, 11552 xcb_cursor_t cursor, 11553 uint16_t fore_red, 11554 uint16_t fore_green, 11555 uint16_t fore_blue, 11556 uint16_t back_red, 11557 uint16_t back_green, 11558 uint16_t back_blue); 11559 11560 /** 11561 * 11562 * @param c The connection 11563 * @return A cookie 11564 * 11565 * Delivers a request to the X server. 11566 * 11567 */ 11568 xcb_query_best_size_cookie_t 11569 xcb_query_best_size (xcb_connection_t *c, 11570 uint8_t _class, 11571 xcb_drawable_t drawable, 11572 uint16_t width, 11573 uint16_t height); 11574 11575 /** 11576 * 11577 * @param c The connection 11578 * @return A cookie 11579 * 11580 * Delivers a request to the X server. 11581 * 11582 * This form can be used only if the request will cause 11583 * a reply to be generated. Any returned error will be 11584 * placed in the event queue. 11585 */ 11586 xcb_query_best_size_cookie_t 11587 xcb_query_best_size_unchecked (xcb_connection_t *c, 11588 uint8_t _class, 11589 xcb_drawable_t drawable, 11590 uint16_t width, 11591 uint16_t height); 11592 11593 /** 11594 * Return the reply 11595 * @param c The connection 11596 * @param cookie The cookie 11597 * @param e The xcb_generic_error_t supplied 11598 * 11599 * Returns the reply of the request asked by 11600 * 11601 * The parameter @p e supplied to this function must be NULL if 11602 * xcb_query_best_size_unchecked(). is used. 11603 * Otherwise, it stores the error if any. 11604 * 11605 * The returned value must be freed by the caller using free(). 11606 */ 11607 xcb_query_best_size_reply_t * 11608 xcb_query_best_size_reply (xcb_connection_t *c, 11609 xcb_query_best_size_cookie_t cookie /**< */, 11610 xcb_generic_error_t **e); 11611 11612 int 11613 xcb_query_extension_sizeof (const void *_buffer); 11614 11615 /** 11616 * @brief check if extension is present 11617 * 11618 * @param c The connection 11619 * @param name_len The length of \a name in bytes. 11620 * @param name The name of the extension to query, for example "RANDR". This is case 11621 * sensitive! 11622 * @return A cookie 11623 * 11624 * Determines if the specified extension is present on this X11 server. 11625 * 11626 * Every extension has a unique `major_opcode` to identify requests, the minor 11627 * opcodes and request formats are extension-specific. If the extension provides 11628 * events and errors, the `first_event` and `first_error` fields in the reply are 11629 * set accordingly. 11630 * 11631 * There should rarely be a need to use this request directly, XCB provides the 11632 * `xcb_get_extension_data` function instead. 11633 * 11634 */ 11635 xcb_query_extension_cookie_t 11636 xcb_query_extension (xcb_connection_t *c, 11637 uint16_t name_len, 11638 const char *name); 11639 11640 /** 11641 * @brief check if extension is present 11642 * 11643 * @param c The connection 11644 * @param name_len The length of \a name in bytes. 11645 * @param name The name of the extension to query, for example "RANDR". This is case 11646 * sensitive! 11647 * @return A cookie 11648 * 11649 * Determines if the specified extension is present on this X11 server. 11650 * 11651 * Every extension has a unique `major_opcode` to identify requests, the minor 11652 * opcodes and request formats are extension-specific. If the extension provides 11653 * events and errors, the `first_event` and `first_error` fields in the reply are 11654 * set accordingly. 11655 * 11656 * There should rarely be a need to use this request directly, XCB provides the 11657 * `xcb_get_extension_data` function instead. 11658 * 11659 * This form can be used only if the request will cause 11660 * a reply to be generated. Any returned error will be 11661 * placed in the event queue. 11662 */ 11663 xcb_query_extension_cookie_t 11664 xcb_query_extension_unchecked (xcb_connection_t *c, 11665 uint16_t name_len, 11666 const char *name); 11667 11668 /** 11669 * Return the reply 11670 * @param c The connection 11671 * @param cookie The cookie 11672 * @param e The xcb_generic_error_t supplied 11673 * 11674 * Returns the reply of the request asked by 11675 * 11676 * The parameter @p e supplied to this function must be NULL if 11677 * xcb_query_extension_unchecked(). is used. 11678 * Otherwise, it stores the error if any. 11679 * 11680 * The returned value must be freed by the caller using free(). 11681 */ 11682 xcb_query_extension_reply_t * 11683 xcb_query_extension_reply (xcb_connection_t *c, 11684 xcb_query_extension_cookie_t cookie /**< */, 11685 xcb_generic_error_t **e); 11686 11687 int 11688 xcb_list_extensions_sizeof (const void *_buffer); 11689 11690 /** 11691 * 11692 * @param c The connection 11693 * @return A cookie 11694 * 11695 * Delivers a request to the X server. 11696 * 11697 */ 11698 xcb_list_extensions_cookie_t 11699 xcb_list_extensions (xcb_connection_t *c); 11700 11701 /** 11702 * 11703 * @param c The connection 11704 * @return A cookie 11705 * 11706 * Delivers a request to the X server. 11707 * 11708 * This form can be used only if the request will cause 11709 * a reply to be generated. Any returned error will be 11710 * placed in the event queue. 11711 */ 11712 xcb_list_extensions_cookie_t 11713 xcb_list_extensions_unchecked (xcb_connection_t *c); 11714 11715 int 11716 xcb_list_extensions_names_length (const xcb_list_extensions_reply_t *R); 11717 11718 xcb_str_iterator_t 11719 xcb_list_extensions_names_iterator (const xcb_list_extensions_reply_t *R); 11720 11721 /** 11722 * Return the reply 11723 * @param c The connection 11724 * @param cookie The cookie 11725 * @param e The xcb_generic_error_t supplied 11726 * 11727 * Returns the reply of the request asked by 11728 * 11729 * The parameter @p e supplied to this function must be NULL if 11730 * xcb_list_extensions_unchecked(). is used. 11731 * Otherwise, it stores the error if any. 11732 * 11733 * The returned value must be freed by the caller using free(). 11734 */ 11735 xcb_list_extensions_reply_t * 11736 xcb_list_extensions_reply (xcb_connection_t *c, 11737 xcb_list_extensions_cookie_t cookie /**< */, 11738 xcb_generic_error_t **e); 11739 11740 int 11741 xcb_change_keyboard_mapping_sizeof (const void *_buffer); 11742 11743 /** 11744 * 11745 * @param c The connection 11746 * @return A cookie 11747 * 11748 * Delivers a request to the X server. 11749 * 11750 * This form can be used only if the request will not cause 11751 * a reply to be generated. Any returned error will be 11752 * saved for handling by xcb_request_check(). 11753 */ 11754 xcb_void_cookie_t 11755 xcb_change_keyboard_mapping_checked (xcb_connection_t *c, 11756 uint8_t keycode_count, 11757 xcb_keycode_t first_keycode, 11758 uint8_t keysyms_per_keycode, 11759 const xcb_keysym_t *keysyms); 11760 11761 /** 11762 * 11763 * @param c The connection 11764 * @return A cookie 11765 * 11766 * Delivers a request to the X server. 11767 * 11768 */ 11769 xcb_void_cookie_t 11770 xcb_change_keyboard_mapping (xcb_connection_t *c, 11771 uint8_t keycode_count, 11772 xcb_keycode_t first_keycode, 11773 uint8_t keysyms_per_keycode, 11774 const xcb_keysym_t *keysyms); 11775 11776 xcb_keysym_t * 11777 xcb_change_keyboard_mapping_keysyms (const xcb_change_keyboard_mapping_request_t *R); 11778 11779 int 11780 xcb_change_keyboard_mapping_keysyms_length (const xcb_change_keyboard_mapping_request_t *R); 11781 11782 xcb_generic_iterator_t 11783 xcb_change_keyboard_mapping_keysyms_end (const xcb_change_keyboard_mapping_request_t *R); 11784 11785 int 11786 xcb_get_keyboard_mapping_sizeof (const void *_buffer); 11787 11788 /** 11789 * 11790 * @param c The connection 11791 * @return A cookie 11792 * 11793 * Delivers a request to the X server. 11794 * 11795 */ 11796 xcb_get_keyboard_mapping_cookie_t 11797 xcb_get_keyboard_mapping (xcb_connection_t *c, 11798 xcb_keycode_t first_keycode, 11799 uint8_t count); 11800 11801 /** 11802 * 11803 * @param c The connection 11804 * @return A cookie 11805 * 11806 * Delivers a request to the X server. 11807 * 11808 * This form can be used only if the request will cause 11809 * a reply to be generated. Any returned error will be 11810 * placed in the event queue. 11811 */ 11812 xcb_get_keyboard_mapping_cookie_t 11813 xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c, 11814 xcb_keycode_t first_keycode, 11815 uint8_t count); 11816 11817 xcb_keysym_t * 11818 xcb_get_keyboard_mapping_keysyms (const xcb_get_keyboard_mapping_reply_t *R); 11819 11820 int 11821 xcb_get_keyboard_mapping_keysyms_length (const xcb_get_keyboard_mapping_reply_t *R); 11822 11823 xcb_generic_iterator_t 11824 xcb_get_keyboard_mapping_keysyms_end (const xcb_get_keyboard_mapping_reply_t *R); 11825 11826 /** 11827 * Return the reply 11828 * @param c The connection 11829 * @param cookie The cookie 11830 * @param e The xcb_generic_error_t supplied 11831 * 11832 * Returns the reply of the request asked by 11833 * 11834 * The parameter @p e supplied to this function must be NULL if 11835 * xcb_get_keyboard_mapping_unchecked(). is used. 11836 * Otherwise, it stores the error if any. 11837 * 11838 * The returned value must be freed by the caller using free(). 11839 */ 11840 xcb_get_keyboard_mapping_reply_t * 11841 xcb_get_keyboard_mapping_reply (xcb_connection_t *c, 11842 xcb_get_keyboard_mapping_cookie_t cookie /**< */, 11843 xcb_generic_error_t **e); 11844 11845 int 11846 xcb_change_keyboard_control_value_list_serialize (void **_buffer, 11847 uint32_t value_mask, 11848 const xcb_change_keyboard_control_value_list_t *_aux); 11849 11850 int 11851 xcb_change_keyboard_control_value_list_unpack (const void *_buffer, 11852 uint32_t value_mask, 11853 xcb_change_keyboard_control_value_list_t *_aux); 11854 11855 int 11856 xcb_change_keyboard_control_value_list_sizeof (const void *_buffer, 11857 uint32_t value_mask); 11858 11859 int 11860 xcb_change_keyboard_control_sizeof (const void *_buffer); 11861 11862 /** 11863 * 11864 * @param c The connection 11865 * @return A cookie 11866 * 11867 * Delivers a request to the X server. 11868 * 11869 * This form can be used only if the request will not cause 11870 * a reply to be generated. Any returned error will be 11871 * saved for handling by xcb_request_check(). 11872 */ 11873 xcb_void_cookie_t 11874 xcb_change_keyboard_control_checked (xcb_connection_t *c, 11875 uint32_t value_mask, 11876 const void *value_list); 11877 11878 /** 11879 * 11880 * @param c The connection 11881 * @return A cookie 11882 * 11883 * Delivers a request to the X server. 11884 * 11885 */ 11886 xcb_void_cookie_t 11887 xcb_change_keyboard_control (xcb_connection_t *c, 11888 uint32_t value_mask, 11889 const void *value_list); 11890 11891 /** 11892 * 11893 * @param c The connection 11894 * @return A cookie 11895 * 11896 * Delivers a request to the X server. 11897 * 11898 * This form can be used only if the request will not cause 11899 * a reply to be generated. Any returned error will be 11900 * saved for handling by xcb_request_check(). 11901 */ 11902 xcb_void_cookie_t 11903 xcb_change_keyboard_control_aux_checked (xcb_connection_t *c, 11904 uint32_t value_mask, 11905 const xcb_change_keyboard_control_value_list_t *value_list); 11906 11907 /** 11908 * 11909 * @param c The connection 11910 * @return A cookie 11911 * 11912 * Delivers a request to the X server. 11913 * 11914 */ 11915 xcb_void_cookie_t 11916 xcb_change_keyboard_control_aux (xcb_connection_t *c, 11917 uint32_t value_mask, 11918 const xcb_change_keyboard_control_value_list_t *value_list); 11919 11920 void * 11921 xcb_change_keyboard_control_value_list (const xcb_change_keyboard_control_request_t *R); 11922 11923 /** 11924 * 11925 * @param c The connection 11926 * @return A cookie 11927 * 11928 * Delivers a request to the X server. 11929 * 11930 */ 11931 xcb_get_keyboard_control_cookie_t 11932 xcb_get_keyboard_control (xcb_connection_t *c); 11933 11934 /** 11935 * 11936 * @param c The connection 11937 * @return A cookie 11938 * 11939 * Delivers a request to the X server. 11940 * 11941 * This form can be used only if the request will cause 11942 * a reply to be generated. Any returned error will be 11943 * placed in the event queue. 11944 */ 11945 xcb_get_keyboard_control_cookie_t 11946 xcb_get_keyboard_control_unchecked (xcb_connection_t *c); 11947 11948 /** 11949 * Return the reply 11950 * @param c The connection 11951 * @param cookie The cookie 11952 * @param e The xcb_generic_error_t supplied 11953 * 11954 * Returns the reply of the request asked by 11955 * 11956 * The parameter @p e supplied to this function must be NULL if 11957 * xcb_get_keyboard_control_unchecked(). is used. 11958 * Otherwise, it stores the error if any. 11959 * 11960 * The returned value must be freed by the caller using free(). 11961 */ 11962 xcb_get_keyboard_control_reply_t * 11963 xcb_get_keyboard_control_reply (xcb_connection_t *c, 11964 xcb_get_keyboard_control_cookie_t cookie /**< */, 11965 xcb_generic_error_t **e); 11966 11967 /** 11968 * 11969 * @param c The connection 11970 * @return A cookie 11971 * 11972 * Delivers a request to the X server. 11973 * 11974 * This form can be used only if the request will not cause 11975 * a reply to be generated. Any returned error will be 11976 * saved for handling by xcb_request_check(). 11977 */ 11978 xcb_void_cookie_t 11979 xcb_bell_checked (xcb_connection_t *c, 11980 int8_t percent); 11981 11982 /** 11983 * 11984 * @param c The connection 11985 * @return A cookie 11986 * 11987 * Delivers a request to the X server. 11988 * 11989 */ 11990 xcb_void_cookie_t 11991 xcb_bell (xcb_connection_t *c, 11992 int8_t percent); 11993 11994 /** 11995 * 11996 * @param c The connection 11997 * @return A cookie 11998 * 11999 * Delivers a request to the X server. 12000 * 12001 * This form can be used only if the request will not cause 12002 * a reply to be generated. Any returned error will be 12003 * saved for handling by xcb_request_check(). 12004 */ 12005 xcb_void_cookie_t 12006 xcb_change_pointer_control_checked (xcb_connection_t *c, 12007 int16_t acceleration_numerator, 12008 int16_t acceleration_denominator, 12009 int16_t threshold, 12010 uint8_t do_acceleration, 12011 uint8_t do_threshold); 12012 12013 /** 12014 * 12015 * @param c The connection 12016 * @return A cookie 12017 * 12018 * Delivers a request to the X server. 12019 * 12020 */ 12021 xcb_void_cookie_t 12022 xcb_change_pointer_control (xcb_connection_t *c, 12023 int16_t acceleration_numerator, 12024 int16_t acceleration_denominator, 12025 int16_t threshold, 12026 uint8_t do_acceleration, 12027 uint8_t do_threshold); 12028 12029 /** 12030 * 12031 * @param c The connection 12032 * @return A cookie 12033 * 12034 * Delivers a request to the X server. 12035 * 12036 */ 12037 xcb_get_pointer_control_cookie_t 12038 xcb_get_pointer_control (xcb_connection_t *c); 12039 12040 /** 12041 * 12042 * @param c The connection 12043 * @return A cookie 12044 * 12045 * Delivers a request to the X server. 12046 * 12047 * This form can be used only if the request will cause 12048 * a reply to be generated. Any returned error will be 12049 * placed in the event queue. 12050 */ 12051 xcb_get_pointer_control_cookie_t 12052 xcb_get_pointer_control_unchecked (xcb_connection_t *c); 12053 12054 /** 12055 * Return the reply 12056 * @param c The connection 12057 * @param cookie The cookie 12058 * @param e The xcb_generic_error_t supplied 12059 * 12060 * Returns the reply of the request asked by 12061 * 12062 * The parameter @p e supplied to this function must be NULL if 12063 * xcb_get_pointer_control_unchecked(). is used. 12064 * Otherwise, it stores the error if any. 12065 * 12066 * The returned value must be freed by the caller using free(). 12067 */ 12068 xcb_get_pointer_control_reply_t * 12069 xcb_get_pointer_control_reply (xcb_connection_t *c, 12070 xcb_get_pointer_control_cookie_t cookie /**< */, 12071 xcb_generic_error_t **e); 12072 12073 /** 12074 * 12075 * @param c The connection 12076 * @return A cookie 12077 * 12078 * Delivers a request to the X server. 12079 * 12080 * This form can be used only if the request will not cause 12081 * a reply to be generated. Any returned error will be 12082 * saved for handling by xcb_request_check(). 12083 */ 12084 xcb_void_cookie_t 12085 xcb_set_screen_saver_checked (xcb_connection_t *c, 12086 int16_t timeout, 12087 int16_t interval, 12088 uint8_t prefer_blanking, 12089 uint8_t allow_exposures); 12090 12091 /** 12092 * 12093 * @param c The connection 12094 * @return A cookie 12095 * 12096 * Delivers a request to the X server. 12097 * 12098 */ 12099 xcb_void_cookie_t 12100 xcb_set_screen_saver (xcb_connection_t *c, 12101 int16_t timeout, 12102 int16_t interval, 12103 uint8_t prefer_blanking, 12104 uint8_t allow_exposures); 12105 12106 /** 12107 * 12108 * @param c The connection 12109 * @return A cookie 12110 * 12111 * Delivers a request to the X server. 12112 * 12113 */ 12114 xcb_get_screen_saver_cookie_t 12115 xcb_get_screen_saver (xcb_connection_t *c); 12116 12117 /** 12118 * 12119 * @param c The connection 12120 * @return A cookie 12121 * 12122 * Delivers a request to the X server. 12123 * 12124 * This form can be used only if the request will cause 12125 * a reply to be generated. Any returned error will be 12126 * placed in the event queue. 12127 */ 12128 xcb_get_screen_saver_cookie_t 12129 xcb_get_screen_saver_unchecked (xcb_connection_t *c); 12130 12131 /** 12132 * Return the reply 12133 * @param c The connection 12134 * @param cookie The cookie 12135 * @param e The xcb_generic_error_t supplied 12136 * 12137 * Returns the reply of the request asked by 12138 * 12139 * The parameter @p e supplied to this function must be NULL if 12140 * xcb_get_screen_saver_unchecked(). is used. 12141 * Otherwise, it stores the error if any. 12142 * 12143 * The returned value must be freed by the caller using free(). 12144 */ 12145 xcb_get_screen_saver_reply_t * 12146 xcb_get_screen_saver_reply (xcb_connection_t *c, 12147 xcb_get_screen_saver_cookie_t cookie /**< */, 12148 xcb_generic_error_t **e); 12149 12150 int 12151 xcb_change_hosts_sizeof (const void *_buffer); 12152 12153 /** 12154 * 12155 * @param c The connection 12156 * @return A cookie 12157 * 12158 * Delivers a request to the X server. 12159 * 12160 * This form can be used only if the request will not cause 12161 * a reply to be generated. Any returned error will be 12162 * saved for handling by xcb_request_check(). 12163 */ 12164 xcb_void_cookie_t 12165 xcb_change_hosts_checked (xcb_connection_t *c, 12166 uint8_t mode, 12167 uint8_t family, 12168 uint16_t address_len, 12169 const uint8_t *address); 12170 12171 /** 12172 * 12173 * @param c The connection 12174 * @return A cookie 12175 * 12176 * Delivers a request to the X server. 12177 * 12178 */ 12179 xcb_void_cookie_t 12180 xcb_change_hosts (xcb_connection_t *c, 12181 uint8_t mode, 12182 uint8_t family, 12183 uint16_t address_len, 12184 const uint8_t *address); 12185 12186 uint8_t * 12187 xcb_change_hosts_address (const xcb_change_hosts_request_t *R); 12188 12189 int 12190 xcb_change_hosts_address_length (const xcb_change_hosts_request_t *R); 12191 12192 xcb_generic_iterator_t 12193 xcb_change_hosts_address_end (const xcb_change_hosts_request_t *R); 12194 12195 int 12196 xcb_host_sizeof (const void *_buffer); 12197 12198 uint8_t * 12199 xcb_host_address (const xcb_host_t *R); 12200 12201 int 12202 xcb_host_address_length (const xcb_host_t *R); 12203 12204 xcb_generic_iterator_t 12205 xcb_host_address_end (const xcb_host_t *R); 12206 12207 /** 12208 * Get the next element of the iterator 12209 * @param i Pointer to a xcb_host_iterator_t 12210 * 12211 * Get the next element in the iterator. The member rem is 12212 * decreased by one. The member data points to the next 12213 * element. The member index is increased by sizeof(xcb_host_t) 12214 */ 12215 void 12216 xcb_host_next (xcb_host_iterator_t *i); 12217 12218 /** 12219 * Return the iterator pointing to the last element 12220 * @param i An xcb_host_iterator_t 12221 * @return The iterator pointing to the last element 12222 * 12223 * Set the current element in the iterator to the last element. 12224 * The member rem is set to 0. The member data points to the 12225 * last element. 12226 */ 12227 xcb_generic_iterator_t 12228 xcb_host_end (xcb_host_iterator_t i); 12229 12230 int 12231 xcb_list_hosts_sizeof (const void *_buffer); 12232 12233 /** 12234 * 12235 * @param c The connection 12236 * @return A cookie 12237 * 12238 * Delivers a request to the X server. 12239 * 12240 */ 12241 xcb_list_hosts_cookie_t 12242 xcb_list_hosts (xcb_connection_t *c); 12243 12244 /** 12245 * 12246 * @param c The connection 12247 * @return A cookie 12248 * 12249 * Delivers a request to the X server. 12250 * 12251 * This form can be used only if the request will cause 12252 * a reply to be generated. Any returned error will be 12253 * placed in the event queue. 12254 */ 12255 xcb_list_hosts_cookie_t 12256 xcb_list_hosts_unchecked (xcb_connection_t *c); 12257 12258 int 12259 xcb_list_hosts_hosts_length (const xcb_list_hosts_reply_t *R); 12260 12261 xcb_host_iterator_t 12262 xcb_list_hosts_hosts_iterator (const xcb_list_hosts_reply_t *R); 12263 12264 /** 12265 * Return the reply 12266 * @param c The connection 12267 * @param cookie The cookie 12268 * @param e The xcb_generic_error_t supplied 12269 * 12270 * Returns the reply of the request asked by 12271 * 12272 * The parameter @p e supplied to this function must be NULL if 12273 * xcb_list_hosts_unchecked(). is used. 12274 * Otherwise, it stores the error if any. 12275 * 12276 * The returned value must be freed by the caller using free(). 12277 */ 12278 xcb_list_hosts_reply_t * 12279 xcb_list_hosts_reply (xcb_connection_t *c, 12280 xcb_list_hosts_cookie_t cookie /**< */, 12281 xcb_generic_error_t **e); 12282 12283 /** 12284 * 12285 * @param c The connection 12286 * @return A cookie 12287 * 12288 * Delivers a request to the X server. 12289 * 12290 * This form can be used only if the request will not cause 12291 * a reply to be generated. Any returned error will be 12292 * saved for handling by xcb_request_check(). 12293 */ 12294 xcb_void_cookie_t 12295 xcb_set_access_control_checked (xcb_connection_t *c, 12296 uint8_t mode); 12297 12298 /** 12299 * 12300 * @param c The connection 12301 * @return A cookie 12302 * 12303 * Delivers a request to the X server. 12304 * 12305 */ 12306 xcb_void_cookie_t 12307 xcb_set_access_control (xcb_connection_t *c, 12308 uint8_t mode); 12309 12310 /** 12311 * 12312 * @param c The connection 12313 * @return A cookie 12314 * 12315 * Delivers a request to the X server. 12316 * 12317 * This form can be used only if the request will not cause 12318 * a reply to be generated. Any returned error will be 12319 * saved for handling by xcb_request_check(). 12320 */ 12321 xcb_void_cookie_t 12322 xcb_set_close_down_mode_checked (xcb_connection_t *c, 12323 uint8_t mode); 12324 12325 /** 12326 * 12327 * @param c The connection 12328 * @return A cookie 12329 * 12330 * Delivers a request to the X server. 12331 * 12332 */ 12333 xcb_void_cookie_t 12334 xcb_set_close_down_mode (xcb_connection_t *c, 12335 uint8_t mode); 12336 12337 /** 12338 * @brief kills a client 12339 * 12340 * @param c The connection 12341 * @param resource Any resource belonging to the client (for example a Window), used to identify 12342 * the client connection. 12343 * \n 12344 * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients 12345 * that have terminated in `RetainTemporary` (TODO) are destroyed. 12346 * @return A cookie 12347 * 12348 * Forces a close down of the client that created the specified \a resource. 12349 * 12350 * This form can be used only if the request will not cause 12351 * a reply to be generated. Any returned error will be 12352 * saved for handling by xcb_request_check(). 12353 */ 12354 xcb_void_cookie_t 12355 xcb_kill_client_checked (xcb_connection_t *c, 12356 uint32_t resource); 12357 12358 /** 12359 * @brief kills a client 12360 * 12361 * @param c The connection 12362 * @param resource Any resource belonging to the client (for example a Window), used to identify 12363 * the client connection. 12364 * \n 12365 * The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients 12366 * that have terminated in `RetainTemporary` (TODO) are destroyed. 12367 * @return A cookie 12368 * 12369 * Forces a close down of the client that created the specified \a resource. 12370 * 12371 */ 12372 xcb_void_cookie_t 12373 xcb_kill_client (xcb_connection_t *c, 12374 uint32_t resource); 12375 12376 int 12377 xcb_rotate_properties_sizeof (const void *_buffer); 12378 12379 /** 12380 * 12381 * @param c The connection 12382 * @return A cookie 12383 * 12384 * Delivers a request to the X server. 12385 * 12386 * This form can be used only if the request will not cause 12387 * a reply to be generated. Any returned error will be 12388 * saved for handling by xcb_request_check(). 12389 */ 12390 xcb_void_cookie_t 12391 xcb_rotate_properties_checked (xcb_connection_t *c, 12392 xcb_window_t window, 12393 uint16_t atoms_len, 12394 int16_t delta, 12395 const xcb_atom_t *atoms); 12396 12397 /** 12398 * 12399 * @param c The connection 12400 * @return A cookie 12401 * 12402 * Delivers a request to the X server. 12403 * 12404 */ 12405 xcb_void_cookie_t 12406 xcb_rotate_properties (xcb_connection_t *c, 12407 xcb_window_t window, 12408 uint16_t atoms_len, 12409 int16_t delta, 12410 const xcb_atom_t *atoms); 12411 12412 xcb_atom_t * 12413 xcb_rotate_properties_atoms (const xcb_rotate_properties_request_t *R); 12414 12415 int 12416 xcb_rotate_properties_atoms_length (const xcb_rotate_properties_request_t *R); 12417 12418 xcb_generic_iterator_t 12419 xcb_rotate_properties_atoms_end (const xcb_rotate_properties_request_t *R); 12420 12421 /** 12422 * 12423 * @param c The connection 12424 * @return A cookie 12425 * 12426 * Delivers a request to the X server. 12427 * 12428 * This form can be used only if the request will not cause 12429 * a reply to be generated. Any returned error will be 12430 * saved for handling by xcb_request_check(). 12431 */ 12432 xcb_void_cookie_t 12433 xcb_force_screen_saver_checked (xcb_connection_t *c, 12434 uint8_t mode); 12435 12436 /** 12437 * 12438 * @param c The connection 12439 * @return A cookie 12440 * 12441 * Delivers a request to the X server. 12442 * 12443 */ 12444 xcb_void_cookie_t 12445 xcb_force_screen_saver (xcb_connection_t *c, 12446 uint8_t mode); 12447 12448 int 12449 xcb_set_pointer_mapping_sizeof (const void *_buffer); 12450 12451 /** 12452 * 12453 * @param c The connection 12454 * @return A cookie 12455 * 12456 * Delivers a request to the X server. 12457 * 12458 */ 12459 xcb_set_pointer_mapping_cookie_t 12460 xcb_set_pointer_mapping (xcb_connection_t *c, 12461 uint8_t map_len, 12462 const uint8_t *map); 12463 12464 /** 12465 * 12466 * @param c The connection 12467 * @return A cookie 12468 * 12469 * Delivers a request to the X server. 12470 * 12471 * This form can be used only if the request will cause 12472 * a reply to be generated. Any returned error will be 12473 * placed in the event queue. 12474 */ 12475 xcb_set_pointer_mapping_cookie_t 12476 xcb_set_pointer_mapping_unchecked (xcb_connection_t *c, 12477 uint8_t map_len, 12478 const uint8_t *map); 12479 12480 /** 12481 * Return the reply 12482 * @param c The connection 12483 * @param cookie The cookie 12484 * @param e The xcb_generic_error_t supplied 12485 * 12486 * Returns the reply of the request asked by 12487 * 12488 * The parameter @p e supplied to this function must be NULL if 12489 * xcb_set_pointer_mapping_unchecked(). is used. 12490 * Otherwise, it stores the error if any. 12491 * 12492 * The returned value must be freed by the caller using free(). 12493 */ 12494 xcb_set_pointer_mapping_reply_t * 12495 xcb_set_pointer_mapping_reply (xcb_connection_t *c, 12496 xcb_set_pointer_mapping_cookie_t cookie /**< */, 12497 xcb_generic_error_t **e); 12498 12499 int 12500 xcb_get_pointer_mapping_sizeof (const void *_buffer); 12501 12502 /** 12503 * 12504 * @param c The connection 12505 * @return A cookie 12506 * 12507 * Delivers a request to the X server. 12508 * 12509 */ 12510 xcb_get_pointer_mapping_cookie_t 12511 xcb_get_pointer_mapping (xcb_connection_t *c); 12512 12513 /** 12514 * 12515 * @param c The connection 12516 * @return A cookie 12517 * 12518 * Delivers a request to the X server. 12519 * 12520 * This form can be used only if the request will cause 12521 * a reply to be generated. Any returned error will be 12522 * placed in the event queue. 12523 */ 12524 xcb_get_pointer_mapping_cookie_t 12525 xcb_get_pointer_mapping_unchecked (xcb_connection_t *c); 12526 12527 uint8_t * 12528 xcb_get_pointer_mapping_map (const xcb_get_pointer_mapping_reply_t *R); 12529 12530 int 12531 xcb_get_pointer_mapping_map_length (const xcb_get_pointer_mapping_reply_t *R); 12532 12533 xcb_generic_iterator_t 12534 xcb_get_pointer_mapping_map_end (const xcb_get_pointer_mapping_reply_t *R); 12535 12536 /** 12537 * Return the reply 12538 * @param c The connection 12539 * @param cookie The cookie 12540 * @param e The xcb_generic_error_t supplied 12541 * 12542 * Returns the reply of the request asked by 12543 * 12544 * The parameter @p e supplied to this function must be NULL if 12545 * xcb_get_pointer_mapping_unchecked(). is used. 12546 * Otherwise, it stores the error if any. 12547 * 12548 * The returned value must be freed by the caller using free(). 12549 */ 12550 xcb_get_pointer_mapping_reply_t * 12551 xcb_get_pointer_mapping_reply (xcb_connection_t *c, 12552 xcb_get_pointer_mapping_cookie_t cookie /**< */, 12553 xcb_generic_error_t **e); 12554 12555 int 12556 xcb_set_modifier_mapping_sizeof (const void *_buffer); 12557 12558 /** 12559 * 12560 * @param c The connection 12561 * @return A cookie 12562 * 12563 * Delivers a request to the X server. 12564 * 12565 */ 12566 xcb_set_modifier_mapping_cookie_t 12567 xcb_set_modifier_mapping (xcb_connection_t *c, 12568 uint8_t keycodes_per_modifier, 12569 const xcb_keycode_t *keycodes); 12570 12571 /** 12572 * 12573 * @param c The connection 12574 * @return A cookie 12575 * 12576 * Delivers a request to the X server. 12577 * 12578 * This form can be used only if the request will cause 12579 * a reply to be generated. Any returned error will be 12580 * placed in the event queue. 12581 */ 12582 xcb_set_modifier_mapping_cookie_t 12583 xcb_set_modifier_mapping_unchecked (xcb_connection_t *c, 12584 uint8_t keycodes_per_modifier, 12585 const xcb_keycode_t *keycodes); 12586 12587 /** 12588 * Return the reply 12589 * @param c The connection 12590 * @param cookie The cookie 12591 * @param e The xcb_generic_error_t supplied 12592 * 12593 * Returns the reply of the request asked by 12594 * 12595 * The parameter @p e supplied to this function must be NULL if 12596 * xcb_set_modifier_mapping_unchecked(). is used. 12597 * Otherwise, it stores the error if any. 12598 * 12599 * The returned value must be freed by the caller using free(). 12600 */ 12601 xcb_set_modifier_mapping_reply_t * 12602 xcb_set_modifier_mapping_reply (xcb_connection_t *c, 12603 xcb_set_modifier_mapping_cookie_t cookie /**< */, 12604 xcb_generic_error_t **e); 12605 12606 int 12607 xcb_get_modifier_mapping_sizeof (const void *_buffer); 12608 12609 /** 12610 * 12611 * @param c The connection 12612 * @return A cookie 12613 * 12614 * Delivers a request to the X server. 12615 * 12616 */ 12617 xcb_get_modifier_mapping_cookie_t 12618 xcb_get_modifier_mapping (xcb_connection_t *c); 12619 12620 /** 12621 * 12622 * @param c The connection 12623 * @return A cookie 12624 * 12625 * Delivers a request to the X server. 12626 * 12627 * This form can be used only if the request will cause 12628 * a reply to be generated. Any returned error will be 12629 * placed in the event queue. 12630 */ 12631 xcb_get_modifier_mapping_cookie_t 12632 xcb_get_modifier_mapping_unchecked (xcb_connection_t *c); 12633 12634 xcb_keycode_t * 12635 xcb_get_modifier_mapping_keycodes (const xcb_get_modifier_mapping_reply_t *R); 12636 12637 int 12638 xcb_get_modifier_mapping_keycodes_length (const xcb_get_modifier_mapping_reply_t *R); 12639 12640 xcb_generic_iterator_t 12641 xcb_get_modifier_mapping_keycodes_end (const xcb_get_modifier_mapping_reply_t *R); 12642 12643 /** 12644 * Return the reply 12645 * @param c The connection 12646 * @param cookie The cookie 12647 * @param e The xcb_generic_error_t supplied 12648 * 12649 * Returns the reply of the request asked by 12650 * 12651 * The parameter @p e supplied to this function must be NULL if 12652 * xcb_get_modifier_mapping_unchecked(). is used. 12653 * Otherwise, it stores the error if any. 12654 * 12655 * The returned value must be freed by the caller using free(). 12656 */ 12657 xcb_get_modifier_mapping_reply_t * 12658 xcb_get_modifier_mapping_reply (xcb_connection_t *c, 12659 xcb_get_modifier_mapping_cookie_t cookie /**< */, 12660 xcb_generic_error_t **e); 12661 12662 /** 12663 * 12664 * @param c The connection 12665 * @return A cookie 12666 * 12667 * Delivers a request to the X server. 12668 * 12669 * This form can be used only if the request will not cause 12670 * a reply to be generated. Any returned error will be 12671 * saved for handling by xcb_request_check(). 12672 */ 12673 xcb_void_cookie_t 12674 xcb_no_operation_checked (xcb_connection_t *c); 12675 12676 /** 12677 * 12678 * @param c The connection 12679 * @return A cookie 12680 * 12681 * Delivers a request to the X server. 12682 * 12683 */ 12684 xcb_void_cookie_t 12685 xcb_no_operation (xcb_connection_t *c); 12686 12687 12688 #ifdef __cplusplus 12689 } 12690 #endif 12691 12692 #endif 12693 12694 /** 12695 * @} 12696 */