1 /* 2 * This file generated automatically from randr.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 "randr.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 #include "render.h" 19 20 xcb_extension_t xcb_randr_id = { "RANDR", 0 }; 21 22 23 /***************************************************************************** 24 ** 25 ** void xcb_randr_mode_next 26 ** 27 ** @param xcb_randr_mode_iterator_t *i 28 ** @returns void 29 ** 30 *****************************************************************************/ 31 32 void 33 xcb_randr_mode_next (xcb_randr_mode_iterator_t *i /**< */) 34 { 35 --i->rem; 36 ++i->data; 37 i->index += sizeof(xcb_randr_mode_t); 38 } 39 40 41 /***************************************************************************** 42 ** 43 ** xcb_generic_iterator_t xcb_randr_mode_end 44 ** 45 ** @param xcb_randr_mode_iterator_t i 46 ** @returns xcb_generic_iterator_t 47 ** 48 *****************************************************************************/ 49 50 xcb_generic_iterator_t 51 xcb_randr_mode_end (xcb_randr_mode_iterator_t i /**< */) 52 { 53 xcb_generic_iterator_t ret; 54 ret.data = i.data + i.rem; 55 ret.index = i.index + ((char *) ret.data - (char *) i.data); 56 ret.rem = 0; 57 return ret; 58 } 59 60 61 /***************************************************************************** 62 ** 63 ** void xcb_randr_crtc_next 64 ** 65 ** @param xcb_randr_crtc_iterator_t *i 66 ** @returns void 67 ** 68 *****************************************************************************/ 69 70 void 71 xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i /**< */) 72 { 73 --i->rem; 74 ++i->data; 75 i->index += sizeof(xcb_randr_crtc_t); 76 } 77 78 79 /***************************************************************************** 80 ** 81 ** xcb_generic_iterator_t xcb_randr_crtc_end 82 ** 83 ** @param xcb_randr_crtc_iterator_t i 84 ** @returns xcb_generic_iterator_t 85 ** 86 *****************************************************************************/ 87 88 xcb_generic_iterator_t 89 xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i /**< */) 90 { 91 xcb_generic_iterator_t ret; 92 ret.data = i.data + i.rem; 93 ret.index = i.index + ((char *) ret.data - (char *) i.data); 94 ret.rem = 0; 95 return ret; 96 } 97 98 99 /***************************************************************************** 100 ** 101 ** void xcb_randr_output_next 102 ** 103 ** @param xcb_randr_output_iterator_t *i 104 ** @returns void 105 ** 106 *****************************************************************************/ 107 108 void 109 xcb_randr_output_next (xcb_randr_output_iterator_t *i /**< */) 110 { 111 --i->rem; 112 ++i->data; 113 i->index += sizeof(xcb_randr_output_t); 114 } 115 116 117 /***************************************************************************** 118 ** 119 ** xcb_generic_iterator_t xcb_randr_output_end 120 ** 121 ** @param xcb_randr_output_iterator_t i 122 ** @returns xcb_generic_iterator_t 123 ** 124 *****************************************************************************/ 125 126 xcb_generic_iterator_t 127 xcb_randr_output_end (xcb_randr_output_iterator_t i /**< */) 128 { 129 xcb_generic_iterator_t ret; 130 ret.data = i.data + i.rem; 131 ret.index = i.index + ((char *) ret.data - (char *) i.data); 132 ret.rem = 0; 133 return ret; 134 } 135 136 137 /***************************************************************************** 138 ** 139 ** void xcb_randr_provider_next 140 ** 141 ** @param xcb_randr_provider_iterator_t *i 142 ** @returns void 143 ** 144 *****************************************************************************/ 145 146 void 147 xcb_randr_provider_next (xcb_randr_provider_iterator_t *i /**< */) 148 { 149 --i->rem; 150 ++i->data; 151 i->index += sizeof(xcb_randr_provider_t); 152 } 153 154 155 /***************************************************************************** 156 ** 157 ** xcb_generic_iterator_t xcb_randr_provider_end 158 ** 159 ** @param xcb_randr_provider_iterator_t i 160 ** @returns xcb_generic_iterator_t 161 ** 162 *****************************************************************************/ 163 164 xcb_generic_iterator_t 165 xcb_randr_provider_end (xcb_randr_provider_iterator_t i /**< */) 166 { 167 xcb_generic_iterator_t ret; 168 ret.data = i.data + i.rem; 169 ret.index = i.index + ((char *) ret.data - (char *) i.data); 170 ret.rem = 0; 171 return ret; 172 } 173 174 175 /***************************************************************************** 176 ** 177 ** void xcb_randr_screen_size_next 178 ** 179 ** @param xcb_randr_screen_size_iterator_t *i 180 ** @returns void 181 ** 182 *****************************************************************************/ 183 184 void 185 xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */) 186 { 187 --i->rem; 188 ++i->data; 189 i->index += sizeof(xcb_randr_screen_size_t); 190 } 191 192 193 /***************************************************************************** 194 ** 195 ** xcb_generic_iterator_t xcb_randr_screen_size_end 196 ** 197 ** @param xcb_randr_screen_size_iterator_t i 198 ** @returns xcb_generic_iterator_t 199 ** 200 *****************************************************************************/ 201 202 xcb_generic_iterator_t 203 xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */) 204 { 205 xcb_generic_iterator_t ret; 206 ret.data = i.data + i.rem; 207 ret.index = i.index + ((char *) ret.data - (char *) i.data); 208 ret.rem = 0; 209 return ret; 210 } 211 212 int 213 xcb_randr_refresh_rates_sizeof (const void *_buffer /**< */) 214 { 215 char *xcb_tmp = (char *)_buffer; 216 const xcb_randr_refresh_rates_t *_aux = (xcb_randr_refresh_rates_t *)_buffer; 217 unsigned int xcb_buffer_len = 0; 218 unsigned int xcb_block_len = 0; 219 unsigned int xcb_pad = 0; 220 unsigned int xcb_align_to = 0; 221 222 223 xcb_block_len += sizeof(xcb_randr_refresh_rates_t); 224 xcb_tmp += xcb_block_len; 225 xcb_buffer_len += xcb_block_len; 226 xcb_block_len = 0; 227 /* rates */ 228 xcb_block_len += _aux->nRates * sizeof(uint16_t); 229 xcb_tmp += xcb_block_len; 230 xcb_align_to = ALIGNOF(uint16_t); 231 /* insert padding */ 232 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 233 xcb_buffer_len += xcb_block_len + xcb_pad; 234 if (0 != xcb_pad) { 235 xcb_tmp += xcb_pad; 236 xcb_pad = 0; 237 } 238 xcb_block_len = 0; 239 240 return xcb_buffer_len; 241 } 242 243 244 /***************************************************************************** 245 ** 246 ** uint16_t * xcb_randr_refresh_rates_rates 247 ** 248 ** @param const xcb_randr_refresh_rates_t *R 249 ** @returns uint16_t * 250 ** 251 *****************************************************************************/ 252 253 uint16_t * 254 xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R /**< */) 255 { 256 return (uint16_t *) (R + 1); 257 } 258 259 260 /***************************************************************************** 261 ** 262 ** int xcb_randr_refresh_rates_rates_length 263 ** 264 ** @param const xcb_randr_refresh_rates_t *R 265 ** @returns int 266 ** 267 *****************************************************************************/ 268 269 int 270 xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R /**< */) 271 { 272 return R->nRates; 273 } 274 275 276 /***************************************************************************** 277 ** 278 ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end 279 ** 280 ** @param const xcb_randr_refresh_rates_t *R 281 ** @returns xcb_generic_iterator_t 282 ** 283 *****************************************************************************/ 284 285 xcb_generic_iterator_t 286 xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R /**< */) 287 { 288 xcb_generic_iterator_t i; 289 i.data = ((uint16_t *) (R + 1)) + (R->nRates); 290 i.rem = 0; 291 i.index = (char *) i.data - (char *) R; 292 return i; 293 } 294 295 296 /***************************************************************************** 297 ** 298 ** void xcb_randr_refresh_rates_next 299 ** 300 ** @param xcb_randr_refresh_rates_iterator_t *i 301 ** @returns void 302 ** 303 *****************************************************************************/ 304 305 void 306 xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i /**< */) 307 { 308 xcb_randr_refresh_rates_t *R = i->data; 309 xcb_generic_iterator_t child; 310 child.data = (xcb_randr_refresh_rates_t *)(((char *)R) + xcb_randr_refresh_rates_sizeof(R)); 311 i->index = (char *) child.data - (char *) i->data; 312 --i->rem; 313 i->data = (xcb_randr_refresh_rates_t *) child.data; 314 } 315 316 317 /***************************************************************************** 318 ** 319 ** xcb_generic_iterator_t xcb_randr_refresh_rates_end 320 ** 321 ** @param xcb_randr_refresh_rates_iterator_t i 322 ** @returns xcb_generic_iterator_t 323 ** 324 *****************************************************************************/ 325 326 xcb_generic_iterator_t 327 xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */) 328 { 329 xcb_generic_iterator_t ret; 330 while(i.rem > 0) 331 xcb_randr_refresh_rates_next(&i); 332 ret.data = i.data; 333 ret.rem = i.rem; 334 ret.index = i.index; 335 return ret; 336 } 337 338 339 /***************************************************************************** 340 ** 341 ** xcb_randr_query_version_cookie_t xcb_randr_query_version 342 ** 343 ** @param xcb_connection_t *c 344 ** @param uint32_t major_version 345 ** @param uint32_t minor_version 346 ** @returns xcb_randr_query_version_cookie_t 347 ** 348 *****************************************************************************/ 349 350 xcb_randr_query_version_cookie_t 351 xcb_randr_query_version (xcb_connection_t *c /**< */, 352 uint32_t major_version /**< */, 353 uint32_t minor_version /**< */) 354 { 355 static const xcb_protocol_request_t xcb_req = { 356 /* count */ 2, 357 /* ext */ &xcb_randr_id, 358 /* opcode */ XCB_RANDR_QUERY_VERSION, 359 /* isvoid */ 0 360 }; 361 362 struct iovec xcb_parts[4]; 363 xcb_randr_query_version_cookie_t xcb_ret; 364 xcb_randr_query_version_request_t xcb_out; 365 366 xcb_out.major_version = major_version; 367 xcb_out.minor_version = minor_version; 368 369 xcb_parts[2].iov_base = (char *) &xcb_out; 370 xcb_parts[2].iov_len = sizeof(xcb_out); 371 xcb_parts[3].iov_base = 0; 372 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 373 374 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 375 return xcb_ret; 376 } 377 378 379 /***************************************************************************** 380 ** 381 ** xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked 382 ** 383 ** @param xcb_connection_t *c 384 ** @param uint32_t major_version 385 ** @param uint32_t minor_version 386 ** @returns xcb_randr_query_version_cookie_t 387 ** 388 *****************************************************************************/ 389 390 xcb_randr_query_version_cookie_t 391 xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */, 392 uint32_t major_version /**< */, 393 uint32_t minor_version /**< */) 394 { 395 static const xcb_protocol_request_t xcb_req = { 396 /* count */ 2, 397 /* ext */ &xcb_randr_id, 398 /* opcode */ XCB_RANDR_QUERY_VERSION, 399 /* isvoid */ 0 400 }; 401 402 struct iovec xcb_parts[4]; 403 xcb_randr_query_version_cookie_t xcb_ret; 404 xcb_randr_query_version_request_t xcb_out; 405 406 xcb_out.major_version = major_version; 407 xcb_out.minor_version = minor_version; 408 409 xcb_parts[2].iov_base = (char *) &xcb_out; 410 xcb_parts[2].iov_len = sizeof(xcb_out); 411 xcb_parts[3].iov_base = 0; 412 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 413 414 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 415 return xcb_ret; 416 } 417 418 419 /***************************************************************************** 420 ** 421 ** xcb_randr_query_version_reply_t * xcb_randr_query_version_reply 422 ** 423 ** @param xcb_connection_t *c 424 ** @param xcb_randr_query_version_cookie_t cookie 425 ** @param xcb_generic_error_t **e 426 ** @returns xcb_randr_query_version_reply_t * 427 ** 428 *****************************************************************************/ 429 430 xcb_randr_query_version_reply_t * 431 xcb_randr_query_version_reply (xcb_connection_t *c /**< */, 432 xcb_randr_query_version_cookie_t cookie /**< */, 433 xcb_generic_error_t **e /**< */) 434 { 435 return (xcb_randr_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 436 } 437 438 439 /***************************************************************************** 440 ** 441 ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config 442 ** 443 ** @param xcb_connection_t *c 444 ** @param xcb_window_t window 445 ** @param xcb_timestamp_t timestamp 446 ** @param xcb_timestamp_t config_timestamp 447 ** @param uint16_t sizeID 448 ** @param uint16_t rotation 449 ** @param uint16_t rate 450 ** @returns xcb_randr_set_screen_config_cookie_t 451 ** 452 *****************************************************************************/ 453 454 xcb_randr_set_screen_config_cookie_t 455 xcb_randr_set_screen_config (xcb_connection_t *c /**< */, 456 xcb_window_t window /**< */, 457 xcb_timestamp_t timestamp /**< */, 458 xcb_timestamp_t config_timestamp /**< */, 459 uint16_t sizeID /**< */, 460 uint16_t rotation /**< */, 461 uint16_t rate /**< */) 462 { 463 static const xcb_protocol_request_t xcb_req = { 464 /* count */ 2, 465 /* ext */ &xcb_randr_id, 466 /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG, 467 /* isvoid */ 0 468 }; 469 470 struct iovec xcb_parts[4]; 471 xcb_randr_set_screen_config_cookie_t xcb_ret; 472 xcb_randr_set_screen_config_request_t xcb_out; 473 474 xcb_out.window = window; 475 xcb_out.timestamp = timestamp; 476 xcb_out.config_timestamp = config_timestamp; 477 xcb_out.sizeID = sizeID; 478 xcb_out.rotation = rotation; 479 xcb_out.rate = rate; 480 memset(xcb_out.pad0, 0, 2); 481 482 xcb_parts[2].iov_base = (char *) &xcb_out; 483 xcb_parts[2].iov_len = sizeof(xcb_out); 484 xcb_parts[3].iov_base = 0; 485 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 486 487 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 488 return xcb_ret; 489 } 490 491 492 /***************************************************************************** 493 ** 494 ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked 495 ** 496 ** @param xcb_connection_t *c 497 ** @param xcb_window_t window 498 ** @param xcb_timestamp_t timestamp 499 ** @param xcb_timestamp_t config_timestamp 500 ** @param uint16_t sizeID 501 ** @param uint16_t rotation 502 ** @param uint16_t rate 503 ** @returns xcb_randr_set_screen_config_cookie_t 504 ** 505 *****************************************************************************/ 506 507 xcb_randr_set_screen_config_cookie_t 508 xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */, 509 xcb_window_t window /**< */, 510 xcb_timestamp_t timestamp /**< */, 511 xcb_timestamp_t config_timestamp /**< */, 512 uint16_t sizeID /**< */, 513 uint16_t rotation /**< */, 514 uint16_t rate /**< */) 515 { 516 static const xcb_protocol_request_t xcb_req = { 517 /* count */ 2, 518 /* ext */ &xcb_randr_id, 519 /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG, 520 /* isvoid */ 0 521 }; 522 523 struct iovec xcb_parts[4]; 524 xcb_randr_set_screen_config_cookie_t xcb_ret; 525 xcb_randr_set_screen_config_request_t xcb_out; 526 527 xcb_out.window = window; 528 xcb_out.timestamp = timestamp; 529 xcb_out.config_timestamp = config_timestamp; 530 xcb_out.sizeID = sizeID; 531 xcb_out.rotation = rotation; 532 xcb_out.rate = rate; 533 memset(xcb_out.pad0, 0, 2); 534 535 xcb_parts[2].iov_base = (char *) &xcb_out; 536 xcb_parts[2].iov_len = sizeof(xcb_out); 537 xcb_parts[3].iov_base = 0; 538 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 539 540 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 541 return xcb_ret; 542 } 543 544 545 /***************************************************************************** 546 ** 547 ** xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply 548 ** 549 ** @param xcb_connection_t *c 550 ** @param xcb_randr_set_screen_config_cookie_t cookie 551 ** @param xcb_generic_error_t **e 552 ** @returns xcb_randr_set_screen_config_reply_t * 553 ** 554 *****************************************************************************/ 555 556 xcb_randr_set_screen_config_reply_t * 557 xcb_randr_set_screen_config_reply (xcb_connection_t *c /**< */, 558 xcb_randr_set_screen_config_cookie_t cookie /**< */, 559 xcb_generic_error_t **e /**< */) 560 { 561 return (xcb_randr_set_screen_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 562 } 563 564 565 /***************************************************************************** 566 ** 567 ** xcb_void_cookie_t xcb_randr_select_input_checked 568 ** 569 ** @param xcb_connection_t *c 570 ** @param xcb_window_t window 571 ** @param uint16_t enable 572 ** @returns xcb_void_cookie_t 573 ** 574 *****************************************************************************/ 575 576 xcb_void_cookie_t 577 xcb_randr_select_input_checked (xcb_connection_t *c /**< */, 578 xcb_window_t window /**< */, 579 uint16_t enable /**< */) 580 { 581 static const xcb_protocol_request_t xcb_req = { 582 /* count */ 2, 583 /* ext */ &xcb_randr_id, 584 /* opcode */ XCB_RANDR_SELECT_INPUT, 585 /* isvoid */ 1 586 }; 587 588 struct iovec xcb_parts[4]; 589 xcb_void_cookie_t xcb_ret; 590 xcb_randr_select_input_request_t xcb_out; 591 592 xcb_out.window = window; 593 xcb_out.enable = enable; 594 memset(xcb_out.pad0, 0, 2); 595 596 xcb_parts[2].iov_base = (char *) &xcb_out; 597 xcb_parts[2].iov_len = sizeof(xcb_out); 598 xcb_parts[3].iov_base = 0; 599 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 600 601 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 602 return xcb_ret; 603 } 604 605 606 /***************************************************************************** 607 ** 608 ** xcb_void_cookie_t xcb_randr_select_input 609 ** 610 ** @param xcb_connection_t *c 611 ** @param xcb_window_t window 612 ** @param uint16_t enable 613 ** @returns xcb_void_cookie_t 614 ** 615 *****************************************************************************/ 616 617 xcb_void_cookie_t 618 xcb_randr_select_input (xcb_connection_t *c /**< */, 619 xcb_window_t window /**< */, 620 uint16_t enable /**< */) 621 { 622 static const xcb_protocol_request_t xcb_req = { 623 /* count */ 2, 624 /* ext */ &xcb_randr_id, 625 /* opcode */ XCB_RANDR_SELECT_INPUT, 626 /* isvoid */ 1 627 }; 628 629 struct iovec xcb_parts[4]; 630 xcb_void_cookie_t xcb_ret; 631 xcb_randr_select_input_request_t xcb_out; 632 633 xcb_out.window = window; 634 xcb_out.enable = enable; 635 memset(xcb_out.pad0, 0, 2); 636 637 xcb_parts[2].iov_base = (char *) &xcb_out; 638 xcb_parts[2].iov_len = sizeof(xcb_out); 639 xcb_parts[3].iov_base = 0; 640 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 641 642 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 643 return xcb_ret; 644 } 645 646 int 647 xcb_randr_get_screen_info_sizeof (const void *_buffer /**< */) 648 { 649 char *xcb_tmp = (char *)_buffer; 650 const xcb_randr_get_screen_info_reply_t *_aux = (xcb_randr_get_screen_info_reply_t *)_buffer; 651 unsigned int xcb_buffer_len = 0; 652 unsigned int xcb_block_len = 0; 653 unsigned int xcb_pad = 0; 654 unsigned int xcb_align_to = 0; 655 656 unsigned int i; 657 unsigned int xcb_tmp_len; 658 659 xcb_block_len += sizeof(xcb_randr_get_screen_info_reply_t); 660 xcb_tmp += xcb_block_len; 661 xcb_buffer_len += xcb_block_len; 662 xcb_block_len = 0; 663 /* sizes */ 664 xcb_block_len += _aux->nSizes * sizeof(xcb_randr_screen_size_t); 665 xcb_tmp += xcb_block_len; 666 xcb_align_to = ALIGNOF(xcb_randr_screen_size_t); 667 /* insert padding */ 668 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 669 xcb_buffer_len += xcb_block_len + xcb_pad; 670 if (0 != xcb_pad) { 671 xcb_tmp += xcb_pad; 672 xcb_pad = 0; 673 } 674 xcb_block_len = 0; 675 /* rates */ 676 for(i=0; i<(_aux->nInfo - _aux->nSizes); i++) { 677 xcb_tmp_len = xcb_randr_refresh_rates_sizeof(xcb_tmp); 678 xcb_block_len += xcb_tmp_len; 679 xcb_tmp += xcb_tmp_len; 680 } 681 xcb_align_to = ALIGNOF(xcb_randr_refresh_rates_t); 682 /* insert padding */ 683 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 684 xcb_buffer_len += xcb_block_len + xcb_pad; 685 if (0 != xcb_pad) { 686 xcb_tmp += xcb_pad; 687 xcb_pad = 0; 688 } 689 xcb_block_len = 0; 690 691 return xcb_buffer_len; 692 } 693 694 695 /***************************************************************************** 696 ** 697 ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info 698 ** 699 ** @param xcb_connection_t *c 700 ** @param xcb_window_t window 701 ** @returns xcb_randr_get_screen_info_cookie_t 702 ** 703 *****************************************************************************/ 704 705 xcb_randr_get_screen_info_cookie_t 706 xcb_randr_get_screen_info (xcb_connection_t *c /**< */, 707 xcb_window_t window /**< */) 708 { 709 static const xcb_protocol_request_t xcb_req = { 710 /* count */ 2, 711 /* ext */ &xcb_randr_id, 712 /* opcode */ XCB_RANDR_GET_SCREEN_INFO, 713 /* isvoid */ 0 714 }; 715 716 struct iovec xcb_parts[4]; 717 xcb_randr_get_screen_info_cookie_t xcb_ret; 718 xcb_randr_get_screen_info_request_t xcb_out; 719 720 xcb_out.window = window; 721 722 xcb_parts[2].iov_base = (char *) &xcb_out; 723 xcb_parts[2].iov_len = sizeof(xcb_out); 724 xcb_parts[3].iov_base = 0; 725 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 726 727 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 728 return xcb_ret; 729 } 730 731 732 /***************************************************************************** 733 ** 734 ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked 735 ** 736 ** @param xcb_connection_t *c 737 ** @param xcb_window_t window 738 ** @returns xcb_randr_get_screen_info_cookie_t 739 ** 740 *****************************************************************************/ 741 742 xcb_randr_get_screen_info_cookie_t 743 xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */, 744 xcb_window_t window /**< */) 745 { 746 static const xcb_protocol_request_t xcb_req = { 747 /* count */ 2, 748 /* ext */ &xcb_randr_id, 749 /* opcode */ XCB_RANDR_GET_SCREEN_INFO, 750 /* isvoid */ 0 751 }; 752 753 struct iovec xcb_parts[4]; 754 xcb_randr_get_screen_info_cookie_t xcb_ret; 755 xcb_randr_get_screen_info_request_t xcb_out; 756 757 xcb_out.window = window; 758 759 xcb_parts[2].iov_base = (char *) &xcb_out; 760 xcb_parts[2].iov_len = sizeof(xcb_out); 761 xcb_parts[3].iov_base = 0; 762 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 763 764 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 765 return xcb_ret; 766 } 767 768 769 /***************************************************************************** 770 ** 771 ** xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes 772 ** 773 ** @param const xcb_randr_get_screen_info_reply_t *R 774 ** @returns xcb_randr_screen_size_t * 775 ** 776 *****************************************************************************/ 777 778 xcb_randr_screen_size_t * 779 xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R /**< */) 780 { 781 return (xcb_randr_screen_size_t *) (R + 1); 782 } 783 784 785 /***************************************************************************** 786 ** 787 ** int xcb_randr_get_screen_info_sizes_length 788 ** 789 ** @param const xcb_randr_get_screen_info_reply_t *R 790 ** @returns int 791 ** 792 *****************************************************************************/ 793 794 int 795 xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R /**< */) 796 { 797 return R->nSizes; 798 } 799 800 801 /***************************************************************************** 802 ** 803 ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator 804 ** 805 ** @param const xcb_randr_get_screen_info_reply_t *R 806 ** @returns xcb_randr_screen_size_iterator_t 807 ** 808 *****************************************************************************/ 809 810 xcb_randr_screen_size_iterator_t 811 xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */) 812 { 813 xcb_randr_screen_size_iterator_t i; 814 i.data = (xcb_randr_screen_size_t *) (R + 1); 815 i.rem = R->nSizes; 816 i.index = (char *) i.data - (char *) R; 817 return i; 818 } 819 820 821 /***************************************************************************** 822 ** 823 ** int xcb_randr_get_screen_info_rates_length 824 ** 825 ** @param const xcb_randr_get_screen_info_reply_t *R 826 ** @returns int 827 ** 828 *****************************************************************************/ 829 830 int 831 xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R /**< */) 832 { 833 return (R->nInfo - R->nSizes); 834 } 835 836 837 /***************************************************************************** 838 ** 839 ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator 840 ** 841 ** @param const xcb_randr_get_screen_info_reply_t *R 842 ** @returns xcb_randr_refresh_rates_iterator_t 843 ** 844 *****************************************************************************/ 845 846 xcb_randr_refresh_rates_iterator_t 847 xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */) 848 { 849 xcb_randr_refresh_rates_iterator_t i; 850 xcb_generic_iterator_t prev = xcb_randr_screen_size_end(xcb_randr_get_screen_info_sizes_iterator(R)); 851 i.data = (xcb_randr_refresh_rates_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_refresh_rates_t, prev.index)); 852 i.rem = (R->nInfo - R->nSizes); 853 i.index = (char *) i.data - (char *) R; 854 return i; 855 } 856 857 858 /***************************************************************************** 859 ** 860 ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply 861 ** 862 ** @param xcb_connection_t *c 863 ** @param xcb_randr_get_screen_info_cookie_t cookie 864 ** @param xcb_generic_error_t **e 865 ** @returns xcb_randr_get_screen_info_reply_t * 866 ** 867 *****************************************************************************/ 868 869 xcb_randr_get_screen_info_reply_t * 870 xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */, 871 xcb_randr_get_screen_info_cookie_t cookie /**< */, 872 xcb_generic_error_t **e /**< */) 873 { 874 return (xcb_randr_get_screen_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 875 } 876 877 878 /***************************************************************************** 879 ** 880 ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range 881 ** 882 ** @param xcb_connection_t *c 883 ** @param xcb_window_t window 884 ** @returns xcb_randr_get_screen_size_range_cookie_t 885 ** 886 *****************************************************************************/ 887 888 xcb_randr_get_screen_size_range_cookie_t 889 xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */, 890 xcb_window_t window /**< */) 891 { 892 static const xcb_protocol_request_t xcb_req = { 893 /* count */ 2, 894 /* ext */ &xcb_randr_id, 895 /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE, 896 /* isvoid */ 0 897 }; 898 899 struct iovec xcb_parts[4]; 900 xcb_randr_get_screen_size_range_cookie_t xcb_ret; 901 xcb_randr_get_screen_size_range_request_t xcb_out; 902 903 xcb_out.window = window; 904 905 xcb_parts[2].iov_base = (char *) &xcb_out; 906 xcb_parts[2].iov_len = sizeof(xcb_out); 907 xcb_parts[3].iov_base = 0; 908 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 909 910 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 911 return xcb_ret; 912 } 913 914 915 /***************************************************************************** 916 ** 917 ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked 918 ** 919 ** @param xcb_connection_t *c 920 ** @param xcb_window_t window 921 ** @returns xcb_randr_get_screen_size_range_cookie_t 922 ** 923 *****************************************************************************/ 924 925 xcb_randr_get_screen_size_range_cookie_t 926 xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c /**< */, 927 xcb_window_t window /**< */) 928 { 929 static const xcb_protocol_request_t xcb_req = { 930 /* count */ 2, 931 /* ext */ &xcb_randr_id, 932 /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE, 933 /* isvoid */ 0 934 }; 935 936 struct iovec xcb_parts[4]; 937 xcb_randr_get_screen_size_range_cookie_t xcb_ret; 938 xcb_randr_get_screen_size_range_request_t xcb_out; 939 940 xcb_out.window = window; 941 942 xcb_parts[2].iov_base = (char *) &xcb_out; 943 xcb_parts[2].iov_len = sizeof(xcb_out); 944 xcb_parts[3].iov_base = 0; 945 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 946 947 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 948 return xcb_ret; 949 } 950 951 952 /***************************************************************************** 953 ** 954 ** xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply 955 ** 956 ** @param xcb_connection_t *c 957 ** @param xcb_randr_get_screen_size_range_cookie_t cookie 958 ** @param xcb_generic_error_t **e 959 ** @returns xcb_randr_get_screen_size_range_reply_t * 960 ** 961 *****************************************************************************/ 962 963 xcb_randr_get_screen_size_range_reply_t * 964 xcb_randr_get_screen_size_range_reply (xcb_connection_t *c /**< */, 965 xcb_randr_get_screen_size_range_cookie_t cookie /**< */, 966 xcb_generic_error_t **e /**< */) 967 { 968 return (xcb_randr_get_screen_size_range_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 969 } 970 971 972 /***************************************************************************** 973 ** 974 ** xcb_void_cookie_t xcb_randr_set_screen_size_checked 975 ** 976 ** @param xcb_connection_t *c 977 ** @param xcb_window_t window 978 ** @param uint16_t width 979 ** @param uint16_t height 980 ** @param uint32_t mm_width 981 ** @param uint32_t mm_height 982 ** @returns xcb_void_cookie_t 983 ** 984 *****************************************************************************/ 985 986 xcb_void_cookie_t 987 xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */, 988 xcb_window_t window /**< */, 989 uint16_t width /**< */, 990 uint16_t height /**< */, 991 uint32_t mm_width /**< */, 992 uint32_t mm_height /**< */) 993 { 994 static const xcb_protocol_request_t xcb_req = { 995 /* count */ 2, 996 /* ext */ &xcb_randr_id, 997 /* opcode */ XCB_RANDR_SET_SCREEN_SIZE, 998 /* isvoid */ 1 999 }; 1000 1001 struct iovec xcb_parts[4]; 1002 xcb_void_cookie_t xcb_ret; 1003 xcb_randr_set_screen_size_request_t xcb_out; 1004 1005 xcb_out.window = window; 1006 xcb_out.width = width; 1007 xcb_out.height = height; 1008 xcb_out.mm_width = mm_width; 1009 xcb_out.mm_height = mm_height; 1010 1011 xcb_parts[2].iov_base = (char *) &xcb_out; 1012 xcb_parts[2].iov_len = sizeof(xcb_out); 1013 xcb_parts[3].iov_base = 0; 1014 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1015 1016 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1017 return xcb_ret; 1018 } 1019 1020 1021 /***************************************************************************** 1022 ** 1023 ** xcb_void_cookie_t xcb_randr_set_screen_size 1024 ** 1025 ** @param xcb_connection_t *c 1026 ** @param xcb_window_t window 1027 ** @param uint16_t width 1028 ** @param uint16_t height 1029 ** @param uint32_t mm_width 1030 ** @param uint32_t mm_height 1031 ** @returns xcb_void_cookie_t 1032 ** 1033 *****************************************************************************/ 1034 1035 xcb_void_cookie_t 1036 xcb_randr_set_screen_size (xcb_connection_t *c /**< */, 1037 xcb_window_t window /**< */, 1038 uint16_t width /**< */, 1039 uint16_t height /**< */, 1040 uint32_t mm_width /**< */, 1041 uint32_t mm_height /**< */) 1042 { 1043 static const xcb_protocol_request_t xcb_req = { 1044 /* count */ 2, 1045 /* ext */ &xcb_randr_id, 1046 /* opcode */ XCB_RANDR_SET_SCREEN_SIZE, 1047 /* isvoid */ 1 1048 }; 1049 1050 struct iovec xcb_parts[4]; 1051 xcb_void_cookie_t xcb_ret; 1052 xcb_randr_set_screen_size_request_t xcb_out; 1053 1054 xcb_out.window = window; 1055 xcb_out.width = width; 1056 xcb_out.height = height; 1057 xcb_out.mm_width = mm_width; 1058 xcb_out.mm_height = mm_height; 1059 1060 xcb_parts[2].iov_base = (char *) &xcb_out; 1061 xcb_parts[2].iov_len = sizeof(xcb_out); 1062 xcb_parts[3].iov_base = 0; 1063 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1064 1065 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1066 return xcb_ret; 1067 } 1068 1069 1070 /***************************************************************************** 1071 ** 1072 ** void xcb_randr_mode_info_next 1073 ** 1074 ** @param xcb_randr_mode_info_iterator_t *i 1075 ** @returns void 1076 ** 1077 *****************************************************************************/ 1078 1079 void 1080 xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */) 1081 { 1082 --i->rem; 1083 ++i->data; 1084 i->index += sizeof(xcb_randr_mode_info_t); 1085 } 1086 1087 1088 /***************************************************************************** 1089 ** 1090 ** xcb_generic_iterator_t xcb_randr_mode_info_end 1091 ** 1092 ** @param xcb_randr_mode_info_iterator_t i 1093 ** @returns xcb_generic_iterator_t 1094 ** 1095 *****************************************************************************/ 1096 1097 xcb_generic_iterator_t 1098 xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */) 1099 { 1100 xcb_generic_iterator_t ret; 1101 ret.data = i.data + i.rem; 1102 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1103 ret.rem = 0; 1104 return ret; 1105 } 1106 1107 int 1108 xcb_randr_get_screen_resources_sizeof (const void *_buffer /**< */) 1109 { 1110 char *xcb_tmp = (char *)_buffer; 1111 const xcb_randr_get_screen_resources_reply_t *_aux = (xcb_randr_get_screen_resources_reply_t *)_buffer; 1112 unsigned int xcb_buffer_len = 0; 1113 unsigned int xcb_block_len = 0; 1114 unsigned int xcb_pad = 0; 1115 unsigned int xcb_align_to = 0; 1116 1117 1118 xcb_block_len += sizeof(xcb_randr_get_screen_resources_reply_t); 1119 xcb_tmp += xcb_block_len; 1120 xcb_buffer_len += xcb_block_len; 1121 xcb_block_len = 0; 1122 /* crtcs */ 1123 xcb_block_len += _aux->num_crtcs * sizeof(uint32_t); 1124 xcb_tmp += xcb_block_len; 1125 xcb_align_to = ALIGNOF(xcb_randr_crtc_t); 1126 /* insert padding */ 1127 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1128 xcb_buffer_len += xcb_block_len + xcb_pad; 1129 if (0 != xcb_pad) { 1130 xcb_tmp += xcb_pad; 1131 xcb_pad = 0; 1132 } 1133 xcb_block_len = 0; 1134 /* outputs */ 1135 xcb_block_len += _aux->num_outputs * sizeof(uint32_t); 1136 xcb_tmp += xcb_block_len; 1137 xcb_align_to = ALIGNOF(xcb_randr_output_t); 1138 /* insert padding */ 1139 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1140 xcb_buffer_len += xcb_block_len + xcb_pad; 1141 if (0 != xcb_pad) { 1142 xcb_tmp += xcb_pad; 1143 xcb_pad = 0; 1144 } 1145 xcb_block_len = 0; 1146 /* modes */ 1147 xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t); 1148 xcb_tmp += xcb_block_len; 1149 xcb_align_to = ALIGNOF(xcb_randr_mode_info_t); 1150 /* insert padding */ 1151 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1152 xcb_buffer_len += xcb_block_len + xcb_pad; 1153 if (0 != xcb_pad) { 1154 xcb_tmp += xcb_pad; 1155 xcb_pad = 0; 1156 } 1157 xcb_block_len = 0; 1158 /* names */ 1159 xcb_block_len += _aux->names_len * sizeof(uint8_t); 1160 xcb_tmp += xcb_block_len; 1161 xcb_align_to = ALIGNOF(uint8_t); 1162 /* insert padding */ 1163 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1164 xcb_buffer_len += xcb_block_len + xcb_pad; 1165 if (0 != xcb_pad) { 1166 xcb_tmp += xcb_pad; 1167 xcb_pad = 0; 1168 } 1169 xcb_block_len = 0; 1170 1171 return xcb_buffer_len; 1172 } 1173 1174 1175 /***************************************************************************** 1176 ** 1177 ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources 1178 ** 1179 ** @param xcb_connection_t *c 1180 ** @param xcb_window_t window 1181 ** @returns xcb_randr_get_screen_resources_cookie_t 1182 ** 1183 *****************************************************************************/ 1184 1185 xcb_randr_get_screen_resources_cookie_t 1186 xcb_randr_get_screen_resources (xcb_connection_t *c /**< */, 1187 xcb_window_t window /**< */) 1188 { 1189 static const xcb_protocol_request_t xcb_req = { 1190 /* count */ 2, 1191 /* ext */ &xcb_randr_id, 1192 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES, 1193 /* isvoid */ 0 1194 }; 1195 1196 struct iovec xcb_parts[4]; 1197 xcb_randr_get_screen_resources_cookie_t xcb_ret; 1198 xcb_randr_get_screen_resources_request_t xcb_out; 1199 1200 xcb_out.window = window; 1201 1202 xcb_parts[2].iov_base = (char *) &xcb_out; 1203 xcb_parts[2].iov_len = sizeof(xcb_out); 1204 xcb_parts[3].iov_base = 0; 1205 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1206 1207 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1208 return xcb_ret; 1209 } 1210 1211 1212 /***************************************************************************** 1213 ** 1214 ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked 1215 ** 1216 ** @param xcb_connection_t *c 1217 ** @param xcb_window_t window 1218 ** @returns xcb_randr_get_screen_resources_cookie_t 1219 ** 1220 *****************************************************************************/ 1221 1222 xcb_randr_get_screen_resources_cookie_t 1223 xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */, 1224 xcb_window_t window /**< */) 1225 { 1226 static const xcb_protocol_request_t xcb_req = { 1227 /* count */ 2, 1228 /* ext */ &xcb_randr_id, 1229 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES, 1230 /* isvoid */ 0 1231 }; 1232 1233 struct iovec xcb_parts[4]; 1234 xcb_randr_get_screen_resources_cookie_t xcb_ret; 1235 xcb_randr_get_screen_resources_request_t xcb_out; 1236 1237 xcb_out.window = window; 1238 1239 xcb_parts[2].iov_base = (char *) &xcb_out; 1240 xcb_parts[2].iov_len = sizeof(xcb_out); 1241 xcb_parts[3].iov_base = 0; 1242 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1243 1244 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1245 return xcb_ret; 1246 } 1247 1248 1249 /***************************************************************************** 1250 ** 1251 ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs 1252 ** 1253 ** @param const xcb_randr_get_screen_resources_reply_t *R 1254 ** @returns xcb_randr_crtc_t * 1255 ** 1256 *****************************************************************************/ 1257 1258 xcb_randr_crtc_t * 1259 xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1260 { 1261 return (xcb_randr_crtc_t *) (R + 1); 1262 } 1263 1264 1265 /***************************************************************************** 1266 ** 1267 ** int xcb_randr_get_screen_resources_crtcs_length 1268 ** 1269 ** @param const xcb_randr_get_screen_resources_reply_t *R 1270 ** @returns int 1271 ** 1272 *****************************************************************************/ 1273 1274 int 1275 xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1276 { 1277 return R->num_crtcs; 1278 } 1279 1280 1281 /***************************************************************************** 1282 ** 1283 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end 1284 ** 1285 ** @param const xcb_randr_get_screen_resources_reply_t *R 1286 ** @returns xcb_generic_iterator_t 1287 ** 1288 *****************************************************************************/ 1289 1290 xcb_generic_iterator_t 1291 xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1292 { 1293 xcb_generic_iterator_t i; 1294 i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); 1295 i.rem = 0; 1296 i.index = (char *) i.data - (char *) R; 1297 return i; 1298 } 1299 1300 1301 /***************************************************************************** 1302 ** 1303 ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs 1304 ** 1305 ** @param const xcb_randr_get_screen_resources_reply_t *R 1306 ** @returns xcb_randr_output_t * 1307 ** 1308 *****************************************************************************/ 1309 1310 xcb_randr_output_t * 1311 xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1312 { 1313 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_crtcs_end(R); 1314 return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); 1315 } 1316 1317 1318 /***************************************************************************** 1319 ** 1320 ** int xcb_randr_get_screen_resources_outputs_length 1321 ** 1322 ** @param const xcb_randr_get_screen_resources_reply_t *R 1323 ** @returns int 1324 ** 1325 *****************************************************************************/ 1326 1327 int 1328 xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1329 { 1330 return R->num_outputs; 1331 } 1332 1333 1334 /***************************************************************************** 1335 ** 1336 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end 1337 ** 1338 ** @param const xcb_randr_get_screen_resources_reply_t *R 1339 ** @returns xcb_generic_iterator_t 1340 ** 1341 *****************************************************************************/ 1342 1343 xcb_generic_iterator_t 1344 xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1345 { 1346 xcb_generic_iterator_t i; 1347 xcb_generic_iterator_t child = xcb_randr_get_screen_resources_crtcs_end(R); 1348 i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs); 1349 i.rem = 0; 1350 i.index = (char *) i.data - (char *) R; 1351 return i; 1352 } 1353 1354 1355 /***************************************************************************** 1356 ** 1357 ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes 1358 ** 1359 ** @param const xcb_randr_get_screen_resources_reply_t *R 1360 ** @returns xcb_randr_mode_info_t * 1361 ** 1362 *****************************************************************************/ 1363 1364 xcb_randr_mode_info_t * 1365 xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1366 { 1367 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R); 1368 return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0); 1369 } 1370 1371 1372 /***************************************************************************** 1373 ** 1374 ** int xcb_randr_get_screen_resources_modes_length 1375 ** 1376 ** @param const xcb_randr_get_screen_resources_reply_t *R 1377 ** @returns int 1378 ** 1379 *****************************************************************************/ 1380 1381 int 1382 xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1383 { 1384 return R->num_modes; 1385 } 1386 1387 1388 /***************************************************************************** 1389 ** 1390 ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator 1391 ** 1392 ** @param const xcb_randr_get_screen_resources_reply_t *R 1393 ** @returns xcb_randr_mode_info_iterator_t 1394 ** 1395 *****************************************************************************/ 1396 1397 xcb_randr_mode_info_iterator_t 1398 xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1399 { 1400 xcb_randr_mode_info_iterator_t i; 1401 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R); 1402 i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index)); 1403 i.rem = R->num_modes; 1404 i.index = (char *) i.data - (char *) R; 1405 return i; 1406 } 1407 1408 1409 /***************************************************************************** 1410 ** 1411 ** uint8_t * xcb_randr_get_screen_resources_names 1412 ** 1413 ** @param const xcb_randr_get_screen_resources_reply_t *R 1414 ** @returns uint8_t * 1415 ** 1416 *****************************************************************************/ 1417 1418 uint8_t * 1419 xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1420 { 1421 xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R)); 1422 return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); 1423 } 1424 1425 1426 /***************************************************************************** 1427 ** 1428 ** int xcb_randr_get_screen_resources_names_length 1429 ** 1430 ** @param const xcb_randr_get_screen_resources_reply_t *R 1431 ** @returns int 1432 ** 1433 *****************************************************************************/ 1434 1435 int 1436 xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1437 { 1438 return R->names_len; 1439 } 1440 1441 1442 /***************************************************************************** 1443 ** 1444 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end 1445 ** 1446 ** @param const xcb_randr_get_screen_resources_reply_t *R 1447 ** @returns xcb_generic_iterator_t 1448 ** 1449 *****************************************************************************/ 1450 1451 xcb_generic_iterator_t 1452 xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) 1453 { 1454 xcb_generic_iterator_t i; 1455 xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R)); 1456 i.data = ((uint8_t *) child.data) + (R->names_len); 1457 i.rem = 0; 1458 i.index = (char *) i.data - (char *) R; 1459 return i; 1460 } 1461 1462 1463 /***************************************************************************** 1464 ** 1465 ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply 1466 ** 1467 ** @param xcb_connection_t *c 1468 ** @param xcb_randr_get_screen_resources_cookie_t cookie 1469 ** @param xcb_generic_error_t **e 1470 ** @returns xcb_randr_get_screen_resources_reply_t * 1471 ** 1472 *****************************************************************************/ 1473 1474 xcb_randr_get_screen_resources_reply_t * 1475 xcb_randr_get_screen_resources_reply (xcb_connection_t *c /**< */, 1476 xcb_randr_get_screen_resources_cookie_t cookie /**< */, 1477 xcb_generic_error_t **e /**< */) 1478 { 1479 return (xcb_randr_get_screen_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1480 } 1481 1482 int 1483 xcb_randr_get_output_info_sizeof (const void *_buffer /**< */) 1484 { 1485 char *xcb_tmp = (char *)_buffer; 1486 const xcb_randr_get_output_info_reply_t *_aux = (xcb_randr_get_output_info_reply_t *)_buffer; 1487 unsigned int xcb_buffer_len = 0; 1488 unsigned int xcb_block_len = 0; 1489 unsigned int xcb_pad = 0; 1490 unsigned int xcb_align_to = 0; 1491 1492 1493 xcb_block_len += sizeof(xcb_randr_get_output_info_reply_t); 1494 xcb_tmp += xcb_block_len; 1495 xcb_buffer_len += xcb_block_len; 1496 xcb_block_len = 0; 1497 /* crtcs */ 1498 xcb_block_len += _aux->num_crtcs * sizeof(xcb_randr_output_t); 1499 xcb_tmp += xcb_block_len; 1500 xcb_align_to = ALIGNOF(xcb_randr_crtc_t); 1501 /* insert padding */ 1502 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1503 xcb_buffer_len += xcb_block_len + xcb_pad; 1504 if (0 != xcb_pad) { 1505 xcb_tmp += xcb_pad; 1506 xcb_pad = 0; 1507 } 1508 xcb_block_len = 0; 1509 /* modes */ 1510 xcb_block_len += _aux->num_modes * sizeof(xcb_randr_output_t); 1511 xcb_tmp += xcb_block_len; 1512 xcb_align_to = ALIGNOF(xcb_randr_mode_t); 1513 /* insert padding */ 1514 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1515 xcb_buffer_len += xcb_block_len + xcb_pad; 1516 if (0 != xcb_pad) { 1517 xcb_tmp += xcb_pad; 1518 xcb_pad = 0; 1519 } 1520 xcb_block_len = 0; 1521 /* clones */ 1522 xcb_block_len += _aux->num_clones * sizeof(xcb_randr_output_t); 1523 xcb_tmp += xcb_block_len; 1524 xcb_align_to = ALIGNOF(xcb_randr_output_t); 1525 /* insert padding */ 1526 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1527 xcb_buffer_len += xcb_block_len + xcb_pad; 1528 if (0 != xcb_pad) { 1529 xcb_tmp += xcb_pad; 1530 xcb_pad = 0; 1531 } 1532 xcb_block_len = 0; 1533 /* name */ 1534 xcb_block_len += _aux->name_len * sizeof(uint8_t); 1535 xcb_tmp += xcb_block_len; 1536 xcb_align_to = ALIGNOF(uint8_t); 1537 /* insert padding */ 1538 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1539 xcb_buffer_len += xcb_block_len + xcb_pad; 1540 if (0 != xcb_pad) { 1541 xcb_tmp += xcb_pad; 1542 xcb_pad = 0; 1543 } 1544 xcb_block_len = 0; 1545 1546 return xcb_buffer_len; 1547 } 1548 1549 1550 /***************************************************************************** 1551 ** 1552 ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info 1553 ** 1554 ** @param xcb_connection_t *c 1555 ** @param xcb_randr_output_t output 1556 ** @param xcb_timestamp_t config_timestamp 1557 ** @returns xcb_randr_get_output_info_cookie_t 1558 ** 1559 *****************************************************************************/ 1560 1561 xcb_randr_get_output_info_cookie_t 1562 xcb_randr_get_output_info (xcb_connection_t *c /**< */, 1563 xcb_randr_output_t output /**< */, 1564 xcb_timestamp_t config_timestamp /**< */) 1565 { 1566 static const xcb_protocol_request_t xcb_req = { 1567 /* count */ 2, 1568 /* ext */ &xcb_randr_id, 1569 /* opcode */ XCB_RANDR_GET_OUTPUT_INFO, 1570 /* isvoid */ 0 1571 }; 1572 1573 struct iovec xcb_parts[4]; 1574 xcb_randr_get_output_info_cookie_t xcb_ret; 1575 xcb_randr_get_output_info_request_t xcb_out; 1576 1577 xcb_out.output = output; 1578 xcb_out.config_timestamp = config_timestamp; 1579 1580 xcb_parts[2].iov_base = (char *) &xcb_out; 1581 xcb_parts[2].iov_len = sizeof(xcb_out); 1582 xcb_parts[3].iov_base = 0; 1583 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1584 1585 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1586 return xcb_ret; 1587 } 1588 1589 1590 /***************************************************************************** 1591 ** 1592 ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked 1593 ** 1594 ** @param xcb_connection_t *c 1595 ** @param xcb_randr_output_t output 1596 ** @param xcb_timestamp_t config_timestamp 1597 ** @returns xcb_randr_get_output_info_cookie_t 1598 ** 1599 *****************************************************************************/ 1600 1601 xcb_randr_get_output_info_cookie_t 1602 xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */, 1603 xcb_randr_output_t output /**< */, 1604 xcb_timestamp_t config_timestamp /**< */) 1605 { 1606 static const xcb_protocol_request_t xcb_req = { 1607 /* count */ 2, 1608 /* ext */ &xcb_randr_id, 1609 /* opcode */ XCB_RANDR_GET_OUTPUT_INFO, 1610 /* isvoid */ 0 1611 }; 1612 1613 struct iovec xcb_parts[4]; 1614 xcb_randr_get_output_info_cookie_t xcb_ret; 1615 xcb_randr_get_output_info_request_t xcb_out; 1616 1617 xcb_out.output = output; 1618 xcb_out.config_timestamp = config_timestamp; 1619 1620 xcb_parts[2].iov_base = (char *) &xcb_out; 1621 xcb_parts[2].iov_len = sizeof(xcb_out); 1622 xcb_parts[3].iov_base = 0; 1623 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1624 1625 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1626 return xcb_ret; 1627 } 1628 1629 1630 /***************************************************************************** 1631 ** 1632 ** xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs 1633 ** 1634 ** @param const xcb_randr_get_output_info_reply_t *R 1635 ** @returns xcb_randr_crtc_t * 1636 ** 1637 *****************************************************************************/ 1638 1639 xcb_randr_crtc_t * 1640 xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R /**< */) 1641 { 1642 return (xcb_randr_crtc_t *) (R + 1); 1643 } 1644 1645 1646 /***************************************************************************** 1647 ** 1648 ** int xcb_randr_get_output_info_crtcs_length 1649 ** 1650 ** @param const xcb_randr_get_output_info_reply_t *R 1651 ** @returns int 1652 ** 1653 *****************************************************************************/ 1654 1655 int 1656 xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R /**< */) 1657 { 1658 return R->num_crtcs; 1659 } 1660 1661 1662 /***************************************************************************** 1663 ** 1664 ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end 1665 ** 1666 ** @param const xcb_randr_get_output_info_reply_t *R 1667 ** @returns xcb_generic_iterator_t 1668 ** 1669 *****************************************************************************/ 1670 1671 xcb_generic_iterator_t 1672 xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R /**< */) 1673 { 1674 xcb_generic_iterator_t i; 1675 i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); 1676 i.rem = 0; 1677 i.index = (char *) i.data - (char *) R; 1678 return i; 1679 } 1680 1681 1682 /***************************************************************************** 1683 ** 1684 ** xcb_randr_mode_t * xcb_randr_get_output_info_modes 1685 ** 1686 ** @param const xcb_randr_get_output_info_reply_t *R 1687 ** @returns xcb_randr_mode_t * 1688 ** 1689 *****************************************************************************/ 1690 1691 xcb_randr_mode_t * 1692 xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R /**< */) 1693 { 1694 xcb_generic_iterator_t prev = xcb_randr_get_output_info_crtcs_end(R); 1695 return (xcb_randr_mode_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_t, prev.index) + 0); 1696 } 1697 1698 1699 /***************************************************************************** 1700 ** 1701 ** int xcb_randr_get_output_info_modes_length 1702 ** 1703 ** @param const xcb_randr_get_output_info_reply_t *R 1704 ** @returns int 1705 ** 1706 *****************************************************************************/ 1707 1708 int 1709 xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R /**< */) 1710 { 1711 return R->num_modes; 1712 } 1713 1714 1715 /***************************************************************************** 1716 ** 1717 ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end 1718 ** 1719 ** @param const xcb_randr_get_output_info_reply_t *R 1720 ** @returns xcb_generic_iterator_t 1721 ** 1722 *****************************************************************************/ 1723 1724 xcb_generic_iterator_t 1725 xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R /**< */) 1726 { 1727 xcb_generic_iterator_t i; 1728 xcb_generic_iterator_t child = xcb_randr_get_output_info_crtcs_end(R); 1729 i.data = ((xcb_randr_mode_t *) child.data) + (R->num_modes); 1730 i.rem = 0; 1731 i.index = (char *) i.data - (char *) R; 1732 return i; 1733 } 1734 1735 1736 /***************************************************************************** 1737 ** 1738 ** xcb_randr_output_t * xcb_randr_get_output_info_clones 1739 ** 1740 ** @param const xcb_randr_get_output_info_reply_t *R 1741 ** @returns xcb_randr_output_t * 1742 ** 1743 *****************************************************************************/ 1744 1745 xcb_randr_output_t * 1746 xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R /**< */) 1747 { 1748 xcb_generic_iterator_t prev = xcb_randr_get_output_info_modes_end(R); 1749 return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); 1750 } 1751 1752 1753 /***************************************************************************** 1754 ** 1755 ** int xcb_randr_get_output_info_clones_length 1756 ** 1757 ** @param const xcb_randr_get_output_info_reply_t *R 1758 ** @returns int 1759 ** 1760 *****************************************************************************/ 1761 1762 int 1763 xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R /**< */) 1764 { 1765 return R->num_clones; 1766 } 1767 1768 1769 /***************************************************************************** 1770 ** 1771 ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end 1772 ** 1773 ** @param const xcb_randr_get_output_info_reply_t *R 1774 ** @returns xcb_generic_iterator_t 1775 ** 1776 *****************************************************************************/ 1777 1778 xcb_generic_iterator_t 1779 xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R /**< */) 1780 { 1781 xcb_generic_iterator_t i; 1782 xcb_generic_iterator_t child = xcb_randr_get_output_info_modes_end(R); 1783 i.data = ((xcb_randr_output_t *) child.data) + (R->num_clones); 1784 i.rem = 0; 1785 i.index = (char *) i.data - (char *) R; 1786 return i; 1787 } 1788 1789 1790 /***************************************************************************** 1791 ** 1792 ** uint8_t * xcb_randr_get_output_info_name 1793 ** 1794 ** @param const xcb_randr_get_output_info_reply_t *R 1795 ** @returns uint8_t * 1796 ** 1797 *****************************************************************************/ 1798 1799 uint8_t * 1800 xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R /**< */) 1801 { 1802 xcb_generic_iterator_t prev = xcb_randr_get_output_info_clones_end(R); 1803 return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); 1804 } 1805 1806 1807 /***************************************************************************** 1808 ** 1809 ** int xcb_randr_get_output_info_name_length 1810 ** 1811 ** @param const xcb_randr_get_output_info_reply_t *R 1812 ** @returns int 1813 ** 1814 *****************************************************************************/ 1815 1816 int 1817 xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R /**< */) 1818 { 1819 return R->name_len; 1820 } 1821 1822 1823 /***************************************************************************** 1824 ** 1825 ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end 1826 ** 1827 ** @param const xcb_randr_get_output_info_reply_t *R 1828 ** @returns xcb_generic_iterator_t 1829 ** 1830 *****************************************************************************/ 1831 1832 xcb_generic_iterator_t 1833 xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R /**< */) 1834 { 1835 xcb_generic_iterator_t i; 1836 xcb_generic_iterator_t child = xcb_randr_get_output_info_clones_end(R); 1837 i.data = ((uint8_t *) child.data) + (R->name_len); 1838 i.rem = 0; 1839 i.index = (char *) i.data - (char *) R; 1840 return i; 1841 } 1842 1843 1844 /***************************************************************************** 1845 ** 1846 ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply 1847 ** 1848 ** @param xcb_connection_t *c 1849 ** @param xcb_randr_get_output_info_cookie_t cookie 1850 ** @param xcb_generic_error_t **e 1851 ** @returns xcb_randr_get_output_info_reply_t * 1852 ** 1853 *****************************************************************************/ 1854 1855 xcb_randr_get_output_info_reply_t * 1856 xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */, 1857 xcb_randr_get_output_info_cookie_t cookie /**< */, 1858 xcb_generic_error_t **e /**< */) 1859 { 1860 return (xcb_randr_get_output_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1861 } 1862 1863 int 1864 xcb_randr_list_output_properties_sizeof (const void *_buffer /**< */) 1865 { 1866 char *xcb_tmp = (char *)_buffer; 1867 const xcb_randr_list_output_properties_reply_t *_aux = (xcb_randr_list_output_properties_reply_t *)_buffer; 1868 unsigned int xcb_buffer_len = 0; 1869 unsigned int xcb_block_len = 0; 1870 unsigned int xcb_pad = 0; 1871 unsigned int xcb_align_to = 0; 1872 1873 1874 xcb_block_len += sizeof(xcb_randr_list_output_properties_reply_t); 1875 xcb_tmp += xcb_block_len; 1876 xcb_buffer_len += xcb_block_len; 1877 xcb_block_len = 0; 1878 /* atoms */ 1879 xcb_block_len += _aux->num_atoms * sizeof(xcb_atom_t); 1880 xcb_tmp += xcb_block_len; 1881 xcb_align_to = ALIGNOF(xcb_atom_t); 1882 /* insert padding */ 1883 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1884 xcb_buffer_len += xcb_block_len + xcb_pad; 1885 if (0 != xcb_pad) { 1886 xcb_tmp += xcb_pad; 1887 xcb_pad = 0; 1888 } 1889 xcb_block_len = 0; 1890 1891 return xcb_buffer_len; 1892 } 1893 1894 1895 /***************************************************************************** 1896 ** 1897 ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties 1898 ** 1899 ** @param xcb_connection_t *c 1900 ** @param xcb_randr_output_t output 1901 ** @returns xcb_randr_list_output_properties_cookie_t 1902 ** 1903 *****************************************************************************/ 1904 1905 xcb_randr_list_output_properties_cookie_t 1906 xcb_randr_list_output_properties (xcb_connection_t *c /**< */, 1907 xcb_randr_output_t output /**< */) 1908 { 1909 static const xcb_protocol_request_t xcb_req = { 1910 /* count */ 2, 1911 /* ext */ &xcb_randr_id, 1912 /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES, 1913 /* isvoid */ 0 1914 }; 1915 1916 struct iovec xcb_parts[4]; 1917 xcb_randr_list_output_properties_cookie_t xcb_ret; 1918 xcb_randr_list_output_properties_request_t xcb_out; 1919 1920 xcb_out.output = output; 1921 1922 xcb_parts[2].iov_base = (char *) &xcb_out; 1923 xcb_parts[2].iov_len = sizeof(xcb_out); 1924 xcb_parts[3].iov_base = 0; 1925 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1926 1927 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1928 return xcb_ret; 1929 } 1930 1931 1932 /***************************************************************************** 1933 ** 1934 ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked 1935 ** 1936 ** @param xcb_connection_t *c 1937 ** @param xcb_randr_output_t output 1938 ** @returns xcb_randr_list_output_properties_cookie_t 1939 ** 1940 *****************************************************************************/ 1941 1942 xcb_randr_list_output_properties_cookie_t 1943 xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */, 1944 xcb_randr_output_t output /**< */) 1945 { 1946 static const xcb_protocol_request_t xcb_req = { 1947 /* count */ 2, 1948 /* ext */ &xcb_randr_id, 1949 /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES, 1950 /* isvoid */ 0 1951 }; 1952 1953 struct iovec xcb_parts[4]; 1954 xcb_randr_list_output_properties_cookie_t xcb_ret; 1955 xcb_randr_list_output_properties_request_t xcb_out; 1956 1957 xcb_out.output = output; 1958 1959 xcb_parts[2].iov_base = (char *) &xcb_out; 1960 xcb_parts[2].iov_len = sizeof(xcb_out); 1961 xcb_parts[3].iov_base = 0; 1962 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1963 1964 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1965 return xcb_ret; 1966 } 1967 1968 1969 /***************************************************************************** 1970 ** 1971 ** xcb_atom_t * xcb_randr_list_output_properties_atoms 1972 ** 1973 ** @param const xcb_randr_list_output_properties_reply_t *R 1974 ** @returns xcb_atom_t * 1975 ** 1976 *****************************************************************************/ 1977 1978 xcb_atom_t * 1979 xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R /**< */) 1980 { 1981 return (xcb_atom_t *) (R + 1); 1982 } 1983 1984 1985 /***************************************************************************** 1986 ** 1987 ** int xcb_randr_list_output_properties_atoms_length 1988 ** 1989 ** @param const xcb_randr_list_output_properties_reply_t *R 1990 ** @returns int 1991 ** 1992 *****************************************************************************/ 1993 1994 int 1995 xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R /**< */) 1996 { 1997 return R->num_atoms; 1998 } 1999 2000 2001 /***************************************************************************** 2002 ** 2003 ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end 2004 ** 2005 ** @param const xcb_randr_list_output_properties_reply_t *R 2006 ** @returns xcb_generic_iterator_t 2007 ** 2008 *****************************************************************************/ 2009 2010 xcb_generic_iterator_t 2011 xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R /**< */) 2012 { 2013 xcb_generic_iterator_t i; 2014 i.data = ((xcb_atom_t *) (R + 1)) + (R->num_atoms); 2015 i.rem = 0; 2016 i.index = (char *) i.data - (char *) R; 2017 return i; 2018 } 2019 2020 2021 /***************************************************************************** 2022 ** 2023 ** xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply 2024 ** 2025 ** @param xcb_connection_t *c 2026 ** @param xcb_randr_list_output_properties_cookie_t cookie 2027 ** @param xcb_generic_error_t **e 2028 ** @returns xcb_randr_list_output_properties_reply_t * 2029 ** 2030 *****************************************************************************/ 2031 2032 xcb_randr_list_output_properties_reply_t * 2033 xcb_randr_list_output_properties_reply (xcb_connection_t *c /**< */, 2034 xcb_randr_list_output_properties_cookie_t cookie /**< */, 2035 xcb_generic_error_t **e /**< */) 2036 { 2037 return (xcb_randr_list_output_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2038 } 2039 2040 int 2041 xcb_randr_query_output_property_sizeof (const void *_buffer /**< */) 2042 { 2043 char *xcb_tmp = (char *)_buffer; 2044 const xcb_randr_query_output_property_reply_t *_aux = (xcb_randr_query_output_property_reply_t *)_buffer; 2045 unsigned int xcb_buffer_len = 0; 2046 unsigned int xcb_block_len = 0; 2047 unsigned int xcb_pad = 0; 2048 unsigned int xcb_align_to = 0; 2049 2050 2051 xcb_block_len += sizeof(xcb_randr_query_output_property_reply_t); 2052 xcb_tmp += xcb_block_len; 2053 xcb_buffer_len += xcb_block_len; 2054 xcb_block_len = 0; 2055 /* validValues */ 2056 xcb_block_len += _aux->length * sizeof(int32_t); 2057 xcb_tmp += xcb_block_len; 2058 xcb_align_to = ALIGNOF(int32_t); 2059 /* insert padding */ 2060 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2061 xcb_buffer_len += xcb_block_len + xcb_pad; 2062 if (0 != xcb_pad) { 2063 xcb_tmp += xcb_pad; 2064 xcb_pad = 0; 2065 } 2066 xcb_block_len = 0; 2067 2068 return xcb_buffer_len; 2069 } 2070 2071 2072 /***************************************************************************** 2073 ** 2074 ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property 2075 ** 2076 ** @param xcb_connection_t *c 2077 ** @param xcb_randr_output_t output 2078 ** @param xcb_atom_t property 2079 ** @returns xcb_randr_query_output_property_cookie_t 2080 ** 2081 *****************************************************************************/ 2082 2083 xcb_randr_query_output_property_cookie_t 2084 xcb_randr_query_output_property (xcb_connection_t *c /**< */, 2085 xcb_randr_output_t output /**< */, 2086 xcb_atom_t property /**< */) 2087 { 2088 static const xcb_protocol_request_t xcb_req = { 2089 /* count */ 2, 2090 /* ext */ &xcb_randr_id, 2091 /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY, 2092 /* isvoid */ 0 2093 }; 2094 2095 struct iovec xcb_parts[4]; 2096 xcb_randr_query_output_property_cookie_t xcb_ret; 2097 xcb_randr_query_output_property_request_t xcb_out; 2098 2099 xcb_out.output = output; 2100 xcb_out.property = property; 2101 2102 xcb_parts[2].iov_base = (char *) &xcb_out; 2103 xcb_parts[2].iov_len = sizeof(xcb_out); 2104 xcb_parts[3].iov_base = 0; 2105 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2106 2107 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2108 return xcb_ret; 2109 } 2110 2111 2112 /***************************************************************************** 2113 ** 2114 ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked 2115 ** 2116 ** @param xcb_connection_t *c 2117 ** @param xcb_randr_output_t output 2118 ** @param xcb_atom_t property 2119 ** @returns xcb_randr_query_output_property_cookie_t 2120 ** 2121 *****************************************************************************/ 2122 2123 xcb_randr_query_output_property_cookie_t 2124 xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */, 2125 xcb_randr_output_t output /**< */, 2126 xcb_atom_t property /**< */) 2127 { 2128 static const xcb_protocol_request_t xcb_req = { 2129 /* count */ 2, 2130 /* ext */ &xcb_randr_id, 2131 /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY, 2132 /* isvoid */ 0 2133 }; 2134 2135 struct iovec xcb_parts[4]; 2136 xcb_randr_query_output_property_cookie_t xcb_ret; 2137 xcb_randr_query_output_property_request_t xcb_out; 2138 2139 xcb_out.output = output; 2140 xcb_out.property = property; 2141 2142 xcb_parts[2].iov_base = (char *) &xcb_out; 2143 xcb_parts[2].iov_len = sizeof(xcb_out); 2144 xcb_parts[3].iov_base = 0; 2145 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2146 2147 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2148 return xcb_ret; 2149 } 2150 2151 2152 /***************************************************************************** 2153 ** 2154 ** int32_t * xcb_randr_query_output_property_valid_values 2155 ** 2156 ** @param const xcb_randr_query_output_property_reply_t *R 2157 ** @returns int32_t * 2158 ** 2159 *****************************************************************************/ 2160 2161 int32_t * 2162 xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R /**< */) 2163 { 2164 return (int32_t *) (R + 1); 2165 } 2166 2167 2168 /***************************************************************************** 2169 ** 2170 ** int xcb_randr_query_output_property_valid_values_length 2171 ** 2172 ** @param const xcb_randr_query_output_property_reply_t *R 2173 ** @returns int 2174 ** 2175 *****************************************************************************/ 2176 2177 int 2178 xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R /**< */) 2179 { 2180 return R->length; 2181 } 2182 2183 2184 /***************************************************************************** 2185 ** 2186 ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end 2187 ** 2188 ** @param const xcb_randr_query_output_property_reply_t *R 2189 ** @returns xcb_generic_iterator_t 2190 ** 2191 *****************************************************************************/ 2192 2193 xcb_generic_iterator_t 2194 xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R /**< */) 2195 { 2196 xcb_generic_iterator_t i; 2197 i.data = ((int32_t *) (R + 1)) + (R->length); 2198 i.rem = 0; 2199 i.index = (char *) i.data - (char *) R; 2200 return i; 2201 } 2202 2203 2204 /***************************************************************************** 2205 ** 2206 ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply 2207 ** 2208 ** @param xcb_connection_t *c 2209 ** @param xcb_randr_query_output_property_cookie_t cookie 2210 ** @param xcb_generic_error_t **e 2211 ** @returns xcb_randr_query_output_property_reply_t * 2212 ** 2213 *****************************************************************************/ 2214 2215 xcb_randr_query_output_property_reply_t * 2216 xcb_randr_query_output_property_reply (xcb_connection_t *c /**< */, 2217 xcb_randr_query_output_property_cookie_t cookie /**< */, 2218 xcb_generic_error_t **e /**< */) 2219 { 2220 return (xcb_randr_query_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2221 } 2222 2223 int 2224 xcb_randr_configure_output_property_sizeof (const void *_buffer /**< */, 2225 uint32_t values_len /**< */) 2226 { 2227 char *xcb_tmp = (char *)_buffer; 2228 unsigned int xcb_buffer_len = 0; 2229 unsigned int xcb_block_len = 0; 2230 unsigned int xcb_pad = 0; 2231 unsigned int xcb_align_to = 0; 2232 2233 2234 xcb_block_len += sizeof(xcb_randr_configure_output_property_request_t); 2235 xcb_tmp += xcb_block_len; 2236 xcb_buffer_len += xcb_block_len; 2237 xcb_block_len = 0; 2238 /* values */ 2239 xcb_block_len += values_len * sizeof(int32_t); 2240 xcb_tmp += xcb_block_len; 2241 xcb_align_to = ALIGNOF(int32_t); 2242 /* insert padding */ 2243 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2244 xcb_buffer_len += xcb_block_len + xcb_pad; 2245 if (0 != xcb_pad) { 2246 xcb_tmp += xcb_pad; 2247 xcb_pad = 0; 2248 } 2249 xcb_block_len = 0; 2250 2251 return xcb_buffer_len; 2252 } 2253 2254 2255 /***************************************************************************** 2256 ** 2257 ** xcb_void_cookie_t xcb_randr_configure_output_property_checked 2258 ** 2259 ** @param xcb_connection_t *c 2260 ** @param xcb_randr_output_t output 2261 ** @param xcb_atom_t property 2262 ** @param uint8_t pending 2263 ** @param uint8_t range 2264 ** @param uint32_t values_len 2265 ** @param const int32_t *values 2266 ** @returns xcb_void_cookie_t 2267 ** 2268 *****************************************************************************/ 2269 2270 xcb_void_cookie_t 2271 xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */, 2272 xcb_randr_output_t output /**< */, 2273 xcb_atom_t property /**< */, 2274 uint8_t pending /**< */, 2275 uint8_t range /**< */, 2276 uint32_t values_len /**< */, 2277 const int32_t *values /**< */) 2278 { 2279 static const xcb_protocol_request_t xcb_req = { 2280 /* count */ 4, 2281 /* ext */ &xcb_randr_id, 2282 /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY, 2283 /* isvoid */ 1 2284 }; 2285 2286 struct iovec xcb_parts[6]; 2287 xcb_void_cookie_t xcb_ret; 2288 xcb_randr_configure_output_property_request_t xcb_out; 2289 2290 xcb_out.output = output; 2291 xcb_out.property = property; 2292 xcb_out.pending = pending; 2293 xcb_out.range = range; 2294 memset(xcb_out.pad0, 0, 2); 2295 2296 xcb_parts[2].iov_base = (char *) &xcb_out; 2297 xcb_parts[2].iov_len = sizeof(xcb_out); 2298 xcb_parts[3].iov_base = 0; 2299 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2300 /* int32_t values */ 2301 xcb_parts[4].iov_base = (char *) values; 2302 xcb_parts[4].iov_len = values_len * sizeof(int32_t); 2303 xcb_parts[5].iov_base = 0; 2304 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2305 2306 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2307 return xcb_ret; 2308 } 2309 2310 2311 /***************************************************************************** 2312 ** 2313 ** xcb_void_cookie_t xcb_randr_configure_output_property 2314 ** 2315 ** @param xcb_connection_t *c 2316 ** @param xcb_randr_output_t output 2317 ** @param xcb_atom_t property 2318 ** @param uint8_t pending 2319 ** @param uint8_t range 2320 ** @param uint32_t values_len 2321 ** @param const int32_t *values 2322 ** @returns xcb_void_cookie_t 2323 ** 2324 *****************************************************************************/ 2325 2326 xcb_void_cookie_t 2327 xcb_randr_configure_output_property (xcb_connection_t *c /**< */, 2328 xcb_randr_output_t output /**< */, 2329 xcb_atom_t property /**< */, 2330 uint8_t pending /**< */, 2331 uint8_t range /**< */, 2332 uint32_t values_len /**< */, 2333 const int32_t *values /**< */) 2334 { 2335 static const xcb_protocol_request_t xcb_req = { 2336 /* count */ 4, 2337 /* ext */ &xcb_randr_id, 2338 /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY, 2339 /* isvoid */ 1 2340 }; 2341 2342 struct iovec xcb_parts[6]; 2343 xcb_void_cookie_t xcb_ret; 2344 xcb_randr_configure_output_property_request_t xcb_out; 2345 2346 xcb_out.output = output; 2347 xcb_out.property = property; 2348 xcb_out.pending = pending; 2349 xcb_out.range = range; 2350 memset(xcb_out.pad0, 0, 2); 2351 2352 xcb_parts[2].iov_base = (char *) &xcb_out; 2353 xcb_parts[2].iov_len = sizeof(xcb_out); 2354 xcb_parts[3].iov_base = 0; 2355 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2356 /* int32_t values */ 2357 xcb_parts[4].iov_base = (char *) values; 2358 xcb_parts[4].iov_len = values_len * sizeof(int32_t); 2359 xcb_parts[5].iov_base = 0; 2360 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2361 2362 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2363 return xcb_ret; 2364 } 2365 2366 int 2367 xcb_randr_change_output_property_sizeof (const void *_buffer /**< */) 2368 { 2369 char *xcb_tmp = (char *)_buffer; 2370 const xcb_randr_change_output_property_request_t *_aux = (xcb_randr_change_output_property_request_t *)_buffer; 2371 unsigned int xcb_buffer_len = 0; 2372 unsigned int xcb_block_len = 0; 2373 unsigned int xcb_pad = 0; 2374 unsigned int xcb_align_to = 0; 2375 2376 2377 xcb_block_len += sizeof(xcb_randr_change_output_property_request_t); 2378 xcb_tmp += xcb_block_len; 2379 xcb_buffer_len += xcb_block_len; 2380 xcb_block_len = 0; 2381 /* data */ 2382 xcb_block_len += ((_aux->num_units * _aux->format) / 8) * sizeof(char); 2383 xcb_tmp += xcb_block_len; 2384 xcb_align_to = ALIGNOF(char); 2385 /* insert padding */ 2386 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2387 xcb_buffer_len += xcb_block_len + xcb_pad; 2388 if (0 != xcb_pad) { 2389 xcb_tmp += xcb_pad; 2390 xcb_pad = 0; 2391 } 2392 xcb_block_len = 0; 2393 2394 return xcb_buffer_len; 2395 } 2396 2397 2398 /***************************************************************************** 2399 ** 2400 ** xcb_void_cookie_t xcb_randr_change_output_property_checked 2401 ** 2402 ** @param xcb_connection_t *c 2403 ** @param xcb_randr_output_t output 2404 ** @param xcb_atom_t property 2405 ** @param xcb_atom_t type 2406 ** @param uint8_t format 2407 ** @param uint8_t mode 2408 ** @param uint32_t num_units 2409 ** @param const void *data 2410 ** @returns xcb_void_cookie_t 2411 ** 2412 *****************************************************************************/ 2413 2414 xcb_void_cookie_t 2415 xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */, 2416 xcb_randr_output_t output /**< */, 2417 xcb_atom_t property /**< */, 2418 xcb_atom_t type /**< */, 2419 uint8_t format /**< */, 2420 uint8_t mode /**< */, 2421 uint32_t num_units /**< */, 2422 const void *data /**< */) 2423 { 2424 static const xcb_protocol_request_t xcb_req = { 2425 /* count */ 4, 2426 /* ext */ &xcb_randr_id, 2427 /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY, 2428 /* isvoid */ 1 2429 }; 2430 2431 struct iovec xcb_parts[6]; 2432 xcb_void_cookie_t xcb_ret; 2433 xcb_randr_change_output_property_request_t xcb_out; 2434 2435 xcb_out.output = output; 2436 xcb_out.property = property; 2437 xcb_out.type = type; 2438 xcb_out.format = format; 2439 xcb_out.mode = mode; 2440 memset(xcb_out.pad0, 0, 2); 2441 xcb_out.num_units = num_units; 2442 2443 xcb_parts[2].iov_base = (char *) &xcb_out; 2444 xcb_parts[2].iov_len = sizeof(xcb_out); 2445 xcb_parts[3].iov_base = 0; 2446 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2447 /* void data */ 2448 xcb_parts[4].iov_base = (char *) data; 2449 xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char); 2450 xcb_parts[5].iov_base = 0; 2451 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2452 2453 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2454 return xcb_ret; 2455 } 2456 2457 2458 /***************************************************************************** 2459 ** 2460 ** xcb_void_cookie_t xcb_randr_change_output_property 2461 ** 2462 ** @param xcb_connection_t *c 2463 ** @param xcb_randr_output_t output 2464 ** @param xcb_atom_t property 2465 ** @param xcb_atom_t type 2466 ** @param uint8_t format 2467 ** @param uint8_t mode 2468 ** @param uint32_t num_units 2469 ** @param const void *data 2470 ** @returns xcb_void_cookie_t 2471 ** 2472 *****************************************************************************/ 2473 2474 xcb_void_cookie_t 2475 xcb_randr_change_output_property (xcb_connection_t *c /**< */, 2476 xcb_randr_output_t output /**< */, 2477 xcb_atom_t property /**< */, 2478 xcb_atom_t type /**< */, 2479 uint8_t format /**< */, 2480 uint8_t mode /**< */, 2481 uint32_t num_units /**< */, 2482 const void *data /**< */) 2483 { 2484 static const xcb_protocol_request_t xcb_req = { 2485 /* count */ 4, 2486 /* ext */ &xcb_randr_id, 2487 /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY, 2488 /* isvoid */ 1 2489 }; 2490 2491 struct iovec xcb_parts[6]; 2492 xcb_void_cookie_t xcb_ret; 2493 xcb_randr_change_output_property_request_t xcb_out; 2494 2495 xcb_out.output = output; 2496 xcb_out.property = property; 2497 xcb_out.type = type; 2498 xcb_out.format = format; 2499 xcb_out.mode = mode; 2500 memset(xcb_out.pad0, 0, 2); 2501 xcb_out.num_units = num_units; 2502 2503 xcb_parts[2].iov_base = (char *) &xcb_out; 2504 xcb_parts[2].iov_len = sizeof(xcb_out); 2505 xcb_parts[3].iov_base = 0; 2506 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2507 /* void data */ 2508 xcb_parts[4].iov_base = (char *) data; 2509 xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char); 2510 xcb_parts[5].iov_base = 0; 2511 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2512 2513 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2514 return xcb_ret; 2515 } 2516 2517 2518 /***************************************************************************** 2519 ** 2520 ** xcb_void_cookie_t xcb_randr_delete_output_property_checked 2521 ** 2522 ** @param xcb_connection_t *c 2523 ** @param xcb_randr_output_t output 2524 ** @param xcb_atom_t property 2525 ** @returns xcb_void_cookie_t 2526 ** 2527 *****************************************************************************/ 2528 2529 xcb_void_cookie_t 2530 xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */, 2531 xcb_randr_output_t output /**< */, 2532 xcb_atom_t property /**< */) 2533 { 2534 static const xcb_protocol_request_t xcb_req = { 2535 /* count */ 2, 2536 /* ext */ &xcb_randr_id, 2537 /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY, 2538 /* isvoid */ 1 2539 }; 2540 2541 struct iovec xcb_parts[4]; 2542 xcb_void_cookie_t xcb_ret; 2543 xcb_randr_delete_output_property_request_t xcb_out; 2544 2545 xcb_out.output = output; 2546 xcb_out.property = property; 2547 2548 xcb_parts[2].iov_base = (char *) &xcb_out; 2549 xcb_parts[2].iov_len = sizeof(xcb_out); 2550 xcb_parts[3].iov_base = 0; 2551 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2552 2553 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2554 return xcb_ret; 2555 } 2556 2557 2558 /***************************************************************************** 2559 ** 2560 ** xcb_void_cookie_t xcb_randr_delete_output_property 2561 ** 2562 ** @param xcb_connection_t *c 2563 ** @param xcb_randr_output_t output 2564 ** @param xcb_atom_t property 2565 ** @returns xcb_void_cookie_t 2566 ** 2567 *****************************************************************************/ 2568 2569 xcb_void_cookie_t 2570 xcb_randr_delete_output_property (xcb_connection_t *c /**< */, 2571 xcb_randr_output_t output /**< */, 2572 xcb_atom_t property /**< */) 2573 { 2574 static const xcb_protocol_request_t xcb_req = { 2575 /* count */ 2, 2576 /* ext */ &xcb_randr_id, 2577 /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY, 2578 /* isvoid */ 1 2579 }; 2580 2581 struct iovec xcb_parts[4]; 2582 xcb_void_cookie_t xcb_ret; 2583 xcb_randr_delete_output_property_request_t xcb_out; 2584 2585 xcb_out.output = output; 2586 xcb_out.property = property; 2587 2588 xcb_parts[2].iov_base = (char *) &xcb_out; 2589 xcb_parts[2].iov_len = sizeof(xcb_out); 2590 xcb_parts[3].iov_base = 0; 2591 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2592 2593 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2594 return xcb_ret; 2595 } 2596 2597 int 2598 xcb_randr_get_output_property_sizeof (const void *_buffer /**< */) 2599 { 2600 char *xcb_tmp = (char *)_buffer; 2601 const xcb_randr_get_output_property_reply_t *_aux = (xcb_randr_get_output_property_reply_t *)_buffer; 2602 unsigned int xcb_buffer_len = 0; 2603 unsigned int xcb_block_len = 0; 2604 unsigned int xcb_pad = 0; 2605 unsigned int xcb_align_to = 0; 2606 2607 2608 xcb_block_len += sizeof(xcb_randr_get_output_property_reply_t); 2609 xcb_tmp += xcb_block_len; 2610 xcb_buffer_len += xcb_block_len; 2611 xcb_block_len = 0; 2612 /* data */ 2613 xcb_block_len += (_aux->num_items * (_aux->format / 8)) * sizeof(uint8_t); 2614 xcb_tmp += xcb_block_len; 2615 xcb_align_to = ALIGNOF(uint8_t); 2616 /* insert padding */ 2617 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2618 xcb_buffer_len += xcb_block_len + xcb_pad; 2619 if (0 != xcb_pad) { 2620 xcb_tmp += xcb_pad; 2621 xcb_pad = 0; 2622 } 2623 xcb_block_len = 0; 2624 2625 return xcb_buffer_len; 2626 } 2627 2628 2629 /***************************************************************************** 2630 ** 2631 ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property 2632 ** 2633 ** @param xcb_connection_t *c 2634 ** @param xcb_randr_output_t output 2635 ** @param xcb_atom_t property 2636 ** @param xcb_atom_t type 2637 ** @param uint32_t long_offset 2638 ** @param uint32_t long_length 2639 ** @param uint8_t _delete 2640 ** @param uint8_t pending 2641 ** @returns xcb_randr_get_output_property_cookie_t 2642 ** 2643 *****************************************************************************/ 2644 2645 xcb_randr_get_output_property_cookie_t 2646 xcb_randr_get_output_property (xcb_connection_t *c /**< */, 2647 xcb_randr_output_t output /**< */, 2648 xcb_atom_t property /**< */, 2649 xcb_atom_t type /**< */, 2650 uint32_t long_offset /**< */, 2651 uint32_t long_length /**< */, 2652 uint8_t _delete /**< */, 2653 uint8_t pending /**< */) 2654 { 2655 static const xcb_protocol_request_t xcb_req = { 2656 /* count */ 2, 2657 /* ext */ &xcb_randr_id, 2658 /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY, 2659 /* isvoid */ 0 2660 }; 2661 2662 struct iovec xcb_parts[4]; 2663 xcb_randr_get_output_property_cookie_t xcb_ret; 2664 xcb_randr_get_output_property_request_t xcb_out; 2665 2666 xcb_out.output = output; 2667 xcb_out.property = property; 2668 xcb_out.type = type; 2669 xcb_out.long_offset = long_offset; 2670 xcb_out.long_length = long_length; 2671 xcb_out._delete = _delete; 2672 xcb_out.pending = pending; 2673 memset(xcb_out.pad0, 0, 2); 2674 2675 xcb_parts[2].iov_base = (char *) &xcb_out; 2676 xcb_parts[2].iov_len = sizeof(xcb_out); 2677 xcb_parts[3].iov_base = 0; 2678 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2679 2680 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2681 return xcb_ret; 2682 } 2683 2684 2685 /***************************************************************************** 2686 ** 2687 ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked 2688 ** 2689 ** @param xcb_connection_t *c 2690 ** @param xcb_randr_output_t output 2691 ** @param xcb_atom_t property 2692 ** @param xcb_atom_t type 2693 ** @param uint32_t long_offset 2694 ** @param uint32_t long_length 2695 ** @param uint8_t _delete 2696 ** @param uint8_t pending 2697 ** @returns xcb_randr_get_output_property_cookie_t 2698 ** 2699 *****************************************************************************/ 2700 2701 xcb_randr_get_output_property_cookie_t 2702 xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */, 2703 xcb_randr_output_t output /**< */, 2704 xcb_atom_t property /**< */, 2705 xcb_atom_t type /**< */, 2706 uint32_t long_offset /**< */, 2707 uint32_t long_length /**< */, 2708 uint8_t _delete /**< */, 2709 uint8_t pending /**< */) 2710 { 2711 static const xcb_protocol_request_t xcb_req = { 2712 /* count */ 2, 2713 /* ext */ &xcb_randr_id, 2714 /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY, 2715 /* isvoid */ 0 2716 }; 2717 2718 struct iovec xcb_parts[4]; 2719 xcb_randr_get_output_property_cookie_t xcb_ret; 2720 xcb_randr_get_output_property_request_t xcb_out; 2721 2722 xcb_out.output = output; 2723 xcb_out.property = property; 2724 xcb_out.type = type; 2725 xcb_out.long_offset = long_offset; 2726 xcb_out.long_length = long_length; 2727 xcb_out._delete = _delete; 2728 xcb_out.pending = pending; 2729 memset(xcb_out.pad0, 0, 2); 2730 2731 xcb_parts[2].iov_base = (char *) &xcb_out; 2732 xcb_parts[2].iov_len = sizeof(xcb_out); 2733 xcb_parts[3].iov_base = 0; 2734 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2735 2736 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2737 return xcb_ret; 2738 } 2739 2740 2741 /***************************************************************************** 2742 ** 2743 ** uint8_t * xcb_randr_get_output_property_data 2744 ** 2745 ** @param const xcb_randr_get_output_property_reply_t *R 2746 ** @returns uint8_t * 2747 ** 2748 *****************************************************************************/ 2749 2750 uint8_t * 2751 xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R /**< */) 2752 { 2753 return (uint8_t *) (R + 1); 2754 } 2755 2756 2757 /***************************************************************************** 2758 ** 2759 ** int xcb_randr_get_output_property_data_length 2760 ** 2761 ** @param const xcb_randr_get_output_property_reply_t *R 2762 ** @returns int 2763 ** 2764 *****************************************************************************/ 2765 2766 int 2767 xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R /**< */) 2768 { 2769 return (R->num_items * (R->format / 8)); 2770 } 2771 2772 2773 /***************************************************************************** 2774 ** 2775 ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end 2776 ** 2777 ** @param const xcb_randr_get_output_property_reply_t *R 2778 ** @returns xcb_generic_iterator_t 2779 ** 2780 *****************************************************************************/ 2781 2782 xcb_generic_iterator_t 2783 xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R /**< */) 2784 { 2785 xcb_generic_iterator_t i; 2786 i.data = ((uint8_t *) (R + 1)) + ((R->num_items * (R->format / 8))); 2787 i.rem = 0; 2788 i.index = (char *) i.data - (char *) R; 2789 return i; 2790 } 2791 2792 2793 /***************************************************************************** 2794 ** 2795 ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply 2796 ** 2797 ** @param xcb_connection_t *c 2798 ** @param xcb_randr_get_output_property_cookie_t cookie 2799 ** @param xcb_generic_error_t **e 2800 ** @returns xcb_randr_get_output_property_reply_t * 2801 ** 2802 *****************************************************************************/ 2803 2804 xcb_randr_get_output_property_reply_t * 2805 xcb_randr_get_output_property_reply (xcb_connection_t *c /**< */, 2806 xcb_randr_get_output_property_cookie_t cookie /**< */, 2807 xcb_generic_error_t **e /**< */) 2808 { 2809 return (xcb_randr_get_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2810 } 2811 2812 int 2813 xcb_randr_create_mode_sizeof (const void *_buffer /**< */, 2814 uint32_t name_len /**< */) 2815 { 2816 char *xcb_tmp = (char *)_buffer; 2817 unsigned int xcb_buffer_len = 0; 2818 unsigned int xcb_block_len = 0; 2819 unsigned int xcb_pad = 0; 2820 unsigned int xcb_align_to = 0; 2821 2822 2823 xcb_block_len += sizeof(xcb_randr_create_mode_request_t); 2824 xcb_tmp += xcb_block_len; 2825 xcb_buffer_len += xcb_block_len; 2826 xcb_block_len = 0; 2827 /* name */ 2828 xcb_block_len += name_len * sizeof(char); 2829 xcb_tmp += xcb_block_len; 2830 xcb_align_to = ALIGNOF(char); 2831 /* insert padding */ 2832 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2833 xcb_buffer_len += xcb_block_len + xcb_pad; 2834 if (0 != xcb_pad) { 2835 xcb_tmp += xcb_pad; 2836 xcb_pad = 0; 2837 } 2838 xcb_block_len = 0; 2839 2840 return xcb_buffer_len; 2841 } 2842 2843 2844 /***************************************************************************** 2845 ** 2846 ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode 2847 ** 2848 ** @param xcb_connection_t *c 2849 ** @param xcb_window_t window 2850 ** @param xcb_randr_mode_info_t mode_info 2851 ** @param uint32_t name_len 2852 ** @param const char *name 2853 ** @returns xcb_randr_create_mode_cookie_t 2854 ** 2855 *****************************************************************************/ 2856 2857 xcb_randr_create_mode_cookie_t 2858 xcb_randr_create_mode (xcb_connection_t *c /**< */, 2859 xcb_window_t window /**< */, 2860 xcb_randr_mode_info_t mode_info /**< */, 2861 uint32_t name_len /**< */, 2862 const char *name /**< */) 2863 { 2864 static const xcb_protocol_request_t xcb_req = { 2865 /* count */ 4, 2866 /* ext */ &xcb_randr_id, 2867 /* opcode */ XCB_RANDR_CREATE_MODE, 2868 /* isvoid */ 0 2869 }; 2870 2871 struct iovec xcb_parts[6]; 2872 xcb_randr_create_mode_cookie_t xcb_ret; 2873 xcb_randr_create_mode_request_t xcb_out; 2874 2875 xcb_out.window = window; 2876 xcb_out.mode_info = mode_info; 2877 2878 xcb_parts[2].iov_base = (char *) &xcb_out; 2879 xcb_parts[2].iov_len = sizeof(xcb_out); 2880 xcb_parts[3].iov_base = 0; 2881 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2882 /* char name */ 2883 xcb_parts[4].iov_base = (char *) name; 2884 xcb_parts[4].iov_len = name_len * sizeof(char); 2885 xcb_parts[5].iov_base = 0; 2886 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2887 2888 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2889 return xcb_ret; 2890 } 2891 2892 2893 /***************************************************************************** 2894 ** 2895 ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked 2896 ** 2897 ** @param xcb_connection_t *c 2898 ** @param xcb_window_t window 2899 ** @param xcb_randr_mode_info_t mode_info 2900 ** @param uint32_t name_len 2901 ** @param const char *name 2902 ** @returns xcb_randr_create_mode_cookie_t 2903 ** 2904 *****************************************************************************/ 2905 2906 xcb_randr_create_mode_cookie_t 2907 xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */, 2908 xcb_window_t window /**< */, 2909 xcb_randr_mode_info_t mode_info /**< */, 2910 uint32_t name_len /**< */, 2911 const char *name /**< */) 2912 { 2913 static const xcb_protocol_request_t xcb_req = { 2914 /* count */ 4, 2915 /* ext */ &xcb_randr_id, 2916 /* opcode */ XCB_RANDR_CREATE_MODE, 2917 /* isvoid */ 0 2918 }; 2919 2920 struct iovec xcb_parts[6]; 2921 xcb_randr_create_mode_cookie_t xcb_ret; 2922 xcb_randr_create_mode_request_t xcb_out; 2923 2924 xcb_out.window = window; 2925 xcb_out.mode_info = mode_info; 2926 2927 xcb_parts[2].iov_base = (char *) &xcb_out; 2928 xcb_parts[2].iov_len = sizeof(xcb_out); 2929 xcb_parts[3].iov_base = 0; 2930 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2931 /* char name */ 2932 xcb_parts[4].iov_base = (char *) name; 2933 xcb_parts[4].iov_len = name_len * sizeof(char); 2934 xcb_parts[5].iov_base = 0; 2935 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2936 2937 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2938 return xcb_ret; 2939 } 2940 2941 2942 /***************************************************************************** 2943 ** 2944 ** xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply 2945 ** 2946 ** @param xcb_connection_t *c 2947 ** @param xcb_randr_create_mode_cookie_t cookie 2948 ** @param xcb_generic_error_t **e 2949 ** @returns xcb_randr_create_mode_reply_t * 2950 ** 2951 *****************************************************************************/ 2952 2953 xcb_randr_create_mode_reply_t * 2954 xcb_randr_create_mode_reply (xcb_connection_t *c /**< */, 2955 xcb_randr_create_mode_cookie_t cookie /**< */, 2956 xcb_generic_error_t **e /**< */) 2957 { 2958 return (xcb_randr_create_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 2959 } 2960 2961 2962 /***************************************************************************** 2963 ** 2964 ** xcb_void_cookie_t xcb_randr_destroy_mode_checked 2965 ** 2966 ** @param xcb_connection_t *c 2967 ** @param xcb_randr_mode_t mode 2968 ** @returns xcb_void_cookie_t 2969 ** 2970 *****************************************************************************/ 2971 2972 xcb_void_cookie_t 2973 xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */, 2974 xcb_randr_mode_t mode /**< */) 2975 { 2976 static const xcb_protocol_request_t xcb_req = { 2977 /* count */ 2, 2978 /* ext */ &xcb_randr_id, 2979 /* opcode */ XCB_RANDR_DESTROY_MODE, 2980 /* isvoid */ 1 2981 }; 2982 2983 struct iovec xcb_parts[4]; 2984 xcb_void_cookie_t xcb_ret; 2985 xcb_randr_destroy_mode_request_t xcb_out; 2986 2987 xcb_out.mode = mode; 2988 2989 xcb_parts[2].iov_base = (char *) &xcb_out; 2990 xcb_parts[2].iov_len = sizeof(xcb_out); 2991 xcb_parts[3].iov_base = 0; 2992 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2993 2994 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2995 return xcb_ret; 2996 } 2997 2998 2999 /***************************************************************************** 3000 ** 3001 ** xcb_void_cookie_t xcb_randr_destroy_mode 3002 ** 3003 ** @param xcb_connection_t *c 3004 ** @param xcb_randr_mode_t mode 3005 ** @returns xcb_void_cookie_t 3006 ** 3007 *****************************************************************************/ 3008 3009 xcb_void_cookie_t 3010 xcb_randr_destroy_mode (xcb_connection_t *c /**< */, 3011 xcb_randr_mode_t mode /**< */) 3012 { 3013 static const xcb_protocol_request_t xcb_req = { 3014 /* count */ 2, 3015 /* ext */ &xcb_randr_id, 3016 /* opcode */ XCB_RANDR_DESTROY_MODE, 3017 /* isvoid */ 1 3018 }; 3019 3020 struct iovec xcb_parts[4]; 3021 xcb_void_cookie_t xcb_ret; 3022 xcb_randr_destroy_mode_request_t xcb_out; 3023 3024 xcb_out.mode = mode; 3025 3026 xcb_parts[2].iov_base = (char *) &xcb_out; 3027 xcb_parts[2].iov_len = sizeof(xcb_out); 3028 xcb_parts[3].iov_base = 0; 3029 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3030 3031 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3032 return xcb_ret; 3033 } 3034 3035 3036 /***************************************************************************** 3037 ** 3038 ** xcb_void_cookie_t xcb_randr_add_output_mode_checked 3039 ** 3040 ** @param xcb_connection_t *c 3041 ** @param xcb_randr_output_t output 3042 ** @param xcb_randr_mode_t mode 3043 ** @returns xcb_void_cookie_t 3044 ** 3045 *****************************************************************************/ 3046 3047 xcb_void_cookie_t 3048 xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */, 3049 xcb_randr_output_t output /**< */, 3050 xcb_randr_mode_t mode /**< */) 3051 { 3052 static const xcb_protocol_request_t xcb_req = { 3053 /* count */ 2, 3054 /* ext */ &xcb_randr_id, 3055 /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE, 3056 /* isvoid */ 1 3057 }; 3058 3059 struct iovec xcb_parts[4]; 3060 xcb_void_cookie_t xcb_ret; 3061 xcb_randr_add_output_mode_request_t xcb_out; 3062 3063 xcb_out.output = output; 3064 xcb_out.mode = mode; 3065 3066 xcb_parts[2].iov_base = (char *) &xcb_out; 3067 xcb_parts[2].iov_len = sizeof(xcb_out); 3068 xcb_parts[3].iov_base = 0; 3069 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3070 3071 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3072 return xcb_ret; 3073 } 3074 3075 3076 /***************************************************************************** 3077 ** 3078 ** xcb_void_cookie_t xcb_randr_add_output_mode 3079 ** 3080 ** @param xcb_connection_t *c 3081 ** @param xcb_randr_output_t output 3082 ** @param xcb_randr_mode_t mode 3083 ** @returns xcb_void_cookie_t 3084 ** 3085 *****************************************************************************/ 3086 3087 xcb_void_cookie_t 3088 xcb_randr_add_output_mode (xcb_connection_t *c /**< */, 3089 xcb_randr_output_t output /**< */, 3090 xcb_randr_mode_t mode /**< */) 3091 { 3092 static const xcb_protocol_request_t xcb_req = { 3093 /* count */ 2, 3094 /* ext */ &xcb_randr_id, 3095 /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE, 3096 /* isvoid */ 1 3097 }; 3098 3099 struct iovec xcb_parts[4]; 3100 xcb_void_cookie_t xcb_ret; 3101 xcb_randr_add_output_mode_request_t xcb_out; 3102 3103 xcb_out.output = output; 3104 xcb_out.mode = mode; 3105 3106 xcb_parts[2].iov_base = (char *) &xcb_out; 3107 xcb_parts[2].iov_len = sizeof(xcb_out); 3108 xcb_parts[3].iov_base = 0; 3109 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3110 3111 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3112 return xcb_ret; 3113 } 3114 3115 3116 /***************************************************************************** 3117 ** 3118 ** xcb_void_cookie_t xcb_randr_delete_output_mode_checked 3119 ** 3120 ** @param xcb_connection_t *c 3121 ** @param xcb_randr_output_t output 3122 ** @param xcb_randr_mode_t mode 3123 ** @returns xcb_void_cookie_t 3124 ** 3125 *****************************************************************************/ 3126 3127 xcb_void_cookie_t 3128 xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */, 3129 xcb_randr_output_t output /**< */, 3130 xcb_randr_mode_t mode /**< */) 3131 { 3132 static const xcb_protocol_request_t xcb_req = { 3133 /* count */ 2, 3134 /* ext */ &xcb_randr_id, 3135 /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE, 3136 /* isvoid */ 1 3137 }; 3138 3139 struct iovec xcb_parts[4]; 3140 xcb_void_cookie_t xcb_ret; 3141 xcb_randr_delete_output_mode_request_t xcb_out; 3142 3143 xcb_out.output = output; 3144 xcb_out.mode = mode; 3145 3146 xcb_parts[2].iov_base = (char *) &xcb_out; 3147 xcb_parts[2].iov_len = sizeof(xcb_out); 3148 xcb_parts[3].iov_base = 0; 3149 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3150 3151 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3152 return xcb_ret; 3153 } 3154 3155 3156 /***************************************************************************** 3157 ** 3158 ** xcb_void_cookie_t xcb_randr_delete_output_mode 3159 ** 3160 ** @param xcb_connection_t *c 3161 ** @param xcb_randr_output_t output 3162 ** @param xcb_randr_mode_t mode 3163 ** @returns xcb_void_cookie_t 3164 ** 3165 *****************************************************************************/ 3166 3167 xcb_void_cookie_t 3168 xcb_randr_delete_output_mode (xcb_connection_t *c /**< */, 3169 xcb_randr_output_t output /**< */, 3170 xcb_randr_mode_t mode /**< */) 3171 { 3172 static const xcb_protocol_request_t xcb_req = { 3173 /* count */ 2, 3174 /* ext */ &xcb_randr_id, 3175 /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE, 3176 /* isvoid */ 1 3177 }; 3178 3179 struct iovec xcb_parts[4]; 3180 xcb_void_cookie_t xcb_ret; 3181 xcb_randr_delete_output_mode_request_t xcb_out; 3182 3183 xcb_out.output = output; 3184 xcb_out.mode = mode; 3185 3186 xcb_parts[2].iov_base = (char *) &xcb_out; 3187 xcb_parts[2].iov_len = sizeof(xcb_out); 3188 xcb_parts[3].iov_base = 0; 3189 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3190 3191 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3192 return xcb_ret; 3193 } 3194 3195 int 3196 xcb_randr_get_crtc_info_sizeof (const void *_buffer /**< */) 3197 { 3198 char *xcb_tmp = (char *)_buffer; 3199 const xcb_randr_get_crtc_info_reply_t *_aux = (xcb_randr_get_crtc_info_reply_t *)_buffer; 3200 unsigned int xcb_buffer_len = 0; 3201 unsigned int xcb_block_len = 0; 3202 unsigned int xcb_pad = 0; 3203 unsigned int xcb_align_to = 0; 3204 3205 3206 xcb_block_len += sizeof(xcb_randr_get_crtc_info_reply_t); 3207 xcb_tmp += xcb_block_len; 3208 xcb_buffer_len += xcb_block_len; 3209 xcb_block_len = 0; 3210 /* outputs */ 3211 xcb_block_len += _aux->num_outputs * sizeof(xcb_randr_output_t); 3212 xcb_tmp += xcb_block_len; 3213 xcb_align_to = ALIGNOF(xcb_randr_output_t); 3214 /* insert padding */ 3215 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3216 xcb_buffer_len += xcb_block_len + xcb_pad; 3217 if (0 != xcb_pad) { 3218 xcb_tmp += xcb_pad; 3219 xcb_pad = 0; 3220 } 3221 xcb_block_len = 0; 3222 /* possible */ 3223 xcb_block_len += _aux->num_possible_outputs * sizeof(xcb_randr_output_t); 3224 xcb_tmp += xcb_block_len; 3225 xcb_align_to = ALIGNOF(xcb_randr_output_t); 3226 /* insert padding */ 3227 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3228 xcb_buffer_len += xcb_block_len + xcb_pad; 3229 if (0 != xcb_pad) { 3230 xcb_tmp += xcb_pad; 3231 xcb_pad = 0; 3232 } 3233 xcb_block_len = 0; 3234 3235 return xcb_buffer_len; 3236 } 3237 3238 3239 /***************************************************************************** 3240 ** 3241 ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info 3242 ** 3243 ** @param xcb_connection_t *c 3244 ** @param xcb_randr_crtc_t crtc 3245 ** @param xcb_timestamp_t config_timestamp 3246 ** @returns xcb_randr_get_crtc_info_cookie_t 3247 ** 3248 *****************************************************************************/ 3249 3250 xcb_randr_get_crtc_info_cookie_t 3251 xcb_randr_get_crtc_info (xcb_connection_t *c /**< */, 3252 xcb_randr_crtc_t crtc /**< */, 3253 xcb_timestamp_t config_timestamp /**< */) 3254 { 3255 static const xcb_protocol_request_t xcb_req = { 3256 /* count */ 2, 3257 /* ext */ &xcb_randr_id, 3258 /* opcode */ XCB_RANDR_GET_CRTC_INFO, 3259 /* isvoid */ 0 3260 }; 3261 3262 struct iovec xcb_parts[4]; 3263 xcb_randr_get_crtc_info_cookie_t xcb_ret; 3264 xcb_randr_get_crtc_info_request_t xcb_out; 3265 3266 xcb_out.crtc = crtc; 3267 xcb_out.config_timestamp = config_timestamp; 3268 3269 xcb_parts[2].iov_base = (char *) &xcb_out; 3270 xcb_parts[2].iov_len = sizeof(xcb_out); 3271 xcb_parts[3].iov_base = 0; 3272 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3273 3274 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3275 return xcb_ret; 3276 } 3277 3278 3279 /***************************************************************************** 3280 ** 3281 ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked 3282 ** 3283 ** @param xcb_connection_t *c 3284 ** @param xcb_randr_crtc_t crtc 3285 ** @param xcb_timestamp_t config_timestamp 3286 ** @returns xcb_randr_get_crtc_info_cookie_t 3287 ** 3288 *****************************************************************************/ 3289 3290 xcb_randr_get_crtc_info_cookie_t 3291 xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */, 3292 xcb_randr_crtc_t crtc /**< */, 3293 xcb_timestamp_t config_timestamp /**< */) 3294 { 3295 static const xcb_protocol_request_t xcb_req = { 3296 /* count */ 2, 3297 /* ext */ &xcb_randr_id, 3298 /* opcode */ XCB_RANDR_GET_CRTC_INFO, 3299 /* isvoid */ 0 3300 }; 3301 3302 struct iovec xcb_parts[4]; 3303 xcb_randr_get_crtc_info_cookie_t xcb_ret; 3304 xcb_randr_get_crtc_info_request_t xcb_out; 3305 3306 xcb_out.crtc = crtc; 3307 xcb_out.config_timestamp = config_timestamp; 3308 3309 xcb_parts[2].iov_base = (char *) &xcb_out; 3310 xcb_parts[2].iov_len = sizeof(xcb_out); 3311 xcb_parts[3].iov_base = 0; 3312 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3313 3314 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3315 return xcb_ret; 3316 } 3317 3318 3319 /***************************************************************************** 3320 ** 3321 ** xcb_randr_output_t * xcb_randr_get_crtc_info_outputs 3322 ** 3323 ** @param const xcb_randr_get_crtc_info_reply_t *R 3324 ** @returns xcb_randr_output_t * 3325 ** 3326 *****************************************************************************/ 3327 3328 xcb_randr_output_t * 3329 xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3330 { 3331 return (xcb_randr_output_t *) (R + 1); 3332 } 3333 3334 3335 /***************************************************************************** 3336 ** 3337 ** int xcb_randr_get_crtc_info_outputs_length 3338 ** 3339 ** @param const xcb_randr_get_crtc_info_reply_t *R 3340 ** @returns int 3341 ** 3342 *****************************************************************************/ 3343 3344 int 3345 xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3346 { 3347 return R->num_outputs; 3348 } 3349 3350 3351 /***************************************************************************** 3352 ** 3353 ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end 3354 ** 3355 ** @param const xcb_randr_get_crtc_info_reply_t *R 3356 ** @returns xcb_generic_iterator_t 3357 ** 3358 *****************************************************************************/ 3359 3360 xcb_generic_iterator_t 3361 xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3362 { 3363 xcb_generic_iterator_t i; 3364 i.data = ((xcb_randr_output_t *) (R + 1)) + (R->num_outputs); 3365 i.rem = 0; 3366 i.index = (char *) i.data - (char *) R; 3367 return i; 3368 } 3369 3370 3371 /***************************************************************************** 3372 ** 3373 ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible 3374 ** 3375 ** @param const xcb_randr_get_crtc_info_reply_t *R 3376 ** @returns xcb_randr_output_t * 3377 ** 3378 *****************************************************************************/ 3379 3380 xcb_randr_output_t * 3381 xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3382 { 3383 xcb_generic_iterator_t prev = xcb_randr_get_crtc_info_outputs_end(R); 3384 return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); 3385 } 3386 3387 3388 /***************************************************************************** 3389 ** 3390 ** int xcb_randr_get_crtc_info_possible_length 3391 ** 3392 ** @param const xcb_randr_get_crtc_info_reply_t *R 3393 ** @returns int 3394 ** 3395 *****************************************************************************/ 3396 3397 int 3398 xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3399 { 3400 return R->num_possible_outputs; 3401 } 3402 3403 3404 /***************************************************************************** 3405 ** 3406 ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end 3407 ** 3408 ** @param const xcb_randr_get_crtc_info_reply_t *R 3409 ** @returns xcb_generic_iterator_t 3410 ** 3411 *****************************************************************************/ 3412 3413 xcb_generic_iterator_t 3414 xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R /**< */) 3415 { 3416 xcb_generic_iterator_t i; 3417 xcb_generic_iterator_t child = xcb_randr_get_crtc_info_outputs_end(R); 3418 i.data = ((xcb_randr_output_t *) child.data) + (R->num_possible_outputs); 3419 i.rem = 0; 3420 i.index = (char *) i.data - (char *) R; 3421 return i; 3422 } 3423 3424 3425 /***************************************************************************** 3426 ** 3427 ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply 3428 ** 3429 ** @param xcb_connection_t *c 3430 ** @param xcb_randr_get_crtc_info_cookie_t cookie 3431 ** @param xcb_generic_error_t **e 3432 ** @returns xcb_randr_get_crtc_info_reply_t * 3433 ** 3434 *****************************************************************************/ 3435 3436 xcb_randr_get_crtc_info_reply_t * 3437 xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */, 3438 xcb_randr_get_crtc_info_cookie_t cookie /**< */, 3439 xcb_generic_error_t **e /**< */) 3440 { 3441 return (xcb_randr_get_crtc_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 3442 } 3443 3444 int 3445 xcb_randr_set_crtc_config_sizeof (const void *_buffer /**< */, 3446 uint32_t outputs_len /**< */) 3447 { 3448 char *xcb_tmp = (char *)_buffer; 3449 unsigned int xcb_buffer_len = 0; 3450 unsigned int xcb_block_len = 0; 3451 unsigned int xcb_pad = 0; 3452 unsigned int xcb_align_to = 0; 3453 3454 3455 xcb_block_len += sizeof(xcb_randr_set_crtc_config_request_t); 3456 xcb_tmp += xcb_block_len; 3457 xcb_buffer_len += xcb_block_len; 3458 xcb_block_len = 0; 3459 /* outputs */ 3460 xcb_block_len += outputs_len * sizeof(xcb_randr_output_t); 3461 xcb_tmp += xcb_block_len; 3462 xcb_align_to = ALIGNOF(xcb_randr_output_t); 3463 /* insert padding */ 3464 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3465 xcb_buffer_len += xcb_block_len + xcb_pad; 3466 if (0 != xcb_pad) { 3467 xcb_tmp += xcb_pad; 3468 xcb_pad = 0; 3469 } 3470 xcb_block_len = 0; 3471 3472 return xcb_buffer_len; 3473 } 3474 3475 3476 /***************************************************************************** 3477 ** 3478 ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config 3479 ** 3480 ** @param xcb_connection_t *c 3481 ** @param xcb_randr_crtc_t crtc 3482 ** @param xcb_timestamp_t timestamp 3483 ** @param xcb_timestamp_t config_timestamp 3484 ** @param int16_t x 3485 ** @param int16_t y 3486 ** @param xcb_randr_mode_t mode 3487 ** @param uint16_t rotation 3488 ** @param uint32_t outputs_len 3489 ** @param const xcb_randr_output_t *outputs 3490 ** @returns xcb_randr_set_crtc_config_cookie_t 3491 ** 3492 *****************************************************************************/ 3493 3494 xcb_randr_set_crtc_config_cookie_t 3495 xcb_randr_set_crtc_config (xcb_connection_t *c /**< */, 3496 xcb_randr_crtc_t crtc /**< */, 3497 xcb_timestamp_t timestamp /**< */, 3498 xcb_timestamp_t config_timestamp /**< */, 3499 int16_t x /**< */, 3500 int16_t y /**< */, 3501 xcb_randr_mode_t mode /**< */, 3502 uint16_t rotation /**< */, 3503 uint32_t outputs_len /**< */, 3504 const xcb_randr_output_t *outputs /**< */) 3505 { 3506 static const xcb_protocol_request_t xcb_req = { 3507 /* count */ 4, 3508 /* ext */ &xcb_randr_id, 3509 /* opcode */ XCB_RANDR_SET_CRTC_CONFIG, 3510 /* isvoid */ 0 3511 }; 3512 3513 struct iovec xcb_parts[6]; 3514 xcb_randr_set_crtc_config_cookie_t xcb_ret; 3515 xcb_randr_set_crtc_config_request_t xcb_out; 3516 3517 xcb_out.crtc = crtc; 3518 xcb_out.timestamp = timestamp; 3519 xcb_out.config_timestamp = config_timestamp; 3520 xcb_out.x = x; 3521 xcb_out.y = y; 3522 xcb_out.mode = mode; 3523 xcb_out.rotation = rotation; 3524 memset(xcb_out.pad0, 0, 2); 3525 3526 xcb_parts[2].iov_base = (char *) &xcb_out; 3527 xcb_parts[2].iov_len = sizeof(xcb_out); 3528 xcb_parts[3].iov_base = 0; 3529 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3530 /* xcb_randr_output_t outputs */ 3531 xcb_parts[4].iov_base = (char *) outputs; 3532 xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t); 3533 xcb_parts[5].iov_base = 0; 3534 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 3535 3536 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3537 return xcb_ret; 3538 } 3539 3540 3541 /***************************************************************************** 3542 ** 3543 ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked 3544 ** 3545 ** @param xcb_connection_t *c 3546 ** @param xcb_randr_crtc_t crtc 3547 ** @param xcb_timestamp_t timestamp 3548 ** @param xcb_timestamp_t config_timestamp 3549 ** @param int16_t x 3550 ** @param int16_t y 3551 ** @param xcb_randr_mode_t mode 3552 ** @param uint16_t rotation 3553 ** @param uint32_t outputs_len 3554 ** @param const xcb_randr_output_t *outputs 3555 ** @returns xcb_randr_set_crtc_config_cookie_t 3556 ** 3557 *****************************************************************************/ 3558 3559 xcb_randr_set_crtc_config_cookie_t 3560 xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */, 3561 xcb_randr_crtc_t crtc /**< */, 3562 xcb_timestamp_t timestamp /**< */, 3563 xcb_timestamp_t config_timestamp /**< */, 3564 int16_t x /**< */, 3565 int16_t y /**< */, 3566 xcb_randr_mode_t mode /**< */, 3567 uint16_t rotation /**< */, 3568 uint32_t outputs_len /**< */, 3569 const xcb_randr_output_t *outputs /**< */) 3570 { 3571 static const xcb_protocol_request_t xcb_req = { 3572 /* count */ 4, 3573 /* ext */ &xcb_randr_id, 3574 /* opcode */ XCB_RANDR_SET_CRTC_CONFIG, 3575 /* isvoid */ 0 3576 }; 3577 3578 struct iovec xcb_parts[6]; 3579 xcb_randr_set_crtc_config_cookie_t xcb_ret; 3580 xcb_randr_set_crtc_config_request_t xcb_out; 3581 3582 xcb_out.crtc = crtc; 3583 xcb_out.timestamp = timestamp; 3584 xcb_out.config_timestamp = config_timestamp; 3585 xcb_out.x = x; 3586 xcb_out.y = y; 3587 xcb_out.mode = mode; 3588 xcb_out.rotation = rotation; 3589 memset(xcb_out.pad0, 0, 2); 3590 3591 xcb_parts[2].iov_base = (char *) &xcb_out; 3592 xcb_parts[2].iov_len = sizeof(xcb_out); 3593 xcb_parts[3].iov_base = 0; 3594 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3595 /* xcb_randr_output_t outputs */ 3596 xcb_parts[4].iov_base = (char *) outputs; 3597 xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t); 3598 xcb_parts[5].iov_base = 0; 3599 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 3600 3601 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3602 return xcb_ret; 3603 } 3604 3605 3606 /***************************************************************************** 3607 ** 3608 ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply 3609 ** 3610 ** @param xcb_connection_t *c 3611 ** @param xcb_randr_set_crtc_config_cookie_t cookie 3612 ** @param xcb_generic_error_t **e 3613 ** @returns xcb_randr_set_crtc_config_reply_t * 3614 ** 3615 *****************************************************************************/ 3616 3617 xcb_randr_set_crtc_config_reply_t * 3618 xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */, 3619 xcb_randr_set_crtc_config_cookie_t cookie /**< */, 3620 xcb_generic_error_t **e /**< */) 3621 { 3622 return (xcb_randr_set_crtc_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 3623 } 3624 3625 3626 /***************************************************************************** 3627 ** 3628 ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size 3629 ** 3630 ** @param xcb_connection_t *c 3631 ** @param xcb_randr_crtc_t crtc 3632 ** @returns xcb_randr_get_crtc_gamma_size_cookie_t 3633 ** 3634 *****************************************************************************/ 3635 3636 xcb_randr_get_crtc_gamma_size_cookie_t 3637 xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */, 3638 xcb_randr_crtc_t crtc /**< */) 3639 { 3640 static const xcb_protocol_request_t xcb_req = { 3641 /* count */ 2, 3642 /* ext */ &xcb_randr_id, 3643 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE, 3644 /* isvoid */ 0 3645 }; 3646 3647 struct iovec xcb_parts[4]; 3648 xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret; 3649 xcb_randr_get_crtc_gamma_size_request_t xcb_out; 3650 3651 xcb_out.crtc = crtc; 3652 3653 xcb_parts[2].iov_base = (char *) &xcb_out; 3654 xcb_parts[2].iov_len = sizeof(xcb_out); 3655 xcb_parts[3].iov_base = 0; 3656 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3657 3658 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3659 return xcb_ret; 3660 } 3661 3662 3663 /***************************************************************************** 3664 ** 3665 ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked 3666 ** 3667 ** @param xcb_connection_t *c 3668 ** @param xcb_randr_crtc_t crtc 3669 ** @returns xcb_randr_get_crtc_gamma_size_cookie_t 3670 ** 3671 *****************************************************************************/ 3672 3673 xcb_randr_get_crtc_gamma_size_cookie_t 3674 xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */, 3675 xcb_randr_crtc_t crtc /**< */) 3676 { 3677 static const xcb_protocol_request_t xcb_req = { 3678 /* count */ 2, 3679 /* ext */ &xcb_randr_id, 3680 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE, 3681 /* isvoid */ 0 3682 }; 3683 3684 struct iovec xcb_parts[4]; 3685 xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret; 3686 xcb_randr_get_crtc_gamma_size_request_t xcb_out; 3687 3688 xcb_out.crtc = crtc; 3689 3690 xcb_parts[2].iov_base = (char *) &xcb_out; 3691 xcb_parts[2].iov_len = sizeof(xcb_out); 3692 xcb_parts[3].iov_base = 0; 3693 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3694 3695 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3696 return xcb_ret; 3697 } 3698 3699 3700 /***************************************************************************** 3701 ** 3702 ** xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply 3703 ** 3704 ** @param xcb_connection_t *c 3705 ** @param xcb_randr_get_crtc_gamma_size_cookie_t cookie 3706 ** @param xcb_generic_error_t **e 3707 ** @returns xcb_randr_get_crtc_gamma_size_reply_t * 3708 ** 3709 *****************************************************************************/ 3710 3711 xcb_randr_get_crtc_gamma_size_reply_t * 3712 xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c /**< */, 3713 xcb_randr_get_crtc_gamma_size_cookie_t cookie /**< */, 3714 xcb_generic_error_t **e /**< */) 3715 { 3716 return (xcb_randr_get_crtc_gamma_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 3717 } 3718 3719 int 3720 xcb_randr_get_crtc_gamma_sizeof (const void *_buffer /**< */) 3721 { 3722 char *xcb_tmp = (char *)_buffer; 3723 const xcb_randr_get_crtc_gamma_reply_t *_aux = (xcb_randr_get_crtc_gamma_reply_t *)_buffer; 3724 unsigned int xcb_buffer_len = 0; 3725 unsigned int xcb_block_len = 0; 3726 unsigned int xcb_pad = 0; 3727 unsigned int xcb_align_to = 0; 3728 3729 3730 xcb_block_len += sizeof(xcb_randr_get_crtc_gamma_reply_t); 3731 xcb_tmp += xcb_block_len; 3732 xcb_buffer_len += xcb_block_len; 3733 xcb_block_len = 0; 3734 /* red */ 3735 xcb_block_len += _aux->size * sizeof(uint16_t); 3736 xcb_tmp += xcb_block_len; 3737 xcb_align_to = ALIGNOF(uint16_t); 3738 /* insert padding */ 3739 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3740 xcb_buffer_len += xcb_block_len + xcb_pad; 3741 if (0 != xcb_pad) { 3742 xcb_tmp += xcb_pad; 3743 xcb_pad = 0; 3744 } 3745 xcb_block_len = 0; 3746 /* green */ 3747 xcb_block_len += _aux->size * sizeof(uint16_t); 3748 xcb_tmp += xcb_block_len; 3749 xcb_align_to = ALIGNOF(uint16_t); 3750 /* insert padding */ 3751 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3752 xcb_buffer_len += xcb_block_len + xcb_pad; 3753 if (0 != xcb_pad) { 3754 xcb_tmp += xcb_pad; 3755 xcb_pad = 0; 3756 } 3757 xcb_block_len = 0; 3758 /* blue */ 3759 xcb_block_len += _aux->size * sizeof(uint16_t); 3760 xcb_tmp += xcb_block_len; 3761 xcb_align_to = ALIGNOF(uint16_t); 3762 /* insert padding */ 3763 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3764 xcb_buffer_len += xcb_block_len + xcb_pad; 3765 if (0 != xcb_pad) { 3766 xcb_tmp += xcb_pad; 3767 xcb_pad = 0; 3768 } 3769 xcb_block_len = 0; 3770 3771 return xcb_buffer_len; 3772 } 3773 3774 3775 /***************************************************************************** 3776 ** 3777 ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma 3778 ** 3779 ** @param xcb_connection_t *c 3780 ** @param xcb_randr_crtc_t crtc 3781 ** @returns xcb_randr_get_crtc_gamma_cookie_t 3782 ** 3783 *****************************************************************************/ 3784 3785 xcb_randr_get_crtc_gamma_cookie_t 3786 xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */, 3787 xcb_randr_crtc_t crtc /**< */) 3788 { 3789 static const xcb_protocol_request_t xcb_req = { 3790 /* count */ 2, 3791 /* ext */ &xcb_randr_id, 3792 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA, 3793 /* isvoid */ 0 3794 }; 3795 3796 struct iovec xcb_parts[4]; 3797 xcb_randr_get_crtc_gamma_cookie_t xcb_ret; 3798 xcb_randr_get_crtc_gamma_request_t xcb_out; 3799 3800 xcb_out.crtc = crtc; 3801 3802 xcb_parts[2].iov_base = (char *) &xcb_out; 3803 xcb_parts[2].iov_len = sizeof(xcb_out); 3804 xcb_parts[3].iov_base = 0; 3805 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3806 3807 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 3808 return xcb_ret; 3809 } 3810 3811 3812 /***************************************************************************** 3813 ** 3814 ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked 3815 ** 3816 ** @param xcb_connection_t *c 3817 ** @param xcb_randr_crtc_t crtc 3818 ** @returns xcb_randr_get_crtc_gamma_cookie_t 3819 ** 3820 *****************************************************************************/ 3821 3822 xcb_randr_get_crtc_gamma_cookie_t 3823 xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */, 3824 xcb_randr_crtc_t crtc /**< */) 3825 { 3826 static const xcb_protocol_request_t xcb_req = { 3827 /* count */ 2, 3828 /* ext */ &xcb_randr_id, 3829 /* opcode */ XCB_RANDR_GET_CRTC_GAMMA, 3830 /* isvoid */ 0 3831 }; 3832 3833 struct iovec xcb_parts[4]; 3834 xcb_randr_get_crtc_gamma_cookie_t xcb_ret; 3835 xcb_randr_get_crtc_gamma_request_t xcb_out; 3836 3837 xcb_out.crtc = crtc; 3838 3839 xcb_parts[2].iov_base = (char *) &xcb_out; 3840 xcb_parts[2].iov_len = sizeof(xcb_out); 3841 xcb_parts[3].iov_base = 0; 3842 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 3843 3844 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 3845 return xcb_ret; 3846 } 3847 3848 3849 /***************************************************************************** 3850 ** 3851 ** uint16_t * xcb_randr_get_crtc_gamma_red 3852 ** 3853 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3854 ** @returns uint16_t * 3855 ** 3856 *****************************************************************************/ 3857 3858 uint16_t * 3859 xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3860 { 3861 return (uint16_t *) (R + 1); 3862 } 3863 3864 3865 /***************************************************************************** 3866 ** 3867 ** int xcb_randr_get_crtc_gamma_red_length 3868 ** 3869 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3870 ** @returns int 3871 ** 3872 *****************************************************************************/ 3873 3874 int 3875 xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3876 { 3877 return R->size; 3878 } 3879 3880 3881 /***************************************************************************** 3882 ** 3883 ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end 3884 ** 3885 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3886 ** @returns xcb_generic_iterator_t 3887 ** 3888 *****************************************************************************/ 3889 3890 xcb_generic_iterator_t 3891 xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3892 { 3893 xcb_generic_iterator_t i; 3894 i.data = ((uint16_t *) (R + 1)) + (R->size); 3895 i.rem = 0; 3896 i.index = (char *) i.data - (char *) R; 3897 return i; 3898 } 3899 3900 3901 /***************************************************************************** 3902 ** 3903 ** uint16_t * xcb_randr_get_crtc_gamma_green 3904 ** 3905 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3906 ** @returns uint16_t * 3907 ** 3908 *****************************************************************************/ 3909 3910 uint16_t * 3911 xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3912 { 3913 xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_red_end(R); 3914 return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0); 3915 } 3916 3917 3918 /***************************************************************************** 3919 ** 3920 ** int xcb_randr_get_crtc_gamma_green_length 3921 ** 3922 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3923 ** @returns int 3924 ** 3925 *****************************************************************************/ 3926 3927 int 3928 xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3929 { 3930 return R->size; 3931 } 3932 3933 3934 /***************************************************************************** 3935 ** 3936 ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end 3937 ** 3938 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3939 ** @returns xcb_generic_iterator_t 3940 ** 3941 *****************************************************************************/ 3942 3943 xcb_generic_iterator_t 3944 xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3945 { 3946 xcb_generic_iterator_t i; 3947 xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_red_end(R); 3948 i.data = ((uint16_t *) child.data) + (R->size); 3949 i.rem = 0; 3950 i.index = (char *) i.data - (char *) R; 3951 return i; 3952 } 3953 3954 3955 /***************************************************************************** 3956 ** 3957 ** uint16_t * xcb_randr_get_crtc_gamma_blue 3958 ** 3959 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3960 ** @returns uint16_t * 3961 ** 3962 *****************************************************************************/ 3963 3964 uint16_t * 3965 xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3966 { 3967 xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_green_end(R); 3968 return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0); 3969 } 3970 3971 3972 /***************************************************************************** 3973 ** 3974 ** int xcb_randr_get_crtc_gamma_blue_length 3975 ** 3976 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3977 ** @returns int 3978 ** 3979 *****************************************************************************/ 3980 3981 int 3982 xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3983 { 3984 return R->size; 3985 } 3986 3987 3988 /***************************************************************************** 3989 ** 3990 ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end 3991 ** 3992 ** @param const xcb_randr_get_crtc_gamma_reply_t *R 3993 ** @returns xcb_generic_iterator_t 3994 ** 3995 *****************************************************************************/ 3996 3997 xcb_generic_iterator_t 3998 xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) 3999 { 4000 xcb_generic_iterator_t i; 4001 xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_green_end(R); 4002 i.data = ((uint16_t *) child.data) + (R->size); 4003 i.rem = 0; 4004 i.index = (char *) i.data - (char *) R; 4005 return i; 4006 } 4007 4008 4009 /***************************************************************************** 4010 ** 4011 ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply 4012 ** 4013 ** @param xcb_connection_t *c 4014 ** @param xcb_randr_get_crtc_gamma_cookie_t cookie 4015 ** @param xcb_generic_error_t **e 4016 ** @returns xcb_randr_get_crtc_gamma_reply_t * 4017 ** 4018 *****************************************************************************/ 4019 4020 xcb_randr_get_crtc_gamma_reply_t * 4021 xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */, 4022 xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, 4023 xcb_generic_error_t **e /**< */) 4024 { 4025 return (xcb_randr_get_crtc_gamma_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 4026 } 4027 4028 int 4029 xcb_randr_set_crtc_gamma_sizeof (const void *_buffer /**< */) 4030 { 4031 char *xcb_tmp = (char *)_buffer; 4032 const xcb_randr_set_crtc_gamma_request_t *_aux = (xcb_randr_set_crtc_gamma_request_t *)_buffer; 4033 unsigned int xcb_buffer_len = 0; 4034 unsigned int xcb_block_len = 0; 4035 unsigned int xcb_pad = 0; 4036 unsigned int xcb_align_to = 0; 4037 4038 4039 xcb_block_len += sizeof(xcb_randr_set_crtc_gamma_request_t); 4040 xcb_tmp += xcb_block_len; 4041 xcb_buffer_len += xcb_block_len; 4042 xcb_block_len = 0; 4043 /* red */ 4044 xcb_block_len += _aux->size * sizeof(uint16_t); 4045 xcb_tmp += xcb_block_len; 4046 xcb_align_to = ALIGNOF(uint16_t); 4047 /* insert padding */ 4048 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4049 xcb_buffer_len += xcb_block_len + xcb_pad; 4050 if (0 != xcb_pad) { 4051 xcb_tmp += xcb_pad; 4052 xcb_pad = 0; 4053 } 4054 xcb_block_len = 0; 4055 /* green */ 4056 xcb_block_len += _aux->size * sizeof(uint16_t); 4057 xcb_tmp += xcb_block_len; 4058 xcb_align_to = ALIGNOF(uint16_t); 4059 /* insert padding */ 4060 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4061 xcb_buffer_len += xcb_block_len + xcb_pad; 4062 if (0 != xcb_pad) { 4063 xcb_tmp += xcb_pad; 4064 xcb_pad = 0; 4065 } 4066 xcb_block_len = 0; 4067 /* blue */ 4068 xcb_block_len += _aux->size * sizeof(uint16_t); 4069 xcb_tmp += xcb_block_len; 4070 xcb_align_to = ALIGNOF(uint16_t); 4071 /* insert padding */ 4072 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4073 xcb_buffer_len += xcb_block_len + xcb_pad; 4074 if (0 != xcb_pad) { 4075 xcb_tmp += xcb_pad; 4076 xcb_pad = 0; 4077 } 4078 xcb_block_len = 0; 4079 4080 return xcb_buffer_len; 4081 } 4082 4083 4084 /***************************************************************************** 4085 ** 4086 ** xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked 4087 ** 4088 ** @param xcb_connection_t *c 4089 ** @param xcb_randr_crtc_t crtc 4090 ** @param uint16_t size 4091 ** @param const uint16_t *red 4092 ** @param const uint16_t *green 4093 ** @param const uint16_t *blue 4094 ** @returns xcb_void_cookie_t 4095 ** 4096 *****************************************************************************/ 4097 4098 xcb_void_cookie_t 4099 xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */, 4100 xcb_randr_crtc_t crtc /**< */, 4101 uint16_t size /**< */, 4102 const uint16_t *red /**< */, 4103 const uint16_t *green /**< */, 4104 const uint16_t *blue /**< */) 4105 { 4106 static const xcb_protocol_request_t xcb_req = { 4107 /* count */ 8, 4108 /* ext */ &xcb_randr_id, 4109 /* opcode */ XCB_RANDR_SET_CRTC_GAMMA, 4110 /* isvoid */ 1 4111 }; 4112 4113 struct iovec xcb_parts[10]; 4114 xcb_void_cookie_t xcb_ret; 4115 xcb_randr_set_crtc_gamma_request_t xcb_out; 4116 4117 xcb_out.crtc = crtc; 4118 xcb_out.size = size; 4119 memset(xcb_out.pad0, 0, 2); 4120 4121 xcb_parts[2].iov_base = (char *) &xcb_out; 4122 xcb_parts[2].iov_len = sizeof(xcb_out); 4123 xcb_parts[3].iov_base = 0; 4124 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4125 /* uint16_t red */ 4126 xcb_parts[4].iov_base = (char *) red; 4127 xcb_parts[4].iov_len = size * sizeof(uint16_t); 4128 xcb_parts[5].iov_base = 0; 4129 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 4130 /* uint16_t green */ 4131 xcb_parts[6].iov_base = (char *) green; 4132 xcb_parts[6].iov_len = size * sizeof(uint16_t); 4133 xcb_parts[7].iov_base = 0; 4134 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 4135 /* uint16_t blue */ 4136 xcb_parts[8].iov_base = (char *) blue; 4137 xcb_parts[8].iov_len = size * sizeof(uint16_t); 4138 xcb_parts[9].iov_base = 0; 4139 xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; 4140 4141 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 4142 return xcb_ret; 4143 } 4144 4145 4146 /***************************************************************************** 4147 ** 4148 ** xcb_void_cookie_t xcb_randr_set_crtc_gamma 4149 ** 4150 ** @param xcb_connection_t *c 4151 ** @param xcb_randr_crtc_t crtc 4152 ** @param uint16_t size 4153 ** @param const uint16_t *red 4154 ** @param const uint16_t *green 4155 ** @param const uint16_t *blue 4156 ** @returns xcb_void_cookie_t 4157 ** 4158 *****************************************************************************/ 4159 4160 xcb_void_cookie_t 4161 xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */, 4162 xcb_randr_crtc_t crtc /**< */, 4163 uint16_t size /**< */, 4164 const uint16_t *red /**< */, 4165 const uint16_t *green /**< */, 4166 const uint16_t *blue /**< */) 4167 { 4168 static const xcb_protocol_request_t xcb_req = { 4169 /* count */ 8, 4170 /* ext */ &xcb_randr_id, 4171 /* opcode */ XCB_RANDR_SET_CRTC_GAMMA, 4172 /* isvoid */ 1 4173 }; 4174 4175 struct iovec xcb_parts[10]; 4176 xcb_void_cookie_t xcb_ret; 4177 xcb_randr_set_crtc_gamma_request_t xcb_out; 4178 4179 xcb_out.crtc = crtc; 4180 xcb_out.size = size; 4181 memset(xcb_out.pad0, 0, 2); 4182 4183 xcb_parts[2].iov_base = (char *) &xcb_out; 4184 xcb_parts[2].iov_len = sizeof(xcb_out); 4185 xcb_parts[3].iov_base = 0; 4186 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4187 /* uint16_t red */ 4188 xcb_parts[4].iov_base = (char *) red; 4189 xcb_parts[4].iov_len = size * sizeof(uint16_t); 4190 xcb_parts[5].iov_base = 0; 4191 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 4192 /* uint16_t green */ 4193 xcb_parts[6].iov_base = (char *) green; 4194 xcb_parts[6].iov_len = size * sizeof(uint16_t); 4195 xcb_parts[7].iov_base = 0; 4196 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 4197 /* uint16_t blue */ 4198 xcb_parts[8].iov_base = (char *) blue; 4199 xcb_parts[8].iov_len = size * sizeof(uint16_t); 4200 xcb_parts[9].iov_base = 0; 4201 xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; 4202 4203 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 4204 return xcb_ret; 4205 } 4206 4207 int 4208 xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */) 4209 { 4210 char *xcb_tmp = (char *)_buffer; 4211 const xcb_randr_get_screen_resources_current_reply_t *_aux = (xcb_randr_get_screen_resources_current_reply_t *)_buffer; 4212 unsigned int xcb_buffer_len = 0; 4213 unsigned int xcb_block_len = 0; 4214 unsigned int xcb_pad = 0; 4215 unsigned int xcb_align_to = 0; 4216 4217 4218 xcb_block_len += sizeof(xcb_randr_get_screen_resources_current_reply_t); 4219 xcb_tmp += xcb_block_len; 4220 xcb_buffer_len += xcb_block_len; 4221 xcb_block_len = 0; 4222 /* crtcs */ 4223 xcb_block_len += _aux->num_crtcs * sizeof(uint32_t); 4224 xcb_tmp += xcb_block_len; 4225 xcb_align_to = ALIGNOF(xcb_randr_crtc_t); 4226 /* insert padding */ 4227 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4228 xcb_buffer_len += xcb_block_len + xcb_pad; 4229 if (0 != xcb_pad) { 4230 xcb_tmp += xcb_pad; 4231 xcb_pad = 0; 4232 } 4233 xcb_block_len = 0; 4234 /* outputs */ 4235 xcb_block_len += _aux->num_outputs * sizeof(uint32_t); 4236 xcb_tmp += xcb_block_len; 4237 xcb_align_to = ALIGNOF(xcb_randr_output_t); 4238 /* insert padding */ 4239 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4240 xcb_buffer_len += xcb_block_len + xcb_pad; 4241 if (0 != xcb_pad) { 4242 xcb_tmp += xcb_pad; 4243 xcb_pad = 0; 4244 } 4245 xcb_block_len = 0; 4246 /* modes */ 4247 xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t); 4248 xcb_tmp += xcb_block_len; 4249 xcb_align_to = ALIGNOF(xcb_randr_mode_info_t); 4250 /* insert padding */ 4251 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4252 xcb_buffer_len += xcb_block_len + xcb_pad; 4253 if (0 != xcb_pad) { 4254 xcb_tmp += xcb_pad; 4255 xcb_pad = 0; 4256 } 4257 xcb_block_len = 0; 4258 /* names */ 4259 xcb_block_len += _aux->names_len * sizeof(uint8_t); 4260 xcb_tmp += xcb_block_len; 4261 xcb_align_to = ALIGNOF(uint8_t); 4262 /* insert padding */ 4263 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4264 xcb_buffer_len += xcb_block_len + xcb_pad; 4265 if (0 != xcb_pad) { 4266 xcb_tmp += xcb_pad; 4267 xcb_pad = 0; 4268 } 4269 xcb_block_len = 0; 4270 4271 return xcb_buffer_len; 4272 } 4273 4274 4275 /***************************************************************************** 4276 ** 4277 ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current 4278 ** 4279 ** @param xcb_connection_t *c 4280 ** @param xcb_window_t window 4281 ** @returns xcb_randr_get_screen_resources_current_cookie_t 4282 ** 4283 *****************************************************************************/ 4284 4285 xcb_randr_get_screen_resources_current_cookie_t 4286 xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */, 4287 xcb_window_t window /**< */) 4288 { 4289 static const xcb_protocol_request_t xcb_req = { 4290 /* count */ 2, 4291 /* ext */ &xcb_randr_id, 4292 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT, 4293 /* isvoid */ 0 4294 }; 4295 4296 struct iovec xcb_parts[4]; 4297 xcb_randr_get_screen_resources_current_cookie_t xcb_ret; 4298 xcb_randr_get_screen_resources_current_request_t xcb_out; 4299 4300 xcb_out.window = window; 4301 4302 xcb_parts[2].iov_base = (char *) &xcb_out; 4303 xcb_parts[2].iov_len = sizeof(xcb_out); 4304 xcb_parts[3].iov_base = 0; 4305 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4306 4307 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 4308 return xcb_ret; 4309 } 4310 4311 4312 /***************************************************************************** 4313 ** 4314 ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked 4315 ** 4316 ** @param xcb_connection_t *c 4317 ** @param xcb_window_t window 4318 ** @returns xcb_randr_get_screen_resources_current_cookie_t 4319 ** 4320 *****************************************************************************/ 4321 4322 xcb_randr_get_screen_resources_current_cookie_t 4323 xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */, 4324 xcb_window_t window /**< */) 4325 { 4326 static const xcb_protocol_request_t xcb_req = { 4327 /* count */ 2, 4328 /* ext */ &xcb_randr_id, 4329 /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT, 4330 /* isvoid */ 0 4331 }; 4332 4333 struct iovec xcb_parts[4]; 4334 xcb_randr_get_screen_resources_current_cookie_t xcb_ret; 4335 xcb_randr_get_screen_resources_current_request_t xcb_out; 4336 4337 xcb_out.window = window; 4338 4339 xcb_parts[2].iov_base = (char *) &xcb_out; 4340 xcb_parts[2].iov_len = sizeof(xcb_out); 4341 xcb_parts[3].iov_base = 0; 4342 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4343 4344 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 4345 return xcb_ret; 4346 } 4347 4348 4349 /***************************************************************************** 4350 ** 4351 ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs 4352 ** 4353 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4354 ** @returns xcb_randr_crtc_t * 4355 ** 4356 *****************************************************************************/ 4357 4358 xcb_randr_crtc_t * 4359 xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4360 { 4361 return (xcb_randr_crtc_t *) (R + 1); 4362 } 4363 4364 4365 /***************************************************************************** 4366 ** 4367 ** int xcb_randr_get_screen_resources_current_crtcs_length 4368 ** 4369 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4370 ** @returns int 4371 ** 4372 *****************************************************************************/ 4373 4374 int 4375 xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4376 { 4377 return R->num_crtcs; 4378 } 4379 4380 4381 /***************************************************************************** 4382 ** 4383 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end 4384 ** 4385 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4386 ** @returns xcb_generic_iterator_t 4387 ** 4388 *****************************************************************************/ 4389 4390 xcb_generic_iterator_t 4391 xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4392 { 4393 xcb_generic_iterator_t i; 4394 i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); 4395 i.rem = 0; 4396 i.index = (char *) i.data - (char *) R; 4397 return i; 4398 } 4399 4400 4401 /***************************************************************************** 4402 ** 4403 ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs 4404 ** 4405 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4406 ** @returns xcb_randr_output_t * 4407 ** 4408 *****************************************************************************/ 4409 4410 xcb_randr_output_t * 4411 xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4412 { 4413 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_crtcs_end(R); 4414 return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); 4415 } 4416 4417 4418 /***************************************************************************** 4419 ** 4420 ** int xcb_randr_get_screen_resources_current_outputs_length 4421 ** 4422 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4423 ** @returns int 4424 ** 4425 *****************************************************************************/ 4426 4427 int 4428 xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4429 { 4430 return R->num_outputs; 4431 } 4432 4433 4434 /***************************************************************************** 4435 ** 4436 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end 4437 ** 4438 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4439 ** @returns xcb_generic_iterator_t 4440 ** 4441 *****************************************************************************/ 4442 4443 xcb_generic_iterator_t 4444 xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4445 { 4446 xcb_generic_iterator_t i; 4447 xcb_generic_iterator_t child = xcb_randr_get_screen_resources_current_crtcs_end(R); 4448 i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs); 4449 i.rem = 0; 4450 i.index = (char *) i.data - (char *) R; 4451 return i; 4452 } 4453 4454 4455 /***************************************************************************** 4456 ** 4457 ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes 4458 ** 4459 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4460 ** @returns xcb_randr_mode_info_t * 4461 ** 4462 *****************************************************************************/ 4463 4464 xcb_randr_mode_info_t * 4465 xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4466 { 4467 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R); 4468 return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0); 4469 } 4470 4471 4472 /***************************************************************************** 4473 ** 4474 ** int xcb_randr_get_screen_resources_current_modes_length 4475 ** 4476 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4477 ** @returns int 4478 ** 4479 *****************************************************************************/ 4480 4481 int 4482 xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4483 { 4484 return R->num_modes; 4485 } 4486 4487 4488 /***************************************************************************** 4489 ** 4490 ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator 4491 ** 4492 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4493 ** @returns xcb_randr_mode_info_iterator_t 4494 ** 4495 *****************************************************************************/ 4496 4497 xcb_randr_mode_info_iterator_t 4498 xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4499 { 4500 xcb_randr_mode_info_iterator_t i; 4501 xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R); 4502 i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index)); 4503 i.rem = R->num_modes; 4504 i.index = (char *) i.data - (char *) R; 4505 return i; 4506 } 4507 4508 4509 /***************************************************************************** 4510 ** 4511 ** uint8_t * xcb_randr_get_screen_resources_current_names 4512 ** 4513 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4514 ** @returns uint8_t * 4515 ** 4516 *****************************************************************************/ 4517 4518 uint8_t * 4519 xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4520 { 4521 xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R)); 4522 return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); 4523 } 4524 4525 4526 /***************************************************************************** 4527 ** 4528 ** int xcb_randr_get_screen_resources_current_names_length 4529 ** 4530 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4531 ** @returns int 4532 ** 4533 *****************************************************************************/ 4534 4535 int 4536 xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4537 { 4538 return R->names_len; 4539 } 4540 4541 4542 /***************************************************************************** 4543 ** 4544 ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end 4545 ** 4546 ** @param const xcb_randr_get_screen_resources_current_reply_t *R 4547 ** @returns xcb_generic_iterator_t 4548 ** 4549 *****************************************************************************/ 4550 4551 xcb_generic_iterator_t 4552 xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) 4553 { 4554 xcb_generic_iterator_t i; 4555 xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R)); 4556 i.data = ((uint8_t *) child.data) + (R->names_len); 4557 i.rem = 0; 4558 i.index = (char *) i.data - (char *) R; 4559 return i; 4560 } 4561 4562 4563 /***************************************************************************** 4564 ** 4565 ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply 4566 ** 4567 ** @param xcb_connection_t *c 4568 ** @param xcb_randr_get_screen_resources_current_cookie_t cookie 4569 ** @param xcb_generic_error_t **e 4570 ** @returns xcb_randr_get_screen_resources_current_reply_t * 4571 ** 4572 *****************************************************************************/ 4573 4574 xcb_randr_get_screen_resources_current_reply_t * 4575 xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c /**< */, 4576 xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, 4577 xcb_generic_error_t **e /**< */) 4578 { 4579 return (xcb_randr_get_screen_resources_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 4580 } 4581 4582 int 4583 xcb_randr_set_crtc_transform_sizeof (const void *_buffer /**< */, 4584 uint32_t filter_params_len /**< */) 4585 { 4586 char *xcb_tmp = (char *)_buffer; 4587 const xcb_randr_set_crtc_transform_request_t *_aux = (xcb_randr_set_crtc_transform_request_t *)_buffer; 4588 unsigned int xcb_buffer_len = 0; 4589 unsigned int xcb_block_len = 0; 4590 unsigned int xcb_pad = 0; 4591 unsigned int xcb_align_to = 0; 4592 4593 4594 xcb_block_len += sizeof(xcb_randr_set_crtc_transform_request_t); 4595 xcb_tmp += xcb_block_len; 4596 xcb_buffer_len += xcb_block_len; 4597 xcb_block_len = 0; 4598 /* filter_name */ 4599 xcb_block_len += _aux->filter_len * sizeof(char); 4600 xcb_tmp += xcb_block_len; 4601 xcb_align_to = ALIGNOF(char); 4602 /* insert padding */ 4603 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4604 xcb_buffer_len += xcb_block_len + xcb_pad; 4605 if (0 != xcb_pad) { 4606 xcb_tmp += xcb_pad; 4607 xcb_pad = 0; 4608 } 4609 xcb_block_len = 0; 4610 /* filter_params */ 4611 xcb_block_len += filter_params_len * sizeof(xcb_render_fixed_t); 4612 xcb_tmp += xcb_block_len; 4613 xcb_align_to = ALIGNOF(xcb_render_fixed_t); 4614 /* insert padding */ 4615 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4616 xcb_buffer_len += xcb_block_len + xcb_pad; 4617 if (0 != xcb_pad) { 4618 xcb_tmp += xcb_pad; 4619 xcb_pad = 0; 4620 } 4621 xcb_block_len = 0; 4622 4623 return xcb_buffer_len; 4624 } 4625 4626 4627 /***************************************************************************** 4628 ** 4629 ** xcb_void_cookie_t xcb_randr_set_crtc_transform_checked 4630 ** 4631 ** @param xcb_connection_t *c 4632 ** @param xcb_randr_crtc_t crtc 4633 ** @param xcb_render_transform_t transform 4634 ** @param uint16_t filter_len 4635 ** @param const char *filter_name 4636 ** @param uint32_t filter_params_len 4637 ** @param const xcb_render_fixed_t *filter_params 4638 ** @returns xcb_void_cookie_t 4639 ** 4640 *****************************************************************************/ 4641 4642 xcb_void_cookie_t 4643 xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */, 4644 xcb_randr_crtc_t crtc /**< */, 4645 xcb_render_transform_t transform /**< */, 4646 uint16_t filter_len /**< */, 4647 const char *filter_name /**< */, 4648 uint32_t filter_params_len /**< */, 4649 const xcb_render_fixed_t *filter_params /**< */) 4650 { 4651 static const xcb_protocol_request_t xcb_req = { 4652 /* count */ 6, 4653 /* ext */ &xcb_randr_id, 4654 /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM, 4655 /* isvoid */ 1 4656 }; 4657 4658 struct iovec xcb_parts[8]; 4659 xcb_void_cookie_t xcb_ret; 4660 xcb_randr_set_crtc_transform_request_t xcb_out; 4661 4662 xcb_out.crtc = crtc; 4663 xcb_out.transform = transform; 4664 xcb_out.filter_len = filter_len; 4665 memset(xcb_out.pad0, 0, 2); 4666 4667 xcb_parts[2].iov_base = (char *) &xcb_out; 4668 xcb_parts[2].iov_len = sizeof(xcb_out); 4669 xcb_parts[3].iov_base = 0; 4670 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4671 /* char filter_name */ 4672 xcb_parts[4].iov_base = (char *) filter_name; 4673 xcb_parts[4].iov_len = filter_len * sizeof(char); 4674 xcb_parts[5].iov_base = 0; 4675 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 4676 /* xcb_render_fixed_t filter_params */ 4677 xcb_parts[6].iov_base = (char *) filter_params; 4678 xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t); 4679 xcb_parts[7].iov_base = 0; 4680 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 4681 4682 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 4683 return xcb_ret; 4684 } 4685 4686 4687 /***************************************************************************** 4688 ** 4689 ** xcb_void_cookie_t xcb_randr_set_crtc_transform 4690 ** 4691 ** @param xcb_connection_t *c 4692 ** @param xcb_randr_crtc_t crtc 4693 ** @param xcb_render_transform_t transform 4694 ** @param uint16_t filter_len 4695 ** @param const char *filter_name 4696 ** @param uint32_t filter_params_len 4697 ** @param const xcb_render_fixed_t *filter_params 4698 ** @returns xcb_void_cookie_t 4699 ** 4700 *****************************************************************************/ 4701 4702 xcb_void_cookie_t 4703 xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */, 4704 xcb_randr_crtc_t crtc /**< */, 4705 xcb_render_transform_t transform /**< */, 4706 uint16_t filter_len /**< */, 4707 const char *filter_name /**< */, 4708 uint32_t filter_params_len /**< */, 4709 const xcb_render_fixed_t *filter_params /**< */) 4710 { 4711 static const xcb_protocol_request_t xcb_req = { 4712 /* count */ 6, 4713 /* ext */ &xcb_randr_id, 4714 /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM, 4715 /* isvoid */ 1 4716 }; 4717 4718 struct iovec xcb_parts[8]; 4719 xcb_void_cookie_t xcb_ret; 4720 xcb_randr_set_crtc_transform_request_t xcb_out; 4721 4722 xcb_out.crtc = crtc; 4723 xcb_out.transform = transform; 4724 xcb_out.filter_len = filter_len; 4725 memset(xcb_out.pad0, 0, 2); 4726 4727 xcb_parts[2].iov_base = (char *) &xcb_out; 4728 xcb_parts[2].iov_len = sizeof(xcb_out); 4729 xcb_parts[3].iov_base = 0; 4730 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4731 /* char filter_name */ 4732 xcb_parts[4].iov_base = (char *) filter_name; 4733 xcb_parts[4].iov_len = filter_len * sizeof(char); 4734 xcb_parts[5].iov_base = 0; 4735 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 4736 /* xcb_render_fixed_t filter_params */ 4737 xcb_parts[6].iov_base = (char *) filter_params; 4738 xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t); 4739 xcb_parts[7].iov_base = 0; 4740 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 4741 4742 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 4743 return xcb_ret; 4744 } 4745 4746 int 4747 xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */) 4748 { 4749 char *xcb_tmp = (char *)_buffer; 4750 const xcb_randr_get_crtc_transform_reply_t *_aux = (xcb_randr_get_crtc_transform_reply_t *)_buffer; 4751 unsigned int xcb_buffer_len = 0; 4752 unsigned int xcb_block_len = 0; 4753 unsigned int xcb_pad = 0; 4754 unsigned int xcb_align_to = 0; 4755 4756 4757 xcb_block_len += sizeof(xcb_randr_get_crtc_transform_reply_t); 4758 xcb_tmp += xcb_block_len; 4759 xcb_buffer_len += xcb_block_len; 4760 xcb_block_len = 0; 4761 /* pending_filter_name */ 4762 xcb_block_len += _aux->pending_len * sizeof(char); 4763 xcb_tmp += xcb_block_len; 4764 xcb_align_to = ALIGNOF(char); 4765 /* insert padding */ 4766 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4767 xcb_buffer_len += xcb_block_len + xcb_pad; 4768 if (0 != xcb_pad) { 4769 xcb_tmp += xcb_pad; 4770 xcb_pad = 0; 4771 } 4772 xcb_block_len = 0; 4773 /* pending_params */ 4774 xcb_block_len += _aux->pending_nparams * sizeof(xcb_render_fixed_t); 4775 xcb_tmp += xcb_block_len; 4776 xcb_align_to = ALIGNOF(xcb_render_fixed_t); 4777 /* insert padding */ 4778 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4779 xcb_buffer_len += xcb_block_len + xcb_pad; 4780 if (0 != xcb_pad) { 4781 xcb_tmp += xcb_pad; 4782 xcb_pad = 0; 4783 } 4784 xcb_block_len = 0; 4785 /* current_filter_name */ 4786 xcb_block_len += _aux->current_len * sizeof(char); 4787 xcb_tmp += xcb_block_len; 4788 xcb_align_to = ALIGNOF(char); 4789 /* insert padding */ 4790 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4791 xcb_buffer_len += xcb_block_len + xcb_pad; 4792 if (0 != xcb_pad) { 4793 xcb_tmp += xcb_pad; 4794 xcb_pad = 0; 4795 } 4796 xcb_block_len = 0; 4797 /* current_params */ 4798 xcb_block_len += _aux->current_nparams * sizeof(xcb_render_fixed_t); 4799 xcb_tmp += xcb_block_len; 4800 xcb_align_to = ALIGNOF(xcb_render_fixed_t); 4801 /* insert padding */ 4802 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4803 xcb_buffer_len += xcb_block_len + xcb_pad; 4804 if (0 != xcb_pad) { 4805 xcb_tmp += xcb_pad; 4806 xcb_pad = 0; 4807 } 4808 xcb_block_len = 0; 4809 4810 return xcb_buffer_len; 4811 } 4812 4813 4814 /***************************************************************************** 4815 ** 4816 ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform 4817 ** 4818 ** @param xcb_connection_t *c 4819 ** @param xcb_randr_crtc_t crtc 4820 ** @returns xcb_randr_get_crtc_transform_cookie_t 4821 ** 4822 *****************************************************************************/ 4823 4824 xcb_randr_get_crtc_transform_cookie_t 4825 xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */, 4826 xcb_randr_crtc_t crtc /**< */) 4827 { 4828 static const xcb_protocol_request_t xcb_req = { 4829 /* count */ 2, 4830 /* ext */ &xcb_randr_id, 4831 /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM, 4832 /* isvoid */ 0 4833 }; 4834 4835 struct iovec xcb_parts[4]; 4836 xcb_randr_get_crtc_transform_cookie_t xcb_ret; 4837 xcb_randr_get_crtc_transform_request_t xcb_out; 4838 4839 xcb_out.crtc = crtc; 4840 4841 xcb_parts[2].iov_base = (char *) &xcb_out; 4842 xcb_parts[2].iov_len = sizeof(xcb_out); 4843 xcb_parts[3].iov_base = 0; 4844 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4845 4846 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 4847 return xcb_ret; 4848 } 4849 4850 4851 /***************************************************************************** 4852 ** 4853 ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked 4854 ** 4855 ** @param xcb_connection_t *c 4856 ** @param xcb_randr_crtc_t crtc 4857 ** @returns xcb_randr_get_crtc_transform_cookie_t 4858 ** 4859 *****************************************************************************/ 4860 4861 xcb_randr_get_crtc_transform_cookie_t 4862 xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */, 4863 xcb_randr_crtc_t crtc /**< */) 4864 { 4865 static const xcb_protocol_request_t xcb_req = { 4866 /* count */ 2, 4867 /* ext */ &xcb_randr_id, 4868 /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM, 4869 /* isvoid */ 0 4870 }; 4871 4872 struct iovec xcb_parts[4]; 4873 xcb_randr_get_crtc_transform_cookie_t xcb_ret; 4874 xcb_randr_get_crtc_transform_request_t xcb_out; 4875 4876 xcb_out.crtc = crtc; 4877 4878 xcb_parts[2].iov_base = (char *) &xcb_out; 4879 xcb_parts[2].iov_len = sizeof(xcb_out); 4880 xcb_parts[3].iov_base = 0; 4881 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4882 4883 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 4884 return xcb_ret; 4885 } 4886 4887 4888 /***************************************************************************** 4889 ** 4890 ** char * xcb_randr_get_crtc_transform_pending_filter_name 4891 ** 4892 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4893 ** @returns char * 4894 ** 4895 *****************************************************************************/ 4896 4897 char * 4898 xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4899 { 4900 return (char *) (R + 1); 4901 } 4902 4903 4904 /***************************************************************************** 4905 ** 4906 ** int xcb_randr_get_crtc_transform_pending_filter_name_length 4907 ** 4908 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4909 ** @returns int 4910 ** 4911 *****************************************************************************/ 4912 4913 int 4914 xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4915 { 4916 return R->pending_len; 4917 } 4918 4919 4920 /***************************************************************************** 4921 ** 4922 ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end 4923 ** 4924 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4925 ** @returns xcb_generic_iterator_t 4926 ** 4927 *****************************************************************************/ 4928 4929 xcb_generic_iterator_t 4930 xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4931 { 4932 xcb_generic_iterator_t i; 4933 i.data = ((char *) (R + 1)) + (R->pending_len); 4934 i.rem = 0; 4935 i.index = (char *) i.data - (char *) R; 4936 return i; 4937 } 4938 4939 4940 /***************************************************************************** 4941 ** 4942 ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params 4943 ** 4944 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4945 ** @returns xcb_render_fixed_t * 4946 ** 4947 *****************************************************************************/ 4948 4949 xcb_render_fixed_t * 4950 xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4951 { 4952 xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_filter_name_end(R); 4953 return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0); 4954 } 4955 4956 4957 /***************************************************************************** 4958 ** 4959 ** int xcb_randr_get_crtc_transform_pending_params_length 4960 ** 4961 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4962 ** @returns int 4963 ** 4964 *****************************************************************************/ 4965 4966 int 4967 xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4968 { 4969 return R->pending_nparams; 4970 } 4971 4972 4973 /***************************************************************************** 4974 ** 4975 ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end 4976 ** 4977 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4978 ** @returns xcb_generic_iterator_t 4979 ** 4980 *****************************************************************************/ 4981 4982 xcb_generic_iterator_t 4983 xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 4984 { 4985 xcb_generic_iterator_t i; 4986 xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_filter_name_end(R); 4987 i.data = ((xcb_render_fixed_t *) child.data) + (R->pending_nparams); 4988 i.rem = 0; 4989 i.index = (char *) i.data - (char *) R; 4990 return i; 4991 } 4992 4993 4994 /***************************************************************************** 4995 ** 4996 ** char * xcb_randr_get_crtc_transform_current_filter_name 4997 ** 4998 ** @param const xcb_randr_get_crtc_transform_reply_t *R 4999 ** @returns char * 5000 ** 5001 *****************************************************************************/ 5002 5003 char * 5004 xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5005 { 5006 xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_params_end(R); 5007 return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0); 5008 } 5009 5010 5011 /***************************************************************************** 5012 ** 5013 ** int xcb_randr_get_crtc_transform_current_filter_name_length 5014 ** 5015 ** @param const xcb_randr_get_crtc_transform_reply_t *R 5016 ** @returns int 5017 ** 5018 *****************************************************************************/ 5019 5020 int 5021 xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5022 { 5023 return R->current_len; 5024 } 5025 5026 5027 /***************************************************************************** 5028 ** 5029 ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end 5030 ** 5031 ** @param const xcb_randr_get_crtc_transform_reply_t *R 5032 ** @returns xcb_generic_iterator_t 5033 ** 5034 *****************************************************************************/ 5035 5036 xcb_generic_iterator_t 5037 xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5038 { 5039 xcb_generic_iterator_t i; 5040 xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_params_end(R); 5041 i.data = ((char *) child.data) + (R->current_len); 5042 i.rem = 0; 5043 i.index = (char *) i.data - (char *) R; 5044 return i; 5045 } 5046 5047 5048 /***************************************************************************** 5049 ** 5050 ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params 5051 ** 5052 ** @param const xcb_randr_get_crtc_transform_reply_t *R 5053 ** @returns xcb_render_fixed_t * 5054 ** 5055 *****************************************************************************/ 5056 5057 xcb_render_fixed_t * 5058 xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5059 { 5060 xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_current_filter_name_end(R); 5061 return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0); 5062 } 5063 5064 5065 /***************************************************************************** 5066 ** 5067 ** int xcb_randr_get_crtc_transform_current_params_length 5068 ** 5069 ** @param const xcb_randr_get_crtc_transform_reply_t *R 5070 ** @returns int 5071 ** 5072 *****************************************************************************/ 5073 5074 int 5075 xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5076 { 5077 return R->current_nparams; 5078 } 5079 5080 5081 /***************************************************************************** 5082 ** 5083 ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end 5084 ** 5085 ** @param const xcb_randr_get_crtc_transform_reply_t *R 5086 ** @returns xcb_generic_iterator_t 5087 ** 5088 *****************************************************************************/ 5089 5090 xcb_generic_iterator_t 5091 xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) 5092 { 5093 xcb_generic_iterator_t i; 5094 xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_current_filter_name_end(R); 5095 i.data = ((xcb_render_fixed_t *) child.data) + (R->current_nparams); 5096 i.rem = 0; 5097 i.index = (char *) i.data - (char *) R; 5098 return i; 5099 } 5100 5101 5102 /***************************************************************************** 5103 ** 5104 ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply 5105 ** 5106 ** @param xcb_connection_t *c 5107 ** @param xcb_randr_get_crtc_transform_cookie_t cookie 5108 ** @param xcb_generic_error_t **e 5109 ** @returns xcb_randr_get_crtc_transform_reply_t * 5110 ** 5111 *****************************************************************************/ 5112 5113 xcb_randr_get_crtc_transform_reply_t * 5114 xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /**< */, 5115 xcb_randr_get_crtc_transform_cookie_t cookie /**< */, 5116 xcb_generic_error_t **e /**< */) 5117 { 5118 return (xcb_randr_get_crtc_transform_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5119 } 5120 5121 5122 /***************************************************************************** 5123 ** 5124 ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning 5125 ** 5126 ** @param xcb_connection_t *c 5127 ** @param xcb_randr_crtc_t crtc 5128 ** @returns xcb_randr_get_panning_cookie_t 5129 ** 5130 *****************************************************************************/ 5131 5132 xcb_randr_get_panning_cookie_t 5133 xcb_randr_get_panning (xcb_connection_t *c /**< */, 5134 xcb_randr_crtc_t crtc /**< */) 5135 { 5136 static const xcb_protocol_request_t xcb_req = { 5137 /* count */ 2, 5138 /* ext */ &xcb_randr_id, 5139 /* opcode */ XCB_RANDR_GET_PANNING, 5140 /* isvoid */ 0 5141 }; 5142 5143 struct iovec xcb_parts[4]; 5144 xcb_randr_get_panning_cookie_t xcb_ret; 5145 xcb_randr_get_panning_request_t xcb_out; 5146 5147 xcb_out.crtc = crtc; 5148 5149 xcb_parts[2].iov_base = (char *) &xcb_out; 5150 xcb_parts[2].iov_len = sizeof(xcb_out); 5151 xcb_parts[3].iov_base = 0; 5152 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5153 5154 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5155 return xcb_ret; 5156 } 5157 5158 5159 /***************************************************************************** 5160 ** 5161 ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked 5162 ** 5163 ** @param xcb_connection_t *c 5164 ** @param xcb_randr_crtc_t crtc 5165 ** @returns xcb_randr_get_panning_cookie_t 5166 ** 5167 *****************************************************************************/ 5168 5169 xcb_randr_get_panning_cookie_t 5170 xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */, 5171 xcb_randr_crtc_t crtc /**< */) 5172 { 5173 static const xcb_protocol_request_t xcb_req = { 5174 /* count */ 2, 5175 /* ext */ &xcb_randr_id, 5176 /* opcode */ XCB_RANDR_GET_PANNING, 5177 /* isvoid */ 0 5178 }; 5179 5180 struct iovec xcb_parts[4]; 5181 xcb_randr_get_panning_cookie_t xcb_ret; 5182 xcb_randr_get_panning_request_t xcb_out; 5183 5184 xcb_out.crtc = crtc; 5185 5186 xcb_parts[2].iov_base = (char *) &xcb_out; 5187 xcb_parts[2].iov_len = sizeof(xcb_out); 5188 xcb_parts[3].iov_base = 0; 5189 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5190 5191 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5192 return xcb_ret; 5193 } 5194 5195 5196 /***************************************************************************** 5197 ** 5198 ** xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply 5199 ** 5200 ** @param xcb_connection_t *c 5201 ** @param xcb_randr_get_panning_cookie_t cookie 5202 ** @param xcb_generic_error_t **e 5203 ** @returns xcb_randr_get_panning_reply_t * 5204 ** 5205 *****************************************************************************/ 5206 5207 xcb_randr_get_panning_reply_t * 5208 xcb_randr_get_panning_reply (xcb_connection_t *c /**< */, 5209 xcb_randr_get_panning_cookie_t cookie /**< */, 5210 xcb_generic_error_t **e /**< */) 5211 { 5212 return (xcb_randr_get_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5213 } 5214 5215 5216 /***************************************************************************** 5217 ** 5218 ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning 5219 ** 5220 ** @param xcb_connection_t *c 5221 ** @param xcb_randr_crtc_t crtc 5222 ** @param xcb_timestamp_t timestamp 5223 ** @param uint16_t left 5224 ** @param uint16_t top 5225 ** @param uint16_t width 5226 ** @param uint16_t height 5227 ** @param uint16_t track_left 5228 ** @param uint16_t track_top 5229 ** @param uint16_t track_width 5230 ** @param uint16_t track_height 5231 ** @param int16_t border_left 5232 ** @param int16_t border_top 5233 ** @param int16_t border_right 5234 ** @param int16_t border_bottom 5235 ** @returns xcb_randr_set_panning_cookie_t 5236 ** 5237 *****************************************************************************/ 5238 5239 xcb_randr_set_panning_cookie_t 5240 xcb_randr_set_panning (xcb_connection_t *c /**< */, 5241 xcb_randr_crtc_t crtc /**< */, 5242 xcb_timestamp_t timestamp /**< */, 5243 uint16_t left /**< */, 5244 uint16_t top /**< */, 5245 uint16_t width /**< */, 5246 uint16_t height /**< */, 5247 uint16_t track_left /**< */, 5248 uint16_t track_top /**< */, 5249 uint16_t track_width /**< */, 5250 uint16_t track_height /**< */, 5251 int16_t border_left /**< */, 5252 int16_t border_top /**< */, 5253 int16_t border_right /**< */, 5254 int16_t border_bottom /**< */) 5255 { 5256 static const xcb_protocol_request_t xcb_req = { 5257 /* count */ 2, 5258 /* ext */ &xcb_randr_id, 5259 /* opcode */ XCB_RANDR_SET_PANNING, 5260 /* isvoid */ 0 5261 }; 5262 5263 struct iovec xcb_parts[4]; 5264 xcb_randr_set_panning_cookie_t xcb_ret; 5265 xcb_randr_set_panning_request_t xcb_out; 5266 5267 xcb_out.crtc = crtc; 5268 xcb_out.timestamp = timestamp; 5269 xcb_out.left = left; 5270 xcb_out.top = top; 5271 xcb_out.width = width; 5272 xcb_out.height = height; 5273 xcb_out.track_left = track_left; 5274 xcb_out.track_top = track_top; 5275 xcb_out.track_width = track_width; 5276 xcb_out.track_height = track_height; 5277 xcb_out.border_left = border_left; 5278 xcb_out.border_top = border_top; 5279 xcb_out.border_right = border_right; 5280 xcb_out.border_bottom = border_bottom; 5281 5282 xcb_parts[2].iov_base = (char *) &xcb_out; 5283 xcb_parts[2].iov_len = sizeof(xcb_out); 5284 xcb_parts[3].iov_base = 0; 5285 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5286 5287 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5288 return xcb_ret; 5289 } 5290 5291 5292 /***************************************************************************** 5293 ** 5294 ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked 5295 ** 5296 ** @param xcb_connection_t *c 5297 ** @param xcb_randr_crtc_t crtc 5298 ** @param xcb_timestamp_t timestamp 5299 ** @param uint16_t left 5300 ** @param uint16_t top 5301 ** @param uint16_t width 5302 ** @param uint16_t height 5303 ** @param uint16_t track_left 5304 ** @param uint16_t track_top 5305 ** @param uint16_t track_width 5306 ** @param uint16_t track_height 5307 ** @param int16_t border_left 5308 ** @param int16_t border_top 5309 ** @param int16_t border_right 5310 ** @param int16_t border_bottom 5311 ** @returns xcb_randr_set_panning_cookie_t 5312 ** 5313 *****************************************************************************/ 5314 5315 xcb_randr_set_panning_cookie_t 5316 xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */, 5317 xcb_randr_crtc_t crtc /**< */, 5318 xcb_timestamp_t timestamp /**< */, 5319 uint16_t left /**< */, 5320 uint16_t top /**< */, 5321 uint16_t width /**< */, 5322 uint16_t height /**< */, 5323 uint16_t track_left /**< */, 5324 uint16_t track_top /**< */, 5325 uint16_t track_width /**< */, 5326 uint16_t track_height /**< */, 5327 int16_t border_left /**< */, 5328 int16_t border_top /**< */, 5329 int16_t border_right /**< */, 5330 int16_t border_bottom /**< */) 5331 { 5332 static const xcb_protocol_request_t xcb_req = { 5333 /* count */ 2, 5334 /* ext */ &xcb_randr_id, 5335 /* opcode */ XCB_RANDR_SET_PANNING, 5336 /* isvoid */ 0 5337 }; 5338 5339 struct iovec xcb_parts[4]; 5340 xcb_randr_set_panning_cookie_t xcb_ret; 5341 xcb_randr_set_panning_request_t xcb_out; 5342 5343 xcb_out.crtc = crtc; 5344 xcb_out.timestamp = timestamp; 5345 xcb_out.left = left; 5346 xcb_out.top = top; 5347 xcb_out.width = width; 5348 xcb_out.height = height; 5349 xcb_out.track_left = track_left; 5350 xcb_out.track_top = track_top; 5351 xcb_out.track_width = track_width; 5352 xcb_out.track_height = track_height; 5353 xcb_out.border_left = border_left; 5354 xcb_out.border_top = border_top; 5355 xcb_out.border_right = border_right; 5356 xcb_out.border_bottom = border_bottom; 5357 5358 xcb_parts[2].iov_base = (char *) &xcb_out; 5359 xcb_parts[2].iov_len = sizeof(xcb_out); 5360 xcb_parts[3].iov_base = 0; 5361 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5362 5363 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5364 return xcb_ret; 5365 } 5366 5367 5368 /***************************************************************************** 5369 ** 5370 ** xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply 5371 ** 5372 ** @param xcb_connection_t *c 5373 ** @param xcb_randr_set_panning_cookie_t cookie 5374 ** @param xcb_generic_error_t **e 5375 ** @returns xcb_randr_set_panning_reply_t * 5376 ** 5377 *****************************************************************************/ 5378 5379 xcb_randr_set_panning_reply_t * 5380 xcb_randr_set_panning_reply (xcb_connection_t *c /**< */, 5381 xcb_randr_set_panning_cookie_t cookie /**< */, 5382 xcb_generic_error_t **e /**< */) 5383 { 5384 return (xcb_randr_set_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5385 } 5386 5387 5388 /***************************************************************************** 5389 ** 5390 ** xcb_void_cookie_t xcb_randr_set_output_primary_checked 5391 ** 5392 ** @param xcb_connection_t *c 5393 ** @param xcb_window_t window 5394 ** @param xcb_randr_output_t output 5395 ** @returns xcb_void_cookie_t 5396 ** 5397 *****************************************************************************/ 5398 5399 xcb_void_cookie_t 5400 xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */, 5401 xcb_window_t window /**< */, 5402 xcb_randr_output_t output /**< */) 5403 { 5404 static const xcb_protocol_request_t xcb_req = { 5405 /* count */ 2, 5406 /* ext */ &xcb_randr_id, 5407 /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY, 5408 /* isvoid */ 1 5409 }; 5410 5411 struct iovec xcb_parts[4]; 5412 xcb_void_cookie_t xcb_ret; 5413 xcb_randr_set_output_primary_request_t xcb_out; 5414 5415 xcb_out.window = window; 5416 xcb_out.output = output; 5417 5418 xcb_parts[2].iov_base = (char *) &xcb_out; 5419 xcb_parts[2].iov_len = sizeof(xcb_out); 5420 xcb_parts[3].iov_base = 0; 5421 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5422 5423 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5424 return xcb_ret; 5425 } 5426 5427 5428 /***************************************************************************** 5429 ** 5430 ** xcb_void_cookie_t xcb_randr_set_output_primary 5431 ** 5432 ** @param xcb_connection_t *c 5433 ** @param xcb_window_t window 5434 ** @param xcb_randr_output_t output 5435 ** @returns xcb_void_cookie_t 5436 ** 5437 *****************************************************************************/ 5438 5439 xcb_void_cookie_t 5440 xcb_randr_set_output_primary (xcb_connection_t *c /**< */, 5441 xcb_window_t window /**< */, 5442 xcb_randr_output_t output /**< */) 5443 { 5444 static const xcb_protocol_request_t xcb_req = { 5445 /* count */ 2, 5446 /* ext */ &xcb_randr_id, 5447 /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY, 5448 /* isvoid */ 1 5449 }; 5450 5451 struct iovec xcb_parts[4]; 5452 xcb_void_cookie_t xcb_ret; 5453 xcb_randr_set_output_primary_request_t xcb_out; 5454 5455 xcb_out.window = window; 5456 xcb_out.output = output; 5457 5458 xcb_parts[2].iov_base = (char *) &xcb_out; 5459 xcb_parts[2].iov_len = sizeof(xcb_out); 5460 xcb_parts[3].iov_base = 0; 5461 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5462 5463 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5464 return xcb_ret; 5465 } 5466 5467 5468 /***************************************************************************** 5469 ** 5470 ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary 5471 ** 5472 ** @param xcb_connection_t *c 5473 ** @param xcb_window_t window 5474 ** @returns xcb_randr_get_output_primary_cookie_t 5475 ** 5476 *****************************************************************************/ 5477 5478 xcb_randr_get_output_primary_cookie_t 5479 xcb_randr_get_output_primary (xcb_connection_t *c /**< */, 5480 xcb_window_t window /**< */) 5481 { 5482 static const xcb_protocol_request_t xcb_req = { 5483 /* count */ 2, 5484 /* ext */ &xcb_randr_id, 5485 /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY, 5486 /* isvoid */ 0 5487 }; 5488 5489 struct iovec xcb_parts[4]; 5490 xcb_randr_get_output_primary_cookie_t xcb_ret; 5491 xcb_randr_get_output_primary_request_t xcb_out; 5492 5493 xcb_out.window = window; 5494 5495 xcb_parts[2].iov_base = (char *) &xcb_out; 5496 xcb_parts[2].iov_len = sizeof(xcb_out); 5497 xcb_parts[3].iov_base = 0; 5498 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5499 5500 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5501 return xcb_ret; 5502 } 5503 5504 5505 /***************************************************************************** 5506 ** 5507 ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked 5508 ** 5509 ** @param xcb_connection_t *c 5510 ** @param xcb_window_t window 5511 ** @returns xcb_randr_get_output_primary_cookie_t 5512 ** 5513 *****************************************************************************/ 5514 5515 xcb_randr_get_output_primary_cookie_t 5516 xcb_randr_get_output_primary_unchecked (xcb_connection_t *c /**< */, 5517 xcb_window_t window /**< */) 5518 { 5519 static const xcb_protocol_request_t xcb_req = { 5520 /* count */ 2, 5521 /* ext */ &xcb_randr_id, 5522 /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY, 5523 /* isvoid */ 0 5524 }; 5525 5526 struct iovec xcb_parts[4]; 5527 xcb_randr_get_output_primary_cookie_t xcb_ret; 5528 xcb_randr_get_output_primary_request_t xcb_out; 5529 5530 xcb_out.window = window; 5531 5532 xcb_parts[2].iov_base = (char *) &xcb_out; 5533 xcb_parts[2].iov_len = sizeof(xcb_out); 5534 xcb_parts[3].iov_base = 0; 5535 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5536 5537 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5538 return xcb_ret; 5539 } 5540 5541 5542 /***************************************************************************** 5543 ** 5544 ** xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply 5545 ** 5546 ** @param xcb_connection_t *c 5547 ** @param xcb_randr_get_output_primary_cookie_t cookie 5548 ** @param xcb_generic_error_t **e 5549 ** @returns xcb_randr_get_output_primary_reply_t * 5550 ** 5551 *****************************************************************************/ 5552 5553 xcb_randr_get_output_primary_reply_t * 5554 xcb_randr_get_output_primary_reply (xcb_connection_t *c /**< */, 5555 xcb_randr_get_output_primary_cookie_t cookie /**< */, 5556 xcb_generic_error_t **e /**< */) 5557 { 5558 return (xcb_randr_get_output_primary_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5559 } 5560 5561 int 5562 xcb_randr_get_providers_sizeof (const void *_buffer /**< */) 5563 { 5564 char *xcb_tmp = (char *)_buffer; 5565 const xcb_randr_get_providers_reply_t *_aux = (xcb_randr_get_providers_reply_t *)_buffer; 5566 unsigned int xcb_buffer_len = 0; 5567 unsigned int xcb_block_len = 0; 5568 unsigned int xcb_pad = 0; 5569 unsigned int xcb_align_to = 0; 5570 5571 5572 xcb_block_len += sizeof(xcb_randr_get_providers_reply_t); 5573 xcb_tmp += xcb_block_len; 5574 xcb_buffer_len += xcb_block_len; 5575 xcb_block_len = 0; 5576 /* providers */ 5577 xcb_block_len += _aux->num_providers * sizeof(xcb_randr_provider_t); 5578 xcb_tmp += xcb_block_len; 5579 xcb_align_to = ALIGNOF(xcb_randr_provider_t); 5580 /* insert padding */ 5581 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5582 xcb_buffer_len += xcb_block_len + xcb_pad; 5583 if (0 != xcb_pad) { 5584 xcb_tmp += xcb_pad; 5585 xcb_pad = 0; 5586 } 5587 xcb_block_len = 0; 5588 5589 return xcb_buffer_len; 5590 } 5591 5592 5593 /***************************************************************************** 5594 ** 5595 ** xcb_randr_get_providers_cookie_t xcb_randr_get_providers 5596 ** 5597 ** @param xcb_connection_t *c 5598 ** @param xcb_window_t window 5599 ** @returns xcb_randr_get_providers_cookie_t 5600 ** 5601 *****************************************************************************/ 5602 5603 xcb_randr_get_providers_cookie_t 5604 xcb_randr_get_providers (xcb_connection_t *c /**< */, 5605 xcb_window_t window /**< */) 5606 { 5607 static const xcb_protocol_request_t xcb_req = { 5608 /* count */ 2, 5609 /* ext */ &xcb_randr_id, 5610 /* opcode */ XCB_RANDR_GET_PROVIDERS, 5611 /* isvoid */ 0 5612 }; 5613 5614 struct iovec xcb_parts[4]; 5615 xcb_randr_get_providers_cookie_t xcb_ret; 5616 xcb_randr_get_providers_request_t xcb_out; 5617 5618 xcb_out.window = window; 5619 5620 xcb_parts[2].iov_base = (char *) &xcb_out; 5621 xcb_parts[2].iov_len = sizeof(xcb_out); 5622 xcb_parts[3].iov_base = 0; 5623 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5624 5625 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5626 return xcb_ret; 5627 } 5628 5629 5630 /***************************************************************************** 5631 ** 5632 ** xcb_randr_get_providers_cookie_t xcb_randr_get_providers_unchecked 5633 ** 5634 ** @param xcb_connection_t *c 5635 ** @param xcb_window_t window 5636 ** @returns xcb_randr_get_providers_cookie_t 5637 ** 5638 *****************************************************************************/ 5639 5640 xcb_randr_get_providers_cookie_t 5641 xcb_randr_get_providers_unchecked (xcb_connection_t *c /**< */, 5642 xcb_window_t window /**< */) 5643 { 5644 static const xcb_protocol_request_t xcb_req = { 5645 /* count */ 2, 5646 /* ext */ &xcb_randr_id, 5647 /* opcode */ XCB_RANDR_GET_PROVIDERS, 5648 /* isvoid */ 0 5649 }; 5650 5651 struct iovec xcb_parts[4]; 5652 xcb_randr_get_providers_cookie_t xcb_ret; 5653 xcb_randr_get_providers_request_t xcb_out; 5654 5655 xcb_out.window = window; 5656 5657 xcb_parts[2].iov_base = (char *) &xcb_out; 5658 xcb_parts[2].iov_len = sizeof(xcb_out); 5659 xcb_parts[3].iov_base = 0; 5660 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5661 5662 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5663 return xcb_ret; 5664 } 5665 5666 5667 /***************************************************************************** 5668 ** 5669 ** xcb_randr_provider_t * xcb_randr_get_providers_providers 5670 ** 5671 ** @param const xcb_randr_get_providers_reply_t *R 5672 ** @returns xcb_randr_provider_t * 5673 ** 5674 *****************************************************************************/ 5675 5676 xcb_randr_provider_t * 5677 xcb_randr_get_providers_providers (const xcb_randr_get_providers_reply_t *R /**< */) 5678 { 5679 return (xcb_randr_provider_t *) (R + 1); 5680 } 5681 5682 5683 /***************************************************************************** 5684 ** 5685 ** int xcb_randr_get_providers_providers_length 5686 ** 5687 ** @param const xcb_randr_get_providers_reply_t *R 5688 ** @returns int 5689 ** 5690 *****************************************************************************/ 5691 5692 int 5693 xcb_randr_get_providers_providers_length (const xcb_randr_get_providers_reply_t *R /**< */) 5694 { 5695 return R->num_providers; 5696 } 5697 5698 5699 /***************************************************************************** 5700 ** 5701 ** xcb_generic_iterator_t xcb_randr_get_providers_providers_end 5702 ** 5703 ** @param const xcb_randr_get_providers_reply_t *R 5704 ** @returns xcb_generic_iterator_t 5705 ** 5706 *****************************************************************************/ 5707 5708 xcb_generic_iterator_t 5709 xcb_randr_get_providers_providers_end (const xcb_randr_get_providers_reply_t *R /**< */) 5710 { 5711 xcb_generic_iterator_t i; 5712 i.data = ((xcb_randr_provider_t *) (R + 1)) + (R->num_providers); 5713 i.rem = 0; 5714 i.index = (char *) i.data - (char *) R; 5715 return i; 5716 } 5717 5718 5719 /***************************************************************************** 5720 ** 5721 ** xcb_randr_get_providers_reply_t * xcb_randr_get_providers_reply 5722 ** 5723 ** @param xcb_connection_t *c 5724 ** @param xcb_randr_get_providers_cookie_t cookie 5725 ** @param xcb_generic_error_t **e 5726 ** @returns xcb_randr_get_providers_reply_t * 5727 ** 5728 *****************************************************************************/ 5729 5730 xcb_randr_get_providers_reply_t * 5731 xcb_randr_get_providers_reply (xcb_connection_t *c /**< */, 5732 xcb_randr_get_providers_cookie_t cookie /**< */, 5733 xcb_generic_error_t **e /**< */) 5734 { 5735 return (xcb_randr_get_providers_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5736 } 5737 5738 int 5739 xcb_randr_get_provider_info_sizeof (const void *_buffer /**< */) 5740 { 5741 char *xcb_tmp = (char *)_buffer; 5742 const xcb_randr_get_provider_info_reply_t *_aux = (xcb_randr_get_provider_info_reply_t *)_buffer; 5743 unsigned int xcb_buffer_len = 0; 5744 unsigned int xcb_block_len = 0; 5745 unsigned int xcb_pad = 0; 5746 unsigned int xcb_align_to = 0; 5747 5748 5749 xcb_block_len += sizeof(xcb_randr_get_provider_info_reply_t); 5750 xcb_tmp += xcb_block_len; 5751 xcb_buffer_len += xcb_block_len; 5752 xcb_block_len = 0; 5753 /* crtcs */ 5754 xcb_block_len += _aux->num_crtcs * sizeof(uint32_t); 5755 xcb_tmp += xcb_block_len; 5756 xcb_align_to = ALIGNOF(xcb_randr_crtc_t); 5757 /* insert padding */ 5758 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5759 xcb_buffer_len += xcb_block_len + xcb_pad; 5760 if (0 != xcb_pad) { 5761 xcb_tmp += xcb_pad; 5762 xcb_pad = 0; 5763 } 5764 xcb_block_len = 0; 5765 /* outputs */ 5766 xcb_block_len += _aux->num_outputs * sizeof(uint32_t); 5767 xcb_tmp += xcb_block_len; 5768 xcb_align_to = ALIGNOF(xcb_randr_output_t); 5769 /* insert padding */ 5770 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5771 xcb_buffer_len += xcb_block_len + xcb_pad; 5772 if (0 != xcb_pad) { 5773 xcb_tmp += xcb_pad; 5774 xcb_pad = 0; 5775 } 5776 xcb_block_len = 0; 5777 /* associated_providers */ 5778 xcb_block_len += _aux->num_associated_providers * sizeof(uint32_t); 5779 xcb_tmp += xcb_block_len; 5780 xcb_align_to = ALIGNOF(xcb_randr_provider_t); 5781 /* insert padding */ 5782 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5783 xcb_buffer_len += xcb_block_len + xcb_pad; 5784 if (0 != xcb_pad) { 5785 xcb_tmp += xcb_pad; 5786 xcb_pad = 0; 5787 } 5788 xcb_block_len = 0; 5789 /* associated_capability */ 5790 xcb_block_len += _aux->num_associated_providers * sizeof(uint32_t); 5791 xcb_tmp += xcb_block_len; 5792 xcb_align_to = ALIGNOF(uint32_t); 5793 /* insert padding */ 5794 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5795 xcb_buffer_len += xcb_block_len + xcb_pad; 5796 if (0 != xcb_pad) { 5797 xcb_tmp += xcb_pad; 5798 xcb_pad = 0; 5799 } 5800 xcb_block_len = 0; 5801 /* name */ 5802 xcb_block_len += _aux->name_len * sizeof(char); 5803 xcb_tmp += xcb_block_len; 5804 xcb_align_to = ALIGNOF(char); 5805 /* insert padding */ 5806 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 5807 xcb_buffer_len += xcb_block_len + xcb_pad; 5808 if (0 != xcb_pad) { 5809 xcb_tmp += xcb_pad; 5810 xcb_pad = 0; 5811 } 5812 xcb_block_len = 0; 5813 5814 return xcb_buffer_len; 5815 } 5816 5817 5818 /***************************************************************************** 5819 ** 5820 ** xcb_randr_get_provider_info_cookie_t xcb_randr_get_provider_info 5821 ** 5822 ** @param xcb_connection_t *c 5823 ** @param xcb_randr_provider_t provider 5824 ** @param xcb_timestamp_t config_timestamp 5825 ** @returns xcb_randr_get_provider_info_cookie_t 5826 ** 5827 *****************************************************************************/ 5828 5829 xcb_randr_get_provider_info_cookie_t 5830 xcb_randr_get_provider_info (xcb_connection_t *c /**< */, 5831 xcb_randr_provider_t provider /**< */, 5832 xcb_timestamp_t config_timestamp /**< */) 5833 { 5834 static const xcb_protocol_request_t xcb_req = { 5835 /* count */ 2, 5836 /* ext */ &xcb_randr_id, 5837 /* opcode */ XCB_RANDR_GET_PROVIDER_INFO, 5838 /* isvoid */ 0 5839 }; 5840 5841 struct iovec xcb_parts[4]; 5842 xcb_randr_get_provider_info_cookie_t xcb_ret; 5843 xcb_randr_get_provider_info_request_t xcb_out; 5844 5845 xcb_out.provider = provider; 5846 xcb_out.config_timestamp = config_timestamp; 5847 5848 xcb_parts[2].iov_base = (char *) &xcb_out; 5849 xcb_parts[2].iov_len = sizeof(xcb_out); 5850 xcb_parts[3].iov_base = 0; 5851 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5852 5853 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5854 return xcb_ret; 5855 } 5856 5857 5858 /***************************************************************************** 5859 ** 5860 ** xcb_randr_get_provider_info_cookie_t xcb_randr_get_provider_info_unchecked 5861 ** 5862 ** @param xcb_connection_t *c 5863 ** @param xcb_randr_provider_t provider 5864 ** @param xcb_timestamp_t config_timestamp 5865 ** @returns xcb_randr_get_provider_info_cookie_t 5866 ** 5867 *****************************************************************************/ 5868 5869 xcb_randr_get_provider_info_cookie_t 5870 xcb_randr_get_provider_info_unchecked (xcb_connection_t *c /**< */, 5871 xcb_randr_provider_t provider /**< */, 5872 xcb_timestamp_t config_timestamp /**< */) 5873 { 5874 static const xcb_protocol_request_t xcb_req = { 5875 /* count */ 2, 5876 /* ext */ &xcb_randr_id, 5877 /* opcode */ XCB_RANDR_GET_PROVIDER_INFO, 5878 /* isvoid */ 0 5879 }; 5880 5881 struct iovec xcb_parts[4]; 5882 xcb_randr_get_provider_info_cookie_t xcb_ret; 5883 xcb_randr_get_provider_info_request_t xcb_out; 5884 5885 xcb_out.provider = provider; 5886 xcb_out.config_timestamp = config_timestamp; 5887 5888 xcb_parts[2].iov_base = (char *) &xcb_out; 5889 xcb_parts[2].iov_len = sizeof(xcb_out); 5890 xcb_parts[3].iov_base = 0; 5891 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5892 5893 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5894 return xcb_ret; 5895 } 5896 5897 5898 /***************************************************************************** 5899 ** 5900 ** xcb_randr_crtc_t * xcb_randr_get_provider_info_crtcs 5901 ** 5902 ** @param const xcb_randr_get_provider_info_reply_t *R 5903 ** @returns xcb_randr_crtc_t * 5904 ** 5905 *****************************************************************************/ 5906 5907 xcb_randr_crtc_t * 5908 xcb_randr_get_provider_info_crtcs (const xcb_randr_get_provider_info_reply_t *R /**< */) 5909 { 5910 return (xcb_randr_crtc_t *) (R + 1); 5911 } 5912 5913 5914 /***************************************************************************** 5915 ** 5916 ** int xcb_randr_get_provider_info_crtcs_length 5917 ** 5918 ** @param const xcb_randr_get_provider_info_reply_t *R 5919 ** @returns int 5920 ** 5921 *****************************************************************************/ 5922 5923 int 5924 xcb_randr_get_provider_info_crtcs_length (const xcb_randr_get_provider_info_reply_t *R /**< */) 5925 { 5926 return R->num_crtcs; 5927 } 5928 5929 5930 /***************************************************************************** 5931 ** 5932 ** xcb_generic_iterator_t xcb_randr_get_provider_info_crtcs_end 5933 ** 5934 ** @param const xcb_randr_get_provider_info_reply_t *R 5935 ** @returns xcb_generic_iterator_t 5936 ** 5937 *****************************************************************************/ 5938 5939 xcb_generic_iterator_t 5940 xcb_randr_get_provider_info_crtcs_end (const xcb_randr_get_provider_info_reply_t *R /**< */) 5941 { 5942 xcb_generic_iterator_t i; 5943 i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); 5944 i.rem = 0; 5945 i.index = (char *) i.data - (char *) R; 5946 return i; 5947 } 5948 5949 5950 /***************************************************************************** 5951 ** 5952 ** xcb_randr_output_t * xcb_randr_get_provider_info_outputs 5953 ** 5954 ** @param const xcb_randr_get_provider_info_reply_t *R 5955 ** @returns xcb_randr_output_t * 5956 ** 5957 *****************************************************************************/ 5958 5959 xcb_randr_output_t * 5960 xcb_randr_get_provider_info_outputs (const xcb_randr_get_provider_info_reply_t *R /**< */) 5961 { 5962 xcb_generic_iterator_t prev = xcb_randr_get_provider_info_crtcs_end(R); 5963 return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); 5964 } 5965 5966 5967 /***************************************************************************** 5968 ** 5969 ** int xcb_randr_get_provider_info_outputs_length 5970 ** 5971 ** @param const xcb_randr_get_provider_info_reply_t *R 5972 ** @returns int 5973 ** 5974 *****************************************************************************/ 5975 5976 int 5977 xcb_randr_get_provider_info_outputs_length (const xcb_randr_get_provider_info_reply_t *R /**< */) 5978 { 5979 return R->num_outputs; 5980 } 5981 5982 5983 /***************************************************************************** 5984 ** 5985 ** xcb_generic_iterator_t xcb_randr_get_provider_info_outputs_end 5986 ** 5987 ** @param const xcb_randr_get_provider_info_reply_t *R 5988 ** @returns xcb_generic_iterator_t 5989 ** 5990 *****************************************************************************/ 5991 5992 xcb_generic_iterator_t 5993 xcb_randr_get_provider_info_outputs_end (const xcb_randr_get_provider_info_reply_t *R /**< */) 5994 { 5995 xcb_generic_iterator_t i; 5996 xcb_generic_iterator_t child = xcb_randr_get_provider_info_crtcs_end(R); 5997 i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs); 5998 i.rem = 0; 5999 i.index = (char *) i.data - (char *) R; 6000 return i; 6001 } 6002 6003 6004 /***************************************************************************** 6005 ** 6006 ** xcb_randr_provider_t * xcb_randr_get_provider_info_associated_providers 6007 ** 6008 ** @param const xcb_randr_get_provider_info_reply_t *R 6009 ** @returns xcb_randr_provider_t * 6010 ** 6011 *****************************************************************************/ 6012 6013 xcb_randr_provider_t * 6014 xcb_randr_get_provider_info_associated_providers (const xcb_randr_get_provider_info_reply_t *R /**< */) 6015 { 6016 xcb_generic_iterator_t prev = xcb_randr_get_provider_info_outputs_end(R); 6017 return (xcb_randr_provider_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_provider_t, prev.index) + 0); 6018 } 6019 6020 6021 /***************************************************************************** 6022 ** 6023 ** int xcb_randr_get_provider_info_associated_providers_length 6024 ** 6025 ** @param const xcb_randr_get_provider_info_reply_t *R 6026 ** @returns int 6027 ** 6028 *****************************************************************************/ 6029 6030 int 6031 xcb_randr_get_provider_info_associated_providers_length (const xcb_randr_get_provider_info_reply_t *R /**< */) 6032 { 6033 return R->num_associated_providers; 6034 } 6035 6036 6037 /***************************************************************************** 6038 ** 6039 ** xcb_generic_iterator_t xcb_randr_get_provider_info_associated_providers_end 6040 ** 6041 ** @param const xcb_randr_get_provider_info_reply_t *R 6042 ** @returns xcb_generic_iterator_t 6043 ** 6044 *****************************************************************************/ 6045 6046 xcb_generic_iterator_t 6047 xcb_randr_get_provider_info_associated_providers_end (const xcb_randr_get_provider_info_reply_t *R /**< */) 6048 { 6049 xcb_generic_iterator_t i; 6050 xcb_generic_iterator_t child = xcb_randr_get_provider_info_outputs_end(R); 6051 i.data = ((xcb_randr_provider_t *) child.data) + (R->num_associated_providers); 6052 i.rem = 0; 6053 i.index = (char *) i.data - (char *) R; 6054 return i; 6055 } 6056 6057 6058 /***************************************************************************** 6059 ** 6060 ** uint32_t * xcb_randr_get_provider_info_associated_capability 6061 ** 6062 ** @param const xcb_randr_get_provider_info_reply_t *R 6063 ** @returns uint32_t * 6064 ** 6065 *****************************************************************************/ 6066 6067 uint32_t * 6068 xcb_randr_get_provider_info_associated_capability (const xcb_randr_get_provider_info_reply_t *R /**< */) 6069 { 6070 xcb_generic_iterator_t prev = xcb_randr_get_provider_info_associated_providers_end(R); 6071 return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); 6072 } 6073 6074 6075 /***************************************************************************** 6076 ** 6077 ** int xcb_randr_get_provider_info_associated_capability_length 6078 ** 6079 ** @param const xcb_randr_get_provider_info_reply_t *R 6080 ** @returns int 6081 ** 6082 *****************************************************************************/ 6083 6084 int 6085 xcb_randr_get_provider_info_associated_capability_length (const xcb_randr_get_provider_info_reply_t *R /**< */) 6086 { 6087 return R->num_associated_providers; 6088 } 6089 6090 6091 /***************************************************************************** 6092 ** 6093 ** xcb_generic_iterator_t xcb_randr_get_provider_info_associated_capability_end 6094 ** 6095 ** @param const xcb_randr_get_provider_info_reply_t *R 6096 ** @returns xcb_generic_iterator_t 6097 ** 6098 *****************************************************************************/ 6099 6100 xcb_generic_iterator_t 6101 xcb_randr_get_provider_info_associated_capability_end (const xcb_randr_get_provider_info_reply_t *R /**< */) 6102 { 6103 xcb_generic_iterator_t i; 6104 xcb_generic_iterator_t child = xcb_randr_get_provider_info_associated_providers_end(R); 6105 i.data = ((uint32_t *) child.data) + (R->num_associated_providers); 6106 i.rem = 0; 6107 i.index = (char *) i.data - (char *) R; 6108 return i; 6109 } 6110 6111 6112 /***************************************************************************** 6113 ** 6114 ** char * xcb_randr_get_provider_info_name 6115 ** 6116 ** @param const xcb_randr_get_provider_info_reply_t *R 6117 ** @returns char * 6118 ** 6119 *****************************************************************************/ 6120 6121 char * 6122 xcb_randr_get_provider_info_name (const xcb_randr_get_provider_info_reply_t *R /**< */) 6123 { 6124 xcb_generic_iterator_t prev = xcb_randr_get_provider_info_associated_capability_end(R); 6125 return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0); 6126 } 6127 6128 6129 /***************************************************************************** 6130 ** 6131 ** int xcb_randr_get_provider_info_name_length 6132 ** 6133 ** @param const xcb_randr_get_provider_info_reply_t *R 6134 ** @returns int 6135 ** 6136 *****************************************************************************/ 6137 6138 int 6139 xcb_randr_get_provider_info_name_length (const xcb_randr_get_provider_info_reply_t *R /**< */) 6140 { 6141 return R->name_len; 6142 } 6143 6144 6145 /***************************************************************************** 6146 ** 6147 ** xcb_generic_iterator_t xcb_randr_get_provider_info_name_end 6148 ** 6149 ** @param const xcb_randr_get_provider_info_reply_t *R 6150 ** @returns xcb_generic_iterator_t 6151 ** 6152 *****************************************************************************/ 6153 6154 xcb_generic_iterator_t 6155 xcb_randr_get_provider_info_name_end (const xcb_randr_get_provider_info_reply_t *R /**< */) 6156 { 6157 xcb_generic_iterator_t i; 6158 xcb_generic_iterator_t child = xcb_randr_get_provider_info_associated_capability_end(R); 6159 i.data = ((char *) child.data) + (R->name_len); 6160 i.rem = 0; 6161 i.index = (char *) i.data - (char *) R; 6162 return i; 6163 } 6164 6165 6166 /***************************************************************************** 6167 ** 6168 ** xcb_randr_get_provider_info_reply_t * xcb_randr_get_provider_info_reply 6169 ** 6170 ** @param xcb_connection_t *c 6171 ** @param xcb_randr_get_provider_info_cookie_t cookie 6172 ** @param xcb_generic_error_t **e 6173 ** @returns xcb_randr_get_provider_info_reply_t * 6174 ** 6175 *****************************************************************************/ 6176 6177 xcb_randr_get_provider_info_reply_t * 6178 xcb_randr_get_provider_info_reply (xcb_connection_t *c /**< */, 6179 xcb_randr_get_provider_info_cookie_t cookie /**< */, 6180 xcb_generic_error_t **e /**< */) 6181 { 6182 return (xcb_randr_get_provider_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 6183 } 6184 6185 6186 /***************************************************************************** 6187 ** 6188 ** xcb_void_cookie_t xcb_randr_set_provider_offload_sink_checked 6189 ** 6190 ** @param xcb_connection_t *c 6191 ** @param xcb_randr_provider_t provider 6192 ** @param xcb_randr_provider_t sink_provider 6193 ** @param xcb_timestamp_t config_timestamp 6194 ** @returns xcb_void_cookie_t 6195 ** 6196 *****************************************************************************/ 6197 6198 xcb_void_cookie_t 6199 xcb_randr_set_provider_offload_sink_checked (xcb_connection_t *c /**< */, 6200 xcb_randr_provider_t provider /**< */, 6201 xcb_randr_provider_t sink_provider /**< */, 6202 xcb_timestamp_t config_timestamp /**< */) 6203 { 6204 static const xcb_protocol_request_t xcb_req = { 6205 /* count */ 2, 6206 /* ext */ &xcb_randr_id, 6207 /* opcode */ XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK, 6208 /* isvoid */ 1 6209 }; 6210 6211 struct iovec xcb_parts[4]; 6212 xcb_void_cookie_t xcb_ret; 6213 xcb_randr_set_provider_offload_sink_request_t xcb_out; 6214 6215 xcb_out.provider = provider; 6216 xcb_out.sink_provider = sink_provider; 6217 xcb_out.config_timestamp = config_timestamp; 6218 6219 xcb_parts[2].iov_base = (char *) &xcb_out; 6220 xcb_parts[2].iov_len = sizeof(xcb_out); 6221 xcb_parts[3].iov_base = 0; 6222 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6223 6224 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6225 return xcb_ret; 6226 } 6227 6228 6229 /***************************************************************************** 6230 ** 6231 ** xcb_void_cookie_t xcb_randr_set_provider_offload_sink 6232 ** 6233 ** @param xcb_connection_t *c 6234 ** @param xcb_randr_provider_t provider 6235 ** @param xcb_randr_provider_t sink_provider 6236 ** @param xcb_timestamp_t config_timestamp 6237 ** @returns xcb_void_cookie_t 6238 ** 6239 *****************************************************************************/ 6240 6241 xcb_void_cookie_t 6242 xcb_randr_set_provider_offload_sink (xcb_connection_t *c /**< */, 6243 xcb_randr_provider_t provider /**< */, 6244 xcb_randr_provider_t sink_provider /**< */, 6245 xcb_timestamp_t config_timestamp /**< */) 6246 { 6247 static const xcb_protocol_request_t xcb_req = { 6248 /* count */ 2, 6249 /* ext */ &xcb_randr_id, 6250 /* opcode */ XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK, 6251 /* isvoid */ 1 6252 }; 6253 6254 struct iovec xcb_parts[4]; 6255 xcb_void_cookie_t xcb_ret; 6256 xcb_randr_set_provider_offload_sink_request_t xcb_out; 6257 6258 xcb_out.provider = provider; 6259 xcb_out.sink_provider = sink_provider; 6260 xcb_out.config_timestamp = config_timestamp; 6261 6262 xcb_parts[2].iov_base = (char *) &xcb_out; 6263 xcb_parts[2].iov_len = sizeof(xcb_out); 6264 xcb_parts[3].iov_base = 0; 6265 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6266 6267 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6268 return xcb_ret; 6269 } 6270 6271 6272 /***************************************************************************** 6273 ** 6274 ** xcb_void_cookie_t xcb_randr_set_provider_output_source_checked 6275 ** 6276 ** @param xcb_connection_t *c 6277 ** @param xcb_randr_provider_t provider 6278 ** @param xcb_randr_provider_t source_provider 6279 ** @param xcb_timestamp_t config_timestamp 6280 ** @returns xcb_void_cookie_t 6281 ** 6282 *****************************************************************************/ 6283 6284 xcb_void_cookie_t 6285 xcb_randr_set_provider_output_source_checked (xcb_connection_t *c /**< */, 6286 xcb_randr_provider_t provider /**< */, 6287 xcb_randr_provider_t source_provider /**< */, 6288 xcb_timestamp_t config_timestamp /**< */) 6289 { 6290 static const xcb_protocol_request_t xcb_req = { 6291 /* count */ 2, 6292 /* ext */ &xcb_randr_id, 6293 /* opcode */ XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE, 6294 /* isvoid */ 1 6295 }; 6296 6297 struct iovec xcb_parts[4]; 6298 xcb_void_cookie_t xcb_ret; 6299 xcb_randr_set_provider_output_source_request_t xcb_out; 6300 6301 xcb_out.provider = provider; 6302 xcb_out.source_provider = source_provider; 6303 xcb_out.config_timestamp = config_timestamp; 6304 6305 xcb_parts[2].iov_base = (char *) &xcb_out; 6306 xcb_parts[2].iov_len = sizeof(xcb_out); 6307 xcb_parts[3].iov_base = 0; 6308 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6309 6310 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6311 return xcb_ret; 6312 } 6313 6314 6315 /***************************************************************************** 6316 ** 6317 ** xcb_void_cookie_t xcb_randr_set_provider_output_source 6318 ** 6319 ** @param xcb_connection_t *c 6320 ** @param xcb_randr_provider_t provider 6321 ** @param xcb_randr_provider_t source_provider 6322 ** @param xcb_timestamp_t config_timestamp 6323 ** @returns xcb_void_cookie_t 6324 ** 6325 *****************************************************************************/ 6326 6327 xcb_void_cookie_t 6328 xcb_randr_set_provider_output_source (xcb_connection_t *c /**< */, 6329 xcb_randr_provider_t provider /**< */, 6330 xcb_randr_provider_t source_provider /**< */, 6331 xcb_timestamp_t config_timestamp /**< */) 6332 { 6333 static const xcb_protocol_request_t xcb_req = { 6334 /* count */ 2, 6335 /* ext */ &xcb_randr_id, 6336 /* opcode */ XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE, 6337 /* isvoid */ 1 6338 }; 6339 6340 struct iovec xcb_parts[4]; 6341 xcb_void_cookie_t xcb_ret; 6342 xcb_randr_set_provider_output_source_request_t xcb_out; 6343 6344 xcb_out.provider = provider; 6345 xcb_out.source_provider = source_provider; 6346 xcb_out.config_timestamp = config_timestamp; 6347 6348 xcb_parts[2].iov_base = (char *) &xcb_out; 6349 xcb_parts[2].iov_len = sizeof(xcb_out); 6350 xcb_parts[3].iov_base = 0; 6351 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6352 6353 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6354 return xcb_ret; 6355 } 6356 6357 int 6358 xcb_randr_list_provider_properties_sizeof (const void *_buffer /**< */) 6359 { 6360 char *xcb_tmp = (char *)_buffer; 6361 const xcb_randr_list_provider_properties_reply_t *_aux = (xcb_randr_list_provider_properties_reply_t *)_buffer; 6362 unsigned int xcb_buffer_len = 0; 6363 unsigned int xcb_block_len = 0; 6364 unsigned int xcb_pad = 0; 6365 unsigned int xcb_align_to = 0; 6366 6367 6368 xcb_block_len += sizeof(xcb_randr_list_provider_properties_reply_t); 6369 xcb_tmp += xcb_block_len; 6370 xcb_buffer_len += xcb_block_len; 6371 xcb_block_len = 0; 6372 /* atoms */ 6373 xcb_block_len += _aux->num_atoms * sizeof(xcb_atom_t); 6374 xcb_tmp += xcb_block_len; 6375 xcb_align_to = ALIGNOF(xcb_atom_t); 6376 /* insert padding */ 6377 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6378 xcb_buffer_len += xcb_block_len + xcb_pad; 6379 if (0 != xcb_pad) { 6380 xcb_tmp += xcb_pad; 6381 xcb_pad = 0; 6382 } 6383 xcb_block_len = 0; 6384 6385 return xcb_buffer_len; 6386 } 6387 6388 6389 /***************************************************************************** 6390 ** 6391 ** xcb_randr_list_provider_properties_cookie_t xcb_randr_list_provider_properties 6392 ** 6393 ** @param xcb_connection_t *c 6394 ** @param xcb_randr_provider_t provider 6395 ** @returns xcb_randr_list_provider_properties_cookie_t 6396 ** 6397 *****************************************************************************/ 6398 6399 xcb_randr_list_provider_properties_cookie_t 6400 xcb_randr_list_provider_properties (xcb_connection_t *c /**< */, 6401 xcb_randr_provider_t provider /**< */) 6402 { 6403 static const xcb_protocol_request_t xcb_req = { 6404 /* count */ 2, 6405 /* ext */ &xcb_randr_id, 6406 /* opcode */ XCB_RANDR_LIST_PROVIDER_PROPERTIES, 6407 /* isvoid */ 0 6408 }; 6409 6410 struct iovec xcb_parts[4]; 6411 xcb_randr_list_provider_properties_cookie_t xcb_ret; 6412 xcb_randr_list_provider_properties_request_t xcb_out; 6413 6414 xcb_out.provider = provider; 6415 6416 xcb_parts[2].iov_base = (char *) &xcb_out; 6417 xcb_parts[2].iov_len = sizeof(xcb_out); 6418 xcb_parts[3].iov_base = 0; 6419 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6420 6421 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6422 return xcb_ret; 6423 } 6424 6425 6426 /***************************************************************************** 6427 ** 6428 ** xcb_randr_list_provider_properties_cookie_t xcb_randr_list_provider_properties_unchecked 6429 ** 6430 ** @param xcb_connection_t *c 6431 ** @param xcb_randr_provider_t provider 6432 ** @returns xcb_randr_list_provider_properties_cookie_t 6433 ** 6434 *****************************************************************************/ 6435 6436 xcb_randr_list_provider_properties_cookie_t 6437 xcb_randr_list_provider_properties_unchecked (xcb_connection_t *c /**< */, 6438 xcb_randr_provider_t provider /**< */) 6439 { 6440 static const xcb_protocol_request_t xcb_req = { 6441 /* count */ 2, 6442 /* ext */ &xcb_randr_id, 6443 /* opcode */ XCB_RANDR_LIST_PROVIDER_PROPERTIES, 6444 /* isvoid */ 0 6445 }; 6446 6447 struct iovec xcb_parts[4]; 6448 xcb_randr_list_provider_properties_cookie_t xcb_ret; 6449 xcb_randr_list_provider_properties_request_t xcb_out; 6450 6451 xcb_out.provider = provider; 6452 6453 xcb_parts[2].iov_base = (char *) &xcb_out; 6454 xcb_parts[2].iov_len = sizeof(xcb_out); 6455 xcb_parts[3].iov_base = 0; 6456 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6457 6458 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6459 return xcb_ret; 6460 } 6461 6462 6463 /***************************************************************************** 6464 ** 6465 ** xcb_atom_t * xcb_randr_list_provider_properties_atoms 6466 ** 6467 ** @param const xcb_randr_list_provider_properties_reply_t *R 6468 ** @returns xcb_atom_t * 6469 ** 6470 *****************************************************************************/ 6471 6472 xcb_atom_t * 6473 xcb_randr_list_provider_properties_atoms (const xcb_randr_list_provider_properties_reply_t *R /**< */) 6474 { 6475 return (xcb_atom_t *) (R + 1); 6476 } 6477 6478 6479 /***************************************************************************** 6480 ** 6481 ** int xcb_randr_list_provider_properties_atoms_length 6482 ** 6483 ** @param const xcb_randr_list_provider_properties_reply_t *R 6484 ** @returns int 6485 ** 6486 *****************************************************************************/ 6487 6488 int 6489 xcb_randr_list_provider_properties_atoms_length (const xcb_randr_list_provider_properties_reply_t *R /**< */) 6490 { 6491 return R->num_atoms; 6492 } 6493 6494 6495 /***************************************************************************** 6496 ** 6497 ** xcb_generic_iterator_t xcb_randr_list_provider_properties_atoms_end 6498 ** 6499 ** @param const xcb_randr_list_provider_properties_reply_t *R 6500 ** @returns xcb_generic_iterator_t 6501 ** 6502 *****************************************************************************/ 6503 6504 xcb_generic_iterator_t 6505 xcb_randr_list_provider_properties_atoms_end (const xcb_randr_list_provider_properties_reply_t *R /**< */) 6506 { 6507 xcb_generic_iterator_t i; 6508 i.data = ((xcb_atom_t *) (R + 1)) + (R->num_atoms); 6509 i.rem = 0; 6510 i.index = (char *) i.data - (char *) R; 6511 return i; 6512 } 6513 6514 6515 /***************************************************************************** 6516 ** 6517 ** xcb_randr_list_provider_properties_reply_t * xcb_randr_list_provider_properties_reply 6518 ** 6519 ** @param xcb_connection_t *c 6520 ** @param xcb_randr_list_provider_properties_cookie_t cookie 6521 ** @param xcb_generic_error_t **e 6522 ** @returns xcb_randr_list_provider_properties_reply_t * 6523 ** 6524 *****************************************************************************/ 6525 6526 xcb_randr_list_provider_properties_reply_t * 6527 xcb_randr_list_provider_properties_reply (xcb_connection_t *c /**< */, 6528 xcb_randr_list_provider_properties_cookie_t cookie /**< */, 6529 xcb_generic_error_t **e /**< */) 6530 { 6531 return (xcb_randr_list_provider_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 6532 } 6533 6534 int 6535 xcb_randr_query_provider_property_sizeof (const void *_buffer /**< */) 6536 { 6537 char *xcb_tmp = (char *)_buffer; 6538 const xcb_randr_query_provider_property_reply_t *_aux = (xcb_randr_query_provider_property_reply_t *)_buffer; 6539 unsigned int xcb_buffer_len = 0; 6540 unsigned int xcb_block_len = 0; 6541 unsigned int xcb_pad = 0; 6542 unsigned int xcb_align_to = 0; 6543 6544 6545 xcb_block_len += sizeof(xcb_randr_query_provider_property_reply_t); 6546 xcb_tmp += xcb_block_len; 6547 xcb_buffer_len += xcb_block_len; 6548 xcb_block_len = 0; 6549 /* valid_values */ 6550 xcb_block_len += _aux->length * sizeof(int32_t); 6551 xcb_tmp += xcb_block_len; 6552 xcb_align_to = ALIGNOF(int32_t); 6553 /* insert padding */ 6554 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6555 xcb_buffer_len += xcb_block_len + xcb_pad; 6556 if (0 != xcb_pad) { 6557 xcb_tmp += xcb_pad; 6558 xcb_pad = 0; 6559 } 6560 xcb_block_len = 0; 6561 6562 return xcb_buffer_len; 6563 } 6564 6565 6566 /***************************************************************************** 6567 ** 6568 ** xcb_randr_query_provider_property_cookie_t xcb_randr_query_provider_property 6569 ** 6570 ** @param xcb_connection_t *c 6571 ** @param xcb_randr_provider_t provider 6572 ** @param xcb_atom_t property 6573 ** @returns xcb_randr_query_provider_property_cookie_t 6574 ** 6575 *****************************************************************************/ 6576 6577 xcb_randr_query_provider_property_cookie_t 6578 xcb_randr_query_provider_property (xcb_connection_t *c /**< */, 6579 xcb_randr_provider_t provider /**< */, 6580 xcb_atom_t property /**< */) 6581 { 6582 static const xcb_protocol_request_t xcb_req = { 6583 /* count */ 2, 6584 /* ext */ &xcb_randr_id, 6585 /* opcode */ XCB_RANDR_QUERY_PROVIDER_PROPERTY, 6586 /* isvoid */ 0 6587 }; 6588 6589 struct iovec xcb_parts[4]; 6590 xcb_randr_query_provider_property_cookie_t xcb_ret; 6591 xcb_randr_query_provider_property_request_t xcb_out; 6592 6593 xcb_out.provider = provider; 6594 xcb_out.property = property; 6595 6596 xcb_parts[2].iov_base = (char *) &xcb_out; 6597 xcb_parts[2].iov_len = sizeof(xcb_out); 6598 xcb_parts[3].iov_base = 0; 6599 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6600 6601 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6602 return xcb_ret; 6603 } 6604 6605 6606 /***************************************************************************** 6607 ** 6608 ** xcb_randr_query_provider_property_cookie_t xcb_randr_query_provider_property_unchecked 6609 ** 6610 ** @param xcb_connection_t *c 6611 ** @param xcb_randr_provider_t provider 6612 ** @param xcb_atom_t property 6613 ** @returns xcb_randr_query_provider_property_cookie_t 6614 ** 6615 *****************************************************************************/ 6616 6617 xcb_randr_query_provider_property_cookie_t 6618 xcb_randr_query_provider_property_unchecked (xcb_connection_t *c /**< */, 6619 xcb_randr_provider_t provider /**< */, 6620 xcb_atom_t property /**< */) 6621 { 6622 static const xcb_protocol_request_t xcb_req = { 6623 /* count */ 2, 6624 /* ext */ &xcb_randr_id, 6625 /* opcode */ XCB_RANDR_QUERY_PROVIDER_PROPERTY, 6626 /* isvoid */ 0 6627 }; 6628 6629 struct iovec xcb_parts[4]; 6630 xcb_randr_query_provider_property_cookie_t xcb_ret; 6631 xcb_randr_query_provider_property_request_t xcb_out; 6632 6633 xcb_out.provider = provider; 6634 xcb_out.property = property; 6635 6636 xcb_parts[2].iov_base = (char *) &xcb_out; 6637 xcb_parts[2].iov_len = sizeof(xcb_out); 6638 xcb_parts[3].iov_base = 0; 6639 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6640 6641 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6642 return xcb_ret; 6643 } 6644 6645 6646 /***************************************************************************** 6647 ** 6648 ** int32_t * xcb_randr_query_provider_property_valid_values 6649 ** 6650 ** @param const xcb_randr_query_provider_property_reply_t *R 6651 ** @returns int32_t * 6652 ** 6653 *****************************************************************************/ 6654 6655 int32_t * 6656 xcb_randr_query_provider_property_valid_values (const xcb_randr_query_provider_property_reply_t *R /**< */) 6657 { 6658 return (int32_t *) (R + 1); 6659 } 6660 6661 6662 /***************************************************************************** 6663 ** 6664 ** int xcb_randr_query_provider_property_valid_values_length 6665 ** 6666 ** @param const xcb_randr_query_provider_property_reply_t *R 6667 ** @returns int 6668 ** 6669 *****************************************************************************/ 6670 6671 int 6672 xcb_randr_query_provider_property_valid_values_length (const xcb_randr_query_provider_property_reply_t *R /**< */) 6673 { 6674 return R->length; 6675 } 6676 6677 6678 /***************************************************************************** 6679 ** 6680 ** xcb_generic_iterator_t xcb_randr_query_provider_property_valid_values_end 6681 ** 6682 ** @param const xcb_randr_query_provider_property_reply_t *R 6683 ** @returns xcb_generic_iterator_t 6684 ** 6685 *****************************************************************************/ 6686 6687 xcb_generic_iterator_t 6688 xcb_randr_query_provider_property_valid_values_end (const xcb_randr_query_provider_property_reply_t *R /**< */) 6689 { 6690 xcb_generic_iterator_t i; 6691 i.data = ((int32_t *) (R + 1)) + (R->length); 6692 i.rem = 0; 6693 i.index = (char *) i.data - (char *) R; 6694 return i; 6695 } 6696 6697 6698 /***************************************************************************** 6699 ** 6700 ** xcb_randr_query_provider_property_reply_t * xcb_randr_query_provider_property_reply 6701 ** 6702 ** @param xcb_connection_t *c 6703 ** @param xcb_randr_query_provider_property_cookie_t cookie 6704 ** @param xcb_generic_error_t **e 6705 ** @returns xcb_randr_query_provider_property_reply_t * 6706 ** 6707 *****************************************************************************/ 6708 6709 xcb_randr_query_provider_property_reply_t * 6710 xcb_randr_query_provider_property_reply (xcb_connection_t *c /**< */, 6711 xcb_randr_query_provider_property_cookie_t cookie /**< */, 6712 xcb_generic_error_t **e /**< */) 6713 { 6714 return (xcb_randr_query_provider_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 6715 } 6716 6717 int 6718 xcb_randr_configure_provider_property_sizeof (const void *_buffer /**< */, 6719 uint32_t values_len /**< */) 6720 { 6721 char *xcb_tmp = (char *)_buffer; 6722 unsigned int xcb_buffer_len = 0; 6723 unsigned int xcb_block_len = 0; 6724 unsigned int xcb_pad = 0; 6725 unsigned int xcb_align_to = 0; 6726 6727 6728 xcb_block_len += sizeof(xcb_randr_configure_provider_property_request_t); 6729 xcb_tmp += xcb_block_len; 6730 xcb_buffer_len += xcb_block_len; 6731 xcb_block_len = 0; 6732 /* values */ 6733 xcb_block_len += values_len * sizeof(int32_t); 6734 xcb_tmp += xcb_block_len; 6735 xcb_align_to = ALIGNOF(int32_t); 6736 /* insert padding */ 6737 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6738 xcb_buffer_len += xcb_block_len + xcb_pad; 6739 if (0 != xcb_pad) { 6740 xcb_tmp += xcb_pad; 6741 xcb_pad = 0; 6742 } 6743 xcb_block_len = 0; 6744 6745 return xcb_buffer_len; 6746 } 6747 6748 6749 /***************************************************************************** 6750 ** 6751 ** xcb_void_cookie_t xcb_randr_configure_provider_property_checked 6752 ** 6753 ** @param xcb_connection_t *c 6754 ** @param xcb_randr_provider_t provider 6755 ** @param xcb_atom_t property 6756 ** @param uint8_t pending 6757 ** @param uint8_t range 6758 ** @param uint32_t values_len 6759 ** @param const int32_t *values 6760 ** @returns xcb_void_cookie_t 6761 ** 6762 *****************************************************************************/ 6763 6764 xcb_void_cookie_t 6765 xcb_randr_configure_provider_property_checked (xcb_connection_t *c /**< */, 6766 xcb_randr_provider_t provider /**< */, 6767 xcb_atom_t property /**< */, 6768 uint8_t pending /**< */, 6769 uint8_t range /**< */, 6770 uint32_t values_len /**< */, 6771 const int32_t *values /**< */) 6772 { 6773 static const xcb_protocol_request_t xcb_req = { 6774 /* count */ 4, 6775 /* ext */ &xcb_randr_id, 6776 /* opcode */ XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY, 6777 /* isvoid */ 1 6778 }; 6779 6780 struct iovec xcb_parts[6]; 6781 xcb_void_cookie_t xcb_ret; 6782 xcb_randr_configure_provider_property_request_t xcb_out; 6783 6784 xcb_out.provider = provider; 6785 xcb_out.property = property; 6786 xcb_out.pending = pending; 6787 xcb_out.range = range; 6788 memset(xcb_out.pad0, 0, 2); 6789 6790 xcb_parts[2].iov_base = (char *) &xcb_out; 6791 xcb_parts[2].iov_len = sizeof(xcb_out); 6792 xcb_parts[3].iov_base = 0; 6793 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6794 /* int32_t values */ 6795 xcb_parts[4].iov_base = (char *) values; 6796 xcb_parts[4].iov_len = values_len * sizeof(int32_t); 6797 xcb_parts[5].iov_base = 0; 6798 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 6799 6800 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6801 return xcb_ret; 6802 } 6803 6804 6805 /***************************************************************************** 6806 ** 6807 ** xcb_void_cookie_t xcb_randr_configure_provider_property 6808 ** 6809 ** @param xcb_connection_t *c 6810 ** @param xcb_randr_provider_t provider 6811 ** @param xcb_atom_t property 6812 ** @param uint8_t pending 6813 ** @param uint8_t range 6814 ** @param uint32_t values_len 6815 ** @param const int32_t *values 6816 ** @returns xcb_void_cookie_t 6817 ** 6818 *****************************************************************************/ 6819 6820 xcb_void_cookie_t 6821 xcb_randr_configure_provider_property (xcb_connection_t *c /**< */, 6822 xcb_randr_provider_t provider /**< */, 6823 xcb_atom_t property /**< */, 6824 uint8_t pending /**< */, 6825 uint8_t range /**< */, 6826 uint32_t values_len /**< */, 6827 const int32_t *values /**< */) 6828 { 6829 static const xcb_protocol_request_t xcb_req = { 6830 /* count */ 4, 6831 /* ext */ &xcb_randr_id, 6832 /* opcode */ XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY, 6833 /* isvoid */ 1 6834 }; 6835 6836 struct iovec xcb_parts[6]; 6837 xcb_void_cookie_t xcb_ret; 6838 xcb_randr_configure_provider_property_request_t xcb_out; 6839 6840 xcb_out.provider = provider; 6841 xcb_out.property = property; 6842 xcb_out.pending = pending; 6843 xcb_out.range = range; 6844 memset(xcb_out.pad0, 0, 2); 6845 6846 xcb_parts[2].iov_base = (char *) &xcb_out; 6847 xcb_parts[2].iov_len = sizeof(xcb_out); 6848 xcb_parts[3].iov_base = 0; 6849 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6850 /* int32_t values */ 6851 xcb_parts[4].iov_base = (char *) values; 6852 xcb_parts[4].iov_len = values_len * sizeof(int32_t); 6853 xcb_parts[5].iov_base = 0; 6854 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 6855 6856 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6857 return xcb_ret; 6858 } 6859 6860 int 6861 xcb_randr_change_provider_property_sizeof (const void *_buffer /**< */) 6862 { 6863 char *xcb_tmp = (char *)_buffer; 6864 const xcb_randr_change_provider_property_request_t *_aux = (xcb_randr_change_provider_property_request_t *)_buffer; 6865 unsigned int xcb_buffer_len = 0; 6866 unsigned int xcb_block_len = 0; 6867 unsigned int xcb_pad = 0; 6868 unsigned int xcb_align_to = 0; 6869 6870 6871 xcb_block_len += sizeof(xcb_randr_change_provider_property_request_t); 6872 xcb_tmp += xcb_block_len; 6873 xcb_buffer_len += xcb_block_len; 6874 xcb_block_len = 0; 6875 /* data */ 6876 xcb_block_len += (_aux->num_items * (_aux->format / 8)) * sizeof(char); 6877 xcb_tmp += xcb_block_len; 6878 xcb_align_to = ALIGNOF(char); 6879 /* insert padding */ 6880 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6881 xcb_buffer_len += xcb_block_len + xcb_pad; 6882 if (0 != xcb_pad) { 6883 xcb_tmp += xcb_pad; 6884 xcb_pad = 0; 6885 } 6886 xcb_block_len = 0; 6887 6888 return xcb_buffer_len; 6889 } 6890 6891 6892 /***************************************************************************** 6893 ** 6894 ** xcb_void_cookie_t xcb_randr_change_provider_property_checked 6895 ** 6896 ** @param xcb_connection_t *c 6897 ** @param xcb_randr_provider_t provider 6898 ** @param xcb_atom_t property 6899 ** @param xcb_atom_t type 6900 ** @param uint8_t format 6901 ** @param uint8_t mode 6902 ** @param uint32_t num_items 6903 ** @param const void *data 6904 ** @returns xcb_void_cookie_t 6905 ** 6906 *****************************************************************************/ 6907 6908 xcb_void_cookie_t 6909 xcb_randr_change_provider_property_checked (xcb_connection_t *c /**< */, 6910 xcb_randr_provider_t provider /**< */, 6911 xcb_atom_t property /**< */, 6912 xcb_atom_t type /**< */, 6913 uint8_t format /**< */, 6914 uint8_t mode /**< */, 6915 uint32_t num_items /**< */, 6916 const void *data /**< */) 6917 { 6918 static const xcb_protocol_request_t xcb_req = { 6919 /* count */ 4, 6920 /* ext */ &xcb_randr_id, 6921 /* opcode */ XCB_RANDR_CHANGE_PROVIDER_PROPERTY, 6922 /* isvoid */ 1 6923 }; 6924 6925 struct iovec xcb_parts[6]; 6926 xcb_void_cookie_t xcb_ret; 6927 xcb_randr_change_provider_property_request_t xcb_out; 6928 6929 xcb_out.provider = provider; 6930 xcb_out.property = property; 6931 xcb_out.type = type; 6932 xcb_out.format = format; 6933 xcb_out.mode = mode; 6934 memset(xcb_out.pad0, 0, 2); 6935 xcb_out.num_items = num_items; 6936 6937 xcb_parts[2].iov_base = (char *) &xcb_out; 6938 xcb_parts[2].iov_len = sizeof(xcb_out); 6939 xcb_parts[3].iov_base = 0; 6940 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6941 /* void data */ 6942 xcb_parts[4].iov_base = (char *) data; 6943 xcb_parts[4].iov_len = (num_items * (format / 8)) * sizeof(char); 6944 xcb_parts[5].iov_base = 0; 6945 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 6946 6947 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6948 return xcb_ret; 6949 } 6950 6951 6952 /***************************************************************************** 6953 ** 6954 ** xcb_void_cookie_t xcb_randr_change_provider_property 6955 ** 6956 ** @param xcb_connection_t *c 6957 ** @param xcb_randr_provider_t provider 6958 ** @param xcb_atom_t property 6959 ** @param xcb_atom_t type 6960 ** @param uint8_t format 6961 ** @param uint8_t mode 6962 ** @param uint32_t num_items 6963 ** @param const void *data 6964 ** @returns xcb_void_cookie_t 6965 ** 6966 *****************************************************************************/ 6967 6968 xcb_void_cookie_t 6969 xcb_randr_change_provider_property (xcb_connection_t *c /**< */, 6970 xcb_randr_provider_t provider /**< */, 6971 xcb_atom_t property /**< */, 6972 xcb_atom_t type /**< */, 6973 uint8_t format /**< */, 6974 uint8_t mode /**< */, 6975 uint32_t num_items /**< */, 6976 const void *data /**< */) 6977 { 6978 static const xcb_protocol_request_t xcb_req = { 6979 /* count */ 4, 6980 /* ext */ &xcb_randr_id, 6981 /* opcode */ XCB_RANDR_CHANGE_PROVIDER_PROPERTY, 6982 /* isvoid */ 1 6983 }; 6984 6985 struct iovec xcb_parts[6]; 6986 xcb_void_cookie_t xcb_ret; 6987 xcb_randr_change_provider_property_request_t xcb_out; 6988 6989 xcb_out.provider = provider; 6990 xcb_out.property = property; 6991 xcb_out.type = type; 6992 xcb_out.format = format; 6993 xcb_out.mode = mode; 6994 memset(xcb_out.pad0, 0, 2); 6995 xcb_out.num_items = num_items; 6996 6997 xcb_parts[2].iov_base = (char *) &xcb_out; 6998 xcb_parts[2].iov_len = sizeof(xcb_out); 6999 xcb_parts[3].iov_base = 0; 7000 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 7001 /* void data */ 7002 xcb_parts[4].iov_base = (char *) data; 7003 xcb_parts[4].iov_len = (num_items * (format / 8)) * sizeof(char); 7004 xcb_parts[5].iov_base = 0; 7005 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 7006 7007 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 7008 return xcb_ret; 7009 } 7010 7011 7012 /***************************************************************************** 7013 ** 7014 ** xcb_void_cookie_t xcb_randr_delete_provider_property_checked 7015 ** 7016 ** @param xcb_connection_t *c 7017 ** @param xcb_randr_provider_t provider 7018 ** @param xcb_atom_t property 7019 ** @returns xcb_void_cookie_t 7020 ** 7021 *****************************************************************************/ 7022 7023 xcb_void_cookie_t 7024 xcb_randr_delete_provider_property_checked (xcb_connection_t *c /**< */, 7025 xcb_randr_provider_t provider /**< */, 7026 xcb_atom_t property /**< */) 7027 { 7028 static const xcb_protocol_request_t xcb_req = { 7029 /* count */ 2, 7030 /* ext */ &xcb_randr_id, 7031 /* opcode */ XCB_RANDR_DELETE_PROVIDER_PROPERTY, 7032 /* isvoid */ 1 7033 }; 7034 7035 struct iovec xcb_parts[4]; 7036 xcb_void_cookie_t xcb_ret; 7037 xcb_randr_delete_provider_property_request_t xcb_out; 7038 7039 xcb_out.provider = provider; 7040 xcb_out.property = property; 7041 7042 xcb_parts[2].iov_base = (char *) &xcb_out; 7043 xcb_parts[2].iov_len = sizeof(xcb_out); 7044 xcb_parts[3].iov_base = 0; 7045 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 7046 7047 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 7048 return xcb_ret; 7049 } 7050 7051 7052 /***************************************************************************** 7053 ** 7054 ** xcb_void_cookie_t xcb_randr_delete_provider_property 7055 ** 7056 ** @param xcb_connection_t *c 7057 ** @param xcb_randr_provider_t provider 7058 ** @param xcb_atom_t property 7059 ** @returns xcb_void_cookie_t 7060 ** 7061 *****************************************************************************/ 7062 7063 xcb_void_cookie_t 7064 xcb_randr_delete_provider_property (xcb_connection_t *c /**< */, 7065 xcb_randr_provider_t provider /**< */, 7066 xcb_atom_t property /**< */) 7067 { 7068 static const xcb_protocol_request_t xcb_req = { 7069 /* count */ 2, 7070 /* ext */ &xcb_randr_id, 7071 /* opcode */ XCB_RANDR_DELETE_PROVIDER_PROPERTY, 7072 /* isvoid */ 1 7073 }; 7074 7075 struct iovec xcb_parts[4]; 7076 xcb_void_cookie_t xcb_ret; 7077 xcb_randr_delete_provider_property_request_t xcb_out; 7078 7079 xcb_out.provider = provider; 7080 xcb_out.property = property; 7081 7082 xcb_parts[2].iov_base = (char *) &xcb_out; 7083 xcb_parts[2].iov_len = sizeof(xcb_out); 7084 xcb_parts[3].iov_base = 0; 7085 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 7086 7087 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 7088 return xcb_ret; 7089 } 7090 7091 int 7092 xcb_randr_get_provider_property_sizeof (const void *_buffer /**< */) 7093 { 7094 char *xcb_tmp = (char *)_buffer; 7095 const xcb_randr_get_provider_property_reply_t *_aux = (xcb_randr_get_provider_property_reply_t *)_buffer; 7096 unsigned int xcb_buffer_len = 0; 7097 unsigned int xcb_block_len = 0; 7098 unsigned int xcb_pad = 0; 7099 unsigned int xcb_align_to = 0; 7100 7101 7102 xcb_block_len += sizeof(xcb_randr_get_provider_property_reply_t); 7103 xcb_tmp += xcb_block_len; 7104 xcb_buffer_len += xcb_block_len; 7105 xcb_block_len = 0; 7106 /* data */ 7107 xcb_block_len += (_aux->num_items * (_aux->format / 8)) * sizeof(char); 7108 xcb_tmp += xcb_block_len; 7109 xcb_align_to = ALIGNOF(char); 7110 /* insert padding */ 7111 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7112 xcb_buffer_len += xcb_block_len + xcb_pad; 7113 if (0 != xcb_pad) { 7114 xcb_tmp += xcb_pad; 7115 xcb_pad = 0; 7116 } 7117 xcb_block_len = 0; 7118 7119 return xcb_buffer_len; 7120 } 7121 7122 7123 /***************************************************************************** 7124 ** 7125 ** xcb_randr_get_provider_property_cookie_t xcb_randr_get_provider_property 7126 ** 7127 ** @param xcb_connection_t *c 7128 ** @param xcb_randr_provider_t provider 7129 ** @param xcb_atom_t property 7130 ** @param xcb_atom_t type 7131 ** @param uint32_t long_offset 7132 ** @param uint32_t long_length 7133 ** @param uint8_t _delete 7134 ** @param uint8_t pending 7135 ** @returns xcb_randr_get_provider_property_cookie_t 7136 ** 7137 *****************************************************************************/ 7138 7139 xcb_randr_get_provider_property_cookie_t 7140 xcb_randr_get_provider_property (xcb_connection_t *c /**< */, 7141 xcb_randr_provider_t provider /**< */, 7142 xcb_atom_t property /**< */, 7143 xcb_atom_t type /**< */, 7144 uint32_t long_offset /**< */, 7145 uint32_t long_length /**< */, 7146 uint8_t _delete /**< */, 7147 uint8_t pending /**< */) 7148 { 7149 static const xcb_protocol_request_t xcb_req = { 7150 /* count */ 2, 7151 /* ext */ &xcb_randr_id, 7152 /* opcode */ XCB_RANDR_GET_PROVIDER_PROPERTY, 7153 /* isvoid */ 0 7154 }; 7155 7156 struct iovec xcb_parts[4]; 7157 xcb_randr_get_provider_property_cookie_t xcb_ret; 7158 xcb_randr_get_provider_property_request_t xcb_out; 7159 7160 xcb_out.provider = provider; 7161 xcb_out.property = property; 7162 xcb_out.type = type; 7163 xcb_out.long_offset = long_offset; 7164 xcb_out.long_length = long_length; 7165 xcb_out._delete = _delete; 7166 xcb_out.pending = pending; 7167 memset(xcb_out.pad0, 0, 2); 7168 7169 xcb_parts[2].iov_base = (char *) &xcb_out; 7170 xcb_parts[2].iov_len = sizeof(xcb_out); 7171 xcb_parts[3].iov_base = 0; 7172 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 7173 7174 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 7175 return xcb_ret; 7176 } 7177 7178 7179 /***************************************************************************** 7180 ** 7181 ** xcb_randr_get_provider_property_cookie_t xcb_randr_get_provider_property_unchecked 7182 ** 7183 ** @param xcb_connection_t *c 7184 ** @param xcb_randr_provider_t provider 7185 ** @param xcb_atom_t property 7186 ** @param xcb_atom_t type 7187 ** @param uint32_t long_offset 7188 ** @param uint32_t long_length 7189 ** @param uint8_t _delete 7190 ** @param uint8_t pending 7191 ** @returns xcb_randr_get_provider_property_cookie_t 7192 ** 7193 *****************************************************************************/ 7194 7195 xcb_randr_get_provider_property_cookie_t 7196 xcb_randr_get_provider_property_unchecked (xcb_connection_t *c /**< */, 7197 xcb_randr_provider_t provider /**< */, 7198 xcb_atom_t property /**< */, 7199 xcb_atom_t type /**< */, 7200 uint32_t long_offset /**< */, 7201 uint32_t long_length /**< */, 7202 uint8_t _delete /**< */, 7203 uint8_t pending /**< */) 7204 { 7205 static const xcb_protocol_request_t xcb_req = { 7206 /* count */ 2, 7207 /* ext */ &xcb_randr_id, 7208 /* opcode */ XCB_RANDR_GET_PROVIDER_PROPERTY, 7209 /* isvoid */ 0 7210 }; 7211 7212 struct iovec xcb_parts[4]; 7213 xcb_randr_get_provider_property_cookie_t xcb_ret; 7214 xcb_randr_get_provider_property_request_t xcb_out; 7215 7216 xcb_out.provider = provider; 7217 xcb_out.property = property; 7218 xcb_out.type = type; 7219 xcb_out.long_offset = long_offset; 7220 xcb_out.long_length = long_length; 7221 xcb_out._delete = _delete; 7222 xcb_out.pending = pending; 7223 memset(xcb_out.pad0, 0, 2); 7224 7225 xcb_parts[2].iov_base = (char *) &xcb_out; 7226 xcb_parts[2].iov_len = sizeof(xcb_out); 7227 xcb_parts[3].iov_base = 0; 7228 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 7229 7230 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 7231 return xcb_ret; 7232 } 7233 7234 7235 /***************************************************************************** 7236 ** 7237 ** void * xcb_randr_get_provider_property_data 7238 ** 7239 ** @param const xcb_randr_get_provider_property_reply_t *R 7240 ** @returns void * 7241 ** 7242 *****************************************************************************/ 7243 7244 void * 7245 xcb_randr_get_provider_property_data (const xcb_randr_get_provider_property_reply_t *R /**< */) 7246 { 7247 return (void *) (R + 1); 7248 } 7249 7250 7251 /***************************************************************************** 7252 ** 7253 ** int xcb_randr_get_provider_property_data_length 7254 ** 7255 ** @param const xcb_randr_get_provider_property_reply_t *R 7256 ** @returns int 7257 ** 7258 *****************************************************************************/ 7259 7260 int 7261 xcb_randr_get_provider_property_data_length (const xcb_randr_get_provider_property_reply_t *R /**< */) 7262 { 7263 return (R->num_items * (R->format / 8)); 7264 } 7265 7266 7267 /***************************************************************************** 7268 ** 7269 ** xcb_generic_iterator_t xcb_randr_get_provider_property_data_end 7270 ** 7271 ** @param const xcb_randr_get_provider_property_reply_t *R 7272 ** @returns xcb_generic_iterator_t 7273 ** 7274 *****************************************************************************/ 7275 7276 xcb_generic_iterator_t 7277 xcb_randr_get_provider_property_data_end (const xcb_randr_get_provider_property_reply_t *R /**< */) 7278 { 7279 xcb_generic_iterator_t i; 7280 i.data = ((char *) (R + 1)) + ((R->num_items * (R->format / 8))); 7281 i.rem = 0; 7282 i.index = (char *) i.data - (char *) R; 7283 return i; 7284 } 7285 7286 7287 /***************************************************************************** 7288 ** 7289 ** xcb_randr_get_provider_property_reply_t * xcb_randr_get_provider_property_reply 7290 ** 7291 ** @param xcb_connection_t *c 7292 ** @param xcb_randr_get_provider_property_cookie_t cookie 7293 ** @param xcb_generic_error_t **e 7294 ** @returns xcb_randr_get_provider_property_reply_t * 7295 ** 7296 *****************************************************************************/ 7297 7298 xcb_randr_get_provider_property_reply_t * 7299 xcb_randr_get_provider_property_reply (xcb_connection_t *c /**< */, 7300 xcb_randr_get_provider_property_cookie_t cookie /**< */, 7301 xcb_generic_error_t **e /**< */) 7302 { 7303 return (xcb_randr_get_provider_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 7304 } 7305 7306 7307 /***************************************************************************** 7308 ** 7309 ** void xcb_randr_crtc_change_next 7310 ** 7311 ** @param xcb_randr_crtc_change_iterator_t *i 7312 ** @returns void 7313 ** 7314 *****************************************************************************/ 7315 7316 void 7317 xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i /**< */) 7318 { 7319 --i->rem; 7320 ++i->data; 7321 i->index += sizeof(xcb_randr_crtc_change_t); 7322 } 7323 7324 7325 /***************************************************************************** 7326 ** 7327 ** xcb_generic_iterator_t xcb_randr_crtc_change_end 7328 ** 7329 ** @param xcb_randr_crtc_change_iterator_t i 7330 ** @returns xcb_generic_iterator_t 7331 ** 7332 *****************************************************************************/ 7333 7334 xcb_generic_iterator_t 7335 xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i /**< */) 7336 { 7337 xcb_generic_iterator_t ret; 7338 ret.data = i.data + i.rem; 7339 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7340 ret.rem = 0; 7341 return ret; 7342 } 7343 7344 7345 /***************************************************************************** 7346 ** 7347 ** void xcb_randr_output_change_next 7348 ** 7349 ** @param xcb_randr_output_change_iterator_t *i 7350 ** @returns void 7351 ** 7352 *****************************************************************************/ 7353 7354 void 7355 xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i /**< */) 7356 { 7357 --i->rem; 7358 ++i->data; 7359 i->index += sizeof(xcb_randr_output_change_t); 7360 } 7361 7362 7363 /***************************************************************************** 7364 ** 7365 ** xcb_generic_iterator_t xcb_randr_output_change_end 7366 ** 7367 ** @param xcb_randr_output_change_iterator_t i 7368 ** @returns xcb_generic_iterator_t 7369 ** 7370 *****************************************************************************/ 7371 7372 xcb_generic_iterator_t 7373 xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i /**< */) 7374 { 7375 xcb_generic_iterator_t ret; 7376 ret.data = i.data + i.rem; 7377 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7378 ret.rem = 0; 7379 return ret; 7380 } 7381 7382 7383 /***************************************************************************** 7384 ** 7385 ** void xcb_randr_output_property_next 7386 ** 7387 ** @param xcb_randr_output_property_iterator_t *i 7388 ** @returns void 7389 ** 7390 *****************************************************************************/ 7391 7392 void 7393 xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i /**< */) 7394 { 7395 --i->rem; 7396 ++i->data; 7397 i->index += sizeof(xcb_randr_output_property_t); 7398 } 7399 7400 7401 /***************************************************************************** 7402 ** 7403 ** xcb_generic_iterator_t xcb_randr_output_property_end 7404 ** 7405 ** @param xcb_randr_output_property_iterator_t i 7406 ** @returns xcb_generic_iterator_t 7407 ** 7408 *****************************************************************************/ 7409 7410 xcb_generic_iterator_t 7411 xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i /**< */) 7412 { 7413 xcb_generic_iterator_t ret; 7414 ret.data = i.data + i.rem; 7415 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7416 ret.rem = 0; 7417 return ret; 7418 } 7419 7420 7421 /***************************************************************************** 7422 ** 7423 ** void xcb_randr_provider_change_next 7424 ** 7425 ** @param xcb_randr_provider_change_iterator_t *i 7426 ** @returns void 7427 ** 7428 *****************************************************************************/ 7429 7430 void 7431 xcb_randr_provider_change_next (xcb_randr_provider_change_iterator_t *i /**< */) 7432 { 7433 --i->rem; 7434 ++i->data; 7435 i->index += sizeof(xcb_randr_provider_change_t); 7436 } 7437 7438 7439 /***************************************************************************** 7440 ** 7441 ** xcb_generic_iterator_t xcb_randr_provider_change_end 7442 ** 7443 ** @param xcb_randr_provider_change_iterator_t i 7444 ** @returns xcb_generic_iterator_t 7445 ** 7446 *****************************************************************************/ 7447 7448 xcb_generic_iterator_t 7449 xcb_randr_provider_change_end (xcb_randr_provider_change_iterator_t i /**< */) 7450 { 7451 xcb_generic_iterator_t ret; 7452 ret.data = i.data + i.rem; 7453 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7454 ret.rem = 0; 7455 return ret; 7456 } 7457 7458 7459 /***************************************************************************** 7460 ** 7461 ** void xcb_randr_provider_property_next 7462 ** 7463 ** @param xcb_randr_provider_property_iterator_t *i 7464 ** @returns void 7465 ** 7466 *****************************************************************************/ 7467 7468 void 7469 xcb_randr_provider_property_next (xcb_randr_provider_property_iterator_t *i /**< */) 7470 { 7471 --i->rem; 7472 ++i->data; 7473 i->index += sizeof(xcb_randr_provider_property_t); 7474 } 7475 7476 7477 /***************************************************************************** 7478 ** 7479 ** xcb_generic_iterator_t xcb_randr_provider_property_end 7480 ** 7481 ** @param xcb_randr_provider_property_iterator_t i 7482 ** @returns xcb_generic_iterator_t 7483 ** 7484 *****************************************************************************/ 7485 7486 xcb_generic_iterator_t 7487 xcb_randr_provider_property_end (xcb_randr_provider_property_iterator_t i /**< */) 7488 { 7489 xcb_generic_iterator_t ret; 7490 ret.data = i.data + i.rem; 7491 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7492 ret.rem = 0; 7493 return ret; 7494 } 7495 7496 7497 /***************************************************************************** 7498 ** 7499 ** void xcb_randr_resource_change_next 7500 ** 7501 ** @param xcb_randr_resource_change_iterator_t *i 7502 ** @returns void 7503 ** 7504 *****************************************************************************/ 7505 7506 void 7507 xcb_randr_resource_change_next (xcb_randr_resource_change_iterator_t *i /**< */) 7508 { 7509 --i->rem; 7510 ++i->data; 7511 i->index += sizeof(xcb_randr_resource_change_t); 7512 } 7513 7514 7515 /***************************************************************************** 7516 ** 7517 ** xcb_generic_iterator_t xcb_randr_resource_change_end 7518 ** 7519 ** @param xcb_randr_resource_change_iterator_t i 7520 ** @returns xcb_generic_iterator_t 7521 ** 7522 *****************************************************************************/ 7523 7524 xcb_generic_iterator_t 7525 xcb_randr_resource_change_end (xcb_randr_resource_change_iterator_t i /**< */) 7526 { 7527 xcb_generic_iterator_t ret; 7528 ret.data = i.data + i.rem; 7529 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7530 ret.rem = 0; 7531 return ret; 7532 } 7533 7534 7535 /***************************************************************************** 7536 ** 7537 ** void xcb_randr_notify_data_next 7538 ** 7539 ** @param xcb_randr_notify_data_iterator_t *i 7540 ** @returns void 7541 ** 7542 *****************************************************************************/ 7543 7544 void 7545 xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i /**< */) 7546 { 7547 --i->rem; 7548 ++i->data; 7549 i->index += sizeof(xcb_randr_notify_data_t); 7550 } 7551 7552 7553 /***************************************************************************** 7554 ** 7555 ** xcb_generic_iterator_t xcb_randr_notify_data_end 7556 ** 7557 ** @param xcb_randr_notify_data_iterator_t i 7558 ** @returns xcb_generic_iterator_t 7559 ** 7560 *****************************************************************************/ 7561 7562 xcb_generic_iterator_t 7563 xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i /**< */) 7564 { 7565 xcb_generic_iterator_t ret; 7566 ret.data = i.data + i.rem; 7567 ret.index = i.index + ((char *) ret.data - (char *) i.data); 7568 ret.rem = 0; 7569 return ret; 7570 } 7571 7572