1 /* 2 * This file generated automatically from shape.xml by d_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_Shape_API XCB Shape API 8 * @brief Shape XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 module xcb.shape; 13 14 import xcb.xcb; 15 import xcb.xproto; 16 17 extern (C): 18 19 enum int XCB_SHAPE_MAJOR_VERSION = 1; 20 enum int XCB_SHAPE_MINOR_VERSION = 1; 21 22 extern (C) __gshared extern xcb_extension_t xcb_shape_id; 23 24 alias xcb_shape_op_t = ubyte; 25 26 /** 27 * @brief xcb_shape_op_iterator_t 28 **/ 29 struct xcb_shape_op_iterator_t { 30 xcb_shape_op_t* data; /**< */ 31 int rem; /**< */ 32 int index; /**< */ 33 } 34 35 alias xcb_shape_kind_t = ubyte; 36 37 /** 38 * @brief xcb_shape_kind_iterator_t 39 **/ 40 struct xcb_shape_kind_iterator_t { 41 xcb_shape_kind_t* data; /**< */ 42 int rem; /**< */ 43 int index; /**< */ 44 } 45 46 enum xcb_shape_so_t { 47 XCB_SHAPE_SO_SET = 0, 48 XCB_SHAPE_SO_UNION = 1, 49 XCB_SHAPE_SO_INTERSECT = 2, 50 XCB_SHAPE_SO_SUBTRACT = 3, 51 XCB_SHAPE_SO_INVERT = 4 52 } 53 54 alias XCB_SHAPE_SO_SET = xcb_shape_so_t.XCB_SHAPE_SO_SET; 55 alias XCB_SHAPE_SO_UNION = xcb_shape_so_t.XCB_SHAPE_SO_UNION; 56 alias XCB_SHAPE_SO_INTERSECT = xcb_shape_so_t.XCB_SHAPE_SO_INTERSECT; 57 alias XCB_SHAPE_SO_SUBTRACT = xcb_shape_so_t.XCB_SHAPE_SO_SUBTRACT; 58 alias XCB_SHAPE_SO_INVERT = xcb_shape_so_t.XCB_SHAPE_SO_INVERT; 59 60 enum xcb_shape_sk_t { 61 XCB_SHAPE_SK_BOUNDING = 0, 62 XCB_SHAPE_SK_CLIP = 1, 63 XCB_SHAPE_SK_INPUT = 2 64 } 65 66 alias XCB_SHAPE_SK_BOUNDING = xcb_shape_sk_t.XCB_SHAPE_SK_BOUNDING; 67 alias XCB_SHAPE_SK_CLIP = xcb_shape_sk_t.XCB_SHAPE_SK_CLIP; 68 alias XCB_SHAPE_SK_INPUT = xcb_shape_sk_t.XCB_SHAPE_SK_INPUT; 69 70 /** Opcode for xcb_shape_notify. */ 71 enum XCB_SHAPE_NOTIFY = 0; 72 73 /** 74 * @brief xcb_shape_notify_event_t 75 **/ 76 struct xcb_shape_notify_event_t { 77 ubyte response_type; /**< */ 78 xcb_shape_kind_t shape_kind; /**< */ 79 ushort sequence; /**< */ 80 xcb_window_t affected_window; /**< */ 81 short extents_x; /**< */ 82 short extents_y; /**< */ 83 ushort extents_width; /**< */ 84 ushort extents_height; /**< */ 85 xcb_timestamp_t server_time; /**< */ 86 ubyte shaped; /**< */ 87 ubyte[11] pad0; /**< */ 88 } 89 90 /** 91 * @brief xcb_shape_query_version_cookie_t 92 **/ 93 struct xcb_shape_query_version_cookie_t { 94 uint sequence; /**< */ 95 } 96 97 /** Opcode for xcb_shape_query_version. */ 98 enum XCB_SHAPE_QUERY_VERSION = 0; 99 100 /** 101 * @brief xcb_shape_query_version_request_t 102 **/ 103 struct xcb_shape_query_version_request_t { 104 ubyte major_opcode; /**< */ 105 ubyte minor_opcode; /**< */ 106 ushort length; /**< */ 107 } 108 109 /** 110 * @brief xcb_shape_query_version_reply_t 111 **/ 112 struct xcb_shape_query_version_reply_t { 113 ubyte response_type; /**< */ 114 ubyte pad0; /**< */ 115 ushort sequence; /**< */ 116 uint length; /**< */ 117 ushort major_version; /**< */ 118 ushort minor_version; /**< */ 119 } 120 121 /** Opcode for xcb_shape_rectangles. */ 122 enum XCB_SHAPE_RECTANGLES = 1; 123 124 /** 125 * @brief xcb_shape_rectangles_request_t 126 **/ 127 struct xcb_shape_rectangles_request_t { 128 ubyte major_opcode; /**< */ 129 ubyte minor_opcode; /**< */ 130 ushort length; /**< */ 131 xcb_shape_op_t operation; /**< */ 132 xcb_shape_kind_t destination_kind; /**< */ 133 ubyte ordering; /**< */ 134 ubyte pad0; /**< */ 135 xcb_window_t destination_window; /**< */ 136 short x_offset; /**< */ 137 short y_offset; /**< */ 138 } 139 140 /** Opcode for xcb_shape_mask. */ 141 enum XCB_SHAPE_MASK = 2; 142 143 /** 144 * @brief xcb_shape_mask_request_t 145 **/ 146 struct xcb_shape_mask_request_t { 147 ubyte major_opcode; /**< */ 148 ubyte minor_opcode; /**< */ 149 ushort length; /**< */ 150 xcb_shape_op_t operation; /**< */ 151 xcb_shape_kind_t destination_kind; /**< */ 152 ubyte[2] pad0; /**< */ 153 xcb_window_t destination_window; /**< */ 154 short x_offset; /**< */ 155 short y_offset; /**< */ 156 xcb_pixmap_t source_bitmap; /**< */ 157 } 158 159 /** Opcode for xcb_shape_combine. */ 160 enum XCB_SHAPE_COMBINE = 3; 161 162 /** 163 * @brief xcb_shape_combine_request_t 164 **/ 165 struct xcb_shape_combine_request_t { 166 ubyte major_opcode; /**< */ 167 ubyte minor_opcode; /**< */ 168 ushort length; /**< */ 169 xcb_shape_op_t operation; /**< */ 170 xcb_shape_kind_t destination_kind; /**< */ 171 xcb_shape_kind_t source_kind; /**< */ 172 ubyte pad0; /**< */ 173 xcb_window_t destination_window; /**< */ 174 short x_offset; /**< */ 175 short y_offset; /**< */ 176 xcb_window_t source_window; /**< */ 177 } 178 179 /** Opcode for xcb_shape_offset. */ 180 enum XCB_SHAPE_OFFSET = 4; 181 182 /** 183 * @brief xcb_shape_offset_request_t 184 **/ 185 struct xcb_shape_offset_request_t { 186 ubyte major_opcode; /**< */ 187 ubyte minor_opcode; /**< */ 188 ushort length; /**< */ 189 xcb_shape_kind_t destination_kind; /**< */ 190 ubyte[3] pad0; /**< */ 191 xcb_window_t destination_window; /**< */ 192 short x_offset; /**< */ 193 short y_offset; /**< */ 194 } 195 196 /** 197 * @brief xcb_shape_query_extents_cookie_t 198 **/ 199 struct xcb_shape_query_extents_cookie_t { 200 uint sequence; /**< */ 201 } 202 203 /** Opcode for xcb_shape_query_extents. */ 204 enum XCB_SHAPE_QUERY_EXTENTS = 5; 205 206 /** 207 * @brief xcb_shape_query_extents_request_t 208 **/ 209 struct xcb_shape_query_extents_request_t { 210 ubyte major_opcode; /**< */ 211 ubyte minor_opcode; /**< */ 212 ushort length; /**< */ 213 xcb_window_t destination_window; /**< */ 214 } 215 216 /** 217 * @brief xcb_shape_query_extents_reply_t 218 **/ 219 struct xcb_shape_query_extents_reply_t { 220 ubyte response_type; /**< */ 221 ubyte pad0; /**< */ 222 ushort sequence; /**< */ 223 uint length; /**< */ 224 ubyte bounding_shaped; /**< */ 225 ubyte clip_shaped; /**< */ 226 ubyte[2] pad1; /**< */ 227 short bounding_shape_extents_x; /**< */ 228 short bounding_shape_extents_y; /**< */ 229 ushort bounding_shape_extents_width; /**< */ 230 ushort bounding_shape_extents_height; /**< */ 231 short clip_shape_extents_x; /**< */ 232 short clip_shape_extents_y; /**< */ 233 ushort clip_shape_extents_width; /**< */ 234 ushort clip_shape_extents_height; /**< */ 235 } 236 237 /** Opcode for xcb_shape_select_input. */ 238 enum XCB_SHAPE_SELECT_INPUT = 6; 239 240 /** 241 * @brief xcb_shape_select_input_request_t 242 **/ 243 struct xcb_shape_select_input_request_t { 244 ubyte major_opcode; /**< */ 245 ubyte minor_opcode; /**< */ 246 ushort length; /**< */ 247 xcb_window_t destination_window; /**< */ 248 ubyte enable; /**< */ 249 ubyte[3] pad0; /**< */ 250 } 251 252 /** 253 * @brief xcb_shape_input_selected_cookie_t 254 **/ 255 struct xcb_shape_input_selected_cookie_t { 256 uint sequence; /**< */ 257 } 258 259 /** Opcode for xcb_shape_input_selected. */ 260 enum XCB_SHAPE_INPUT_SELECTED = 7; 261 262 /** 263 * @brief xcb_shape_input_selected_request_t 264 **/ 265 struct xcb_shape_input_selected_request_t { 266 ubyte major_opcode; /**< */ 267 ubyte minor_opcode; /**< */ 268 ushort length; /**< */ 269 xcb_window_t destination_window; /**< */ 270 } 271 272 /** 273 * @brief xcb_shape_input_selected_reply_t 274 **/ 275 struct xcb_shape_input_selected_reply_t { 276 ubyte response_type; /**< */ 277 ubyte enabled; /**< */ 278 ushort sequence; /**< */ 279 uint length; /**< */ 280 } 281 282 /** 283 * @brief xcb_shape_get_rectangles_cookie_t 284 **/ 285 struct xcb_shape_get_rectangles_cookie_t { 286 uint sequence; /**< */ 287 } 288 289 /** Opcode for xcb_shape_get_rectangles. */ 290 enum XCB_SHAPE_GET_RECTANGLES = 8; 291 292 /** 293 * @brief xcb_shape_get_rectangles_request_t 294 **/ 295 struct xcb_shape_get_rectangles_request_t { 296 ubyte major_opcode; /**< */ 297 ubyte minor_opcode; /**< */ 298 ushort length; /**< */ 299 xcb_window_t window; /**< */ 300 xcb_shape_kind_t source_kind; /**< */ 301 ubyte[3] pad0; /**< */ 302 } 303 304 /** 305 * @brief xcb_shape_get_rectangles_reply_t 306 **/ 307 struct xcb_shape_get_rectangles_reply_t { 308 ubyte response_type; /**< */ 309 ubyte ordering; /**< */ 310 ushort sequence; /**< */ 311 uint length; /**< */ 312 uint rectangles_len; /**< */ 313 ubyte[20] pad0; /**< */ 314 } 315 316 /** 317 * Get the next element of the iterator 318 * @param i Pointer to a xcb_shape_op_iterator_t 319 * 320 * Get the next element in the iterator. The member rem is 321 * decreased by one. The member data points to the next 322 * element. The member index is increased by sizeof(xcb_shape_op_t) 323 */ 324 void xcb_shape_op_next(xcb_shape_op_iterator_t* i /**< */ ); 325 326 /** 327 * Return the iterator pointing to the last element 328 * @param i An xcb_shape_op_iterator_t 329 * @return The iterator pointing to the last element 330 * 331 * Set the current element in the iterator to the last element. 332 * The member rem is set to 0. The member data points to the 333 * last element. 334 */ 335 xcb_generic_iterator_t xcb_shape_op_end(xcb_shape_op_iterator_t i /**< */ ); 336 337 /** 338 * Get the next element of the iterator 339 * @param i Pointer to a xcb_shape_kind_iterator_t 340 * 341 * Get the next element in the iterator. The member rem is 342 * decreased by one. The member data points to the next 343 * element. The member index is increased by sizeof(xcb_shape_kind_t) 344 */ 345 void xcb_shape_kind_next(xcb_shape_kind_iterator_t* i /**< */ ); 346 347 /** 348 * Return the iterator pointing to the last element 349 * @param i An xcb_shape_kind_iterator_t 350 * @return The iterator pointing to the last element 351 * 352 * Set the current element in the iterator to the last element. 353 * The member rem is set to 0. The member data points to the 354 * last element. 355 */ 356 xcb_generic_iterator_t xcb_shape_kind_end(xcb_shape_kind_iterator_t i /**< */ ); 357 358 /** 359 * 360 * @param c The connection 361 * @return A cookie 362 * 363 * Delivers a request to the X server. 364 * 365 */ 366 xcb_shape_query_version_cookie_t xcb_shape_query_version(xcb_connection_t* c /**< */ ); 367 368 /** 369 * 370 * @param c The connection 371 * @return A cookie 372 * 373 * Delivers a request to the X server. 374 * 375 * This form can be used only if the request will cause 376 * a reply to be generated. Any returned error will be 377 * placed in the event queue. 378 */ 379 xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked(xcb_connection_t* c /**< */ ); 380 381 /** 382 * Return the reply 383 * @param c The connection 384 * @param cookie The cookie 385 * @param e The xcb_generic_error_t supplied 386 * 387 * Returns the reply of the request asked by 388 * 389 * The parameter @p e supplied to this function must be NULL if 390 * xcb_shape_query_version_unchecked(). is used. 391 * Otherwise, it stores the error if any. 392 * 393 * The returned value must be freed by the caller using free(). 394 */ 395 xcb_shape_query_version_reply_t* xcb_shape_query_version_reply(xcb_connection_t* c /**< */ , 396 xcb_shape_query_version_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 397 398 int xcb_shape_rectangles_sizeof(const void* _buffer /**< */ , uint rectangles_len /**< */ ); 399 400 /** 401 * 402 * @param c The connection 403 * @return A cookie 404 * 405 * Delivers a request to the X server. 406 * 407 * This form can be used only if the request will not cause 408 * a reply to be generated. Any returned error will be 409 * saved for handling by xcb_request_check(). 410 */ 411 xcb_void_cookie_t xcb_shape_rectangles_checked(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , 412 xcb_shape_kind_t destination_kind /**< */ , ubyte ordering /**< */ , xcb_window_t destination_window /**< */ , short x_offset /**< */ , 413 short y_offset /**< */ , uint rectangles_len /**< */ , const xcb_rectangle_t* rectangles /**< */ ); 414 415 /** 416 * 417 * @param c The connection 418 * @return A cookie 419 * 420 * Delivers a request to the X server. 421 * 422 */ 423 xcb_void_cookie_t xcb_shape_rectangles(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , xcb_shape_kind_t destination_kind /**< */ , 424 ubyte ordering /**< */ , xcb_window_t destination_window /**< */ , short x_offset /**< */ , short y_offset /**< */ , uint rectangles_len /**< */ , 425 const xcb_rectangle_t* rectangles /**< */ ); 426 427 /** 428 * 429 * @param c The connection 430 * @return A cookie 431 * 432 * Delivers a request to the X server. 433 * 434 * This form can be used only if the request will not cause 435 * a reply to be generated. Any returned error will be 436 * saved for handling by xcb_request_check(). 437 */ 438 xcb_void_cookie_t xcb_shape_mask_checked(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , xcb_shape_kind_t destination_kind /**< */ , 439 xcb_window_t destination_window /**< */ , short x_offset /**< */ , short y_offset /**< */ , xcb_pixmap_t source_bitmap /**< */ ); 440 441 /** 442 * 443 * @param c The connection 444 * @return A cookie 445 * 446 * Delivers a request to the X server. 447 * 448 */ 449 xcb_void_cookie_t xcb_shape_mask(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , xcb_shape_kind_t destination_kind /**< */ , 450 xcb_window_t destination_window /**< */ , short x_offset /**< */ , short y_offset /**< */ , xcb_pixmap_t source_bitmap /**< */ ); 451 452 /** 453 * 454 * @param c The connection 455 * @return A cookie 456 * 457 * Delivers a request to the X server. 458 * 459 * This form can be used only if the request will not cause 460 * a reply to be generated. Any returned error will be 461 * saved for handling by xcb_request_check(). 462 */ 463 xcb_void_cookie_t xcb_shape_combine_checked(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , 464 xcb_shape_kind_t destination_kind /**< */ , xcb_shape_kind_t source_kind /**< */ , xcb_window_t destination_window /**< */ , 465 short x_offset /**< */ , short y_offset /**< */ , xcb_window_t source_window /**< */ ); 466 467 /** 468 * 469 * @param c The connection 470 * @return A cookie 471 * 472 * Delivers a request to the X server. 473 * 474 */ 475 xcb_void_cookie_t xcb_shape_combine(xcb_connection_t* c /**< */ , xcb_shape_op_t operation /**< */ , xcb_shape_kind_t destination_kind /**< */ , 476 xcb_shape_kind_t source_kind /**< */ , xcb_window_t destination_window /**< */ , short x_offset /**< */ , 477 short y_offset /**< */ , xcb_window_t source_window /**< */ ); 478 479 /** 480 * 481 * @param c The connection 482 * @return A cookie 483 * 484 * Delivers a request to the X server. 485 * 486 * This form can be used only if the request will not cause 487 * a reply to be generated. Any returned error will be 488 * saved for handling by xcb_request_check(). 489 */ 490 xcb_void_cookie_t xcb_shape_offset_checked(xcb_connection_t* c /**< */ , xcb_shape_kind_t destination_kind /**< */ , 491 xcb_window_t destination_window /**< */ , short x_offset /**< */ , short y_offset /**< */ ); 492 493 /** 494 * 495 * @param c The connection 496 * @return A cookie 497 * 498 * Delivers a request to the X server. 499 * 500 */ 501 xcb_void_cookie_t xcb_shape_offset(xcb_connection_t* c /**< */ , xcb_shape_kind_t destination_kind /**< */ , xcb_window_t destination_window /**< */ , 502 short x_offset /**< */ , short y_offset /**< */ ); 503 504 /** 505 * 506 * @param c The connection 507 * @return A cookie 508 * 509 * Delivers a request to the X server. 510 * 511 */ 512 xcb_shape_query_extents_cookie_t xcb_shape_query_extents(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ ); 513 514 /** 515 * 516 * @param c The connection 517 * @return A cookie 518 * 519 * Delivers a request to the X server. 520 * 521 * This form can be used only if the request will cause 522 * a reply to be generated. Any returned error will be 523 * placed in the event queue. 524 */ 525 xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ ); 526 527 /** 528 * Return the reply 529 * @param c The connection 530 * @param cookie The cookie 531 * @param e The xcb_generic_error_t supplied 532 * 533 * Returns the reply of the request asked by 534 * 535 * The parameter @p e supplied to this function must be NULL if 536 * xcb_shape_query_extents_unchecked(). is used. 537 * Otherwise, it stores the error if any. 538 * 539 * The returned value must be freed by the caller using free(). 540 */ 541 xcb_shape_query_extents_reply_t* xcb_shape_query_extents_reply(xcb_connection_t* c /**< */ , 542 xcb_shape_query_extents_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 543 544 /** 545 * 546 * @param c The connection 547 * @return A cookie 548 * 549 * Delivers a request to the X server. 550 * 551 * This form can be used only if the request will not cause 552 * a reply to be generated. Any returned error will be 553 * saved for handling by xcb_request_check(). 554 */ 555 xcb_void_cookie_t xcb_shape_select_input_checked(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ , ubyte enable /**< */ ); 556 557 /** 558 * 559 * @param c The connection 560 * @return A cookie 561 * 562 * Delivers a request to the X server. 563 * 564 */ 565 xcb_void_cookie_t xcb_shape_select_input(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ , ubyte enable /**< */ ); 566 567 /** 568 * 569 * @param c The connection 570 * @return A cookie 571 * 572 * Delivers a request to the X server. 573 * 574 */ 575 xcb_shape_input_selected_cookie_t xcb_shape_input_selected(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ ); 576 577 /** 578 * 579 * @param c The connection 580 * @return A cookie 581 * 582 * Delivers a request to the X server. 583 * 584 * This form can be used only if the request will cause 585 * a reply to be generated. Any returned error will be 586 * placed in the event queue. 587 */ 588 xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked(xcb_connection_t* c /**< */ , xcb_window_t destination_window /**< */ ); 589 590 /** 591 * Return the reply 592 * @param c The connection 593 * @param cookie The cookie 594 * @param e The xcb_generic_error_t supplied 595 * 596 * Returns the reply of the request asked by 597 * 598 * The parameter @p e supplied to this function must be NULL if 599 * xcb_shape_input_selected_unchecked(). is used. 600 * Otherwise, it stores the error if any. 601 * 602 * The returned value must be freed by the caller using free(). 603 */ 604 xcb_shape_input_selected_reply_t* xcb_shape_input_selected_reply(xcb_connection_t* c /**< */ , 605 xcb_shape_input_selected_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 606 607 int xcb_shape_get_rectangles_sizeof(const void* _buffer /**< */ ); 608 609 /** 610 * 611 * @param c The connection 612 * @return A cookie 613 * 614 * Delivers a request to the X server. 615 * 616 */ 617 xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , 618 xcb_shape_kind_t source_kind /**< */ ); 619 620 /** 621 * 622 * @param c The connection 623 * @return A cookie 624 * 625 * Delivers a request to the X server. 626 * 627 * This form can be used only if the request will cause 628 * a reply to be generated. Any returned error will be 629 * placed in the event queue. 630 */ 631 xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , 632 xcb_shape_kind_t source_kind /**< */ ); 633 634 xcb_rectangle_t* xcb_shape_get_rectangles_rectangles(const xcb_shape_get_rectangles_reply_t* R /**< */ ); 635 636 int xcb_shape_get_rectangles_rectangles_length(const xcb_shape_get_rectangles_reply_t* R /**< */ ); 637 638 xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator(const xcb_shape_get_rectangles_reply_t* R /**< */ ); 639 640 /** 641 * Return the reply 642 * @param c The connection 643 * @param cookie The cookie 644 * @param e The xcb_generic_error_t supplied 645 * 646 * Returns the reply of the request asked by 647 * 648 * The parameter @p e supplied to this function must be NULL if 649 * xcb_shape_get_rectangles_unchecked(). is used. 650 * Otherwise, it stores the error if any. 651 * 652 * The returned value must be freed by the caller using free(). 653 */ 654 xcb_shape_get_rectangles_reply_t* xcb_shape_get_rectangles_reply(xcb_connection_t* c /**< */ , 655 xcb_shape_get_rectangles_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 656 657 /** 658 * @} 659 */