1 /* 2 * This file generated automatically from shape.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 #include <string.h> 7 #include <assert.h> 8 #include "xcbext.h" 9 #include "shape.h" 10 #include "xproto.h" 11 12 xcb_extension_t xcb_shape_id = { "SHAPE", 0 }; 13 14 15 /***************************************************************************** 16 ** 17 ** void xcb_shape_op_next 18 ** 19 ** @param xcb_shape_op_iterator_t *i 20 ** @returns void 21 ** 22 *****************************************************************************/ 23 24 void 25 xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */) 26 { 27 --i->rem; 28 ++i->data; 29 i->index += sizeof(xcb_shape_op_t); 30 } 31 32 33 /***************************************************************************** 34 ** 35 ** xcb_generic_iterator_t xcb_shape_op_end 36 ** 37 ** @param xcb_shape_op_iterator_t i 38 ** @returns xcb_generic_iterator_t 39 ** 40 *****************************************************************************/ 41 42 xcb_generic_iterator_t 43 xcb_shape_op_end (xcb_shape_op_iterator_t i /**< */) 44 { 45 xcb_generic_iterator_t ret; 46 ret.data = i.data + i.rem; 47 ret.index = i.index + ((char *) ret.data - (char *) i.data); 48 ret.rem = 0; 49 return ret; 50 } 51 52 53 /***************************************************************************** 54 ** 55 ** void xcb_shape_kind_next 56 ** 57 ** @param xcb_shape_kind_iterator_t *i 58 ** @returns void 59 ** 60 *****************************************************************************/ 61 62 void 63 xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */) 64 { 65 --i->rem; 66 ++i->data; 67 i->index += sizeof(xcb_shape_kind_t); 68 } 69 70 71 /***************************************************************************** 72 ** 73 ** xcb_generic_iterator_t xcb_shape_kind_end 74 ** 75 ** @param xcb_shape_kind_iterator_t i 76 ** @returns xcb_generic_iterator_t 77 ** 78 *****************************************************************************/ 79 80 xcb_generic_iterator_t 81 xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */) 82 { 83 xcb_generic_iterator_t ret; 84 ret.data = i.data + i.rem; 85 ret.index = i.index + ((char *) ret.data - (char *) i.data); 86 ret.rem = 0; 87 return ret; 88 } 89 90 91 /***************************************************************************** 92 ** 93 ** xcb_shape_query_version_cookie_t xcb_shape_query_version 94 ** 95 ** @param xcb_connection_t *c 96 ** @returns xcb_shape_query_version_cookie_t 97 ** 98 *****************************************************************************/ 99 100 xcb_shape_query_version_cookie_t 101 xcb_shape_query_version (xcb_connection_t *c /**< */) 102 { 103 static const xcb_protocol_request_t xcb_req = { 104 /* count */ 2, 105 /* ext */ &xcb_shape_id, 106 /* opcode */ XCB_SHAPE_QUERY_VERSION, 107 /* isvoid */ 0 108 }; 109 110 struct iovec xcb_parts[4]; 111 xcb_shape_query_version_cookie_t xcb_ret; 112 xcb_shape_query_version_request_t xcb_out; 113 114 115 xcb_parts[2].iov_base = (char *) &xcb_out; 116 xcb_parts[2].iov_len = sizeof(xcb_out); 117 xcb_parts[3].iov_base = 0; 118 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 119 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 120 return xcb_ret; 121 } 122 123 124 /***************************************************************************** 125 ** 126 ** xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked 127 ** 128 ** @param xcb_connection_t *c 129 ** @returns xcb_shape_query_version_cookie_t 130 ** 131 *****************************************************************************/ 132 133 xcb_shape_query_version_cookie_t 134 xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */) 135 { 136 static const xcb_protocol_request_t xcb_req = { 137 /* count */ 2, 138 /* ext */ &xcb_shape_id, 139 /* opcode */ XCB_SHAPE_QUERY_VERSION, 140 /* isvoid */ 0 141 }; 142 143 struct iovec xcb_parts[4]; 144 xcb_shape_query_version_cookie_t xcb_ret; 145 xcb_shape_query_version_request_t xcb_out; 146 147 148 xcb_parts[2].iov_base = (char *) &xcb_out; 149 xcb_parts[2].iov_len = sizeof(xcb_out); 150 xcb_parts[3].iov_base = 0; 151 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 152 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 153 return xcb_ret; 154 } 155 156 157 /***************************************************************************** 158 ** 159 ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply 160 ** 161 ** @param xcb_connection_t *c 162 ** @param xcb_shape_query_version_cookie_t cookie 163 ** @param xcb_generic_error_t **e 164 ** @returns xcb_shape_query_version_reply_t * 165 ** 166 *****************************************************************************/ 167 168 xcb_shape_query_version_reply_t * 169 xcb_shape_query_version_reply (xcb_connection_t *c /**< */, 170 xcb_shape_query_version_cookie_t cookie /**< */, 171 xcb_generic_error_t **e /**< */) 172 { 173 return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 174 } 175 176 177 /***************************************************************************** 178 ** 179 ** xcb_void_cookie_t xcb_shape_rectangles_checked 180 ** 181 ** @param xcb_connection_t *c 182 ** @param xcb_shape_op_t operation 183 ** @param xcb_shape_kind_t destination_kind 184 ** @param uint8_t ordering 185 ** @param xcb_window_t destination_window 186 ** @param int16_t x_offset 187 ** @param int16_t y_offset 188 ** @param uint32_t rectangles_len 189 ** @param const xcb_rectangle_t *rectangles 190 ** @returns xcb_void_cookie_t 191 ** 192 *****************************************************************************/ 193 194 xcb_void_cookie_t 195 xcb_shape_rectangles_checked (xcb_connection_t *c /**< */, 196 xcb_shape_op_t operation /**< */, 197 xcb_shape_kind_t destination_kind /**< */, 198 uint8_t ordering /**< */, 199 xcb_window_t destination_window /**< */, 200 int16_t x_offset /**< */, 201 int16_t y_offset /**< */, 202 uint32_t rectangles_len /**< */, 203 const xcb_rectangle_t *rectangles /**< */) 204 { 205 static const xcb_protocol_request_t xcb_req = { 206 /* count */ 4, 207 /* ext */ &xcb_shape_id, 208 /* opcode */ XCB_SHAPE_RECTANGLES, 209 /* isvoid */ 1 210 }; 211 212 struct iovec xcb_parts[6]; 213 xcb_void_cookie_t xcb_ret; 214 xcb_shape_rectangles_request_t xcb_out; 215 216 xcb_out.operation = operation; 217 xcb_out.destination_kind = destination_kind; 218 xcb_out.ordering = ordering; 219 xcb_out.pad0 = 0; 220 xcb_out.destination_window = destination_window; 221 xcb_out.x_offset = x_offset; 222 xcb_out.y_offset = y_offset; 223 224 xcb_parts[2].iov_base = (char *) &xcb_out; 225 xcb_parts[2].iov_len = sizeof(xcb_out); 226 xcb_parts[3].iov_base = 0; 227 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 228 xcb_parts[4].iov_base = (char *) rectangles; 229 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 230 xcb_parts[5].iov_base = 0; 231 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 232 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 233 return xcb_ret; 234 } 235 236 237 /***************************************************************************** 238 ** 239 ** xcb_void_cookie_t xcb_shape_rectangles 240 ** 241 ** @param xcb_connection_t *c 242 ** @param xcb_shape_op_t operation 243 ** @param xcb_shape_kind_t destination_kind 244 ** @param uint8_t ordering 245 ** @param xcb_window_t destination_window 246 ** @param int16_t x_offset 247 ** @param int16_t y_offset 248 ** @param uint32_t rectangles_len 249 ** @param const xcb_rectangle_t *rectangles 250 ** @returns xcb_void_cookie_t 251 ** 252 *****************************************************************************/ 253 254 xcb_void_cookie_t 255 xcb_shape_rectangles (xcb_connection_t *c /**< */, 256 xcb_shape_op_t operation /**< */, 257 xcb_shape_kind_t destination_kind /**< */, 258 uint8_t ordering /**< */, 259 xcb_window_t destination_window /**< */, 260 int16_t x_offset /**< */, 261 int16_t y_offset /**< */, 262 uint32_t rectangles_len /**< */, 263 const xcb_rectangle_t *rectangles /**< */) 264 { 265 static const xcb_protocol_request_t xcb_req = { 266 /* count */ 4, 267 /* ext */ &xcb_shape_id, 268 /* opcode */ XCB_SHAPE_RECTANGLES, 269 /* isvoid */ 1 270 }; 271 272 struct iovec xcb_parts[6]; 273 xcb_void_cookie_t xcb_ret; 274 xcb_shape_rectangles_request_t xcb_out; 275 276 xcb_out.operation = operation; 277 xcb_out.destination_kind = destination_kind; 278 xcb_out.ordering = ordering; 279 xcb_out.pad0 = 0; 280 xcb_out.destination_window = destination_window; 281 xcb_out.x_offset = x_offset; 282 xcb_out.y_offset = y_offset; 283 284 xcb_parts[2].iov_base = (char *) &xcb_out; 285 xcb_parts[2].iov_len = sizeof(xcb_out); 286 xcb_parts[3].iov_base = 0; 287 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 288 xcb_parts[4].iov_base = (char *) rectangles; 289 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 290 xcb_parts[5].iov_base = 0; 291 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 292 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 293 return xcb_ret; 294 } 295 296 297 /***************************************************************************** 298 ** 299 ** xcb_void_cookie_t xcb_shape_mask_checked 300 ** 301 ** @param xcb_connection_t *c 302 ** @param xcb_shape_op_t operation 303 ** @param xcb_shape_kind_t destination_kind 304 ** @param xcb_window_t destination_window 305 ** @param int16_t x_offset 306 ** @param int16_t y_offset 307 ** @param xcb_pixmap_t source_bitmap 308 ** @returns xcb_void_cookie_t 309 ** 310 *****************************************************************************/ 311 312 xcb_void_cookie_t 313 xcb_shape_mask_checked (xcb_connection_t *c /**< */, 314 xcb_shape_op_t operation /**< */, 315 xcb_shape_kind_t destination_kind /**< */, 316 xcb_window_t destination_window /**< */, 317 int16_t x_offset /**< */, 318 int16_t y_offset /**< */, 319 xcb_pixmap_t source_bitmap /**< */) 320 { 321 static const xcb_protocol_request_t xcb_req = { 322 /* count */ 2, 323 /* ext */ &xcb_shape_id, 324 /* opcode */ XCB_SHAPE_MASK, 325 /* isvoid */ 1 326 }; 327 328 struct iovec xcb_parts[4]; 329 xcb_void_cookie_t xcb_ret; 330 xcb_shape_mask_request_t xcb_out; 331 332 xcb_out.operation = operation; 333 xcb_out.destination_kind = destination_kind; 334 memset(xcb_out.pad0, 0, 2); 335 xcb_out.destination_window = destination_window; 336 xcb_out.x_offset = x_offset; 337 xcb_out.y_offset = y_offset; 338 xcb_out.source_bitmap = source_bitmap; 339 340 xcb_parts[2].iov_base = (char *) &xcb_out; 341 xcb_parts[2].iov_len = sizeof(xcb_out); 342 xcb_parts[3].iov_base = 0; 343 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 344 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 345 return xcb_ret; 346 } 347 348 349 /***************************************************************************** 350 ** 351 ** xcb_void_cookie_t xcb_shape_mask 352 ** 353 ** @param xcb_connection_t *c 354 ** @param xcb_shape_op_t operation 355 ** @param xcb_shape_kind_t destination_kind 356 ** @param xcb_window_t destination_window 357 ** @param int16_t x_offset 358 ** @param int16_t y_offset 359 ** @param xcb_pixmap_t source_bitmap 360 ** @returns xcb_void_cookie_t 361 ** 362 *****************************************************************************/ 363 364 xcb_void_cookie_t 365 xcb_shape_mask (xcb_connection_t *c /**< */, 366 xcb_shape_op_t operation /**< */, 367 xcb_shape_kind_t destination_kind /**< */, 368 xcb_window_t destination_window /**< */, 369 int16_t x_offset /**< */, 370 int16_t y_offset /**< */, 371 xcb_pixmap_t source_bitmap /**< */) 372 { 373 static const xcb_protocol_request_t xcb_req = { 374 /* count */ 2, 375 /* ext */ &xcb_shape_id, 376 /* opcode */ XCB_SHAPE_MASK, 377 /* isvoid */ 1 378 }; 379 380 struct iovec xcb_parts[4]; 381 xcb_void_cookie_t xcb_ret; 382 xcb_shape_mask_request_t xcb_out; 383 384 xcb_out.operation = operation; 385 xcb_out.destination_kind = destination_kind; 386 memset(xcb_out.pad0, 0, 2); 387 xcb_out.destination_window = destination_window; 388 xcb_out.x_offset = x_offset; 389 xcb_out.y_offset = y_offset; 390 xcb_out.source_bitmap = source_bitmap; 391 392 xcb_parts[2].iov_base = (char *) &xcb_out; 393 xcb_parts[2].iov_len = sizeof(xcb_out); 394 xcb_parts[3].iov_base = 0; 395 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 396 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 397 return xcb_ret; 398 } 399 400 401 /***************************************************************************** 402 ** 403 ** xcb_void_cookie_t xcb_shape_combine_checked 404 ** 405 ** @param xcb_connection_t *c 406 ** @param xcb_shape_op_t operation 407 ** @param xcb_shape_kind_t destination_kind 408 ** @param xcb_shape_kind_t source_kind 409 ** @param xcb_window_t destination_window 410 ** @param int16_t x_offset 411 ** @param int16_t y_offset 412 ** @param xcb_window_t source_window 413 ** @returns xcb_void_cookie_t 414 ** 415 *****************************************************************************/ 416 417 xcb_void_cookie_t 418 xcb_shape_combine_checked (xcb_connection_t *c /**< */, 419 xcb_shape_op_t operation /**< */, 420 xcb_shape_kind_t destination_kind /**< */, 421 xcb_shape_kind_t source_kind /**< */, 422 xcb_window_t destination_window /**< */, 423 int16_t x_offset /**< */, 424 int16_t y_offset /**< */, 425 xcb_window_t source_window /**< */) 426 { 427 static const xcb_protocol_request_t xcb_req = { 428 /* count */ 2, 429 /* ext */ &xcb_shape_id, 430 /* opcode */ XCB_SHAPE_COMBINE, 431 /* isvoid */ 1 432 }; 433 434 struct iovec xcb_parts[4]; 435 xcb_void_cookie_t xcb_ret; 436 xcb_shape_combine_request_t xcb_out; 437 438 xcb_out.operation = operation; 439 xcb_out.destination_kind = destination_kind; 440 xcb_out.source_kind = source_kind; 441 xcb_out.pad0 = 0; 442 xcb_out.destination_window = destination_window; 443 xcb_out.x_offset = x_offset; 444 xcb_out.y_offset = y_offset; 445 xcb_out.source_window = source_window; 446 447 xcb_parts[2].iov_base = (char *) &xcb_out; 448 xcb_parts[2].iov_len = sizeof(xcb_out); 449 xcb_parts[3].iov_base = 0; 450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 451 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 452 return xcb_ret; 453 } 454 455 456 /***************************************************************************** 457 ** 458 ** xcb_void_cookie_t xcb_shape_combine 459 ** 460 ** @param xcb_connection_t *c 461 ** @param xcb_shape_op_t operation 462 ** @param xcb_shape_kind_t destination_kind 463 ** @param xcb_shape_kind_t source_kind 464 ** @param xcb_window_t destination_window 465 ** @param int16_t x_offset 466 ** @param int16_t y_offset 467 ** @param xcb_window_t source_window 468 ** @returns xcb_void_cookie_t 469 ** 470 *****************************************************************************/ 471 472 xcb_void_cookie_t 473 xcb_shape_combine (xcb_connection_t *c /**< */, 474 xcb_shape_op_t operation /**< */, 475 xcb_shape_kind_t destination_kind /**< */, 476 xcb_shape_kind_t source_kind /**< */, 477 xcb_window_t destination_window /**< */, 478 int16_t x_offset /**< */, 479 int16_t y_offset /**< */, 480 xcb_window_t source_window /**< */) 481 { 482 static const xcb_protocol_request_t xcb_req = { 483 /* count */ 2, 484 /* ext */ &xcb_shape_id, 485 /* opcode */ XCB_SHAPE_COMBINE, 486 /* isvoid */ 1 487 }; 488 489 struct iovec xcb_parts[4]; 490 xcb_void_cookie_t xcb_ret; 491 xcb_shape_combine_request_t xcb_out; 492 493 xcb_out.operation = operation; 494 xcb_out.destination_kind = destination_kind; 495 xcb_out.source_kind = source_kind; 496 xcb_out.pad0 = 0; 497 xcb_out.destination_window = destination_window; 498 xcb_out.x_offset = x_offset; 499 xcb_out.y_offset = y_offset; 500 xcb_out.source_window = source_window; 501 502 xcb_parts[2].iov_base = (char *) &xcb_out; 503 xcb_parts[2].iov_len = sizeof(xcb_out); 504 xcb_parts[3].iov_base = 0; 505 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 506 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 507 return xcb_ret; 508 } 509 510 511 /***************************************************************************** 512 ** 513 ** xcb_void_cookie_t xcb_shape_offset_checked 514 ** 515 ** @param xcb_connection_t *c 516 ** @param xcb_shape_kind_t destination_kind 517 ** @param xcb_window_t destination_window 518 ** @param int16_t x_offset 519 ** @param int16_t y_offset 520 ** @returns xcb_void_cookie_t 521 ** 522 *****************************************************************************/ 523 524 xcb_void_cookie_t 525 xcb_shape_offset_checked (xcb_connection_t *c /**< */, 526 xcb_shape_kind_t destination_kind /**< */, 527 xcb_window_t destination_window /**< */, 528 int16_t x_offset /**< */, 529 int16_t y_offset /**< */) 530 { 531 static const xcb_protocol_request_t xcb_req = { 532 /* count */ 2, 533 /* ext */ &xcb_shape_id, 534 /* opcode */ XCB_SHAPE_OFFSET, 535 /* isvoid */ 1 536 }; 537 538 struct iovec xcb_parts[4]; 539 xcb_void_cookie_t xcb_ret; 540 xcb_shape_offset_request_t xcb_out; 541 542 xcb_out.destination_kind = destination_kind; 543 memset(xcb_out.pad0, 0, 3); 544 xcb_out.destination_window = destination_window; 545 xcb_out.x_offset = x_offset; 546 xcb_out.y_offset = y_offset; 547 548 xcb_parts[2].iov_base = (char *) &xcb_out; 549 xcb_parts[2].iov_len = sizeof(xcb_out); 550 xcb_parts[3].iov_base = 0; 551 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 552 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 553 return xcb_ret; 554 } 555 556 557 /***************************************************************************** 558 ** 559 ** xcb_void_cookie_t xcb_shape_offset 560 ** 561 ** @param xcb_connection_t *c 562 ** @param xcb_shape_kind_t destination_kind 563 ** @param xcb_window_t destination_window 564 ** @param int16_t x_offset 565 ** @param int16_t y_offset 566 ** @returns xcb_void_cookie_t 567 ** 568 *****************************************************************************/ 569 570 xcb_void_cookie_t 571 xcb_shape_offset (xcb_connection_t *c /**< */, 572 xcb_shape_kind_t destination_kind /**< */, 573 xcb_window_t destination_window /**< */, 574 int16_t x_offset /**< */, 575 int16_t y_offset /**< */) 576 { 577 static const xcb_protocol_request_t xcb_req = { 578 /* count */ 2, 579 /* ext */ &xcb_shape_id, 580 /* opcode */ XCB_SHAPE_OFFSET, 581 /* isvoid */ 1 582 }; 583 584 struct iovec xcb_parts[4]; 585 xcb_void_cookie_t xcb_ret; 586 xcb_shape_offset_request_t xcb_out; 587 588 xcb_out.destination_kind = destination_kind; 589 memset(xcb_out.pad0, 0, 3); 590 xcb_out.destination_window = destination_window; 591 xcb_out.x_offset = x_offset; 592 xcb_out.y_offset = y_offset; 593 594 xcb_parts[2].iov_base = (char *) &xcb_out; 595 xcb_parts[2].iov_len = sizeof(xcb_out); 596 xcb_parts[3].iov_base = 0; 597 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 598 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 599 return xcb_ret; 600 } 601 602 603 /***************************************************************************** 604 ** 605 ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents 606 ** 607 ** @param xcb_connection_t *c 608 ** @param xcb_window_t destination_window 609 ** @returns xcb_shape_query_extents_cookie_t 610 ** 611 *****************************************************************************/ 612 613 xcb_shape_query_extents_cookie_t 614 xcb_shape_query_extents (xcb_connection_t *c /**< */, 615 xcb_window_t destination_window /**< */) 616 { 617 static const xcb_protocol_request_t xcb_req = { 618 /* count */ 2, 619 /* ext */ &xcb_shape_id, 620 /* opcode */ XCB_SHAPE_QUERY_EXTENTS, 621 /* isvoid */ 0 622 }; 623 624 struct iovec xcb_parts[4]; 625 xcb_shape_query_extents_cookie_t xcb_ret; 626 xcb_shape_query_extents_request_t xcb_out; 627 628 xcb_out.destination_window = destination_window; 629 630 xcb_parts[2].iov_base = (char *) &xcb_out; 631 xcb_parts[2].iov_len = sizeof(xcb_out); 632 xcb_parts[3].iov_base = 0; 633 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 634 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 635 return xcb_ret; 636 } 637 638 639 /***************************************************************************** 640 ** 641 ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked 642 ** 643 ** @param xcb_connection_t *c 644 ** @param xcb_window_t destination_window 645 ** @returns xcb_shape_query_extents_cookie_t 646 ** 647 *****************************************************************************/ 648 649 xcb_shape_query_extents_cookie_t 650 xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */, 651 xcb_window_t destination_window /**< */) 652 { 653 static const xcb_protocol_request_t xcb_req = { 654 /* count */ 2, 655 /* ext */ &xcb_shape_id, 656 /* opcode */ XCB_SHAPE_QUERY_EXTENTS, 657 /* isvoid */ 0 658 }; 659 660 struct iovec xcb_parts[4]; 661 xcb_shape_query_extents_cookie_t xcb_ret; 662 xcb_shape_query_extents_request_t xcb_out; 663 664 xcb_out.destination_window = destination_window; 665 666 xcb_parts[2].iov_base = (char *) &xcb_out; 667 xcb_parts[2].iov_len = sizeof(xcb_out); 668 xcb_parts[3].iov_base = 0; 669 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 670 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 671 return xcb_ret; 672 } 673 674 675 /***************************************************************************** 676 ** 677 ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply 678 ** 679 ** @param xcb_connection_t *c 680 ** @param xcb_shape_query_extents_cookie_t cookie 681 ** @param xcb_generic_error_t **e 682 ** @returns xcb_shape_query_extents_reply_t * 683 ** 684 *****************************************************************************/ 685 686 xcb_shape_query_extents_reply_t * 687 xcb_shape_query_extents_reply (xcb_connection_t *c /**< */, 688 xcb_shape_query_extents_cookie_t cookie /**< */, 689 xcb_generic_error_t **e /**< */) 690 { 691 return (xcb_shape_query_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 692 } 693 694 695 /***************************************************************************** 696 ** 697 ** xcb_void_cookie_t xcb_shape_select_input_checked 698 ** 699 ** @param xcb_connection_t *c 700 ** @param xcb_window_t destination_window 701 ** @param uint8_t enable 702 ** @returns xcb_void_cookie_t 703 ** 704 *****************************************************************************/ 705 706 xcb_void_cookie_t 707 xcb_shape_select_input_checked (xcb_connection_t *c /**< */, 708 xcb_window_t destination_window /**< */, 709 uint8_t enable /**< */) 710 { 711 static const xcb_protocol_request_t xcb_req = { 712 /* count */ 2, 713 /* ext */ &xcb_shape_id, 714 /* opcode */ XCB_SHAPE_SELECT_INPUT, 715 /* isvoid */ 1 716 }; 717 718 struct iovec xcb_parts[4]; 719 xcb_void_cookie_t xcb_ret; 720 xcb_shape_select_input_request_t xcb_out; 721 722 xcb_out.destination_window = destination_window; 723 xcb_out.enable = enable; 724 memset(xcb_out.pad0, 0, 3); 725 726 xcb_parts[2].iov_base = (char *) &xcb_out; 727 xcb_parts[2].iov_len = sizeof(xcb_out); 728 xcb_parts[3].iov_base = 0; 729 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 730 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 731 return xcb_ret; 732 } 733 734 735 /***************************************************************************** 736 ** 737 ** xcb_void_cookie_t xcb_shape_select_input 738 ** 739 ** @param xcb_connection_t *c 740 ** @param xcb_window_t destination_window 741 ** @param uint8_t enable 742 ** @returns xcb_void_cookie_t 743 ** 744 *****************************************************************************/ 745 746 xcb_void_cookie_t 747 xcb_shape_select_input (xcb_connection_t *c /**< */, 748 xcb_window_t destination_window /**< */, 749 uint8_t enable /**< */) 750 { 751 static const xcb_protocol_request_t xcb_req = { 752 /* count */ 2, 753 /* ext */ &xcb_shape_id, 754 /* opcode */ XCB_SHAPE_SELECT_INPUT, 755 /* isvoid */ 1 756 }; 757 758 struct iovec xcb_parts[4]; 759 xcb_void_cookie_t xcb_ret; 760 xcb_shape_select_input_request_t xcb_out; 761 762 xcb_out.destination_window = destination_window; 763 xcb_out.enable = enable; 764 memset(xcb_out.pad0, 0, 3); 765 766 xcb_parts[2].iov_base = (char *) &xcb_out; 767 xcb_parts[2].iov_len = sizeof(xcb_out); 768 xcb_parts[3].iov_base = 0; 769 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 770 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 771 return xcb_ret; 772 } 773 774 775 /***************************************************************************** 776 ** 777 ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected 778 ** 779 ** @param xcb_connection_t *c 780 ** @param xcb_window_t destination_window 781 ** @returns xcb_shape_input_selected_cookie_t 782 ** 783 *****************************************************************************/ 784 785 xcb_shape_input_selected_cookie_t 786 xcb_shape_input_selected (xcb_connection_t *c /**< */, 787 xcb_window_t destination_window /**< */) 788 { 789 static const xcb_protocol_request_t xcb_req = { 790 /* count */ 2, 791 /* ext */ &xcb_shape_id, 792 /* opcode */ XCB_SHAPE_INPUT_SELECTED, 793 /* isvoid */ 0 794 }; 795 796 struct iovec xcb_parts[4]; 797 xcb_shape_input_selected_cookie_t xcb_ret; 798 xcb_shape_input_selected_request_t xcb_out; 799 800 xcb_out.destination_window = destination_window; 801 802 xcb_parts[2].iov_base = (char *) &xcb_out; 803 xcb_parts[2].iov_len = sizeof(xcb_out); 804 xcb_parts[3].iov_base = 0; 805 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 806 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 807 return xcb_ret; 808 } 809 810 811 /***************************************************************************** 812 ** 813 ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked 814 ** 815 ** @param xcb_connection_t *c 816 ** @param xcb_window_t destination_window 817 ** @returns xcb_shape_input_selected_cookie_t 818 ** 819 *****************************************************************************/ 820 821 xcb_shape_input_selected_cookie_t 822 xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */, 823 xcb_window_t destination_window /**< */) 824 { 825 static const xcb_protocol_request_t xcb_req = { 826 /* count */ 2, 827 /* ext */ &xcb_shape_id, 828 /* opcode */ XCB_SHAPE_INPUT_SELECTED, 829 /* isvoid */ 0 830 }; 831 832 struct iovec xcb_parts[4]; 833 xcb_shape_input_selected_cookie_t xcb_ret; 834 xcb_shape_input_selected_request_t xcb_out; 835 836 xcb_out.destination_window = destination_window; 837 838 xcb_parts[2].iov_base = (char *) &xcb_out; 839 xcb_parts[2].iov_len = sizeof(xcb_out); 840 xcb_parts[3].iov_base = 0; 841 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 842 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 843 return xcb_ret; 844 } 845 846 847 /***************************************************************************** 848 ** 849 ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply 850 ** 851 ** @param xcb_connection_t *c 852 ** @param xcb_shape_input_selected_cookie_t cookie 853 ** @param xcb_generic_error_t **e 854 ** @returns xcb_shape_input_selected_reply_t * 855 ** 856 *****************************************************************************/ 857 858 xcb_shape_input_selected_reply_t * 859 xcb_shape_input_selected_reply (xcb_connection_t *c /**< */, 860 xcb_shape_input_selected_cookie_t cookie /**< */, 861 xcb_generic_error_t **e /**< */) 862 { 863 return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 864 } 865 866 867 /***************************************************************************** 868 ** 869 ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles 870 ** 871 ** @param xcb_connection_t *c 872 ** @param xcb_window_t window 873 ** @param xcb_shape_kind_t source_kind 874 ** @returns xcb_shape_get_rectangles_cookie_t 875 ** 876 *****************************************************************************/ 877 878 xcb_shape_get_rectangles_cookie_t 879 xcb_shape_get_rectangles (xcb_connection_t *c /**< */, 880 xcb_window_t window /**< */, 881 xcb_shape_kind_t source_kind /**< */) 882 { 883 static const xcb_protocol_request_t xcb_req = { 884 /* count */ 2, 885 /* ext */ &xcb_shape_id, 886 /* opcode */ XCB_SHAPE_GET_RECTANGLES, 887 /* isvoid */ 0 888 }; 889 890 struct iovec xcb_parts[4]; 891 xcb_shape_get_rectangles_cookie_t xcb_ret; 892 xcb_shape_get_rectangles_request_t xcb_out; 893 894 xcb_out.window = window; 895 xcb_out.source_kind = source_kind; 896 memset(xcb_out.pad0, 0, 3); 897 898 xcb_parts[2].iov_base = (char *) &xcb_out; 899 xcb_parts[2].iov_len = sizeof(xcb_out); 900 xcb_parts[3].iov_base = 0; 901 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 902 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 903 return xcb_ret; 904 } 905 906 907 /***************************************************************************** 908 ** 909 ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked 910 ** 911 ** @param xcb_connection_t *c 912 ** @param xcb_window_t window 913 ** @param xcb_shape_kind_t source_kind 914 ** @returns xcb_shape_get_rectangles_cookie_t 915 ** 916 *****************************************************************************/ 917 918 xcb_shape_get_rectangles_cookie_t 919 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */, 920 xcb_window_t window /**< */, 921 xcb_shape_kind_t source_kind /**< */) 922 { 923 static const xcb_protocol_request_t xcb_req = { 924 /* count */ 2, 925 /* ext */ &xcb_shape_id, 926 /* opcode */ XCB_SHAPE_GET_RECTANGLES, 927 /* isvoid */ 0 928 }; 929 930 struct iovec xcb_parts[4]; 931 xcb_shape_get_rectangles_cookie_t xcb_ret; 932 xcb_shape_get_rectangles_request_t xcb_out; 933 934 xcb_out.window = window; 935 xcb_out.source_kind = source_kind; 936 memset(xcb_out.pad0, 0, 3); 937 938 xcb_parts[2].iov_base = (char *) &xcb_out; 939 xcb_parts[2].iov_len = sizeof(xcb_out); 940 xcb_parts[3].iov_base = 0; 941 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 942 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 943 return xcb_ret; 944 } 945 946 947 /***************************************************************************** 948 ** 949 ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles 950 ** 951 ** @param const xcb_shape_get_rectangles_reply_t *R 952 ** @returns xcb_rectangle_t * 953 ** 954 *****************************************************************************/ 955 956 xcb_rectangle_t * 957 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */) 958 { 959 return (xcb_rectangle_t *) (R + 1); 960 } 961 962 963 /***************************************************************************** 964 ** 965 ** int xcb_shape_get_rectangles_rectangles_length 966 ** 967 ** @param const xcb_shape_get_rectangles_reply_t *R 968 ** @returns int 969 ** 970 *****************************************************************************/ 971 972 int 973 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */) 974 { 975 return R->rectangles_len; 976 } 977 978 979 /***************************************************************************** 980 ** 981 ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator 982 ** 983 ** @param const xcb_shape_get_rectangles_reply_t *R 984 ** @returns xcb_rectangle_iterator_t 985 ** 986 *****************************************************************************/ 987 988 xcb_rectangle_iterator_t 989 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R /**< */) 990 { 991 xcb_rectangle_iterator_t i; 992 i.data = (xcb_rectangle_t *) (R + 1); 993 i.rem = R->rectangles_len; 994 i.index = (char *) i.data - (char *) R; 995 return i; 996 } 997 998 999 /***************************************************************************** 1000 ** 1001 ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply 1002 ** 1003 ** @param xcb_connection_t *c 1004 ** @param xcb_shape_get_rectangles_cookie_t cookie 1005 ** @param xcb_generic_error_t **e 1006 ** @returns xcb_shape_get_rectangles_reply_t * 1007 ** 1008 *****************************************************************************/ 1009 1010 xcb_shape_get_rectangles_reply_t * 1011 xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */, 1012 xcb_shape_get_rectangles_cookie_t cookie /**< */, 1013 xcb_generic_error_t **e /**< */) 1014 { 1015 return (xcb_shape_get_rectangles_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1016 } 1017 1018