1 /* 2 * This file generated automatically from xfixes.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 #ifdef HAVE_CONFIG_H 7 #include "config.h" 8 #endif 9 #include <stdlib.h> 10 #include <string.h> 11 #include <assert.h> 12 #include <stddef.h> /* for offsetof() */ 13 #include "xcbext.h" 14 #include "xfixes.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 #include "render.h" 19 #include "shape.h" 20 21 xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 }; 22 23 24 /***************************************************************************** 25 ** 26 ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version 27 ** 28 ** @param xcb_connection_t *c 29 ** @param uint32_t client_major_version 30 ** @param uint32_t client_minor_version 31 ** @returns xcb_xfixes_query_version_cookie_t 32 ** 33 *****************************************************************************/ 34 35 xcb_xfixes_query_version_cookie_t 36 xcb_xfixes_query_version (xcb_connection_t *c /**< */, 37 uint32_t client_major_version /**< */, 38 uint32_t client_minor_version /**< */) 39 { 40 static const xcb_protocol_request_t xcb_req = { 41 /* count */ 2, 42 /* ext */ &xcb_xfixes_id, 43 /* opcode */ XCB_XFIXES_QUERY_VERSION, 44 /* isvoid */ 0 45 }; 46 47 struct iovec xcb_parts[4]; 48 xcb_xfixes_query_version_cookie_t xcb_ret; 49 xcb_xfixes_query_version_request_t xcb_out; 50 51 xcb_out.client_major_version = client_major_version; 52 xcb_out.client_minor_version = client_minor_version; 53 54 xcb_parts[2].iov_base = (char *) &xcb_out; 55 xcb_parts[2].iov_len = sizeof(xcb_out); 56 xcb_parts[3].iov_base = 0; 57 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 58 59 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 60 return xcb_ret; 61 } 62 63 64 /***************************************************************************** 65 ** 66 ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked 67 ** 68 ** @param xcb_connection_t *c 69 ** @param uint32_t client_major_version 70 ** @param uint32_t client_minor_version 71 ** @returns xcb_xfixes_query_version_cookie_t 72 ** 73 *****************************************************************************/ 74 75 xcb_xfixes_query_version_cookie_t 76 xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */, 77 uint32_t client_major_version /**< */, 78 uint32_t client_minor_version /**< */) 79 { 80 static const xcb_protocol_request_t xcb_req = { 81 /* count */ 2, 82 /* ext */ &xcb_xfixes_id, 83 /* opcode */ XCB_XFIXES_QUERY_VERSION, 84 /* isvoid */ 0 85 }; 86 87 struct iovec xcb_parts[4]; 88 xcb_xfixes_query_version_cookie_t xcb_ret; 89 xcb_xfixes_query_version_request_t xcb_out; 90 91 xcb_out.client_major_version = client_major_version; 92 xcb_out.client_minor_version = client_minor_version; 93 94 xcb_parts[2].iov_base = (char *) &xcb_out; 95 xcb_parts[2].iov_len = sizeof(xcb_out); 96 xcb_parts[3].iov_base = 0; 97 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 98 99 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 100 return xcb_ret; 101 } 102 103 104 /***************************************************************************** 105 ** 106 ** xcb_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply 107 ** 108 ** @param xcb_connection_t *c 109 ** @param xcb_xfixes_query_version_cookie_t cookie 110 ** @param xcb_generic_error_t **e 111 ** @returns xcb_xfixes_query_version_reply_t * 112 ** 113 *****************************************************************************/ 114 115 xcb_xfixes_query_version_reply_t * 116 xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */, 117 xcb_xfixes_query_version_cookie_t cookie /**< */, 118 xcb_generic_error_t **e /**< */) 119 { 120 return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 121 } 122 123 124 /***************************************************************************** 125 ** 126 ** xcb_void_cookie_t xcb_xfixes_change_save_set_checked 127 ** 128 ** @param xcb_connection_t *c 129 ** @param uint8_t mode 130 ** @param uint8_t target 131 ** @param uint8_t map 132 ** @param xcb_window_t window 133 ** @returns xcb_void_cookie_t 134 ** 135 *****************************************************************************/ 136 137 xcb_void_cookie_t 138 xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, 139 uint8_t mode /**< */, 140 uint8_t target /**< */, 141 uint8_t map /**< */, 142 xcb_window_t window /**< */) 143 { 144 static const xcb_protocol_request_t xcb_req = { 145 /* count */ 2, 146 /* ext */ &xcb_xfixes_id, 147 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, 148 /* isvoid */ 1 149 }; 150 151 struct iovec xcb_parts[4]; 152 xcb_void_cookie_t xcb_ret; 153 xcb_xfixes_change_save_set_request_t xcb_out; 154 155 xcb_out.mode = mode; 156 xcb_out.target = target; 157 xcb_out.map = map; 158 xcb_out.pad0 = 0; 159 xcb_out.window = window; 160 161 xcb_parts[2].iov_base = (char *) &xcb_out; 162 xcb_parts[2].iov_len = sizeof(xcb_out); 163 xcb_parts[3].iov_base = 0; 164 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 165 166 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 167 return xcb_ret; 168 } 169 170 171 /***************************************************************************** 172 ** 173 ** xcb_void_cookie_t xcb_xfixes_change_save_set 174 ** 175 ** @param xcb_connection_t *c 176 ** @param uint8_t mode 177 ** @param uint8_t target 178 ** @param uint8_t map 179 ** @param xcb_window_t window 180 ** @returns xcb_void_cookie_t 181 ** 182 *****************************************************************************/ 183 184 xcb_void_cookie_t 185 xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, 186 uint8_t mode /**< */, 187 uint8_t target /**< */, 188 uint8_t map /**< */, 189 xcb_window_t window /**< */) 190 { 191 static const xcb_protocol_request_t xcb_req = { 192 /* count */ 2, 193 /* ext */ &xcb_xfixes_id, 194 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, 195 /* isvoid */ 1 196 }; 197 198 struct iovec xcb_parts[4]; 199 xcb_void_cookie_t xcb_ret; 200 xcb_xfixes_change_save_set_request_t xcb_out; 201 202 xcb_out.mode = mode; 203 xcb_out.target = target; 204 xcb_out.map = map; 205 xcb_out.pad0 = 0; 206 xcb_out.window = window; 207 208 xcb_parts[2].iov_base = (char *) &xcb_out; 209 xcb_parts[2].iov_len = sizeof(xcb_out); 210 xcb_parts[3].iov_base = 0; 211 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 212 213 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 214 return xcb_ret; 215 } 216 217 218 /***************************************************************************** 219 ** 220 ** xcb_void_cookie_t xcb_xfixes_select_selection_input_checked 221 ** 222 ** @param xcb_connection_t *c 223 ** @param xcb_window_t window 224 ** @param xcb_atom_t selection 225 ** @param uint32_t event_mask 226 ** @returns xcb_void_cookie_t 227 ** 228 *****************************************************************************/ 229 230 xcb_void_cookie_t 231 xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, 232 xcb_window_t window /**< */, 233 xcb_atom_t selection /**< */, 234 uint32_t event_mask /**< */) 235 { 236 static const xcb_protocol_request_t xcb_req = { 237 /* count */ 2, 238 /* ext */ &xcb_xfixes_id, 239 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, 240 /* isvoid */ 1 241 }; 242 243 struct iovec xcb_parts[4]; 244 xcb_void_cookie_t xcb_ret; 245 xcb_xfixes_select_selection_input_request_t xcb_out; 246 247 xcb_out.window = window; 248 xcb_out.selection = selection; 249 xcb_out.event_mask = event_mask; 250 251 xcb_parts[2].iov_base = (char *) &xcb_out; 252 xcb_parts[2].iov_len = sizeof(xcb_out); 253 xcb_parts[3].iov_base = 0; 254 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 255 256 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 257 return xcb_ret; 258 } 259 260 261 /***************************************************************************** 262 ** 263 ** xcb_void_cookie_t xcb_xfixes_select_selection_input 264 ** 265 ** @param xcb_connection_t *c 266 ** @param xcb_window_t window 267 ** @param xcb_atom_t selection 268 ** @param uint32_t event_mask 269 ** @returns xcb_void_cookie_t 270 ** 271 *****************************************************************************/ 272 273 xcb_void_cookie_t 274 xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, 275 xcb_window_t window /**< */, 276 xcb_atom_t selection /**< */, 277 uint32_t event_mask /**< */) 278 { 279 static const xcb_protocol_request_t xcb_req = { 280 /* count */ 2, 281 /* ext */ &xcb_xfixes_id, 282 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, 283 /* isvoid */ 1 284 }; 285 286 struct iovec xcb_parts[4]; 287 xcb_void_cookie_t xcb_ret; 288 xcb_xfixes_select_selection_input_request_t xcb_out; 289 290 xcb_out.window = window; 291 xcb_out.selection = selection; 292 xcb_out.event_mask = event_mask; 293 294 xcb_parts[2].iov_base = (char *) &xcb_out; 295 xcb_parts[2].iov_len = sizeof(xcb_out); 296 xcb_parts[3].iov_base = 0; 297 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 298 299 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 300 return xcb_ret; 301 } 302 303 304 /***************************************************************************** 305 ** 306 ** xcb_void_cookie_t xcb_xfixes_select_cursor_input_checked 307 ** 308 ** @param xcb_connection_t *c 309 ** @param xcb_window_t window 310 ** @param uint32_t event_mask 311 ** @returns xcb_void_cookie_t 312 ** 313 *****************************************************************************/ 314 315 xcb_void_cookie_t 316 xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, 317 xcb_window_t window /**< */, 318 uint32_t event_mask /**< */) 319 { 320 static const xcb_protocol_request_t xcb_req = { 321 /* count */ 2, 322 /* ext */ &xcb_xfixes_id, 323 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, 324 /* isvoid */ 1 325 }; 326 327 struct iovec xcb_parts[4]; 328 xcb_void_cookie_t xcb_ret; 329 xcb_xfixes_select_cursor_input_request_t xcb_out; 330 331 xcb_out.window = window; 332 xcb_out.event_mask = event_mask; 333 334 xcb_parts[2].iov_base = (char *) &xcb_out; 335 xcb_parts[2].iov_len = sizeof(xcb_out); 336 xcb_parts[3].iov_base = 0; 337 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 338 339 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 340 return xcb_ret; 341 } 342 343 344 /***************************************************************************** 345 ** 346 ** xcb_void_cookie_t xcb_xfixes_select_cursor_input 347 ** 348 ** @param xcb_connection_t *c 349 ** @param xcb_window_t window 350 ** @param uint32_t event_mask 351 ** @returns xcb_void_cookie_t 352 ** 353 *****************************************************************************/ 354 355 xcb_void_cookie_t 356 xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, 357 xcb_window_t window /**< */, 358 uint32_t event_mask /**< */) 359 { 360 static const xcb_protocol_request_t xcb_req = { 361 /* count */ 2, 362 /* ext */ &xcb_xfixes_id, 363 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, 364 /* isvoid */ 1 365 }; 366 367 struct iovec xcb_parts[4]; 368 xcb_void_cookie_t xcb_ret; 369 xcb_xfixes_select_cursor_input_request_t xcb_out; 370 371 xcb_out.window = window; 372 xcb_out.event_mask = event_mask; 373 374 xcb_parts[2].iov_base = (char *) &xcb_out; 375 xcb_parts[2].iov_len = sizeof(xcb_out); 376 xcb_parts[3].iov_base = 0; 377 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 378 379 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 380 return xcb_ret; 381 } 382 383 int 384 xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */) 385 { 386 char *xcb_tmp = (char *)_buffer; 387 const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer; 388 unsigned int xcb_buffer_len = 0; 389 unsigned int xcb_block_len = 0; 390 unsigned int xcb_pad = 0; 391 unsigned int xcb_align_to = 0; 392 393 394 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t); 395 xcb_tmp += xcb_block_len; 396 xcb_buffer_len += xcb_block_len; 397 xcb_block_len = 0; 398 /* cursor_image */ 399 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); 400 xcb_tmp += xcb_block_len; 401 xcb_align_to = ALIGNOF(uint32_t); 402 /* insert padding */ 403 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 404 xcb_buffer_len += xcb_block_len + xcb_pad; 405 if (0 != xcb_pad) { 406 xcb_tmp += xcb_pad; 407 xcb_pad = 0; 408 } 409 xcb_block_len = 0; 410 411 return xcb_buffer_len; 412 } 413 414 415 /***************************************************************************** 416 ** 417 ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image 418 ** 419 ** @param xcb_connection_t *c 420 ** @returns xcb_xfixes_get_cursor_image_cookie_t 421 ** 422 *****************************************************************************/ 423 424 xcb_xfixes_get_cursor_image_cookie_t 425 xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */) 426 { 427 static const xcb_protocol_request_t xcb_req = { 428 /* count */ 2, 429 /* ext */ &xcb_xfixes_id, 430 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, 431 /* isvoid */ 0 432 }; 433 434 struct iovec xcb_parts[4]; 435 xcb_xfixes_get_cursor_image_cookie_t xcb_ret; 436 xcb_xfixes_get_cursor_image_request_t xcb_out; 437 438 439 xcb_parts[2].iov_base = (char *) &xcb_out; 440 xcb_parts[2].iov_len = sizeof(xcb_out); 441 xcb_parts[3].iov_base = 0; 442 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 443 444 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 445 return xcb_ret; 446 } 447 448 449 /***************************************************************************** 450 ** 451 ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked 452 ** 453 ** @param xcb_connection_t *c 454 ** @returns xcb_xfixes_get_cursor_image_cookie_t 455 ** 456 *****************************************************************************/ 457 458 xcb_xfixes_get_cursor_image_cookie_t 459 xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */) 460 { 461 static const xcb_protocol_request_t xcb_req = { 462 /* count */ 2, 463 /* ext */ &xcb_xfixes_id, 464 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, 465 /* isvoid */ 0 466 }; 467 468 struct iovec xcb_parts[4]; 469 xcb_xfixes_get_cursor_image_cookie_t xcb_ret; 470 xcb_xfixes_get_cursor_image_request_t xcb_out; 471 472 473 xcb_parts[2].iov_base = (char *) &xcb_out; 474 xcb_parts[2].iov_len = sizeof(xcb_out); 475 xcb_parts[3].iov_base = 0; 476 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 477 478 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 479 return xcb_ret; 480 } 481 482 483 /***************************************************************************** 484 ** 485 ** uint32_t * xcb_xfixes_get_cursor_image_cursor_image 486 ** 487 ** @param const xcb_xfixes_get_cursor_image_reply_t *R 488 ** @returns uint32_t * 489 ** 490 *****************************************************************************/ 491 492 uint32_t * 493 xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 494 { 495 return (uint32_t *) (R + 1); 496 } 497 498 499 /***************************************************************************** 500 ** 501 ** int xcb_xfixes_get_cursor_image_cursor_image_length 502 ** 503 ** @param const xcb_xfixes_get_cursor_image_reply_t *R 504 ** @returns int 505 ** 506 *****************************************************************************/ 507 508 int 509 xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 510 { 511 return (R->width * R->height); 512 } 513 514 515 /***************************************************************************** 516 ** 517 ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end 518 ** 519 ** @param const xcb_xfixes_get_cursor_image_reply_t *R 520 ** @returns xcb_generic_iterator_t 521 ** 522 *****************************************************************************/ 523 524 xcb_generic_iterator_t 525 xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 526 { 527 xcb_generic_iterator_t i; 528 i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height)); 529 i.rem = 0; 530 i.index = (char *) i.data - (char *) R; 531 return i; 532 } 533 534 535 /***************************************************************************** 536 ** 537 ** xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply 538 ** 539 ** @param xcb_connection_t *c 540 ** @param xcb_xfixes_get_cursor_image_cookie_t cookie 541 ** @param xcb_generic_error_t **e 542 ** @returns xcb_xfixes_get_cursor_image_reply_t * 543 ** 544 *****************************************************************************/ 545 546 xcb_xfixes_get_cursor_image_reply_t * 547 xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */, 548 xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, 549 xcb_generic_error_t **e /**< */) 550 { 551 return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 552 } 553 554 555 /***************************************************************************** 556 ** 557 ** void xcb_xfixes_region_next 558 ** 559 ** @param xcb_xfixes_region_iterator_t *i 560 ** @returns void 561 ** 562 *****************************************************************************/ 563 564 void 565 xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */) 566 { 567 --i->rem; 568 ++i->data; 569 i->index += sizeof(xcb_xfixes_region_t); 570 } 571 572 573 /***************************************************************************** 574 ** 575 ** xcb_generic_iterator_t xcb_xfixes_region_end 576 ** 577 ** @param xcb_xfixes_region_iterator_t i 578 ** @returns xcb_generic_iterator_t 579 ** 580 *****************************************************************************/ 581 582 xcb_generic_iterator_t 583 xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */) 584 { 585 xcb_generic_iterator_t ret; 586 ret.data = i.data + i.rem; 587 ret.index = i.index + ((char *) ret.data - (char *) i.data); 588 ret.rem = 0; 589 return ret; 590 } 591 592 int 593 xcb_xfixes_create_region_sizeof (const void *_buffer /**< */, 594 uint32_t rectangles_len /**< */) 595 { 596 char *xcb_tmp = (char *)_buffer; 597 unsigned int xcb_buffer_len = 0; 598 unsigned int xcb_block_len = 0; 599 unsigned int xcb_pad = 0; 600 unsigned int xcb_align_to = 0; 601 602 603 xcb_block_len += sizeof(xcb_xfixes_create_region_request_t); 604 xcb_tmp += xcb_block_len; 605 xcb_buffer_len += xcb_block_len; 606 xcb_block_len = 0; 607 /* rectangles */ 608 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); 609 xcb_tmp += xcb_block_len; 610 xcb_align_to = ALIGNOF(xcb_rectangle_t); 611 /* insert padding */ 612 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 613 xcb_buffer_len += xcb_block_len + xcb_pad; 614 if (0 != xcb_pad) { 615 xcb_tmp += xcb_pad; 616 xcb_pad = 0; 617 } 618 xcb_block_len = 0; 619 620 return xcb_buffer_len; 621 } 622 623 624 /***************************************************************************** 625 ** 626 ** xcb_void_cookie_t xcb_xfixes_create_region_checked 627 ** 628 ** @param xcb_connection_t *c 629 ** @param xcb_xfixes_region_t region 630 ** @param uint32_t rectangles_len 631 ** @param const xcb_rectangle_t *rectangles 632 ** @returns xcb_void_cookie_t 633 ** 634 *****************************************************************************/ 635 636 xcb_void_cookie_t 637 xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, 638 xcb_xfixes_region_t region /**< */, 639 uint32_t rectangles_len /**< */, 640 const xcb_rectangle_t *rectangles /**< */) 641 { 642 static const xcb_protocol_request_t xcb_req = { 643 /* count */ 4, 644 /* ext */ &xcb_xfixes_id, 645 /* opcode */ XCB_XFIXES_CREATE_REGION, 646 /* isvoid */ 1 647 }; 648 649 struct iovec xcb_parts[6]; 650 xcb_void_cookie_t xcb_ret; 651 xcb_xfixes_create_region_request_t xcb_out; 652 653 xcb_out.region = region; 654 655 xcb_parts[2].iov_base = (char *) &xcb_out; 656 xcb_parts[2].iov_len = sizeof(xcb_out); 657 xcb_parts[3].iov_base = 0; 658 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 659 /* xcb_rectangle_t rectangles */ 660 xcb_parts[4].iov_base = (char *) rectangles; 661 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 662 xcb_parts[5].iov_base = 0; 663 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 664 665 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 666 return xcb_ret; 667 } 668 669 670 /***************************************************************************** 671 ** 672 ** xcb_void_cookie_t xcb_xfixes_create_region 673 ** 674 ** @param xcb_connection_t *c 675 ** @param xcb_xfixes_region_t region 676 ** @param uint32_t rectangles_len 677 ** @param const xcb_rectangle_t *rectangles 678 ** @returns xcb_void_cookie_t 679 ** 680 *****************************************************************************/ 681 682 xcb_void_cookie_t 683 xcb_xfixes_create_region (xcb_connection_t *c /**< */, 684 xcb_xfixes_region_t region /**< */, 685 uint32_t rectangles_len /**< */, 686 const xcb_rectangle_t *rectangles /**< */) 687 { 688 static const xcb_protocol_request_t xcb_req = { 689 /* count */ 4, 690 /* ext */ &xcb_xfixes_id, 691 /* opcode */ XCB_XFIXES_CREATE_REGION, 692 /* isvoid */ 1 693 }; 694 695 struct iovec xcb_parts[6]; 696 xcb_void_cookie_t xcb_ret; 697 xcb_xfixes_create_region_request_t xcb_out; 698 699 xcb_out.region = region; 700 701 xcb_parts[2].iov_base = (char *) &xcb_out; 702 xcb_parts[2].iov_len = sizeof(xcb_out); 703 xcb_parts[3].iov_base = 0; 704 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 705 /* xcb_rectangle_t rectangles */ 706 xcb_parts[4].iov_base = (char *) rectangles; 707 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 708 xcb_parts[5].iov_base = 0; 709 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 710 711 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 712 return xcb_ret; 713 } 714 715 716 /***************************************************************************** 717 ** 718 ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap_checked 719 ** 720 ** @param xcb_connection_t *c 721 ** @param xcb_xfixes_region_t region 722 ** @param xcb_pixmap_t bitmap 723 ** @returns xcb_void_cookie_t 724 ** 725 *****************************************************************************/ 726 727 xcb_void_cookie_t 728 xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, 729 xcb_xfixes_region_t region /**< */, 730 xcb_pixmap_t bitmap /**< */) 731 { 732 static const xcb_protocol_request_t xcb_req = { 733 /* count */ 2, 734 /* ext */ &xcb_xfixes_id, 735 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, 736 /* isvoid */ 1 737 }; 738 739 struct iovec xcb_parts[4]; 740 xcb_void_cookie_t xcb_ret; 741 xcb_xfixes_create_region_from_bitmap_request_t xcb_out; 742 743 xcb_out.region = region; 744 xcb_out.bitmap = bitmap; 745 746 xcb_parts[2].iov_base = (char *) &xcb_out; 747 xcb_parts[2].iov_len = sizeof(xcb_out); 748 xcb_parts[3].iov_base = 0; 749 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 750 751 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 752 return xcb_ret; 753 } 754 755 756 /***************************************************************************** 757 ** 758 ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap 759 ** 760 ** @param xcb_connection_t *c 761 ** @param xcb_xfixes_region_t region 762 ** @param xcb_pixmap_t bitmap 763 ** @returns xcb_void_cookie_t 764 ** 765 *****************************************************************************/ 766 767 xcb_void_cookie_t 768 xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, 769 xcb_xfixes_region_t region /**< */, 770 xcb_pixmap_t bitmap /**< */) 771 { 772 static const xcb_protocol_request_t xcb_req = { 773 /* count */ 2, 774 /* ext */ &xcb_xfixes_id, 775 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, 776 /* isvoid */ 1 777 }; 778 779 struct iovec xcb_parts[4]; 780 xcb_void_cookie_t xcb_ret; 781 xcb_xfixes_create_region_from_bitmap_request_t xcb_out; 782 783 xcb_out.region = region; 784 xcb_out.bitmap = bitmap; 785 786 xcb_parts[2].iov_base = (char *) &xcb_out; 787 xcb_parts[2].iov_len = sizeof(xcb_out); 788 xcb_parts[3].iov_base = 0; 789 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 790 791 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 792 return xcb_ret; 793 } 794 795 796 /***************************************************************************** 797 ** 798 ** xcb_void_cookie_t xcb_xfixes_create_region_from_window_checked 799 ** 800 ** @param xcb_connection_t *c 801 ** @param xcb_xfixes_region_t region 802 ** @param xcb_window_t window 803 ** @param xcb_shape_kind_t kind 804 ** @returns xcb_void_cookie_t 805 ** 806 *****************************************************************************/ 807 808 xcb_void_cookie_t 809 xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, 810 xcb_xfixes_region_t region /**< */, 811 xcb_window_t window /**< */, 812 xcb_shape_kind_t kind /**< */) 813 { 814 static const xcb_protocol_request_t xcb_req = { 815 /* count */ 2, 816 /* ext */ &xcb_xfixes_id, 817 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, 818 /* isvoid */ 1 819 }; 820 821 struct iovec xcb_parts[4]; 822 xcb_void_cookie_t xcb_ret; 823 xcb_xfixes_create_region_from_window_request_t xcb_out; 824 825 xcb_out.region = region; 826 xcb_out.window = window; 827 xcb_out.kind = kind; 828 memset(xcb_out.pad0, 0, 3); 829 830 xcb_parts[2].iov_base = (char *) &xcb_out; 831 xcb_parts[2].iov_len = sizeof(xcb_out); 832 xcb_parts[3].iov_base = 0; 833 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 834 835 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 836 return xcb_ret; 837 } 838 839 840 /***************************************************************************** 841 ** 842 ** xcb_void_cookie_t xcb_xfixes_create_region_from_window 843 ** 844 ** @param xcb_connection_t *c 845 ** @param xcb_xfixes_region_t region 846 ** @param xcb_window_t window 847 ** @param xcb_shape_kind_t kind 848 ** @returns xcb_void_cookie_t 849 ** 850 *****************************************************************************/ 851 852 xcb_void_cookie_t 853 xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, 854 xcb_xfixes_region_t region /**< */, 855 xcb_window_t window /**< */, 856 xcb_shape_kind_t kind /**< */) 857 { 858 static const xcb_protocol_request_t xcb_req = { 859 /* count */ 2, 860 /* ext */ &xcb_xfixes_id, 861 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, 862 /* isvoid */ 1 863 }; 864 865 struct iovec xcb_parts[4]; 866 xcb_void_cookie_t xcb_ret; 867 xcb_xfixes_create_region_from_window_request_t xcb_out; 868 869 xcb_out.region = region; 870 xcb_out.window = window; 871 xcb_out.kind = kind; 872 memset(xcb_out.pad0, 0, 3); 873 874 xcb_parts[2].iov_base = (char *) &xcb_out; 875 xcb_parts[2].iov_len = sizeof(xcb_out); 876 xcb_parts[3].iov_base = 0; 877 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 878 879 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 880 return xcb_ret; 881 } 882 883 884 /***************************************************************************** 885 ** 886 ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc_checked 887 ** 888 ** @param xcb_connection_t *c 889 ** @param xcb_xfixes_region_t region 890 ** @param xcb_gcontext_t gc 891 ** @returns xcb_void_cookie_t 892 ** 893 *****************************************************************************/ 894 895 xcb_void_cookie_t 896 xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, 897 xcb_xfixes_region_t region /**< */, 898 xcb_gcontext_t gc /**< */) 899 { 900 static const xcb_protocol_request_t xcb_req = { 901 /* count */ 2, 902 /* ext */ &xcb_xfixes_id, 903 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, 904 /* isvoid */ 1 905 }; 906 907 struct iovec xcb_parts[4]; 908 xcb_void_cookie_t xcb_ret; 909 xcb_xfixes_create_region_from_gc_request_t xcb_out; 910 911 xcb_out.region = region; 912 xcb_out.gc = gc; 913 914 xcb_parts[2].iov_base = (char *) &xcb_out; 915 xcb_parts[2].iov_len = sizeof(xcb_out); 916 xcb_parts[3].iov_base = 0; 917 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 918 919 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 920 return xcb_ret; 921 } 922 923 924 /***************************************************************************** 925 ** 926 ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc 927 ** 928 ** @param xcb_connection_t *c 929 ** @param xcb_xfixes_region_t region 930 ** @param xcb_gcontext_t gc 931 ** @returns xcb_void_cookie_t 932 ** 933 *****************************************************************************/ 934 935 xcb_void_cookie_t 936 xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, 937 xcb_xfixes_region_t region /**< */, 938 xcb_gcontext_t gc /**< */) 939 { 940 static const xcb_protocol_request_t xcb_req = { 941 /* count */ 2, 942 /* ext */ &xcb_xfixes_id, 943 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, 944 /* isvoid */ 1 945 }; 946 947 struct iovec xcb_parts[4]; 948 xcb_void_cookie_t xcb_ret; 949 xcb_xfixes_create_region_from_gc_request_t xcb_out; 950 951 xcb_out.region = region; 952 xcb_out.gc = gc; 953 954 xcb_parts[2].iov_base = (char *) &xcb_out; 955 xcb_parts[2].iov_len = sizeof(xcb_out); 956 xcb_parts[3].iov_base = 0; 957 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 958 959 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 960 return xcb_ret; 961 } 962 963 964 /***************************************************************************** 965 ** 966 ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture_checked 967 ** 968 ** @param xcb_connection_t *c 969 ** @param xcb_xfixes_region_t region 970 ** @param xcb_render_picture_t picture 971 ** @returns xcb_void_cookie_t 972 ** 973 *****************************************************************************/ 974 975 xcb_void_cookie_t 976 xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, 977 xcb_xfixes_region_t region /**< */, 978 xcb_render_picture_t picture /**< */) 979 { 980 static const xcb_protocol_request_t xcb_req = { 981 /* count */ 2, 982 /* ext */ &xcb_xfixes_id, 983 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, 984 /* isvoid */ 1 985 }; 986 987 struct iovec xcb_parts[4]; 988 xcb_void_cookie_t xcb_ret; 989 xcb_xfixes_create_region_from_picture_request_t xcb_out; 990 991 xcb_out.region = region; 992 xcb_out.picture = picture; 993 994 xcb_parts[2].iov_base = (char *) &xcb_out; 995 xcb_parts[2].iov_len = sizeof(xcb_out); 996 xcb_parts[3].iov_base = 0; 997 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 998 999 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1000 return xcb_ret; 1001 } 1002 1003 1004 /***************************************************************************** 1005 ** 1006 ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture 1007 ** 1008 ** @param xcb_connection_t *c 1009 ** @param xcb_xfixes_region_t region 1010 ** @param xcb_render_picture_t picture 1011 ** @returns xcb_void_cookie_t 1012 ** 1013 *****************************************************************************/ 1014 1015 xcb_void_cookie_t 1016 xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, 1017 xcb_xfixes_region_t region /**< */, 1018 xcb_render_picture_t picture /**< */) 1019 { 1020 static const xcb_protocol_request_t xcb_req = { 1021 /* count */ 2, 1022 /* ext */ &xcb_xfixes_id, 1023 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, 1024 /* isvoid */ 1 1025 }; 1026 1027 struct iovec xcb_parts[4]; 1028 xcb_void_cookie_t xcb_ret; 1029 xcb_xfixes_create_region_from_picture_request_t xcb_out; 1030 1031 xcb_out.region = region; 1032 xcb_out.picture = picture; 1033 1034 xcb_parts[2].iov_base = (char *) &xcb_out; 1035 xcb_parts[2].iov_len = sizeof(xcb_out); 1036 xcb_parts[3].iov_base = 0; 1037 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1038 1039 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1040 return xcb_ret; 1041 } 1042 1043 1044 /***************************************************************************** 1045 ** 1046 ** xcb_void_cookie_t xcb_xfixes_destroy_region_checked 1047 ** 1048 ** @param xcb_connection_t *c 1049 ** @param xcb_xfixes_region_t region 1050 ** @returns xcb_void_cookie_t 1051 ** 1052 *****************************************************************************/ 1053 1054 xcb_void_cookie_t 1055 xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */, 1056 xcb_xfixes_region_t region /**< */) 1057 { 1058 static const xcb_protocol_request_t xcb_req = { 1059 /* count */ 2, 1060 /* ext */ &xcb_xfixes_id, 1061 /* opcode */ XCB_XFIXES_DESTROY_REGION, 1062 /* isvoid */ 1 1063 }; 1064 1065 struct iovec xcb_parts[4]; 1066 xcb_void_cookie_t xcb_ret; 1067 xcb_xfixes_destroy_region_request_t xcb_out; 1068 1069 xcb_out.region = region; 1070 1071 xcb_parts[2].iov_base = (char *) &xcb_out; 1072 xcb_parts[2].iov_len = sizeof(xcb_out); 1073 xcb_parts[3].iov_base = 0; 1074 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1075 1076 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1077 return xcb_ret; 1078 } 1079 1080 1081 /***************************************************************************** 1082 ** 1083 ** xcb_void_cookie_t xcb_xfixes_destroy_region 1084 ** 1085 ** @param xcb_connection_t *c 1086 ** @param xcb_xfixes_region_t region 1087 ** @returns xcb_void_cookie_t 1088 ** 1089 *****************************************************************************/ 1090 1091 xcb_void_cookie_t 1092 xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, 1093 xcb_xfixes_region_t region /**< */) 1094 { 1095 static const xcb_protocol_request_t xcb_req = { 1096 /* count */ 2, 1097 /* ext */ &xcb_xfixes_id, 1098 /* opcode */ XCB_XFIXES_DESTROY_REGION, 1099 /* isvoid */ 1 1100 }; 1101 1102 struct iovec xcb_parts[4]; 1103 xcb_void_cookie_t xcb_ret; 1104 xcb_xfixes_destroy_region_request_t xcb_out; 1105 1106 xcb_out.region = region; 1107 1108 xcb_parts[2].iov_base = (char *) &xcb_out; 1109 xcb_parts[2].iov_len = sizeof(xcb_out); 1110 xcb_parts[3].iov_base = 0; 1111 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1112 1113 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1114 return xcb_ret; 1115 } 1116 1117 int 1118 xcb_xfixes_set_region_sizeof (const void *_buffer /**< */, 1119 uint32_t rectangles_len /**< */) 1120 { 1121 char *xcb_tmp = (char *)_buffer; 1122 unsigned int xcb_buffer_len = 0; 1123 unsigned int xcb_block_len = 0; 1124 unsigned int xcb_pad = 0; 1125 unsigned int xcb_align_to = 0; 1126 1127 1128 xcb_block_len += sizeof(xcb_xfixes_set_region_request_t); 1129 xcb_tmp += xcb_block_len; 1130 xcb_buffer_len += xcb_block_len; 1131 xcb_block_len = 0; 1132 /* rectangles */ 1133 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); 1134 xcb_tmp += xcb_block_len; 1135 xcb_align_to = ALIGNOF(xcb_rectangle_t); 1136 /* insert padding */ 1137 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1138 xcb_buffer_len += xcb_block_len + xcb_pad; 1139 if (0 != xcb_pad) { 1140 xcb_tmp += xcb_pad; 1141 xcb_pad = 0; 1142 } 1143 xcb_block_len = 0; 1144 1145 return xcb_buffer_len; 1146 } 1147 1148 1149 /***************************************************************************** 1150 ** 1151 ** xcb_void_cookie_t xcb_xfixes_set_region_checked 1152 ** 1153 ** @param xcb_connection_t *c 1154 ** @param xcb_xfixes_region_t region 1155 ** @param uint32_t rectangles_len 1156 ** @param const xcb_rectangle_t *rectangles 1157 ** @returns xcb_void_cookie_t 1158 ** 1159 *****************************************************************************/ 1160 1161 xcb_void_cookie_t 1162 xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, 1163 xcb_xfixes_region_t region /**< */, 1164 uint32_t rectangles_len /**< */, 1165 const xcb_rectangle_t *rectangles /**< */) 1166 { 1167 static const xcb_protocol_request_t xcb_req = { 1168 /* count */ 4, 1169 /* ext */ &xcb_xfixes_id, 1170 /* opcode */ XCB_XFIXES_SET_REGION, 1171 /* isvoid */ 1 1172 }; 1173 1174 struct iovec xcb_parts[6]; 1175 xcb_void_cookie_t xcb_ret; 1176 xcb_xfixes_set_region_request_t xcb_out; 1177 1178 xcb_out.region = region; 1179 1180 xcb_parts[2].iov_base = (char *) &xcb_out; 1181 xcb_parts[2].iov_len = sizeof(xcb_out); 1182 xcb_parts[3].iov_base = 0; 1183 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1184 /* xcb_rectangle_t rectangles */ 1185 xcb_parts[4].iov_base = (char *) rectangles; 1186 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 1187 xcb_parts[5].iov_base = 0; 1188 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1189 1190 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1191 return xcb_ret; 1192 } 1193 1194 1195 /***************************************************************************** 1196 ** 1197 ** xcb_void_cookie_t xcb_xfixes_set_region 1198 ** 1199 ** @param xcb_connection_t *c 1200 ** @param xcb_xfixes_region_t region 1201 ** @param uint32_t rectangles_len 1202 ** @param const xcb_rectangle_t *rectangles 1203 ** @returns xcb_void_cookie_t 1204 ** 1205 *****************************************************************************/ 1206 1207 xcb_void_cookie_t 1208 xcb_xfixes_set_region (xcb_connection_t *c /**< */, 1209 xcb_xfixes_region_t region /**< */, 1210 uint32_t rectangles_len /**< */, 1211 const xcb_rectangle_t *rectangles /**< */) 1212 { 1213 static const xcb_protocol_request_t xcb_req = { 1214 /* count */ 4, 1215 /* ext */ &xcb_xfixes_id, 1216 /* opcode */ XCB_XFIXES_SET_REGION, 1217 /* isvoid */ 1 1218 }; 1219 1220 struct iovec xcb_parts[6]; 1221 xcb_void_cookie_t xcb_ret; 1222 xcb_xfixes_set_region_request_t xcb_out; 1223 1224 xcb_out.region = region; 1225 1226 xcb_parts[2].iov_base = (char *) &xcb_out; 1227 xcb_parts[2].iov_len = sizeof(xcb_out); 1228 xcb_parts[3].iov_base = 0; 1229 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1230 /* xcb_rectangle_t rectangles */ 1231 xcb_parts[4].iov_base = (char *) rectangles; 1232 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 1233 xcb_parts[5].iov_base = 0; 1234 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1235 1236 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1237 return xcb_ret; 1238 } 1239 1240 1241 /***************************************************************************** 1242 ** 1243 ** xcb_void_cookie_t xcb_xfixes_copy_region_checked 1244 ** 1245 ** @param xcb_connection_t *c 1246 ** @param xcb_xfixes_region_t source 1247 ** @param xcb_xfixes_region_t destination 1248 ** @returns xcb_void_cookie_t 1249 ** 1250 *****************************************************************************/ 1251 1252 xcb_void_cookie_t 1253 xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, 1254 xcb_xfixes_region_t source /**< */, 1255 xcb_xfixes_region_t destination /**< */) 1256 { 1257 static const xcb_protocol_request_t xcb_req = { 1258 /* count */ 2, 1259 /* ext */ &xcb_xfixes_id, 1260 /* opcode */ XCB_XFIXES_COPY_REGION, 1261 /* isvoid */ 1 1262 }; 1263 1264 struct iovec xcb_parts[4]; 1265 xcb_void_cookie_t xcb_ret; 1266 xcb_xfixes_copy_region_request_t xcb_out; 1267 1268 xcb_out.source = source; 1269 xcb_out.destination = destination; 1270 1271 xcb_parts[2].iov_base = (char *) &xcb_out; 1272 xcb_parts[2].iov_len = sizeof(xcb_out); 1273 xcb_parts[3].iov_base = 0; 1274 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1275 1276 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1277 return xcb_ret; 1278 } 1279 1280 1281 /***************************************************************************** 1282 ** 1283 ** xcb_void_cookie_t xcb_xfixes_copy_region 1284 ** 1285 ** @param xcb_connection_t *c 1286 ** @param xcb_xfixes_region_t source 1287 ** @param xcb_xfixes_region_t destination 1288 ** @returns xcb_void_cookie_t 1289 ** 1290 *****************************************************************************/ 1291 1292 xcb_void_cookie_t 1293 xcb_xfixes_copy_region (xcb_connection_t *c /**< */, 1294 xcb_xfixes_region_t source /**< */, 1295 xcb_xfixes_region_t destination /**< */) 1296 { 1297 static const xcb_protocol_request_t xcb_req = { 1298 /* count */ 2, 1299 /* ext */ &xcb_xfixes_id, 1300 /* opcode */ XCB_XFIXES_COPY_REGION, 1301 /* isvoid */ 1 1302 }; 1303 1304 struct iovec xcb_parts[4]; 1305 xcb_void_cookie_t xcb_ret; 1306 xcb_xfixes_copy_region_request_t xcb_out; 1307 1308 xcb_out.source = source; 1309 xcb_out.destination = destination; 1310 1311 xcb_parts[2].iov_base = (char *) &xcb_out; 1312 xcb_parts[2].iov_len = sizeof(xcb_out); 1313 xcb_parts[3].iov_base = 0; 1314 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1315 1316 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1317 return xcb_ret; 1318 } 1319 1320 1321 /***************************************************************************** 1322 ** 1323 ** xcb_void_cookie_t xcb_xfixes_union_region_checked 1324 ** 1325 ** @param xcb_connection_t *c 1326 ** @param xcb_xfixes_region_t source1 1327 ** @param xcb_xfixes_region_t source2 1328 ** @param xcb_xfixes_region_t destination 1329 ** @returns xcb_void_cookie_t 1330 ** 1331 *****************************************************************************/ 1332 1333 xcb_void_cookie_t 1334 xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, 1335 xcb_xfixes_region_t source1 /**< */, 1336 xcb_xfixes_region_t source2 /**< */, 1337 xcb_xfixes_region_t destination /**< */) 1338 { 1339 static const xcb_protocol_request_t xcb_req = { 1340 /* count */ 2, 1341 /* ext */ &xcb_xfixes_id, 1342 /* opcode */ XCB_XFIXES_UNION_REGION, 1343 /* isvoid */ 1 1344 }; 1345 1346 struct iovec xcb_parts[4]; 1347 xcb_void_cookie_t xcb_ret; 1348 xcb_xfixes_union_region_request_t xcb_out; 1349 1350 xcb_out.source1 = source1; 1351 xcb_out.source2 = source2; 1352 xcb_out.destination = destination; 1353 1354 xcb_parts[2].iov_base = (char *) &xcb_out; 1355 xcb_parts[2].iov_len = sizeof(xcb_out); 1356 xcb_parts[3].iov_base = 0; 1357 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1358 1359 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1360 return xcb_ret; 1361 } 1362 1363 1364 /***************************************************************************** 1365 ** 1366 ** xcb_void_cookie_t xcb_xfixes_union_region 1367 ** 1368 ** @param xcb_connection_t *c 1369 ** @param xcb_xfixes_region_t source1 1370 ** @param xcb_xfixes_region_t source2 1371 ** @param xcb_xfixes_region_t destination 1372 ** @returns xcb_void_cookie_t 1373 ** 1374 *****************************************************************************/ 1375 1376 xcb_void_cookie_t 1377 xcb_xfixes_union_region (xcb_connection_t *c /**< */, 1378 xcb_xfixes_region_t source1 /**< */, 1379 xcb_xfixes_region_t source2 /**< */, 1380 xcb_xfixes_region_t destination /**< */) 1381 { 1382 static const xcb_protocol_request_t xcb_req = { 1383 /* count */ 2, 1384 /* ext */ &xcb_xfixes_id, 1385 /* opcode */ XCB_XFIXES_UNION_REGION, 1386 /* isvoid */ 1 1387 }; 1388 1389 struct iovec xcb_parts[4]; 1390 xcb_void_cookie_t xcb_ret; 1391 xcb_xfixes_union_region_request_t xcb_out; 1392 1393 xcb_out.source1 = source1; 1394 xcb_out.source2 = source2; 1395 xcb_out.destination = destination; 1396 1397 xcb_parts[2].iov_base = (char *) &xcb_out; 1398 xcb_parts[2].iov_len = sizeof(xcb_out); 1399 xcb_parts[3].iov_base = 0; 1400 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1401 1402 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1403 return xcb_ret; 1404 } 1405 1406 1407 /***************************************************************************** 1408 ** 1409 ** xcb_void_cookie_t xcb_xfixes_intersect_region_checked 1410 ** 1411 ** @param xcb_connection_t *c 1412 ** @param xcb_xfixes_region_t source1 1413 ** @param xcb_xfixes_region_t source2 1414 ** @param xcb_xfixes_region_t destination 1415 ** @returns xcb_void_cookie_t 1416 ** 1417 *****************************************************************************/ 1418 1419 xcb_void_cookie_t 1420 xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, 1421 xcb_xfixes_region_t source1 /**< */, 1422 xcb_xfixes_region_t source2 /**< */, 1423 xcb_xfixes_region_t destination /**< */) 1424 { 1425 static const xcb_protocol_request_t xcb_req = { 1426 /* count */ 2, 1427 /* ext */ &xcb_xfixes_id, 1428 /* opcode */ XCB_XFIXES_INTERSECT_REGION, 1429 /* isvoid */ 1 1430 }; 1431 1432 struct iovec xcb_parts[4]; 1433 xcb_void_cookie_t xcb_ret; 1434 xcb_xfixes_intersect_region_request_t xcb_out; 1435 1436 xcb_out.source1 = source1; 1437 xcb_out.source2 = source2; 1438 xcb_out.destination = destination; 1439 1440 xcb_parts[2].iov_base = (char *) &xcb_out; 1441 xcb_parts[2].iov_len = sizeof(xcb_out); 1442 xcb_parts[3].iov_base = 0; 1443 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1444 1445 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1446 return xcb_ret; 1447 } 1448 1449 1450 /***************************************************************************** 1451 ** 1452 ** xcb_void_cookie_t xcb_xfixes_intersect_region 1453 ** 1454 ** @param xcb_connection_t *c 1455 ** @param xcb_xfixes_region_t source1 1456 ** @param xcb_xfixes_region_t source2 1457 ** @param xcb_xfixes_region_t destination 1458 ** @returns xcb_void_cookie_t 1459 ** 1460 *****************************************************************************/ 1461 1462 xcb_void_cookie_t 1463 xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, 1464 xcb_xfixes_region_t source1 /**< */, 1465 xcb_xfixes_region_t source2 /**< */, 1466 xcb_xfixes_region_t destination /**< */) 1467 { 1468 static const xcb_protocol_request_t xcb_req = { 1469 /* count */ 2, 1470 /* ext */ &xcb_xfixes_id, 1471 /* opcode */ XCB_XFIXES_INTERSECT_REGION, 1472 /* isvoid */ 1 1473 }; 1474 1475 struct iovec xcb_parts[4]; 1476 xcb_void_cookie_t xcb_ret; 1477 xcb_xfixes_intersect_region_request_t xcb_out; 1478 1479 xcb_out.source1 = source1; 1480 xcb_out.source2 = source2; 1481 xcb_out.destination = destination; 1482 1483 xcb_parts[2].iov_base = (char *) &xcb_out; 1484 xcb_parts[2].iov_len = sizeof(xcb_out); 1485 xcb_parts[3].iov_base = 0; 1486 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1487 1488 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1489 return xcb_ret; 1490 } 1491 1492 1493 /***************************************************************************** 1494 ** 1495 ** xcb_void_cookie_t xcb_xfixes_subtract_region_checked 1496 ** 1497 ** @param xcb_connection_t *c 1498 ** @param xcb_xfixes_region_t source1 1499 ** @param xcb_xfixes_region_t source2 1500 ** @param xcb_xfixes_region_t destination 1501 ** @returns xcb_void_cookie_t 1502 ** 1503 *****************************************************************************/ 1504 1505 xcb_void_cookie_t 1506 xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, 1507 xcb_xfixes_region_t source1 /**< */, 1508 xcb_xfixes_region_t source2 /**< */, 1509 xcb_xfixes_region_t destination /**< */) 1510 { 1511 static const xcb_protocol_request_t xcb_req = { 1512 /* count */ 2, 1513 /* ext */ &xcb_xfixes_id, 1514 /* opcode */ XCB_XFIXES_SUBTRACT_REGION, 1515 /* isvoid */ 1 1516 }; 1517 1518 struct iovec xcb_parts[4]; 1519 xcb_void_cookie_t xcb_ret; 1520 xcb_xfixes_subtract_region_request_t xcb_out; 1521 1522 xcb_out.source1 = source1; 1523 xcb_out.source2 = source2; 1524 xcb_out.destination = destination; 1525 1526 xcb_parts[2].iov_base = (char *) &xcb_out; 1527 xcb_parts[2].iov_len = sizeof(xcb_out); 1528 xcb_parts[3].iov_base = 0; 1529 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1530 1531 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1532 return xcb_ret; 1533 } 1534 1535 1536 /***************************************************************************** 1537 ** 1538 ** xcb_void_cookie_t xcb_xfixes_subtract_region 1539 ** 1540 ** @param xcb_connection_t *c 1541 ** @param xcb_xfixes_region_t source1 1542 ** @param xcb_xfixes_region_t source2 1543 ** @param xcb_xfixes_region_t destination 1544 ** @returns xcb_void_cookie_t 1545 ** 1546 *****************************************************************************/ 1547 1548 xcb_void_cookie_t 1549 xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, 1550 xcb_xfixes_region_t source1 /**< */, 1551 xcb_xfixes_region_t source2 /**< */, 1552 xcb_xfixes_region_t destination /**< */) 1553 { 1554 static const xcb_protocol_request_t xcb_req = { 1555 /* count */ 2, 1556 /* ext */ &xcb_xfixes_id, 1557 /* opcode */ XCB_XFIXES_SUBTRACT_REGION, 1558 /* isvoid */ 1 1559 }; 1560 1561 struct iovec xcb_parts[4]; 1562 xcb_void_cookie_t xcb_ret; 1563 xcb_xfixes_subtract_region_request_t xcb_out; 1564 1565 xcb_out.source1 = source1; 1566 xcb_out.source2 = source2; 1567 xcb_out.destination = destination; 1568 1569 xcb_parts[2].iov_base = (char *) &xcb_out; 1570 xcb_parts[2].iov_len = sizeof(xcb_out); 1571 xcb_parts[3].iov_base = 0; 1572 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1573 1574 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1575 return xcb_ret; 1576 } 1577 1578 1579 /***************************************************************************** 1580 ** 1581 ** xcb_void_cookie_t xcb_xfixes_invert_region_checked 1582 ** 1583 ** @param xcb_connection_t *c 1584 ** @param xcb_xfixes_region_t source 1585 ** @param xcb_rectangle_t bounds 1586 ** @param xcb_xfixes_region_t destination 1587 ** @returns xcb_void_cookie_t 1588 ** 1589 *****************************************************************************/ 1590 1591 xcb_void_cookie_t 1592 xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, 1593 xcb_xfixes_region_t source /**< */, 1594 xcb_rectangle_t bounds /**< */, 1595 xcb_xfixes_region_t destination /**< */) 1596 { 1597 static const xcb_protocol_request_t xcb_req = { 1598 /* count */ 2, 1599 /* ext */ &xcb_xfixes_id, 1600 /* opcode */ XCB_XFIXES_INVERT_REGION, 1601 /* isvoid */ 1 1602 }; 1603 1604 struct iovec xcb_parts[4]; 1605 xcb_void_cookie_t xcb_ret; 1606 xcb_xfixes_invert_region_request_t xcb_out; 1607 1608 xcb_out.source = source; 1609 xcb_out.bounds = bounds; 1610 xcb_out.destination = destination; 1611 1612 xcb_parts[2].iov_base = (char *) &xcb_out; 1613 xcb_parts[2].iov_len = sizeof(xcb_out); 1614 xcb_parts[3].iov_base = 0; 1615 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1616 1617 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1618 return xcb_ret; 1619 } 1620 1621 1622 /***************************************************************************** 1623 ** 1624 ** xcb_void_cookie_t xcb_xfixes_invert_region 1625 ** 1626 ** @param xcb_connection_t *c 1627 ** @param xcb_xfixes_region_t source 1628 ** @param xcb_rectangle_t bounds 1629 ** @param xcb_xfixes_region_t destination 1630 ** @returns xcb_void_cookie_t 1631 ** 1632 *****************************************************************************/ 1633 1634 xcb_void_cookie_t 1635 xcb_xfixes_invert_region (xcb_connection_t *c /**< */, 1636 xcb_xfixes_region_t source /**< */, 1637 xcb_rectangle_t bounds /**< */, 1638 xcb_xfixes_region_t destination /**< */) 1639 { 1640 static const xcb_protocol_request_t xcb_req = { 1641 /* count */ 2, 1642 /* ext */ &xcb_xfixes_id, 1643 /* opcode */ XCB_XFIXES_INVERT_REGION, 1644 /* isvoid */ 1 1645 }; 1646 1647 struct iovec xcb_parts[4]; 1648 xcb_void_cookie_t xcb_ret; 1649 xcb_xfixes_invert_region_request_t xcb_out; 1650 1651 xcb_out.source = source; 1652 xcb_out.bounds = bounds; 1653 xcb_out.destination = destination; 1654 1655 xcb_parts[2].iov_base = (char *) &xcb_out; 1656 xcb_parts[2].iov_len = sizeof(xcb_out); 1657 xcb_parts[3].iov_base = 0; 1658 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1659 1660 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1661 return xcb_ret; 1662 } 1663 1664 1665 /***************************************************************************** 1666 ** 1667 ** xcb_void_cookie_t xcb_xfixes_translate_region_checked 1668 ** 1669 ** @param xcb_connection_t *c 1670 ** @param xcb_xfixes_region_t region 1671 ** @param int16_t dx 1672 ** @param int16_t dy 1673 ** @returns xcb_void_cookie_t 1674 ** 1675 *****************************************************************************/ 1676 1677 xcb_void_cookie_t 1678 xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, 1679 xcb_xfixes_region_t region /**< */, 1680 int16_t dx /**< */, 1681 int16_t dy /**< */) 1682 { 1683 static const xcb_protocol_request_t xcb_req = { 1684 /* count */ 2, 1685 /* ext */ &xcb_xfixes_id, 1686 /* opcode */ XCB_XFIXES_TRANSLATE_REGION, 1687 /* isvoid */ 1 1688 }; 1689 1690 struct iovec xcb_parts[4]; 1691 xcb_void_cookie_t xcb_ret; 1692 xcb_xfixes_translate_region_request_t xcb_out; 1693 1694 xcb_out.region = region; 1695 xcb_out.dx = dx; 1696 xcb_out.dy = dy; 1697 1698 xcb_parts[2].iov_base = (char *) &xcb_out; 1699 xcb_parts[2].iov_len = sizeof(xcb_out); 1700 xcb_parts[3].iov_base = 0; 1701 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1702 1703 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1704 return xcb_ret; 1705 } 1706 1707 1708 /***************************************************************************** 1709 ** 1710 ** xcb_void_cookie_t xcb_xfixes_translate_region 1711 ** 1712 ** @param xcb_connection_t *c 1713 ** @param xcb_xfixes_region_t region 1714 ** @param int16_t dx 1715 ** @param int16_t dy 1716 ** @returns xcb_void_cookie_t 1717 ** 1718 *****************************************************************************/ 1719 1720 xcb_void_cookie_t 1721 xcb_xfixes_translate_region (xcb_connection_t *c /**< */, 1722 xcb_xfixes_region_t region /**< */, 1723 int16_t dx /**< */, 1724 int16_t dy /**< */) 1725 { 1726 static const xcb_protocol_request_t xcb_req = { 1727 /* count */ 2, 1728 /* ext */ &xcb_xfixes_id, 1729 /* opcode */ XCB_XFIXES_TRANSLATE_REGION, 1730 /* isvoid */ 1 1731 }; 1732 1733 struct iovec xcb_parts[4]; 1734 xcb_void_cookie_t xcb_ret; 1735 xcb_xfixes_translate_region_request_t xcb_out; 1736 1737 xcb_out.region = region; 1738 xcb_out.dx = dx; 1739 xcb_out.dy = dy; 1740 1741 xcb_parts[2].iov_base = (char *) &xcb_out; 1742 xcb_parts[2].iov_len = sizeof(xcb_out); 1743 xcb_parts[3].iov_base = 0; 1744 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1745 1746 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1747 return xcb_ret; 1748 } 1749 1750 1751 /***************************************************************************** 1752 ** 1753 ** xcb_void_cookie_t xcb_xfixes_region_extents_checked 1754 ** 1755 ** @param xcb_connection_t *c 1756 ** @param xcb_xfixes_region_t source 1757 ** @param xcb_xfixes_region_t destination 1758 ** @returns xcb_void_cookie_t 1759 ** 1760 *****************************************************************************/ 1761 1762 xcb_void_cookie_t 1763 xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, 1764 xcb_xfixes_region_t source /**< */, 1765 xcb_xfixes_region_t destination /**< */) 1766 { 1767 static const xcb_protocol_request_t xcb_req = { 1768 /* count */ 2, 1769 /* ext */ &xcb_xfixes_id, 1770 /* opcode */ XCB_XFIXES_REGION_EXTENTS, 1771 /* isvoid */ 1 1772 }; 1773 1774 struct iovec xcb_parts[4]; 1775 xcb_void_cookie_t xcb_ret; 1776 xcb_xfixes_region_extents_request_t xcb_out; 1777 1778 xcb_out.source = source; 1779 xcb_out.destination = destination; 1780 1781 xcb_parts[2].iov_base = (char *) &xcb_out; 1782 xcb_parts[2].iov_len = sizeof(xcb_out); 1783 xcb_parts[3].iov_base = 0; 1784 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1785 1786 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1787 return xcb_ret; 1788 } 1789 1790 1791 /***************************************************************************** 1792 ** 1793 ** xcb_void_cookie_t xcb_xfixes_region_extents 1794 ** 1795 ** @param xcb_connection_t *c 1796 ** @param xcb_xfixes_region_t source 1797 ** @param xcb_xfixes_region_t destination 1798 ** @returns xcb_void_cookie_t 1799 ** 1800 *****************************************************************************/ 1801 1802 xcb_void_cookie_t 1803 xcb_xfixes_region_extents (xcb_connection_t *c /**< */, 1804 xcb_xfixes_region_t source /**< */, 1805 xcb_xfixes_region_t destination /**< */) 1806 { 1807 static const xcb_protocol_request_t xcb_req = { 1808 /* count */ 2, 1809 /* ext */ &xcb_xfixes_id, 1810 /* opcode */ XCB_XFIXES_REGION_EXTENTS, 1811 /* isvoid */ 1 1812 }; 1813 1814 struct iovec xcb_parts[4]; 1815 xcb_void_cookie_t xcb_ret; 1816 xcb_xfixes_region_extents_request_t xcb_out; 1817 1818 xcb_out.source = source; 1819 xcb_out.destination = destination; 1820 1821 xcb_parts[2].iov_base = (char *) &xcb_out; 1822 xcb_parts[2].iov_len = sizeof(xcb_out); 1823 xcb_parts[3].iov_base = 0; 1824 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1825 1826 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1827 return xcb_ret; 1828 } 1829 1830 int 1831 xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */) 1832 { 1833 char *xcb_tmp = (char *)_buffer; 1834 const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer; 1835 unsigned int xcb_buffer_len = 0; 1836 unsigned int xcb_block_len = 0; 1837 unsigned int xcb_pad = 0; 1838 unsigned int xcb_align_to = 0; 1839 1840 1841 xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t); 1842 xcb_tmp += xcb_block_len; 1843 xcb_buffer_len += xcb_block_len; 1844 xcb_block_len = 0; 1845 /* rectangles */ 1846 xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t); 1847 xcb_tmp += xcb_block_len; 1848 xcb_align_to = ALIGNOF(xcb_rectangle_t); 1849 /* insert padding */ 1850 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1851 xcb_buffer_len += xcb_block_len + xcb_pad; 1852 if (0 != xcb_pad) { 1853 xcb_tmp += xcb_pad; 1854 xcb_pad = 0; 1855 } 1856 xcb_block_len = 0; 1857 1858 return xcb_buffer_len; 1859 } 1860 1861 1862 /***************************************************************************** 1863 ** 1864 ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region 1865 ** 1866 ** @param xcb_connection_t *c 1867 ** @param xcb_xfixes_region_t region 1868 ** @returns xcb_xfixes_fetch_region_cookie_t 1869 ** 1870 *****************************************************************************/ 1871 1872 xcb_xfixes_fetch_region_cookie_t 1873 xcb_xfixes_fetch_region (xcb_connection_t *c /**< */, 1874 xcb_xfixes_region_t region /**< */) 1875 { 1876 static const xcb_protocol_request_t xcb_req = { 1877 /* count */ 2, 1878 /* ext */ &xcb_xfixes_id, 1879 /* opcode */ XCB_XFIXES_FETCH_REGION, 1880 /* isvoid */ 0 1881 }; 1882 1883 struct iovec xcb_parts[4]; 1884 xcb_xfixes_fetch_region_cookie_t xcb_ret; 1885 xcb_xfixes_fetch_region_request_t xcb_out; 1886 1887 xcb_out.region = region; 1888 1889 xcb_parts[2].iov_base = (char *) &xcb_out; 1890 xcb_parts[2].iov_len = sizeof(xcb_out); 1891 xcb_parts[3].iov_base = 0; 1892 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1893 1894 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1895 return xcb_ret; 1896 } 1897 1898 1899 /***************************************************************************** 1900 ** 1901 ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked 1902 ** 1903 ** @param xcb_connection_t *c 1904 ** @param xcb_xfixes_region_t region 1905 ** @returns xcb_xfixes_fetch_region_cookie_t 1906 ** 1907 *****************************************************************************/ 1908 1909 xcb_xfixes_fetch_region_cookie_t 1910 xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */, 1911 xcb_xfixes_region_t region /**< */) 1912 { 1913 static const xcb_protocol_request_t xcb_req = { 1914 /* count */ 2, 1915 /* ext */ &xcb_xfixes_id, 1916 /* opcode */ XCB_XFIXES_FETCH_REGION, 1917 /* isvoid */ 0 1918 }; 1919 1920 struct iovec xcb_parts[4]; 1921 xcb_xfixes_fetch_region_cookie_t xcb_ret; 1922 xcb_xfixes_fetch_region_request_t xcb_out; 1923 1924 xcb_out.region = region; 1925 1926 xcb_parts[2].iov_base = (char *) &xcb_out; 1927 xcb_parts[2].iov_len = sizeof(xcb_out); 1928 xcb_parts[3].iov_base = 0; 1929 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1930 1931 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1932 return xcb_ret; 1933 } 1934 1935 1936 /***************************************************************************** 1937 ** 1938 ** xcb_rectangle_t * xcb_xfixes_fetch_region_rectangles 1939 ** 1940 ** @param const xcb_xfixes_fetch_region_reply_t *R 1941 ** @returns xcb_rectangle_t * 1942 ** 1943 *****************************************************************************/ 1944 1945 xcb_rectangle_t * 1946 xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1947 { 1948 return (xcb_rectangle_t *) (R + 1); 1949 } 1950 1951 1952 /***************************************************************************** 1953 ** 1954 ** int xcb_xfixes_fetch_region_rectangles_length 1955 ** 1956 ** @param const xcb_xfixes_fetch_region_reply_t *R 1957 ** @returns int 1958 ** 1959 *****************************************************************************/ 1960 1961 int 1962 xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1963 { 1964 return (R->length / 2); 1965 } 1966 1967 1968 /***************************************************************************** 1969 ** 1970 ** xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator 1971 ** 1972 ** @param const xcb_xfixes_fetch_region_reply_t *R 1973 ** @returns xcb_rectangle_iterator_t 1974 ** 1975 *****************************************************************************/ 1976 1977 xcb_rectangle_iterator_t 1978 xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1979 { 1980 xcb_rectangle_iterator_t i; 1981 i.data = (xcb_rectangle_t *) (R + 1); 1982 i.rem = (R->length / 2); 1983 i.index = (char *) i.data - (char *) R; 1984 return i; 1985 } 1986 1987 1988 /***************************************************************************** 1989 ** 1990 ** xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply 1991 ** 1992 ** @param xcb_connection_t *c 1993 ** @param xcb_xfixes_fetch_region_cookie_t cookie 1994 ** @param xcb_generic_error_t **e 1995 ** @returns xcb_xfixes_fetch_region_reply_t * 1996 ** 1997 *****************************************************************************/ 1998 1999 xcb_xfixes_fetch_region_reply_t * 2000 xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */, 2001 xcb_xfixes_fetch_region_cookie_t cookie /**< */, 2002 xcb_generic_error_t **e /**< */) 2003 { 2004 return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2005 } 2006 2007 2008 /***************************************************************************** 2009 ** 2010 ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region_checked 2011 ** 2012 ** @param xcb_connection_t *c 2013 ** @param xcb_gcontext_t gc 2014 ** @param xcb_xfixes_region_t region 2015 ** @param int16_t x_origin 2016 ** @param int16_t y_origin 2017 ** @returns xcb_void_cookie_t 2018 ** 2019 *****************************************************************************/ 2020 2021 xcb_void_cookie_t 2022 xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, 2023 xcb_gcontext_t gc /**< */, 2024 xcb_xfixes_region_t region /**< */, 2025 int16_t x_origin /**< */, 2026 int16_t y_origin /**< */) 2027 { 2028 static const xcb_protocol_request_t xcb_req = { 2029 /* count */ 2, 2030 /* ext */ &xcb_xfixes_id, 2031 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, 2032 /* isvoid */ 1 2033 }; 2034 2035 struct iovec xcb_parts[4]; 2036 xcb_void_cookie_t xcb_ret; 2037 xcb_xfixes_set_gc_clip_region_request_t xcb_out; 2038 2039 xcb_out.gc = gc; 2040 xcb_out.region = region; 2041 xcb_out.x_origin = x_origin; 2042 xcb_out.y_origin = y_origin; 2043 2044 xcb_parts[2].iov_base = (char *) &xcb_out; 2045 xcb_parts[2].iov_len = sizeof(xcb_out); 2046 xcb_parts[3].iov_base = 0; 2047 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2048 2049 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2050 return xcb_ret; 2051 } 2052 2053 2054 /***************************************************************************** 2055 ** 2056 ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region 2057 ** 2058 ** @param xcb_connection_t *c 2059 ** @param xcb_gcontext_t gc 2060 ** @param xcb_xfixes_region_t region 2061 ** @param int16_t x_origin 2062 ** @param int16_t y_origin 2063 ** @returns xcb_void_cookie_t 2064 ** 2065 *****************************************************************************/ 2066 2067 xcb_void_cookie_t 2068 xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, 2069 xcb_gcontext_t gc /**< */, 2070 xcb_xfixes_region_t region /**< */, 2071 int16_t x_origin /**< */, 2072 int16_t y_origin /**< */) 2073 { 2074 static const xcb_protocol_request_t xcb_req = { 2075 /* count */ 2, 2076 /* ext */ &xcb_xfixes_id, 2077 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, 2078 /* isvoid */ 1 2079 }; 2080 2081 struct iovec xcb_parts[4]; 2082 xcb_void_cookie_t xcb_ret; 2083 xcb_xfixes_set_gc_clip_region_request_t xcb_out; 2084 2085 xcb_out.gc = gc; 2086 xcb_out.region = region; 2087 xcb_out.x_origin = x_origin; 2088 xcb_out.y_origin = y_origin; 2089 2090 xcb_parts[2].iov_base = (char *) &xcb_out; 2091 xcb_parts[2].iov_len = sizeof(xcb_out); 2092 xcb_parts[3].iov_base = 0; 2093 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2094 2095 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2096 return xcb_ret; 2097 } 2098 2099 2100 /***************************************************************************** 2101 ** 2102 ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region_checked 2103 ** 2104 ** @param xcb_connection_t *c 2105 ** @param xcb_window_t dest 2106 ** @param xcb_shape_kind_t dest_kind 2107 ** @param int16_t x_offset 2108 ** @param int16_t y_offset 2109 ** @param xcb_xfixes_region_t region 2110 ** @returns xcb_void_cookie_t 2111 ** 2112 *****************************************************************************/ 2113 2114 xcb_void_cookie_t 2115 xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, 2116 xcb_window_t dest /**< */, 2117 xcb_shape_kind_t dest_kind /**< */, 2118 int16_t x_offset /**< */, 2119 int16_t y_offset /**< */, 2120 xcb_xfixes_region_t region /**< */) 2121 { 2122 static const xcb_protocol_request_t xcb_req = { 2123 /* count */ 2, 2124 /* ext */ &xcb_xfixes_id, 2125 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, 2126 /* isvoid */ 1 2127 }; 2128 2129 struct iovec xcb_parts[4]; 2130 xcb_void_cookie_t xcb_ret; 2131 xcb_xfixes_set_window_shape_region_request_t xcb_out; 2132 2133 xcb_out.dest = dest; 2134 xcb_out.dest_kind = dest_kind; 2135 memset(xcb_out.pad0, 0, 3); 2136 xcb_out.x_offset = x_offset; 2137 xcb_out.y_offset = y_offset; 2138 xcb_out.region = region; 2139 2140 xcb_parts[2].iov_base = (char *) &xcb_out; 2141 xcb_parts[2].iov_len = sizeof(xcb_out); 2142 xcb_parts[3].iov_base = 0; 2143 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2144 2145 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2146 return xcb_ret; 2147 } 2148 2149 2150 /***************************************************************************** 2151 ** 2152 ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region 2153 ** 2154 ** @param xcb_connection_t *c 2155 ** @param xcb_window_t dest 2156 ** @param xcb_shape_kind_t dest_kind 2157 ** @param int16_t x_offset 2158 ** @param int16_t y_offset 2159 ** @param xcb_xfixes_region_t region 2160 ** @returns xcb_void_cookie_t 2161 ** 2162 *****************************************************************************/ 2163 2164 xcb_void_cookie_t 2165 xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, 2166 xcb_window_t dest /**< */, 2167 xcb_shape_kind_t dest_kind /**< */, 2168 int16_t x_offset /**< */, 2169 int16_t y_offset /**< */, 2170 xcb_xfixes_region_t region /**< */) 2171 { 2172 static const xcb_protocol_request_t xcb_req = { 2173 /* count */ 2, 2174 /* ext */ &xcb_xfixes_id, 2175 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, 2176 /* isvoid */ 1 2177 }; 2178 2179 struct iovec xcb_parts[4]; 2180 xcb_void_cookie_t xcb_ret; 2181 xcb_xfixes_set_window_shape_region_request_t xcb_out; 2182 2183 xcb_out.dest = dest; 2184 xcb_out.dest_kind = dest_kind; 2185 memset(xcb_out.pad0, 0, 3); 2186 xcb_out.x_offset = x_offset; 2187 xcb_out.y_offset = y_offset; 2188 xcb_out.region = region; 2189 2190 xcb_parts[2].iov_base = (char *) &xcb_out; 2191 xcb_parts[2].iov_len = sizeof(xcb_out); 2192 xcb_parts[3].iov_base = 0; 2193 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2194 2195 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2196 return xcb_ret; 2197 } 2198 2199 2200 /***************************************************************************** 2201 ** 2202 ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region_checked 2203 ** 2204 ** @param xcb_connection_t *c 2205 ** @param xcb_render_picture_t picture 2206 ** @param xcb_xfixes_region_t region 2207 ** @param int16_t x_origin 2208 ** @param int16_t y_origin 2209 ** @returns xcb_void_cookie_t 2210 ** 2211 *****************************************************************************/ 2212 2213 xcb_void_cookie_t 2214 xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, 2215 xcb_render_picture_t picture /**< */, 2216 xcb_xfixes_region_t region /**< */, 2217 int16_t x_origin /**< */, 2218 int16_t y_origin /**< */) 2219 { 2220 static const xcb_protocol_request_t xcb_req = { 2221 /* count */ 2, 2222 /* ext */ &xcb_xfixes_id, 2223 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, 2224 /* isvoid */ 1 2225 }; 2226 2227 struct iovec xcb_parts[4]; 2228 xcb_void_cookie_t xcb_ret; 2229 xcb_xfixes_set_picture_clip_region_request_t xcb_out; 2230 2231 xcb_out.picture = picture; 2232 xcb_out.region = region; 2233 xcb_out.x_origin = x_origin; 2234 xcb_out.y_origin = y_origin; 2235 2236 xcb_parts[2].iov_base = (char *) &xcb_out; 2237 xcb_parts[2].iov_len = sizeof(xcb_out); 2238 xcb_parts[3].iov_base = 0; 2239 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2240 2241 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2242 return xcb_ret; 2243 } 2244 2245 2246 /***************************************************************************** 2247 ** 2248 ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region 2249 ** 2250 ** @param xcb_connection_t *c 2251 ** @param xcb_render_picture_t picture 2252 ** @param xcb_xfixes_region_t region 2253 ** @param int16_t x_origin 2254 ** @param int16_t y_origin 2255 ** @returns xcb_void_cookie_t 2256 ** 2257 *****************************************************************************/ 2258 2259 xcb_void_cookie_t 2260 xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, 2261 xcb_render_picture_t picture /**< */, 2262 xcb_xfixes_region_t region /**< */, 2263 int16_t x_origin /**< */, 2264 int16_t y_origin /**< */) 2265 { 2266 static const xcb_protocol_request_t xcb_req = { 2267 /* count */ 2, 2268 /* ext */ &xcb_xfixes_id, 2269 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, 2270 /* isvoid */ 1 2271 }; 2272 2273 struct iovec xcb_parts[4]; 2274 xcb_void_cookie_t xcb_ret; 2275 xcb_xfixes_set_picture_clip_region_request_t xcb_out; 2276 2277 xcb_out.picture = picture; 2278 xcb_out.region = region; 2279 xcb_out.x_origin = x_origin; 2280 xcb_out.y_origin = y_origin; 2281 2282 xcb_parts[2].iov_base = (char *) &xcb_out; 2283 xcb_parts[2].iov_len = sizeof(xcb_out); 2284 xcb_parts[3].iov_base = 0; 2285 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2286 2287 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2288 return xcb_ret; 2289 } 2290 2291 int 2292 xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */) 2293 { 2294 char *xcb_tmp = (char *)_buffer; 2295 const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer; 2296 unsigned int xcb_buffer_len = 0; 2297 unsigned int xcb_block_len = 0; 2298 unsigned int xcb_pad = 0; 2299 unsigned int xcb_align_to = 0; 2300 2301 2302 xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t); 2303 xcb_tmp += xcb_block_len; 2304 xcb_buffer_len += xcb_block_len; 2305 xcb_block_len = 0; 2306 /* name */ 2307 xcb_block_len += _aux->nbytes * sizeof(char); 2308 xcb_tmp += xcb_block_len; 2309 xcb_align_to = ALIGNOF(char); 2310 /* insert padding */ 2311 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2312 xcb_buffer_len += xcb_block_len + xcb_pad; 2313 if (0 != xcb_pad) { 2314 xcb_tmp += xcb_pad; 2315 xcb_pad = 0; 2316 } 2317 xcb_block_len = 0; 2318 2319 return xcb_buffer_len; 2320 } 2321 2322 2323 /***************************************************************************** 2324 ** 2325 ** xcb_void_cookie_t xcb_xfixes_set_cursor_name_checked 2326 ** 2327 ** @param xcb_connection_t *c 2328 ** @param xcb_cursor_t cursor 2329 ** @param uint16_t nbytes 2330 ** @param const char *name 2331 ** @returns xcb_void_cookie_t 2332 ** 2333 *****************************************************************************/ 2334 2335 xcb_void_cookie_t 2336 xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, 2337 xcb_cursor_t cursor /**< */, 2338 uint16_t nbytes /**< */, 2339 const char *name /**< */) 2340 { 2341 static const xcb_protocol_request_t xcb_req = { 2342 /* count */ 4, 2343 /* ext */ &xcb_xfixes_id, 2344 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, 2345 /* isvoid */ 1 2346 }; 2347 2348 struct iovec xcb_parts[6]; 2349 xcb_void_cookie_t xcb_ret; 2350 xcb_xfixes_set_cursor_name_request_t xcb_out; 2351 2352 xcb_out.cursor = cursor; 2353 xcb_out.nbytes = nbytes; 2354 memset(xcb_out.pad0, 0, 2); 2355 2356 xcb_parts[2].iov_base = (char *) &xcb_out; 2357 xcb_parts[2].iov_len = sizeof(xcb_out); 2358 xcb_parts[3].iov_base = 0; 2359 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2360 /* char name */ 2361 xcb_parts[4].iov_base = (char *) name; 2362 xcb_parts[4].iov_len = nbytes * sizeof(char); 2363 xcb_parts[5].iov_base = 0; 2364 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2365 2366 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2367 return xcb_ret; 2368 } 2369 2370 2371 /***************************************************************************** 2372 ** 2373 ** xcb_void_cookie_t xcb_xfixes_set_cursor_name 2374 ** 2375 ** @param xcb_connection_t *c 2376 ** @param xcb_cursor_t cursor 2377 ** @param uint16_t nbytes 2378 ** @param const char *name 2379 ** @returns xcb_void_cookie_t 2380 ** 2381 *****************************************************************************/ 2382 2383 xcb_void_cookie_t 2384 xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, 2385 xcb_cursor_t cursor /**< */, 2386 uint16_t nbytes /**< */, 2387 const char *name /**< */) 2388 { 2389 static const xcb_protocol_request_t xcb_req = { 2390 /* count */ 4, 2391 /* ext */ &xcb_xfixes_id, 2392 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, 2393 /* isvoid */ 1 2394 }; 2395 2396 struct iovec xcb_parts[6]; 2397 xcb_void_cookie_t xcb_ret; 2398 xcb_xfixes_set_cursor_name_request_t xcb_out; 2399 2400 xcb_out.cursor = cursor; 2401 xcb_out.nbytes = nbytes; 2402 memset(xcb_out.pad0, 0, 2); 2403 2404 xcb_parts[2].iov_base = (char *) &xcb_out; 2405 xcb_parts[2].iov_len = sizeof(xcb_out); 2406 xcb_parts[3].iov_base = 0; 2407 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2408 /* char name */ 2409 xcb_parts[4].iov_base = (char *) name; 2410 xcb_parts[4].iov_len = nbytes * sizeof(char); 2411 xcb_parts[5].iov_base = 0; 2412 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2413 2414 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2415 return xcb_ret; 2416 } 2417 2418 int 2419 xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */) 2420 { 2421 char *xcb_tmp = (char *)_buffer; 2422 const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer; 2423 unsigned int xcb_buffer_len = 0; 2424 unsigned int xcb_block_len = 0; 2425 unsigned int xcb_pad = 0; 2426 unsigned int xcb_align_to = 0; 2427 2428 2429 xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t); 2430 xcb_tmp += xcb_block_len; 2431 xcb_buffer_len += xcb_block_len; 2432 xcb_block_len = 0; 2433 /* name */ 2434 xcb_block_len += _aux->nbytes * sizeof(char); 2435 xcb_tmp += xcb_block_len; 2436 xcb_align_to = ALIGNOF(char); 2437 /* insert padding */ 2438 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2439 xcb_buffer_len += xcb_block_len + xcb_pad; 2440 if (0 != xcb_pad) { 2441 xcb_tmp += xcb_pad; 2442 xcb_pad = 0; 2443 } 2444 xcb_block_len = 0; 2445 2446 return xcb_buffer_len; 2447 } 2448 2449 2450 /***************************************************************************** 2451 ** 2452 ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name 2453 ** 2454 ** @param xcb_connection_t *c 2455 ** @param xcb_cursor_t cursor 2456 ** @returns xcb_xfixes_get_cursor_name_cookie_t 2457 ** 2458 *****************************************************************************/ 2459 2460 xcb_xfixes_get_cursor_name_cookie_t 2461 xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */, 2462 xcb_cursor_t cursor /**< */) 2463 { 2464 static const xcb_protocol_request_t xcb_req = { 2465 /* count */ 2, 2466 /* ext */ &xcb_xfixes_id, 2467 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, 2468 /* isvoid */ 0 2469 }; 2470 2471 struct iovec xcb_parts[4]; 2472 xcb_xfixes_get_cursor_name_cookie_t xcb_ret; 2473 xcb_xfixes_get_cursor_name_request_t xcb_out; 2474 2475 xcb_out.cursor = cursor; 2476 2477 xcb_parts[2].iov_base = (char *) &xcb_out; 2478 xcb_parts[2].iov_len = sizeof(xcb_out); 2479 xcb_parts[3].iov_base = 0; 2480 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2481 2482 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2483 return xcb_ret; 2484 } 2485 2486 2487 /***************************************************************************** 2488 ** 2489 ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked 2490 ** 2491 ** @param xcb_connection_t *c 2492 ** @param xcb_cursor_t cursor 2493 ** @returns xcb_xfixes_get_cursor_name_cookie_t 2494 ** 2495 *****************************************************************************/ 2496 2497 xcb_xfixes_get_cursor_name_cookie_t 2498 xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */, 2499 xcb_cursor_t cursor /**< */) 2500 { 2501 static const xcb_protocol_request_t xcb_req = { 2502 /* count */ 2, 2503 /* ext */ &xcb_xfixes_id, 2504 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, 2505 /* isvoid */ 0 2506 }; 2507 2508 struct iovec xcb_parts[4]; 2509 xcb_xfixes_get_cursor_name_cookie_t xcb_ret; 2510 xcb_xfixes_get_cursor_name_request_t xcb_out; 2511 2512 xcb_out.cursor = cursor; 2513 2514 xcb_parts[2].iov_base = (char *) &xcb_out; 2515 xcb_parts[2].iov_len = sizeof(xcb_out); 2516 xcb_parts[3].iov_base = 0; 2517 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2518 2519 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2520 return xcb_ret; 2521 } 2522 2523 2524 /***************************************************************************** 2525 ** 2526 ** char * xcb_xfixes_get_cursor_name_name 2527 ** 2528 ** @param const xcb_xfixes_get_cursor_name_reply_t *R 2529 ** @returns char * 2530 ** 2531 *****************************************************************************/ 2532 2533 char * 2534 xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 2535 { 2536 return (char *) (R + 1); 2537 } 2538 2539 2540 /***************************************************************************** 2541 ** 2542 ** int xcb_xfixes_get_cursor_name_name_length 2543 ** 2544 ** @param const xcb_xfixes_get_cursor_name_reply_t *R 2545 ** @returns int 2546 ** 2547 *****************************************************************************/ 2548 2549 int 2550 xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 2551 { 2552 return R->nbytes; 2553 } 2554 2555 2556 /***************************************************************************** 2557 ** 2558 ** xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end 2559 ** 2560 ** @param const xcb_xfixes_get_cursor_name_reply_t *R 2561 ** @returns xcb_generic_iterator_t 2562 ** 2563 *****************************************************************************/ 2564 2565 xcb_generic_iterator_t 2566 xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 2567 { 2568 xcb_generic_iterator_t i; 2569 i.data = ((char *) (R + 1)) + (R->nbytes); 2570 i.rem = 0; 2571 i.index = (char *) i.data - (char *) R; 2572 return i; 2573 } 2574 2575 2576 /***************************************************************************** 2577 ** 2578 ** xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply 2579 ** 2580 ** @param xcb_connection_t *c 2581 ** @param xcb_xfixes_get_cursor_name_cookie_t cookie 2582 ** @param xcb_generic_error_t **e 2583 ** @returns xcb_xfixes_get_cursor_name_reply_t * 2584 ** 2585 *****************************************************************************/ 2586 2587 xcb_xfixes_get_cursor_name_reply_t * 2588 xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */, 2589 xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, 2590 xcb_generic_error_t **e /**< */) 2591 { 2592 return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2593 } 2594 2595 int 2596 xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */) 2597 { 2598 char *xcb_tmp = (char *)_buffer; 2599 const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer; 2600 unsigned int xcb_buffer_len = 0; 2601 unsigned int xcb_block_len = 0; 2602 unsigned int xcb_pad = 0; 2603 unsigned int xcb_align_to = 0; 2604 2605 2606 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t); 2607 xcb_tmp += xcb_block_len; 2608 xcb_buffer_len += xcb_block_len; 2609 xcb_block_len = 0; 2610 /* name */ 2611 xcb_block_len += _aux->nbytes * sizeof(char); 2612 xcb_tmp += xcb_block_len; 2613 xcb_align_to = ALIGNOF(char); 2614 /* insert padding */ 2615 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2616 xcb_buffer_len += xcb_block_len + xcb_pad; 2617 if (0 != xcb_pad) { 2618 xcb_tmp += xcb_pad; 2619 xcb_pad = 0; 2620 } 2621 xcb_block_len = 0; 2622 /* cursor_image */ 2623 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); 2624 xcb_tmp += xcb_block_len; 2625 xcb_align_to = ALIGNOF(uint32_t); 2626 /* insert padding */ 2627 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2628 xcb_buffer_len += xcb_block_len + xcb_pad; 2629 if (0 != xcb_pad) { 2630 xcb_tmp += xcb_pad; 2631 xcb_pad = 0; 2632 } 2633 xcb_block_len = 0; 2634 2635 return xcb_buffer_len; 2636 } 2637 2638 2639 /***************************************************************************** 2640 ** 2641 ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name 2642 ** 2643 ** @param xcb_connection_t *c 2644 ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t 2645 ** 2646 *****************************************************************************/ 2647 2648 xcb_xfixes_get_cursor_image_and_name_cookie_t 2649 xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */) 2650 { 2651 static const xcb_protocol_request_t xcb_req = { 2652 /* count */ 2, 2653 /* ext */ &xcb_xfixes_id, 2654 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, 2655 /* isvoid */ 0 2656 }; 2657 2658 struct iovec xcb_parts[4]; 2659 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; 2660 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; 2661 2662 2663 xcb_parts[2].iov_base = (char *) &xcb_out; 2664 xcb_parts[2].iov_len = sizeof(xcb_out); 2665 xcb_parts[3].iov_base = 0; 2666 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2667 2668 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2669 return xcb_ret; 2670 } 2671 2672 2673 /***************************************************************************** 2674 ** 2675 ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked 2676 ** 2677 ** @param xcb_connection_t *c 2678 ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t 2679 ** 2680 *****************************************************************************/ 2681 2682 xcb_xfixes_get_cursor_image_and_name_cookie_t 2683 xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */) 2684 { 2685 static const xcb_protocol_request_t xcb_req = { 2686 /* count */ 2, 2687 /* ext */ &xcb_xfixes_id, 2688 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, 2689 /* isvoid */ 0 2690 }; 2691 2692 struct iovec xcb_parts[4]; 2693 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; 2694 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; 2695 2696 2697 xcb_parts[2].iov_base = (char *) &xcb_out; 2698 xcb_parts[2].iov_len = sizeof(xcb_out); 2699 xcb_parts[3].iov_base = 0; 2700 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2701 2702 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2703 return xcb_ret; 2704 } 2705 2706 2707 /***************************************************************************** 2708 ** 2709 ** char * xcb_xfixes_get_cursor_image_and_name_name 2710 ** 2711 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2712 ** @returns char * 2713 ** 2714 *****************************************************************************/ 2715 2716 char * 2717 xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2718 { 2719 return (char *) (R + 1); 2720 } 2721 2722 2723 /***************************************************************************** 2724 ** 2725 ** int xcb_xfixes_get_cursor_image_and_name_name_length 2726 ** 2727 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2728 ** @returns int 2729 ** 2730 *****************************************************************************/ 2731 2732 int 2733 xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2734 { 2735 return R->nbytes; 2736 } 2737 2738 2739 /***************************************************************************** 2740 ** 2741 ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end 2742 ** 2743 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2744 ** @returns xcb_generic_iterator_t 2745 ** 2746 *****************************************************************************/ 2747 2748 xcb_generic_iterator_t 2749 xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2750 { 2751 xcb_generic_iterator_t i; 2752 i.data = ((char *) (R + 1)) + (R->nbytes); 2753 i.rem = 0; 2754 i.index = (char *) i.data - (char *) R; 2755 return i; 2756 } 2757 2758 2759 /***************************************************************************** 2760 ** 2761 ** uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image 2762 ** 2763 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2764 ** @returns uint32_t * 2765 ** 2766 *****************************************************************************/ 2767 2768 uint32_t * 2769 xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2770 { 2771 xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R); 2772 return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); 2773 } 2774 2775 2776 /***************************************************************************** 2777 ** 2778 ** int xcb_xfixes_get_cursor_image_and_name_cursor_image_length 2779 ** 2780 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2781 ** @returns int 2782 ** 2783 *****************************************************************************/ 2784 2785 int 2786 xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2787 { 2788 return (R->width * R->height); 2789 } 2790 2791 2792 /***************************************************************************** 2793 ** 2794 ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end 2795 ** 2796 ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R 2797 ** @returns xcb_generic_iterator_t 2798 ** 2799 *****************************************************************************/ 2800 2801 xcb_generic_iterator_t 2802 xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 2803 { 2804 xcb_generic_iterator_t i; 2805 xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R); 2806 i.data = ((uint32_t *) child.data) + ((R->width * R->height)); 2807 i.rem = 0; 2808 i.index = (char *) i.data - (char *) R; 2809 return i; 2810 } 2811 2812 2813 /***************************************************************************** 2814 ** 2815 ** xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply 2816 ** 2817 ** @param xcb_connection_t *c 2818 ** @param xcb_xfixes_get_cursor_image_and_name_cookie_t cookie 2819 ** @param xcb_generic_error_t **e 2820 ** @returns xcb_xfixes_get_cursor_image_and_name_reply_t * 2821 ** 2822 *****************************************************************************/ 2823 2824 xcb_xfixes_get_cursor_image_and_name_reply_t * 2825 xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */, 2826 xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, 2827 xcb_generic_error_t **e /**< */) 2828 { 2829 return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2830 } 2831 2832 2833 /***************************************************************************** 2834 ** 2835 ** xcb_void_cookie_t xcb_xfixes_change_cursor_checked 2836 ** 2837 ** @param xcb_connection_t *c 2838 ** @param xcb_cursor_t source 2839 ** @param xcb_cursor_t destination 2840 ** @returns xcb_void_cookie_t 2841 ** 2842 *****************************************************************************/ 2843 2844 xcb_void_cookie_t 2845 xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, 2846 xcb_cursor_t source /**< */, 2847 xcb_cursor_t destination /**< */) 2848 { 2849 static const xcb_protocol_request_t xcb_req = { 2850 /* count */ 2, 2851 /* ext */ &xcb_xfixes_id, 2852 /* opcode */ XCB_XFIXES_CHANGE_CURSOR, 2853 /* isvoid */ 1 2854 }; 2855 2856 struct iovec xcb_parts[4]; 2857 xcb_void_cookie_t xcb_ret; 2858 xcb_xfixes_change_cursor_request_t xcb_out; 2859 2860 xcb_out.source = source; 2861 xcb_out.destination = destination; 2862 2863 xcb_parts[2].iov_base = (char *) &xcb_out; 2864 xcb_parts[2].iov_len = sizeof(xcb_out); 2865 xcb_parts[3].iov_base = 0; 2866 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2867 2868 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2869 return xcb_ret; 2870 } 2871 2872 2873 /***************************************************************************** 2874 ** 2875 ** xcb_void_cookie_t xcb_xfixes_change_cursor 2876 ** 2877 ** @param xcb_connection_t *c 2878 ** @param xcb_cursor_t source 2879 ** @param xcb_cursor_t destination 2880 ** @returns xcb_void_cookie_t 2881 ** 2882 *****************************************************************************/ 2883 2884 xcb_void_cookie_t 2885 xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, 2886 xcb_cursor_t source /**< */, 2887 xcb_cursor_t destination /**< */) 2888 { 2889 static const xcb_protocol_request_t xcb_req = { 2890 /* count */ 2, 2891 /* ext */ &xcb_xfixes_id, 2892 /* opcode */ XCB_XFIXES_CHANGE_CURSOR, 2893 /* isvoid */ 1 2894 }; 2895 2896 struct iovec xcb_parts[4]; 2897 xcb_void_cookie_t xcb_ret; 2898 xcb_xfixes_change_cursor_request_t xcb_out; 2899 2900 xcb_out.source = source; 2901 xcb_out.destination = destination; 2902 2903 xcb_parts[2].iov_base = (char *) &xcb_out; 2904 xcb_parts[2].iov_len = sizeof(xcb_out); 2905 xcb_parts[3].iov_base = 0; 2906 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2907 2908 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2909 return xcb_ret; 2910 } 2911 2912 int 2913 xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */) 2914 { 2915 char *xcb_tmp = (char *)_buffer; 2916 const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer; 2917 unsigned int xcb_buffer_len = 0; 2918 unsigned int xcb_block_len = 0; 2919 unsigned int xcb_pad = 0; 2920 unsigned int xcb_align_to = 0; 2921 2922 2923 xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t); 2924 xcb_tmp += xcb_block_len; 2925 xcb_buffer_len += xcb_block_len; 2926 xcb_block_len = 0; 2927 /* name */ 2928 xcb_block_len += _aux->nbytes * sizeof(char); 2929 xcb_tmp += xcb_block_len; 2930 xcb_align_to = ALIGNOF(char); 2931 /* insert padding */ 2932 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2933 xcb_buffer_len += xcb_block_len + xcb_pad; 2934 if (0 != xcb_pad) { 2935 xcb_tmp += xcb_pad; 2936 xcb_pad = 0; 2937 } 2938 xcb_block_len = 0; 2939 2940 return xcb_buffer_len; 2941 } 2942 2943 2944 /***************************************************************************** 2945 ** 2946 ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name_checked 2947 ** 2948 ** @param xcb_connection_t *c 2949 ** @param xcb_cursor_t src 2950 ** @param uint16_t nbytes 2951 ** @param const char *name 2952 ** @returns xcb_void_cookie_t 2953 ** 2954 *****************************************************************************/ 2955 2956 xcb_void_cookie_t 2957 xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, 2958 xcb_cursor_t src /**< */, 2959 uint16_t nbytes /**< */, 2960 const char *name /**< */) 2961 { 2962 static const xcb_protocol_request_t xcb_req = { 2963 /* count */ 4, 2964 /* ext */ &xcb_xfixes_id, 2965 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, 2966 /* isvoid */ 1 2967 }; 2968 2969 struct iovec xcb_parts[6]; 2970 xcb_void_cookie_t xcb_ret; 2971 xcb_xfixes_change_cursor_by_name_request_t xcb_out; 2972 2973 xcb_out.src = src; 2974 xcb_out.nbytes = nbytes; 2975 memset(xcb_out.pad0, 0, 2); 2976 2977 xcb_parts[2].iov_base = (char *) &xcb_out; 2978 xcb_parts[2].iov_len = sizeof(xcb_out); 2979 xcb_parts[3].iov_base = 0; 2980 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2981 /* char name */ 2982 xcb_parts[4].iov_base = (char *) name; 2983 xcb_parts[4].iov_len = nbytes * sizeof(char); 2984 xcb_parts[5].iov_base = 0; 2985 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2986 2987 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2988 return xcb_ret; 2989 } 2990 2991 2992 /***************************************************************************** 2993 ** 2994 ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name 2995 ** 2996 ** @param xcb_connection_t *c 2997 ** @param xcb_cursor_t src 2998 ** @param uint16_t nbytes 2999 ** @param const char *name 3000 ** @returns xcb_void_cookie_t 3001 ** 3002 *****************************************************************************/ 3003 3004 xcb_void_cookie_t 3005 xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, 3006 xcb_cursor_t src /**< */, 3007 uint16_t nbytes /**< */, 3008 const char *name /**< */) 3009 { 3010 static const xcb_protocol_request_t xcb_req = { 3011 /* count */ 4, 3012 /* ext */ &xcb_xfixes_id, 3013 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, 3014 /* isvoid */ 1 3015 }; 3016 3017 struct iovec xcb_parts[6]; 3018 xcb_void_cookie_t xcb_ret; 3019 xcb_xfixes_change_cursor_by_name_request_t xcb_out; 3020 3021 xcb_out.src = src; 3022 xcb_out.nbytes = nbytes; 3023 memset(xcb_out.pad0, 0, 2); 3024 3025 xcb_parts[2].iov_base = (char *) &xcb_out; 3026 xcb_parts[2].iov_len = sizeof(xcb_out); 3027 xcb_parts[3].iov_base = 0; 3028 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3029 /* char name */ 3030 xcb_parts[4].iov_base = (char *) name; 3031 xcb_parts[4].iov_len = nbytes * sizeof(char); 3032 xcb_parts[5].iov_base = 0; 3033 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 3034 3035 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3036 return xcb_ret; 3037 } 3038 3039 3040 /***************************************************************************** 3041 ** 3042 ** xcb_void_cookie_t xcb_xfixes_expand_region_checked 3043 ** 3044 ** @param xcb_connection_t *c 3045 ** @param xcb_xfixes_region_t source 3046 ** @param xcb_xfixes_region_t destination 3047 ** @param uint16_t left 3048 ** @param uint16_t right 3049 ** @param uint16_t top 3050 ** @param uint16_t bottom 3051 ** @returns xcb_void_cookie_t 3052 ** 3053 *****************************************************************************/ 3054 3055 xcb_void_cookie_t 3056 xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, 3057 xcb_xfixes_region_t source /**< */, 3058 xcb_xfixes_region_t destination /**< */, 3059 uint16_t left /**< */, 3060 uint16_t right /**< */, 3061 uint16_t top /**< */, 3062 uint16_t bottom /**< */) 3063 { 3064 static const xcb_protocol_request_t xcb_req = { 3065 /* count */ 2, 3066 /* ext */ &xcb_xfixes_id, 3067 /* opcode */ XCB_XFIXES_EXPAND_REGION, 3068 /* isvoid */ 1 3069 }; 3070 3071 struct iovec xcb_parts[4]; 3072 xcb_void_cookie_t xcb_ret; 3073 xcb_xfixes_expand_region_request_t xcb_out; 3074 3075 xcb_out.source = source; 3076 xcb_out.destination = destination; 3077 xcb_out.left = left; 3078 xcb_out.right = right; 3079 xcb_out.top = top; 3080 xcb_out.bottom = bottom; 3081 3082 xcb_parts[2].iov_base = (char *) &xcb_out; 3083 xcb_parts[2].iov_len = sizeof(xcb_out); 3084 xcb_parts[3].iov_base = 0; 3085 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3086 3087 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3088 return xcb_ret; 3089 } 3090 3091 3092 /***************************************************************************** 3093 ** 3094 ** xcb_void_cookie_t xcb_xfixes_expand_region 3095 ** 3096 ** @param xcb_connection_t *c 3097 ** @param xcb_xfixes_region_t source 3098 ** @param xcb_xfixes_region_t destination 3099 ** @param uint16_t left 3100 ** @param uint16_t right 3101 ** @param uint16_t top 3102 ** @param uint16_t bottom 3103 ** @returns xcb_void_cookie_t 3104 ** 3105 *****************************************************************************/ 3106 3107 xcb_void_cookie_t 3108 xcb_xfixes_expand_region (xcb_connection_t *c /**< */, 3109 xcb_xfixes_region_t source /**< */, 3110 xcb_xfixes_region_t destination /**< */, 3111 uint16_t left /**< */, 3112 uint16_t right /**< */, 3113 uint16_t top /**< */, 3114 uint16_t bottom /**< */) 3115 { 3116 static const xcb_protocol_request_t xcb_req = { 3117 /* count */ 2, 3118 /* ext */ &xcb_xfixes_id, 3119 /* opcode */ XCB_XFIXES_EXPAND_REGION, 3120 /* isvoid */ 1 3121 }; 3122 3123 struct iovec xcb_parts[4]; 3124 xcb_void_cookie_t xcb_ret; 3125 xcb_xfixes_expand_region_request_t xcb_out; 3126 3127 xcb_out.source = source; 3128 xcb_out.destination = destination; 3129 xcb_out.left = left; 3130 xcb_out.right = right; 3131 xcb_out.top = top; 3132 xcb_out.bottom = bottom; 3133 3134 xcb_parts[2].iov_base = (char *) &xcb_out; 3135 xcb_parts[2].iov_len = sizeof(xcb_out); 3136 xcb_parts[3].iov_base = 0; 3137 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3138 3139 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3140 return xcb_ret; 3141 } 3142 3143 3144 /***************************************************************************** 3145 ** 3146 ** xcb_void_cookie_t xcb_xfixes_hide_cursor_checked 3147 ** 3148 ** @param xcb_connection_t *c 3149 ** @param xcb_window_t window 3150 ** @returns xcb_void_cookie_t 3151 ** 3152 *****************************************************************************/ 3153 3154 xcb_void_cookie_t 3155 xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */, 3156 xcb_window_t window /**< */) 3157 { 3158 static const xcb_protocol_request_t xcb_req = { 3159 /* count */ 2, 3160 /* ext */ &xcb_xfixes_id, 3161 /* opcode */ XCB_XFIXES_HIDE_CURSOR, 3162 /* isvoid */ 1 3163 }; 3164 3165 struct iovec xcb_parts[4]; 3166 xcb_void_cookie_t xcb_ret; 3167 xcb_xfixes_hide_cursor_request_t xcb_out; 3168 3169 xcb_out.window = window; 3170 3171 xcb_parts[2].iov_base = (char *) &xcb_out; 3172 xcb_parts[2].iov_len = sizeof(xcb_out); 3173 xcb_parts[3].iov_base = 0; 3174 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3175 3176 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3177 return xcb_ret; 3178 } 3179 3180 3181 /***************************************************************************** 3182 ** 3183 ** xcb_void_cookie_t xcb_xfixes_hide_cursor 3184 ** 3185 ** @param xcb_connection_t *c 3186 ** @param xcb_window_t window 3187 ** @returns xcb_void_cookie_t 3188 ** 3189 *****************************************************************************/ 3190 3191 xcb_void_cookie_t 3192 xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */, 3193 xcb_window_t window /**< */) 3194 { 3195 static const xcb_protocol_request_t xcb_req = { 3196 /* count */ 2, 3197 /* ext */ &xcb_xfixes_id, 3198 /* opcode */ XCB_XFIXES_HIDE_CURSOR, 3199 /* isvoid */ 1 3200 }; 3201 3202 struct iovec xcb_parts[4]; 3203 xcb_void_cookie_t xcb_ret; 3204 xcb_xfixes_hide_cursor_request_t xcb_out; 3205 3206 xcb_out.window = window; 3207 3208 xcb_parts[2].iov_base = (char *) &xcb_out; 3209 xcb_parts[2].iov_len = sizeof(xcb_out); 3210 xcb_parts[3].iov_base = 0; 3211 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3212 3213 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3214 return xcb_ret; 3215 } 3216 3217 3218 /***************************************************************************** 3219 ** 3220 ** xcb_void_cookie_t xcb_xfixes_show_cursor_checked 3221 ** 3222 ** @param xcb_connection_t *c 3223 ** @param xcb_window_t window 3224 ** @returns xcb_void_cookie_t 3225 ** 3226 *****************************************************************************/ 3227 3228 xcb_void_cookie_t 3229 xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */, 3230 xcb_window_t window /**< */) 3231 { 3232 static const xcb_protocol_request_t xcb_req = { 3233 /* count */ 2, 3234 /* ext */ &xcb_xfixes_id, 3235 /* opcode */ XCB_XFIXES_SHOW_CURSOR, 3236 /* isvoid */ 1 3237 }; 3238 3239 struct iovec xcb_parts[4]; 3240 xcb_void_cookie_t xcb_ret; 3241 xcb_xfixes_show_cursor_request_t xcb_out; 3242 3243 xcb_out.window = window; 3244 3245 xcb_parts[2].iov_base = (char *) &xcb_out; 3246 xcb_parts[2].iov_len = sizeof(xcb_out); 3247 xcb_parts[3].iov_base = 0; 3248 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3249 3250 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3251 return xcb_ret; 3252 } 3253 3254 3255 /***************************************************************************** 3256 ** 3257 ** xcb_void_cookie_t xcb_xfixes_show_cursor 3258 ** 3259 ** @param xcb_connection_t *c 3260 ** @param xcb_window_t window 3261 ** @returns xcb_void_cookie_t 3262 ** 3263 *****************************************************************************/ 3264 3265 xcb_void_cookie_t 3266 xcb_xfixes_show_cursor (xcb_connection_t *c /**< */, 3267 xcb_window_t window /**< */) 3268 { 3269 static const xcb_protocol_request_t xcb_req = { 3270 /* count */ 2, 3271 /* ext */ &xcb_xfixes_id, 3272 /* opcode */ XCB_XFIXES_SHOW_CURSOR, 3273 /* isvoid */ 1 3274 }; 3275 3276 struct iovec xcb_parts[4]; 3277 xcb_void_cookie_t xcb_ret; 3278 xcb_xfixes_show_cursor_request_t xcb_out; 3279 3280 xcb_out.window = window; 3281 3282 xcb_parts[2].iov_base = (char *) &xcb_out; 3283 xcb_parts[2].iov_len = sizeof(xcb_out); 3284 xcb_parts[3].iov_base = 0; 3285 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3286 3287 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3288 return xcb_ret; 3289 } 3290 3291 3292 /***************************************************************************** 3293 ** 3294 ** void xcb_xfixes_barrier_next 3295 ** 3296 ** @param xcb_xfixes_barrier_iterator_t *i 3297 ** @returns void 3298 ** 3299 *****************************************************************************/ 3300 3301 void 3302 xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i /**< */) 3303 { 3304 --i->rem; 3305 ++i->data; 3306 i->index += sizeof(xcb_xfixes_barrier_t); 3307 } 3308 3309 3310 /***************************************************************************** 3311 ** 3312 ** xcb_generic_iterator_t xcb_xfixes_barrier_end 3313 ** 3314 ** @param xcb_xfixes_barrier_iterator_t i 3315 ** @returns xcb_generic_iterator_t 3316 ** 3317 *****************************************************************************/ 3318 3319 xcb_generic_iterator_t 3320 xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i /**< */) 3321 { 3322 xcb_generic_iterator_t ret; 3323 ret.data = i.data + i.rem; 3324 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3325 ret.rem = 0; 3326 return ret; 3327 } 3328 3329 int 3330 xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer /**< */) 3331 { 3332 char *xcb_tmp = (char *)_buffer; 3333 const xcb_xfixes_create_pointer_barrier_request_t *_aux = (xcb_xfixes_create_pointer_barrier_request_t *)_buffer; 3334 unsigned int xcb_buffer_len = 0; 3335 unsigned int xcb_block_len = 0; 3336 unsigned int xcb_pad = 0; 3337 unsigned int xcb_align_to = 0; 3338 3339 3340 xcb_block_len += sizeof(xcb_xfixes_create_pointer_barrier_request_t); 3341 xcb_tmp += xcb_block_len; 3342 xcb_buffer_len += xcb_block_len; 3343 xcb_block_len = 0; 3344 /* devices */ 3345 xcb_block_len += _aux->num_devices * sizeof(uint16_t); 3346 xcb_tmp += xcb_block_len; 3347 xcb_align_to = ALIGNOF(uint16_t); 3348 /* insert padding */ 3349 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3350 xcb_buffer_len += xcb_block_len + xcb_pad; 3351 if (0 != xcb_pad) { 3352 xcb_tmp += xcb_pad; 3353 xcb_pad = 0; 3354 } 3355 xcb_block_len = 0; 3356 3357 return xcb_buffer_len; 3358 } 3359 3360 3361 /***************************************************************************** 3362 ** 3363 ** xcb_void_cookie_t xcb_xfixes_create_pointer_barrier_checked 3364 ** 3365 ** @param xcb_connection_t *c 3366 ** @param xcb_xfixes_barrier_t barrier 3367 ** @param xcb_window_t window 3368 ** @param uint16_t x1 3369 ** @param uint16_t y1 3370 ** @param uint16_t x2 3371 ** @param uint16_t y2 3372 ** @param uint32_t directions 3373 ** @param uint16_t num_devices 3374 ** @param const uint16_t *devices 3375 ** @returns xcb_void_cookie_t 3376 ** 3377 *****************************************************************************/ 3378 3379 xcb_void_cookie_t 3380 xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c /**< */, 3381 xcb_xfixes_barrier_t barrier /**< */, 3382 xcb_window_t window /**< */, 3383 uint16_t x1 /**< */, 3384 uint16_t y1 /**< */, 3385 uint16_t x2 /**< */, 3386 uint16_t y2 /**< */, 3387 uint32_t directions /**< */, 3388 uint16_t num_devices /**< */, 3389 const uint16_t *devices /**< */) 3390 { 3391 static const xcb_protocol_request_t xcb_req = { 3392 /* count */ 4, 3393 /* ext */ &xcb_xfixes_id, 3394 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER, 3395 /* isvoid */ 1 3396 }; 3397 3398 struct iovec xcb_parts[6]; 3399 xcb_void_cookie_t xcb_ret; 3400 xcb_xfixes_create_pointer_barrier_request_t xcb_out; 3401 3402 xcb_out.barrier = barrier; 3403 xcb_out.window = window; 3404 xcb_out.x1 = x1; 3405 xcb_out.y1 = y1; 3406 xcb_out.x2 = x2; 3407 xcb_out.y2 = y2; 3408 xcb_out.directions = directions; 3409 memset(xcb_out.pad0, 0, 2); 3410 xcb_out.num_devices = num_devices; 3411 3412 xcb_parts[2].iov_base = (char *) &xcb_out; 3413 xcb_parts[2].iov_len = sizeof(xcb_out); 3414 xcb_parts[3].iov_base = 0; 3415 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3416 /* uint16_t devices */ 3417 xcb_parts[4].iov_base = (char *) devices; 3418 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t); 3419 xcb_parts[5].iov_base = 0; 3420 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 3421 3422 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3423 return xcb_ret; 3424 } 3425 3426 3427 /***************************************************************************** 3428 ** 3429 ** xcb_void_cookie_t xcb_xfixes_create_pointer_barrier 3430 ** 3431 ** @param xcb_connection_t *c 3432 ** @param xcb_xfixes_barrier_t barrier 3433 ** @param xcb_window_t window 3434 ** @param uint16_t x1 3435 ** @param uint16_t y1 3436 ** @param uint16_t x2 3437 ** @param uint16_t y2 3438 ** @param uint32_t directions 3439 ** @param uint16_t num_devices 3440 ** @param const uint16_t *devices 3441 ** @returns xcb_void_cookie_t 3442 ** 3443 *****************************************************************************/ 3444 3445 xcb_void_cookie_t 3446 xcb_xfixes_create_pointer_barrier (xcb_connection_t *c /**< */, 3447 xcb_xfixes_barrier_t barrier /**< */, 3448 xcb_window_t window /**< */, 3449 uint16_t x1 /**< */, 3450 uint16_t y1 /**< */, 3451 uint16_t x2 /**< */, 3452 uint16_t y2 /**< */, 3453 uint32_t directions /**< */, 3454 uint16_t num_devices /**< */, 3455 const uint16_t *devices /**< */) 3456 { 3457 static const xcb_protocol_request_t xcb_req = { 3458 /* count */ 4, 3459 /* ext */ &xcb_xfixes_id, 3460 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER, 3461 /* isvoid */ 1 3462 }; 3463 3464 struct iovec xcb_parts[6]; 3465 xcb_void_cookie_t xcb_ret; 3466 xcb_xfixes_create_pointer_barrier_request_t xcb_out; 3467 3468 xcb_out.barrier = barrier; 3469 xcb_out.window = window; 3470 xcb_out.x1 = x1; 3471 xcb_out.y1 = y1; 3472 xcb_out.x2 = x2; 3473 xcb_out.y2 = y2; 3474 xcb_out.directions = directions; 3475 memset(xcb_out.pad0, 0, 2); 3476 xcb_out.num_devices = num_devices; 3477 3478 xcb_parts[2].iov_base = (char *) &xcb_out; 3479 xcb_parts[2].iov_len = sizeof(xcb_out); 3480 xcb_parts[3].iov_base = 0; 3481 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3482 /* uint16_t devices */ 3483 xcb_parts[4].iov_base = (char *) devices; 3484 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t); 3485 xcb_parts[5].iov_base = 0; 3486 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 3487 3488 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3489 return xcb_ret; 3490 } 3491 3492 3493 /***************************************************************************** 3494 ** 3495 ** xcb_void_cookie_t xcb_xfixes_delete_pointer_barrier_checked 3496 ** 3497 ** @param xcb_connection_t *c 3498 ** @param xcb_xfixes_barrier_t barrier 3499 ** @returns xcb_void_cookie_t 3500 ** 3501 *****************************************************************************/ 3502 3503 xcb_void_cookie_t 3504 xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c /**< */, 3505 xcb_xfixes_barrier_t barrier /**< */) 3506 { 3507 static const xcb_protocol_request_t xcb_req = { 3508 /* count */ 2, 3509 /* ext */ &xcb_xfixes_id, 3510 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER, 3511 /* isvoid */ 1 3512 }; 3513 3514 struct iovec xcb_parts[4]; 3515 xcb_void_cookie_t xcb_ret; 3516 xcb_xfixes_delete_pointer_barrier_request_t xcb_out; 3517 3518 xcb_out.barrier = barrier; 3519 3520 xcb_parts[2].iov_base = (char *) &xcb_out; 3521 xcb_parts[2].iov_len = sizeof(xcb_out); 3522 xcb_parts[3].iov_base = 0; 3523 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3524 3525 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3526 return xcb_ret; 3527 } 3528 3529 3530 /***************************************************************************** 3531 ** 3532 ** xcb_void_cookie_t xcb_xfixes_delete_pointer_barrier 3533 ** 3534 ** @param xcb_connection_t *c 3535 ** @param xcb_xfixes_barrier_t barrier 3536 ** @returns xcb_void_cookie_t 3537 ** 3538 *****************************************************************************/ 3539 3540 xcb_void_cookie_t 3541 xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c /**< */, 3542 xcb_xfixes_barrier_t barrier /**< */) 3543 { 3544 static const xcb_protocol_request_t xcb_req = { 3545 /* count */ 2, 3546 /* ext */ &xcb_xfixes_id, 3547 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER, 3548 /* isvoid */ 1 3549 }; 3550 3551 struct iovec xcb_parts[4]; 3552 xcb_void_cookie_t xcb_ret; 3553 xcb_xfixes_delete_pointer_barrier_request_t xcb_out; 3554 3555 xcb_out.barrier = barrier; 3556 3557 xcb_parts[2].iov_base = (char *) &xcb_out; 3558 xcb_parts[2].iov_len = sizeof(xcb_out); 3559 xcb_parts[3].iov_base = 0; 3560 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3561 3562 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3563 return xcb_ret; 3564 } 3565 3566