1 /* 2 * This file generated automatically from res.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 "res.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 19 xcb_extension_t xcb_res_id = { "X-Resource", 0 }; 20 21 22 /***************************************************************************** 23 ** 24 ** void xcb_res_client_next 25 ** 26 ** @param xcb_res_client_iterator_t *i 27 ** @returns void 28 ** 29 *****************************************************************************/ 30 31 void 32 xcb_res_client_next (xcb_res_client_iterator_t *i /**< */) 33 { 34 --i->rem; 35 ++i->data; 36 i->index += sizeof(xcb_res_client_t); 37 } 38 39 40 /***************************************************************************** 41 ** 42 ** xcb_generic_iterator_t xcb_res_client_end 43 ** 44 ** @param xcb_res_client_iterator_t i 45 ** @returns xcb_generic_iterator_t 46 ** 47 *****************************************************************************/ 48 49 xcb_generic_iterator_t 50 xcb_res_client_end (xcb_res_client_iterator_t i /**< */) 51 { 52 xcb_generic_iterator_t ret; 53 ret.data = i.data + i.rem; 54 ret.index = i.index + ((char *) ret.data - (char *) i.data); 55 ret.rem = 0; 56 return ret; 57 } 58 59 60 /***************************************************************************** 61 ** 62 ** void xcb_res_type_next 63 ** 64 ** @param xcb_res_type_iterator_t *i 65 ** @returns void 66 ** 67 *****************************************************************************/ 68 69 void 70 xcb_res_type_next (xcb_res_type_iterator_t *i /**< */) 71 { 72 --i->rem; 73 ++i->data; 74 i->index += sizeof(xcb_res_type_t); 75 } 76 77 78 /***************************************************************************** 79 ** 80 ** xcb_generic_iterator_t xcb_res_type_end 81 ** 82 ** @param xcb_res_type_iterator_t i 83 ** @returns xcb_generic_iterator_t 84 ** 85 *****************************************************************************/ 86 87 xcb_generic_iterator_t 88 xcb_res_type_end (xcb_res_type_iterator_t i /**< */) 89 { 90 xcb_generic_iterator_t ret; 91 ret.data = i.data + i.rem; 92 ret.index = i.index + ((char *) ret.data - (char *) i.data); 93 ret.rem = 0; 94 return ret; 95 } 96 97 98 /***************************************************************************** 99 ** 100 ** void xcb_res_client_id_spec_next 101 ** 102 ** @param xcb_res_client_id_spec_iterator_t *i 103 ** @returns void 104 ** 105 *****************************************************************************/ 106 107 void 108 xcb_res_client_id_spec_next (xcb_res_client_id_spec_iterator_t *i /**< */) 109 { 110 --i->rem; 111 ++i->data; 112 i->index += sizeof(xcb_res_client_id_spec_t); 113 } 114 115 116 /***************************************************************************** 117 ** 118 ** xcb_generic_iterator_t xcb_res_client_id_spec_end 119 ** 120 ** @param xcb_res_client_id_spec_iterator_t i 121 ** @returns xcb_generic_iterator_t 122 ** 123 *****************************************************************************/ 124 125 xcb_generic_iterator_t 126 xcb_res_client_id_spec_end (xcb_res_client_id_spec_iterator_t i /**< */) 127 { 128 xcb_generic_iterator_t ret; 129 ret.data = i.data + i.rem; 130 ret.index = i.index + ((char *) ret.data - (char *) i.data); 131 ret.rem = 0; 132 return ret; 133 } 134 135 int 136 xcb_res_client_id_value_sizeof (const void *_buffer /**< */) 137 { 138 char *xcb_tmp = (char *)_buffer; 139 const xcb_res_client_id_value_t *_aux = (xcb_res_client_id_value_t *)_buffer; 140 unsigned int xcb_buffer_len = 0; 141 unsigned int xcb_block_len = 0; 142 unsigned int xcb_pad = 0; 143 unsigned int xcb_align_to = 0; 144 145 146 xcb_block_len += sizeof(xcb_res_client_id_value_t); 147 xcb_tmp += xcb_block_len; 148 xcb_buffer_len += xcb_block_len; 149 xcb_block_len = 0; 150 /* value */ 151 xcb_block_len += _aux->length * sizeof(uint32_t); 152 xcb_tmp += xcb_block_len; 153 xcb_align_to = ALIGNOF(uint32_t); 154 /* insert padding */ 155 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 156 xcb_buffer_len += xcb_block_len + xcb_pad; 157 if (0 != xcb_pad) { 158 xcb_tmp += xcb_pad; 159 xcb_pad = 0; 160 } 161 xcb_block_len = 0; 162 163 return xcb_buffer_len; 164 } 165 166 167 /***************************************************************************** 168 ** 169 ** uint32_t * xcb_res_client_id_value_value 170 ** 171 ** @param const xcb_res_client_id_value_t *R 172 ** @returns uint32_t * 173 ** 174 *****************************************************************************/ 175 176 uint32_t * 177 xcb_res_client_id_value_value (const xcb_res_client_id_value_t *R /**< */) 178 { 179 return (uint32_t *) (R + 1); 180 } 181 182 183 /***************************************************************************** 184 ** 185 ** int xcb_res_client_id_value_value_length 186 ** 187 ** @param const xcb_res_client_id_value_t *R 188 ** @returns int 189 ** 190 *****************************************************************************/ 191 192 int 193 xcb_res_client_id_value_value_length (const xcb_res_client_id_value_t *R /**< */) 194 { 195 return R->length; 196 } 197 198 199 /***************************************************************************** 200 ** 201 ** xcb_generic_iterator_t xcb_res_client_id_value_value_end 202 ** 203 ** @param const xcb_res_client_id_value_t *R 204 ** @returns xcb_generic_iterator_t 205 ** 206 *****************************************************************************/ 207 208 xcb_generic_iterator_t 209 xcb_res_client_id_value_value_end (const xcb_res_client_id_value_t *R /**< */) 210 { 211 xcb_generic_iterator_t i; 212 i.data = ((uint32_t *) (R + 1)) + (R->length); 213 i.rem = 0; 214 i.index = (char *) i.data - (char *) R; 215 return i; 216 } 217 218 219 /***************************************************************************** 220 ** 221 ** void xcb_res_client_id_value_next 222 ** 223 ** @param xcb_res_client_id_value_iterator_t *i 224 ** @returns void 225 ** 226 *****************************************************************************/ 227 228 void 229 xcb_res_client_id_value_next (xcb_res_client_id_value_iterator_t *i /**< */) 230 { 231 xcb_res_client_id_value_t *R = i->data; 232 xcb_generic_iterator_t child; 233 child.data = (xcb_res_client_id_value_t *)(((char *)R) + xcb_res_client_id_value_sizeof(R)); 234 i->index = (char *) child.data - (char *) i->data; 235 --i->rem; 236 i->data = (xcb_res_client_id_value_t *) child.data; 237 } 238 239 240 /***************************************************************************** 241 ** 242 ** xcb_generic_iterator_t xcb_res_client_id_value_end 243 ** 244 ** @param xcb_res_client_id_value_iterator_t i 245 ** @returns xcb_generic_iterator_t 246 ** 247 *****************************************************************************/ 248 249 xcb_generic_iterator_t 250 xcb_res_client_id_value_end (xcb_res_client_id_value_iterator_t i /**< */) 251 { 252 xcb_generic_iterator_t ret; 253 while(i.rem > 0) 254 xcb_res_client_id_value_next(&i); 255 ret.data = i.data; 256 ret.rem = i.rem; 257 ret.index = i.index; 258 return ret; 259 } 260 261 262 /***************************************************************************** 263 ** 264 ** void xcb_res_resource_id_spec_next 265 ** 266 ** @param xcb_res_resource_id_spec_iterator_t *i 267 ** @returns void 268 ** 269 *****************************************************************************/ 270 271 void 272 xcb_res_resource_id_spec_next (xcb_res_resource_id_spec_iterator_t *i /**< */) 273 { 274 --i->rem; 275 ++i->data; 276 i->index += sizeof(xcb_res_resource_id_spec_t); 277 } 278 279 280 /***************************************************************************** 281 ** 282 ** xcb_generic_iterator_t xcb_res_resource_id_spec_end 283 ** 284 ** @param xcb_res_resource_id_spec_iterator_t i 285 ** @returns xcb_generic_iterator_t 286 ** 287 *****************************************************************************/ 288 289 xcb_generic_iterator_t 290 xcb_res_resource_id_spec_end (xcb_res_resource_id_spec_iterator_t i /**< */) 291 { 292 xcb_generic_iterator_t ret; 293 ret.data = i.data + i.rem; 294 ret.index = i.index + ((char *) ret.data - (char *) i.data); 295 ret.rem = 0; 296 return ret; 297 } 298 299 300 /***************************************************************************** 301 ** 302 ** void xcb_res_resource_size_spec_next 303 ** 304 ** @param xcb_res_resource_size_spec_iterator_t *i 305 ** @returns void 306 ** 307 *****************************************************************************/ 308 309 void 310 xcb_res_resource_size_spec_next (xcb_res_resource_size_spec_iterator_t *i /**< */) 311 { 312 --i->rem; 313 ++i->data; 314 i->index += sizeof(xcb_res_resource_size_spec_t); 315 } 316 317 318 /***************************************************************************** 319 ** 320 ** xcb_generic_iterator_t xcb_res_resource_size_spec_end 321 ** 322 ** @param xcb_res_resource_size_spec_iterator_t i 323 ** @returns xcb_generic_iterator_t 324 ** 325 *****************************************************************************/ 326 327 xcb_generic_iterator_t 328 xcb_res_resource_size_spec_end (xcb_res_resource_size_spec_iterator_t i /**< */) 329 { 330 xcb_generic_iterator_t ret; 331 ret.data = i.data + i.rem; 332 ret.index = i.index + ((char *) ret.data - (char *) i.data); 333 ret.rem = 0; 334 return ret; 335 } 336 337 int 338 xcb_res_resource_size_value_sizeof (const void *_buffer /**< */) 339 { 340 char *xcb_tmp = (char *)_buffer; 341 const xcb_res_resource_size_value_t *_aux = (xcb_res_resource_size_value_t *)_buffer; 342 unsigned int xcb_buffer_len = 0; 343 unsigned int xcb_block_len = 0; 344 unsigned int xcb_pad = 0; 345 unsigned int xcb_align_to = 0; 346 347 348 xcb_block_len += sizeof(xcb_res_resource_size_value_t); 349 xcb_tmp += xcb_block_len; 350 xcb_buffer_len += xcb_block_len; 351 xcb_block_len = 0; 352 /* cross_references */ 353 xcb_block_len += _aux->num_cross_references * sizeof(xcb_res_resource_size_spec_t); 354 xcb_tmp += xcb_block_len; 355 xcb_align_to = ALIGNOF(xcb_res_resource_size_spec_t); 356 /* insert padding */ 357 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 358 xcb_buffer_len += xcb_block_len + xcb_pad; 359 if (0 != xcb_pad) { 360 xcb_tmp += xcb_pad; 361 xcb_pad = 0; 362 } 363 xcb_block_len = 0; 364 365 return xcb_buffer_len; 366 } 367 368 369 /***************************************************************************** 370 ** 371 ** xcb_res_resource_size_spec_t * xcb_res_resource_size_value_cross_references 372 ** 373 ** @param const xcb_res_resource_size_value_t *R 374 ** @returns xcb_res_resource_size_spec_t * 375 ** 376 *****************************************************************************/ 377 378 xcb_res_resource_size_spec_t * 379 xcb_res_resource_size_value_cross_references (const xcb_res_resource_size_value_t *R /**< */) 380 { 381 return (xcb_res_resource_size_spec_t *) (R + 1); 382 } 383 384 385 /***************************************************************************** 386 ** 387 ** int xcb_res_resource_size_value_cross_references_length 388 ** 389 ** @param const xcb_res_resource_size_value_t *R 390 ** @returns int 391 ** 392 *****************************************************************************/ 393 394 int 395 xcb_res_resource_size_value_cross_references_length (const xcb_res_resource_size_value_t *R /**< */) 396 { 397 return R->num_cross_references; 398 } 399 400 401 /***************************************************************************** 402 ** 403 ** xcb_res_resource_size_spec_iterator_t xcb_res_resource_size_value_cross_references_iterator 404 ** 405 ** @param const xcb_res_resource_size_value_t *R 406 ** @returns xcb_res_resource_size_spec_iterator_t 407 ** 408 *****************************************************************************/ 409 410 xcb_res_resource_size_spec_iterator_t 411 xcb_res_resource_size_value_cross_references_iterator (const xcb_res_resource_size_value_t *R /**< */) 412 { 413 xcb_res_resource_size_spec_iterator_t i; 414 i.data = (xcb_res_resource_size_spec_t *) (R + 1); 415 i.rem = R->num_cross_references; 416 i.index = (char *) i.data - (char *) R; 417 return i; 418 } 419 420 421 /***************************************************************************** 422 ** 423 ** void xcb_res_resource_size_value_next 424 ** 425 ** @param xcb_res_resource_size_value_iterator_t *i 426 ** @returns void 427 ** 428 *****************************************************************************/ 429 430 void 431 xcb_res_resource_size_value_next (xcb_res_resource_size_value_iterator_t *i /**< */) 432 { 433 xcb_res_resource_size_value_t *R = i->data; 434 xcb_generic_iterator_t child; 435 child.data = (xcb_res_resource_size_value_t *)(((char *)R) + xcb_res_resource_size_value_sizeof(R)); 436 i->index = (char *) child.data - (char *) i->data; 437 --i->rem; 438 i->data = (xcb_res_resource_size_value_t *) child.data; 439 } 440 441 442 /***************************************************************************** 443 ** 444 ** xcb_generic_iterator_t xcb_res_resource_size_value_end 445 ** 446 ** @param xcb_res_resource_size_value_iterator_t i 447 ** @returns xcb_generic_iterator_t 448 ** 449 *****************************************************************************/ 450 451 xcb_generic_iterator_t 452 xcb_res_resource_size_value_end (xcb_res_resource_size_value_iterator_t i /**< */) 453 { 454 xcb_generic_iterator_t ret; 455 while(i.rem > 0) 456 xcb_res_resource_size_value_next(&i); 457 ret.data = i.data; 458 ret.rem = i.rem; 459 ret.index = i.index; 460 return ret; 461 } 462 463 464 /***************************************************************************** 465 ** 466 ** xcb_res_query_version_cookie_t xcb_res_query_version 467 ** 468 ** @param xcb_connection_t *c 469 ** @param uint8_t client_major 470 ** @param uint8_t client_minor 471 ** @returns xcb_res_query_version_cookie_t 472 ** 473 *****************************************************************************/ 474 475 xcb_res_query_version_cookie_t 476 xcb_res_query_version (xcb_connection_t *c /**< */, 477 uint8_t client_major /**< */, 478 uint8_t client_minor /**< */) 479 { 480 static const xcb_protocol_request_t xcb_req = { 481 /* count */ 2, 482 /* ext */ &xcb_res_id, 483 /* opcode */ XCB_RES_QUERY_VERSION, 484 /* isvoid */ 0 485 }; 486 487 struct iovec xcb_parts[4]; 488 xcb_res_query_version_cookie_t xcb_ret; 489 xcb_res_query_version_request_t xcb_out; 490 491 xcb_out.client_major = client_major; 492 xcb_out.client_minor = client_minor; 493 494 xcb_parts[2].iov_base = (char *) &xcb_out; 495 xcb_parts[2].iov_len = sizeof(xcb_out); 496 xcb_parts[3].iov_base = 0; 497 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 498 499 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 500 return xcb_ret; 501 } 502 503 504 /***************************************************************************** 505 ** 506 ** xcb_res_query_version_cookie_t xcb_res_query_version_unchecked 507 ** 508 ** @param xcb_connection_t *c 509 ** @param uint8_t client_major 510 ** @param uint8_t client_minor 511 ** @returns xcb_res_query_version_cookie_t 512 ** 513 *****************************************************************************/ 514 515 xcb_res_query_version_cookie_t 516 xcb_res_query_version_unchecked (xcb_connection_t *c /**< */, 517 uint8_t client_major /**< */, 518 uint8_t client_minor /**< */) 519 { 520 static const xcb_protocol_request_t xcb_req = { 521 /* count */ 2, 522 /* ext */ &xcb_res_id, 523 /* opcode */ XCB_RES_QUERY_VERSION, 524 /* isvoid */ 0 525 }; 526 527 struct iovec xcb_parts[4]; 528 xcb_res_query_version_cookie_t xcb_ret; 529 xcb_res_query_version_request_t xcb_out; 530 531 xcb_out.client_major = client_major; 532 xcb_out.client_minor = client_minor; 533 534 xcb_parts[2].iov_base = (char *) &xcb_out; 535 xcb_parts[2].iov_len = sizeof(xcb_out); 536 xcb_parts[3].iov_base = 0; 537 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 538 539 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 540 return xcb_ret; 541 } 542 543 544 /***************************************************************************** 545 ** 546 ** xcb_res_query_version_reply_t * xcb_res_query_version_reply 547 ** 548 ** @param xcb_connection_t *c 549 ** @param xcb_res_query_version_cookie_t cookie 550 ** @param xcb_generic_error_t **e 551 ** @returns xcb_res_query_version_reply_t * 552 ** 553 *****************************************************************************/ 554 555 xcb_res_query_version_reply_t * 556 xcb_res_query_version_reply (xcb_connection_t *c /**< */, 557 xcb_res_query_version_cookie_t cookie /**< */, 558 xcb_generic_error_t **e /**< */) 559 { 560 return (xcb_res_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 561 } 562 563 int 564 xcb_res_query_clients_sizeof (const void *_buffer /**< */) 565 { 566 char *xcb_tmp = (char *)_buffer; 567 const xcb_res_query_clients_reply_t *_aux = (xcb_res_query_clients_reply_t *)_buffer; 568 unsigned int xcb_buffer_len = 0; 569 unsigned int xcb_block_len = 0; 570 unsigned int xcb_pad = 0; 571 unsigned int xcb_align_to = 0; 572 573 574 xcb_block_len += sizeof(xcb_res_query_clients_reply_t); 575 xcb_tmp += xcb_block_len; 576 xcb_buffer_len += xcb_block_len; 577 xcb_block_len = 0; 578 /* clients */ 579 xcb_block_len += _aux->num_clients * sizeof(xcb_res_client_t); 580 xcb_tmp += xcb_block_len; 581 xcb_align_to = ALIGNOF(xcb_res_client_t); 582 /* insert padding */ 583 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 584 xcb_buffer_len += xcb_block_len + xcb_pad; 585 if (0 != xcb_pad) { 586 xcb_tmp += xcb_pad; 587 xcb_pad = 0; 588 } 589 xcb_block_len = 0; 590 591 return xcb_buffer_len; 592 } 593 594 595 /***************************************************************************** 596 ** 597 ** xcb_res_query_clients_cookie_t xcb_res_query_clients 598 ** 599 ** @param xcb_connection_t *c 600 ** @returns xcb_res_query_clients_cookie_t 601 ** 602 *****************************************************************************/ 603 604 xcb_res_query_clients_cookie_t 605 xcb_res_query_clients (xcb_connection_t *c /**< */) 606 { 607 static const xcb_protocol_request_t xcb_req = { 608 /* count */ 2, 609 /* ext */ &xcb_res_id, 610 /* opcode */ XCB_RES_QUERY_CLIENTS, 611 /* isvoid */ 0 612 }; 613 614 struct iovec xcb_parts[4]; 615 xcb_res_query_clients_cookie_t xcb_ret; 616 xcb_res_query_clients_request_t xcb_out; 617 618 619 xcb_parts[2].iov_base = (char *) &xcb_out; 620 xcb_parts[2].iov_len = sizeof(xcb_out); 621 xcb_parts[3].iov_base = 0; 622 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 623 624 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 625 return xcb_ret; 626 } 627 628 629 /***************************************************************************** 630 ** 631 ** xcb_res_query_clients_cookie_t xcb_res_query_clients_unchecked 632 ** 633 ** @param xcb_connection_t *c 634 ** @returns xcb_res_query_clients_cookie_t 635 ** 636 *****************************************************************************/ 637 638 xcb_res_query_clients_cookie_t 639 xcb_res_query_clients_unchecked (xcb_connection_t *c /**< */) 640 { 641 static const xcb_protocol_request_t xcb_req = { 642 /* count */ 2, 643 /* ext */ &xcb_res_id, 644 /* opcode */ XCB_RES_QUERY_CLIENTS, 645 /* isvoid */ 0 646 }; 647 648 struct iovec xcb_parts[4]; 649 xcb_res_query_clients_cookie_t xcb_ret; 650 xcb_res_query_clients_request_t xcb_out; 651 652 653 xcb_parts[2].iov_base = (char *) &xcb_out; 654 xcb_parts[2].iov_len = sizeof(xcb_out); 655 xcb_parts[3].iov_base = 0; 656 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 657 658 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 659 return xcb_ret; 660 } 661 662 663 /***************************************************************************** 664 ** 665 ** xcb_res_client_t * xcb_res_query_clients_clients 666 ** 667 ** @param const xcb_res_query_clients_reply_t *R 668 ** @returns xcb_res_client_t * 669 ** 670 *****************************************************************************/ 671 672 xcb_res_client_t * 673 xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R /**< */) 674 { 675 return (xcb_res_client_t *) (R + 1); 676 } 677 678 679 /***************************************************************************** 680 ** 681 ** int xcb_res_query_clients_clients_length 682 ** 683 ** @param const xcb_res_query_clients_reply_t *R 684 ** @returns int 685 ** 686 *****************************************************************************/ 687 688 int 689 xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R /**< */) 690 { 691 return R->num_clients; 692 } 693 694 695 /***************************************************************************** 696 ** 697 ** xcb_res_client_iterator_t xcb_res_query_clients_clients_iterator 698 ** 699 ** @param const xcb_res_query_clients_reply_t *R 700 ** @returns xcb_res_client_iterator_t 701 ** 702 *****************************************************************************/ 703 704 xcb_res_client_iterator_t 705 xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R /**< */) 706 { 707 xcb_res_client_iterator_t i; 708 i.data = (xcb_res_client_t *) (R + 1); 709 i.rem = R->num_clients; 710 i.index = (char *) i.data - (char *) R; 711 return i; 712 } 713 714 715 /***************************************************************************** 716 ** 717 ** xcb_res_query_clients_reply_t * xcb_res_query_clients_reply 718 ** 719 ** @param xcb_connection_t *c 720 ** @param xcb_res_query_clients_cookie_t cookie 721 ** @param xcb_generic_error_t **e 722 ** @returns xcb_res_query_clients_reply_t * 723 ** 724 *****************************************************************************/ 725 726 xcb_res_query_clients_reply_t * 727 xcb_res_query_clients_reply (xcb_connection_t *c /**< */, 728 xcb_res_query_clients_cookie_t cookie /**< */, 729 xcb_generic_error_t **e /**< */) 730 { 731 return (xcb_res_query_clients_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 732 } 733 734 int 735 xcb_res_query_client_resources_sizeof (const void *_buffer /**< */) 736 { 737 char *xcb_tmp = (char *)_buffer; 738 const xcb_res_query_client_resources_reply_t *_aux = (xcb_res_query_client_resources_reply_t *)_buffer; 739 unsigned int xcb_buffer_len = 0; 740 unsigned int xcb_block_len = 0; 741 unsigned int xcb_pad = 0; 742 unsigned int xcb_align_to = 0; 743 744 745 xcb_block_len += sizeof(xcb_res_query_client_resources_reply_t); 746 xcb_tmp += xcb_block_len; 747 xcb_buffer_len += xcb_block_len; 748 xcb_block_len = 0; 749 /* types */ 750 xcb_block_len += _aux->num_types * sizeof(xcb_res_type_t); 751 xcb_tmp += xcb_block_len; 752 xcb_align_to = ALIGNOF(xcb_res_type_t); 753 /* insert padding */ 754 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 755 xcb_buffer_len += xcb_block_len + xcb_pad; 756 if (0 != xcb_pad) { 757 xcb_tmp += xcb_pad; 758 xcb_pad = 0; 759 } 760 xcb_block_len = 0; 761 762 return xcb_buffer_len; 763 } 764 765 766 /***************************************************************************** 767 ** 768 ** xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources 769 ** 770 ** @param xcb_connection_t *c 771 ** @param uint32_t xid 772 ** @returns xcb_res_query_client_resources_cookie_t 773 ** 774 *****************************************************************************/ 775 776 xcb_res_query_client_resources_cookie_t 777 xcb_res_query_client_resources (xcb_connection_t *c /**< */, 778 uint32_t xid /**< */) 779 { 780 static const xcb_protocol_request_t xcb_req = { 781 /* count */ 2, 782 /* ext */ &xcb_res_id, 783 /* opcode */ XCB_RES_QUERY_CLIENT_RESOURCES, 784 /* isvoid */ 0 785 }; 786 787 struct iovec xcb_parts[4]; 788 xcb_res_query_client_resources_cookie_t xcb_ret; 789 xcb_res_query_client_resources_request_t xcb_out; 790 791 xcb_out.xid = xid; 792 793 xcb_parts[2].iov_base = (char *) &xcb_out; 794 xcb_parts[2].iov_len = sizeof(xcb_out); 795 xcb_parts[3].iov_base = 0; 796 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 797 798 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 799 return xcb_ret; 800 } 801 802 803 /***************************************************************************** 804 ** 805 ** xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources_unchecked 806 ** 807 ** @param xcb_connection_t *c 808 ** @param uint32_t xid 809 ** @returns xcb_res_query_client_resources_cookie_t 810 ** 811 *****************************************************************************/ 812 813 xcb_res_query_client_resources_cookie_t 814 xcb_res_query_client_resources_unchecked (xcb_connection_t *c /**< */, 815 uint32_t xid /**< */) 816 { 817 static const xcb_protocol_request_t xcb_req = { 818 /* count */ 2, 819 /* ext */ &xcb_res_id, 820 /* opcode */ XCB_RES_QUERY_CLIENT_RESOURCES, 821 /* isvoid */ 0 822 }; 823 824 struct iovec xcb_parts[4]; 825 xcb_res_query_client_resources_cookie_t xcb_ret; 826 xcb_res_query_client_resources_request_t xcb_out; 827 828 xcb_out.xid = xid; 829 830 xcb_parts[2].iov_base = (char *) &xcb_out; 831 xcb_parts[2].iov_len = sizeof(xcb_out); 832 xcb_parts[3].iov_base = 0; 833 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 834 835 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 836 return xcb_ret; 837 } 838 839 840 /***************************************************************************** 841 ** 842 ** xcb_res_type_t * xcb_res_query_client_resources_types 843 ** 844 ** @param const xcb_res_query_client_resources_reply_t *R 845 ** @returns xcb_res_type_t * 846 ** 847 *****************************************************************************/ 848 849 xcb_res_type_t * 850 xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R /**< */) 851 { 852 return (xcb_res_type_t *) (R + 1); 853 } 854 855 856 /***************************************************************************** 857 ** 858 ** int xcb_res_query_client_resources_types_length 859 ** 860 ** @param const xcb_res_query_client_resources_reply_t *R 861 ** @returns int 862 ** 863 *****************************************************************************/ 864 865 int 866 xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R /**< */) 867 { 868 return R->num_types; 869 } 870 871 872 /***************************************************************************** 873 ** 874 ** xcb_res_type_iterator_t xcb_res_query_client_resources_types_iterator 875 ** 876 ** @param const xcb_res_query_client_resources_reply_t *R 877 ** @returns xcb_res_type_iterator_t 878 ** 879 *****************************************************************************/ 880 881 xcb_res_type_iterator_t 882 xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R /**< */) 883 { 884 xcb_res_type_iterator_t i; 885 i.data = (xcb_res_type_t *) (R + 1); 886 i.rem = R->num_types; 887 i.index = (char *) i.data - (char *) R; 888 return i; 889 } 890 891 892 /***************************************************************************** 893 ** 894 ** xcb_res_query_client_resources_reply_t * xcb_res_query_client_resources_reply 895 ** 896 ** @param xcb_connection_t *c 897 ** @param xcb_res_query_client_resources_cookie_t cookie 898 ** @param xcb_generic_error_t **e 899 ** @returns xcb_res_query_client_resources_reply_t * 900 ** 901 *****************************************************************************/ 902 903 xcb_res_query_client_resources_reply_t * 904 xcb_res_query_client_resources_reply (xcb_connection_t *c /**< */, 905 xcb_res_query_client_resources_cookie_t cookie /**< */, 906 xcb_generic_error_t **e /**< */) 907 { 908 return (xcb_res_query_client_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 909 } 910 911 912 /***************************************************************************** 913 ** 914 ** xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes 915 ** 916 ** @param xcb_connection_t *c 917 ** @param uint32_t xid 918 ** @returns xcb_res_query_client_pixmap_bytes_cookie_t 919 ** 920 *****************************************************************************/ 921 922 xcb_res_query_client_pixmap_bytes_cookie_t 923 xcb_res_query_client_pixmap_bytes (xcb_connection_t *c /**< */, 924 uint32_t xid /**< */) 925 { 926 static const xcb_protocol_request_t xcb_req = { 927 /* count */ 2, 928 /* ext */ &xcb_res_id, 929 /* opcode */ XCB_RES_QUERY_CLIENT_PIXMAP_BYTES, 930 /* isvoid */ 0 931 }; 932 933 struct iovec xcb_parts[4]; 934 xcb_res_query_client_pixmap_bytes_cookie_t xcb_ret; 935 xcb_res_query_client_pixmap_bytes_request_t xcb_out; 936 937 xcb_out.xid = xid; 938 939 xcb_parts[2].iov_base = (char *) &xcb_out; 940 xcb_parts[2].iov_len = sizeof(xcb_out); 941 xcb_parts[3].iov_base = 0; 942 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 943 944 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 945 return xcb_ret; 946 } 947 948 949 /***************************************************************************** 950 ** 951 ** xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes_unchecked 952 ** 953 ** @param xcb_connection_t *c 954 ** @param uint32_t xid 955 ** @returns xcb_res_query_client_pixmap_bytes_cookie_t 956 ** 957 *****************************************************************************/ 958 959 xcb_res_query_client_pixmap_bytes_cookie_t 960 xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c /**< */, 961 uint32_t xid /**< */) 962 { 963 static const xcb_protocol_request_t xcb_req = { 964 /* count */ 2, 965 /* ext */ &xcb_res_id, 966 /* opcode */ XCB_RES_QUERY_CLIENT_PIXMAP_BYTES, 967 /* isvoid */ 0 968 }; 969 970 struct iovec xcb_parts[4]; 971 xcb_res_query_client_pixmap_bytes_cookie_t xcb_ret; 972 xcb_res_query_client_pixmap_bytes_request_t xcb_out; 973 974 xcb_out.xid = xid; 975 976 xcb_parts[2].iov_base = (char *) &xcb_out; 977 xcb_parts[2].iov_len = sizeof(xcb_out); 978 xcb_parts[3].iov_base = 0; 979 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 980 981 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 982 return xcb_ret; 983 } 984 985 986 /***************************************************************************** 987 ** 988 ** xcb_res_query_client_pixmap_bytes_reply_t * xcb_res_query_client_pixmap_bytes_reply 989 ** 990 ** @param xcb_connection_t *c 991 ** @param xcb_res_query_client_pixmap_bytes_cookie_t cookie 992 ** @param xcb_generic_error_t **e 993 ** @returns xcb_res_query_client_pixmap_bytes_reply_t * 994 ** 995 *****************************************************************************/ 996 997 xcb_res_query_client_pixmap_bytes_reply_t * 998 xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t *c /**< */, 999 xcb_res_query_client_pixmap_bytes_cookie_t cookie /**< */, 1000 xcb_generic_error_t **e /**< */) 1001 { 1002 return (xcb_res_query_client_pixmap_bytes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1003 } 1004 1005 int 1006 xcb_res_query_client_ids_sizeof (const void *_buffer /**< */) 1007 { 1008 char *xcb_tmp = (char *)_buffer; 1009 const xcb_res_query_client_ids_request_t *_aux = (xcb_res_query_client_ids_request_t *)_buffer; 1010 unsigned int xcb_buffer_len = 0; 1011 unsigned int xcb_block_len = 0; 1012 unsigned int xcb_pad = 0; 1013 unsigned int xcb_align_to = 0; 1014 1015 1016 xcb_block_len += sizeof(xcb_res_query_client_ids_request_t); 1017 xcb_tmp += xcb_block_len; 1018 xcb_buffer_len += xcb_block_len; 1019 xcb_block_len = 0; 1020 /* specs */ 1021 xcb_block_len += _aux->num_specs * sizeof(xcb_res_client_id_spec_t); 1022 xcb_tmp += xcb_block_len; 1023 xcb_align_to = ALIGNOF(xcb_res_client_id_spec_t); 1024 /* insert padding */ 1025 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1026 xcb_buffer_len += xcb_block_len + xcb_pad; 1027 if (0 != xcb_pad) { 1028 xcb_tmp += xcb_pad; 1029 xcb_pad = 0; 1030 } 1031 xcb_block_len = 0; 1032 1033 return xcb_buffer_len; 1034 } 1035 1036 1037 /***************************************************************************** 1038 ** 1039 ** xcb_res_query_client_ids_cookie_t xcb_res_query_client_ids 1040 ** 1041 ** @param xcb_connection_t *c 1042 ** @param uint32_t num_specs 1043 ** @param const xcb_res_client_id_spec_t *specs 1044 ** @returns xcb_res_query_client_ids_cookie_t 1045 ** 1046 *****************************************************************************/ 1047 1048 xcb_res_query_client_ids_cookie_t 1049 xcb_res_query_client_ids (xcb_connection_t *c /**< */, 1050 uint32_t num_specs /**< */, 1051 const xcb_res_client_id_spec_t *specs /**< */) 1052 { 1053 static const xcb_protocol_request_t xcb_req = { 1054 /* count */ 4, 1055 /* ext */ &xcb_res_id, 1056 /* opcode */ XCB_RES_QUERY_CLIENT_IDS, 1057 /* isvoid */ 0 1058 }; 1059 1060 struct iovec xcb_parts[6]; 1061 xcb_res_query_client_ids_cookie_t xcb_ret; 1062 xcb_res_query_client_ids_request_t xcb_out; 1063 1064 xcb_out.num_specs = num_specs; 1065 1066 xcb_parts[2].iov_base = (char *) &xcb_out; 1067 xcb_parts[2].iov_len = sizeof(xcb_out); 1068 xcb_parts[3].iov_base = 0; 1069 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1070 /* xcb_res_client_id_spec_t specs */ 1071 xcb_parts[4].iov_base = (char *) specs; 1072 xcb_parts[4].iov_len = num_specs * sizeof(xcb_res_client_id_spec_t); 1073 xcb_parts[5].iov_base = 0; 1074 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1075 1076 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1077 return xcb_ret; 1078 } 1079 1080 1081 /***************************************************************************** 1082 ** 1083 ** xcb_res_query_client_ids_cookie_t xcb_res_query_client_ids_unchecked 1084 ** 1085 ** @param xcb_connection_t *c 1086 ** @param uint32_t num_specs 1087 ** @param const xcb_res_client_id_spec_t *specs 1088 ** @returns xcb_res_query_client_ids_cookie_t 1089 ** 1090 *****************************************************************************/ 1091 1092 xcb_res_query_client_ids_cookie_t 1093 xcb_res_query_client_ids_unchecked (xcb_connection_t *c /**< */, 1094 uint32_t num_specs /**< */, 1095 const xcb_res_client_id_spec_t *specs /**< */) 1096 { 1097 static const xcb_protocol_request_t xcb_req = { 1098 /* count */ 4, 1099 /* ext */ &xcb_res_id, 1100 /* opcode */ XCB_RES_QUERY_CLIENT_IDS, 1101 /* isvoid */ 0 1102 }; 1103 1104 struct iovec xcb_parts[6]; 1105 xcb_res_query_client_ids_cookie_t xcb_ret; 1106 xcb_res_query_client_ids_request_t xcb_out; 1107 1108 xcb_out.num_specs = num_specs; 1109 1110 xcb_parts[2].iov_base = (char *) &xcb_out; 1111 xcb_parts[2].iov_len = sizeof(xcb_out); 1112 xcb_parts[3].iov_base = 0; 1113 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1114 /* xcb_res_client_id_spec_t specs */ 1115 xcb_parts[4].iov_base = (char *) specs; 1116 xcb_parts[4].iov_len = num_specs * sizeof(xcb_res_client_id_spec_t); 1117 xcb_parts[5].iov_base = 0; 1118 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1119 1120 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1121 return xcb_ret; 1122 } 1123 1124 1125 /***************************************************************************** 1126 ** 1127 ** int xcb_res_query_client_ids_ids_length 1128 ** 1129 ** @param const xcb_res_query_client_ids_reply_t *R 1130 ** @returns int 1131 ** 1132 *****************************************************************************/ 1133 1134 int 1135 xcb_res_query_client_ids_ids_length (const xcb_res_query_client_ids_reply_t *R /**< */) 1136 { 1137 return R->num_ids; 1138 } 1139 1140 1141 /***************************************************************************** 1142 ** 1143 ** xcb_res_client_id_value_iterator_t xcb_res_query_client_ids_ids_iterator 1144 ** 1145 ** @param const xcb_res_query_client_ids_reply_t *R 1146 ** @returns xcb_res_client_id_value_iterator_t 1147 ** 1148 *****************************************************************************/ 1149 1150 xcb_res_client_id_value_iterator_t 1151 xcb_res_query_client_ids_ids_iterator (const xcb_res_query_client_ids_reply_t *R /**< */) 1152 { 1153 xcb_res_client_id_value_iterator_t i; 1154 i.data = (xcb_res_client_id_value_t *) (R + 1); 1155 i.rem = R->num_ids; 1156 i.index = (char *) i.data - (char *) R; 1157 return i; 1158 } 1159 1160 1161 /***************************************************************************** 1162 ** 1163 ** xcb_res_query_client_ids_reply_t * xcb_res_query_client_ids_reply 1164 ** 1165 ** @param xcb_connection_t *c 1166 ** @param xcb_res_query_client_ids_cookie_t cookie 1167 ** @param xcb_generic_error_t **e 1168 ** @returns xcb_res_query_client_ids_reply_t * 1169 ** 1170 *****************************************************************************/ 1171 1172 xcb_res_query_client_ids_reply_t * 1173 xcb_res_query_client_ids_reply (xcb_connection_t *c /**< */, 1174 xcb_res_query_client_ids_cookie_t cookie /**< */, 1175 xcb_generic_error_t **e /**< */) 1176 { 1177 return (xcb_res_query_client_ids_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1178 } 1179 1180 int 1181 xcb_res_query_resource_bytes_sizeof (const void *_buffer /**< */) 1182 { 1183 char *xcb_tmp = (char *)_buffer; 1184 const xcb_res_query_resource_bytes_request_t *_aux = (xcb_res_query_resource_bytes_request_t *)_buffer; 1185 unsigned int xcb_buffer_len = 0; 1186 unsigned int xcb_block_len = 0; 1187 unsigned int xcb_pad = 0; 1188 unsigned int xcb_align_to = 0; 1189 1190 1191 xcb_block_len += sizeof(xcb_res_query_resource_bytes_request_t); 1192 xcb_tmp += xcb_block_len; 1193 xcb_buffer_len += xcb_block_len; 1194 xcb_block_len = 0; 1195 /* specs */ 1196 xcb_block_len += _aux->num_specs * sizeof(xcb_res_resource_id_spec_t); 1197 xcb_tmp += xcb_block_len; 1198 xcb_align_to = ALIGNOF(xcb_res_resource_id_spec_t); 1199 /* insert padding */ 1200 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1201 xcb_buffer_len += xcb_block_len + xcb_pad; 1202 if (0 != xcb_pad) { 1203 xcb_tmp += xcb_pad; 1204 xcb_pad = 0; 1205 } 1206 xcb_block_len = 0; 1207 1208 return xcb_buffer_len; 1209 } 1210 1211 1212 /***************************************************************************** 1213 ** 1214 ** xcb_res_query_resource_bytes_cookie_t xcb_res_query_resource_bytes 1215 ** 1216 ** @param xcb_connection_t *c 1217 ** @param uint32_t client 1218 ** @param uint32_t num_specs 1219 ** @param const xcb_res_resource_id_spec_t *specs 1220 ** @returns xcb_res_query_resource_bytes_cookie_t 1221 ** 1222 *****************************************************************************/ 1223 1224 xcb_res_query_resource_bytes_cookie_t 1225 xcb_res_query_resource_bytes (xcb_connection_t *c /**< */, 1226 uint32_t client /**< */, 1227 uint32_t num_specs /**< */, 1228 const xcb_res_resource_id_spec_t *specs /**< */) 1229 { 1230 static const xcb_protocol_request_t xcb_req = { 1231 /* count */ 4, 1232 /* ext */ &xcb_res_id, 1233 /* opcode */ XCB_RES_QUERY_RESOURCE_BYTES, 1234 /* isvoid */ 0 1235 }; 1236 1237 struct iovec xcb_parts[6]; 1238 xcb_res_query_resource_bytes_cookie_t xcb_ret; 1239 xcb_res_query_resource_bytes_request_t xcb_out; 1240 1241 xcb_out.client = client; 1242 xcb_out.num_specs = num_specs; 1243 1244 xcb_parts[2].iov_base = (char *) &xcb_out; 1245 xcb_parts[2].iov_len = sizeof(xcb_out); 1246 xcb_parts[3].iov_base = 0; 1247 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1248 /* xcb_res_resource_id_spec_t specs */ 1249 xcb_parts[4].iov_base = (char *) specs; 1250 xcb_parts[4].iov_len = num_specs * sizeof(xcb_res_resource_id_spec_t); 1251 xcb_parts[5].iov_base = 0; 1252 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1253 1254 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1255 return xcb_ret; 1256 } 1257 1258 1259 /***************************************************************************** 1260 ** 1261 ** xcb_res_query_resource_bytes_cookie_t xcb_res_query_resource_bytes_unchecked 1262 ** 1263 ** @param xcb_connection_t *c 1264 ** @param uint32_t client 1265 ** @param uint32_t num_specs 1266 ** @param const xcb_res_resource_id_spec_t *specs 1267 ** @returns xcb_res_query_resource_bytes_cookie_t 1268 ** 1269 *****************************************************************************/ 1270 1271 xcb_res_query_resource_bytes_cookie_t 1272 xcb_res_query_resource_bytes_unchecked (xcb_connection_t *c /**< */, 1273 uint32_t client /**< */, 1274 uint32_t num_specs /**< */, 1275 const xcb_res_resource_id_spec_t *specs /**< */) 1276 { 1277 static const xcb_protocol_request_t xcb_req = { 1278 /* count */ 4, 1279 /* ext */ &xcb_res_id, 1280 /* opcode */ XCB_RES_QUERY_RESOURCE_BYTES, 1281 /* isvoid */ 0 1282 }; 1283 1284 struct iovec xcb_parts[6]; 1285 xcb_res_query_resource_bytes_cookie_t xcb_ret; 1286 xcb_res_query_resource_bytes_request_t xcb_out; 1287 1288 xcb_out.client = client; 1289 xcb_out.num_specs = num_specs; 1290 1291 xcb_parts[2].iov_base = (char *) &xcb_out; 1292 xcb_parts[2].iov_len = sizeof(xcb_out); 1293 xcb_parts[3].iov_base = 0; 1294 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1295 /* xcb_res_resource_id_spec_t specs */ 1296 xcb_parts[4].iov_base = (char *) specs; 1297 xcb_parts[4].iov_len = num_specs * sizeof(xcb_res_resource_id_spec_t); 1298 xcb_parts[5].iov_base = 0; 1299 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1300 1301 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1302 return xcb_ret; 1303 } 1304 1305 1306 /***************************************************************************** 1307 ** 1308 ** int xcb_res_query_resource_bytes_sizes_length 1309 ** 1310 ** @param const xcb_res_query_resource_bytes_reply_t *R 1311 ** @returns int 1312 ** 1313 *****************************************************************************/ 1314 1315 int 1316 xcb_res_query_resource_bytes_sizes_length (const xcb_res_query_resource_bytes_reply_t *R /**< */) 1317 { 1318 return R->num_sizes; 1319 } 1320 1321 1322 /***************************************************************************** 1323 ** 1324 ** xcb_res_resource_size_value_iterator_t xcb_res_query_resource_bytes_sizes_iterator 1325 ** 1326 ** @param const xcb_res_query_resource_bytes_reply_t *R 1327 ** @returns xcb_res_resource_size_value_iterator_t 1328 ** 1329 *****************************************************************************/ 1330 1331 xcb_res_resource_size_value_iterator_t 1332 xcb_res_query_resource_bytes_sizes_iterator (const xcb_res_query_resource_bytes_reply_t *R /**< */) 1333 { 1334 xcb_res_resource_size_value_iterator_t i; 1335 i.data = (xcb_res_resource_size_value_t *) (R + 1); 1336 i.rem = R->num_sizes; 1337 i.index = (char *) i.data - (char *) R; 1338 return i; 1339 } 1340 1341 1342 /***************************************************************************** 1343 ** 1344 ** xcb_res_query_resource_bytes_reply_t * xcb_res_query_resource_bytes_reply 1345 ** 1346 ** @param xcb_connection_t *c 1347 ** @param xcb_res_query_resource_bytes_cookie_t cookie 1348 ** @param xcb_generic_error_t **e 1349 ** @returns xcb_res_query_resource_bytes_reply_t * 1350 ** 1351 *****************************************************************************/ 1352 1353 xcb_res_query_resource_bytes_reply_t * 1354 xcb_res_query_resource_bytes_reply (xcb_connection_t *c /**< */, 1355 xcb_res_query_resource_bytes_cookie_t cookie /**< */, 1356 xcb_generic_error_t **e /**< */) 1357 { 1358 return (xcb_res_query_resource_bytes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1359 } 1360 1361