| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | #ifndef __SHAPE_H |
| 13 | #define __SHAPE_H |
| 14 | |
| 15 | #include "xcb.h" |
| 16 | #include "xproto.h" |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | #define XCB_SHAPE_MAJOR_VERSION 1 |
| 23 | #define XCB_SHAPE_MINOR_VERSION 1 |
| 24 | |
| 25 | extern xcb_extension_t xcb_shape_id; |
| 26 | |
| 27 | typedef uint8_t xcb_shape_op_t; |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | typedef struct xcb_shape_op_iterator_t { |
| 33 | xcb_shape_op_t *data; |
| 34 | int rem; |
| 35 | int index; |
| 36 | } xcb_shape_op_iterator_t; |
| 37 | |
| 38 | typedef uint8_t xcb_shape_kind_t; |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | typedef struct xcb_shape_kind_iterator_t { |
| 44 | xcb_shape_kind_t *data; |
| 45 | int rem; |
| 46 | int index; |
| 47 | } xcb_shape_kind_iterator_t; |
| 48 | |
| 49 | typedef enum xcb_shape_so_t { |
| 50 | XCB_SHAPE_SO_SET = 0, |
| 51 | XCB_SHAPE_SO_UNION = 1, |
| 52 | XCB_SHAPE_SO_INTERSECT = 2, |
| 53 | XCB_SHAPE_SO_SUBTRACT = 3, |
| 54 | XCB_SHAPE_SO_INVERT = 4 |
| 55 | } xcb_shape_so_t; |
| 56 | |
| 57 | typedef enum xcb_shape_sk_t { |
| 58 | XCB_SHAPE_SK_BOUNDING = 0, |
| 59 | XCB_SHAPE_SK_CLIP = 1, |
| 60 | XCB_SHAPE_SK_INPUT = 2 |
| 61 | } xcb_shape_sk_t; |
| 62 | |
| 63 | |
| 64 | #define XCB_SHAPE_NOTIFY 0 |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | typedef struct xcb_shape_notify_event_t { |
| 70 | uint8_t response_type; |
| 71 | xcb_shape_kind_t shape_kind; |
| 72 | uint16_t sequence; |
| 73 | xcb_window_t affected_window; |
| 74 | int16_t extents_x; |
| 75 | int16_t extents_y; |
| 76 | uint16_t extents_width; |
| 77 | uint16_t extents_height; |
| 78 | xcb_timestamp_t server_time; |
| 79 | uint8_t shaped; |
| 80 | uint8_t pad0[11]; |
| 81 | } xcb_shape_notify_event_t; |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | typedef struct xcb_shape_query_version_cookie_t { |
| 87 | unsigned int sequence; |
| 88 | } xcb_shape_query_version_cookie_t; |
| 89 | |
| 90 | |
| 91 | #define XCB_SHAPE_QUERY_VERSION 0 |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | typedef struct xcb_shape_query_version_request_t { |
| 97 | uint8_t major_opcode; |
| 98 | uint8_t minor_opcode; |
| 99 | uint16_t length; |
| 100 | } xcb_shape_query_version_request_t; |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | typedef struct xcb_shape_query_version_reply_t { |
| 106 | uint8_t response_type; |
| 107 | uint8_t pad0; |
| 108 | uint16_t sequence; |
| 109 | uint32_t length; |
| 110 | uint16_t major_version; |
| 111 | uint16_t minor_version; |
| 112 | } xcb_shape_query_version_reply_t; |
| 113 | |
| 114 | |
| 115 | #define XCB_SHAPE_RECTANGLES 1 |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | typedef struct xcb_shape_rectangles_request_t { |
| 121 | uint8_t major_opcode; |
| 122 | uint8_t minor_opcode; |
| 123 | uint16_t length; |
| 124 | xcb_shape_op_t operation; |
| 125 | xcb_shape_kind_t destination_kind; |
| 126 | uint8_t ordering; |
| 127 | uint8_t pad0; |
| 128 | xcb_window_t destination_window; |
| 129 | int16_t x_offset; |
| 130 | int16_t y_offset; |
| 131 | } xcb_shape_rectangles_request_t; |
| 132 | |
| 133 | |
| 134 | #define XCB_SHAPE_MASK 2 |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | typedef struct xcb_shape_mask_request_t { |
| 140 | uint8_t major_opcode; |
| 141 | uint8_t minor_opcode; |
| 142 | uint16_t length; |
| 143 | xcb_shape_op_t operation; |
| 144 | xcb_shape_kind_t destination_kind; |
| 145 | uint8_t pad0[2]; |
| 146 | xcb_window_t destination_window; |
| 147 | int16_t x_offset; |
| 148 | int16_t y_offset; |
| 149 | xcb_pixmap_t source_bitmap; |
| 150 | } xcb_shape_mask_request_t; |
| 151 | |
| 152 | |
| 153 | #define XCB_SHAPE_COMBINE 3 |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | typedef struct xcb_shape_combine_request_t { |
| 159 | uint8_t major_opcode; |
| 160 | uint8_t minor_opcode; |
| 161 | uint16_t length; |
| 162 | xcb_shape_op_t operation; |
| 163 | xcb_shape_kind_t destination_kind; |
| 164 | xcb_shape_kind_t source_kind; |
| 165 | uint8_t pad0; |
| 166 | xcb_window_t destination_window; |
| 167 | int16_t x_offset; |
| 168 | int16_t y_offset; |
| 169 | xcb_window_t source_window; |
| 170 | } xcb_shape_combine_request_t; |
| 171 | |
| 172 | |
| 173 | #define XCB_SHAPE_OFFSET 4 |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | typedef struct xcb_shape_offset_request_t { |
| 179 | uint8_t major_opcode; |
| 180 | uint8_t minor_opcode; |
| 181 | uint16_t length; |
| 182 | xcb_shape_kind_t destination_kind; |
| 183 | uint8_t pad0[3]; |
| 184 | xcb_window_t destination_window; |
| 185 | int16_t x_offset; |
| 186 | int16_t y_offset; |
| 187 | } xcb_shape_offset_request_t; |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | typedef struct xcb_shape_query_extents_cookie_t { |
| 193 | unsigned int sequence; |
| 194 | } xcb_shape_query_extents_cookie_t; |
| 195 | |
| 196 | |
| 197 | #define XCB_SHAPE_QUERY_EXTENTS 5 |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | typedef struct xcb_shape_query_extents_request_t { |
| 203 | uint8_t major_opcode; |
| 204 | uint8_t minor_opcode; |
| 205 | uint16_t length; |
| 206 | xcb_window_t destination_window; |
| 207 | } xcb_shape_query_extents_request_t; |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | typedef struct xcb_shape_query_extents_reply_t { |
| 213 | uint8_t response_type; |
| 214 | uint8_t pad0; |
| 215 | uint16_t sequence; |
| 216 | uint32_t length; |
| 217 | uint8_t bounding_shaped; |
| 218 | uint8_t clip_shaped; |
| 219 | uint8_t pad1[2]; |
| 220 | int16_t bounding_shape_extents_x; |
| 221 | int16_t bounding_shape_extents_y; |
| 222 | uint16_t bounding_shape_extents_width; |
| 223 | uint16_t bounding_shape_extents_height; |
| 224 | int16_t clip_shape_extents_x; |
| 225 | int16_t clip_shape_extents_y; |
| 226 | uint16_t clip_shape_extents_width; |
| 227 | uint16_t clip_shape_extents_height; |
| 228 | } xcb_shape_query_extents_reply_t; |
| 229 | |
| 230 | |
| 231 | #define XCB_SHAPE_SELECT_INPUT 6 |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | typedef struct xcb_shape_select_input_request_t { |
| 237 | uint8_t major_opcode; |
| 238 | uint8_t minor_opcode; |
| 239 | uint16_t length; |
| 240 | xcb_window_t destination_window; |
| 241 | uint8_t enable; |
| 242 | uint8_t pad0[3]; |
| 243 | } xcb_shape_select_input_request_t; |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | typedef struct xcb_shape_input_selected_cookie_t { |
| 249 | unsigned int sequence; |
| 250 | } xcb_shape_input_selected_cookie_t; |
| 251 | |
| 252 | |
| 253 | #define XCB_SHAPE_INPUT_SELECTED 7 |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | typedef struct xcb_shape_input_selected_request_t { |
| 259 | uint8_t major_opcode; |
| 260 | uint8_t minor_opcode; |
| 261 | uint16_t length; |
| 262 | xcb_window_t destination_window; |
| 263 | } xcb_shape_input_selected_request_t; |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | typedef struct xcb_shape_input_selected_reply_t { |
| 269 | uint8_t response_type; |
| 270 | uint8_t enabled; |
| 271 | uint16_t sequence; |
| 272 | uint32_t length; |
| 273 | } xcb_shape_input_selected_reply_t; |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | typedef struct xcb_shape_get_rectangles_cookie_t { |
| 279 | unsigned int sequence; |
| 280 | } xcb_shape_get_rectangles_cookie_t; |
| 281 | |
| 282 | |
| 283 | #define XCB_SHAPE_GET_RECTANGLES 8 |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | typedef struct xcb_shape_get_rectangles_request_t { |
| 289 | uint8_t major_opcode; |
| 290 | uint8_t minor_opcode; |
| 291 | uint16_t length; |
| 292 | xcb_window_t window; |
| 293 | xcb_shape_kind_t source_kind; |
| 294 | uint8_t pad0[3]; |
| 295 | } xcb_shape_get_rectangles_request_t; |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | typedef struct xcb_shape_get_rectangles_reply_t { |
| 301 | uint8_t response_type; |
| 302 | uint8_t ordering; |
| 303 | uint16_t sequence; |
| 304 | uint32_t length; |
| 305 | uint32_t rectangles_len; |
| 306 | uint8_t pad0[20]; |
| 307 | } xcb_shape_get_rectangles_reply_t; |
| 308 | |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | void |
| 318 | xcb_shape_op_next (xcb_shape_op_iterator_t *i); |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | xcb_generic_iterator_t |
| 330 | xcb_shape_op_end (xcb_shape_op_iterator_t i); |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | void |
| 341 | xcb_shape_kind_next (xcb_shape_kind_iterator_t *i); |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | xcb_generic_iterator_t |
| 353 | xcb_shape_kind_end (xcb_shape_kind_iterator_t i); |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | xcb_shape_query_version_cookie_t |
| 364 | xcb_shape_query_version (xcb_connection_t *c); |
| 365 | |
| 366 | |
| 367 | |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | xcb_shape_query_version_cookie_t |
| 378 | xcb_shape_query_version_unchecked (xcb_connection_t *c); |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | xcb_shape_query_version_reply_t * |
| 395 | xcb_shape_query_version_reply (xcb_connection_t *c, |
| 396 | xcb_shape_query_version_cookie_t cookie , |
| 397 | xcb_generic_error_t **e); |
| 398 | |
| 399 | int |
| 400 | xcb_shape_rectangles_sizeof (const void *_buffer, |
| 401 | uint32_t rectangles_len); |
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | xcb_void_cookie_t |
| 415 | xcb_shape_rectangles_checked (xcb_connection_t *c, |
| 416 | xcb_shape_op_t operation, |
| 417 | xcb_shape_kind_t destination_kind, |
| 418 | uint8_t ordering, |
| 419 | xcb_window_t destination_window, |
| 420 | int16_t x_offset, |
| 421 | int16_t y_offset, |
| 422 | uint32_t rectangles_len, |
| 423 | const xcb_rectangle_t *rectangles); |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | xcb_void_cookie_t |
| 434 | xcb_shape_rectangles (xcb_connection_t *c, |
| 435 | xcb_shape_op_t operation, |
| 436 | xcb_shape_kind_t destination_kind, |
| 437 | uint8_t ordering, |
| 438 | xcb_window_t destination_window, |
| 439 | int16_t x_offset, |
| 440 | int16_t y_offset, |
| 441 | uint32_t rectangles_len, |
| 442 | const xcb_rectangle_t *rectangles); |
| 443 | |
| 444 | xcb_rectangle_t * |
| 445 | xcb_shape_rectangles_rectangles (const xcb_shape_rectangles_request_t *R); |
| 446 | |
| 447 | int |
| 448 | xcb_shape_rectangles_rectangles_length (const xcb_shape_rectangles_request_t *R); |
| 449 | |
| 450 | xcb_rectangle_iterator_t |
| 451 | xcb_shape_rectangles_rectangles_iterator (const xcb_shape_rectangles_request_t *R); |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | xcb_void_cookie_t |
| 465 | xcb_shape_mask_checked (xcb_connection_t *c, |
| 466 | xcb_shape_op_t operation, |
| 467 | xcb_shape_kind_t destination_kind, |
| 468 | xcb_window_t destination_window, |
| 469 | int16_t x_offset, |
| 470 | int16_t y_offset, |
| 471 | xcb_pixmap_t source_bitmap); |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | xcb_void_cookie_t |
| 482 | xcb_shape_mask (xcb_connection_t *c, |
| 483 | xcb_shape_op_t operation, |
| 484 | xcb_shape_kind_t destination_kind, |
| 485 | xcb_window_t destination_window, |
| 486 | int16_t x_offset, |
| 487 | int16_t y_offset, |
| 488 | xcb_pixmap_t source_bitmap); |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | xcb_void_cookie_t |
| 502 | xcb_shape_combine_checked (xcb_connection_t *c, |
| 503 | xcb_shape_op_t operation, |
| 504 | xcb_shape_kind_t destination_kind, |
| 505 | xcb_shape_kind_t source_kind, |
| 506 | xcb_window_t destination_window, |
| 507 | int16_t x_offset, |
| 508 | int16_t y_offset, |
| 509 | xcb_window_t source_window); |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | xcb_void_cookie_t |
| 520 | xcb_shape_combine (xcb_connection_t *c, |
| 521 | xcb_shape_op_t operation, |
| 522 | xcb_shape_kind_t destination_kind, |
| 523 | xcb_shape_kind_t source_kind, |
| 524 | xcb_window_t destination_window, |
| 525 | int16_t x_offset, |
| 526 | int16_t y_offset, |
| 527 | xcb_window_t source_window); |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | xcb_void_cookie_t |
| 541 | xcb_shape_offset_checked (xcb_connection_t *c, |
| 542 | xcb_shape_kind_t destination_kind, |
| 543 | xcb_window_t destination_window, |
| 544 | int16_t x_offset, |
| 545 | int16_t y_offset); |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | xcb_void_cookie_t |
| 556 | xcb_shape_offset (xcb_connection_t *c, |
| 557 | xcb_shape_kind_t destination_kind, |
| 558 | xcb_window_t destination_window, |
| 559 | int16_t x_offset, |
| 560 | int16_t y_offset); |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | xcb_shape_query_extents_cookie_t |
| 571 | xcb_shape_query_extents (xcb_connection_t *c, |
| 572 | xcb_window_t destination_window); |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | xcb_shape_query_extents_cookie_t |
| 586 | xcb_shape_query_extents_unchecked (xcb_connection_t *c, |
| 587 | xcb_window_t destination_window); |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | xcb_shape_query_extents_reply_t * |
| 604 | xcb_shape_query_extents_reply (xcb_connection_t *c, |
| 605 | xcb_shape_query_extents_cookie_t cookie , |
| 606 | xcb_generic_error_t **e); |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | xcb_void_cookie_t |
| 620 | xcb_shape_select_input_checked (xcb_connection_t *c, |
| 621 | xcb_window_t destination_window, |
| 622 | uint8_t enable); |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | xcb_void_cookie_t |
| 633 | xcb_shape_select_input (xcb_connection_t *c, |
| 634 | xcb_window_t destination_window, |
| 635 | uint8_t enable); |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | xcb_shape_input_selected_cookie_t |
| 646 | xcb_shape_input_selected (xcb_connection_t *c, |
| 647 | xcb_window_t destination_window); |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | xcb_shape_input_selected_cookie_t |
| 661 | xcb_shape_input_selected_unchecked (xcb_connection_t *c, |
| 662 | xcb_window_t destination_window); |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | xcb_shape_input_selected_reply_t * |
| 679 | xcb_shape_input_selected_reply (xcb_connection_t *c, |
| 680 | xcb_shape_input_selected_cookie_t cookie , |
| 681 | xcb_generic_error_t **e); |
| 682 | |
| 683 | int |
| 684 | xcb_shape_get_rectangles_sizeof (const void *_buffer); |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | xcb_shape_get_rectangles_cookie_t |
| 695 | xcb_shape_get_rectangles (xcb_connection_t *c, |
| 696 | xcb_window_t window, |
| 697 | xcb_shape_kind_t source_kind); |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | xcb_shape_get_rectangles_cookie_t |
| 711 | xcb_shape_get_rectangles_unchecked (xcb_connection_t *c, |
| 712 | xcb_window_t window, |
| 713 | xcb_shape_kind_t source_kind); |
| 714 | |
| 715 | xcb_rectangle_t * |
| 716 | xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R); |
| 717 | |
| 718 | int |
| 719 | xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R); |
| 720 | |
| 721 | xcb_rectangle_iterator_t |
| 722 | xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R); |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | xcb_shape_get_rectangles_reply_t * |
| 739 | xcb_shape_get_rectangles_reply (xcb_connection_t *c, |
| 740 | xcb_shape_get_rectangles_cookie_t cookie , |
| 741 | xcb_generic_error_t **e); |
| 742 | |
| 743 | |
| 744 | #ifdef __cplusplus |
| 745 | } |
| 746 | #endif |
| 747 | |
| 748 | #endif |
| 749 | |
| 750 | |
| 751 | |
| 752 | |