1 /* 2 * This file generated automatically from xkb.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 "xkb.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 19 xcb_extension_t xcb_xkb_id = { "XKEYBOARD", 0 }; 20 21 22 /***************************************************************************** 23 ** 24 ** void xcb_xkb_ax_option_next 25 ** 26 ** @param xcb_xkb_ax_option_iterator_t *i 27 ** @returns void 28 ** 29 *****************************************************************************/ 30 31 void 32 xcb_xkb_ax_option_next (xcb_xkb_ax_option_iterator_t *i /**< */) 33 { 34 --i->rem; 35 ++i->data; 36 i->index += sizeof(xcb_xkb_ax_option_t); 37 } 38 39 40 /***************************************************************************** 41 ** 42 ** xcb_generic_iterator_t xcb_xkb_ax_option_end 43 ** 44 ** @param xcb_xkb_ax_option_iterator_t i 45 ** @returns xcb_generic_iterator_t 46 ** 47 *****************************************************************************/ 48 49 xcb_generic_iterator_t 50 xcb_xkb_ax_option_end (xcb_xkb_ax_option_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_xkb_device_spec_next 63 ** 64 ** @param xcb_xkb_device_spec_iterator_t *i 65 ** @returns void 66 ** 67 *****************************************************************************/ 68 69 void 70 xcb_xkb_device_spec_next (xcb_xkb_device_spec_iterator_t *i /**< */) 71 { 72 --i->rem; 73 ++i->data; 74 i->index += sizeof(xcb_xkb_device_spec_t); 75 } 76 77 78 /***************************************************************************** 79 ** 80 ** xcb_generic_iterator_t xcb_xkb_device_spec_end 81 ** 82 ** @param xcb_xkb_device_spec_iterator_t i 83 ** @returns xcb_generic_iterator_t 84 ** 85 *****************************************************************************/ 86 87 xcb_generic_iterator_t 88 xcb_xkb_device_spec_end (xcb_xkb_device_spec_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_xkb_led_class_spec_next 101 ** 102 ** @param xcb_xkb_led_class_spec_iterator_t *i 103 ** @returns void 104 ** 105 *****************************************************************************/ 106 107 void 108 xcb_xkb_led_class_spec_next (xcb_xkb_led_class_spec_iterator_t *i /**< */) 109 { 110 --i->rem; 111 ++i->data; 112 i->index += sizeof(xcb_xkb_led_class_spec_t); 113 } 114 115 116 /***************************************************************************** 117 ** 118 ** xcb_generic_iterator_t xcb_xkb_led_class_spec_end 119 ** 120 ** @param xcb_xkb_led_class_spec_iterator_t i 121 ** @returns xcb_generic_iterator_t 122 ** 123 *****************************************************************************/ 124 125 xcb_generic_iterator_t 126 xcb_xkb_led_class_spec_end (xcb_xkb_led_class_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 136 /***************************************************************************** 137 ** 138 ** void xcb_xkb_bell_class_spec_next 139 ** 140 ** @param xcb_xkb_bell_class_spec_iterator_t *i 141 ** @returns void 142 ** 143 *****************************************************************************/ 144 145 void 146 xcb_xkb_bell_class_spec_next (xcb_xkb_bell_class_spec_iterator_t *i /**< */) 147 { 148 --i->rem; 149 ++i->data; 150 i->index += sizeof(xcb_xkb_bell_class_spec_t); 151 } 152 153 154 /***************************************************************************** 155 ** 156 ** xcb_generic_iterator_t xcb_xkb_bell_class_spec_end 157 ** 158 ** @param xcb_xkb_bell_class_spec_iterator_t i 159 ** @returns xcb_generic_iterator_t 160 ** 161 *****************************************************************************/ 162 163 xcb_generic_iterator_t 164 xcb_xkb_bell_class_spec_end (xcb_xkb_bell_class_spec_iterator_t i /**< */) 165 { 166 xcb_generic_iterator_t ret; 167 ret.data = i.data + i.rem; 168 ret.index = i.index + ((char *) ret.data - (char *) i.data); 169 ret.rem = 0; 170 return ret; 171 } 172 173 174 /***************************************************************************** 175 ** 176 ** void xcb_xkb_id_spec_next 177 ** 178 ** @param xcb_xkb_id_spec_iterator_t *i 179 ** @returns void 180 ** 181 *****************************************************************************/ 182 183 void 184 xcb_xkb_id_spec_next (xcb_xkb_id_spec_iterator_t *i /**< */) 185 { 186 --i->rem; 187 ++i->data; 188 i->index += sizeof(xcb_xkb_id_spec_t); 189 } 190 191 192 /***************************************************************************** 193 ** 194 ** xcb_generic_iterator_t xcb_xkb_id_spec_end 195 ** 196 ** @param xcb_xkb_id_spec_iterator_t i 197 ** @returns xcb_generic_iterator_t 198 ** 199 *****************************************************************************/ 200 201 xcb_generic_iterator_t 202 xcb_xkb_id_spec_end (xcb_xkb_id_spec_iterator_t i /**< */) 203 { 204 xcb_generic_iterator_t ret; 205 ret.data = i.data + i.rem; 206 ret.index = i.index + ((char *) ret.data - (char *) i.data); 207 ret.rem = 0; 208 return ret; 209 } 210 211 212 /***************************************************************************** 213 ** 214 ** void xcb_xkb_indicator_map_next 215 ** 216 ** @param xcb_xkb_indicator_map_iterator_t *i 217 ** @returns void 218 ** 219 *****************************************************************************/ 220 221 void 222 xcb_xkb_indicator_map_next (xcb_xkb_indicator_map_iterator_t *i /**< */) 223 { 224 --i->rem; 225 ++i->data; 226 i->index += sizeof(xcb_xkb_indicator_map_t); 227 } 228 229 230 /***************************************************************************** 231 ** 232 ** xcb_generic_iterator_t xcb_xkb_indicator_map_end 233 ** 234 ** @param xcb_xkb_indicator_map_iterator_t i 235 ** @returns xcb_generic_iterator_t 236 ** 237 *****************************************************************************/ 238 239 xcb_generic_iterator_t 240 xcb_xkb_indicator_map_end (xcb_xkb_indicator_map_iterator_t i /**< */) 241 { 242 xcb_generic_iterator_t ret; 243 ret.data = i.data + i.rem; 244 ret.index = i.index + ((char *) ret.data - (char *) i.data); 245 ret.rem = 0; 246 return ret; 247 } 248 249 250 /***************************************************************************** 251 ** 252 ** void xcb_xkb_mod_def_next 253 ** 254 ** @param xcb_xkb_mod_def_iterator_t *i 255 ** @returns void 256 ** 257 *****************************************************************************/ 258 259 void 260 xcb_xkb_mod_def_next (xcb_xkb_mod_def_iterator_t *i /**< */) 261 { 262 --i->rem; 263 ++i->data; 264 i->index += sizeof(xcb_xkb_mod_def_t); 265 } 266 267 268 /***************************************************************************** 269 ** 270 ** xcb_generic_iterator_t xcb_xkb_mod_def_end 271 ** 272 ** @param xcb_xkb_mod_def_iterator_t i 273 ** @returns xcb_generic_iterator_t 274 ** 275 *****************************************************************************/ 276 277 xcb_generic_iterator_t 278 xcb_xkb_mod_def_end (xcb_xkb_mod_def_iterator_t i /**< */) 279 { 280 xcb_generic_iterator_t ret; 281 ret.data = i.data + i.rem; 282 ret.index = i.index + ((char *) ret.data - (char *) i.data); 283 ret.rem = 0; 284 return ret; 285 } 286 287 288 /***************************************************************************** 289 ** 290 ** void xcb_xkb_key_name_next 291 ** 292 ** @param xcb_xkb_key_name_iterator_t *i 293 ** @returns void 294 ** 295 *****************************************************************************/ 296 297 void 298 xcb_xkb_key_name_next (xcb_xkb_key_name_iterator_t *i /**< */) 299 { 300 --i->rem; 301 ++i->data; 302 i->index += sizeof(xcb_xkb_key_name_t); 303 } 304 305 306 /***************************************************************************** 307 ** 308 ** xcb_generic_iterator_t xcb_xkb_key_name_end 309 ** 310 ** @param xcb_xkb_key_name_iterator_t i 311 ** @returns xcb_generic_iterator_t 312 ** 313 *****************************************************************************/ 314 315 xcb_generic_iterator_t 316 xcb_xkb_key_name_end (xcb_xkb_key_name_iterator_t i /**< */) 317 { 318 xcb_generic_iterator_t ret; 319 ret.data = i.data + i.rem; 320 ret.index = i.index + ((char *) ret.data - (char *) i.data); 321 ret.rem = 0; 322 return ret; 323 } 324 325 326 /***************************************************************************** 327 ** 328 ** void xcb_xkb_key_alias_next 329 ** 330 ** @param xcb_xkb_key_alias_iterator_t *i 331 ** @returns void 332 ** 333 *****************************************************************************/ 334 335 void 336 xcb_xkb_key_alias_next (xcb_xkb_key_alias_iterator_t *i /**< */) 337 { 338 --i->rem; 339 ++i->data; 340 i->index += sizeof(xcb_xkb_key_alias_t); 341 } 342 343 344 /***************************************************************************** 345 ** 346 ** xcb_generic_iterator_t xcb_xkb_key_alias_end 347 ** 348 ** @param xcb_xkb_key_alias_iterator_t i 349 ** @returns xcb_generic_iterator_t 350 ** 351 *****************************************************************************/ 352 353 xcb_generic_iterator_t 354 xcb_xkb_key_alias_end (xcb_xkb_key_alias_iterator_t i /**< */) 355 { 356 xcb_generic_iterator_t ret; 357 ret.data = i.data + i.rem; 358 ret.index = i.index + ((char *) ret.data - (char *) i.data); 359 ret.rem = 0; 360 return ret; 361 } 362 363 int 364 xcb_xkb_counted_string_8_sizeof (const void *_buffer /**< */) 365 { 366 char *xcb_tmp = (char *)_buffer; 367 const xcb_xkb_counted_string_8_t *_aux = (xcb_xkb_counted_string_8_t *)_buffer; 368 unsigned int xcb_buffer_len = 0; 369 unsigned int xcb_block_len = 0; 370 unsigned int xcb_pad = 0; 371 unsigned int xcb_align_to; 372 373 374 xcb_block_len += sizeof(xcb_xkb_counted_string_8_t); 375 xcb_tmp += xcb_block_len; 376 /* string */ 377 xcb_block_len += _aux->length * sizeof(uint8_t); 378 xcb_tmp += xcb_block_len; 379 xcb_align_to = ALIGNOF(uint8_t); 380 /* insert padding */ 381 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 382 xcb_buffer_len += xcb_block_len + xcb_pad; 383 if (0 != xcb_pad) { 384 xcb_tmp += xcb_pad; 385 xcb_pad = 0; 386 } 387 xcb_block_len = 0; 388 389 return xcb_buffer_len; 390 } 391 392 393 /***************************************************************************** 394 ** 395 ** uint8_t * xcb_xkb_counted_string_8_string 396 ** 397 ** @param const xcb_xkb_counted_string_8_t *R 398 ** @returns uint8_t * 399 ** 400 *****************************************************************************/ 401 402 uint8_t * 403 xcb_xkb_counted_string_8_string (const xcb_xkb_counted_string_8_t *R /**< */) 404 { 405 return (uint8_t *) (R + 1); 406 } 407 408 409 /***************************************************************************** 410 ** 411 ** int xcb_xkb_counted_string_8_string_length 412 ** 413 ** @param const xcb_xkb_counted_string_8_t *R 414 ** @returns int 415 ** 416 *****************************************************************************/ 417 418 int 419 xcb_xkb_counted_string_8_string_length (const xcb_xkb_counted_string_8_t *R /**< */) 420 { 421 return R->length; 422 } 423 424 425 /***************************************************************************** 426 ** 427 ** xcb_generic_iterator_t xcb_xkb_counted_string_8_string_end 428 ** 429 ** @param const xcb_xkb_counted_string_8_t *R 430 ** @returns xcb_generic_iterator_t 431 ** 432 *****************************************************************************/ 433 434 xcb_generic_iterator_t 435 xcb_xkb_counted_string_8_string_end (const xcb_xkb_counted_string_8_t *R /**< */) 436 { 437 xcb_generic_iterator_t i; 438 i.data = ((uint8_t *) (R + 1)) + (R->length); 439 i.rem = 0; 440 i.index = (char *) i.data - (char *) R; 441 return i; 442 } 443 444 445 /***************************************************************************** 446 ** 447 ** void xcb_xkb_counted_string_8_next 448 ** 449 ** @param xcb_xkb_counted_string_8_iterator_t *i 450 ** @returns void 451 ** 452 *****************************************************************************/ 453 454 void 455 xcb_xkb_counted_string_8_next (xcb_xkb_counted_string_8_iterator_t *i /**< */) 456 { 457 xcb_xkb_counted_string_8_t *R = i->data; 458 xcb_generic_iterator_t child; 459 child.data = (xcb_xkb_counted_string_8_t *)(((char *)R) + xcb_xkb_counted_string_8_sizeof(R)); 460 i->index = (char *) child.data - (char *) i->data; 461 --i->rem; 462 i->data = (xcb_xkb_counted_string_8_t *) child.data; 463 } 464 465 466 /***************************************************************************** 467 ** 468 ** xcb_generic_iterator_t xcb_xkb_counted_string_8_end 469 ** 470 ** @param xcb_xkb_counted_string_8_iterator_t i 471 ** @returns xcb_generic_iterator_t 472 ** 473 *****************************************************************************/ 474 475 xcb_generic_iterator_t 476 xcb_xkb_counted_string_8_end (xcb_xkb_counted_string_8_iterator_t i /**< */) 477 { 478 xcb_generic_iterator_t ret; 479 while(i.rem > 0) 480 xcb_xkb_counted_string_8_next(&i); 481 ret.data = i.data; 482 ret.rem = i.rem; 483 ret.index = i.index; 484 return ret; 485 } 486 487 int 488 xcb_xkb_counted_string_16_sizeof (const void *_buffer /**< */) 489 { 490 char *xcb_tmp = (char *)_buffer; 491 const xcb_xkb_counted_string_16_t *_aux = (xcb_xkb_counted_string_16_t *)_buffer; 492 unsigned int xcb_buffer_len = 0; 493 unsigned int xcb_block_len = 0; 494 unsigned int xcb_pad = 0; 495 unsigned int xcb_align_to; 496 497 498 xcb_block_len += sizeof(xcb_xkb_counted_string_16_t); 499 xcb_tmp += xcb_block_len; 500 /* string */ 501 xcb_block_len += _aux->length * sizeof(uint8_t); 502 xcb_tmp += xcb_block_len; 503 xcb_align_to = ALIGNOF(uint8_t); 504 /* insert padding */ 505 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 506 xcb_buffer_len += xcb_block_len + xcb_pad; 507 if (0 != xcb_pad) { 508 xcb_tmp += xcb_pad; 509 xcb_pad = 0; 510 } 511 xcb_block_len = 0; 512 513 return xcb_buffer_len; 514 } 515 516 517 /***************************************************************************** 518 ** 519 ** uint8_t * xcb_xkb_counted_string_16_string 520 ** 521 ** @param const xcb_xkb_counted_string_16_t *R 522 ** @returns uint8_t * 523 ** 524 *****************************************************************************/ 525 526 uint8_t * 527 xcb_xkb_counted_string_16_string (const xcb_xkb_counted_string_16_t *R /**< */) 528 { 529 return (uint8_t *) (R + 1); 530 } 531 532 533 /***************************************************************************** 534 ** 535 ** int xcb_xkb_counted_string_16_string_length 536 ** 537 ** @param const xcb_xkb_counted_string_16_t *R 538 ** @returns int 539 ** 540 *****************************************************************************/ 541 542 int 543 xcb_xkb_counted_string_16_string_length (const xcb_xkb_counted_string_16_t *R /**< */) 544 { 545 return R->length; 546 } 547 548 549 /***************************************************************************** 550 ** 551 ** xcb_generic_iterator_t xcb_xkb_counted_string_16_string_end 552 ** 553 ** @param const xcb_xkb_counted_string_16_t *R 554 ** @returns xcb_generic_iterator_t 555 ** 556 *****************************************************************************/ 557 558 xcb_generic_iterator_t 559 xcb_xkb_counted_string_16_string_end (const xcb_xkb_counted_string_16_t *R /**< */) 560 { 561 xcb_generic_iterator_t i; 562 i.data = ((uint8_t *) (R + 1)) + (R->length); 563 i.rem = 0; 564 i.index = (char *) i.data - (char *) R; 565 return i; 566 } 567 568 569 /***************************************************************************** 570 ** 571 ** uint8_t * xcb_xkb_counted_string_16_pad_0 572 ** 573 ** @param const xcb_xkb_counted_string_16_t *R 574 ** @returns uint8_t * 575 ** 576 *****************************************************************************/ 577 578 uint8_t * 579 xcb_xkb_counted_string_16_pad_0 (const xcb_xkb_counted_string_16_t *R /**< */) 580 { 581 xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(R); 582 return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); 583 } 584 585 586 /***************************************************************************** 587 ** 588 ** void xcb_xkb_counted_string_16_next 589 ** 590 ** @param xcb_xkb_counted_string_16_iterator_t *i 591 ** @returns void 592 ** 593 *****************************************************************************/ 594 595 void 596 xcb_xkb_counted_string_16_next (xcb_xkb_counted_string_16_iterator_t *i /**< */) 597 { 598 xcb_xkb_counted_string_16_t *R = i->data; 599 xcb_generic_iterator_t child; 600 child.data = (xcb_xkb_counted_string_16_t *)(((char *)R) + xcb_xkb_counted_string_16_sizeof(R)); 601 i->index = (char *) child.data - (char *) i->data; 602 --i->rem; 603 i->data = (xcb_xkb_counted_string_16_t *) child.data; 604 } 605 606 607 /***************************************************************************** 608 ** 609 ** xcb_generic_iterator_t xcb_xkb_counted_string_16_end 610 ** 611 ** @param xcb_xkb_counted_string_16_iterator_t i 612 ** @returns xcb_generic_iterator_t 613 ** 614 *****************************************************************************/ 615 616 xcb_generic_iterator_t 617 xcb_xkb_counted_string_16_end (xcb_xkb_counted_string_16_iterator_t i /**< */) 618 { 619 xcb_generic_iterator_t ret; 620 while(i.rem > 0) 621 xcb_xkb_counted_string_16_next(&i); 622 ret.data = i.data; 623 ret.rem = i.rem; 624 ret.index = i.index; 625 return ret; 626 } 627 628 629 /***************************************************************************** 630 ** 631 ** void xcb_xkb_kt_map_entry_next 632 ** 633 ** @param xcb_xkb_kt_map_entry_iterator_t *i 634 ** @returns void 635 ** 636 *****************************************************************************/ 637 638 void 639 xcb_xkb_kt_map_entry_next (xcb_xkb_kt_map_entry_iterator_t *i /**< */) 640 { 641 --i->rem; 642 ++i->data; 643 i->index += sizeof(xcb_xkb_kt_map_entry_t); 644 } 645 646 647 /***************************************************************************** 648 ** 649 ** xcb_generic_iterator_t xcb_xkb_kt_map_entry_end 650 ** 651 ** @param xcb_xkb_kt_map_entry_iterator_t i 652 ** @returns xcb_generic_iterator_t 653 ** 654 *****************************************************************************/ 655 656 xcb_generic_iterator_t 657 xcb_xkb_kt_map_entry_end (xcb_xkb_kt_map_entry_iterator_t i /**< */) 658 { 659 xcb_generic_iterator_t ret; 660 ret.data = i.data + i.rem; 661 ret.index = i.index + ((char *) ret.data - (char *) i.data); 662 ret.rem = 0; 663 return ret; 664 } 665 666 int 667 xcb_xkb_key_type_sizeof (const void *_buffer /**< */) 668 { 669 char *xcb_tmp = (char *)_buffer; 670 const xcb_xkb_key_type_t *_aux = (xcb_xkb_key_type_t *)_buffer; 671 unsigned int xcb_buffer_len = 0; 672 unsigned int xcb_block_len = 0; 673 unsigned int xcb_pad = 0; 674 unsigned int xcb_align_to; 675 676 677 xcb_block_len += sizeof(xcb_xkb_key_type_t); 678 xcb_tmp += xcb_block_len; 679 /* map */ 680 xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_map_entry_t); 681 xcb_tmp += xcb_block_len; 682 xcb_align_to = ALIGNOF(xcb_xkb_kt_map_entry_t); 683 /* insert padding */ 684 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 685 xcb_buffer_len += xcb_block_len + xcb_pad; 686 if (0 != xcb_pad) { 687 xcb_tmp += xcb_pad; 688 xcb_pad = 0; 689 } 690 xcb_block_len = 0; 691 /* preserve */ 692 xcb_block_len += (_aux->hasPreserve * _aux->nMapEntries) * sizeof(xcb_xkb_mod_def_t); 693 xcb_tmp += xcb_block_len; 694 xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t); 695 /* insert padding */ 696 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 697 xcb_buffer_len += xcb_block_len + xcb_pad; 698 if (0 != xcb_pad) { 699 xcb_tmp += xcb_pad; 700 xcb_pad = 0; 701 } 702 xcb_block_len = 0; 703 704 return xcb_buffer_len; 705 } 706 707 708 /***************************************************************************** 709 ** 710 ** xcb_xkb_kt_map_entry_t * xcb_xkb_key_type_map 711 ** 712 ** @param const xcb_xkb_key_type_t *R 713 ** @returns xcb_xkb_kt_map_entry_t * 714 ** 715 *****************************************************************************/ 716 717 xcb_xkb_kt_map_entry_t * 718 xcb_xkb_key_type_map (const xcb_xkb_key_type_t *R /**< */) 719 { 720 return (xcb_xkb_kt_map_entry_t *) (R + 1); 721 } 722 723 724 /***************************************************************************** 725 ** 726 ** int xcb_xkb_key_type_map_length 727 ** 728 ** @param const xcb_xkb_key_type_t *R 729 ** @returns int 730 ** 731 *****************************************************************************/ 732 733 int 734 xcb_xkb_key_type_map_length (const xcb_xkb_key_type_t *R /**< */) 735 { 736 return R->nMapEntries; 737 } 738 739 740 /***************************************************************************** 741 ** 742 ** xcb_xkb_kt_map_entry_iterator_t xcb_xkb_key_type_map_iterator 743 ** 744 ** @param const xcb_xkb_key_type_t *R 745 ** @returns xcb_xkb_kt_map_entry_iterator_t 746 ** 747 *****************************************************************************/ 748 749 xcb_xkb_kt_map_entry_iterator_t 750 xcb_xkb_key_type_map_iterator (const xcb_xkb_key_type_t *R /**< */) 751 { 752 xcb_xkb_kt_map_entry_iterator_t i; 753 i.data = (xcb_xkb_kt_map_entry_t *) (R + 1); 754 i.rem = R->nMapEntries; 755 i.index = (char *) i.data - (char *) R; 756 return i; 757 } 758 759 760 /***************************************************************************** 761 ** 762 ** xcb_xkb_mod_def_t * xcb_xkb_key_type_preserve 763 ** 764 ** @param const xcb_xkb_key_type_t *R 765 ** @returns xcb_xkb_mod_def_t * 766 ** 767 *****************************************************************************/ 768 769 xcb_xkb_mod_def_t * 770 xcb_xkb_key_type_preserve (const xcb_xkb_key_type_t *R /**< */) 771 { 772 xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R)); 773 return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0); 774 } 775 776 777 /***************************************************************************** 778 ** 779 ** int xcb_xkb_key_type_preserve_length 780 ** 781 ** @param const xcb_xkb_key_type_t *R 782 ** @returns int 783 ** 784 *****************************************************************************/ 785 786 int 787 xcb_xkb_key_type_preserve_length (const xcb_xkb_key_type_t *R /**< */) 788 { 789 return (R->hasPreserve * R->nMapEntries); 790 } 791 792 793 /***************************************************************************** 794 ** 795 ** xcb_xkb_mod_def_iterator_t xcb_xkb_key_type_preserve_iterator 796 ** 797 ** @param const xcb_xkb_key_type_t *R 798 ** @returns xcb_xkb_mod_def_iterator_t 799 ** 800 *****************************************************************************/ 801 802 xcb_xkb_mod_def_iterator_t 803 xcb_xkb_key_type_preserve_iterator (const xcb_xkb_key_type_t *R /**< */) 804 { 805 xcb_xkb_mod_def_iterator_t i; 806 xcb_generic_iterator_t prev = xcb_xkb_kt_map_entry_end(xcb_xkb_key_type_map_iterator(R)); 807 i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index)); 808 i.rem = (R->hasPreserve * R->nMapEntries); 809 i.index = (char *) i.data - (char *) R; 810 return i; 811 } 812 813 814 /***************************************************************************** 815 ** 816 ** void xcb_xkb_key_type_next 817 ** 818 ** @param xcb_xkb_key_type_iterator_t *i 819 ** @returns void 820 ** 821 *****************************************************************************/ 822 823 void 824 xcb_xkb_key_type_next (xcb_xkb_key_type_iterator_t *i /**< */) 825 { 826 xcb_xkb_key_type_t *R = i->data; 827 xcb_generic_iterator_t child; 828 child.data = (xcb_xkb_key_type_t *)(((char *)R) + xcb_xkb_key_type_sizeof(R)); 829 i->index = (char *) child.data - (char *) i->data; 830 --i->rem; 831 i->data = (xcb_xkb_key_type_t *) child.data; 832 } 833 834 835 /***************************************************************************** 836 ** 837 ** xcb_generic_iterator_t xcb_xkb_key_type_end 838 ** 839 ** @param xcb_xkb_key_type_iterator_t i 840 ** @returns xcb_generic_iterator_t 841 ** 842 *****************************************************************************/ 843 844 xcb_generic_iterator_t 845 xcb_xkb_key_type_end (xcb_xkb_key_type_iterator_t i /**< */) 846 { 847 xcb_generic_iterator_t ret; 848 while(i.rem > 0) 849 xcb_xkb_key_type_next(&i); 850 ret.data = i.data; 851 ret.rem = i.rem; 852 ret.index = i.index; 853 return ret; 854 } 855 856 int 857 xcb_xkb_key_sym_map_sizeof (const void *_buffer /**< */) 858 { 859 char *xcb_tmp = (char *)_buffer; 860 const xcb_xkb_key_sym_map_t *_aux = (xcb_xkb_key_sym_map_t *)_buffer; 861 unsigned int xcb_buffer_len = 0; 862 unsigned int xcb_block_len = 0; 863 unsigned int xcb_pad = 0; 864 unsigned int xcb_align_to; 865 866 867 xcb_block_len += sizeof(xcb_xkb_key_sym_map_t); 868 xcb_tmp += xcb_block_len; 869 /* syms */ 870 xcb_block_len += _aux->nSyms * sizeof(xcb_keysym_t); 871 xcb_tmp += xcb_block_len; 872 xcb_align_to = ALIGNOF(xcb_keysym_t); 873 /* insert padding */ 874 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 875 xcb_buffer_len += xcb_block_len + xcb_pad; 876 if (0 != xcb_pad) { 877 xcb_tmp += xcb_pad; 878 xcb_pad = 0; 879 } 880 xcb_block_len = 0; 881 882 return xcb_buffer_len; 883 } 884 885 886 /***************************************************************************** 887 ** 888 ** xcb_keysym_t * xcb_xkb_key_sym_map_syms 889 ** 890 ** @param const xcb_xkb_key_sym_map_t *R 891 ** @returns xcb_keysym_t * 892 ** 893 *****************************************************************************/ 894 895 xcb_keysym_t * 896 xcb_xkb_key_sym_map_syms (const xcb_xkb_key_sym_map_t *R /**< */) 897 { 898 return (xcb_keysym_t *) (R + 1); 899 } 900 901 902 /***************************************************************************** 903 ** 904 ** int xcb_xkb_key_sym_map_syms_length 905 ** 906 ** @param const xcb_xkb_key_sym_map_t *R 907 ** @returns int 908 ** 909 *****************************************************************************/ 910 911 int 912 xcb_xkb_key_sym_map_syms_length (const xcb_xkb_key_sym_map_t *R /**< */) 913 { 914 return R->nSyms; 915 } 916 917 918 /***************************************************************************** 919 ** 920 ** xcb_generic_iterator_t xcb_xkb_key_sym_map_syms_end 921 ** 922 ** @param const xcb_xkb_key_sym_map_t *R 923 ** @returns xcb_generic_iterator_t 924 ** 925 *****************************************************************************/ 926 927 xcb_generic_iterator_t 928 xcb_xkb_key_sym_map_syms_end (const xcb_xkb_key_sym_map_t *R /**< */) 929 { 930 xcb_generic_iterator_t i; 931 i.data = ((xcb_keysym_t *) (R + 1)) + (R->nSyms); 932 i.rem = 0; 933 i.index = (char *) i.data - (char *) R; 934 return i; 935 } 936 937 938 /***************************************************************************** 939 ** 940 ** void xcb_xkb_key_sym_map_next 941 ** 942 ** @param xcb_xkb_key_sym_map_iterator_t *i 943 ** @returns void 944 ** 945 *****************************************************************************/ 946 947 void 948 xcb_xkb_key_sym_map_next (xcb_xkb_key_sym_map_iterator_t *i /**< */) 949 { 950 xcb_xkb_key_sym_map_t *R = i->data; 951 xcb_generic_iterator_t child; 952 child.data = (xcb_xkb_key_sym_map_t *)(((char *)R) + xcb_xkb_key_sym_map_sizeof(R)); 953 i->index = (char *) child.data - (char *) i->data; 954 --i->rem; 955 i->data = (xcb_xkb_key_sym_map_t *) child.data; 956 } 957 958 959 /***************************************************************************** 960 ** 961 ** xcb_generic_iterator_t xcb_xkb_key_sym_map_end 962 ** 963 ** @param xcb_xkb_key_sym_map_iterator_t i 964 ** @returns xcb_generic_iterator_t 965 ** 966 *****************************************************************************/ 967 968 xcb_generic_iterator_t 969 xcb_xkb_key_sym_map_end (xcb_xkb_key_sym_map_iterator_t i /**< */) 970 { 971 xcb_generic_iterator_t ret; 972 while(i.rem > 0) 973 xcb_xkb_key_sym_map_next(&i); 974 ret.data = i.data; 975 ret.rem = i.rem; 976 ret.index = i.index; 977 return ret; 978 } 979 980 981 /***************************************************************************** 982 ** 983 ** void xcb_xkb_common_behavior_next 984 ** 985 ** @param xcb_xkb_common_behavior_iterator_t *i 986 ** @returns void 987 ** 988 *****************************************************************************/ 989 990 void 991 xcb_xkb_common_behavior_next (xcb_xkb_common_behavior_iterator_t *i /**< */) 992 { 993 --i->rem; 994 ++i->data; 995 i->index += sizeof(xcb_xkb_common_behavior_t); 996 } 997 998 999 /***************************************************************************** 1000 ** 1001 ** xcb_generic_iterator_t xcb_xkb_common_behavior_end 1002 ** 1003 ** @param xcb_xkb_common_behavior_iterator_t i 1004 ** @returns xcb_generic_iterator_t 1005 ** 1006 *****************************************************************************/ 1007 1008 xcb_generic_iterator_t 1009 xcb_xkb_common_behavior_end (xcb_xkb_common_behavior_iterator_t i /**< */) 1010 { 1011 xcb_generic_iterator_t ret; 1012 ret.data = i.data + i.rem; 1013 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1014 ret.rem = 0; 1015 return ret; 1016 } 1017 1018 1019 /***************************************************************************** 1020 ** 1021 ** void xcb_xkb_default_behavior_next 1022 ** 1023 ** @param xcb_xkb_default_behavior_iterator_t *i 1024 ** @returns void 1025 ** 1026 *****************************************************************************/ 1027 1028 void 1029 xcb_xkb_default_behavior_next (xcb_xkb_default_behavior_iterator_t *i /**< */) 1030 { 1031 --i->rem; 1032 ++i->data; 1033 i->index += sizeof(xcb_xkb_default_behavior_t); 1034 } 1035 1036 1037 /***************************************************************************** 1038 ** 1039 ** xcb_generic_iterator_t xcb_xkb_default_behavior_end 1040 ** 1041 ** @param xcb_xkb_default_behavior_iterator_t i 1042 ** @returns xcb_generic_iterator_t 1043 ** 1044 *****************************************************************************/ 1045 1046 xcb_generic_iterator_t 1047 xcb_xkb_default_behavior_end (xcb_xkb_default_behavior_iterator_t i /**< */) 1048 { 1049 xcb_generic_iterator_t ret; 1050 ret.data = i.data + i.rem; 1051 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1052 ret.rem = 0; 1053 return ret; 1054 } 1055 1056 1057 /***************************************************************************** 1058 ** 1059 ** void xcb_xkb_lock_behavior_next 1060 ** 1061 ** @param xcb_xkb_lock_behavior_iterator_t *i 1062 ** @returns void 1063 ** 1064 *****************************************************************************/ 1065 1066 void 1067 xcb_xkb_lock_behavior_next (xcb_xkb_lock_behavior_iterator_t *i /**< */) 1068 { 1069 --i->rem; 1070 ++i->data; 1071 i->index += sizeof(xcb_xkb_lock_behavior_t); 1072 } 1073 1074 1075 /***************************************************************************** 1076 ** 1077 ** xcb_generic_iterator_t xcb_xkb_lock_behavior_end 1078 ** 1079 ** @param xcb_xkb_lock_behavior_iterator_t i 1080 ** @returns xcb_generic_iterator_t 1081 ** 1082 *****************************************************************************/ 1083 1084 xcb_generic_iterator_t 1085 xcb_xkb_lock_behavior_end (xcb_xkb_lock_behavior_iterator_t i /**< */) 1086 { 1087 xcb_generic_iterator_t ret; 1088 ret.data = i.data + i.rem; 1089 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1090 ret.rem = 0; 1091 return ret; 1092 } 1093 1094 1095 /***************************************************************************** 1096 ** 1097 ** void xcb_xkb_radio_group_behavior_next 1098 ** 1099 ** @param xcb_xkb_radio_group_behavior_iterator_t *i 1100 ** @returns void 1101 ** 1102 *****************************************************************************/ 1103 1104 void 1105 xcb_xkb_radio_group_behavior_next (xcb_xkb_radio_group_behavior_iterator_t *i /**< */) 1106 { 1107 --i->rem; 1108 ++i->data; 1109 i->index += sizeof(xcb_xkb_radio_group_behavior_t); 1110 } 1111 1112 1113 /***************************************************************************** 1114 ** 1115 ** xcb_generic_iterator_t xcb_xkb_radio_group_behavior_end 1116 ** 1117 ** @param xcb_xkb_radio_group_behavior_iterator_t i 1118 ** @returns xcb_generic_iterator_t 1119 ** 1120 *****************************************************************************/ 1121 1122 xcb_generic_iterator_t 1123 xcb_xkb_radio_group_behavior_end (xcb_xkb_radio_group_behavior_iterator_t i /**< */) 1124 { 1125 xcb_generic_iterator_t ret; 1126 ret.data = i.data + i.rem; 1127 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1128 ret.rem = 0; 1129 return ret; 1130 } 1131 1132 1133 /***************************************************************************** 1134 ** 1135 ** void xcb_xkb_overlay_1_behavior_next 1136 ** 1137 ** @param xcb_xkb_overlay_1_behavior_iterator_t *i 1138 ** @returns void 1139 ** 1140 *****************************************************************************/ 1141 1142 void 1143 xcb_xkb_overlay_1_behavior_next (xcb_xkb_overlay_1_behavior_iterator_t *i /**< */) 1144 { 1145 --i->rem; 1146 ++i->data; 1147 i->index += sizeof(xcb_xkb_overlay_1_behavior_t); 1148 } 1149 1150 1151 /***************************************************************************** 1152 ** 1153 ** xcb_generic_iterator_t xcb_xkb_overlay_1_behavior_end 1154 ** 1155 ** @param xcb_xkb_overlay_1_behavior_iterator_t i 1156 ** @returns xcb_generic_iterator_t 1157 ** 1158 *****************************************************************************/ 1159 1160 xcb_generic_iterator_t 1161 xcb_xkb_overlay_1_behavior_end (xcb_xkb_overlay_1_behavior_iterator_t i /**< */) 1162 { 1163 xcb_generic_iterator_t ret; 1164 ret.data = i.data + i.rem; 1165 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1166 ret.rem = 0; 1167 return ret; 1168 } 1169 1170 1171 /***************************************************************************** 1172 ** 1173 ** void xcb_xkb_overlay_2_behavior_next 1174 ** 1175 ** @param xcb_xkb_overlay_2_behavior_iterator_t *i 1176 ** @returns void 1177 ** 1178 *****************************************************************************/ 1179 1180 void 1181 xcb_xkb_overlay_2_behavior_next (xcb_xkb_overlay_2_behavior_iterator_t *i /**< */) 1182 { 1183 --i->rem; 1184 ++i->data; 1185 i->index += sizeof(xcb_xkb_overlay_2_behavior_t); 1186 } 1187 1188 1189 /***************************************************************************** 1190 ** 1191 ** xcb_generic_iterator_t xcb_xkb_overlay_2_behavior_end 1192 ** 1193 ** @param xcb_xkb_overlay_2_behavior_iterator_t i 1194 ** @returns xcb_generic_iterator_t 1195 ** 1196 *****************************************************************************/ 1197 1198 xcb_generic_iterator_t 1199 xcb_xkb_overlay_2_behavior_end (xcb_xkb_overlay_2_behavior_iterator_t i /**< */) 1200 { 1201 xcb_generic_iterator_t ret; 1202 ret.data = i.data + i.rem; 1203 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1204 ret.rem = 0; 1205 return ret; 1206 } 1207 1208 1209 /***************************************************************************** 1210 ** 1211 ** void xcb_xkb_permament_lock_behavior_next 1212 ** 1213 ** @param xcb_xkb_permament_lock_behavior_iterator_t *i 1214 ** @returns void 1215 ** 1216 *****************************************************************************/ 1217 1218 void 1219 xcb_xkb_permament_lock_behavior_next (xcb_xkb_permament_lock_behavior_iterator_t *i /**< */) 1220 { 1221 --i->rem; 1222 ++i->data; 1223 i->index += sizeof(xcb_xkb_permament_lock_behavior_t); 1224 } 1225 1226 1227 /***************************************************************************** 1228 ** 1229 ** xcb_generic_iterator_t xcb_xkb_permament_lock_behavior_end 1230 ** 1231 ** @param xcb_xkb_permament_lock_behavior_iterator_t i 1232 ** @returns xcb_generic_iterator_t 1233 ** 1234 *****************************************************************************/ 1235 1236 xcb_generic_iterator_t 1237 xcb_xkb_permament_lock_behavior_end (xcb_xkb_permament_lock_behavior_iterator_t i /**< */) 1238 { 1239 xcb_generic_iterator_t ret; 1240 ret.data = i.data + i.rem; 1241 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1242 ret.rem = 0; 1243 return ret; 1244 } 1245 1246 1247 /***************************************************************************** 1248 ** 1249 ** void xcb_xkb_permament_radio_group_behavior_next 1250 ** 1251 ** @param xcb_xkb_permament_radio_group_behavior_iterator_t *i 1252 ** @returns void 1253 ** 1254 *****************************************************************************/ 1255 1256 void 1257 xcb_xkb_permament_radio_group_behavior_next (xcb_xkb_permament_radio_group_behavior_iterator_t *i /**< */) 1258 { 1259 --i->rem; 1260 ++i->data; 1261 i->index += sizeof(xcb_xkb_permament_radio_group_behavior_t); 1262 } 1263 1264 1265 /***************************************************************************** 1266 ** 1267 ** xcb_generic_iterator_t xcb_xkb_permament_radio_group_behavior_end 1268 ** 1269 ** @param xcb_xkb_permament_radio_group_behavior_iterator_t i 1270 ** @returns xcb_generic_iterator_t 1271 ** 1272 *****************************************************************************/ 1273 1274 xcb_generic_iterator_t 1275 xcb_xkb_permament_radio_group_behavior_end (xcb_xkb_permament_radio_group_behavior_iterator_t i /**< */) 1276 { 1277 xcb_generic_iterator_t ret; 1278 ret.data = i.data + i.rem; 1279 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1280 ret.rem = 0; 1281 return ret; 1282 } 1283 1284 1285 /***************************************************************************** 1286 ** 1287 ** void xcb_xkb_permament_overlay_1_behavior_next 1288 ** 1289 ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t *i 1290 ** @returns void 1291 ** 1292 *****************************************************************************/ 1293 1294 void 1295 xcb_xkb_permament_overlay_1_behavior_next (xcb_xkb_permament_overlay_1_behavior_iterator_t *i /**< */) 1296 { 1297 --i->rem; 1298 ++i->data; 1299 i->index += sizeof(xcb_xkb_permament_overlay_1_behavior_t); 1300 } 1301 1302 1303 /***************************************************************************** 1304 ** 1305 ** xcb_generic_iterator_t xcb_xkb_permament_overlay_1_behavior_end 1306 ** 1307 ** @param xcb_xkb_permament_overlay_1_behavior_iterator_t i 1308 ** @returns xcb_generic_iterator_t 1309 ** 1310 *****************************************************************************/ 1311 1312 xcb_generic_iterator_t 1313 xcb_xkb_permament_overlay_1_behavior_end (xcb_xkb_permament_overlay_1_behavior_iterator_t i /**< */) 1314 { 1315 xcb_generic_iterator_t ret; 1316 ret.data = i.data + i.rem; 1317 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1318 ret.rem = 0; 1319 return ret; 1320 } 1321 1322 1323 /***************************************************************************** 1324 ** 1325 ** void xcb_xkb_permament_overlay_2_behavior_next 1326 ** 1327 ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t *i 1328 ** @returns void 1329 ** 1330 *****************************************************************************/ 1331 1332 void 1333 xcb_xkb_permament_overlay_2_behavior_next (xcb_xkb_permament_overlay_2_behavior_iterator_t *i /**< */) 1334 { 1335 --i->rem; 1336 ++i->data; 1337 i->index += sizeof(xcb_xkb_permament_overlay_2_behavior_t); 1338 } 1339 1340 1341 /***************************************************************************** 1342 ** 1343 ** xcb_generic_iterator_t xcb_xkb_permament_overlay_2_behavior_end 1344 ** 1345 ** @param xcb_xkb_permament_overlay_2_behavior_iterator_t i 1346 ** @returns xcb_generic_iterator_t 1347 ** 1348 *****************************************************************************/ 1349 1350 xcb_generic_iterator_t 1351 xcb_xkb_permament_overlay_2_behavior_end (xcb_xkb_permament_overlay_2_behavior_iterator_t i /**< */) 1352 { 1353 xcb_generic_iterator_t ret; 1354 ret.data = i.data + i.rem; 1355 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1356 ret.rem = 0; 1357 return ret; 1358 } 1359 1360 1361 /***************************************************************************** 1362 ** 1363 ** void xcb_xkb_behavior_next 1364 ** 1365 ** @param xcb_xkb_behavior_iterator_t *i 1366 ** @returns void 1367 ** 1368 *****************************************************************************/ 1369 1370 void 1371 xcb_xkb_behavior_next (xcb_xkb_behavior_iterator_t *i /**< */) 1372 { 1373 --i->rem; 1374 ++i->data; 1375 i->index += sizeof(xcb_xkb_behavior_t); 1376 } 1377 1378 1379 /***************************************************************************** 1380 ** 1381 ** xcb_generic_iterator_t xcb_xkb_behavior_end 1382 ** 1383 ** @param xcb_xkb_behavior_iterator_t i 1384 ** @returns xcb_generic_iterator_t 1385 ** 1386 *****************************************************************************/ 1387 1388 xcb_generic_iterator_t 1389 xcb_xkb_behavior_end (xcb_xkb_behavior_iterator_t i /**< */) 1390 { 1391 xcb_generic_iterator_t ret; 1392 ret.data = i.data + i.rem; 1393 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1394 ret.rem = 0; 1395 return ret; 1396 } 1397 1398 1399 /***************************************************************************** 1400 ** 1401 ** void xcb_xkb_set_behavior_next 1402 ** 1403 ** @param xcb_xkb_set_behavior_iterator_t *i 1404 ** @returns void 1405 ** 1406 *****************************************************************************/ 1407 1408 void 1409 xcb_xkb_set_behavior_next (xcb_xkb_set_behavior_iterator_t *i /**< */) 1410 { 1411 --i->rem; 1412 ++i->data; 1413 i->index += sizeof(xcb_xkb_set_behavior_t); 1414 } 1415 1416 1417 /***************************************************************************** 1418 ** 1419 ** xcb_generic_iterator_t xcb_xkb_set_behavior_end 1420 ** 1421 ** @param xcb_xkb_set_behavior_iterator_t i 1422 ** @returns xcb_generic_iterator_t 1423 ** 1424 *****************************************************************************/ 1425 1426 xcb_generic_iterator_t 1427 xcb_xkb_set_behavior_end (xcb_xkb_set_behavior_iterator_t i /**< */) 1428 { 1429 xcb_generic_iterator_t ret; 1430 ret.data = i.data + i.rem; 1431 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1432 ret.rem = 0; 1433 return ret; 1434 } 1435 1436 1437 /***************************************************************************** 1438 ** 1439 ** void xcb_xkb_set_explicit_next 1440 ** 1441 ** @param xcb_xkb_set_explicit_iterator_t *i 1442 ** @returns void 1443 ** 1444 *****************************************************************************/ 1445 1446 void 1447 xcb_xkb_set_explicit_next (xcb_xkb_set_explicit_iterator_t *i /**< */) 1448 { 1449 --i->rem; 1450 ++i->data; 1451 i->index += sizeof(xcb_xkb_set_explicit_t); 1452 } 1453 1454 1455 /***************************************************************************** 1456 ** 1457 ** xcb_generic_iterator_t xcb_xkb_set_explicit_end 1458 ** 1459 ** @param xcb_xkb_set_explicit_iterator_t i 1460 ** @returns xcb_generic_iterator_t 1461 ** 1462 *****************************************************************************/ 1463 1464 xcb_generic_iterator_t 1465 xcb_xkb_set_explicit_end (xcb_xkb_set_explicit_iterator_t i /**< */) 1466 { 1467 xcb_generic_iterator_t ret; 1468 ret.data = i.data + i.rem; 1469 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1470 ret.rem = 0; 1471 return ret; 1472 } 1473 1474 1475 /***************************************************************************** 1476 ** 1477 ** void xcb_xkb_key_mod_map_next 1478 ** 1479 ** @param xcb_xkb_key_mod_map_iterator_t *i 1480 ** @returns void 1481 ** 1482 *****************************************************************************/ 1483 1484 void 1485 xcb_xkb_key_mod_map_next (xcb_xkb_key_mod_map_iterator_t *i /**< */) 1486 { 1487 --i->rem; 1488 ++i->data; 1489 i->index += sizeof(xcb_xkb_key_mod_map_t); 1490 } 1491 1492 1493 /***************************************************************************** 1494 ** 1495 ** xcb_generic_iterator_t xcb_xkb_key_mod_map_end 1496 ** 1497 ** @param xcb_xkb_key_mod_map_iterator_t i 1498 ** @returns xcb_generic_iterator_t 1499 ** 1500 *****************************************************************************/ 1501 1502 xcb_generic_iterator_t 1503 xcb_xkb_key_mod_map_end (xcb_xkb_key_mod_map_iterator_t i /**< */) 1504 { 1505 xcb_generic_iterator_t ret; 1506 ret.data = i.data + i.rem; 1507 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1508 ret.rem = 0; 1509 return ret; 1510 } 1511 1512 1513 /***************************************************************************** 1514 ** 1515 ** void xcb_xkb_key_v_mod_map_next 1516 ** 1517 ** @param xcb_xkb_key_v_mod_map_iterator_t *i 1518 ** @returns void 1519 ** 1520 *****************************************************************************/ 1521 1522 void 1523 xcb_xkb_key_v_mod_map_next (xcb_xkb_key_v_mod_map_iterator_t *i /**< */) 1524 { 1525 --i->rem; 1526 ++i->data; 1527 i->index += sizeof(xcb_xkb_key_v_mod_map_t); 1528 } 1529 1530 1531 /***************************************************************************** 1532 ** 1533 ** xcb_generic_iterator_t xcb_xkb_key_v_mod_map_end 1534 ** 1535 ** @param xcb_xkb_key_v_mod_map_iterator_t i 1536 ** @returns xcb_generic_iterator_t 1537 ** 1538 *****************************************************************************/ 1539 1540 xcb_generic_iterator_t 1541 xcb_xkb_key_v_mod_map_end (xcb_xkb_key_v_mod_map_iterator_t i /**< */) 1542 { 1543 xcb_generic_iterator_t ret; 1544 ret.data = i.data + i.rem; 1545 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1546 ret.rem = 0; 1547 return ret; 1548 } 1549 1550 1551 /***************************************************************************** 1552 ** 1553 ** void xcb_xkb_kt_set_map_entry_next 1554 ** 1555 ** @param xcb_xkb_kt_set_map_entry_iterator_t *i 1556 ** @returns void 1557 ** 1558 *****************************************************************************/ 1559 1560 void 1561 xcb_xkb_kt_set_map_entry_next (xcb_xkb_kt_set_map_entry_iterator_t *i /**< */) 1562 { 1563 --i->rem; 1564 ++i->data; 1565 i->index += sizeof(xcb_xkb_kt_set_map_entry_t); 1566 } 1567 1568 1569 /***************************************************************************** 1570 ** 1571 ** xcb_generic_iterator_t xcb_xkb_kt_set_map_entry_end 1572 ** 1573 ** @param xcb_xkb_kt_set_map_entry_iterator_t i 1574 ** @returns xcb_generic_iterator_t 1575 ** 1576 *****************************************************************************/ 1577 1578 xcb_generic_iterator_t 1579 xcb_xkb_kt_set_map_entry_end (xcb_xkb_kt_set_map_entry_iterator_t i /**< */) 1580 { 1581 xcb_generic_iterator_t ret; 1582 ret.data = i.data + i.rem; 1583 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1584 ret.rem = 0; 1585 return ret; 1586 } 1587 1588 int 1589 xcb_xkb_set_key_type_sizeof (const void *_buffer /**< */) 1590 { 1591 char *xcb_tmp = (char *)_buffer; 1592 const xcb_xkb_set_key_type_t *_aux = (xcb_xkb_set_key_type_t *)_buffer; 1593 unsigned int xcb_buffer_len = 0; 1594 unsigned int xcb_block_len = 0; 1595 unsigned int xcb_pad = 0; 1596 unsigned int xcb_align_to; 1597 1598 1599 xcb_block_len += sizeof(xcb_xkb_set_key_type_t); 1600 xcb_tmp += xcb_block_len; 1601 /* entries */ 1602 xcb_block_len += _aux->nMapEntries * sizeof(xcb_xkb_kt_set_map_entry_t); 1603 xcb_tmp += xcb_block_len; 1604 xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t); 1605 /* insert padding */ 1606 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1607 xcb_buffer_len += xcb_block_len + xcb_pad; 1608 if (0 != xcb_pad) { 1609 xcb_tmp += xcb_pad; 1610 xcb_pad = 0; 1611 } 1612 xcb_block_len = 0; 1613 /* preserve_entries */ 1614 xcb_block_len += (_aux->preserve * _aux->nMapEntries) * sizeof(xcb_xkb_kt_set_map_entry_t); 1615 xcb_tmp += xcb_block_len; 1616 xcb_align_to = ALIGNOF(xcb_xkb_kt_set_map_entry_t); 1617 /* insert padding */ 1618 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1619 xcb_buffer_len += xcb_block_len + xcb_pad; 1620 if (0 != xcb_pad) { 1621 xcb_tmp += xcb_pad; 1622 xcb_pad = 0; 1623 } 1624 xcb_block_len = 0; 1625 1626 return xcb_buffer_len; 1627 } 1628 1629 1630 /***************************************************************************** 1631 ** 1632 ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_entries 1633 ** 1634 ** @param const xcb_xkb_set_key_type_t *R 1635 ** @returns xcb_xkb_kt_set_map_entry_t * 1636 ** 1637 *****************************************************************************/ 1638 1639 xcb_xkb_kt_set_map_entry_t * 1640 xcb_xkb_set_key_type_entries (const xcb_xkb_set_key_type_t *R /**< */) 1641 { 1642 return (xcb_xkb_kt_set_map_entry_t *) (R + 1); 1643 } 1644 1645 1646 /***************************************************************************** 1647 ** 1648 ** int xcb_xkb_set_key_type_entries_length 1649 ** 1650 ** @param const xcb_xkb_set_key_type_t *R 1651 ** @returns int 1652 ** 1653 *****************************************************************************/ 1654 1655 int 1656 xcb_xkb_set_key_type_entries_length (const xcb_xkb_set_key_type_t *R /**< */) 1657 { 1658 return R->nMapEntries; 1659 } 1660 1661 1662 /***************************************************************************** 1663 ** 1664 ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_entries_iterator 1665 ** 1666 ** @param const xcb_xkb_set_key_type_t *R 1667 ** @returns xcb_xkb_kt_set_map_entry_iterator_t 1668 ** 1669 *****************************************************************************/ 1670 1671 xcb_xkb_kt_set_map_entry_iterator_t 1672 xcb_xkb_set_key_type_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */) 1673 { 1674 xcb_xkb_kt_set_map_entry_iterator_t i; 1675 i.data = (xcb_xkb_kt_set_map_entry_t *) (R + 1); 1676 i.rem = R->nMapEntries; 1677 i.index = (char *) i.data - (char *) R; 1678 return i; 1679 } 1680 1681 1682 /***************************************************************************** 1683 ** 1684 ** xcb_xkb_kt_set_map_entry_t * xcb_xkb_set_key_type_preserve_entries 1685 ** 1686 ** @param const xcb_xkb_set_key_type_t *R 1687 ** @returns xcb_xkb_kt_set_map_entry_t * 1688 ** 1689 *****************************************************************************/ 1690 1691 xcb_xkb_kt_set_map_entry_t * 1692 xcb_xkb_set_key_type_preserve_entries (const xcb_xkb_set_key_type_t *R /**< */) 1693 { 1694 xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R)); 1695 return (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index) + 0); 1696 } 1697 1698 1699 /***************************************************************************** 1700 ** 1701 ** int xcb_xkb_set_key_type_preserve_entries_length 1702 ** 1703 ** @param const xcb_xkb_set_key_type_t *R 1704 ** @returns int 1705 ** 1706 *****************************************************************************/ 1707 1708 int 1709 xcb_xkb_set_key_type_preserve_entries_length (const xcb_xkb_set_key_type_t *R /**< */) 1710 { 1711 return (R->preserve * R->nMapEntries); 1712 } 1713 1714 1715 /***************************************************************************** 1716 ** 1717 ** xcb_xkb_kt_set_map_entry_iterator_t xcb_xkb_set_key_type_preserve_entries_iterator 1718 ** 1719 ** @param const xcb_xkb_set_key_type_t *R 1720 ** @returns xcb_xkb_kt_set_map_entry_iterator_t 1721 ** 1722 *****************************************************************************/ 1723 1724 xcb_xkb_kt_set_map_entry_iterator_t 1725 xcb_xkb_set_key_type_preserve_entries_iterator (const xcb_xkb_set_key_type_t *R /**< */) 1726 { 1727 xcb_xkb_kt_set_map_entry_iterator_t i; 1728 xcb_generic_iterator_t prev = xcb_xkb_kt_set_map_entry_end(xcb_xkb_set_key_type_entries_iterator(R)); 1729 i.data = (xcb_xkb_kt_set_map_entry_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_kt_set_map_entry_t, prev.index)); 1730 i.rem = (R->preserve * R->nMapEntries); 1731 i.index = (char *) i.data - (char *) R; 1732 return i; 1733 } 1734 1735 1736 /***************************************************************************** 1737 ** 1738 ** void xcb_xkb_set_key_type_next 1739 ** 1740 ** @param xcb_xkb_set_key_type_iterator_t *i 1741 ** @returns void 1742 ** 1743 *****************************************************************************/ 1744 1745 void 1746 xcb_xkb_set_key_type_next (xcb_xkb_set_key_type_iterator_t *i /**< */) 1747 { 1748 xcb_xkb_set_key_type_t *R = i->data; 1749 xcb_generic_iterator_t child; 1750 child.data = (xcb_xkb_set_key_type_t *)(((char *)R) + xcb_xkb_set_key_type_sizeof(R)); 1751 i->index = (char *) child.data - (char *) i->data; 1752 --i->rem; 1753 i->data = (xcb_xkb_set_key_type_t *) child.data; 1754 } 1755 1756 1757 /***************************************************************************** 1758 ** 1759 ** xcb_generic_iterator_t xcb_xkb_set_key_type_end 1760 ** 1761 ** @param xcb_xkb_set_key_type_iterator_t i 1762 ** @returns xcb_generic_iterator_t 1763 ** 1764 *****************************************************************************/ 1765 1766 xcb_generic_iterator_t 1767 xcb_xkb_set_key_type_end (xcb_xkb_set_key_type_iterator_t i /**< */) 1768 { 1769 xcb_generic_iterator_t ret; 1770 while(i.rem > 0) 1771 xcb_xkb_set_key_type_next(&i); 1772 ret.data = i.data; 1773 ret.rem = i.rem; 1774 ret.index = i.index; 1775 return ret; 1776 } 1777 1778 1779 /***************************************************************************** 1780 ** 1781 ** void xcb_xkb_string8_next 1782 ** 1783 ** @param xcb_xkb_string8_iterator_t *i 1784 ** @returns void 1785 ** 1786 *****************************************************************************/ 1787 1788 void 1789 xcb_xkb_string8_next (xcb_xkb_string8_iterator_t *i /**< */) 1790 { 1791 --i->rem; 1792 ++i->data; 1793 i->index += sizeof(xcb_xkb_string8_t); 1794 } 1795 1796 1797 /***************************************************************************** 1798 ** 1799 ** xcb_generic_iterator_t xcb_xkb_string8_end 1800 ** 1801 ** @param xcb_xkb_string8_iterator_t i 1802 ** @returns xcb_generic_iterator_t 1803 ** 1804 *****************************************************************************/ 1805 1806 xcb_generic_iterator_t 1807 xcb_xkb_string8_end (xcb_xkb_string8_iterator_t i /**< */) 1808 { 1809 xcb_generic_iterator_t ret; 1810 ret.data = i.data + i.rem; 1811 ret.index = i.index + ((char *) ret.data - (char *) i.data); 1812 ret.rem = 0; 1813 return ret; 1814 } 1815 1816 int 1817 xcb_xkb_property_serialize (void **_buffer /**< */, 1818 const xcb_xkb_property_t *_aux /**< */, 1819 const xcb_xkb_string8_t *name /**< */, 1820 const xcb_xkb_string8_t *value /**< */) 1821 { 1822 char *xcb_out = *_buffer; 1823 unsigned int xcb_buffer_len = 0; 1824 unsigned int xcb_align_to; 1825 1826 unsigned int xcb_pad = 0; 1827 char xcb_pad0[3] = {0, 0, 0}; 1828 struct iovec xcb_parts[5]; 1829 unsigned int xcb_parts_idx = 0; 1830 unsigned int xcb_block_len = 0; 1831 unsigned int i; 1832 char *xcb_tmp; 1833 1834 /* xcb_xkb_property_t.nameLength */ 1835 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->nameLength; 1836 xcb_block_len += sizeof(uint16_t); 1837 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 1838 xcb_parts_idx++; 1839 xcb_align_to = ALIGNOF(uint16_t); 1840 /* name */ 1841 xcb_parts[xcb_parts_idx].iov_base = (char *) name; 1842 xcb_block_len += _aux->nameLength * sizeof(xcb_xkb_string8_t); 1843 xcb_parts[xcb_parts_idx].iov_len = _aux->nameLength * sizeof(xcb_xkb_string8_t); 1844 xcb_parts_idx++; 1845 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 1846 /* xcb_xkb_property_t.valueLength */ 1847 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->valueLength; 1848 xcb_block_len += sizeof(uint16_t); 1849 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 1850 xcb_parts_idx++; 1851 xcb_align_to = ALIGNOF(uint16_t); 1852 /* value */ 1853 xcb_parts[xcb_parts_idx].iov_base = (char *) value; 1854 xcb_block_len += _aux->valueLength * sizeof(xcb_xkb_string8_t); 1855 xcb_parts[xcb_parts_idx].iov_len = _aux->valueLength * sizeof(xcb_xkb_string8_t); 1856 xcb_parts_idx++; 1857 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 1858 /* insert padding */ 1859 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1860 xcb_buffer_len += xcb_block_len + xcb_pad; 1861 if (0 != xcb_pad) { 1862 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 1863 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 1864 xcb_parts_idx++; 1865 xcb_pad = 0; 1866 } 1867 xcb_block_len = 0; 1868 1869 if (NULL == xcb_out) { 1870 /* allocate memory */ 1871 xcb_out = malloc(xcb_buffer_len); 1872 *_buffer = xcb_out; 1873 } 1874 1875 xcb_tmp = xcb_out; 1876 for(i=0; i<xcb_parts_idx; i++) { 1877 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 1878 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 1879 if (0 != xcb_parts[i].iov_len) 1880 xcb_tmp += xcb_parts[i].iov_len; 1881 } 1882 1883 return xcb_buffer_len; 1884 } 1885 1886 int 1887 xcb_xkb_property_unserialize (const void *_buffer /**< */, 1888 xcb_xkb_property_t **_aux /**< */) 1889 { 1890 char *xcb_tmp = (char *)_buffer; 1891 xcb_xkb_property_t xcb_out; 1892 unsigned int xcb_buffer_len = 0; 1893 unsigned int xcb_block_len = 0; 1894 unsigned int xcb_pad = 0; 1895 unsigned int xcb_align_to; 1896 1897 xcb_xkb_string8_t *name; 1898 int name_len; 1899 xcb_xkb_string8_t *value; 1900 int value_len; 1901 1902 /* xcb_xkb_property_t.nameLength */ 1903 xcb_out.nameLength = *(uint16_t *)xcb_tmp; 1904 xcb_block_len += sizeof(uint16_t); 1905 xcb_tmp += sizeof(uint16_t); 1906 xcb_align_to = ALIGNOF(uint16_t); 1907 /* name */ 1908 name = (xcb_xkb_string8_t *)xcb_tmp; 1909 name_len = xcb_out.nameLength * sizeof(xcb_xkb_string8_t); 1910 xcb_block_len += name_len; 1911 xcb_tmp += name_len; 1912 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 1913 /* xcb_xkb_property_t.valueLength */ 1914 xcb_out.valueLength = *(uint16_t *)xcb_tmp; 1915 xcb_block_len += sizeof(uint16_t); 1916 xcb_tmp += sizeof(uint16_t); 1917 xcb_align_to = ALIGNOF(uint16_t); 1918 /* value */ 1919 value = (xcb_xkb_string8_t *)xcb_tmp; 1920 value_len = xcb_out.valueLength * sizeof(xcb_xkb_string8_t); 1921 xcb_block_len += value_len; 1922 xcb_tmp += value_len; 1923 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 1924 /* insert padding */ 1925 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1926 xcb_buffer_len += xcb_block_len + xcb_pad; 1927 if (0 != xcb_pad) { 1928 xcb_tmp += xcb_pad; 1929 xcb_pad = 0; 1930 } 1931 xcb_block_len = 0; 1932 1933 if (NULL == _aux) 1934 return xcb_buffer_len; 1935 1936 if (NULL == *_aux) { 1937 /* allocate memory */ 1938 *_aux = malloc(xcb_buffer_len); 1939 } 1940 1941 xcb_tmp = ((char *)*_aux)+xcb_buffer_len; 1942 xcb_tmp -= value_len; 1943 memmove(xcb_tmp, value, value_len); 1944 xcb_tmp -= name_len; 1945 memmove(xcb_tmp, name, name_len); 1946 **_aux = xcb_out; 1947 1948 return xcb_buffer_len; 1949 } 1950 1951 int 1952 xcb_xkb_property_sizeof (const void *_buffer /**< */) 1953 { 1954 return xcb_xkb_property_unserialize(_buffer, NULL); 1955 } 1956 1957 1958 /***************************************************************************** 1959 ** 1960 ** xcb_xkb_string8_t * xcb_xkb_property_name 1961 ** 1962 ** @param const xcb_xkb_property_t *R 1963 ** @returns xcb_xkb_string8_t * 1964 ** 1965 *****************************************************************************/ 1966 1967 xcb_xkb_string8_t * 1968 xcb_xkb_property_name (const xcb_xkb_property_t *R /**< */) 1969 { 1970 return (xcb_xkb_string8_t *) (R + 1); 1971 } 1972 1973 1974 /***************************************************************************** 1975 ** 1976 ** int xcb_xkb_property_name_length 1977 ** 1978 ** @param const xcb_xkb_property_t *R 1979 ** @returns int 1980 ** 1981 *****************************************************************************/ 1982 1983 int 1984 xcb_xkb_property_name_length (const xcb_xkb_property_t *R /**< */) 1985 { 1986 return R->nameLength; 1987 } 1988 1989 1990 /***************************************************************************** 1991 ** 1992 ** xcb_generic_iterator_t xcb_xkb_property_name_end 1993 ** 1994 ** @param const xcb_xkb_property_t *R 1995 ** @returns xcb_generic_iterator_t 1996 ** 1997 *****************************************************************************/ 1998 1999 xcb_generic_iterator_t 2000 xcb_xkb_property_name_end (const xcb_xkb_property_t *R /**< */) 2001 { 2002 xcb_generic_iterator_t i; 2003 i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLength); 2004 i.rem = 0; 2005 i.index = (char *) i.data - (char *) R; 2006 return i; 2007 } 2008 2009 2010 /***************************************************************************** 2011 ** 2012 ** xcb_xkb_string8_t * xcb_xkb_property_value 2013 ** 2014 ** @param const xcb_xkb_property_t *R 2015 ** @returns xcb_xkb_string8_t * 2016 ** 2017 *****************************************************************************/ 2018 2019 xcb_xkb_string8_t * 2020 xcb_xkb_property_value (const xcb_xkb_property_t *R /**< */) 2021 { 2022 xcb_generic_iterator_t prev = xcb_xkb_property_name_end(R); 2023 return (xcb_xkb_string8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 2); 2024 } 2025 2026 2027 /***************************************************************************** 2028 ** 2029 ** int xcb_xkb_property_value_length 2030 ** 2031 ** @param const xcb_xkb_property_t *R 2032 ** @returns int 2033 ** 2034 *****************************************************************************/ 2035 2036 int 2037 xcb_xkb_property_value_length (const xcb_xkb_property_t *R /**< */) 2038 { 2039 return R->valueLength; 2040 } 2041 2042 2043 /***************************************************************************** 2044 ** 2045 ** xcb_generic_iterator_t xcb_xkb_property_value_end 2046 ** 2047 ** @param const xcb_xkb_property_t *R 2048 ** @returns xcb_generic_iterator_t 2049 ** 2050 *****************************************************************************/ 2051 2052 xcb_generic_iterator_t 2053 xcb_xkb_property_value_end (const xcb_xkb_property_t *R /**< */) 2054 { 2055 xcb_generic_iterator_t i; 2056 xcb_generic_iterator_t child = xcb_xkb_property_name_end(R); 2057 i.data = ((xcb_xkb_string8_t *) child.data) + (R->valueLength); 2058 i.rem = 0; 2059 i.index = (char *) i.data - (char *) R; 2060 return i; 2061 } 2062 2063 2064 /***************************************************************************** 2065 ** 2066 ** void xcb_xkb_property_next 2067 ** 2068 ** @param xcb_xkb_property_iterator_t *i 2069 ** @returns void 2070 ** 2071 *****************************************************************************/ 2072 2073 void 2074 xcb_xkb_property_next (xcb_xkb_property_iterator_t *i /**< */) 2075 { 2076 xcb_xkb_property_t *R = i->data; 2077 xcb_generic_iterator_t child; 2078 child.data = (xcb_xkb_property_t *)(((char *)R) + xcb_xkb_property_sizeof(R)); 2079 i->index = (char *) child.data - (char *) i->data; 2080 --i->rem; 2081 i->data = (xcb_xkb_property_t *) child.data; 2082 } 2083 2084 2085 /***************************************************************************** 2086 ** 2087 ** xcb_generic_iterator_t xcb_xkb_property_end 2088 ** 2089 ** @param xcb_xkb_property_iterator_t i 2090 ** @returns xcb_generic_iterator_t 2091 ** 2092 *****************************************************************************/ 2093 2094 xcb_generic_iterator_t 2095 xcb_xkb_property_end (xcb_xkb_property_iterator_t i /**< */) 2096 { 2097 xcb_generic_iterator_t ret; 2098 while(i.rem > 0) 2099 xcb_xkb_property_next(&i); 2100 ret.data = i.data; 2101 ret.rem = i.rem; 2102 ret.index = i.index; 2103 return ret; 2104 } 2105 2106 int 2107 xcb_xkb_outline_sizeof (const void *_buffer /**< */) 2108 { 2109 char *xcb_tmp = (char *)_buffer; 2110 const xcb_xkb_outline_t *_aux = (xcb_xkb_outline_t *)_buffer; 2111 unsigned int xcb_buffer_len = 0; 2112 unsigned int xcb_block_len = 0; 2113 unsigned int xcb_pad = 0; 2114 unsigned int xcb_align_to; 2115 2116 2117 xcb_block_len += sizeof(xcb_xkb_outline_t); 2118 xcb_tmp += xcb_block_len; 2119 /* points */ 2120 xcb_block_len += _aux->nPoints * sizeof(xcb_point_t); 2121 xcb_tmp += xcb_block_len; 2122 xcb_align_to = ALIGNOF(xcb_point_t); 2123 /* insert padding */ 2124 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2125 xcb_buffer_len += xcb_block_len + xcb_pad; 2126 if (0 != xcb_pad) { 2127 xcb_tmp += xcb_pad; 2128 xcb_pad = 0; 2129 } 2130 xcb_block_len = 0; 2131 2132 return xcb_buffer_len; 2133 } 2134 2135 2136 /***************************************************************************** 2137 ** 2138 ** xcb_point_t * xcb_xkb_outline_points 2139 ** 2140 ** @param const xcb_xkb_outline_t *R 2141 ** @returns xcb_point_t * 2142 ** 2143 *****************************************************************************/ 2144 2145 xcb_point_t * 2146 xcb_xkb_outline_points (const xcb_xkb_outline_t *R /**< */) 2147 { 2148 return (xcb_point_t *) (R + 1); 2149 } 2150 2151 2152 /***************************************************************************** 2153 ** 2154 ** int xcb_xkb_outline_points_length 2155 ** 2156 ** @param const xcb_xkb_outline_t *R 2157 ** @returns int 2158 ** 2159 *****************************************************************************/ 2160 2161 int 2162 xcb_xkb_outline_points_length (const xcb_xkb_outline_t *R /**< */) 2163 { 2164 return R->nPoints; 2165 } 2166 2167 2168 /***************************************************************************** 2169 ** 2170 ** xcb_point_iterator_t xcb_xkb_outline_points_iterator 2171 ** 2172 ** @param const xcb_xkb_outline_t *R 2173 ** @returns xcb_point_iterator_t 2174 ** 2175 *****************************************************************************/ 2176 2177 xcb_point_iterator_t 2178 xcb_xkb_outline_points_iterator (const xcb_xkb_outline_t *R /**< */) 2179 { 2180 xcb_point_iterator_t i; 2181 i.data = (xcb_point_t *) (R + 1); 2182 i.rem = R->nPoints; 2183 i.index = (char *) i.data - (char *) R; 2184 return i; 2185 } 2186 2187 2188 /***************************************************************************** 2189 ** 2190 ** void xcb_xkb_outline_next 2191 ** 2192 ** @param xcb_xkb_outline_iterator_t *i 2193 ** @returns void 2194 ** 2195 *****************************************************************************/ 2196 2197 void 2198 xcb_xkb_outline_next (xcb_xkb_outline_iterator_t *i /**< */) 2199 { 2200 xcb_xkb_outline_t *R = i->data; 2201 xcb_generic_iterator_t child; 2202 child.data = (xcb_xkb_outline_t *)(((char *)R) + xcb_xkb_outline_sizeof(R)); 2203 i->index = (char *) child.data - (char *) i->data; 2204 --i->rem; 2205 i->data = (xcb_xkb_outline_t *) child.data; 2206 } 2207 2208 2209 /***************************************************************************** 2210 ** 2211 ** xcb_generic_iterator_t xcb_xkb_outline_end 2212 ** 2213 ** @param xcb_xkb_outline_iterator_t i 2214 ** @returns xcb_generic_iterator_t 2215 ** 2216 *****************************************************************************/ 2217 2218 xcb_generic_iterator_t 2219 xcb_xkb_outline_end (xcb_xkb_outline_iterator_t i /**< */) 2220 { 2221 xcb_generic_iterator_t ret; 2222 while(i.rem > 0) 2223 xcb_xkb_outline_next(&i); 2224 ret.data = i.data; 2225 ret.rem = i.rem; 2226 ret.index = i.index; 2227 return ret; 2228 } 2229 2230 int 2231 xcb_xkb_shape_sizeof (const void *_buffer /**< */) 2232 { 2233 char *xcb_tmp = (char *)_buffer; 2234 const xcb_xkb_shape_t *_aux = (xcb_xkb_shape_t *)_buffer; 2235 unsigned int xcb_buffer_len = 0; 2236 unsigned int xcb_block_len = 0; 2237 unsigned int xcb_pad = 0; 2238 unsigned int xcb_align_to; 2239 2240 unsigned int i; 2241 unsigned int xcb_tmp_len; 2242 2243 xcb_block_len += sizeof(xcb_xkb_shape_t); 2244 xcb_tmp += xcb_block_len; 2245 /* outlines */ 2246 for(i=0; i<_aux->nOutlines; i++) { 2247 xcb_tmp_len = xcb_xkb_outline_sizeof(xcb_tmp); 2248 xcb_block_len += xcb_tmp_len; 2249 xcb_tmp += xcb_tmp_len; 2250 } 2251 xcb_align_to = ALIGNOF(xcb_xkb_outline_t); 2252 /* insert padding */ 2253 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2254 xcb_buffer_len += xcb_block_len + xcb_pad; 2255 if (0 != xcb_pad) { 2256 xcb_tmp += xcb_pad; 2257 xcb_pad = 0; 2258 } 2259 xcb_block_len = 0; 2260 2261 return xcb_buffer_len; 2262 } 2263 2264 2265 /***************************************************************************** 2266 ** 2267 ** int xcb_xkb_shape_outlines_length 2268 ** 2269 ** @param const xcb_xkb_shape_t *R 2270 ** @returns int 2271 ** 2272 *****************************************************************************/ 2273 2274 int 2275 xcb_xkb_shape_outlines_length (const xcb_xkb_shape_t *R /**< */) 2276 { 2277 return R->nOutlines; 2278 } 2279 2280 2281 /***************************************************************************** 2282 ** 2283 ** xcb_xkb_outline_iterator_t xcb_xkb_shape_outlines_iterator 2284 ** 2285 ** @param const xcb_xkb_shape_t *R 2286 ** @returns xcb_xkb_outline_iterator_t 2287 ** 2288 *****************************************************************************/ 2289 2290 xcb_xkb_outline_iterator_t 2291 xcb_xkb_shape_outlines_iterator (const xcb_xkb_shape_t *R /**< */) 2292 { 2293 xcb_xkb_outline_iterator_t i; 2294 i.data = (xcb_xkb_outline_t *) (R + 1); 2295 i.rem = R->nOutlines; 2296 i.index = (char *) i.data - (char *) R; 2297 return i; 2298 } 2299 2300 2301 /***************************************************************************** 2302 ** 2303 ** void xcb_xkb_shape_next 2304 ** 2305 ** @param xcb_xkb_shape_iterator_t *i 2306 ** @returns void 2307 ** 2308 *****************************************************************************/ 2309 2310 void 2311 xcb_xkb_shape_next (xcb_xkb_shape_iterator_t *i /**< */) 2312 { 2313 xcb_xkb_shape_t *R = i->data; 2314 xcb_generic_iterator_t child; 2315 child.data = (xcb_xkb_shape_t *)(((char *)R) + xcb_xkb_shape_sizeof(R)); 2316 i->index = (char *) child.data - (char *) i->data; 2317 --i->rem; 2318 i->data = (xcb_xkb_shape_t *) child.data; 2319 } 2320 2321 2322 /***************************************************************************** 2323 ** 2324 ** xcb_generic_iterator_t xcb_xkb_shape_end 2325 ** 2326 ** @param xcb_xkb_shape_iterator_t i 2327 ** @returns xcb_generic_iterator_t 2328 ** 2329 *****************************************************************************/ 2330 2331 xcb_generic_iterator_t 2332 xcb_xkb_shape_end (xcb_xkb_shape_iterator_t i /**< */) 2333 { 2334 xcb_generic_iterator_t ret; 2335 while(i.rem > 0) 2336 xcb_xkb_shape_next(&i); 2337 ret.data = i.data; 2338 ret.rem = i.rem; 2339 ret.index = i.index; 2340 return ret; 2341 } 2342 2343 2344 /***************************************************************************** 2345 ** 2346 ** void xcb_xkb_key_next 2347 ** 2348 ** @param xcb_xkb_key_iterator_t *i 2349 ** @returns void 2350 ** 2351 *****************************************************************************/ 2352 2353 void 2354 xcb_xkb_key_next (xcb_xkb_key_iterator_t *i /**< */) 2355 { 2356 --i->rem; 2357 ++i->data; 2358 i->index += sizeof(xcb_xkb_key_t); 2359 } 2360 2361 2362 /***************************************************************************** 2363 ** 2364 ** xcb_generic_iterator_t xcb_xkb_key_end 2365 ** 2366 ** @param xcb_xkb_key_iterator_t i 2367 ** @returns xcb_generic_iterator_t 2368 ** 2369 *****************************************************************************/ 2370 2371 xcb_generic_iterator_t 2372 xcb_xkb_key_end (xcb_xkb_key_iterator_t i /**< */) 2373 { 2374 xcb_generic_iterator_t ret; 2375 ret.data = i.data + i.rem; 2376 ret.index = i.index + ((char *) ret.data - (char *) i.data); 2377 ret.rem = 0; 2378 return ret; 2379 } 2380 2381 2382 /***************************************************************************** 2383 ** 2384 ** void xcb_xkb_overlay_key_next 2385 ** 2386 ** @param xcb_xkb_overlay_key_iterator_t *i 2387 ** @returns void 2388 ** 2389 *****************************************************************************/ 2390 2391 void 2392 xcb_xkb_overlay_key_next (xcb_xkb_overlay_key_iterator_t *i /**< */) 2393 { 2394 --i->rem; 2395 ++i->data; 2396 i->index += sizeof(xcb_xkb_overlay_key_t); 2397 } 2398 2399 2400 /***************************************************************************** 2401 ** 2402 ** xcb_generic_iterator_t xcb_xkb_overlay_key_end 2403 ** 2404 ** @param xcb_xkb_overlay_key_iterator_t i 2405 ** @returns xcb_generic_iterator_t 2406 ** 2407 *****************************************************************************/ 2408 2409 xcb_generic_iterator_t 2410 xcb_xkb_overlay_key_end (xcb_xkb_overlay_key_iterator_t i /**< */) 2411 { 2412 xcb_generic_iterator_t ret; 2413 ret.data = i.data + i.rem; 2414 ret.index = i.index + ((char *) ret.data - (char *) i.data); 2415 ret.rem = 0; 2416 return ret; 2417 } 2418 2419 int 2420 xcb_xkb_overlay_row_sizeof (const void *_buffer /**< */) 2421 { 2422 char *xcb_tmp = (char *)_buffer; 2423 const xcb_xkb_overlay_row_t *_aux = (xcb_xkb_overlay_row_t *)_buffer; 2424 unsigned int xcb_buffer_len = 0; 2425 unsigned int xcb_block_len = 0; 2426 unsigned int xcb_pad = 0; 2427 unsigned int xcb_align_to; 2428 2429 2430 xcb_block_len += sizeof(xcb_xkb_overlay_row_t); 2431 xcb_tmp += xcb_block_len; 2432 /* keys */ 2433 xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_overlay_key_t); 2434 xcb_tmp += xcb_block_len; 2435 xcb_align_to = ALIGNOF(xcb_xkb_overlay_key_t); 2436 /* insert padding */ 2437 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2438 xcb_buffer_len += xcb_block_len + xcb_pad; 2439 if (0 != xcb_pad) { 2440 xcb_tmp += xcb_pad; 2441 xcb_pad = 0; 2442 } 2443 xcb_block_len = 0; 2444 2445 return xcb_buffer_len; 2446 } 2447 2448 2449 /***************************************************************************** 2450 ** 2451 ** xcb_xkb_overlay_key_t * xcb_xkb_overlay_row_keys 2452 ** 2453 ** @param const xcb_xkb_overlay_row_t *R 2454 ** @returns xcb_xkb_overlay_key_t * 2455 ** 2456 *****************************************************************************/ 2457 2458 xcb_xkb_overlay_key_t * 2459 xcb_xkb_overlay_row_keys (const xcb_xkb_overlay_row_t *R /**< */) 2460 { 2461 return (xcb_xkb_overlay_key_t *) (R + 1); 2462 } 2463 2464 2465 /***************************************************************************** 2466 ** 2467 ** int xcb_xkb_overlay_row_keys_length 2468 ** 2469 ** @param const xcb_xkb_overlay_row_t *R 2470 ** @returns int 2471 ** 2472 *****************************************************************************/ 2473 2474 int 2475 xcb_xkb_overlay_row_keys_length (const xcb_xkb_overlay_row_t *R /**< */) 2476 { 2477 return R->nKeys; 2478 } 2479 2480 2481 /***************************************************************************** 2482 ** 2483 ** xcb_xkb_overlay_key_iterator_t xcb_xkb_overlay_row_keys_iterator 2484 ** 2485 ** @param const xcb_xkb_overlay_row_t *R 2486 ** @returns xcb_xkb_overlay_key_iterator_t 2487 ** 2488 *****************************************************************************/ 2489 2490 xcb_xkb_overlay_key_iterator_t 2491 xcb_xkb_overlay_row_keys_iterator (const xcb_xkb_overlay_row_t *R /**< */) 2492 { 2493 xcb_xkb_overlay_key_iterator_t i; 2494 i.data = (xcb_xkb_overlay_key_t *) (R + 1); 2495 i.rem = R->nKeys; 2496 i.index = (char *) i.data - (char *) R; 2497 return i; 2498 } 2499 2500 2501 /***************************************************************************** 2502 ** 2503 ** void xcb_xkb_overlay_row_next 2504 ** 2505 ** @param xcb_xkb_overlay_row_iterator_t *i 2506 ** @returns void 2507 ** 2508 *****************************************************************************/ 2509 2510 void 2511 xcb_xkb_overlay_row_next (xcb_xkb_overlay_row_iterator_t *i /**< */) 2512 { 2513 xcb_xkb_overlay_row_t *R = i->data; 2514 xcb_generic_iterator_t child; 2515 child.data = (xcb_xkb_overlay_row_t *)(((char *)R) + xcb_xkb_overlay_row_sizeof(R)); 2516 i->index = (char *) child.data - (char *) i->data; 2517 --i->rem; 2518 i->data = (xcb_xkb_overlay_row_t *) child.data; 2519 } 2520 2521 2522 /***************************************************************************** 2523 ** 2524 ** xcb_generic_iterator_t xcb_xkb_overlay_row_end 2525 ** 2526 ** @param xcb_xkb_overlay_row_iterator_t i 2527 ** @returns xcb_generic_iterator_t 2528 ** 2529 *****************************************************************************/ 2530 2531 xcb_generic_iterator_t 2532 xcb_xkb_overlay_row_end (xcb_xkb_overlay_row_iterator_t i /**< */) 2533 { 2534 xcb_generic_iterator_t ret; 2535 while(i.rem > 0) 2536 xcb_xkb_overlay_row_next(&i); 2537 ret.data = i.data; 2538 ret.rem = i.rem; 2539 ret.index = i.index; 2540 return ret; 2541 } 2542 2543 int 2544 xcb_xkb_overlay_sizeof (const void *_buffer /**< */) 2545 { 2546 char *xcb_tmp = (char *)_buffer; 2547 const xcb_xkb_overlay_t *_aux = (xcb_xkb_overlay_t *)_buffer; 2548 unsigned int xcb_buffer_len = 0; 2549 unsigned int xcb_block_len = 0; 2550 unsigned int xcb_pad = 0; 2551 unsigned int xcb_align_to; 2552 2553 unsigned int i; 2554 unsigned int xcb_tmp_len; 2555 2556 xcb_block_len += sizeof(xcb_xkb_overlay_t); 2557 xcb_tmp += xcb_block_len; 2558 /* rows */ 2559 for(i=0; i<_aux->nRows; i++) { 2560 xcb_tmp_len = xcb_xkb_overlay_row_sizeof(xcb_tmp); 2561 xcb_block_len += xcb_tmp_len; 2562 xcb_tmp += xcb_tmp_len; 2563 } 2564 xcb_align_to = ALIGNOF(xcb_xkb_overlay_row_t); 2565 /* insert padding */ 2566 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2567 xcb_buffer_len += xcb_block_len + xcb_pad; 2568 if (0 != xcb_pad) { 2569 xcb_tmp += xcb_pad; 2570 xcb_pad = 0; 2571 } 2572 xcb_block_len = 0; 2573 2574 return xcb_buffer_len; 2575 } 2576 2577 2578 /***************************************************************************** 2579 ** 2580 ** int xcb_xkb_overlay_rows_length 2581 ** 2582 ** @param const xcb_xkb_overlay_t *R 2583 ** @returns int 2584 ** 2585 *****************************************************************************/ 2586 2587 int 2588 xcb_xkb_overlay_rows_length (const xcb_xkb_overlay_t *R /**< */) 2589 { 2590 return R->nRows; 2591 } 2592 2593 2594 /***************************************************************************** 2595 ** 2596 ** xcb_xkb_overlay_row_iterator_t xcb_xkb_overlay_rows_iterator 2597 ** 2598 ** @param const xcb_xkb_overlay_t *R 2599 ** @returns xcb_xkb_overlay_row_iterator_t 2600 ** 2601 *****************************************************************************/ 2602 2603 xcb_xkb_overlay_row_iterator_t 2604 xcb_xkb_overlay_rows_iterator (const xcb_xkb_overlay_t *R /**< */) 2605 { 2606 xcb_xkb_overlay_row_iterator_t i; 2607 i.data = (xcb_xkb_overlay_row_t *) (R + 1); 2608 i.rem = R->nRows; 2609 i.index = (char *) i.data - (char *) R; 2610 return i; 2611 } 2612 2613 2614 /***************************************************************************** 2615 ** 2616 ** void xcb_xkb_overlay_next 2617 ** 2618 ** @param xcb_xkb_overlay_iterator_t *i 2619 ** @returns void 2620 ** 2621 *****************************************************************************/ 2622 2623 void 2624 xcb_xkb_overlay_next (xcb_xkb_overlay_iterator_t *i /**< */) 2625 { 2626 xcb_xkb_overlay_t *R = i->data; 2627 xcb_generic_iterator_t child; 2628 child.data = (xcb_xkb_overlay_t *)(((char *)R) + xcb_xkb_overlay_sizeof(R)); 2629 i->index = (char *) child.data - (char *) i->data; 2630 --i->rem; 2631 i->data = (xcb_xkb_overlay_t *) child.data; 2632 } 2633 2634 2635 /***************************************************************************** 2636 ** 2637 ** xcb_generic_iterator_t xcb_xkb_overlay_end 2638 ** 2639 ** @param xcb_xkb_overlay_iterator_t i 2640 ** @returns xcb_generic_iterator_t 2641 ** 2642 *****************************************************************************/ 2643 2644 xcb_generic_iterator_t 2645 xcb_xkb_overlay_end (xcb_xkb_overlay_iterator_t i /**< */) 2646 { 2647 xcb_generic_iterator_t ret; 2648 while(i.rem > 0) 2649 xcb_xkb_overlay_next(&i); 2650 ret.data = i.data; 2651 ret.rem = i.rem; 2652 ret.index = i.index; 2653 return ret; 2654 } 2655 2656 int 2657 xcb_xkb_row_sizeof (const void *_buffer /**< */) 2658 { 2659 char *xcb_tmp = (char *)_buffer; 2660 const xcb_xkb_row_t *_aux = (xcb_xkb_row_t *)_buffer; 2661 unsigned int xcb_buffer_len = 0; 2662 unsigned int xcb_block_len = 0; 2663 unsigned int xcb_pad = 0; 2664 unsigned int xcb_align_to; 2665 2666 2667 xcb_block_len += sizeof(xcb_xkb_row_t); 2668 xcb_tmp += xcb_block_len; 2669 /* keys */ 2670 xcb_block_len += _aux->nKeys * sizeof(xcb_xkb_key_t); 2671 xcb_tmp += xcb_block_len; 2672 xcb_align_to = ALIGNOF(xcb_xkb_key_t); 2673 /* insert padding */ 2674 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2675 xcb_buffer_len += xcb_block_len + xcb_pad; 2676 if (0 != xcb_pad) { 2677 xcb_tmp += xcb_pad; 2678 xcb_pad = 0; 2679 } 2680 xcb_block_len = 0; 2681 2682 return xcb_buffer_len; 2683 } 2684 2685 2686 /***************************************************************************** 2687 ** 2688 ** xcb_xkb_key_t * xcb_xkb_row_keys 2689 ** 2690 ** @param const xcb_xkb_row_t *R 2691 ** @returns xcb_xkb_key_t * 2692 ** 2693 *****************************************************************************/ 2694 2695 xcb_xkb_key_t * 2696 xcb_xkb_row_keys (const xcb_xkb_row_t *R /**< */) 2697 { 2698 return (xcb_xkb_key_t *) (R + 1); 2699 } 2700 2701 2702 /***************************************************************************** 2703 ** 2704 ** int xcb_xkb_row_keys_length 2705 ** 2706 ** @param const xcb_xkb_row_t *R 2707 ** @returns int 2708 ** 2709 *****************************************************************************/ 2710 2711 int 2712 xcb_xkb_row_keys_length (const xcb_xkb_row_t *R /**< */) 2713 { 2714 return R->nKeys; 2715 } 2716 2717 2718 /***************************************************************************** 2719 ** 2720 ** xcb_xkb_key_iterator_t xcb_xkb_row_keys_iterator 2721 ** 2722 ** @param const xcb_xkb_row_t *R 2723 ** @returns xcb_xkb_key_iterator_t 2724 ** 2725 *****************************************************************************/ 2726 2727 xcb_xkb_key_iterator_t 2728 xcb_xkb_row_keys_iterator (const xcb_xkb_row_t *R /**< */) 2729 { 2730 xcb_xkb_key_iterator_t i; 2731 i.data = (xcb_xkb_key_t *) (R + 1); 2732 i.rem = R->nKeys; 2733 i.index = (char *) i.data - (char *) R; 2734 return i; 2735 } 2736 2737 2738 /***************************************************************************** 2739 ** 2740 ** void xcb_xkb_row_next 2741 ** 2742 ** @param xcb_xkb_row_iterator_t *i 2743 ** @returns void 2744 ** 2745 *****************************************************************************/ 2746 2747 void 2748 xcb_xkb_row_next (xcb_xkb_row_iterator_t *i /**< */) 2749 { 2750 xcb_xkb_row_t *R = i->data; 2751 xcb_generic_iterator_t child; 2752 child.data = (xcb_xkb_row_t *)(((char *)R) + xcb_xkb_row_sizeof(R)); 2753 i->index = (char *) child.data - (char *) i->data; 2754 --i->rem; 2755 i->data = (xcb_xkb_row_t *) child.data; 2756 } 2757 2758 2759 /***************************************************************************** 2760 ** 2761 ** xcb_generic_iterator_t xcb_xkb_row_end 2762 ** 2763 ** @param xcb_xkb_row_iterator_t i 2764 ** @returns xcb_generic_iterator_t 2765 ** 2766 *****************************************************************************/ 2767 2768 xcb_generic_iterator_t 2769 xcb_xkb_row_end (xcb_xkb_row_iterator_t i /**< */) 2770 { 2771 xcb_generic_iterator_t ret; 2772 while(i.rem > 0) 2773 xcb_xkb_row_next(&i); 2774 ret.data = i.data; 2775 ret.rem = i.rem; 2776 ret.index = i.index; 2777 return ret; 2778 } 2779 2780 2781 /***************************************************************************** 2782 ** 2783 ** void xcb_xkb_common_doodad_next 2784 ** 2785 ** @param xcb_xkb_common_doodad_iterator_t *i 2786 ** @returns void 2787 ** 2788 *****************************************************************************/ 2789 2790 void 2791 xcb_xkb_common_doodad_next (xcb_xkb_common_doodad_iterator_t *i /**< */) 2792 { 2793 --i->rem; 2794 ++i->data; 2795 i->index += sizeof(xcb_xkb_common_doodad_t); 2796 } 2797 2798 2799 /***************************************************************************** 2800 ** 2801 ** xcb_generic_iterator_t xcb_xkb_common_doodad_end 2802 ** 2803 ** @param xcb_xkb_common_doodad_iterator_t i 2804 ** @returns xcb_generic_iterator_t 2805 ** 2806 *****************************************************************************/ 2807 2808 xcb_generic_iterator_t 2809 xcb_xkb_common_doodad_end (xcb_xkb_common_doodad_iterator_t i /**< */) 2810 { 2811 xcb_generic_iterator_t ret; 2812 ret.data = i.data + i.rem; 2813 ret.index = i.index + ((char *) ret.data - (char *) i.data); 2814 ret.rem = 0; 2815 return ret; 2816 } 2817 2818 2819 /***************************************************************************** 2820 ** 2821 ** void xcb_xkb_shape_doodad_next 2822 ** 2823 ** @param xcb_xkb_shape_doodad_iterator_t *i 2824 ** @returns void 2825 ** 2826 *****************************************************************************/ 2827 2828 void 2829 xcb_xkb_shape_doodad_next (xcb_xkb_shape_doodad_iterator_t *i /**< */) 2830 { 2831 --i->rem; 2832 ++i->data; 2833 i->index += sizeof(xcb_xkb_shape_doodad_t); 2834 } 2835 2836 2837 /***************************************************************************** 2838 ** 2839 ** xcb_generic_iterator_t xcb_xkb_shape_doodad_end 2840 ** 2841 ** @param xcb_xkb_shape_doodad_iterator_t i 2842 ** @returns xcb_generic_iterator_t 2843 ** 2844 *****************************************************************************/ 2845 2846 xcb_generic_iterator_t 2847 xcb_xkb_shape_doodad_end (xcb_xkb_shape_doodad_iterator_t i /**< */) 2848 { 2849 xcb_generic_iterator_t ret; 2850 ret.data = i.data + i.rem; 2851 ret.index = i.index + ((char *) ret.data - (char *) i.data); 2852 ret.rem = 0; 2853 return ret; 2854 } 2855 2856 int 2857 xcb_xkb_text_doodad_sizeof (const void *_buffer /**< */) 2858 { 2859 char *xcb_tmp = (char *)_buffer; 2860 unsigned int xcb_buffer_len = 0; 2861 unsigned int xcb_block_len = 0; 2862 unsigned int xcb_pad = 0; 2863 unsigned int xcb_align_to; 2864 2865 2866 xcb_block_len += sizeof(xcb_xkb_text_doodad_t); 2867 xcb_tmp += xcb_block_len; 2868 /* text */ 2869 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 2870 xcb_tmp += xcb_block_len; 2871 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 2872 /* insert padding */ 2873 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2874 xcb_buffer_len += xcb_block_len + xcb_pad; 2875 if (0 != xcb_pad) { 2876 xcb_tmp += xcb_pad; 2877 xcb_pad = 0; 2878 } 2879 xcb_block_len = 0; 2880 /* font */ 2881 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 2882 xcb_tmp += xcb_block_len; 2883 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 2884 /* insert padding */ 2885 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2886 xcb_buffer_len += xcb_block_len + xcb_pad; 2887 if (0 != xcb_pad) { 2888 xcb_tmp += xcb_pad; 2889 xcb_pad = 0; 2890 } 2891 xcb_block_len = 0; 2892 2893 return xcb_buffer_len; 2894 } 2895 2896 2897 /***************************************************************************** 2898 ** 2899 ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_text 2900 ** 2901 ** @param const xcb_xkb_text_doodad_t *R 2902 ** @returns xcb_xkb_counted_string_16_t * 2903 ** 2904 *****************************************************************************/ 2905 2906 xcb_xkb_counted_string_16_t * 2907 xcb_xkb_text_doodad_text (const xcb_xkb_text_doodad_t *R /**< */) 2908 { 2909 return (xcb_xkb_counted_string_16_t *) (R + 1); 2910 } 2911 2912 2913 /***************************************************************************** 2914 ** 2915 ** xcb_xkb_counted_string_16_t * xcb_xkb_text_doodad_font 2916 ** 2917 ** @param const xcb_xkb_text_doodad_t *R 2918 ** @returns xcb_xkb_counted_string_16_t * 2919 ** 2920 *****************************************************************************/ 2921 2922 xcb_xkb_counted_string_16_t * 2923 xcb_xkb_text_doodad_font (const xcb_xkb_text_doodad_t *R /**< */) 2924 { 2925 xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(xcb_xkb_text_doodad_text(R)); 2926 return (xcb_xkb_counted_string_16_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_counted_string_16_t, prev.index) + 0); 2927 } 2928 2929 2930 /***************************************************************************** 2931 ** 2932 ** void xcb_xkb_text_doodad_next 2933 ** 2934 ** @param xcb_xkb_text_doodad_iterator_t *i 2935 ** @returns void 2936 ** 2937 *****************************************************************************/ 2938 2939 void 2940 xcb_xkb_text_doodad_next (xcb_xkb_text_doodad_iterator_t *i /**< */) 2941 { 2942 xcb_xkb_text_doodad_t *R = i->data; 2943 xcb_generic_iterator_t child; 2944 child.data = (xcb_xkb_text_doodad_t *)(((char *)R) + xcb_xkb_text_doodad_sizeof(R)); 2945 i->index = (char *) child.data - (char *) i->data; 2946 --i->rem; 2947 i->data = (xcb_xkb_text_doodad_t *) child.data; 2948 } 2949 2950 2951 /***************************************************************************** 2952 ** 2953 ** xcb_generic_iterator_t xcb_xkb_text_doodad_end 2954 ** 2955 ** @param xcb_xkb_text_doodad_iterator_t i 2956 ** @returns xcb_generic_iterator_t 2957 ** 2958 *****************************************************************************/ 2959 2960 xcb_generic_iterator_t 2961 xcb_xkb_text_doodad_end (xcb_xkb_text_doodad_iterator_t i /**< */) 2962 { 2963 xcb_generic_iterator_t ret; 2964 while(i.rem > 0) 2965 xcb_xkb_text_doodad_next(&i); 2966 ret.data = i.data; 2967 ret.rem = i.rem; 2968 ret.index = i.index; 2969 return ret; 2970 } 2971 2972 2973 /***************************************************************************** 2974 ** 2975 ** void xcb_xkb_indicator_doodad_next 2976 ** 2977 ** @param xcb_xkb_indicator_doodad_iterator_t *i 2978 ** @returns void 2979 ** 2980 *****************************************************************************/ 2981 2982 void 2983 xcb_xkb_indicator_doodad_next (xcb_xkb_indicator_doodad_iterator_t *i /**< */) 2984 { 2985 --i->rem; 2986 ++i->data; 2987 i->index += sizeof(xcb_xkb_indicator_doodad_t); 2988 } 2989 2990 2991 /***************************************************************************** 2992 ** 2993 ** xcb_generic_iterator_t xcb_xkb_indicator_doodad_end 2994 ** 2995 ** @param xcb_xkb_indicator_doodad_iterator_t i 2996 ** @returns xcb_generic_iterator_t 2997 ** 2998 *****************************************************************************/ 2999 3000 xcb_generic_iterator_t 3001 xcb_xkb_indicator_doodad_end (xcb_xkb_indicator_doodad_iterator_t i /**< */) 3002 { 3003 xcb_generic_iterator_t ret; 3004 ret.data = i.data + i.rem; 3005 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3006 ret.rem = 0; 3007 return ret; 3008 } 3009 3010 int 3011 xcb_xkb_logo_doodad_sizeof (const void *_buffer /**< */) 3012 { 3013 char *xcb_tmp = (char *)_buffer; 3014 unsigned int xcb_buffer_len = 0; 3015 unsigned int xcb_block_len = 0; 3016 unsigned int xcb_pad = 0; 3017 unsigned int xcb_align_to; 3018 3019 3020 xcb_block_len += sizeof(xcb_xkb_logo_doodad_t); 3021 xcb_tmp += xcb_block_len; 3022 /* logoName */ 3023 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 3024 xcb_tmp += xcb_block_len; 3025 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 3026 /* insert padding */ 3027 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3028 xcb_buffer_len += xcb_block_len + xcb_pad; 3029 if (0 != xcb_pad) { 3030 xcb_tmp += xcb_pad; 3031 xcb_pad = 0; 3032 } 3033 xcb_block_len = 0; 3034 3035 return xcb_buffer_len; 3036 } 3037 3038 3039 /***************************************************************************** 3040 ** 3041 ** xcb_xkb_counted_string_16_t * xcb_xkb_logo_doodad_logo_name 3042 ** 3043 ** @param const xcb_xkb_logo_doodad_t *R 3044 ** @returns xcb_xkb_counted_string_16_t * 3045 ** 3046 *****************************************************************************/ 3047 3048 xcb_xkb_counted_string_16_t * 3049 xcb_xkb_logo_doodad_logo_name (const xcb_xkb_logo_doodad_t *R /**< */) 3050 { 3051 return (xcb_xkb_counted_string_16_t *) (R + 1); 3052 } 3053 3054 3055 /***************************************************************************** 3056 ** 3057 ** void xcb_xkb_logo_doodad_next 3058 ** 3059 ** @param xcb_xkb_logo_doodad_iterator_t *i 3060 ** @returns void 3061 ** 3062 *****************************************************************************/ 3063 3064 void 3065 xcb_xkb_logo_doodad_next (xcb_xkb_logo_doodad_iterator_t *i /**< */) 3066 { 3067 xcb_xkb_logo_doodad_t *R = i->data; 3068 xcb_generic_iterator_t child; 3069 child.data = (xcb_xkb_logo_doodad_t *)(((char *)R) + xcb_xkb_logo_doodad_sizeof(R)); 3070 i->index = (char *) child.data - (char *) i->data; 3071 --i->rem; 3072 i->data = (xcb_xkb_logo_doodad_t *) child.data; 3073 } 3074 3075 3076 /***************************************************************************** 3077 ** 3078 ** xcb_generic_iterator_t xcb_xkb_logo_doodad_end 3079 ** 3080 ** @param xcb_xkb_logo_doodad_iterator_t i 3081 ** @returns xcb_generic_iterator_t 3082 ** 3083 *****************************************************************************/ 3084 3085 xcb_generic_iterator_t 3086 xcb_xkb_logo_doodad_end (xcb_xkb_logo_doodad_iterator_t i /**< */) 3087 { 3088 xcb_generic_iterator_t ret; 3089 while(i.rem > 0) 3090 xcb_xkb_logo_doodad_next(&i); 3091 ret.data = i.data; 3092 ret.rem = i.rem; 3093 ret.index = i.index; 3094 return ret; 3095 } 3096 3097 int 3098 xcb_xkb_doodad_sizeof (const void *_buffer /**< */) 3099 { 3100 char *xcb_tmp = (char *)_buffer; 3101 unsigned int xcb_buffer_len = 0; 3102 unsigned int xcb_block_len = 0; 3103 unsigned int xcb_pad = 0; 3104 unsigned int xcb_align_to; 3105 3106 3107 xcb_block_len += sizeof(xcb_xkb_doodad_t); 3108 xcb_tmp += xcb_block_len; 3109 /* text */ 3110 xcb_block_len += xcb_xkb_text_doodad_sizeof(xcb_tmp); 3111 xcb_tmp += xcb_block_len; 3112 xcb_align_to = ALIGNOF(xcb_xkb_text_doodad_t); 3113 /* insert padding */ 3114 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3115 xcb_buffer_len += xcb_block_len + xcb_pad; 3116 if (0 != xcb_pad) { 3117 xcb_tmp += xcb_pad; 3118 xcb_pad = 0; 3119 } 3120 xcb_block_len = 0; 3121 /* logo */ 3122 xcb_block_len += xcb_xkb_logo_doodad_sizeof(xcb_tmp); 3123 xcb_tmp += xcb_block_len; 3124 xcb_align_to = ALIGNOF(xcb_xkb_logo_doodad_t); 3125 /* insert padding */ 3126 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3127 xcb_buffer_len += xcb_block_len + xcb_pad; 3128 if (0 != xcb_pad) { 3129 xcb_tmp += xcb_pad; 3130 xcb_pad = 0; 3131 } 3132 xcb_block_len = 0; 3133 3134 return xcb_buffer_len; 3135 } 3136 3137 3138 /***************************************************************************** 3139 ** 3140 ** void xcb_xkb_doodad_next 3141 ** 3142 ** @param xcb_xkb_doodad_iterator_t *i 3143 ** @returns void 3144 ** 3145 *****************************************************************************/ 3146 3147 void 3148 xcb_xkb_doodad_next (xcb_xkb_doodad_iterator_t *i /**< */) 3149 { 3150 xcb_xkb_doodad_t *R = i->data; 3151 /* FIXME - determine the size of the union xcb_xkb_doodad_t */ 3152 } 3153 3154 3155 /***************************************************************************** 3156 ** 3157 ** xcb_generic_iterator_t xcb_xkb_doodad_end 3158 ** 3159 ** @param xcb_xkb_doodad_iterator_t i 3160 ** @returns xcb_generic_iterator_t 3161 ** 3162 *****************************************************************************/ 3163 3164 xcb_generic_iterator_t 3165 xcb_xkb_doodad_end (xcb_xkb_doodad_iterator_t i /**< */) 3166 { 3167 xcb_generic_iterator_t ret; 3168 while(i.rem > 0) 3169 xcb_xkb_doodad_next(&i); 3170 ret.data = i.data; 3171 ret.rem = i.rem; 3172 ret.index = i.index; 3173 return ret; 3174 } 3175 3176 int 3177 xcb_xkb_section_sizeof (const void *_buffer /**< */) 3178 { 3179 char *xcb_tmp = (char *)_buffer; 3180 const xcb_xkb_section_t *_aux = (xcb_xkb_section_t *)_buffer; 3181 unsigned int xcb_buffer_len = 0; 3182 unsigned int xcb_block_len = 0; 3183 unsigned int xcb_pad = 0; 3184 unsigned int xcb_align_to; 3185 3186 unsigned int i; 3187 unsigned int xcb_tmp_len; 3188 3189 xcb_block_len += sizeof(xcb_xkb_section_t); 3190 xcb_tmp += xcb_block_len; 3191 /* rows */ 3192 for(i=0; i<_aux->nRows; i++) { 3193 xcb_tmp_len = xcb_xkb_row_sizeof(xcb_tmp); 3194 xcb_block_len += xcb_tmp_len; 3195 xcb_tmp += xcb_tmp_len; 3196 } 3197 xcb_align_to = ALIGNOF(xcb_xkb_row_t); 3198 /* insert padding */ 3199 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3200 xcb_buffer_len += xcb_block_len + xcb_pad; 3201 if (0 != xcb_pad) { 3202 xcb_tmp += xcb_pad; 3203 xcb_pad = 0; 3204 } 3205 xcb_block_len = 0; 3206 /* doodads */ 3207 for(i=0; i<_aux->nDoodads; i++) { 3208 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 3209 xcb_block_len += xcb_tmp_len; 3210 xcb_tmp += xcb_tmp_len; 3211 } 3212 xcb_align_to = ALIGNOF(xcb_xkb_doodad_t); 3213 /* insert padding */ 3214 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3215 xcb_buffer_len += xcb_block_len + xcb_pad; 3216 if (0 != xcb_pad) { 3217 xcb_tmp += xcb_pad; 3218 xcb_pad = 0; 3219 } 3220 xcb_block_len = 0; 3221 /* overlays */ 3222 for(i=0; i<_aux->nOverlays; i++) { 3223 xcb_tmp_len = xcb_xkb_overlay_sizeof(xcb_tmp); 3224 xcb_block_len += xcb_tmp_len; 3225 xcb_tmp += xcb_tmp_len; 3226 } 3227 xcb_align_to = ALIGNOF(xcb_xkb_overlay_t); 3228 /* insert padding */ 3229 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3230 xcb_buffer_len += xcb_block_len + xcb_pad; 3231 if (0 != xcb_pad) { 3232 xcb_tmp += xcb_pad; 3233 xcb_pad = 0; 3234 } 3235 xcb_block_len = 0; 3236 3237 return xcb_buffer_len; 3238 } 3239 3240 3241 /***************************************************************************** 3242 ** 3243 ** int xcb_xkb_section_rows_length 3244 ** 3245 ** @param const xcb_xkb_section_t *R 3246 ** @returns int 3247 ** 3248 *****************************************************************************/ 3249 3250 int 3251 xcb_xkb_section_rows_length (const xcb_xkb_section_t *R /**< */) 3252 { 3253 return R->nRows; 3254 } 3255 3256 3257 /***************************************************************************** 3258 ** 3259 ** xcb_xkb_row_iterator_t xcb_xkb_section_rows_iterator 3260 ** 3261 ** @param const xcb_xkb_section_t *R 3262 ** @returns xcb_xkb_row_iterator_t 3263 ** 3264 *****************************************************************************/ 3265 3266 xcb_xkb_row_iterator_t 3267 xcb_xkb_section_rows_iterator (const xcb_xkb_section_t *R /**< */) 3268 { 3269 xcb_xkb_row_iterator_t i; 3270 i.data = (xcb_xkb_row_t *) (R + 1); 3271 i.rem = R->nRows; 3272 i.index = (char *) i.data - (char *) R; 3273 return i; 3274 } 3275 3276 3277 /***************************************************************************** 3278 ** 3279 ** int xcb_xkb_section_doodads_length 3280 ** 3281 ** @param const xcb_xkb_section_t *R 3282 ** @returns int 3283 ** 3284 *****************************************************************************/ 3285 3286 int 3287 xcb_xkb_section_doodads_length (const xcb_xkb_section_t *R /**< */) 3288 { 3289 return R->nDoodads; 3290 } 3291 3292 3293 /***************************************************************************** 3294 ** 3295 ** xcb_xkb_doodad_iterator_t xcb_xkb_section_doodads_iterator 3296 ** 3297 ** @param const xcb_xkb_section_t *R 3298 ** @returns xcb_xkb_doodad_iterator_t 3299 ** 3300 *****************************************************************************/ 3301 3302 xcb_xkb_doodad_iterator_t 3303 xcb_xkb_section_doodads_iterator (const xcb_xkb_section_t *R /**< */) 3304 { 3305 xcb_xkb_doodad_iterator_t i; 3306 xcb_generic_iterator_t prev = xcb_xkb_row_end(xcb_xkb_section_rows_iterator(R)); 3307 i.data = (xcb_xkb_doodad_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_doodad_t, prev.index)); 3308 i.rem = R->nDoodads; 3309 i.index = (char *) i.data - (char *) R; 3310 return i; 3311 } 3312 3313 3314 /***************************************************************************** 3315 ** 3316 ** int xcb_xkb_section_overlays_length 3317 ** 3318 ** @param const xcb_xkb_section_t *R 3319 ** @returns int 3320 ** 3321 *****************************************************************************/ 3322 3323 int 3324 xcb_xkb_section_overlays_length (const xcb_xkb_section_t *R /**< */) 3325 { 3326 return R->nOverlays; 3327 } 3328 3329 3330 /***************************************************************************** 3331 ** 3332 ** xcb_xkb_overlay_iterator_t xcb_xkb_section_overlays_iterator 3333 ** 3334 ** @param const xcb_xkb_section_t *R 3335 ** @returns xcb_xkb_overlay_iterator_t 3336 ** 3337 *****************************************************************************/ 3338 3339 xcb_xkb_overlay_iterator_t 3340 xcb_xkb_section_overlays_iterator (const xcb_xkb_section_t *R /**< */) 3341 { 3342 xcb_xkb_overlay_iterator_t i; 3343 xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_section_doodads_iterator(R)); 3344 i.data = (xcb_xkb_overlay_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_overlay_t, prev.index)); 3345 i.rem = R->nOverlays; 3346 i.index = (char *) i.data - (char *) R; 3347 return i; 3348 } 3349 3350 3351 /***************************************************************************** 3352 ** 3353 ** void xcb_xkb_section_next 3354 ** 3355 ** @param xcb_xkb_section_iterator_t *i 3356 ** @returns void 3357 ** 3358 *****************************************************************************/ 3359 3360 void 3361 xcb_xkb_section_next (xcb_xkb_section_iterator_t *i /**< */) 3362 { 3363 xcb_xkb_section_t *R = i->data; 3364 xcb_generic_iterator_t child; 3365 child.data = (xcb_xkb_section_t *)(((char *)R) + xcb_xkb_section_sizeof(R)); 3366 i->index = (char *) child.data - (char *) i->data; 3367 --i->rem; 3368 i->data = (xcb_xkb_section_t *) child.data; 3369 } 3370 3371 3372 /***************************************************************************** 3373 ** 3374 ** xcb_generic_iterator_t xcb_xkb_section_end 3375 ** 3376 ** @param xcb_xkb_section_iterator_t i 3377 ** @returns xcb_generic_iterator_t 3378 ** 3379 *****************************************************************************/ 3380 3381 xcb_generic_iterator_t 3382 xcb_xkb_section_end (xcb_xkb_section_iterator_t i /**< */) 3383 { 3384 xcb_generic_iterator_t ret; 3385 while(i.rem > 0) 3386 xcb_xkb_section_next(&i); 3387 ret.data = i.data; 3388 ret.rem = i.rem; 3389 ret.index = i.index; 3390 return ret; 3391 } 3392 3393 int 3394 xcb_xkb_listing_sizeof (const void *_buffer /**< */) 3395 { 3396 char *xcb_tmp = (char *)_buffer; 3397 const xcb_xkb_listing_t *_aux = (xcb_xkb_listing_t *)_buffer; 3398 unsigned int xcb_buffer_len = 0; 3399 unsigned int xcb_block_len = 0; 3400 unsigned int xcb_pad = 0; 3401 unsigned int xcb_align_to; 3402 3403 3404 xcb_block_len += sizeof(xcb_xkb_listing_t); 3405 xcb_tmp += xcb_block_len; 3406 /* string */ 3407 xcb_block_len += _aux->length * sizeof(xcb_xkb_string8_t); 3408 xcb_tmp += xcb_block_len; 3409 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 3410 /* insert padding */ 3411 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3412 xcb_buffer_len += xcb_block_len + xcb_pad; 3413 if (0 != xcb_pad) { 3414 xcb_tmp += xcb_pad; 3415 xcb_pad = 0; 3416 } 3417 xcb_block_len = 0; 3418 3419 return xcb_buffer_len; 3420 } 3421 3422 3423 /***************************************************************************** 3424 ** 3425 ** xcb_xkb_string8_t * xcb_xkb_listing_string 3426 ** 3427 ** @param const xcb_xkb_listing_t *R 3428 ** @returns xcb_xkb_string8_t * 3429 ** 3430 *****************************************************************************/ 3431 3432 xcb_xkb_string8_t * 3433 xcb_xkb_listing_string (const xcb_xkb_listing_t *R /**< */) 3434 { 3435 return (xcb_xkb_string8_t *) (R + 1); 3436 } 3437 3438 3439 /***************************************************************************** 3440 ** 3441 ** int xcb_xkb_listing_string_length 3442 ** 3443 ** @param const xcb_xkb_listing_t *R 3444 ** @returns int 3445 ** 3446 *****************************************************************************/ 3447 3448 int 3449 xcb_xkb_listing_string_length (const xcb_xkb_listing_t *R /**< */) 3450 { 3451 return R->length; 3452 } 3453 3454 3455 /***************************************************************************** 3456 ** 3457 ** xcb_generic_iterator_t xcb_xkb_listing_string_end 3458 ** 3459 ** @param const xcb_xkb_listing_t *R 3460 ** @returns xcb_generic_iterator_t 3461 ** 3462 *****************************************************************************/ 3463 3464 xcb_generic_iterator_t 3465 xcb_xkb_listing_string_end (const xcb_xkb_listing_t *R /**< */) 3466 { 3467 xcb_generic_iterator_t i; 3468 i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->length); 3469 i.rem = 0; 3470 i.index = (char *) i.data - (char *) R; 3471 return i; 3472 } 3473 3474 3475 /***************************************************************************** 3476 ** 3477 ** void xcb_xkb_listing_next 3478 ** 3479 ** @param xcb_xkb_listing_iterator_t *i 3480 ** @returns void 3481 ** 3482 *****************************************************************************/ 3483 3484 void 3485 xcb_xkb_listing_next (xcb_xkb_listing_iterator_t *i /**< */) 3486 { 3487 xcb_xkb_listing_t *R = i->data; 3488 xcb_generic_iterator_t child; 3489 child.data = (xcb_xkb_listing_t *)(((char *)R) + xcb_xkb_listing_sizeof(R)); 3490 i->index = (char *) child.data - (char *) i->data; 3491 --i->rem; 3492 i->data = (xcb_xkb_listing_t *) child.data; 3493 } 3494 3495 3496 /***************************************************************************** 3497 ** 3498 ** xcb_generic_iterator_t xcb_xkb_listing_end 3499 ** 3500 ** @param xcb_xkb_listing_iterator_t i 3501 ** @returns xcb_generic_iterator_t 3502 ** 3503 *****************************************************************************/ 3504 3505 xcb_generic_iterator_t 3506 xcb_xkb_listing_end (xcb_xkb_listing_iterator_t i /**< */) 3507 { 3508 xcb_generic_iterator_t ret; 3509 while(i.rem > 0) 3510 xcb_xkb_listing_next(&i); 3511 ret.data = i.data; 3512 ret.rem = i.rem; 3513 ret.index = i.index; 3514 return ret; 3515 } 3516 3517 int 3518 xcb_xkb_device_led_info_sizeof (const void *_buffer /**< */) 3519 { 3520 char *xcb_tmp = (char *)_buffer; 3521 const xcb_xkb_device_led_info_t *_aux = (xcb_xkb_device_led_info_t *)_buffer; 3522 unsigned int xcb_buffer_len = 0; 3523 unsigned int xcb_block_len = 0; 3524 unsigned int xcb_pad = 0; 3525 unsigned int xcb_align_to; 3526 3527 3528 xcb_block_len += sizeof(xcb_xkb_device_led_info_t); 3529 xcb_tmp += xcb_block_len; 3530 /* names */ 3531 xcb_block_len += xcb_popcount(_aux->namesPresent) * sizeof(uint32_t); 3532 xcb_tmp += xcb_block_len; 3533 xcb_align_to = ALIGNOF(xcb_atom_t); 3534 /* insert padding */ 3535 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3536 xcb_buffer_len += xcb_block_len + xcb_pad; 3537 if (0 != xcb_pad) { 3538 xcb_tmp += xcb_pad; 3539 xcb_pad = 0; 3540 } 3541 xcb_block_len = 0; 3542 /* maps */ 3543 xcb_block_len += xcb_popcount(_aux->mapsPresent) * sizeof(xcb_xkb_indicator_map_t); 3544 xcb_tmp += xcb_block_len; 3545 xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t); 3546 /* insert padding */ 3547 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 3548 xcb_buffer_len += xcb_block_len + xcb_pad; 3549 if (0 != xcb_pad) { 3550 xcb_tmp += xcb_pad; 3551 xcb_pad = 0; 3552 } 3553 xcb_block_len = 0; 3554 3555 return xcb_buffer_len; 3556 } 3557 3558 3559 /***************************************************************************** 3560 ** 3561 ** xcb_atom_t * xcb_xkb_device_led_info_names 3562 ** 3563 ** @param const xcb_xkb_device_led_info_t *R 3564 ** @returns xcb_atom_t * 3565 ** 3566 *****************************************************************************/ 3567 3568 xcb_atom_t * 3569 xcb_xkb_device_led_info_names (const xcb_xkb_device_led_info_t *R /**< */) 3570 { 3571 return (xcb_atom_t *) (R + 1); 3572 } 3573 3574 3575 /***************************************************************************** 3576 ** 3577 ** int xcb_xkb_device_led_info_names_length 3578 ** 3579 ** @param const xcb_xkb_device_led_info_t *R 3580 ** @returns int 3581 ** 3582 *****************************************************************************/ 3583 3584 int 3585 xcb_xkb_device_led_info_names_length (const xcb_xkb_device_led_info_t *R /**< */) 3586 { 3587 return xcb_popcount(R->namesPresent); 3588 } 3589 3590 3591 /***************************************************************************** 3592 ** 3593 ** xcb_generic_iterator_t xcb_xkb_device_led_info_names_end 3594 ** 3595 ** @param const xcb_xkb_device_led_info_t *R 3596 ** @returns xcb_generic_iterator_t 3597 ** 3598 *****************************************************************************/ 3599 3600 xcb_generic_iterator_t 3601 xcb_xkb_device_led_info_names_end (const xcb_xkb_device_led_info_t *R /**< */) 3602 { 3603 xcb_generic_iterator_t i; 3604 i.data = ((xcb_atom_t *) (R + 1)) + (xcb_popcount(R->namesPresent)); 3605 i.rem = 0; 3606 i.index = (char *) i.data - (char *) R; 3607 return i; 3608 } 3609 3610 3611 /***************************************************************************** 3612 ** 3613 ** xcb_xkb_indicator_map_t * xcb_xkb_device_led_info_maps 3614 ** 3615 ** @param const xcb_xkb_device_led_info_t *R 3616 ** @returns xcb_xkb_indicator_map_t * 3617 ** 3618 *****************************************************************************/ 3619 3620 xcb_xkb_indicator_map_t * 3621 xcb_xkb_device_led_info_maps (const xcb_xkb_device_led_info_t *R /**< */) 3622 { 3623 xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R); 3624 return (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index) + 0); 3625 } 3626 3627 3628 /***************************************************************************** 3629 ** 3630 ** int xcb_xkb_device_led_info_maps_length 3631 ** 3632 ** @param const xcb_xkb_device_led_info_t *R 3633 ** @returns int 3634 ** 3635 *****************************************************************************/ 3636 3637 int 3638 xcb_xkb_device_led_info_maps_length (const xcb_xkb_device_led_info_t *R /**< */) 3639 { 3640 return xcb_popcount(R->mapsPresent); 3641 } 3642 3643 3644 /***************************************************************************** 3645 ** 3646 ** xcb_xkb_indicator_map_iterator_t xcb_xkb_device_led_info_maps_iterator 3647 ** 3648 ** @param const xcb_xkb_device_led_info_t *R 3649 ** @returns xcb_xkb_indicator_map_iterator_t 3650 ** 3651 *****************************************************************************/ 3652 3653 xcb_xkb_indicator_map_iterator_t 3654 xcb_xkb_device_led_info_maps_iterator (const xcb_xkb_device_led_info_t *R /**< */) 3655 { 3656 xcb_xkb_indicator_map_iterator_t i; 3657 xcb_generic_iterator_t prev = xcb_xkb_device_led_info_names_end(R); 3658 i.data = (xcb_xkb_indicator_map_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_indicator_map_t, prev.index)); 3659 i.rem = xcb_popcount(R->mapsPresent); 3660 i.index = (char *) i.data - (char *) R; 3661 return i; 3662 } 3663 3664 3665 /***************************************************************************** 3666 ** 3667 ** void xcb_xkb_device_led_info_next 3668 ** 3669 ** @param xcb_xkb_device_led_info_iterator_t *i 3670 ** @returns void 3671 ** 3672 *****************************************************************************/ 3673 3674 void 3675 xcb_xkb_device_led_info_next (xcb_xkb_device_led_info_iterator_t *i /**< */) 3676 { 3677 xcb_xkb_device_led_info_t *R = i->data; 3678 xcb_generic_iterator_t child; 3679 child.data = (xcb_xkb_device_led_info_t *)(((char *)R) + xcb_xkb_device_led_info_sizeof(R)); 3680 i->index = (char *) child.data - (char *) i->data; 3681 --i->rem; 3682 i->data = (xcb_xkb_device_led_info_t *) child.data; 3683 } 3684 3685 3686 /***************************************************************************** 3687 ** 3688 ** xcb_generic_iterator_t xcb_xkb_device_led_info_end 3689 ** 3690 ** @param xcb_xkb_device_led_info_iterator_t i 3691 ** @returns xcb_generic_iterator_t 3692 ** 3693 *****************************************************************************/ 3694 3695 xcb_generic_iterator_t 3696 xcb_xkb_device_led_info_end (xcb_xkb_device_led_info_iterator_t i /**< */) 3697 { 3698 xcb_generic_iterator_t ret; 3699 while(i.rem > 0) 3700 xcb_xkb_device_led_info_next(&i); 3701 ret.data = i.data; 3702 ret.rem = i.rem; 3703 ret.index = i.index; 3704 return ret; 3705 } 3706 3707 3708 /***************************************************************************** 3709 ** 3710 ** void xcb_xkb_sa_no_action_next 3711 ** 3712 ** @param xcb_xkb_sa_no_action_iterator_t *i 3713 ** @returns void 3714 ** 3715 *****************************************************************************/ 3716 3717 void 3718 xcb_xkb_sa_no_action_next (xcb_xkb_sa_no_action_iterator_t *i /**< */) 3719 { 3720 --i->rem; 3721 ++i->data; 3722 i->index += sizeof(xcb_xkb_sa_no_action_t); 3723 } 3724 3725 3726 /***************************************************************************** 3727 ** 3728 ** xcb_generic_iterator_t xcb_xkb_sa_no_action_end 3729 ** 3730 ** @param xcb_xkb_sa_no_action_iterator_t i 3731 ** @returns xcb_generic_iterator_t 3732 ** 3733 *****************************************************************************/ 3734 3735 xcb_generic_iterator_t 3736 xcb_xkb_sa_no_action_end (xcb_xkb_sa_no_action_iterator_t i /**< */) 3737 { 3738 xcb_generic_iterator_t ret; 3739 ret.data = i.data + i.rem; 3740 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3741 ret.rem = 0; 3742 return ret; 3743 } 3744 3745 3746 /***************************************************************************** 3747 ** 3748 ** void xcb_xkb_sa_set_mods_next 3749 ** 3750 ** @param xcb_xkb_sa_set_mods_iterator_t *i 3751 ** @returns void 3752 ** 3753 *****************************************************************************/ 3754 3755 void 3756 xcb_xkb_sa_set_mods_next (xcb_xkb_sa_set_mods_iterator_t *i /**< */) 3757 { 3758 --i->rem; 3759 ++i->data; 3760 i->index += sizeof(xcb_xkb_sa_set_mods_t); 3761 } 3762 3763 3764 /***************************************************************************** 3765 ** 3766 ** xcb_generic_iterator_t xcb_xkb_sa_set_mods_end 3767 ** 3768 ** @param xcb_xkb_sa_set_mods_iterator_t i 3769 ** @returns xcb_generic_iterator_t 3770 ** 3771 *****************************************************************************/ 3772 3773 xcb_generic_iterator_t 3774 xcb_xkb_sa_set_mods_end (xcb_xkb_sa_set_mods_iterator_t i /**< */) 3775 { 3776 xcb_generic_iterator_t ret; 3777 ret.data = i.data + i.rem; 3778 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3779 ret.rem = 0; 3780 return ret; 3781 } 3782 3783 3784 /***************************************************************************** 3785 ** 3786 ** void xcb_xkb_sa_latch_mods_next 3787 ** 3788 ** @param xcb_xkb_sa_latch_mods_iterator_t *i 3789 ** @returns void 3790 ** 3791 *****************************************************************************/ 3792 3793 void 3794 xcb_xkb_sa_latch_mods_next (xcb_xkb_sa_latch_mods_iterator_t *i /**< */) 3795 { 3796 --i->rem; 3797 ++i->data; 3798 i->index += sizeof(xcb_xkb_sa_latch_mods_t); 3799 } 3800 3801 3802 /***************************************************************************** 3803 ** 3804 ** xcb_generic_iterator_t xcb_xkb_sa_latch_mods_end 3805 ** 3806 ** @param xcb_xkb_sa_latch_mods_iterator_t i 3807 ** @returns xcb_generic_iterator_t 3808 ** 3809 *****************************************************************************/ 3810 3811 xcb_generic_iterator_t 3812 xcb_xkb_sa_latch_mods_end (xcb_xkb_sa_latch_mods_iterator_t i /**< */) 3813 { 3814 xcb_generic_iterator_t ret; 3815 ret.data = i.data + i.rem; 3816 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3817 ret.rem = 0; 3818 return ret; 3819 } 3820 3821 3822 /***************************************************************************** 3823 ** 3824 ** void xcb_xkb_sa_lock_mods_next 3825 ** 3826 ** @param xcb_xkb_sa_lock_mods_iterator_t *i 3827 ** @returns void 3828 ** 3829 *****************************************************************************/ 3830 3831 void 3832 xcb_xkb_sa_lock_mods_next (xcb_xkb_sa_lock_mods_iterator_t *i /**< */) 3833 { 3834 --i->rem; 3835 ++i->data; 3836 i->index += sizeof(xcb_xkb_sa_lock_mods_t); 3837 } 3838 3839 3840 /***************************************************************************** 3841 ** 3842 ** xcb_generic_iterator_t xcb_xkb_sa_lock_mods_end 3843 ** 3844 ** @param xcb_xkb_sa_lock_mods_iterator_t i 3845 ** @returns xcb_generic_iterator_t 3846 ** 3847 *****************************************************************************/ 3848 3849 xcb_generic_iterator_t 3850 xcb_xkb_sa_lock_mods_end (xcb_xkb_sa_lock_mods_iterator_t i /**< */) 3851 { 3852 xcb_generic_iterator_t ret; 3853 ret.data = i.data + i.rem; 3854 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3855 ret.rem = 0; 3856 return ret; 3857 } 3858 3859 3860 /***************************************************************************** 3861 ** 3862 ** void xcb_xkb_sa_set_group_next 3863 ** 3864 ** @param xcb_xkb_sa_set_group_iterator_t *i 3865 ** @returns void 3866 ** 3867 *****************************************************************************/ 3868 3869 void 3870 xcb_xkb_sa_set_group_next (xcb_xkb_sa_set_group_iterator_t *i /**< */) 3871 { 3872 --i->rem; 3873 ++i->data; 3874 i->index += sizeof(xcb_xkb_sa_set_group_t); 3875 } 3876 3877 3878 /***************************************************************************** 3879 ** 3880 ** xcb_generic_iterator_t xcb_xkb_sa_set_group_end 3881 ** 3882 ** @param xcb_xkb_sa_set_group_iterator_t i 3883 ** @returns xcb_generic_iterator_t 3884 ** 3885 *****************************************************************************/ 3886 3887 xcb_generic_iterator_t 3888 xcb_xkb_sa_set_group_end (xcb_xkb_sa_set_group_iterator_t i /**< */) 3889 { 3890 xcb_generic_iterator_t ret; 3891 ret.data = i.data + i.rem; 3892 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3893 ret.rem = 0; 3894 return ret; 3895 } 3896 3897 3898 /***************************************************************************** 3899 ** 3900 ** void xcb_xkb_sa_latch_group_next 3901 ** 3902 ** @param xcb_xkb_sa_latch_group_iterator_t *i 3903 ** @returns void 3904 ** 3905 *****************************************************************************/ 3906 3907 void 3908 xcb_xkb_sa_latch_group_next (xcb_xkb_sa_latch_group_iterator_t *i /**< */) 3909 { 3910 --i->rem; 3911 ++i->data; 3912 i->index += sizeof(xcb_xkb_sa_latch_group_t); 3913 } 3914 3915 3916 /***************************************************************************** 3917 ** 3918 ** xcb_generic_iterator_t xcb_xkb_sa_latch_group_end 3919 ** 3920 ** @param xcb_xkb_sa_latch_group_iterator_t i 3921 ** @returns xcb_generic_iterator_t 3922 ** 3923 *****************************************************************************/ 3924 3925 xcb_generic_iterator_t 3926 xcb_xkb_sa_latch_group_end (xcb_xkb_sa_latch_group_iterator_t i /**< */) 3927 { 3928 xcb_generic_iterator_t ret; 3929 ret.data = i.data + i.rem; 3930 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3931 ret.rem = 0; 3932 return ret; 3933 } 3934 3935 3936 /***************************************************************************** 3937 ** 3938 ** void xcb_xkb_sa_lock_group_next 3939 ** 3940 ** @param xcb_xkb_sa_lock_group_iterator_t *i 3941 ** @returns void 3942 ** 3943 *****************************************************************************/ 3944 3945 void 3946 xcb_xkb_sa_lock_group_next (xcb_xkb_sa_lock_group_iterator_t *i /**< */) 3947 { 3948 --i->rem; 3949 ++i->data; 3950 i->index += sizeof(xcb_xkb_sa_lock_group_t); 3951 } 3952 3953 3954 /***************************************************************************** 3955 ** 3956 ** xcb_generic_iterator_t xcb_xkb_sa_lock_group_end 3957 ** 3958 ** @param xcb_xkb_sa_lock_group_iterator_t i 3959 ** @returns xcb_generic_iterator_t 3960 ** 3961 *****************************************************************************/ 3962 3963 xcb_generic_iterator_t 3964 xcb_xkb_sa_lock_group_end (xcb_xkb_sa_lock_group_iterator_t i /**< */) 3965 { 3966 xcb_generic_iterator_t ret; 3967 ret.data = i.data + i.rem; 3968 ret.index = i.index + ((char *) ret.data - (char *) i.data); 3969 ret.rem = 0; 3970 return ret; 3971 } 3972 3973 3974 /***************************************************************************** 3975 ** 3976 ** void xcb_xkb_sa_move_ptr_next 3977 ** 3978 ** @param xcb_xkb_sa_move_ptr_iterator_t *i 3979 ** @returns void 3980 ** 3981 *****************************************************************************/ 3982 3983 void 3984 xcb_xkb_sa_move_ptr_next (xcb_xkb_sa_move_ptr_iterator_t *i /**< */) 3985 { 3986 --i->rem; 3987 ++i->data; 3988 i->index += sizeof(xcb_xkb_sa_move_ptr_t); 3989 } 3990 3991 3992 /***************************************************************************** 3993 ** 3994 ** xcb_generic_iterator_t xcb_xkb_sa_move_ptr_end 3995 ** 3996 ** @param xcb_xkb_sa_move_ptr_iterator_t i 3997 ** @returns xcb_generic_iterator_t 3998 ** 3999 *****************************************************************************/ 4000 4001 xcb_generic_iterator_t 4002 xcb_xkb_sa_move_ptr_end (xcb_xkb_sa_move_ptr_iterator_t i /**< */) 4003 { 4004 xcb_generic_iterator_t ret; 4005 ret.data = i.data + i.rem; 4006 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4007 ret.rem = 0; 4008 return ret; 4009 } 4010 4011 4012 /***************************************************************************** 4013 ** 4014 ** void xcb_xkb_sa_ptr_btn_next 4015 ** 4016 ** @param xcb_xkb_sa_ptr_btn_iterator_t *i 4017 ** @returns void 4018 ** 4019 *****************************************************************************/ 4020 4021 void 4022 xcb_xkb_sa_ptr_btn_next (xcb_xkb_sa_ptr_btn_iterator_t *i /**< */) 4023 { 4024 --i->rem; 4025 ++i->data; 4026 i->index += sizeof(xcb_xkb_sa_ptr_btn_t); 4027 } 4028 4029 4030 /***************************************************************************** 4031 ** 4032 ** xcb_generic_iterator_t xcb_xkb_sa_ptr_btn_end 4033 ** 4034 ** @param xcb_xkb_sa_ptr_btn_iterator_t i 4035 ** @returns xcb_generic_iterator_t 4036 ** 4037 *****************************************************************************/ 4038 4039 xcb_generic_iterator_t 4040 xcb_xkb_sa_ptr_btn_end (xcb_xkb_sa_ptr_btn_iterator_t i /**< */) 4041 { 4042 xcb_generic_iterator_t ret; 4043 ret.data = i.data + i.rem; 4044 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4045 ret.rem = 0; 4046 return ret; 4047 } 4048 4049 4050 /***************************************************************************** 4051 ** 4052 ** void xcb_xkb_sa_lock_ptr_btn_next 4053 ** 4054 ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t *i 4055 ** @returns void 4056 ** 4057 *****************************************************************************/ 4058 4059 void 4060 xcb_xkb_sa_lock_ptr_btn_next (xcb_xkb_sa_lock_ptr_btn_iterator_t *i /**< */) 4061 { 4062 --i->rem; 4063 ++i->data; 4064 i->index += sizeof(xcb_xkb_sa_lock_ptr_btn_t); 4065 } 4066 4067 4068 /***************************************************************************** 4069 ** 4070 ** xcb_generic_iterator_t xcb_xkb_sa_lock_ptr_btn_end 4071 ** 4072 ** @param xcb_xkb_sa_lock_ptr_btn_iterator_t i 4073 ** @returns xcb_generic_iterator_t 4074 ** 4075 *****************************************************************************/ 4076 4077 xcb_generic_iterator_t 4078 xcb_xkb_sa_lock_ptr_btn_end (xcb_xkb_sa_lock_ptr_btn_iterator_t i /**< */) 4079 { 4080 xcb_generic_iterator_t ret; 4081 ret.data = i.data + i.rem; 4082 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4083 ret.rem = 0; 4084 return ret; 4085 } 4086 4087 4088 /***************************************************************************** 4089 ** 4090 ** void xcb_xkb_sa_set_ptr_dflt_next 4091 ** 4092 ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t *i 4093 ** @returns void 4094 ** 4095 *****************************************************************************/ 4096 4097 void 4098 xcb_xkb_sa_set_ptr_dflt_next (xcb_xkb_sa_set_ptr_dflt_iterator_t *i /**< */) 4099 { 4100 --i->rem; 4101 ++i->data; 4102 i->index += sizeof(xcb_xkb_sa_set_ptr_dflt_t); 4103 } 4104 4105 4106 /***************************************************************************** 4107 ** 4108 ** xcb_generic_iterator_t xcb_xkb_sa_set_ptr_dflt_end 4109 ** 4110 ** @param xcb_xkb_sa_set_ptr_dflt_iterator_t i 4111 ** @returns xcb_generic_iterator_t 4112 ** 4113 *****************************************************************************/ 4114 4115 xcb_generic_iterator_t 4116 xcb_xkb_sa_set_ptr_dflt_end (xcb_xkb_sa_set_ptr_dflt_iterator_t i /**< */) 4117 { 4118 xcb_generic_iterator_t ret; 4119 ret.data = i.data + i.rem; 4120 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4121 ret.rem = 0; 4122 return ret; 4123 } 4124 4125 4126 /***************************************************************************** 4127 ** 4128 ** void xcb_xkb_sa_iso_lock_next 4129 ** 4130 ** @param xcb_xkb_sa_iso_lock_iterator_t *i 4131 ** @returns void 4132 ** 4133 *****************************************************************************/ 4134 4135 void 4136 xcb_xkb_sa_iso_lock_next (xcb_xkb_sa_iso_lock_iterator_t *i /**< */) 4137 { 4138 --i->rem; 4139 ++i->data; 4140 i->index += sizeof(xcb_xkb_sa_iso_lock_t); 4141 } 4142 4143 4144 /***************************************************************************** 4145 ** 4146 ** xcb_generic_iterator_t xcb_xkb_sa_iso_lock_end 4147 ** 4148 ** @param xcb_xkb_sa_iso_lock_iterator_t i 4149 ** @returns xcb_generic_iterator_t 4150 ** 4151 *****************************************************************************/ 4152 4153 xcb_generic_iterator_t 4154 xcb_xkb_sa_iso_lock_end (xcb_xkb_sa_iso_lock_iterator_t i /**< */) 4155 { 4156 xcb_generic_iterator_t ret; 4157 ret.data = i.data + i.rem; 4158 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4159 ret.rem = 0; 4160 return ret; 4161 } 4162 4163 4164 /***************************************************************************** 4165 ** 4166 ** void xcb_xkb_sa_terminate_next 4167 ** 4168 ** @param xcb_xkb_sa_terminate_iterator_t *i 4169 ** @returns void 4170 ** 4171 *****************************************************************************/ 4172 4173 void 4174 xcb_xkb_sa_terminate_next (xcb_xkb_sa_terminate_iterator_t *i /**< */) 4175 { 4176 --i->rem; 4177 ++i->data; 4178 i->index += sizeof(xcb_xkb_sa_terminate_t); 4179 } 4180 4181 4182 /***************************************************************************** 4183 ** 4184 ** xcb_generic_iterator_t xcb_xkb_sa_terminate_end 4185 ** 4186 ** @param xcb_xkb_sa_terminate_iterator_t i 4187 ** @returns xcb_generic_iterator_t 4188 ** 4189 *****************************************************************************/ 4190 4191 xcb_generic_iterator_t 4192 xcb_xkb_sa_terminate_end (xcb_xkb_sa_terminate_iterator_t i /**< */) 4193 { 4194 xcb_generic_iterator_t ret; 4195 ret.data = i.data + i.rem; 4196 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4197 ret.rem = 0; 4198 return ret; 4199 } 4200 4201 4202 /***************************************************************************** 4203 ** 4204 ** void xcb_xkb_sa_switch_screen_next 4205 ** 4206 ** @param xcb_xkb_sa_switch_screen_iterator_t *i 4207 ** @returns void 4208 ** 4209 *****************************************************************************/ 4210 4211 void 4212 xcb_xkb_sa_switch_screen_next (xcb_xkb_sa_switch_screen_iterator_t *i /**< */) 4213 { 4214 --i->rem; 4215 ++i->data; 4216 i->index += sizeof(xcb_xkb_sa_switch_screen_t); 4217 } 4218 4219 4220 /***************************************************************************** 4221 ** 4222 ** xcb_generic_iterator_t xcb_xkb_sa_switch_screen_end 4223 ** 4224 ** @param xcb_xkb_sa_switch_screen_iterator_t i 4225 ** @returns xcb_generic_iterator_t 4226 ** 4227 *****************************************************************************/ 4228 4229 xcb_generic_iterator_t 4230 xcb_xkb_sa_switch_screen_end (xcb_xkb_sa_switch_screen_iterator_t i /**< */) 4231 { 4232 xcb_generic_iterator_t ret; 4233 ret.data = i.data + i.rem; 4234 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4235 ret.rem = 0; 4236 return ret; 4237 } 4238 4239 4240 /***************************************************************************** 4241 ** 4242 ** void xcb_xkb_sa_set_controls_next 4243 ** 4244 ** @param xcb_xkb_sa_set_controls_iterator_t *i 4245 ** @returns void 4246 ** 4247 *****************************************************************************/ 4248 4249 void 4250 xcb_xkb_sa_set_controls_next (xcb_xkb_sa_set_controls_iterator_t *i /**< */) 4251 { 4252 --i->rem; 4253 ++i->data; 4254 i->index += sizeof(xcb_xkb_sa_set_controls_t); 4255 } 4256 4257 4258 /***************************************************************************** 4259 ** 4260 ** xcb_generic_iterator_t xcb_xkb_sa_set_controls_end 4261 ** 4262 ** @param xcb_xkb_sa_set_controls_iterator_t i 4263 ** @returns xcb_generic_iterator_t 4264 ** 4265 *****************************************************************************/ 4266 4267 xcb_generic_iterator_t 4268 xcb_xkb_sa_set_controls_end (xcb_xkb_sa_set_controls_iterator_t i /**< */) 4269 { 4270 xcb_generic_iterator_t ret; 4271 ret.data = i.data + i.rem; 4272 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4273 ret.rem = 0; 4274 return ret; 4275 } 4276 4277 4278 /***************************************************************************** 4279 ** 4280 ** void xcb_xkb_sa_lock_controls_next 4281 ** 4282 ** @param xcb_xkb_sa_lock_controls_iterator_t *i 4283 ** @returns void 4284 ** 4285 *****************************************************************************/ 4286 4287 void 4288 xcb_xkb_sa_lock_controls_next (xcb_xkb_sa_lock_controls_iterator_t *i /**< */) 4289 { 4290 --i->rem; 4291 ++i->data; 4292 i->index += sizeof(xcb_xkb_sa_lock_controls_t); 4293 } 4294 4295 4296 /***************************************************************************** 4297 ** 4298 ** xcb_generic_iterator_t xcb_xkb_sa_lock_controls_end 4299 ** 4300 ** @param xcb_xkb_sa_lock_controls_iterator_t i 4301 ** @returns xcb_generic_iterator_t 4302 ** 4303 *****************************************************************************/ 4304 4305 xcb_generic_iterator_t 4306 xcb_xkb_sa_lock_controls_end (xcb_xkb_sa_lock_controls_iterator_t i /**< */) 4307 { 4308 xcb_generic_iterator_t ret; 4309 ret.data = i.data + i.rem; 4310 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4311 ret.rem = 0; 4312 return ret; 4313 } 4314 4315 4316 /***************************************************************************** 4317 ** 4318 ** void xcb_xkb_sa_action_message_next 4319 ** 4320 ** @param xcb_xkb_sa_action_message_iterator_t *i 4321 ** @returns void 4322 ** 4323 *****************************************************************************/ 4324 4325 void 4326 xcb_xkb_sa_action_message_next (xcb_xkb_sa_action_message_iterator_t *i /**< */) 4327 { 4328 --i->rem; 4329 ++i->data; 4330 i->index += sizeof(xcb_xkb_sa_action_message_t); 4331 } 4332 4333 4334 /***************************************************************************** 4335 ** 4336 ** xcb_generic_iterator_t xcb_xkb_sa_action_message_end 4337 ** 4338 ** @param xcb_xkb_sa_action_message_iterator_t i 4339 ** @returns xcb_generic_iterator_t 4340 ** 4341 *****************************************************************************/ 4342 4343 xcb_generic_iterator_t 4344 xcb_xkb_sa_action_message_end (xcb_xkb_sa_action_message_iterator_t i /**< */) 4345 { 4346 xcb_generic_iterator_t ret; 4347 ret.data = i.data + i.rem; 4348 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4349 ret.rem = 0; 4350 return ret; 4351 } 4352 4353 4354 /***************************************************************************** 4355 ** 4356 ** void xcb_xkb_sa_redirect_key_next 4357 ** 4358 ** @param xcb_xkb_sa_redirect_key_iterator_t *i 4359 ** @returns void 4360 ** 4361 *****************************************************************************/ 4362 4363 void 4364 xcb_xkb_sa_redirect_key_next (xcb_xkb_sa_redirect_key_iterator_t *i /**< */) 4365 { 4366 --i->rem; 4367 ++i->data; 4368 i->index += sizeof(xcb_xkb_sa_redirect_key_t); 4369 } 4370 4371 4372 /***************************************************************************** 4373 ** 4374 ** xcb_generic_iterator_t xcb_xkb_sa_redirect_key_end 4375 ** 4376 ** @param xcb_xkb_sa_redirect_key_iterator_t i 4377 ** @returns xcb_generic_iterator_t 4378 ** 4379 *****************************************************************************/ 4380 4381 xcb_generic_iterator_t 4382 xcb_xkb_sa_redirect_key_end (xcb_xkb_sa_redirect_key_iterator_t i /**< */) 4383 { 4384 xcb_generic_iterator_t ret; 4385 ret.data = i.data + i.rem; 4386 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4387 ret.rem = 0; 4388 return ret; 4389 } 4390 4391 4392 /***************************************************************************** 4393 ** 4394 ** void xcb_xkb_sa_device_btn_next 4395 ** 4396 ** @param xcb_xkb_sa_device_btn_iterator_t *i 4397 ** @returns void 4398 ** 4399 *****************************************************************************/ 4400 4401 void 4402 xcb_xkb_sa_device_btn_next (xcb_xkb_sa_device_btn_iterator_t *i /**< */) 4403 { 4404 --i->rem; 4405 ++i->data; 4406 i->index += sizeof(xcb_xkb_sa_device_btn_t); 4407 } 4408 4409 4410 /***************************************************************************** 4411 ** 4412 ** xcb_generic_iterator_t xcb_xkb_sa_device_btn_end 4413 ** 4414 ** @param xcb_xkb_sa_device_btn_iterator_t i 4415 ** @returns xcb_generic_iterator_t 4416 ** 4417 *****************************************************************************/ 4418 4419 xcb_generic_iterator_t 4420 xcb_xkb_sa_device_btn_end (xcb_xkb_sa_device_btn_iterator_t i /**< */) 4421 { 4422 xcb_generic_iterator_t ret; 4423 ret.data = i.data + i.rem; 4424 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4425 ret.rem = 0; 4426 return ret; 4427 } 4428 4429 4430 /***************************************************************************** 4431 ** 4432 ** void xcb_xkb_sa_lock_device_btn_next 4433 ** 4434 ** @param xcb_xkb_sa_lock_device_btn_iterator_t *i 4435 ** @returns void 4436 ** 4437 *****************************************************************************/ 4438 4439 void 4440 xcb_xkb_sa_lock_device_btn_next (xcb_xkb_sa_lock_device_btn_iterator_t *i /**< */) 4441 { 4442 --i->rem; 4443 ++i->data; 4444 i->index += sizeof(xcb_xkb_sa_lock_device_btn_t); 4445 } 4446 4447 4448 /***************************************************************************** 4449 ** 4450 ** xcb_generic_iterator_t xcb_xkb_sa_lock_device_btn_end 4451 ** 4452 ** @param xcb_xkb_sa_lock_device_btn_iterator_t i 4453 ** @returns xcb_generic_iterator_t 4454 ** 4455 *****************************************************************************/ 4456 4457 xcb_generic_iterator_t 4458 xcb_xkb_sa_lock_device_btn_end (xcb_xkb_sa_lock_device_btn_iterator_t i /**< */) 4459 { 4460 xcb_generic_iterator_t ret; 4461 ret.data = i.data + i.rem; 4462 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4463 ret.rem = 0; 4464 return ret; 4465 } 4466 4467 4468 /***************************************************************************** 4469 ** 4470 ** void xcb_xkb_sa_device_valuator_next 4471 ** 4472 ** @param xcb_xkb_sa_device_valuator_iterator_t *i 4473 ** @returns void 4474 ** 4475 *****************************************************************************/ 4476 4477 void 4478 xcb_xkb_sa_device_valuator_next (xcb_xkb_sa_device_valuator_iterator_t *i /**< */) 4479 { 4480 --i->rem; 4481 ++i->data; 4482 i->index += sizeof(xcb_xkb_sa_device_valuator_t); 4483 } 4484 4485 4486 /***************************************************************************** 4487 ** 4488 ** xcb_generic_iterator_t xcb_xkb_sa_device_valuator_end 4489 ** 4490 ** @param xcb_xkb_sa_device_valuator_iterator_t i 4491 ** @returns xcb_generic_iterator_t 4492 ** 4493 *****************************************************************************/ 4494 4495 xcb_generic_iterator_t 4496 xcb_xkb_sa_device_valuator_end (xcb_xkb_sa_device_valuator_iterator_t i /**< */) 4497 { 4498 xcb_generic_iterator_t ret; 4499 ret.data = i.data + i.rem; 4500 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4501 ret.rem = 0; 4502 return ret; 4503 } 4504 4505 4506 /***************************************************************************** 4507 ** 4508 ** void xcb_xkb_action_next 4509 ** 4510 ** @param xcb_xkb_action_iterator_t *i 4511 ** @returns void 4512 ** 4513 *****************************************************************************/ 4514 4515 void 4516 xcb_xkb_action_next (xcb_xkb_action_iterator_t *i /**< */) 4517 { 4518 --i->rem; 4519 ++i->data; 4520 i->index += sizeof(xcb_xkb_action_t); 4521 } 4522 4523 4524 /***************************************************************************** 4525 ** 4526 ** xcb_generic_iterator_t xcb_xkb_action_end 4527 ** 4528 ** @param xcb_xkb_action_iterator_t i 4529 ** @returns xcb_generic_iterator_t 4530 ** 4531 *****************************************************************************/ 4532 4533 xcb_generic_iterator_t 4534 xcb_xkb_action_end (xcb_xkb_action_iterator_t i /**< */) 4535 { 4536 xcb_generic_iterator_t ret; 4537 ret.data = i.data + i.rem; 4538 ret.index = i.index + ((char *) ret.data - (char *) i.data); 4539 ret.rem = 0; 4540 return ret; 4541 } 4542 4543 4544 /***************************************************************************** 4545 ** 4546 ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension 4547 ** 4548 ** @param xcb_connection_t *c 4549 ** @param uint16_t wantedMajor 4550 ** @param uint16_t wantedMinor 4551 ** @returns xcb_xkb_use_extension_cookie_t 4552 ** 4553 *****************************************************************************/ 4554 4555 xcb_xkb_use_extension_cookie_t 4556 xcb_xkb_use_extension (xcb_connection_t *c /**< */, 4557 uint16_t wantedMajor /**< */, 4558 uint16_t wantedMinor /**< */) 4559 { 4560 static const xcb_protocol_request_t xcb_req = { 4561 /* count */ 2, 4562 /* ext */ &xcb_xkb_id, 4563 /* opcode */ XCB_XKB_USE_EXTENSION, 4564 /* isvoid */ 0 4565 }; 4566 4567 struct iovec xcb_parts[4]; 4568 xcb_xkb_use_extension_cookie_t xcb_ret; 4569 xcb_xkb_use_extension_request_t xcb_out; 4570 4571 xcb_out.wantedMajor = wantedMajor; 4572 xcb_out.wantedMinor = wantedMinor; 4573 4574 xcb_parts[2].iov_base = (char *) &xcb_out; 4575 xcb_parts[2].iov_len = sizeof(xcb_out); 4576 xcb_parts[3].iov_base = 0; 4577 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4578 4579 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 4580 return xcb_ret; 4581 } 4582 4583 4584 /***************************************************************************** 4585 ** 4586 ** xcb_xkb_use_extension_cookie_t xcb_xkb_use_extension_unchecked 4587 ** 4588 ** @param xcb_connection_t *c 4589 ** @param uint16_t wantedMajor 4590 ** @param uint16_t wantedMinor 4591 ** @returns xcb_xkb_use_extension_cookie_t 4592 ** 4593 *****************************************************************************/ 4594 4595 xcb_xkb_use_extension_cookie_t 4596 xcb_xkb_use_extension_unchecked (xcb_connection_t *c /**< */, 4597 uint16_t wantedMajor /**< */, 4598 uint16_t wantedMinor /**< */) 4599 { 4600 static const xcb_protocol_request_t xcb_req = { 4601 /* count */ 2, 4602 /* ext */ &xcb_xkb_id, 4603 /* opcode */ XCB_XKB_USE_EXTENSION, 4604 /* isvoid */ 0 4605 }; 4606 4607 struct iovec xcb_parts[4]; 4608 xcb_xkb_use_extension_cookie_t xcb_ret; 4609 xcb_xkb_use_extension_request_t xcb_out; 4610 4611 xcb_out.wantedMajor = wantedMajor; 4612 xcb_out.wantedMinor = wantedMinor; 4613 4614 xcb_parts[2].iov_base = (char *) &xcb_out; 4615 xcb_parts[2].iov_len = sizeof(xcb_out); 4616 xcb_parts[3].iov_base = 0; 4617 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 4618 4619 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 4620 return xcb_ret; 4621 } 4622 4623 4624 /***************************************************************************** 4625 ** 4626 ** xcb_xkb_use_extension_reply_t * xcb_xkb_use_extension_reply 4627 ** 4628 ** @param xcb_connection_t *c 4629 ** @param xcb_xkb_use_extension_cookie_t cookie 4630 ** @param xcb_generic_error_t **e 4631 ** @returns xcb_xkb_use_extension_reply_t * 4632 ** 4633 *****************************************************************************/ 4634 4635 xcb_xkb_use_extension_reply_t * 4636 xcb_xkb_use_extension_reply (xcb_connection_t *c /**< */, 4637 xcb_xkb_use_extension_cookie_t cookie /**< */, 4638 xcb_generic_error_t **e /**< */) 4639 { 4640 return (xcb_xkb_use_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 4641 } 4642 4643 int 4644 xcb_xkb_select_events_details_serialize (void **_buffer /**< */, 4645 uint16_t affectWhich /**< */, 4646 uint16_t clear /**< */, 4647 uint16_t selectAll /**< */, 4648 const xcb_xkb_select_events_details_t *_aux /**< */) 4649 { 4650 char *xcb_out = *_buffer; 4651 unsigned int xcb_buffer_len = 0; 4652 unsigned int xcb_align_to; 4653 4654 unsigned int xcb_pad = 0; 4655 char xcb_pad0[3] = {0, 0, 0}; 4656 struct iovec xcb_parts[23]; 4657 unsigned int xcb_parts_idx = 0; 4658 unsigned int xcb_block_len = 0; 4659 unsigned int i; 4660 char *xcb_tmp; 4661 4662 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) { 4663 /* xcb_xkb_select_events_details_t.affectNewKeyboard */ 4664 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNewKeyboard; 4665 xcb_block_len += sizeof(uint16_t); 4666 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4667 xcb_parts_idx++; 4668 xcb_align_to = ALIGNOF(uint16_t); 4669 /* xcb_xkb_select_events_details_t.newKeyboardDetails */ 4670 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->newKeyboardDetails; 4671 xcb_block_len += sizeof(uint16_t); 4672 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4673 xcb_parts_idx++; 4674 xcb_align_to = ALIGNOF(uint16_t); 4675 } 4676 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) { 4677 /* xcb_xkb_select_events_details_t.affectState */ 4678 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectState; 4679 xcb_block_len += sizeof(uint16_t); 4680 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4681 xcb_parts_idx++; 4682 xcb_align_to = ALIGNOF(uint16_t); 4683 /* xcb_xkb_select_events_details_t.stateDetails */ 4684 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->stateDetails; 4685 xcb_block_len += sizeof(uint16_t); 4686 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4687 xcb_parts_idx++; 4688 xcb_align_to = ALIGNOF(uint16_t); 4689 } 4690 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) { 4691 /* xcb_xkb_select_events_details_t.affectCtrls */ 4692 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCtrls; 4693 xcb_block_len += sizeof(uint32_t); 4694 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4695 xcb_parts_idx++; 4696 xcb_align_to = ALIGNOF(uint32_t); 4697 /* xcb_xkb_select_events_details_t.ctrlDetails */ 4698 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->ctrlDetails; 4699 xcb_block_len += sizeof(uint32_t); 4700 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4701 xcb_parts_idx++; 4702 xcb_align_to = ALIGNOF(uint32_t); 4703 } 4704 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) { 4705 /* xcb_xkb_select_events_details_t.affectIndicatorState */ 4706 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorState; 4707 xcb_block_len += sizeof(uint32_t); 4708 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4709 xcb_parts_idx++; 4710 xcb_align_to = ALIGNOF(uint32_t); 4711 /* xcb_xkb_select_events_details_t.indicatorStateDetails */ 4712 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorStateDetails; 4713 xcb_block_len += sizeof(uint32_t); 4714 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4715 xcb_parts_idx++; 4716 xcb_align_to = ALIGNOF(uint32_t); 4717 } 4718 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) { 4719 /* xcb_xkb_select_events_details_t.affectIndicatorMap */ 4720 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectIndicatorMap; 4721 xcb_block_len += sizeof(uint32_t); 4722 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4723 xcb_parts_idx++; 4724 xcb_align_to = ALIGNOF(uint32_t); 4725 /* xcb_xkb_select_events_details_t.indicatorMapDetails */ 4726 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicatorMapDetails; 4727 xcb_block_len += sizeof(uint32_t); 4728 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 4729 xcb_parts_idx++; 4730 xcb_align_to = ALIGNOF(uint32_t); 4731 } 4732 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) { 4733 /* xcb_xkb_select_events_details_t.affectNames */ 4734 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectNames; 4735 xcb_block_len += sizeof(uint16_t); 4736 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4737 xcb_parts_idx++; 4738 xcb_align_to = ALIGNOF(uint16_t); 4739 /* xcb_xkb_select_events_details_t.namesDetails */ 4740 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->namesDetails; 4741 xcb_block_len += sizeof(uint16_t); 4742 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4743 xcb_parts_idx++; 4744 xcb_align_to = ALIGNOF(uint16_t); 4745 } 4746 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) { 4747 /* xcb_xkb_select_events_details_t.affectCompat */ 4748 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectCompat; 4749 xcb_block_len += sizeof(uint8_t); 4750 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4751 xcb_parts_idx++; 4752 xcb_align_to = ALIGNOF(uint8_t); 4753 /* xcb_xkb_select_events_details_t.compatDetails */ 4754 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatDetails; 4755 xcb_block_len += sizeof(uint8_t); 4756 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4757 xcb_parts_idx++; 4758 xcb_align_to = ALIGNOF(uint8_t); 4759 } 4760 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) { 4761 /* xcb_xkb_select_events_details_t.affectBell */ 4762 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectBell; 4763 xcb_block_len += sizeof(uint8_t); 4764 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4765 xcb_parts_idx++; 4766 xcb_align_to = ALIGNOF(uint8_t); 4767 /* xcb_xkb_select_events_details_t.bellDetails */ 4768 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->bellDetails; 4769 xcb_block_len += sizeof(uint8_t); 4770 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4771 xcb_parts_idx++; 4772 xcb_align_to = ALIGNOF(uint8_t); 4773 } 4774 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) { 4775 /* xcb_xkb_select_events_details_t.affectMsgDetails */ 4776 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectMsgDetails; 4777 xcb_block_len += sizeof(uint8_t); 4778 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4779 xcb_parts_idx++; 4780 xcb_align_to = ALIGNOF(uint8_t); 4781 /* xcb_xkb_select_events_details_t.msgDetails */ 4782 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->msgDetails; 4783 xcb_block_len += sizeof(uint8_t); 4784 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 4785 xcb_parts_idx++; 4786 xcb_align_to = ALIGNOF(uint8_t); 4787 } 4788 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) { 4789 /* xcb_xkb_select_events_details_t.affectAccessX */ 4790 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectAccessX; 4791 xcb_block_len += sizeof(uint16_t); 4792 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4793 xcb_parts_idx++; 4794 xcb_align_to = ALIGNOF(uint16_t); 4795 /* xcb_xkb_select_events_details_t.accessXDetails */ 4796 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->accessXDetails; 4797 xcb_block_len += sizeof(uint16_t); 4798 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4799 xcb_parts_idx++; 4800 xcb_align_to = ALIGNOF(uint16_t); 4801 } 4802 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) { 4803 /* xcb_xkb_select_events_details_t.affectExtDev */ 4804 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->affectExtDev; 4805 xcb_block_len += sizeof(uint16_t); 4806 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4807 xcb_parts_idx++; 4808 xcb_align_to = ALIGNOF(uint16_t); 4809 /* xcb_xkb_select_events_details_t.extdevDetails */ 4810 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->extdevDetails; 4811 xcb_block_len += sizeof(uint16_t); 4812 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 4813 xcb_parts_idx++; 4814 xcb_align_to = ALIGNOF(uint16_t); 4815 } 4816 /* insert padding */ 4817 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4818 xcb_buffer_len += xcb_block_len + xcb_pad; 4819 if (0 != xcb_pad) { 4820 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 4821 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 4822 xcb_parts_idx++; 4823 xcb_pad = 0; 4824 } 4825 xcb_block_len = 0; 4826 4827 if (NULL == xcb_out) { 4828 /* allocate memory */ 4829 xcb_out = malloc(xcb_buffer_len); 4830 *_buffer = xcb_out; 4831 } 4832 4833 xcb_tmp = xcb_out; 4834 for(i=0; i<xcb_parts_idx; i++) { 4835 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 4836 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 4837 if (0 != xcb_parts[i].iov_len) 4838 xcb_tmp += xcb_parts[i].iov_len; 4839 } 4840 4841 return xcb_buffer_len; 4842 } 4843 4844 int 4845 xcb_xkb_select_events_details_unpack (const void *_buffer /**< */, 4846 uint16_t affectWhich /**< */, 4847 uint16_t clear /**< */, 4848 uint16_t selectAll /**< */, 4849 xcb_xkb_select_events_details_t *_aux /**< */) 4850 { 4851 char *xcb_tmp = (char *)_buffer; 4852 unsigned int xcb_buffer_len = 0; 4853 unsigned int xcb_block_len = 0; 4854 unsigned int xcb_pad = 0; 4855 unsigned int xcb_align_to; 4856 4857 4858 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY) { 4859 /* xcb_xkb_select_events_details_t.affectNewKeyboard */ 4860 _aux->affectNewKeyboard = *(uint16_t *)xcb_tmp; 4861 xcb_block_len += sizeof(uint16_t); 4862 xcb_tmp += sizeof(uint16_t); 4863 xcb_align_to = ALIGNOF(uint16_t); 4864 /* xcb_xkb_select_events_details_t.newKeyboardDetails */ 4865 _aux->newKeyboardDetails = *(uint16_t *)xcb_tmp; 4866 xcb_block_len += sizeof(uint16_t); 4867 xcb_tmp += sizeof(uint16_t); 4868 xcb_align_to = ALIGNOF(uint16_t); 4869 } 4870 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_STATE_NOTIFY) { 4871 /* xcb_xkb_select_events_details_t.affectState */ 4872 _aux->affectState = *(uint16_t *)xcb_tmp; 4873 xcb_block_len += sizeof(uint16_t); 4874 xcb_tmp += sizeof(uint16_t); 4875 xcb_align_to = ALIGNOF(uint16_t); 4876 /* xcb_xkb_select_events_details_t.stateDetails */ 4877 _aux->stateDetails = *(uint16_t *)xcb_tmp; 4878 xcb_block_len += sizeof(uint16_t); 4879 xcb_tmp += sizeof(uint16_t); 4880 xcb_align_to = ALIGNOF(uint16_t); 4881 } 4882 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_CONTROLS_NOTIFY) { 4883 /* xcb_xkb_select_events_details_t.affectCtrls */ 4884 _aux->affectCtrls = *(uint32_t *)xcb_tmp; 4885 xcb_block_len += sizeof(uint32_t); 4886 xcb_tmp += sizeof(uint32_t); 4887 xcb_align_to = ALIGNOF(uint32_t); 4888 /* xcb_xkb_select_events_details_t.ctrlDetails */ 4889 _aux->ctrlDetails = *(uint32_t *)xcb_tmp; 4890 xcb_block_len += sizeof(uint32_t); 4891 xcb_tmp += sizeof(uint32_t); 4892 xcb_align_to = ALIGNOF(uint32_t); 4893 } 4894 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_STATE_NOTIFY) { 4895 /* xcb_xkb_select_events_details_t.affectIndicatorState */ 4896 _aux->affectIndicatorState = *(uint32_t *)xcb_tmp; 4897 xcb_block_len += sizeof(uint32_t); 4898 xcb_tmp += sizeof(uint32_t); 4899 xcb_align_to = ALIGNOF(uint32_t); 4900 /* xcb_xkb_select_events_details_t.indicatorStateDetails */ 4901 _aux->indicatorStateDetails = *(uint32_t *)xcb_tmp; 4902 xcb_block_len += sizeof(uint32_t); 4903 xcb_tmp += sizeof(uint32_t); 4904 xcb_align_to = ALIGNOF(uint32_t); 4905 } 4906 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_INDICATOR_MAP_NOTIFY) { 4907 /* xcb_xkb_select_events_details_t.affectIndicatorMap */ 4908 _aux->affectIndicatorMap = *(uint32_t *)xcb_tmp; 4909 xcb_block_len += sizeof(uint32_t); 4910 xcb_tmp += sizeof(uint32_t); 4911 xcb_align_to = ALIGNOF(uint32_t); 4912 /* xcb_xkb_select_events_details_t.indicatorMapDetails */ 4913 _aux->indicatorMapDetails = *(uint32_t *)xcb_tmp; 4914 xcb_block_len += sizeof(uint32_t); 4915 xcb_tmp += sizeof(uint32_t); 4916 xcb_align_to = ALIGNOF(uint32_t); 4917 } 4918 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_NAMES_NOTIFY) { 4919 /* xcb_xkb_select_events_details_t.affectNames */ 4920 _aux->affectNames = *(uint16_t *)xcb_tmp; 4921 xcb_block_len += sizeof(uint16_t); 4922 xcb_tmp += sizeof(uint16_t); 4923 xcb_align_to = ALIGNOF(uint16_t); 4924 /* xcb_xkb_select_events_details_t.namesDetails */ 4925 _aux->namesDetails = *(uint16_t *)xcb_tmp; 4926 xcb_block_len += sizeof(uint16_t); 4927 xcb_tmp += sizeof(uint16_t); 4928 xcb_align_to = ALIGNOF(uint16_t); 4929 } 4930 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_COMPAT_MAP_NOTIFY) { 4931 /* xcb_xkb_select_events_details_t.affectCompat */ 4932 _aux->affectCompat = *(uint8_t *)xcb_tmp; 4933 xcb_block_len += sizeof(uint8_t); 4934 xcb_tmp += sizeof(uint8_t); 4935 xcb_align_to = ALIGNOF(uint8_t); 4936 /* xcb_xkb_select_events_details_t.compatDetails */ 4937 _aux->compatDetails = *(uint8_t *)xcb_tmp; 4938 xcb_block_len += sizeof(uint8_t); 4939 xcb_tmp += sizeof(uint8_t); 4940 xcb_align_to = ALIGNOF(uint8_t); 4941 } 4942 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_BELL_NOTIFY) { 4943 /* xcb_xkb_select_events_details_t.affectBell */ 4944 _aux->affectBell = *(uint8_t *)xcb_tmp; 4945 xcb_block_len += sizeof(uint8_t); 4946 xcb_tmp += sizeof(uint8_t); 4947 xcb_align_to = ALIGNOF(uint8_t); 4948 /* xcb_xkb_select_events_details_t.bellDetails */ 4949 _aux->bellDetails = *(uint8_t *)xcb_tmp; 4950 xcb_block_len += sizeof(uint8_t); 4951 xcb_tmp += sizeof(uint8_t); 4952 xcb_align_to = ALIGNOF(uint8_t); 4953 } 4954 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACTION_MESSAGE) { 4955 /* xcb_xkb_select_events_details_t.affectMsgDetails */ 4956 _aux->affectMsgDetails = *(uint8_t *)xcb_tmp; 4957 xcb_block_len += sizeof(uint8_t); 4958 xcb_tmp += sizeof(uint8_t); 4959 xcb_align_to = ALIGNOF(uint8_t); 4960 /* xcb_xkb_select_events_details_t.msgDetails */ 4961 _aux->msgDetails = *(uint8_t *)xcb_tmp; 4962 xcb_block_len += sizeof(uint8_t); 4963 xcb_tmp += sizeof(uint8_t); 4964 xcb_align_to = ALIGNOF(uint8_t); 4965 } 4966 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_ACCESS_X_NOTIFY) { 4967 /* xcb_xkb_select_events_details_t.affectAccessX */ 4968 _aux->affectAccessX = *(uint16_t *)xcb_tmp; 4969 xcb_block_len += sizeof(uint16_t); 4970 xcb_tmp += sizeof(uint16_t); 4971 xcb_align_to = ALIGNOF(uint16_t); 4972 /* xcb_xkb_select_events_details_t.accessXDetails */ 4973 _aux->accessXDetails = *(uint16_t *)xcb_tmp; 4974 xcb_block_len += sizeof(uint16_t); 4975 xcb_tmp += sizeof(uint16_t); 4976 xcb_align_to = ALIGNOF(uint16_t); 4977 } 4978 if((affectWhich & ((~clear) & (~selectAll))) & XCB_XKB_EVENT_TYPE_EXTENSION_DEVICE_NOTIFY) { 4979 /* xcb_xkb_select_events_details_t.affectExtDev */ 4980 _aux->affectExtDev = *(uint16_t *)xcb_tmp; 4981 xcb_block_len += sizeof(uint16_t); 4982 xcb_tmp += sizeof(uint16_t); 4983 xcb_align_to = ALIGNOF(uint16_t); 4984 /* xcb_xkb_select_events_details_t.extdevDetails */ 4985 _aux->extdevDetails = *(uint16_t *)xcb_tmp; 4986 xcb_block_len += sizeof(uint16_t); 4987 xcb_tmp += sizeof(uint16_t); 4988 xcb_align_to = ALIGNOF(uint16_t); 4989 } 4990 /* insert padding */ 4991 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 4992 xcb_buffer_len += xcb_block_len + xcb_pad; 4993 if (0 != xcb_pad) { 4994 xcb_tmp += xcb_pad; 4995 xcb_pad = 0; 4996 } 4997 xcb_block_len = 0; 4998 4999 return xcb_buffer_len; 5000 } 5001 5002 int 5003 xcb_xkb_select_events_details_sizeof (const void *_buffer /**< */, 5004 uint16_t affectWhich /**< */, 5005 uint16_t clear /**< */, 5006 uint16_t selectAll /**< */) 5007 { 5008 xcb_xkb_select_events_details_t _aux; 5009 return xcb_xkb_select_events_details_unpack(_buffer, affectWhich, clear, selectAll, &_aux); 5010 } 5011 5012 5013 /***************************************************************************** 5014 ** 5015 ** xcb_void_cookie_t xcb_xkb_select_events_checked 5016 ** 5017 ** @param xcb_connection_t *c 5018 ** @param xcb_xkb_device_spec_t deviceSpec 5019 ** @param uint16_t affectWhich 5020 ** @param uint16_t clear 5021 ** @param uint16_t selectAll 5022 ** @param uint16_t affectMap 5023 ** @param uint16_t map 5024 ** @param const void *details 5025 ** @returns xcb_void_cookie_t 5026 ** 5027 *****************************************************************************/ 5028 5029 xcb_void_cookie_t 5030 xcb_xkb_select_events_checked (xcb_connection_t *c /**< */, 5031 xcb_xkb_device_spec_t deviceSpec /**< */, 5032 uint16_t affectWhich /**< */, 5033 uint16_t clear /**< */, 5034 uint16_t selectAll /**< */, 5035 uint16_t affectMap /**< */, 5036 uint16_t map /**< */, 5037 const void *details /**< */) 5038 { 5039 static const xcb_protocol_request_t xcb_req = { 5040 /* count */ 3, 5041 /* ext */ &xcb_xkb_id, 5042 /* opcode */ XCB_XKB_SELECT_EVENTS, 5043 /* isvoid */ 1 5044 }; 5045 5046 struct iovec xcb_parts[5]; 5047 xcb_void_cookie_t xcb_ret; 5048 xcb_xkb_select_events_request_t xcb_out; 5049 5050 xcb_out.deviceSpec = deviceSpec; 5051 xcb_out.affectWhich = affectWhich; 5052 xcb_out.clear = clear; 5053 xcb_out.selectAll = selectAll; 5054 xcb_out.affectMap = affectMap; 5055 xcb_out.map = map; 5056 5057 xcb_parts[2].iov_base = (char *) &xcb_out; 5058 xcb_parts[2].iov_len = sizeof(xcb_out); 5059 xcb_parts[3].iov_base = 0; 5060 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5061 /* xcb_xkb_select_events_details_t details */ 5062 xcb_parts[4].iov_base = (char *) details; 5063 xcb_parts[4].iov_len = 5064 xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll); 5065 5066 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5067 return xcb_ret; 5068 } 5069 5070 5071 /***************************************************************************** 5072 ** 5073 ** xcb_void_cookie_t xcb_xkb_select_events 5074 ** 5075 ** @param xcb_connection_t *c 5076 ** @param xcb_xkb_device_spec_t deviceSpec 5077 ** @param uint16_t affectWhich 5078 ** @param uint16_t clear 5079 ** @param uint16_t selectAll 5080 ** @param uint16_t affectMap 5081 ** @param uint16_t map 5082 ** @param const void *details 5083 ** @returns xcb_void_cookie_t 5084 ** 5085 *****************************************************************************/ 5086 5087 xcb_void_cookie_t 5088 xcb_xkb_select_events (xcb_connection_t *c /**< */, 5089 xcb_xkb_device_spec_t deviceSpec /**< */, 5090 uint16_t affectWhich /**< */, 5091 uint16_t clear /**< */, 5092 uint16_t selectAll /**< */, 5093 uint16_t affectMap /**< */, 5094 uint16_t map /**< */, 5095 const void *details /**< */) 5096 { 5097 static const xcb_protocol_request_t xcb_req = { 5098 /* count */ 3, 5099 /* ext */ &xcb_xkb_id, 5100 /* opcode */ XCB_XKB_SELECT_EVENTS, 5101 /* isvoid */ 1 5102 }; 5103 5104 struct iovec xcb_parts[5]; 5105 xcb_void_cookie_t xcb_ret; 5106 xcb_xkb_select_events_request_t xcb_out; 5107 5108 xcb_out.deviceSpec = deviceSpec; 5109 xcb_out.affectWhich = affectWhich; 5110 xcb_out.clear = clear; 5111 xcb_out.selectAll = selectAll; 5112 xcb_out.affectMap = affectMap; 5113 xcb_out.map = map; 5114 5115 xcb_parts[2].iov_base = (char *) &xcb_out; 5116 xcb_parts[2].iov_len = sizeof(xcb_out); 5117 xcb_parts[3].iov_base = 0; 5118 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5119 /* xcb_xkb_select_events_details_t details */ 5120 xcb_parts[4].iov_base = (char *) details; 5121 xcb_parts[4].iov_len = 5122 xcb_xkb_select_events_details_sizeof (details, affectWhich, clear, selectAll); 5123 5124 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5125 return xcb_ret; 5126 } 5127 5128 5129 /***************************************************************************** 5130 ** 5131 ** xcb_void_cookie_t xcb_xkb_select_events_aux_checked 5132 ** 5133 ** @param xcb_connection_t *c 5134 ** @param xcb_xkb_device_spec_t deviceSpec 5135 ** @param uint16_t affectWhich 5136 ** @param uint16_t clear 5137 ** @param uint16_t selectAll 5138 ** @param uint16_t affectMap 5139 ** @param uint16_t map 5140 ** @param const xcb_xkb_select_events_details_t *details 5141 ** @returns xcb_void_cookie_t 5142 ** 5143 *****************************************************************************/ 5144 5145 xcb_void_cookie_t 5146 xcb_xkb_select_events_aux_checked (xcb_connection_t *c /**< */, 5147 xcb_xkb_device_spec_t deviceSpec /**< */, 5148 uint16_t affectWhich /**< */, 5149 uint16_t clear /**< */, 5150 uint16_t selectAll /**< */, 5151 uint16_t affectMap /**< */, 5152 uint16_t map /**< */, 5153 const xcb_xkb_select_events_details_t *details /**< */) 5154 { 5155 static const xcb_protocol_request_t xcb_req = { 5156 /* count */ 3, 5157 /* ext */ &xcb_xkb_id, 5158 /* opcode */ XCB_XKB_SELECT_EVENTS, 5159 /* isvoid */ 1 5160 }; 5161 5162 struct iovec xcb_parts[5]; 5163 xcb_void_cookie_t xcb_ret; 5164 xcb_xkb_select_events_request_t xcb_out; 5165 void *xcb_aux0 = 0; 5166 5167 xcb_out.deviceSpec = deviceSpec; 5168 xcb_out.affectWhich = affectWhich; 5169 xcb_out.clear = clear; 5170 xcb_out.selectAll = selectAll; 5171 xcb_out.affectMap = affectMap; 5172 xcb_out.map = map; 5173 5174 xcb_parts[2].iov_base = (char *) &xcb_out; 5175 xcb_parts[2].iov_len = sizeof(xcb_out); 5176 xcb_parts[3].iov_base = 0; 5177 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5178 /* xcb_xkb_select_events_details_t details */ 5179 xcb_parts[4].iov_len = 5180 xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details); 5181 xcb_parts[4].iov_base = xcb_aux0; 5182 5183 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5184 free(xcb_aux0); 5185 return xcb_ret; 5186 } 5187 5188 5189 /***************************************************************************** 5190 ** 5191 ** xcb_void_cookie_t xcb_xkb_select_events_aux 5192 ** 5193 ** @param xcb_connection_t *c 5194 ** @param xcb_xkb_device_spec_t deviceSpec 5195 ** @param uint16_t affectWhich 5196 ** @param uint16_t clear 5197 ** @param uint16_t selectAll 5198 ** @param uint16_t affectMap 5199 ** @param uint16_t map 5200 ** @param const xcb_xkb_select_events_details_t *details 5201 ** @returns xcb_void_cookie_t 5202 ** 5203 *****************************************************************************/ 5204 5205 xcb_void_cookie_t 5206 xcb_xkb_select_events_aux (xcb_connection_t *c /**< */, 5207 xcb_xkb_device_spec_t deviceSpec /**< */, 5208 uint16_t affectWhich /**< */, 5209 uint16_t clear /**< */, 5210 uint16_t selectAll /**< */, 5211 uint16_t affectMap /**< */, 5212 uint16_t map /**< */, 5213 const xcb_xkb_select_events_details_t *details /**< */) 5214 { 5215 static const xcb_protocol_request_t xcb_req = { 5216 /* count */ 3, 5217 /* ext */ &xcb_xkb_id, 5218 /* opcode */ XCB_XKB_SELECT_EVENTS, 5219 /* isvoid */ 1 5220 }; 5221 5222 struct iovec xcb_parts[5]; 5223 xcb_void_cookie_t xcb_ret; 5224 xcb_xkb_select_events_request_t xcb_out; 5225 void *xcb_aux0 = 0; 5226 5227 xcb_out.deviceSpec = deviceSpec; 5228 xcb_out.affectWhich = affectWhich; 5229 xcb_out.clear = clear; 5230 xcb_out.selectAll = selectAll; 5231 xcb_out.affectMap = affectMap; 5232 xcb_out.map = map; 5233 5234 xcb_parts[2].iov_base = (char *) &xcb_out; 5235 xcb_parts[2].iov_len = sizeof(xcb_out); 5236 xcb_parts[3].iov_base = 0; 5237 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5238 /* xcb_xkb_select_events_details_t details */ 5239 xcb_parts[4].iov_len = 5240 xcb_xkb_select_events_details_serialize (&xcb_aux0, affectWhich, clear, selectAll, details); 5241 xcb_parts[4].iov_base = xcb_aux0; 5242 5243 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5244 free(xcb_aux0); 5245 return xcb_ret; 5246 } 5247 5248 5249 /***************************************************************************** 5250 ** 5251 ** xcb_void_cookie_t xcb_xkb_bell_checked 5252 ** 5253 ** @param xcb_connection_t *c 5254 ** @param xcb_xkb_device_spec_t deviceSpec 5255 ** @param xcb_xkb_bell_class_spec_t bellClass 5256 ** @param xcb_xkb_id_spec_t bellID 5257 ** @param int8_t percent 5258 ** @param uint8_t forceSound 5259 ** @param uint8_t eventOnly 5260 ** @param int16_t pitch 5261 ** @param int16_t duration 5262 ** @param xcb_atom_t name 5263 ** @param xcb_window_t window 5264 ** @returns xcb_void_cookie_t 5265 ** 5266 *****************************************************************************/ 5267 5268 xcb_void_cookie_t 5269 xcb_xkb_bell_checked (xcb_connection_t *c /**< */, 5270 xcb_xkb_device_spec_t deviceSpec /**< */, 5271 xcb_xkb_bell_class_spec_t bellClass /**< */, 5272 xcb_xkb_id_spec_t bellID /**< */, 5273 int8_t percent /**< */, 5274 uint8_t forceSound /**< */, 5275 uint8_t eventOnly /**< */, 5276 int16_t pitch /**< */, 5277 int16_t duration /**< */, 5278 xcb_atom_t name /**< */, 5279 xcb_window_t window /**< */) 5280 { 5281 static const xcb_protocol_request_t xcb_req = { 5282 /* count */ 2, 5283 /* ext */ &xcb_xkb_id, 5284 /* opcode */ XCB_XKB_BELL, 5285 /* isvoid */ 1 5286 }; 5287 5288 struct iovec xcb_parts[4]; 5289 xcb_void_cookie_t xcb_ret; 5290 xcb_xkb_bell_request_t xcb_out; 5291 5292 xcb_out.deviceSpec = deviceSpec; 5293 xcb_out.bellClass = bellClass; 5294 xcb_out.bellID = bellID; 5295 xcb_out.percent = percent; 5296 xcb_out.forceSound = forceSound; 5297 xcb_out.eventOnly = eventOnly; 5298 xcb_out.pad0 = 0; 5299 xcb_out.pitch = pitch; 5300 xcb_out.duration = duration; 5301 memset(xcb_out.pad1, 0, 2); 5302 xcb_out.name = name; 5303 xcb_out.window = window; 5304 5305 xcb_parts[2].iov_base = (char *) &xcb_out; 5306 xcb_parts[2].iov_len = sizeof(xcb_out); 5307 xcb_parts[3].iov_base = 0; 5308 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5309 5310 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5311 return xcb_ret; 5312 } 5313 5314 5315 /***************************************************************************** 5316 ** 5317 ** xcb_void_cookie_t xcb_xkb_bell 5318 ** 5319 ** @param xcb_connection_t *c 5320 ** @param xcb_xkb_device_spec_t deviceSpec 5321 ** @param xcb_xkb_bell_class_spec_t bellClass 5322 ** @param xcb_xkb_id_spec_t bellID 5323 ** @param int8_t percent 5324 ** @param uint8_t forceSound 5325 ** @param uint8_t eventOnly 5326 ** @param int16_t pitch 5327 ** @param int16_t duration 5328 ** @param xcb_atom_t name 5329 ** @param xcb_window_t window 5330 ** @returns xcb_void_cookie_t 5331 ** 5332 *****************************************************************************/ 5333 5334 xcb_void_cookie_t 5335 xcb_xkb_bell (xcb_connection_t *c /**< */, 5336 xcb_xkb_device_spec_t deviceSpec /**< */, 5337 xcb_xkb_bell_class_spec_t bellClass /**< */, 5338 xcb_xkb_id_spec_t bellID /**< */, 5339 int8_t percent /**< */, 5340 uint8_t forceSound /**< */, 5341 uint8_t eventOnly /**< */, 5342 int16_t pitch /**< */, 5343 int16_t duration /**< */, 5344 xcb_atom_t name /**< */, 5345 xcb_window_t window /**< */) 5346 { 5347 static const xcb_protocol_request_t xcb_req = { 5348 /* count */ 2, 5349 /* ext */ &xcb_xkb_id, 5350 /* opcode */ XCB_XKB_BELL, 5351 /* isvoid */ 1 5352 }; 5353 5354 struct iovec xcb_parts[4]; 5355 xcb_void_cookie_t xcb_ret; 5356 xcb_xkb_bell_request_t xcb_out; 5357 5358 xcb_out.deviceSpec = deviceSpec; 5359 xcb_out.bellClass = bellClass; 5360 xcb_out.bellID = bellID; 5361 xcb_out.percent = percent; 5362 xcb_out.forceSound = forceSound; 5363 xcb_out.eventOnly = eventOnly; 5364 xcb_out.pad0 = 0; 5365 xcb_out.pitch = pitch; 5366 xcb_out.duration = duration; 5367 memset(xcb_out.pad1, 0, 2); 5368 xcb_out.name = name; 5369 xcb_out.window = window; 5370 5371 xcb_parts[2].iov_base = (char *) &xcb_out; 5372 xcb_parts[2].iov_len = sizeof(xcb_out); 5373 xcb_parts[3].iov_base = 0; 5374 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5375 5376 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5377 return xcb_ret; 5378 } 5379 5380 5381 /***************************************************************************** 5382 ** 5383 ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state 5384 ** 5385 ** @param xcb_connection_t *c 5386 ** @param xcb_xkb_device_spec_t deviceSpec 5387 ** @returns xcb_xkb_get_state_cookie_t 5388 ** 5389 *****************************************************************************/ 5390 5391 xcb_xkb_get_state_cookie_t 5392 xcb_xkb_get_state (xcb_connection_t *c /**< */, 5393 xcb_xkb_device_spec_t deviceSpec /**< */) 5394 { 5395 static const xcb_protocol_request_t xcb_req = { 5396 /* count */ 2, 5397 /* ext */ &xcb_xkb_id, 5398 /* opcode */ XCB_XKB_GET_STATE, 5399 /* isvoid */ 0 5400 }; 5401 5402 struct iovec xcb_parts[4]; 5403 xcb_xkb_get_state_cookie_t xcb_ret; 5404 xcb_xkb_get_state_request_t xcb_out; 5405 5406 xcb_out.deviceSpec = deviceSpec; 5407 memset(xcb_out.pad0, 0, 2); 5408 5409 xcb_parts[2].iov_base = (char *) &xcb_out; 5410 xcb_parts[2].iov_len = sizeof(xcb_out); 5411 xcb_parts[3].iov_base = 0; 5412 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5413 5414 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5415 return xcb_ret; 5416 } 5417 5418 5419 /***************************************************************************** 5420 ** 5421 ** xcb_xkb_get_state_cookie_t xcb_xkb_get_state_unchecked 5422 ** 5423 ** @param xcb_connection_t *c 5424 ** @param xcb_xkb_device_spec_t deviceSpec 5425 ** @returns xcb_xkb_get_state_cookie_t 5426 ** 5427 *****************************************************************************/ 5428 5429 xcb_xkb_get_state_cookie_t 5430 xcb_xkb_get_state_unchecked (xcb_connection_t *c /**< */, 5431 xcb_xkb_device_spec_t deviceSpec /**< */) 5432 { 5433 static const xcb_protocol_request_t xcb_req = { 5434 /* count */ 2, 5435 /* ext */ &xcb_xkb_id, 5436 /* opcode */ XCB_XKB_GET_STATE, 5437 /* isvoid */ 0 5438 }; 5439 5440 struct iovec xcb_parts[4]; 5441 xcb_xkb_get_state_cookie_t xcb_ret; 5442 xcb_xkb_get_state_request_t xcb_out; 5443 5444 xcb_out.deviceSpec = deviceSpec; 5445 memset(xcb_out.pad0, 0, 2); 5446 5447 xcb_parts[2].iov_base = (char *) &xcb_out; 5448 xcb_parts[2].iov_len = sizeof(xcb_out); 5449 xcb_parts[3].iov_base = 0; 5450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5451 5452 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5453 return xcb_ret; 5454 } 5455 5456 5457 /***************************************************************************** 5458 ** 5459 ** xcb_xkb_get_state_reply_t * xcb_xkb_get_state_reply 5460 ** 5461 ** @param xcb_connection_t *c 5462 ** @param xcb_xkb_get_state_cookie_t cookie 5463 ** @param xcb_generic_error_t **e 5464 ** @returns xcb_xkb_get_state_reply_t * 5465 ** 5466 *****************************************************************************/ 5467 5468 xcb_xkb_get_state_reply_t * 5469 xcb_xkb_get_state_reply (xcb_connection_t *c /**< */, 5470 xcb_xkb_get_state_cookie_t cookie /**< */, 5471 xcb_generic_error_t **e /**< */) 5472 { 5473 return (xcb_xkb_get_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5474 } 5475 5476 5477 /***************************************************************************** 5478 ** 5479 ** xcb_void_cookie_t xcb_xkb_latch_lock_state_checked 5480 ** 5481 ** @param xcb_connection_t *c 5482 ** @param xcb_xkb_device_spec_t deviceSpec 5483 ** @param uint8_t affectModLocks 5484 ** @param uint8_t modLocks 5485 ** @param uint8_t lockGroup 5486 ** @param uint8_t groupLock 5487 ** @param uint8_t affectModLatches 5488 ** @param uint8_t latchGroup 5489 ** @param uint16_t groupLatch 5490 ** @returns xcb_void_cookie_t 5491 ** 5492 *****************************************************************************/ 5493 5494 xcb_void_cookie_t 5495 xcb_xkb_latch_lock_state_checked (xcb_connection_t *c /**< */, 5496 xcb_xkb_device_spec_t deviceSpec /**< */, 5497 uint8_t affectModLocks /**< */, 5498 uint8_t modLocks /**< */, 5499 uint8_t lockGroup /**< */, 5500 uint8_t groupLock /**< */, 5501 uint8_t affectModLatches /**< */, 5502 uint8_t latchGroup /**< */, 5503 uint16_t groupLatch /**< */) 5504 { 5505 static const xcb_protocol_request_t xcb_req = { 5506 /* count */ 2, 5507 /* ext */ &xcb_xkb_id, 5508 /* opcode */ XCB_XKB_LATCH_LOCK_STATE, 5509 /* isvoid */ 1 5510 }; 5511 5512 struct iovec xcb_parts[4]; 5513 xcb_void_cookie_t xcb_ret; 5514 xcb_xkb_latch_lock_state_request_t xcb_out; 5515 5516 xcb_out.deviceSpec = deviceSpec; 5517 xcb_out.affectModLocks = affectModLocks; 5518 xcb_out.modLocks = modLocks; 5519 xcb_out.lockGroup = lockGroup; 5520 xcb_out.groupLock = groupLock; 5521 xcb_out.affectModLatches = affectModLatches; 5522 xcb_out.pad0 = 0; 5523 xcb_out.latchGroup = latchGroup; 5524 xcb_out.groupLatch = groupLatch; 5525 5526 xcb_parts[2].iov_base = (char *) &xcb_out; 5527 xcb_parts[2].iov_len = sizeof(xcb_out); 5528 xcb_parts[3].iov_base = 0; 5529 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5530 5531 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5532 return xcb_ret; 5533 } 5534 5535 5536 /***************************************************************************** 5537 ** 5538 ** xcb_void_cookie_t xcb_xkb_latch_lock_state 5539 ** 5540 ** @param xcb_connection_t *c 5541 ** @param xcb_xkb_device_spec_t deviceSpec 5542 ** @param uint8_t affectModLocks 5543 ** @param uint8_t modLocks 5544 ** @param uint8_t lockGroup 5545 ** @param uint8_t groupLock 5546 ** @param uint8_t affectModLatches 5547 ** @param uint8_t latchGroup 5548 ** @param uint16_t groupLatch 5549 ** @returns xcb_void_cookie_t 5550 ** 5551 *****************************************************************************/ 5552 5553 xcb_void_cookie_t 5554 xcb_xkb_latch_lock_state (xcb_connection_t *c /**< */, 5555 xcb_xkb_device_spec_t deviceSpec /**< */, 5556 uint8_t affectModLocks /**< */, 5557 uint8_t modLocks /**< */, 5558 uint8_t lockGroup /**< */, 5559 uint8_t groupLock /**< */, 5560 uint8_t affectModLatches /**< */, 5561 uint8_t latchGroup /**< */, 5562 uint16_t groupLatch /**< */) 5563 { 5564 static const xcb_protocol_request_t xcb_req = { 5565 /* count */ 2, 5566 /* ext */ &xcb_xkb_id, 5567 /* opcode */ XCB_XKB_LATCH_LOCK_STATE, 5568 /* isvoid */ 1 5569 }; 5570 5571 struct iovec xcb_parts[4]; 5572 xcb_void_cookie_t xcb_ret; 5573 xcb_xkb_latch_lock_state_request_t xcb_out; 5574 5575 xcb_out.deviceSpec = deviceSpec; 5576 xcb_out.affectModLocks = affectModLocks; 5577 xcb_out.modLocks = modLocks; 5578 xcb_out.lockGroup = lockGroup; 5579 xcb_out.groupLock = groupLock; 5580 xcb_out.affectModLatches = affectModLatches; 5581 xcb_out.pad0 = 0; 5582 xcb_out.latchGroup = latchGroup; 5583 xcb_out.groupLatch = groupLatch; 5584 5585 xcb_parts[2].iov_base = (char *) &xcb_out; 5586 xcb_parts[2].iov_len = sizeof(xcb_out); 5587 xcb_parts[3].iov_base = 0; 5588 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5589 5590 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5591 return xcb_ret; 5592 } 5593 5594 5595 /***************************************************************************** 5596 ** 5597 ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls 5598 ** 5599 ** @param xcb_connection_t *c 5600 ** @param xcb_xkb_device_spec_t deviceSpec 5601 ** @returns xcb_xkb_get_controls_cookie_t 5602 ** 5603 *****************************************************************************/ 5604 5605 xcb_xkb_get_controls_cookie_t 5606 xcb_xkb_get_controls (xcb_connection_t *c /**< */, 5607 xcb_xkb_device_spec_t deviceSpec /**< */) 5608 { 5609 static const xcb_protocol_request_t xcb_req = { 5610 /* count */ 2, 5611 /* ext */ &xcb_xkb_id, 5612 /* opcode */ XCB_XKB_GET_CONTROLS, 5613 /* isvoid */ 0 5614 }; 5615 5616 struct iovec xcb_parts[4]; 5617 xcb_xkb_get_controls_cookie_t xcb_ret; 5618 xcb_xkb_get_controls_request_t xcb_out; 5619 5620 xcb_out.deviceSpec = deviceSpec; 5621 memset(xcb_out.pad0, 0, 2); 5622 5623 xcb_parts[2].iov_base = (char *) &xcb_out; 5624 xcb_parts[2].iov_len = sizeof(xcb_out); 5625 xcb_parts[3].iov_base = 0; 5626 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5627 5628 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5629 return xcb_ret; 5630 } 5631 5632 5633 /***************************************************************************** 5634 ** 5635 ** xcb_xkb_get_controls_cookie_t xcb_xkb_get_controls_unchecked 5636 ** 5637 ** @param xcb_connection_t *c 5638 ** @param xcb_xkb_device_spec_t deviceSpec 5639 ** @returns xcb_xkb_get_controls_cookie_t 5640 ** 5641 *****************************************************************************/ 5642 5643 xcb_xkb_get_controls_cookie_t 5644 xcb_xkb_get_controls_unchecked (xcb_connection_t *c /**< */, 5645 xcb_xkb_device_spec_t deviceSpec /**< */) 5646 { 5647 static const xcb_protocol_request_t xcb_req = { 5648 /* count */ 2, 5649 /* ext */ &xcb_xkb_id, 5650 /* opcode */ XCB_XKB_GET_CONTROLS, 5651 /* isvoid */ 0 5652 }; 5653 5654 struct iovec xcb_parts[4]; 5655 xcb_xkb_get_controls_cookie_t xcb_ret; 5656 xcb_xkb_get_controls_request_t xcb_out; 5657 5658 xcb_out.deviceSpec = deviceSpec; 5659 memset(xcb_out.pad0, 0, 2); 5660 5661 xcb_parts[2].iov_base = (char *) &xcb_out; 5662 xcb_parts[2].iov_len = sizeof(xcb_out); 5663 xcb_parts[3].iov_base = 0; 5664 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5665 5666 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5667 return xcb_ret; 5668 } 5669 5670 5671 /***************************************************************************** 5672 ** 5673 ** xcb_xkb_get_controls_reply_t * xcb_xkb_get_controls_reply 5674 ** 5675 ** @param xcb_connection_t *c 5676 ** @param xcb_xkb_get_controls_cookie_t cookie 5677 ** @param xcb_generic_error_t **e 5678 ** @returns xcb_xkb_get_controls_reply_t * 5679 ** 5680 *****************************************************************************/ 5681 5682 xcb_xkb_get_controls_reply_t * 5683 xcb_xkb_get_controls_reply (xcb_connection_t *c /**< */, 5684 xcb_xkb_get_controls_cookie_t cookie /**< */, 5685 xcb_generic_error_t **e /**< */) 5686 { 5687 return (xcb_xkb_get_controls_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 5688 } 5689 5690 5691 /***************************************************************************** 5692 ** 5693 ** xcb_void_cookie_t xcb_xkb_set_controls_checked 5694 ** 5695 ** @param xcb_connection_t *c 5696 ** @param xcb_xkb_device_spec_t deviceSpec 5697 ** @param uint8_t affectInternalRealMods 5698 ** @param uint8_t internalRealMods 5699 ** @param uint8_t affectIgnoreLockRealMods 5700 ** @param uint8_t ignoreLockRealMods 5701 ** @param uint16_t affectInternalVirtualMods 5702 ** @param uint16_t internalVirtualMods 5703 ** @param uint16_t affectIgnoreLockVirtualMods 5704 ** @param uint16_t ignoreLockVirtualMods 5705 ** @param uint8_t mouseKeysDfltBtn 5706 ** @param uint8_t groupsWrap 5707 ** @param xcb_xkb_ax_option_t accessXOptions 5708 ** @param uint32_t affectEnabledControls 5709 ** @param uint32_t enabledControls 5710 ** @param uint32_t changeControls 5711 ** @param uint16_t repeatDelay 5712 ** @param uint16_t repeatInterval 5713 ** @param uint16_t slowKeysDelay 5714 ** @param uint16_t debounceDelay 5715 ** @param uint16_t mouseKeysDelay 5716 ** @param uint16_t mouseKeysInterval 5717 ** @param uint16_t mouseKeysTimeToMax 5718 ** @param uint16_t mouseKeysMaxSpeed 5719 ** @param int16_t mouseKeysCurve 5720 ** @param uint16_t accessXTimeout 5721 ** @param uint32_t accessXTimeoutMask 5722 ** @param uint32_t accessXTimeoutValues 5723 ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask 5724 ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues 5725 ** @param const uint8_t *perKeyRepeat 5726 ** @returns xcb_void_cookie_t 5727 ** 5728 *****************************************************************************/ 5729 5730 xcb_void_cookie_t 5731 xcb_xkb_set_controls_checked (xcb_connection_t *c /**< */, 5732 xcb_xkb_device_spec_t deviceSpec /**< */, 5733 uint8_t affectInternalRealMods /**< */, 5734 uint8_t internalRealMods /**< */, 5735 uint8_t affectIgnoreLockRealMods /**< */, 5736 uint8_t ignoreLockRealMods /**< */, 5737 uint16_t affectInternalVirtualMods /**< */, 5738 uint16_t internalVirtualMods /**< */, 5739 uint16_t affectIgnoreLockVirtualMods /**< */, 5740 uint16_t ignoreLockVirtualMods /**< */, 5741 uint8_t mouseKeysDfltBtn /**< */, 5742 uint8_t groupsWrap /**< */, 5743 xcb_xkb_ax_option_t accessXOptions /**< */, 5744 uint32_t affectEnabledControls /**< */, 5745 uint32_t enabledControls /**< */, 5746 uint32_t changeControls /**< */, 5747 uint16_t repeatDelay /**< */, 5748 uint16_t repeatInterval /**< */, 5749 uint16_t slowKeysDelay /**< */, 5750 uint16_t debounceDelay /**< */, 5751 uint16_t mouseKeysDelay /**< */, 5752 uint16_t mouseKeysInterval /**< */, 5753 uint16_t mouseKeysTimeToMax /**< */, 5754 uint16_t mouseKeysMaxSpeed /**< */, 5755 int16_t mouseKeysCurve /**< */, 5756 uint16_t accessXTimeout /**< */, 5757 uint32_t accessXTimeoutMask /**< */, 5758 uint32_t accessXTimeoutValues /**< */, 5759 xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */, 5760 xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */, 5761 const uint8_t *perKeyRepeat /**< */) 5762 { 5763 static const xcb_protocol_request_t xcb_req = { 5764 /* count */ 2, 5765 /* ext */ &xcb_xkb_id, 5766 /* opcode */ XCB_XKB_SET_CONTROLS, 5767 /* isvoid */ 1 5768 }; 5769 5770 struct iovec xcb_parts[4]; 5771 xcb_void_cookie_t xcb_ret; 5772 xcb_xkb_set_controls_request_t xcb_out; 5773 5774 xcb_out.deviceSpec = deviceSpec; 5775 xcb_out.affectInternalRealMods = affectInternalRealMods; 5776 xcb_out.internalRealMods = internalRealMods; 5777 xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods; 5778 xcb_out.ignoreLockRealMods = ignoreLockRealMods; 5779 xcb_out.affectInternalVirtualMods = affectInternalVirtualMods; 5780 xcb_out.internalVirtualMods = internalVirtualMods; 5781 xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods; 5782 xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods; 5783 xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn; 5784 xcb_out.groupsWrap = groupsWrap; 5785 xcb_out.accessXOptions = accessXOptions; 5786 memset(xcb_out.pad0, 0, 2); 5787 xcb_out.affectEnabledControls = affectEnabledControls; 5788 xcb_out.enabledControls = enabledControls; 5789 xcb_out.changeControls = changeControls; 5790 xcb_out.repeatDelay = repeatDelay; 5791 xcb_out.repeatInterval = repeatInterval; 5792 xcb_out.slowKeysDelay = slowKeysDelay; 5793 xcb_out.debounceDelay = debounceDelay; 5794 xcb_out.mouseKeysDelay = mouseKeysDelay; 5795 xcb_out.mouseKeysInterval = mouseKeysInterval; 5796 xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax; 5797 xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed; 5798 xcb_out.mouseKeysCurve = mouseKeysCurve; 5799 xcb_out.accessXTimeout = accessXTimeout; 5800 xcb_out.accessXTimeoutMask = accessXTimeoutMask; 5801 xcb_out.accessXTimeoutValues = accessXTimeoutValues; 5802 xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask; 5803 xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues; 5804 memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32); 5805 5806 xcb_parts[2].iov_base = (char *) &xcb_out; 5807 xcb_parts[2].iov_len = sizeof(xcb_out); 5808 xcb_parts[3].iov_base = 0; 5809 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5810 5811 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 5812 return xcb_ret; 5813 } 5814 5815 5816 /***************************************************************************** 5817 ** 5818 ** xcb_void_cookie_t xcb_xkb_set_controls 5819 ** 5820 ** @param xcb_connection_t *c 5821 ** @param xcb_xkb_device_spec_t deviceSpec 5822 ** @param uint8_t affectInternalRealMods 5823 ** @param uint8_t internalRealMods 5824 ** @param uint8_t affectIgnoreLockRealMods 5825 ** @param uint8_t ignoreLockRealMods 5826 ** @param uint16_t affectInternalVirtualMods 5827 ** @param uint16_t internalVirtualMods 5828 ** @param uint16_t affectIgnoreLockVirtualMods 5829 ** @param uint16_t ignoreLockVirtualMods 5830 ** @param uint8_t mouseKeysDfltBtn 5831 ** @param uint8_t groupsWrap 5832 ** @param xcb_xkb_ax_option_t accessXOptions 5833 ** @param uint32_t affectEnabledControls 5834 ** @param uint32_t enabledControls 5835 ** @param uint32_t changeControls 5836 ** @param uint16_t repeatDelay 5837 ** @param uint16_t repeatInterval 5838 ** @param uint16_t slowKeysDelay 5839 ** @param uint16_t debounceDelay 5840 ** @param uint16_t mouseKeysDelay 5841 ** @param uint16_t mouseKeysInterval 5842 ** @param uint16_t mouseKeysTimeToMax 5843 ** @param uint16_t mouseKeysMaxSpeed 5844 ** @param int16_t mouseKeysCurve 5845 ** @param uint16_t accessXTimeout 5846 ** @param uint32_t accessXTimeoutMask 5847 ** @param uint32_t accessXTimeoutValues 5848 ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsMask 5849 ** @param xcb_xkb_ax_option_t accessXTimeoutOptionsValues 5850 ** @param const uint8_t *perKeyRepeat 5851 ** @returns xcb_void_cookie_t 5852 ** 5853 *****************************************************************************/ 5854 5855 xcb_void_cookie_t 5856 xcb_xkb_set_controls (xcb_connection_t *c /**< */, 5857 xcb_xkb_device_spec_t deviceSpec /**< */, 5858 uint8_t affectInternalRealMods /**< */, 5859 uint8_t internalRealMods /**< */, 5860 uint8_t affectIgnoreLockRealMods /**< */, 5861 uint8_t ignoreLockRealMods /**< */, 5862 uint16_t affectInternalVirtualMods /**< */, 5863 uint16_t internalVirtualMods /**< */, 5864 uint16_t affectIgnoreLockVirtualMods /**< */, 5865 uint16_t ignoreLockVirtualMods /**< */, 5866 uint8_t mouseKeysDfltBtn /**< */, 5867 uint8_t groupsWrap /**< */, 5868 xcb_xkb_ax_option_t accessXOptions /**< */, 5869 uint32_t affectEnabledControls /**< */, 5870 uint32_t enabledControls /**< */, 5871 uint32_t changeControls /**< */, 5872 uint16_t repeatDelay /**< */, 5873 uint16_t repeatInterval /**< */, 5874 uint16_t slowKeysDelay /**< */, 5875 uint16_t debounceDelay /**< */, 5876 uint16_t mouseKeysDelay /**< */, 5877 uint16_t mouseKeysInterval /**< */, 5878 uint16_t mouseKeysTimeToMax /**< */, 5879 uint16_t mouseKeysMaxSpeed /**< */, 5880 int16_t mouseKeysCurve /**< */, 5881 uint16_t accessXTimeout /**< */, 5882 uint32_t accessXTimeoutMask /**< */, 5883 uint32_t accessXTimeoutValues /**< */, 5884 xcb_xkb_ax_option_t accessXTimeoutOptionsMask /**< */, 5885 xcb_xkb_ax_option_t accessXTimeoutOptionsValues /**< */, 5886 const uint8_t *perKeyRepeat /**< */) 5887 { 5888 static const xcb_protocol_request_t xcb_req = { 5889 /* count */ 2, 5890 /* ext */ &xcb_xkb_id, 5891 /* opcode */ XCB_XKB_SET_CONTROLS, 5892 /* isvoid */ 1 5893 }; 5894 5895 struct iovec xcb_parts[4]; 5896 xcb_void_cookie_t xcb_ret; 5897 xcb_xkb_set_controls_request_t xcb_out; 5898 5899 xcb_out.deviceSpec = deviceSpec; 5900 xcb_out.affectInternalRealMods = affectInternalRealMods; 5901 xcb_out.internalRealMods = internalRealMods; 5902 xcb_out.affectIgnoreLockRealMods = affectIgnoreLockRealMods; 5903 xcb_out.ignoreLockRealMods = ignoreLockRealMods; 5904 xcb_out.affectInternalVirtualMods = affectInternalVirtualMods; 5905 xcb_out.internalVirtualMods = internalVirtualMods; 5906 xcb_out.affectIgnoreLockVirtualMods = affectIgnoreLockVirtualMods; 5907 xcb_out.ignoreLockVirtualMods = ignoreLockVirtualMods; 5908 xcb_out.mouseKeysDfltBtn = mouseKeysDfltBtn; 5909 xcb_out.groupsWrap = groupsWrap; 5910 xcb_out.accessXOptions = accessXOptions; 5911 memset(xcb_out.pad0, 0, 2); 5912 xcb_out.affectEnabledControls = affectEnabledControls; 5913 xcb_out.enabledControls = enabledControls; 5914 xcb_out.changeControls = changeControls; 5915 xcb_out.repeatDelay = repeatDelay; 5916 xcb_out.repeatInterval = repeatInterval; 5917 xcb_out.slowKeysDelay = slowKeysDelay; 5918 xcb_out.debounceDelay = debounceDelay; 5919 xcb_out.mouseKeysDelay = mouseKeysDelay; 5920 xcb_out.mouseKeysInterval = mouseKeysInterval; 5921 xcb_out.mouseKeysTimeToMax = mouseKeysTimeToMax; 5922 xcb_out.mouseKeysMaxSpeed = mouseKeysMaxSpeed; 5923 xcb_out.mouseKeysCurve = mouseKeysCurve; 5924 xcb_out.accessXTimeout = accessXTimeout; 5925 xcb_out.accessXTimeoutMask = accessXTimeoutMask; 5926 xcb_out.accessXTimeoutValues = accessXTimeoutValues; 5927 xcb_out.accessXTimeoutOptionsMask = accessXTimeoutOptionsMask; 5928 xcb_out.accessXTimeoutOptionsValues = accessXTimeoutOptionsValues; 5929 memcpy(xcb_out.perKeyRepeat, perKeyRepeat, 32); 5930 5931 xcb_parts[2].iov_base = (char *) &xcb_out; 5932 xcb_parts[2].iov_len = sizeof(xcb_out); 5933 xcb_parts[3].iov_base = 0; 5934 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 5935 5936 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 5937 return xcb_ret; 5938 } 5939 5940 5941 /***************************************************************************** 5942 ** 5943 ** int xcb_xkb_get_map_map_types_rtrn_length 5944 ** 5945 ** @param const xcb_xkb_get_map_map_t *R 5946 ** @returns int 5947 ** 5948 *****************************************************************************/ 5949 5950 int 5951 xcb_xkb_get_map_map_types_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 5952 const xcb_xkb_get_map_map_t *S /**< */) 5953 { 5954 return R->nTypes; 5955 } 5956 5957 5958 /***************************************************************************** 5959 ** 5960 ** xcb_xkb_key_type_iterator_t xcb_xkb_get_map_map_types_rtrn_iterator 5961 ** 5962 ** @param const xcb_xkb_get_map_map_t *R 5963 ** @returns xcb_xkb_key_type_iterator_t 5964 ** 5965 *****************************************************************************/ 5966 5967 xcb_xkb_key_type_iterator_t 5968 xcb_xkb_get_map_map_types_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 5969 const xcb_xkb_get_map_map_t *S /**< */) 5970 { 5971 xcb_xkb_key_type_iterator_t i; 5972 i.data = /* map */ S->types_rtrn; 5973 i.rem = R->nTypes; 5974 i.index = (char *) i.data - (char *) S; 5975 return i; 5976 } 5977 5978 5979 /***************************************************************************** 5980 ** 5981 ** int xcb_xkb_get_map_map_syms_rtrn_length 5982 ** 5983 ** @param const xcb_xkb_get_map_map_t *R 5984 ** @returns int 5985 ** 5986 *****************************************************************************/ 5987 5988 int 5989 xcb_xkb_get_map_map_syms_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 5990 const xcb_xkb_get_map_map_t *S /**< */) 5991 { 5992 return R->nKeySyms; 5993 } 5994 5995 5996 /***************************************************************************** 5997 ** 5998 ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_map_map_syms_rtrn_iterator 5999 ** 6000 ** @param const xcb_xkb_get_map_map_t *R 6001 ** @returns xcb_xkb_key_sym_map_iterator_t 6002 ** 6003 *****************************************************************************/ 6004 6005 xcb_xkb_key_sym_map_iterator_t 6006 xcb_xkb_get_map_map_syms_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6007 const xcb_xkb_get_map_map_t *S /**< */) 6008 { 6009 xcb_xkb_key_sym_map_iterator_t i; 6010 i.data = /* map */ S->syms_rtrn; 6011 i.rem = R->nKeySyms; 6012 i.index = (char *) i.data - (char *) S; 6013 return i; 6014 } 6015 6016 6017 /***************************************************************************** 6018 ** 6019 ** uint8_t * xcb_xkb_get_map_map_acts_rtrn_count 6020 ** 6021 ** @param const xcb_xkb_get_map_map_t *S 6022 ** @returns uint8_t * 6023 ** 6024 *****************************************************************************/ 6025 6026 uint8_t * 6027 xcb_xkb_get_map_map_acts_rtrn_count (const xcb_xkb_get_map_map_t *S /**< */) 6028 { 6029 return /* map */ S->acts_rtrn_count; 6030 } 6031 6032 6033 /***************************************************************************** 6034 ** 6035 ** int xcb_xkb_get_map_map_acts_rtrn_count_length 6036 ** 6037 ** @param const xcb_xkb_get_map_map_t *R 6038 ** @returns int 6039 ** 6040 *****************************************************************************/ 6041 6042 int 6043 xcb_xkb_get_map_map_acts_rtrn_count_length (const xcb_xkb_get_map_reply_t *R /**< */, 6044 const xcb_xkb_get_map_map_t *S /**< */) 6045 { 6046 return R->nKeyActions; 6047 } 6048 6049 6050 /***************************************************************************** 6051 ** 6052 ** xcb_generic_iterator_t xcb_xkb_get_map_map_acts_rtrn_count_end 6053 ** 6054 ** @param const xcb_xkb_get_map_map_t *R 6055 ** @returns xcb_generic_iterator_t 6056 ** 6057 *****************************************************************************/ 6058 6059 xcb_generic_iterator_t 6060 xcb_xkb_get_map_map_acts_rtrn_count_end (const xcb_xkb_get_map_reply_t *R /**< */, 6061 const xcb_xkb_get_map_map_t *S /**< */) 6062 { 6063 xcb_generic_iterator_t i; 6064 i.data = /* map */ S->acts_rtrn_count + R->nKeyActions; 6065 i.rem = 0; 6066 i.index = (char *) i.data - (char *) S; 6067 return i; 6068 } 6069 6070 6071 /***************************************************************************** 6072 ** 6073 ** xcb_xkb_action_t * xcb_xkb_get_map_map_acts_rtrn_acts 6074 ** 6075 ** @param const xcb_xkb_get_map_map_t *S 6076 ** @returns xcb_xkb_action_t * 6077 ** 6078 *****************************************************************************/ 6079 6080 xcb_xkb_action_t * 6081 xcb_xkb_get_map_map_acts_rtrn_acts (const xcb_xkb_get_map_map_t *S /**< */) 6082 { 6083 return /* map */ S->acts_rtrn_acts; 6084 } 6085 6086 6087 /***************************************************************************** 6088 ** 6089 ** int xcb_xkb_get_map_map_acts_rtrn_acts_length 6090 ** 6091 ** @param const xcb_xkb_get_map_map_t *R 6092 ** @returns int 6093 ** 6094 *****************************************************************************/ 6095 6096 int 6097 xcb_xkb_get_map_map_acts_rtrn_acts_length (const xcb_xkb_get_map_reply_t *R /**< */, 6098 const xcb_xkb_get_map_map_t *S /**< */) 6099 { 6100 return R->totalActions; 6101 } 6102 6103 6104 /***************************************************************************** 6105 ** 6106 ** xcb_xkb_action_iterator_t xcb_xkb_get_map_map_acts_rtrn_acts_iterator 6107 ** 6108 ** @param const xcb_xkb_get_map_map_t *R 6109 ** @returns xcb_xkb_action_iterator_t 6110 ** 6111 *****************************************************************************/ 6112 6113 xcb_xkb_action_iterator_t 6114 xcb_xkb_get_map_map_acts_rtrn_acts_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6115 const xcb_xkb_get_map_map_t *S /**< */) 6116 { 6117 xcb_xkb_action_iterator_t i; 6118 i.data = /* map */ S->acts_rtrn_acts; 6119 i.rem = R->totalActions; 6120 i.index = (char *) i.data - (char *) S; 6121 return i; 6122 } 6123 6124 6125 /***************************************************************************** 6126 ** 6127 ** xcb_xkb_set_behavior_t * xcb_xkb_get_map_map_behaviors_rtrn 6128 ** 6129 ** @param const xcb_xkb_get_map_map_t *S 6130 ** @returns xcb_xkb_set_behavior_t * 6131 ** 6132 *****************************************************************************/ 6133 6134 xcb_xkb_set_behavior_t * 6135 xcb_xkb_get_map_map_behaviors_rtrn (const xcb_xkb_get_map_map_t *S /**< */) 6136 { 6137 return /* map */ S->behaviors_rtrn; 6138 } 6139 6140 6141 /***************************************************************************** 6142 ** 6143 ** int xcb_xkb_get_map_map_behaviors_rtrn_length 6144 ** 6145 ** @param const xcb_xkb_get_map_map_t *R 6146 ** @returns int 6147 ** 6148 *****************************************************************************/ 6149 6150 int 6151 xcb_xkb_get_map_map_behaviors_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 6152 const xcb_xkb_get_map_map_t *S /**< */) 6153 { 6154 return R->totalKeyBehaviors; 6155 } 6156 6157 6158 /***************************************************************************** 6159 ** 6160 ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_map_map_behaviors_rtrn_iterator 6161 ** 6162 ** @param const xcb_xkb_get_map_map_t *R 6163 ** @returns xcb_xkb_set_behavior_iterator_t 6164 ** 6165 *****************************************************************************/ 6166 6167 xcb_xkb_set_behavior_iterator_t 6168 xcb_xkb_get_map_map_behaviors_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6169 const xcb_xkb_get_map_map_t *S /**< */) 6170 { 6171 xcb_xkb_set_behavior_iterator_t i; 6172 i.data = /* map */ S->behaviors_rtrn; 6173 i.rem = R->totalKeyBehaviors; 6174 i.index = (char *) i.data - (char *) S; 6175 return i; 6176 } 6177 6178 6179 /***************************************************************************** 6180 ** 6181 ** uint8_t * xcb_xkb_get_map_map_vmods_rtrn 6182 ** 6183 ** @param const xcb_xkb_get_map_map_t *S 6184 ** @returns uint8_t * 6185 ** 6186 *****************************************************************************/ 6187 6188 uint8_t * 6189 xcb_xkb_get_map_map_vmods_rtrn (const xcb_xkb_get_map_map_t *S /**< */) 6190 { 6191 return /* map */ S->vmods_rtrn; 6192 } 6193 6194 6195 /***************************************************************************** 6196 ** 6197 ** int xcb_xkb_get_map_map_vmods_rtrn_length 6198 ** 6199 ** @param const xcb_xkb_get_map_map_t *R 6200 ** @returns int 6201 ** 6202 *****************************************************************************/ 6203 6204 int 6205 xcb_xkb_get_map_map_vmods_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 6206 const xcb_xkb_get_map_map_t *S /**< */) 6207 { 6208 return R->nVModMapKeys; 6209 } 6210 6211 6212 /***************************************************************************** 6213 ** 6214 ** xcb_generic_iterator_t xcb_xkb_get_map_map_vmods_rtrn_end 6215 ** 6216 ** @param const xcb_xkb_get_map_map_t *R 6217 ** @returns xcb_generic_iterator_t 6218 ** 6219 *****************************************************************************/ 6220 6221 xcb_generic_iterator_t 6222 xcb_xkb_get_map_map_vmods_rtrn_end (const xcb_xkb_get_map_reply_t *R /**< */, 6223 const xcb_xkb_get_map_map_t *S /**< */) 6224 { 6225 xcb_generic_iterator_t i; 6226 i.data = /* map */ S->vmods_rtrn + R->nVModMapKeys; 6227 i.rem = 0; 6228 i.index = (char *) i.data - (char *) S; 6229 return i; 6230 } 6231 6232 6233 /***************************************************************************** 6234 ** 6235 ** xcb_xkb_set_explicit_t * xcb_xkb_get_map_map_explicit_rtrn 6236 ** 6237 ** @param const xcb_xkb_get_map_map_t *S 6238 ** @returns xcb_xkb_set_explicit_t * 6239 ** 6240 *****************************************************************************/ 6241 6242 xcb_xkb_set_explicit_t * 6243 xcb_xkb_get_map_map_explicit_rtrn (const xcb_xkb_get_map_map_t *S /**< */) 6244 { 6245 return /* map */ S->explicit_rtrn; 6246 } 6247 6248 6249 /***************************************************************************** 6250 ** 6251 ** int xcb_xkb_get_map_map_explicit_rtrn_length 6252 ** 6253 ** @param const xcb_xkb_get_map_map_t *R 6254 ** @returns int 6255 ** 6256 *****************************************************************************/ 6257 6258 int 6259 xcb_xkb_get_map_map_explicit_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 6260 const xcb_xkb_get_map_map_t *S /**< */) 6261 { 6262 return R->totalKeyExplicit; 6263 } 6264 6265 6266 /***************************************************************************** 6267 ** 6268 ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_map_map_explicit_rtrn_iterator 6269 ** 6270 ** @param const xcb_xkb_get_map_map_t *R 6271 ** @returns xcb_xkb_set_explicit_iterator_t 6272 ** 6273 *****************************************************************************/ 6274 6275 xcb_xkb_set_explicit_iterator_t 6276 xcb_xkb_get_map_map_explicit_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6277 const xcb_xkb_get_map_map_t *S /**< */) 6278 { 6279 xcb_xkb_set_explicit_iterator_t i; 6280 i.data = /* map */ S->explicit_rtrn; 6281 i.rem = R->totalKeyExplicit; 6282 i.index = (char *) i.data - (char *) S; 6283 return i; 6284 } 6285 6286 6287 /***************************************************************************** 6288 ** 6289 ** xcb_xkb_key_mod_map_t * xcb_xkb_get_map_map_modmap_rtrn 6290 ** 6291 ** @param const xcb_xkb_get_map_map_t *S 6292 ** @returns xcb_xkb_key_mod_map_t * 6293 ** 6294 *****************************************************************************/ 6295 6296 xcb_xkb_key_mod_map_t * 6297 xcb_xkb_get_map_map_modmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */) 6298 { 6299 return /* map */ S->modmap_rtrn; 6300 } 6301 6302 6303 /***************************************************************************** 6304 ** 6305 ** int xcb_xkb_get_map_map_modmap_rtrn_length 6306 ** 6307 ** @param const xcb_xkb_get_map_map_t *R 6308 ** @returns int 6309 ** 6310 *****************************************************************************/ 6311 6312 int 6313 xcb_xkb_get_map_map_modmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 6314 const xcb_xkb_get_map_map_t *S /**< */) 6315 { 6316 return R->totalModMapKeys; 6317 } 6318 6319 6320 /***************************************************************************** 6321 ** 6322 ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_map_map_modmap_rtrn_iterator 6323 ** 6324 ** @param const xcb_xkb_get_map_map_t *R 6325 ** @returns xcb_xkb_key_mod_map_iterator_t 6326 ** 6327 *****************************************************************************/ 6328 6329 xcb_xkb_key_mod_map_iterator_t 6330 xcb_xkb_get_map_map_modmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6331 const xcb_xkb_get_map_map_t *S /**< */) 6332 { 6333 xcb_xkb_key_mod_map_iterator_t i; 6334 i.data = /* map */ S->modmap_rtrn; 6335 i.rem = R->totalModMapKeys; 6336 i.index = (char *) i.data - (char *) S; 6337 return i; 6338 } 6339 6340 6341 /***************************************************************************** 6342 ** 6343 ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_map_map_vmodmap_rtrn 6344 ** 6345 ** @param const xcb_xkb_get_map_map_t *S 6346 ** @returns xcb_xkb_key_v_mod_map_t * 6347 ** 6348 *****************************************************************************/ 6349 6350 xcb_xkb_key_v_mod_map_t * 6351 xcb_xkb_get_map_map_vmodmap_rtrn (const xcb_xkb_get_map_map_t *S /**< */) 6352 { 6353 return /* map */ S->vmodmap_rtrn; 6354 } 6355 6356 6357 /***************************************************************************** 6358 ** 6359 ** int xcb_xkb_get_map_map_vmodmap_rtrn_length 6360 ** 6361 ** @param const xcb_xkb_get_map_map_t *R 6362 ** @returns int 6363 ** 6364 *****************************************************************************/ 6365 6366 int 6367 xcb_xkb_get_map_map_vmodmap_rtrn_length (const xcb_xkb_get_map_reply_t *R /**< */, 6368 const xcb_xkb_get_map_map_t *S /**< */) 6369 { 6370 return R->totalVModMapKeys; 6371 } 6372 6373 6374 /***************************************************************************** 6375 ** 6376 ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_map_map_vmodmap_rtrn_iterator 6377 ** 6378 ** @param const xcb_xkb_get_map_map_t *R 6379 ** @returns xcb_xkb_key_v_mod_map_iterator_t 6380 ** 6381 *****************************************************************************/ 6382 6383 xcb_xkb_key_v_mod_map_iterator_t 6384 xcb_xkb_get_map_map_vmodmap_rtrn_iterator (const xcb_xkb_get_map_reply_t *R /**< */, 6385 const xcb_xkb_get_map_map_t *S /**< */) 6386 { 6387 xcb_xkb_key_v_mod_map_iterator_t i; 6388 i.data = /* map */ S->vmodmap_rtrn; 6389 i.rem = R->totalVModMapKeys; 6390 i.index = (char *) i.data - (char *) S; 6391 return i; 6392 } 6393 6394 int 6395 xcb_xkb_get_map_map_serialize (void **_buffer /**< */, 6396 uint8_t nTypes /**< */, 6397 uint8_t nKeySyms /**< */, 6398 uint8_t nKeyActions /**< */, 6399 uint16_t totalActions /**< */, 6400 uint8_t totalKeyBehaviors /**< */, 6401 uint8_t nVModMapKeys /**< */, 6402 uint8_t totalKeyExplicit /**< */, 6403 uint8_t totalModMapKeys /**< */, 6404 uint8_t totalVModMapKeys /**< */, 6405 uint16_t present /**< */, 6406 const xcb_xkb_get_map_map_t *_aux /**< */) 6407 { 6408 char *xcb_out = *_buffer; 6409 unsigned int xcb_buffer_len = 0; 6410 unsigned int xcb_align_to; 6411 6412 unsigned int xcb_pad = 0; 6413 char xcb_pad0[3] = {0, 0, 0}; 6414 struct iovec xcb_parts[19]; 6415 unsigned int xcb_parts_idx = 0; 6416 unsigned int xcb_block_len = 0; 6417 unsigned int i; 6418 char *xcb_tmp; 6419 6420 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 6421 /* insert padding */ 6422 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6423 xcb_buffer_len += xcb_block_len + xcb_pad; 6424 if (0 != xcb_pad) { 6425 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6426 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6427 xcb_parts_idx++; 6428 xcb_pad = 0; 6429 } 6430 xcb_block_len = 0; 6431 /* types_rtrn */ 6432 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn; 6433 xcb_parts[xcb_parts_idx].iov_len = 0; 6434 xcb_tmp = (char *) _aux->types_rtrn; 6435 for(i=0; i<nTypes; i++) { 6436 xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp); 6437 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 6438 } 6439 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 6440 xcb_parts_idx++; 6441 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 6442 } 6443 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 6444 /* insert padding */ 6445 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6446 xcb_buffer_len += xcb_block_len + xcb_pad; 6447 if (0 != xcb_pad) { 6448 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6449 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6450 xcb_parts_idx++; 6451 xcb_pad = 0; 6452 } 6453 xcb_block_len = 0; 6454 /* syms_rtrn */ 6455 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn; 6456 xcb_parts[xcb_parts_idx].iov_len = 0; 6457 xcb_tmp = (char *) _aux->syms_rtrn; 6458 for(i=0; i<nKeySyms; i++) { 6459 xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 6460 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 6461 } 6462 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 6463 xcb_parts_idx++; 6464 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 6465 } 6466 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 6467 /* insert padding */ 6468 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6469 xcb_buffer_len += xcb_block_len + xcb_pad; 6470 if (0 != xcb_pad) { 6471 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6472 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6473 xcb_parts_idx++; 6474 xcb_pad = 0; 6475 } 6476 xcb_block_len = 0; 6477 /* acts_rtrn_count */ 6478 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count; 6479 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 6480 xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t); 6481 xcb_parts_idx++; 6482 xcb_align_to = ALIGNOF(uint8_t); 6483 /* insert padding */ 6484 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6485 xcb_buffer_len += xcb_block_len + xcb_pad; 6486 if (0 != xcb_pad) { 6487 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6488 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6489 xcb_parts_idx++; 6490 xcb_pad = 0; 6491 } 6492 xcb_block_len = 0; 6493 /* acts_rtrn_acts */ 6494 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts; 6495 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 6496 xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t); 6497 xcb_parts_idx++; 6498 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 6499 } 6500 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 6501 /* insert padding */ 6502 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6503 xcb_buffer_len += xcb_block_len + xcb_pad; 6504 if (0 != xcb_pad) { 6505 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6506 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6507 xcb_parts_idx++; 6508 xcb_pad = 0; 6509 } 6510 xcb_block_len = 0; 6511 /* behaviors_rtrn */ 6512 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn; 6513 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 6514 xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 6515 xcb_parts_idx++; 6516 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 6517 } 6518 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 6519 /* insert padding */ 6520 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6521 xcb_buffer_len += xcb_block_len + xcb_pad; 6522 if (0 != xcb_pad) { 6523 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6524 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6525 xcb_parts_idx++; 6526 xcb_pad = 0; 6527 } 6528 xcb_block_len = 0; 6529 /* vmods_rtrn */ 6530 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn; 6531 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 6532 xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t); 6533 xcb_parts_idx++; 6534 xcb_align_to = ALIGNOF(uint8_t); 6535 } 6536 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 6537 /* insert padding */ 6538 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6539 xcb_buffer_len += xcb_block_len + xcb_pad; 6540 if (0 != xcb_pad) { 6541 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6542 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6543 xcb_parts_idx++; 6544 xcb_pad = 0; 6545 } 6546 xcb_block_len = 0; 6547 /* explicit_rtrn */ 6548 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn; 6549 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 6550 xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 6551 xcb_parts_idx++; 6552 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 6553 } 6554 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 6555 /* insert padding */ 6556 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6557 xcb_buffer_len += xcb_block_len + xcb_pad; 6558 if (0 != xcb_pad) { 6559 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6560 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6561 xcb_parts_idx++; 6562 xcb_pad = 0; 6563 } 6564 xcb_block_len = 0; 6565 /* modmap_rtrn */ 6566 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn; 6567 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 6568 xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 6569 xcb_parts_idx++; 6570 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 6571 } 6572 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 6573 /* insert padding */ 6574 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6575 xcb_buffer_len += xcb_block_len + xcb_pad; 6576 if (0 != xcb_pad) { 6577 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6578 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6579 xcb_parts_idx++; 6580 xcb_pad = 0; 6581 } 6582 xcb_block_len = 0; 6583 /* vmodmap_rtrn */ 6584 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn; 6585 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 6586 xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 6587 xcb_parts_idx++; 6588 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 6589 } 6590 /* insert padding */ 6591 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6592 xcb_buffer_len += xcb_block_len + xcb_pad; 6593 if (0 != xcb_pad) { 6594 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 6595 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 6596 xcb_parts_idx++; 6597 xcb_pad = 0; 6598 } 6599 xcb_block_len = 0; 6600 6601 if (NULL == xcb_out) { 6602 /* allocate memory */ 6603 xcb_out = malloc(xcb_buffer_len); 6604 *_buffer = xcb_out; 6605 } 6606 6607 xcb_tmp = xcb_out; 6608 for(i=0; i<xcb_parts_idx; i++) { 6609 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 6610 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 6611 if (0 != xcb_parts[i].iov_len) 6612 xcb_tmp += xcb_parts[i].iov_len; 6613 } 6614 6615 return xcb_buffer_len; 6616 } 6617 6618 int 6619 xcb_xkb_get_map_map_unpack (const void *_buffer /**< */, 6620 uint8_t nTypes /**< */, 6621 uint8_t nKeySyms /**< */, 6622 uint8_t nKeyActions /**< */, 6623 uint16_t totalActions /**< */, 6624 uint8_t totalKeyBehaviors /**< */, 6625 uint8_t nVModMapKeys /**< */, 6626 uint8_t totalKeyExplicit /**< */, 6627 uint8_t totalModMapKeys /**< */, 6628 uint8_t totalVModMapKeys /**< */, 6629 uint16_t present /**< */, 6630 xcb_xkb_get_map_map_t *_aux /**< */) 6631 { 6632 char *xcb_tmp = (char *)_buffer; 6633 unsigned int xcb_buffer_len = 0; 6634 unsigned int xcb_block_len = 0; 6635 unsigned int xcb_pad = 0; 6636 unsigned int xcb_align_to; 6637 6638 unsigned int i; 6639 unsigned int xcb_tmp_len; 6640 6641 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 6642 /* insert padding */ 6643 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6644 xcb_buffer_len += xcb_block_len + xcb_pad; 6645 if (0 != xcb_pad) { 6646 xcb_tmp += xcb_pad; 6647 xcb_pad = 0; 6648 } 6649 xcb_block_len = 0; 6650 /* types_rtrn */ 6651 _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp; 6652 for(i=0; i<nTypes; i++) { 6653 xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp); 6654 xcb_block_len += xcb_tmp_len; 6655 xcb_tmp += xcb_tmp_len; 6656 } 6657 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 6658 } 6659 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 6660 /* insert padding */ 6661 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6662 xcb_buffer_len += xcb_block_len + xcb_pad; 6663 if (0 != xcb_pad) { 6664 xcb_tmp += xcb_pad; 6665 xcb_pad = 0; 6666 } 6667 xcb_block_len = 0; 6668 /* syms_rtrn */ 6669 _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp; 6670 for(i=0; i<nKeySyms; i++) { 6671 xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 6672 xcb_block_len += xcb_tmp_len; 6673 xcb_tmp += xcb_tmp_len; 6674 } 6675 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 6676 } 6677 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 6678 /* insert padding */ 6679 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6680 xcb_buffer_len += xcb_block_len + xcb_pad; 6681 if (0 != xcb_pad) { 6682 xcb_tmp += xcb_pad; 6683 xcb_pad = 0; 6684 } 6685 xcb_block_len = 0; 6686 /* acts_rtrn_count */ 6687 _aux->acts_rtrn_count = (uint8_t *)xcb_tmp; 6688 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 6689 xcb_tmp += xcb_block_len; 6690 xcb_align_to = ALIGNOF(uint8_t); 6691 /* insert padding */ 6692 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6693 xcb_buffer_len += xcb_block_len + xcb_pad; 6694 if (0 != xcb_pad) { 6695 xcb_tmp += xcb_pad; 6696 xcb_pad = 0; 6697 } 6698 xcb_block_len = 0; 6699 /* acts_rtrn_acts */ 6700 _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp; 6701 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 6702 xcb_tmp += xcb_block_len; 6703 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 6704 } 6705 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 6706 /* insert padding */ 6707 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6708 xcb_buffer_len += xcb_block_len + xcb_pad; 6709 if (0 != xcb_pad) { 6710 xcb_tmp += xcb_pad; 6711 xcb_pad = 0; 6712 } 6713 xcb_block_len = 0; 6714 /* behaviors_rtrn */ 6715 _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp; 6716 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 6717 xcb_tmp += xcb_block_len; 6718 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 6719 } 6720 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 6721 /* insert padding */ 6722 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6723 xcb_buffer_len += xcb_block_len + xcb_pad; 6724 if (0 != xcb_pad) { 6725 xcb_tmp += xcb_pad; 6726 xcb_pad = 0; 6727 } 6728 xcb_block_len = 0; 6729 /* vmods_rtrn */ 6730 _aux->vmods_rtrn = (uint8_t *)xcb_tmp; 6731 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 6732 xcb_tmp += xcb_block_len; 6733 xcb_align_to = ALIGNOF(uint8_t); 6734 } 6735 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 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 /* explicit_rtrn */ 6745 _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp; 6746 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 6747 xcb_tmp += xcb_block_len; 6748 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 6749 } 6750 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 6751 /* insert padding */ 6752 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6753 xcb_buffer_len += xcb_block_len + xcb_pad; 6754 if (0 != xcb_pad) { 6755 xcb_tmp += xcb_pad; 6756 xcb_pad = 0; 6757 } 6758 xcb_block_len = 0; 6759 /* modmap_rtrn */ 6760 _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp; 6761 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 6762 xcb_tmp += xcb_block_len; 6763 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 6764 } 6765 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 6766 /* insert padding */ 6767 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6768 xcb_buffer_len += xcb_block_len + xcb_pad; 6769 if (0 != xcb_pad) { 6770 xcb_tmp += xcb_pad; 6771 xcb_pad = 0; 6772 } 6773 xcb_block_len = 0; 6774 /* vmodmap_rtrn */ 6775 _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp; 6776 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 6777 xcb_tmp += xcb_block_len; 6778 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 6779 } 6780 /* insert padding */ 6781 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 6782 xcb_buffer_len += xcb_block_len + xcb_pad; 6783 if (0 != xcb_pad) { 6784 xcb_tmp += xcb_pad; 6785 xcb_pad = 0; 6786 } 6787 xcb_block_len = 0; 6788 6789 return xcb_buffer_len; 6790 } 6791 6792 int 6793 xcb_xkb_get_map_map_sizeof (const void *_buffer /**< */, 6794 uint8_t nTypes /**< */, 6795 uint8_t nKeySyms /**< */, 6796 uint8_t nKeyActions /**< */, 6797 uint16_t totalActions /**< */, 6798 uint8_t totalKeyBehaviors /**< */, 6799 uint8_t nVModMapKeys /**< */, 6800 uint8_t totalKeyExplicit /**< */, 6801 uint8_t totalModMapKeys /**< */, 6802 uint8_t totalVModMapKeys /**< */, 6803 uint16_t present /**< */) 6804 { 6805 xcb_xkb_get_map_map_t _aux; 6806 return xcb_xkb_get_map_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux); 6807 } 6808 6809 6810 /***************************************************************************** 6811 ** 6812 ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map 6813 ** 6814 ** @param xcb_connection_t *c 6815 ** @param xcb_xkb_device_spec_t deviceSpec 6816 ** @param uint16_t full 6817 ** @param uint16_t partial 6818 ** @param uint8_t firstType 6819 ** @param uint8_t nTypes 6820 ** @param xcb_keycode_t firstKeySym 6821 ** @param uint8_t nKeySyms 6822 ** @param xcb_keycode_t firstKeyAction 6823 ** @param uint8_t nKeyActions 6824 ** @param xcb_keycode_t firstKeyBehavior 6825 ** @param uint8_t nKeyBehaviors 6826 ** @param uint16_t virtualMods 6827 ** @param xcb_keycode_t firstKeyExplicit 6828 ** @param uint8_t nKeyExplicit 6829 ** @param xcb_keycode_t firstModMapKey 6830 ** @param uint8_t nModMapKeys 6831 ** @param xcb_keycode_t firstVModMapKey 6832 ** @param uint8_t nVModMapKeys 6833 ** @returns xcb_xkb_get_map_cookie_t 6834 ** 6835 *****************************************************************************/ 6836 6837 xcb_xkb_get_map_cookie_t 6838 xcb_xkb_get_map (xcb_connection_t *c /**< */, 6839 xcb_xkb_device_spec_t deviceSpec /**< */, 6840 uint16_t full /**< */, 6841 uint16_t partial /**< */, 6842 uint8_t firstType /**< */, 6843 uint8_t nTypes /**< */, 6844 xcb_keycode_t firstKeySym /**< */, 6845 uint8_t nKeySyms /**< */, 6846 xcb_keycode_t firstKeyAction /**< */, 6847 uint8_t nKeyActions /**< */, 6848 xcb_keycode_t firstKeyBehavior /**< */, 6849 uint8_t nKeyBehaviors /**< */, 6850 uint16_t virtualMods /**< */, 6851 xcb_keycode_t firstKeyExplicit /**< */, 6852 uint8_t nKeyExplicit /**< */, 6853 xcb_keycode_t firstModMapKey /**< */, 6854 uint8_t nModMapKeys /**< */, 6855 xcb_keycode_t firstVModMapKey /**< */, 6856 uint8_t nVModMapKeys /**< */) 6857 { 6858 static const xcb_protocol_request_t xcb_req = { 6859 /* count */ 2, 6860 /* ext */ &xcb_xkb_id, 6861 /* opcode */ XCB_XKB_GET_MAP, 6862 /* isvoid */ 0 6863 }; 6864 6865 struct iovec xcb_parts[4]; 6866 xcb_xkb_get_map_cookie_t xcb_ret; 6867 xcb_xkb_get_map_request_t xcb_out; 6868 6869 xcb_out.deviceSpec = deviceSpec; 6870 xcb_out.full = full; 6871 xcb_out.partial = partial; 6872 xcb_out.firstType = firstType; 6873 xcb_out.nTypes = nTypes; 6874 xcb_out.firstKeySym = firstKeySym; 6875 xcb_out.nKeySyms = nKeySyms; 6876 xcb_out.firstKeyAction = firstKeyAction; 6877 xcb_out.nKeyActions = nKeyActions; 6878 xcb_out.firstKeyBehavior = firstKeyBehavior; 6879 xcb_out.nKeyBehaviors = nKeyBehaviors; 6880 xcb_out.virtualMods = virtualMods; 6881 xcb_out.firstKeyExplicit = firstKeyExplicit; 6882 xcb_out.nKeyExplicit = nKeyExplicit; 6883 xcb_out.firstModMapKey = firstModMapKey; 6884 xcb_out.nModMapKeys = nModMapKeys; 6885 xcb_out.firstVModMapKey = firstVModMapKey; 6886 xcb_out.nVModMapKeys = nVModMapKeys; 6887 memset(xcb_out.pad0, 0, 2); 6888 6889 xcb_parts[2].iov_base = (char *) &xcb_out; 6890 xcb_parts[2].iov_len = sizeof(xcb_out); 6891 xcb_parts[3].iov_base = 0; 6892 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6893 6894 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 6895 return xcb_ret; 6896 } 6897 6898 6899 /***************************************************************************** 6900 ** 6901 ** xcb_xkb_get_map_cookie_t xcb_xkb_get_map_unchecked 6902 ** 6903 ** @param xcb_connection_t *c 6904 ** @param xcb_xkb_device_spec_t deviceSpec 6905 ** @param uint16_t full 6906 ** @param uint16_t partial 6907 ** @param uint8_t firstType 6908 ** @param uint8_t nTypes 6909 ** @param xcb_keycode_t firstKeySym 6910 ** @param uint8_t nKeySyms 6911 ** @param xcb_keycode_t firstKeyAction 6912 ** @param uint8_t nKeyActions 6913 ** @param xcb_keycode_t firstKeyBehavior 6914 ** @param uint8_t nKeyBehaviors 6915 ** @param uint16_t virtualMods 6916 ** @param xcb_keycode_t firstKeyExplicit 6917 ** @param uint8_t nKeyExplicit 6918 ** @param xcb_keycode_t firstModMapKey 6919 ** @param uint8_t nModMapKeys 6920 ** @param xcb_keycode_t firstVModMapKey 6921 ** @param uint8_t nVModMapKeys 6922 ** @returns xcb_xkb_get_map_cookie_t 6923 ** 6924 *****************************************************************************/ 6925 6926 xcb_xkb_get_map_cookie_t 6927 xcb_xkb_get_map_unchecked (xcb_connection_t *c /**< */, 6928 xcb_xkb_device_spec_t deviceSpec /**< */, 6929 uint16_t full /**< */, 6930 uint16_t partial /**< */, 6931 uint8_t firstType /**< */, 6932 uint8_t nTypes /**< */, 6933 xcb_keycode_t firstKeySym /**< */, 6934 uint8_t nKeySyms /**< */, 6935 xcb_keycode_t firstKeyAction /**< */, 6936 uint8_t nKeyActions /**< */, 6937 xcb_keycode_t firstKeyBehavior /**< */, 6938 uint8_t nKeyBehaviors /**< */, 6939 uint16_t virtualMods /**< */, 6940 xcb_keycode_t firstKeyExplicit /**< */, 6941 uint8_t nKeyExplicit /**< */, 6942 xcb_keycode_t firstModMapKey /**< */, 6943 uint8_t nModMapKeys /**< */, 6944 xcb_keycode_t firstVModMapKey /**< */, 6945 uint8_t nVModMapKeys /**< */) 6946 { 6947 static const xcb_protocol_request_t xcb_req = { 6948 /* count */ 2, 6949 /* ext */ &xcb_xkb_id, 6950 /* opcode */ XCB_XKB_GET_MAP, 6951 /* isvoid */ 0 6952 }; 6953 6954 struct iovec xcb_parts[4]; 6955 xcb_xkb_get_map_cookie_t xcb_ret; 6956 xcb_xkb_get_map_request_t xcb_out; 6957 6958 xcb_out.deviceSpec = deviceSpec; 6959 xcb_out.full = full; 6960 xcb_out.partial = partial; 6961 xcb_out.firstType = firstType; 6962 xcb_out.nTypes = nTypes; 6963 xcb_out.firstKeySym = firstKeySym; 6964 xcb_out.nKeySyms = nKeySyms; 6965 xcb_out.firstKeyAction = firstKeyAction; 6966 xcb_out.nKeyActions = nKeyActions; 6967 xcb_out.firstKeyBehavior = firstKeyBehavior; 6968 xcb_out.nKeyBehaviors = nKeyBehaviors; 6969 xcb_out.virtualMods = virtualMods; 6970 xcb_out.firstKeyExplicit = firstKeyExplicit; 6971 xcb_out.nKeyExplicit = nKeyExplicit; 6972 xcb_out.firstModMapKey = firstModMapKey; 6973 xcb_out.nModMapKeys = nModMapKeys; 6974 xcb_out.firstVModMapKey = firstVModMapKey; 6975 xcb_out.nVModMapKeys = nVModMapKeys; 6976 memset(xcb_out.pad0, 0, 2); 6977 6978 xcb_parts[2].iov_base = (char *) &xcb_out; 6979 xcb_parts[2].iov_len = sizeof(xcb_out); 6980 xcb_parts[3].iov_base = 0; 6981 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 6982 6983 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 6984 return xcb_ret; 6985 } 6986 6987 6988 /***************************************************************************** 6989 ** 6990 ** xcb_xkb_get_map_map_t * xcb_xkb_get_map_map 6991 ** 6992 ** @param const xcb_xkb_get_map_reply_t *R 6993 ** @returns xcb_xkb_get_map_map_t * 6994 ** 6995 *****************************************************************************/ 6996 6997 void * 6998 xcb_xkb_get_map_map (const xcb_xkb_get_map_reply_t *R /**< */) 6999 { 7000 return (void *) (R + 1); 7001 } 7002 7003 7004 /***************************************************************************** 7005 ** 7006 ** xcb_xkb_get_map_reply_t * xcb_xkb_get_map_reply 7007 ** 7008 ** @param xcb_connection_t *c 7009 ** @param xcb_xkb_get_map_cookie_t cookie 7010 ** @param xcb_generic_error_t **e 7011 ** @returns xcb_xkb_get_map_reply_t * 7012 ** 7013 *****************************************************************************/ 7014 7015 xcb_xkb_get_map_reply_t * 7016 xcb_xkb_get_map_reply (xcb_connection_t *c /**< */, 7017 xcb_xkb_get_map_cookie_t cookie /**< */, 7018 xcb_generic_error_t **e /**< */) 7019 { 7020 return (xcb_xkb_get_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 7021 } 7022 7023 7024 /***************************************************************************** 7025 ** 7026 ** int xcb_xkb_set_map_values_types_length 7027 ** 7028 ** @param const xcb_xkb_set_map_values_t *R 7029 ** @returns int 7030 ** 7031 *****************************************************************************/ 7032 7033 int 7034 xcb_xkb_set_map_values_types_length (const xcb_xkb_set_map_request_t *R /**< */, 7035 const xcb_xkb_set_map_values_t *S /**< */) 7036 { 7037 return R->nTypes; 7038 } 7039 7040 7041 /***************************************************************************** 7042 ** 7043 ** xcb_xkb_set_key_type_iterator_t xcb_xkb_set_map_values_types_iterator 7044 ** 7045 ** @param const xcb_xkb_set_map_values_t *R 7046 ** @returns xcb_xkb_set_key_type_iterator_t 7047 ** 7048 *****************************************************************************/ 7049 7050 xcb_xkb_set_key_type_iterator_t 7051 xcb_xkb_set_map_values_types_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7052 const xcb_xkb_set_map_values_t *S /**< */) 7053 { 7054 xcb_xkb_set_key_type_iterator_t i; 7055 i.data = /* values */ S->types; 7056 i.rem = R->nTypes; 7057 i.index = (char *) i.data - (char *) S; 7058 return i; 7059 } 7060 7061 7062 /***************************************************************************** 7063 ** 7064 ** int xcb_xkb_set_map_values_syms_length 7065 ** 7066 ** @param const xcb_xkb_set_map_values_t *R 7067 ** @returns int 7068 ** 7069 *****************************************************************************/ 7070 7071 int 7072 xcb_xkb_set_map_values_syms_length (const xcb_xkb_set_map_request_t *R /**< */, 7073 const xcb_xkb_set_map_values_t *S /**< */) 7074 { 7075 return R->nKeySyms; 7076 } 7077 7078 7079 /***************************************************************************** 7080 ** 7081 ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_set_map_values_syms_iterator 7082 ** 7083 ** @param const xcb_xkb_set_map_values_t *R 7084 ** @returns xcb_xkb_key_sym_map_iterator_t 7085 ** 7086 *****************************************************************************/ 7087 7088 xcb_xkb_key_sym_map_iterator_t 7089 xcb_xkb_set_map_values_syms_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7090 const xcb_xkb_set_map_values_t *S /**< */) 7091 { 7092 xcb_xkb_key_sym_map_iterator_t i; 7093 i.data = /* values */ S->syms; 7094 i.rem = R->nKeySyms; 7095 i.index = (char *) i.data - (char *) S; 7096 return i; 7097 } 7098 7099 7100 /***************************************************************************** 7101 ** 7102 ** uint8_t * xcb_xkb_set_map_values_actions_count 7103 ** 7104 ** @param const xcb_xkb_set_map_values_t *S 7105 ** @returns uint8_t * 7106 ** 7107 *****************************************************************************/ 7108 7109 uint8_t * 7110 xcb_xkb_set_map_values_actions_count (const xcb_xkb_set_map_values_t *S /**< */) 7111 { 7112 return /* values */ S->actionsCount; 7113 } 7114 7115 7116 /***************************************************************************** 7117 ** 7118 ** int xcb_xkb_set_map_values_actions_count_length 7119 ** 7120 ** @param const xcb_xkb_set_map_values_t *R 7121 ** @returns int 7122 ** 7123 *****************************************************************************/ 7124 7125 int 7126 xcb_xkb_set_map_values_actions_count_length (const xcb_xkb_set_map_request_t *R /**< */, 7127 const xcb_xkb_set_map_values_t *S /**< */) 7128 { 7129 return R->nKeyActions; 7130 } 7131 7132 7133 /***************************************************************************** 7134 ** 7135 ** xcb_generic_iterator_t xcb_xkb_set_map_values_actions_count_end 7136 ** 7137 ** @param const xcb_xkb_set_map_values_t *R 7138 ** @returns xcb_generic_iterator_t 7139 ** 7140 *****************************************************************************/ 7141 7142 xcb_generic_iterator_t 7143 xcb_xkb_set_map_values_actions_count_end (const xcb_xkb_set_map_request_t *R /**< */, 7144 const xcb_xkb_set_map_values_t *S /**< */) 7145 { 7146 xcb_generic_iterator_t i; 7147 i.data = /* values */ S->actionsCount + R->nKeyActions; 7148 i.rem = 0; 7149 i.index = (char *) i.data - (char *) S; 7150 return i; 7151 } 7152 7153 7154 /***************************************************************************** 7155 ** 7156 ** xcb_xkb_action_t * xcb_xkb_set_map_values_actions 7157 ** 7158 ** @param const xcb_xkb_set_map_values_t *S 7159 ** @returns xcb_xkb_action_t * 7160 ** 7161 *****************************************************************************/ 7162 7163 xcb_xkb_action_t * 7164 xcb_xkb_set_map_values_actions (const xcb_xkb_set_map_values_t *S /**< */) 7165 { 7166 return /* values */ S->actions; 7167 } 7168 7169 7170 /***************************************************************************** 7171 ** 7172 ** int xcb_xkb_set_map_values_actions_length 7173 ** 7174 ** @param const xcb_xkb_set_map_values_t *R 7175 ** @returns int 7176 ** 7177 *****************************************************************************/ 7178 7179 int 7180 xcb_xkb_set_map_values_actions_length (const xcb_xkb_set_map_request_t *R /**< */, 7181 const xcb_xkb_set_map_values_t *S /**< */) 7182 { 7183 return R->totalActions; 7184 } 7185 7186 7187 /***************************************************************************** 7188 ** 7189 ** xcb_xkb_action_iterator_t xcb_xkb_set_map_values_actions_iterator 7190 ** 7191 ** @param const xcb_xkb_set_map_values_t *R 7192 ** @returns xcb_xkb_action_iterator_t 7193 ** 7194 *****************************************************************************/ 7195 7196 xcb_xkb_action_iterator_t 7197 xcb_xkb_set_map_values_actions_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7198 const xcb_xkb_set_map_values_t *S /**< */) 7199 { 7200 xcb_xkb_action_iterator_t i; 7201 i.data = /* values */ S->actions; 7202 i.rem = R->totalActions; 7203 i.index = (char *) i.data - (char *) S; 7204 return i; 7205 } 7206 7207 7208 /***************************************************************************** 7209 ** 7210 ** xcb_xkb_set_behavior_t * xcb_xkb_set_map_values_behaviors 7211 ** 7212 ** @param const xcb_xkb_set_map_values_t *S 7213 ** @returns xcb_xkb_set_behavior_t * 7214 ** 7215 *****************************************************************************/ 7216 7217 xcb_xkb_set_behavior_t * 7218 xcb_xkb_set_map_values_behaviors (const xcb_xkb_set_map_values_t *S /**< */) 7219 { 7220 return /* values */ S->behaviors; 7221 } 7222 7223 7224 /***************************************************************************** 7225 ** 7226 ** int xcb_xkb_set_map_values_behaviors_length 7227 ** 7228 ** @param const xcb_xkb_set_map_values_t *R 7229 ** @returns int 7230 ** 7231 *****************************************************************************/ 7232 7233 int 7234 xcb_xkb_set_map_values_behaviors_length (const xcb_xkb_set_map_request_t *R /**< */, 7235 const xcb_xkb_set_map_values_t *S /**< */) 7236 { 7237 return R->totalKeyBehaviors; 7238 } 7239 7240 7241 /***************************************************************************** 7242 ** 7243 ** xcb_xkb_set_behavior_iterator_t xcb_xkb_set_map_values_behaviors_iterator 7244 ** 7245 ** @param const xcb_xkb_set_map_values_t *R 7246 ** @returns xcb_xkb_set_behavior_iterator_t 7247 ** 7248 *****************************************************************************/ 7249 7250 xcb_xkb_set_behavior_iterator_t 7251 xcb_xkb_set_map_values_behaviors_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7252 const xcb_xkb_set_map_values_t *S /**< */) 7253 { 7254 xcb_xkb_set_behavior_iterator_t i; 7255 i.data = /* values */ S->behaviors; 7256 i.rem = R->totalKeyBehaviors; 7257 i.index = (char *) i.data - (char *) S; 7258 return i; 7259 } 7260 7261 7262 /***************************************************************************** 7263 ** 7264 ** uint8_t * xcb_xkb_set_map_values_vmods 7265 ** 7266 ** @param const xcb_xkb_set_map_values_t *S 7267 ** @returns uint8_t * 7268 ** 7269 *****************************************************************************/ 7270 7271 uint8_t * 7272 xcb_xkb_set_map_values_vmods (const xcb_xkb_set_map_values_t *S /**< */) 7273 { 7274 return /* values */ S->vmods; 7275 } 7276 7277 7278 /***************************************************************************** 7279 ** 7280 ** int xcb_xkb_set_map_values_vmods_length 7281 ** 7282 ** @param const xcb_xkb_set_map_values_t *R 7283 ** @returns int 7284 ** 7285 *****************************************************************************/ 7286 7287 int 7288 xcb_xkb_set_map_values_vmods_length (const xcb_xkb_set_map_request_t *R /**< */, 7289 const xcb_xkb_set_map_values_t *S /**< */) 7290 { 7291 return R->nVModMapKeys; 7292 } 7293 7294 7295 /***************************************************************************** 7296 ** 7297 ** xcb_generic_iterator_t xcb_xkb_set_map_values_vmods_end 7298 ** 7299 ** @param const xcb_xkb_set_map_values_t *R 7300 ** @returns xcb_generic_iterator_t 7301 ** 7302 *****************************************************************************/ 7303 7304 xcb_generic_iterator_t 7305 xcb_xkb_set_map_values_vmods_end (const xcb_xkb_set_map_request_t *R /**< */, 7306 const xcb_xkb_set_map_values_t *S /**< */) 7307 { 7308 xcb_generic_iterator_t i; 7309 i.data = /* values */ S->vmods + R->nVModMapKeys; 7310 i.rem = 0; 7311 i.index = (char *) i.data - (char *) S; 7312 return i; 7313 } 7314 7315 7316 /***************************************************************************** 7317 ** 7318 ** xcb_xkb_set_explicit_t * xcb_xkb_set_map_values_explicit 7319 ** 7320 ** @param const xcb_xkb_set_map_values_t *S 7321 ** @returns xcb_xkb_set_explicit_t * 7322 ** 7323 *****************************************************************************/ 7324 7325 xcb_xkb_set_explicit_t * 7326 xcb_xkb_set_map_values_explicit (const xcb_xkb_set_map_values_t *S /**< */) 7327 { 7328 return /* values */ S->explicit; 7329 } 7330 7331 7332 /***************************************************************************** 7333 ** 7334 ** int xcb_xkb_set_map_values_explicit_length 7335 ** 7336 ** @param const xcb_xkb_set_map_values_t *R 7337 ** @returns int 7338 ** 7339 *****************************************************************************/ 7340 7341 int 7342 xcb_xkb_set_map_values_explicit_length (const xcb_xkb_set_map_request_t *R /**< */, 7343 const xcb_xkb_set_map_values_t *S /**< */) 7344 { 7345 return R->totalKeyExplicit; 7346 } 7347 7348 7349 /***************************************************************************** 7350 ** 7351 ** xcb_xkb_set_explicit_iterator_t xcb_xkb_set_map_values_explicit_iterator 7352 ** 7353 ** @param const xcb_xkb_set_map_values_t *R 7354 ** @returns xcb_xkb_set_explicit_iterator_t 7355 ** 7356 *****************************************************************************/ 7357 7358 xcb_xkb_set_explicit_iterator_t 7359 xcb_xkb_set_map_values_explicit_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7360 const xcb_xkb_set_map_values_t *S /**< */) 7361 { 7362 xcb_xkb_set_explicit_iterator_t i; 7363 i.data = /* values */ S->explicit; 7364 i.rem = R->totalKeyExplicit; 7365 i.index = (char *) i.data - (char *) S; 7366 return i; 7367 } 7368 7369 7370 /***************************************************************************** 7371 ** 7372 ** xcb_xkb_key_mod_map_t * xcb_xkb_set_map_values_modmap 7373 ** 7374 ** @param const xcb_xkb_set_map_values_t *S 7375 ** @returns xcb_xkb_key_mod_map_t * 7376 ** 7377 *****************************************************************************/ 7378 7379 xcb_xkb_key_mod_map_t * 7380 xcb_xkb_set_map_values_modmap (const xcb_xkb_set_map_values_t *S /**< */) 7381 { 7382 return /* values */ S->modmap; 7383 } 7384 7385 7386 /***************************************************************************** 7387 ** 7388 ** int xcb_xkb_set_map_values_modmap_length 7389 ** 7390 ** @param const xcb_xkb_set_map_values_t *R 7391 ** @returns int 7392 ** 7393 *****************************************************************************/ 7394 7395 int 7396 xcb_xkb_set_map_values_modmap_length (const xcb_xkb_set_map_request_t *R /**< */, 7397 const xcb_xkb_set_map_values_t *S /**< */) 7398 { 7399 return R->totalModMapKeys; 7400 } 7401 7402 7403 /***************************************************************************** 7404 ** 7405 ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_set_map_values_modmap_iterator 7406 ** 7407 ** @param const xcb_xkb_set_map_values_t *R 7408 ** @returns xcb_xkb_key_mod_map_iterator_t 7409 ** 7410 *****************************************************************************/ 7411 7412 xcb_xkb_key_mod_map_iterator_t 7413 xcb_xkb_set_map_values_modmap_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7414 const xcb_xkb_set_map_values_t *S /**< */) 7415 { 7416 xcb_xkb_key_mod_map_iterator_t i; 7417 i.data = /* values */ S->modmap; 7418 i.rem = R->totalModMapKeys; 7419 i.index = (char *) i.data - (char *) S; 7420 return i; 7421 } 7422 7423 7424 /***************************************************************************** 7425 ** 7426 ** xcb_xkb_key_v_mod_map_t * xcb_xkb_set_map_values_vmodmap 7427 ** 7428 ** @param const xcb_xkb_set_map_values_t *S 7429 ** @returns xcb_xkb_key_v_mod_map_t * 7430 ** 7431 *****************************************************************************/ 7432 7433 xcb_xkb_key_v_mod_map_t * 7434 xcb_xkb_set_map_values_vmodmap (const xcb_xkb_set_map_values_t *S /**< */) 7435 { 7436 return /* values */ S->vmodmap; 7437 } 7438 7439 7440 /***************************************************************************** 7441 ** 7442 ** int xcb_xkb_set_map_values_vmodmap_length 7443 ** 7444 ** @param const xcb_xkb_set_map_values_t *R 7445 ** @returns int 7446 ** 7447 *****************************************************************************/ 7448 7449 int 7450 xcb_xkb_set_map_values_vmodmap_length (const xcb_xkb_set_map_request_t *R /**< */, 7451 const xcb_xkb_set_map_values_t *S /**< */) 7452 { 7453 return R->totalVModMapKeys; 7454 } 7455 7456 7457 /***************************************************************************** 7458 ** 7459 ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_set_map_values_vmodmap_iterator 7460 ** 7461 ** @param const xcb_xkb_set_map_values_t *R 7462 ** @returns xcb_xkb_key_v_mod_map_iterator_t 7463 ** 7464 *****************************************************************************/ 7465 7466 xcb_xkb_key_v_mod_map_iterator_t 7467 xcb_xkb_set_map_values_vmodmap_iterator (const xcb_xkb_set_map_request_t *R /**< */, 7468 const xcb_xkb_set_map_values_t *S /**< */) 7469 { 7470 xcb_xkb_key_v_mod_map_iterator_t i; 7471 i.data = /* values */ S->vmodmap; 7472 i.rem = R->totalVModMapKeys; 7473 i.index = (char *) i.data - (char *) S; 7474 return i; 7475 } 7476 7477 int 7478 xcb_xkb_set_map_values_serialize (void **_buffer /**< */, 7479 uint8_t nTypes /**< */, 7480 uint8_t nKeySyms /**< */, 7481 uint8_t nKeyActions /**< */, 7482 uint16_t totalActions /**< */, 7483 uint8_t totalKeyBehaviors /**< */, 7484 uint8_t nVModMapKeys /**< */, 7485 uint8_t totalKeyExplicit /**< */, 7486 uint8_t totalModMapKeys /**< */, 7487 uint8_t totalVModMapKeys /**< */, 7488 uint16_t present /**< */, 7489 const xcb_xkb_set_map_values_t *_aux /**< */) 7490 { 7491 char *xcb_out = *_buffer; 7492 unsigned int xcb_buffer_len = 0; 7493 unsigned int xcb_align_to; 7494 7495 unsigned int xcb_pad = 0; 7496 char xcb_pad0[3] = {0, 0, 0}; 7497 struct iovec xcb_parts[19]; 7498 unsigned int xcb_parts_idx = 0; 7499 unsigned int xcb_block_len = 0; 7500 unsigned int i; 7501 char *xcb_tmp; 7502 7503 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 7504 /* insert padding */ 7505 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7506 xcb_buffer_len += xcb_block_len + xcb_pad; 7507 if (0 != xcb_pad) { 7508 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7509 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7510 xcb_parts_idx++; 7511 xcb_pad = 0; 7512 } 7513 xcb_block_len = 0; 7514 /* types */ 7515 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types; 7516 xcb_parts[xcb_parts_idx].iov_len = 0; 7517 xcb_tmp = (char *) _aux->types; 7518 for(i=0; i<nTypes; i++) { 7519 xcb_block_len = xcb_xkb_set_key_type_sizeof(xcb_tmp); 7520 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 7521 } 7522 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 7523 xcb_parts_idx++; 7524 xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t); 7525 } 7526 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 7527 /* insert padding */ 7528 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7529 xcb_buffer_len += xcb_block_len + xcb_pad; 7530 if (0 != xcb_pad) { 7531 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7532 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7533 xcb_parts_idx++; 7534 xcb_pad = 0; 7535 } 7536 xcb_block_len = 0; 7537 /* syms */ 7538 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms; 7539 xcb_parts[xcb_parts_idx].iov_len = 0; 7540 xcb_tmp = (char *) _aux->syms; 7541 for(i=0; i<nKeySyms; i++) { 7542 xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 7543 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 7544 } 7545 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 7546 xcb_parts_idx++; 7547 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 7548 } 7549 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 7550 /* insert padding */ 7551 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7552 xcb_buffer_len += xcb_block_len + xcb_pad; 7553 if (0 != xcb_pad) { 7554 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7555 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7556 xcb_parts_idx++; 7557 xcb_pad = 0; 7558 } 7559 xcb_block_len = 0; 7560 /* actionsCount */ 7561 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actionsCount; 7562 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 7563 xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t); 7564 xcb_parts_idx++; 7565 xcb_align_to = ALIGNOF(uint8_t); 7566 /* insert padding */ 7567 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7568 xcb_buffer_len += xcb_block_len + xcb_pad; 7569 if (0 != xcb_pad) { 7570 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7571 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7572 xcb_parts_idx++; 7573 xcb_pad = 0; 7574 } 7575 xcb_block_len = 0; 7576 /* actions */ 7577 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->actions; 7578 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 7579 xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t); 7580 xcb_parts_idx++; 7581 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 7582 } 7583 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 7584 /* insert padding */ 7585 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7586 xcb_buffer_len += xcb_block_len + xcb_pad; 7587 if (0 != xcb_pad) { 7588 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7589 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7590 xcb_parts_idx++; 7591 xcb_pad = 0; 7592 } 7593 xcb_block_len = 0; 7594 /* behaviors */ 7595 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors; 7596 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 7597 xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 7598 xcb_parts_idx++; 7599 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 7600 } 7601 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 7602 /* insert padding */ 7603 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7604 xcb_buffer_len += xcb_block_len + xcb_pad; 7605 if (0 != xcb_pad) { 7606 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7607 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7608 xcb_parts_idx++; 7609 xcb_pad = 0; 7610 } 7611 xcb_block_len = 0; 7612 /* vmods */ 7613 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods; 7614 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 7615 xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t); 7616 xcb_parts_idx++; 7617 xcb_align_to = ALIGNOF(uint8_t); 7618 } 7619 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 7620 /* insert padding */ 7621 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7622 xcb_buffer_len += xcb_block_len + xcb_pad; 7623 if (0 != xcb_pad) { 7624 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7625 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7626 xcb_parts_idx++; 7627 xcb_pad = 0; 7628 } 7629 xcb_block_len = 0; 7630 /* explicit */ 7631 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit; 7632 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 7633 xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 7634 xcb_parts_idx++; 7635 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 7636 } 7637 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 7638 /* insert padding */ 7639 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7640 xcb_buffer_len += xcb_block_len + xcb_pad; 7641 if (0 != xcb_pad) { 7642 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7643 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7644 xcb_parts_idx++; 7645 xcb_pad = 0; 7646 } 7647 xcb_block_len = 0; 7648 /* modmap */ 7649 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap; 7650 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 7651 xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 7652 xcb_parts_idx++; 7653 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 7654 } 7655 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 7656 /* insert padding */ 7657 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7658 xcb_buffer_len += xcb_block_len + xcb_pad; 7659 if (0 != xcb_pad) { 7660 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7661 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7662 xcb_parts_idx++; 7663 xcb_pad = 0; 7664 } 7665 xcb_block_len = 0; 7666 /* vmodmap */ 7667 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap; 7668 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 7669 xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 7670 xcb_parts_idx++; 7671 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 7672 } 7673 /* insert padding */ 7674 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7675 xcb_buffer_len += xcb_block_len + xcb_pad; 7676 if (0 != xcb_pad) { 7677 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 7678 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 7679 xcb_parts_idx++; 7680 xcb_pad = 0; 7681 } 7682 xcb_block_len = 0; 7683 7684 if (NULL == xcb_out) { 7685 /* allocate memory */ 7686 xcb_out = malloc(xcb_buffer_len); 7687 *_buffer = xcb_out; 7688 } 7689 7690 xcb_tmp = xcb_out; 7691 for(i=0; i<xcb_parts_idx; i++) { 7692 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 7693 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 7694 if (0 != xcb_parts[i].iov_len) 7695 xcb_tmp += xcb_parts[i].iov_len; 7696 } 7697 7698 return xcb_buffer_len; 7699 } 7700 7701 int 7702 xcb_xkb_set_map_values_unpack (const void *_buffer /**< */, 7703 uint8_t nTypes /**< */, 7704 uint8_t nKeySyms /**< */, 7705 uint8_t nKeyActions /**< */, 7706 uint16_t totalActions /**< */, 7707 uint8_t totalKeyBehaviors /**< */, 7708 uint8_t nVModMapKeys /**< */, 7709 uint8_t totalKeyExplicit /**< */, 7710 uint8_t totalModMapKeys /**< */, 7711 uint8_t totalVModMapKeys /**< */, 7712 uint16_t present /**< */, 7713 xcb_xkb_set_map_values_t *_aux /**< */) 7714 { 7715 char *xcb_tmp = (char *)_buffer; 7716 unsigned int xcb_buffer_len = 0; 7717 unsigned int xcb_block_len = 0; 7718 unsigned int xcb_pad = 0; 7719 unsigned int xcb_align_to; 7720 7721 unsigned int i; 7722 unsigned int xcb_tmp_len; 7723 7724 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 7725 /* insert padding */ 7726 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7727 xcb_buffer_len += xcb_block_len + xcb_pad; 7728 if (0 != xcb_pad) { 7729 xcb_tmp += xcb_pad; 7730 xcb_pad = 0; 7731 } 7732 xcb_block_len = 0; 7733 /* types */ 7734 _aux->types = (xcb_xkb_set_key_type_t *)xcb_tmp; 7735 for(i=0; i<nTypes; i++) { 7736 xcb_tmp_len = xcb_xkb_set_key_type_sizeof(xcb_tmp); 7737 xcb_block_len += xcb_tmp_len; 7738 xcb_tmp += xcb_tmp_len; 7739 } 7740 xcb_align_to = ALIGNOF(xcb_xkb_set_key_type_t); 7741 } 7742 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 7743 /* insert padding */ 7744 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7745 xcb_buffer_len += xcb_block_len + xcb_pad; 7746 if (0 != xcb_pad) { 7747 xcb_tmp += xcb_pad; 7748 xcb_pad = 0; 7749 } 7750 xcb_block_len = 0; 7751 /* syms */ 7752 _aux->syms = (xcb_xkb_key_sym_map_t *)xcb_tmp; 7753 for(i=0; i<nKeySyms; i++) { 7754 xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 7755 xcb_block_len += xcb_tmp_len; 7756 xcb_tmp += xcb_tmp_len; 7757 } 7758 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 7759 } 7760 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 7761 /* insert padding */ 7762 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7763 xcb_buffer_len += xcb_block_len + xcb_pad; 7764 if (0 != xcb_pad) { 7765 xcb_tmp += xcb_pad; 7766 xcb_pad = 0; 7767 } 7768 xcb_block_len = 0; 7769 /* actionsCount */ 7770 _aux->actionsCount = (uint8_t *)xcb_tmp; 7771 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 7772 xcb_tmp += xcb_block_len; 7773 xcb_align_to = ALIGNOF(uint8_t); 7774 /* insert padding */ 7775 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7776 xcb_buffer_len += xcb_block_len + xcb_pad; 7777 if (0 != xcb_pad) { 7778 xcb_tmp += xcb_pad; 7779 xcb_pad = 0; 7780 } 7781 xcb_block_len = 0; 7782 /* actions */ 7783 _aux->actions = (xcb_xkb_action_t *)xcb_tmp; 7784 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 7785 xcb_tmp += xcb_block_len; 7786 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 7787 } 7788 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 7789 /* insert padding */ 7790 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7791 xcb_buffer_len += xcb_block_len + xcb_pad; 7792 if (0 != xcb_pad) { 7793 xcb_tmp += xcb_pad; 7794 xcb_pad = 0; 7795 } 7796 xcb_block_len = 0; 7797 /* behaviors */ 7798 _aux->behaviors = (xcb_xkb_set_behavior_t *)xcb_tmp; 7799 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 7800 xcb_tmp += xcb_block_len; 7801 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 7802 } 7803 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 7804 /* insert padding */ 7805 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7806 xcb_buffer_len += xcb_block_len + xcb_pad; 7807 if (0 != xcb_pad) { 7808 xcb_tmp += xcb_pad; 7809 xcb_pad = 0; 7810 } 7811 xcb_block_len = 0; 7812 /* vmods */ 7813 _aux->vmods = (uint8_t *)xcb_tmp; 7814 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 7815 xcb_tmp += xcb_block_len; 7816 xcb_align_to = ALIGNOF(uint8_t); 7817 } 7818 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 7819 /* insert padding */ 7820 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7821 xcb_buffer_len += xcb_block_len + xcb_pad; 7822 if (0 != xcb_pad) { 7823 xcb_tmp += xcb_pad; 7824 xcb_pad = 0; 7825 } 7826 xcb_block_len = 0; 7827 /* explicit */ 7828 _aux->explicit = (xcb_xkb_set_explicit_t *)xcb_tmp; 7829 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 7830 xcb_tmp += xcb_block_len; 7831 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 7832 } 7833 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 7834 /* insert padding */ 7835 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7836 xcb_buffer_len += xcb_block_len + xcb_pad; 7837 if (0 != xcb_pad) { 7838 xcb_tmp += xcb_pad; 7839 xcb_pad = 0; 7840 } 7841 xcb_block_len = 0; 7842 /* modmap */ 7843 _aux->modmap = (xcb_xkb_key_mod_map_t *)xcb_tmp; 7844 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 7845 xcb_tmp += xcb_block_len; 7846 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 7847 } 7848 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 7849 /* insert padding */ 7850 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7851 xcb_buffer_len += xcb_block_len + xcb_pad; 7852 if (0 != xcb_pad) { 7853 xcb_tmp += xcb_pad; 7854 xcb_pad = 0; 7855 } 7856 xcb_block_len = 0; 7857 /* vmodmap */ 7858 _aux->vmodmap = (xcb_xkb_key_v_mod_map_t *)xcb_tmp; 7859 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 7860 xcb_tmp += xcb_block_len; 7861 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 7862 } 7863 /* insert padding */ 7864 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 7865 xcb_buffer_len += xcb_block_len + xcb_pad; 7866 if (0 != xcb_pad) { 7867 xcb_tmp += xcb_pad; 7868 xcb_pad = 0; 7869 } 7870 xcb_block_len = 0; 7871 7872 return xcb_buffer_len; 7873 } 7874 7875 int 7876 xcb_xkb_set_map_values_sizeof (const void *_buffer /**< */, 7877 uint8_t nTypes /**< */, 7878 uint8_t nKeySyms /**< */, 7879 uint8_t nKeyActions /**< */, 7880 uint16_t totalActions /**< */, 7881 uint8_t totalKeyBehaviors /**< */, 7882 uint8_t nVModMapKeys /**< */, 7883 uint8_t totalKeyExplicit /**< */, 7884 uint8_t totalModMapKeys /**< */, 7885 uint8_t totalVModMapKeys /**< */, 7886 uint16_t present /**< */) 7887 { 7888 xcb_xkb_set_map_values_t _aux; 7889 return xcb_xkb_set_map_values_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux); 7890 } 7891 7892 7893 /***************************************************************************** 7894 ** 7895 ** xcb_void_cookie_t xcb_xkb_set_map_checked 7896 ** 7897 ** @param xcb_connection_t *c 7898 ** @param xcb_xkb_device_spec_t deviceSpec 7899 ** @param uint16_t present 7900 ** @param uint16_t flags 7901 ** @param xcb_keycode_t minKeyCode 7902 ** @param xcb_keycode_t maxKeyCode 7903 ** @param uint8_t firstType 7904 ** @param uint8_t nTypes 7905 ** @param xcb_keycode_t firstKeySym 7906 ** @param uint8_t nKeySyms 7907 ** @param uint16_t totalSyms 7908 ** @param xcb_keycode_t firstKeyAction 7909 ** @param uint8_t nKeyActions 7910 ** @param uint16_t totalActions 7911 ** @param xcb_keycode_t firstKeyBehavior 7912 ** @param uint8_t nKeyBehaviors 7913 ** @param uint8_t totalKeyBehaviors 7914 ** @param xcb_keycode_t firstKeyExplicit 7915 ** @param uint8_t nKeyExplicit 7916 ** @param uint8_t totalKeyExplicit 7917 ** @param xcb_keycode_t firstModMapKey 7918 ** @param uint8_t nModMapKeys 7919 ** @param uint8_t totalModMapKeys 7920 ** @param xcb_keycode_t firstVModMapKey 7921 ** @param uint8_t nVModMapKeys 7922 ** @param uint8_t totalVModMapKeys 7923 ** @param uint16_t virtualMods 7924 ** @param const void *values 7925 ** @returns xcb_void_cookie_t 7926 ** 7927 *****************************************************************************/ 7928 7929 xcb_void_cookie_t 7930 xcb_xkb_set_map_checked (xcb_connection_t *c /**< */, 7931 xcb_xkb_device_spec_t deviceSpec /**< */, 7932 uint16_t present /**< */, 7933 uint16_t flags /**< */, 7934 xcb_keycode_t minKeyCode /**< */, 7935 xcb_keycode_t maxKeyCode /**< */, 7936 uint8_t firstType /**< */, 7937 uint8_t nTypes /**< */, 7938 xcb_keycode_t firstKeySym /**< */, 7939 uint8_t nKeySyms /**< */, 7940 uint16_t totalSyms /**< */, 7941 xcb_keycode_t firstKeyAction /**< */, 7942 uint8_t nKeyActions /**< */, 7943 uint16_t totalActions /**< */, 7944 xcb_keycode_t firstKeyBehavior /**< */, 7945 uint8_t nKeyBehaviors /**< */, 7946 uint8_t totalKeyBehaviors /**< */, 7947 xcb_keycode_t firstKeyExplicit /**< */, 7948 uint8_t nKeyExplicit /**< */, 7949 uint8_t totalKeyExplicit /**< */, 7950 xcb_keycode_t firstModMapKey /**< */, 7951 uint8_t nModMapKeys /**< */, 7952 uint8_t totalModMapKeys /**< */, 7953 xcb_keycode_t firstVModMapKey /**< */, 7954 uint8_t nVModMapKeys /**< */, 7955 uint8_t totalVModMapKeys /**< */, 7956 uint16_t virtualMods /**< */, 7957 const void *values /**< */) 7958 { 7959 static const xcb_protocol_request_t xcb_req = { 7960 /* count */ 3, 7961 /* ext */ &xcb_xkb_id, 7962 /* opcode */ XCB_XKB_SET_MAP, 7963 /* isvoid */ 1 7964 }; 7965 7966 struct iovec xcb_parts[5]; 7967 xcb_void_cookie_t xcb_ret; 7968 xcb_xkb_set_map_request_t xcb_out; 7969 7970 xcb_out.deviceSpec = deviceSpec; 7971 xcb_out.present = present; 7972 xcb_out.flags = flags; 7973 xcb_out.minKeyCode = minKeyCode; 7974 xcb_out.maxKeyCode = maxKeyCode; 7975 xcb_out.firstType = firstType; 7976 xcb_out.nTypes = nTypes; 7977 xcb_out.firstKeySym = firstKeySym; 7978 xcb_out.nKeySyms = nKeySyms; 7979 xcb_out.totalSyms = totalSyms; 7980 xcb_out.firstKeyAction = firstKeyAction; 7981 xcb_out.nKeyActions = nKeyActions; 7982 xcb_out.totalActions = totalActions; 7983 xcb_out.firstKeyBehavior = firstKeyBehavior; 7984 xcb_out.nKeyBehaviors = nKeyBehaviors; 7985 xcb_out.totalKeyBehaviors = totalKeyBehaviors; 7986 xcb_out.firstKeyExplicit = firstKeyExplicit; 7987 xcb_out.nKeyExplicit = nKeyExplicit; 7988 xcb_out.totalKeyExplicit = totalKeyExplicit; 7989 xcb_out.firstModMapKey = firstModMapKey; 7990 xcb_out.nModMapKeys = nModMapKeys; 7991 xcb_out.totalModMapKeys = totalModMapKeys; 7992 xcb_out.firstVModMapKey = firstVModMapKey; 7993 xcb_out.nVModMapKeys = nVModMapKeys; 7994 xcb_out.totalVModMapKeys = totalVModMapKeys; 7995 xcb_out.virtualMods = virtualMods; 7996 7997 xcb_parts[2].iov_base = (char *) &xcb_out; 7998 xcb_parts[2].iov_len = sizeof(xcb_out); 7999 xcb_parts[3].iov_base = 0; 8000 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8001 /* xcb_xkb_set_map_values_t values */ 8002 xcb_parts[4].iov_base = (char *) values; 8003 xcb_parts[4].iov_len = 8004 xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present); 8005 8006 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8007 return xcb_ret; 8008 } 8009 8010 8011 /***************************************************************************** 8012 ** 8013 ** xcb_void_cookie_t xcb_xkb_set_map 8014 ** 8015 ** @param xcb_connection_t *c 8016 ** @param xcb_xkb_device_spec_t deviceSpec 8017 ** @param uint16_t present 8018 ** @param uint16_t flags 8019 ** @param xcb_keycode_t minKeyCode 8020 ** @param xcb_keycode_t maxKeyCode 8021 ** @param uint8_t firstType 8022 ** @param uint8_t nTypes 8023 ** @param xcb_keycode_t firstKeySym 8024 ** @param uint8_t nKeySyms 8025 ** @param uint16_t totalSyms 8026 ** @param xcb_keycode_t firstKeyAction 8027 ** @param uint8_t nKeyActions 8028 ** @param uint16_t totalActions 8029 ** @param xcb_keycode_t firstKeyBehavior 8030 ** @param uint8_t nKeyBehaviors 8031 ** @param uint8_t totalKeyBehaviors 8032 ** @param xcb_keycode_t firstKeyExplicit 8033 ** @param uint8_t nKeyExplicit 8034 ** @param uint8_t totalKeyExplicit 8035 ** @param xcb_keycode_t firstModMapKey 8036 ** @param uint8_t nModMapKeys 8037 ** @param uint8_t totalModMapKeys 8038 ** @param xcb_keycode_t firstVModMapKey 8039 ** @param uint8_t nVModMapKeys 8040 ** @param uint8_t totalVModMapKeys 8041 ** @param uint16_t virtualMods 8042 ** @param const void *values 8043 ** @returns xcb_void_cookie_t 8044 ** 8045 *****************************************************************************/ 8046 8047 xcb_void_cookie_t 8048 xcb_xkb_set_map (xcb_connection_t *c /**< */, 8049 xcb_xkb_device_spec_t deviceSpec /**< */, 8050 uint16_t present /**< */, 8051 uint16_t flags /**< */, 8052 xcb_keycode_t minKeyCode /**< */, 8053 xcb_keycode_t maxKeyCode /**< */, 8054 uint8_t firstType /**< */, 8055 uint8_t nTypes /**< */, 8056 xcb_keycode_t firstKeySym /**< */, 8057 uint8_t nKeySyms /**< */, 8058 uint16_t totalSyms /**< */, 8059 xcb_keycode_t firstKeyAction /**< */, 8060 uint8_t nKeyActions /**< */, 8061 uint16_t totalActions /**< */, 8062 xcb_keycode_t firstKeyBehavior /**< */, 8063 uint8_t nKeyBehaviors /**< */, 8064 uint8_t totalKeyBehaviors /**< */, 8065 xcb_keycode_t firstKeyExplicit /**< */, 8066 uint8_t nKeyExplicit /**< */, 8067 uint8_t totalKeyExplicit /**< */, 8068 xcb_keycode_t firstModMapKey /**< */, 8069 uint8_t nModMapKeys /**< */, 8070 uint8_t totalModMapKeys /**< */, 8071 xcb_keycode_t firstVModMapKey /**< */, 8072 uint8_t nVModMapKeys /**< */, 8073 uint8_t totalVModMapKeys /**< */, 8074 uint16_t virtualMods /**< */, 8075 const void *values /**< */) 8076 { 8077 static const xcb_protocol_request_t xcb_req = { 8078 /* count */ 3, 8079 /* ext */ &xcb_xkb_id, 8080 /* opcode */ XCB_XKB_SET_MAP, 8081 /* isvoid */ 1 8082 }; 8083 8084 struct iovec xcb_parts[5]; 8085 xcb_void_cookie_t xcb_ret; 8086 xcb_xkb_set_map_request_t xcb_out; 8087 8088 xcb_out.deviceSpec = deviceSpec; 8089 xcb_out.present = present; 8090 xcb_out.flags = flags; 8091 xcb_out.minKeyCode = minKeyCode; 8092 xcb_out.maxKeyCode = maxKeyCode; 8093 xcb_out.firstType = firstType; 8094 xcb_out.nTypes = nTypes; 8095 xcb_out.firstKeySym = firstKeySym; 8096 xcb_out.nKeySyms = nKeySyms; 8097 xcb_out.totalSyms = totalSyms; 8098 xcb_out.firstKeyAction = firstKeyAction; 8099 xcb_out.nKeyActions = nKeyActions; 8100 xcb_out.totalActions = totalActions; 8101 xcb_out.firstKeyBehavior = firstKeyBehavior; 8102 xcb_out.nKeyBehaviors = nKeyBehaviors; 8103 xcb_out.totalKeyBehaviors = totalKeyBehaviors; 8104 xcb_out.firstKeyExplicit = firstKeyExplicit; 8105 xcb_out.nKeyExplicit = nKeyExplicit; 8106 xcb_out.totalKeyExplicit = totalKeyExplicit; 8107 xcb_out.firstModMapKey = firstModMapKey; 8108 xcb_out.nModMapKeys = nModMapKeys; 8109 xcb_out.totalModMapKeys = totalModMapKeys; 8110 xcb_out.firstVModMapKey = firstVModMapKey; 8111 xcb_out.nVModMapKeys = nVModMapKeys; 8112 xcb_out.totalVModMapKeys = totalVModMapKeys; 8113 xcb_out.virtualMods = virtualMods; 8114 8115 xcb_parts[2].iov_base = (char *) &xcb_out; 8116 xcb_parts[2].iov_len = sizeof(xcb_out); 8117 xcb_parts[3].iov_base = 0; 8118 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8119 /* xcb_xkb_set_map_values_t values */ 8120 xcb_parts[4].iov_base = (char *) values; 8121 xcb_parts[4].iov_len = 8122 xcb_xkb_set_map_values_sizeof (values, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present); 8123 8124 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 8125 return xcb_ret; 8126 } 8127 8128 8129 /***************************************************************************** 8130 ** 8131 ** xcb_void_cookie_t xcb_xkb_set_map_aux_checked 8132 ** 8133 ** @param xcb_connection_t *c 8134 ** @param xcb_xkb_device_spec_t deviceSpec 8135 ** @param uint16_t present 8136 ** @param uint16_t flags 8137 ** @param xcb_keycode_t minKeyCode 8138 ** @param xcb_keycode_t maxKeyCode 8139 ** @param uint8_t firstType 8140 ** @param uint8_t nTypes 8141 ** @param xcb_keycode_t firstKeySym 8142 ** @param uint8_t nKeySyms 8143 ** @param uint16_t totalSyms 8144 ** @param xcb_keycode_t firstKeyAction 8145 ** @param uint8_t nKeyActions 8146 ** @param uint16_t totalActions 8147 ** @param xcb_keycode_t firstKeyBehavior 8148 ** @param uint8_t nKeyBehaviors 8149 ** @param uint8_t totalKeyBehaviors 8150 ** @param xcb_keycode_t firstKeyExplicit 8151 ** @param uint8_t nKeyExplicit 8152 ** @param uint8_t totalKeyExplicit 8153 ** @param xcb_keycode_t firstModMapKey 8154 ** @param uint8_t nModMapKeys 8155 ** @param uint8_t totalModMapKeys 8156 ** @param xcb_keycode_t firstVModMapKey 8157 ** @param uint8_t nVModMapKeys 8158 ** @param uint8_t totalVModMapKeys 8159 ** @param uint16_t virtualMods 8160 ** @param const xcb_xkb_set_map_values_t *values 8161 ** @returns xcb_void_cookie_t 8162 ** 8163 *****************************************************************************/ 8164 8165 xcb_void_cookie_t 8166 xcb_xkb_set_map_aux_checked (xcb_connection_t *c /**< */, 8167 xcb_xkb_device_spec_t deviceSpec /**< */, 8168 uint16_t present /**< */, 8169 uint16_t flags /**< */, 8170 xcb_keycode_t minKeyCode /**< */, 8171 xcb_keycode_t maxKeyCode /**< */, 8172 uint8_t firstType /**< */, 8173 uint8_t nTypes /**< */, 8174 xcb_keycode_t firstKeySym /**< */, 8175 uint8_t nKeySyms /**< */, 8176 uint16_t totalSyms /**< */, 8177 xcb_keycode_t firstKeyAction /**< */, 8178 uint8_t nKeyActions /**< */, 8179 uint16_t totalActions /**< */, 8180 xcb_keycode_t firstKeyBehavior /**< */, 8181 uint8_t nKeyBehaviors /**< */, 8182 uint8_t totalKeyBehaviors /**< */, 8183 xcb_keycode_t firstKeyExplicit /**< */, 8184 uint8_t nKeyExplicit /**< */, 8185 uint8_t totalKeyExplicit /**< */, 8186 xcb_keycode_t firstModMapKey /**< */, 8187 uint8_t nModMapKeys /**< */, 8188 uint8_t totalModMapKeys /**< */, 8189 xcb_keycode_t firstVModMapKey /**< */, 8190 uint8_t nVModMapKeys /**< */, 8191 uint8_t totalVModMapKeys /**< */, 8192 uint16_t virtualMods /**< */, 8193 const xcb_xkb_set_map_values_t *values /**< */) 8194 { 8195 static const xcb_protocol_request_t xcb_req = { 8196 /* count */ 3, 8197 /* ext */ &xcb_xkb_id, 8198 /* opcode */ XCB_XKB_SET_MAP, 8199 /* isvoid */ 1 8200 }; 8201 8202 struct iovec xcb_parts[5]; 8203 xcb_void_cookie_t xcb_ret; 8204 xcb_xkb_set_map_request_t xcb_out; 8205 void *xcb_aux0 = 0; 8206 8207 xcb_out.deviceSpec = deviceSpec; 8208 xcb_out.present = present; 8209 xcb_out.flags = flags; 8210 xcb_out.minKeyCode = minKeyCode; 8211 xcb_out.maxKeyCode = maxKeyCode; 8212 xcb_out.firstType = firstType; 8213 xcb_out.nTypes = nTypes; 8214 xcb_out.firstKeySym = firstKeySym; 8215 xcb_out.nKeySyms = nKeySyms; 8216 xcb_out.totalSyms = totalSyms; 8217 xcb_out.firstKeyAction = firstKeyAction; 8218 xcb_out.nKeyActions = nKeyActions; 8219 xcb_out.totalActions = totalActions; 8220 xcb_out.firstKeyBehavior = firstKeyBehavior; 8221 xcb_out.nKeyBehaviors = nKeyBehaviors; 8222 xcb_out.totalKeyBehaviors = totalKeyBehaviors; 8223 xcb_out.firstKeyExplicit = firstKeyExplicit; 8224 xcb_out.nKeyExplicit = nKeyExplicit; 8225 xcb_out.totalKeyExplicit = totalKeyExplicit; 8226 xcb_out.firstModMapKey = firstModMapKey; 8227 xcb_out.nModMapKeys = nModMapKeys; 8228 xcb_out.totalModMapKeys = totalModMapKeys; 8229 xcb_out.firstVModMapKey = firstVModMapKey; 8230 xcb_out.nVModMapKeys = nVModMapKeys; 8231 xcb_out.totalVModMapKeys = totalVModMapKeys; 8232 xcb_out.virtualMods = virtualMods; 8233 8234 xcb_parts[2].iov_base = (char *) &xcb_out; 8235 xcb_parts[2].iov_len = sizeof(xcb_out); 8236 xcb_parts[3].iov_base = 0; 8237 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8238 /* xcb_xkb_set_map_values_t values */ 8239 xcb_parts[4].iov_len = 8240 xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values); 8241 xcb_parts[4].iov_base = xcb_aux0; 8242 8243 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8244 free(xcb_aux0); 8245 return xcb_ret; 8246 } 8247 8248 8249 /***************************************************************************** 8250 ** 8251 ** xcb_void_cookie_t xcb_xkb_set_map_aux 8252 ** 8253 ** @param xcb_connection_t *c 8254 ** @param xcb_xkb_device_spec_t deviceSpec 8255 ** @param uint16_t present 8256 ** @param uint16_t flags 8257 ** @param xcb_keycode_t minKeyCode 8258 ** @param xcb_keycode_t maxKeyCode 8259 ** @param uint8_t firstType 8260 ** @param uint8_t nTypes 8261 ** @param xcb_keycode_t firstKeySym 8262 ** @param uint8_t nKeySyms 8263 ** @param uint16_t totalSyms 8264 ** @param xcb_keycode_t firstKeyAction 8265 ** @param uint8_t nKeyActions 8266 ** @param uint16_t totalActions 8267 ** @param xcb_keycode_t firstKeyBehavior 8268 ** @param uint8_t nKeyBehaviors 8269 ** @param uint8_t totalKeyBehaviors 8270 ** @param xcb_keycode_t firstKeyExplicit 8271 ** @param uint8_t nKeyExplicit 8272 ** @param uint8_t totalKeyExplicit 8273 ** @param xcb_keycode_t firstModMapKey 8274 ** @param uint8_t nModMapKeys 8275 ** @param uint8_t totalModMapKeys 8276 ** @param xcb_keycode_t firstVModMapKey 8277 ** @param uint8_t nVModMapKeys 8278 ** @param uint8_t totalVModMapKeys 8279 ** @param uint16_t virtualMods 8280 ** @param const xcb_xkb_set_map_values_t *values 8281 ** @returns xcb_void_cookie_t 8282 ** 8283 *****************************************************************************/ 8284 8285 xcb_void_cookie_t 8286 xcb_xkb_set_map_aux (xcb_connection_t *c /**< */, 8287 xcb_xkb_device_spec_t deviceSpec /**< */, 8288 uint16_t present /**< */, 8289 uint16_t flags /**< */, 8290 xcb_keycode_t minKeyCode /**< */, 8291 xcb_keycode_t maxKeyCode /**< */, 8292 uint8_t firstType /**< */, 8293 uint8_t nTypes /**< */, 8294 xcb_keycode_t firstKeySym /**< */, 8295 uint8_t nKeySyms /**< */, 8296 uint16_t totalSyms /**< */, 8297 xcb_keycode_t firstKeyAction /**< */, 8298 uint8_t nKeyActions /**< */, 8299 uint16_t totalActions /**< */, 8300 xcb_keycode_t firstKeyBehavior /**< */, 8301 uint8_t nKeyBehaviors /**< */, 8302 uint8_t totalKeyBehaviors /**< */, 8303 xcb_keycode_t firstKeyExplicit /**< */, 8304 uint8_t nKeyExplicit /**< */, 8305 uint8_t totalKeyExplicit /**< */, 8306 xcb_keycode_t firstModMapKey /**< */, 8307 uint8_t nModMapKeys /**< */, 8308 uint8_t totalModMapKeys /**< */, 8309 xcb_keycode_t firstVModMapKey /**< */, 8310 uint8_t nVModMapKeys /**< */, 8311 uint8_t totalVModMapKeys /**< */, 8312 uint16_t virtualMods /**< */, 8313 const xcb_xkb_set_map_values_t *values /**< */) 8314 { 8315 static const xcb_protocol_request_t xcb_req = { 8316 /* count */ 3, 8317 /* ext */ &xcb_xkb_id, 8318 /* opcode */ XCB_XKB_SET_MAP, 8319 /* isvoid */ 1 8320 }; 8321 8322 struct iovec xcb_parts[5]; 8323 xcb_void_cookie_t xcb_ret; 8324 xcb_xkb_set_map_request_t xcb_out; 8325 void *xcb_aux0 = 0; 8326 8327 xcb_out.deviceSpec = deviceSpec; 8328 xcb_out.present = present; 8329 xcb_out.flags = flags; 8330 xcb_out.minKeyCode = minKeyCode; 8331 xcb_out.maxKeyCode = maxKeyCode; 8332 xcb_out.firstType = firstType; 8333 xcb_out.nTypes = nTypes; 8334 xcb_out.firstKeySym = firstKeySym; 8335 xcb_out.nKeySyms = nKeySyms; 8336 xcb_out.totalSyms = totalSyms; 8337 xcb_out.firstKeyAction = firstKeyAction; 8338 xcb_out.nKeyActions = nKeyActions; 8339 xcb_out.totalActions = totalActions; 8340 xcb_out.firstKeyBehavior = firstKeyBehavior; 8341 xcb_out.nKeyBehaviors = nKeyBehaviors; 8342 xcb_out.totalKeyBehaviors = totalKeyBehaviors; 8343 xcb_out.firstKeyExplicit = firstKeyExplicit; 8344 xcb_out.nKeyExplicit = nKeyExplicit; 8345 xcb_out.totalKeyExplicit = totalKeyExplicit; 8346 xcb_out.firstModMapKey = firstModMapKey; 8347 xcb_out.nModMapKeys = nModMapKeys; 8348 xcb_out.totalModMapKeys = totalModMapKeys; 8349 xcb_out.firstVModMapKey = firstVModMapKey; 8350 xcb_out.nVModMapKeys = nVModMapKeys; 8351 xcb_out.totalVModMapKeys = totalVModMapKeys; 8352 xcb_out.virtualMods = virtualMods; 8353 8354 xcb_parts[2].iov_base = (char *) &xcb_out; 8355 xcb_parts[2].iov_len = sizeof(xcb_out); 8356 xcb_parts[3].iov_base = 0; 8357 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8358 /* xcb_xkb_set_map_values_t values */ 8359 xcb_parts[4].iov_len = 8360 xcb_xkb_set_map_values_serialize (&xcb_aux0, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, values); 8361 xcb_parts[4].iov_base = xcb_aux0; 8362 8363 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 8364 free(xcb_aux0); 8365 return xcb_ret; 8366 } 8367 8368 int 8369 xcb_xkb_get_compat_map_sizeof (const void *_buffer /**< */) 8370 { 8371 char *xcb_tmp = (char *)_buffer; 8372 const xcb_xkb_get_compat_map_reply_t *_aux = (xcb_xkb_get_compat_map_reply_t *)_buffer; 8373 unsigned int xcb_buffer_len = 0; 8374 unsigned int xcb_block_len = 0; 8375 unsigned int xcb_pad = 0; 8376 unsigned int xcb_align_to; 8377 8378 8379 xcb_block_len += sizeof(xcb_xkb_get_compat_map_reply_t); 8380 xcb_tmp += xcb_block_len; 8381 /* si_rtrn */ 8382 xcb_block_len += (16 * _aux->nSIRtrn) * sizeof(uint8_t); 8383 xcb_tmp += xcb_block_len; 8384 xcb_align_to = ALIGNOF(uint8_t); 8385 /* insert padding */ 8386 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 8387 xcb_buffer_len += xcb_block_len + xcb_pad; 8388 if (0 != xcb_pad) { 8389 xcb_tmp += xcb_pad; 8390 xcb_pad = 0; 8391 } 8392 xcb_block_len = 0; 8393 /* group_rtrn */ 8394 xcb_block_len += xcb_popcount(_aux->groupsRtrn) * sizeof(xcb_xkb_mod_def_t); 8395 xcb_tmp += xcb_block_len; 8396 xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t); 8397 /* insert padding */ 8398 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 8399 xcb_buffer_len += xcb_block_len + xcb_pad; 8400 if (0 != xcb_pad) { 8401 xcb_tmp += xcb_pad; 8402 xcb_pad = 0; 8403 } 8404 xcb_block_len = 0; 8405 8406 return xcb_buffer_len; 8407 } 8408 8409 8410 /***************************************************************************** 8411 ** 8412 ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map 8413 ** 8414 ** @param xcb_connection_t *c 8415 ** @param xcb_xkb_device_spec_t deviceSpec 8416 ** @param uint8_t groups 8417 ** @param uint8_t getAllSI 8418 ** @param uint16_t firstSI 8419 ** @param uint16_t nSI 8420 ** @returns xcb_xkb_get_compat_map_cookie_t 8421 ** 8422 *****************************************************************************/ 8423 8424 xcb_xkb_get_compat_map_cookie_t 8425 xcb_xkb_get_compat_map (xcb_connection_t *c /**< */, 8426 xcb_xkb_device_spec_t deviceSpec /**< */, 8427 uint8_t groups /**< */, 8428 uint8_t getAllSI /**< */, 8429 uint16_t firstSI /**< */, 8430 uint16_t nSI /**< */) 8431 { 8432 static const xcb_protocol_request_t xcb_req = { 8433 /* count */ 2, 8434 /* ext */ &xcb_xkb_id, 8435 /* opcode */ XCB_XKB_GET_COMPAT_MAP, 8436 /* isvoid */ 0 8437 }; 8438 8439 struct iovec xcb_parts[4]; 8440 xcb_xkb_get_compat_map_cookie_t xcb_ret; 8441 xcb_xkb_get_compat_map_request_t xcb_out; 8442 8443 xcb_out.deviceSpec = deviceSpec; 8444 xcb_out.groups = groups; 8445 xcb_out.getAllSI = getAllSI; 8446 xcb_out.firstSI = firstSI; 8447 xcb_out.nSI = nSI; 8448 8449 xcb_parts[2].iov_base = (char *) &xcb_out; 8450 xcb_parts[2].iov_len = sizeof(xcb_out); 8451 xcb_parts[3].iov_base = 0; 8452 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8453 8454 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8455 return xcb_ret; 8456 } 8457 8458 8459 /***************************************************************************** 8460 ** 8461 ** xcb_xkb_get_compat_map_cookie_t xcb_xkb_get_compat_map_unchecked 8462 ** 8463 ** @param xcb_connection_t *c 8464 ** @param xcb_xkb_device_spec_t deviceSpec 8465 ** @param uint8_t groups 8466 ** @param uint8_t getAllSI 8467 ** @param uint16_t firstSI 8468 ** @param uint16_t nSI 8469 ** @returns xcb_xkb_get_compat_map_cookie_t 8470 ** 8471 *****************************************************************************/ 8472 8473 xcb_xkb_get_compat_map_cookie_t 8474 xcb_xkb_get_compat_map_unchecked (xcb_connection_t *c /**< */, 8475 xcb_xkb_device_spec_t deviceSpec /**< */, 8476 uint8_t groups /**< */, 8477 uint8_t getAllSI /**< */, 8478 uint16_t firstSI /**< */, 8479 uint16_t nSI /**< */) 8480 { 8481 static const xcb_protocol_request_t xcb_req = { 8482 /* count */ 2, 8483 /* ext */ &xcb_xkb_id, 8484 /* opcode */ XCB_XKB_GET_COMPAT_MAP, 8485 /* isvoid */ 0 8486 }; 8487 8488 struct iovec xcb_parts[4]; 8489 xcb_xkb_get_compat_map_cookie_t xcb_ret; 8490 xcb_xkb_get_compat_map_request_t xcb_out; 8491 8492 xcb_out.deviceSpec = deviceSpec; 8493 xcb_out.groups = groups; 8494 xcb_out.getAllSI = getAllSI; 8495 xcb_out.firstSI = firstSI; 8496 xcb_out.nSI = nSI; 8497 8498 xcb_parts[2].iov_base = (char *) &xcb_out; 8499 xcb_parts[2].iov_len = sizeof(xcb_out); 8500 xcb_parts[3].iov_base = 0; 8501 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8502 8503 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 8504 return xcb_ret; 8505 } 8506 8507 8508 /***************************************************************************** 8509 ** 8510 ** uint8_t * xcb_xkb_get_compat_map_si_rtrn 8511 ** 8512 ** @param const xcb_xkb_get_compat_map_reply_t *R 8513 ** @returns uint8_t * 8514 ** 8515 *****************************************************************************/ 8516 8517 uint8_t * 8518 xcb_xkb_get_compat_map_si_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8519 { 8520 return (uint8_t *) (R + 1); 8521 } 8522 8523 8524 /***************************************************************************** 8525 ** 8526 ** int xcb_xkb_get_compat_map_si_rtrn_length 8527 ** 8528 ** @param const xcb_xkb_get_compat_map_reply_t *R 8529 ** @returns int 8530 ** 8531 *****************************************************************************/ 8532 8533 int 8534 xcb_xkb_get_compat_map_si_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8535 { 8536 return (16 * R->nSIRtrn); 8537 } 8538 8539 8540 /***************************************************************************** 8541 ** 8542 ** xcb_generic_iterator_t xcb_xkb_get_compat_map_si_rtrn_end 8543 ** 8544 ** @param const xcb_xkb_get_compat_map_reply_t *R 8545 ** @returns xcb_generic_iterator_t 8546 ** 8547 *****************************************************************************/ 8548 8549 xcb_generic_iterator_t 8550 xcb_xkb_get_compat_map_si_rtrn_end (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8551 { 8552 xcb_generic_iterator_t i; 8553 i.data = ((uint8_t *) (R + 1)) + ((16 * R->nSIRtrn)); 8554 i.rem = 0; 8555 i.index = (char *) i.data - (char *) R; 8556 return i; 8557 } 8558 8559 8560 /***************************************************************************** 8561 ** 8562 ** xcb_xkb_mod_def_t * xcb_xkb_get_compat_map_group_rtrn 8563 ** 8564 ** @param const xcb_xkb_get_compat_map_reply_t *R 8565 ** @returns xcb_xkb_mod_def_t * 8566 ** 8567 *****************************************************************************/ 8568 8569 xcb_xkb_mod_def_t * 8570 xcb_xkb_get_compat_map_group_rtrn (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8571 { 8572 xcb_generic_iterator_t prev = xcb_xkb_get_compat_map_si_rtrn_end(R); 8573 return (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index) + 0); 8574 } 8575 8576 8577 /***************************************************************************** 8578 ** 8579 ** int xcb_xkb_get_compat_map_group_rtrn_length 8580 ** 8581 ** @param const xcb_xkb_get_compat_map_reply_t *R 8582 ** @returns int 8583 ** 8584 *****************************************************************************/ 8585 8586 int 8587 xcb_xkb_get_compat_map_group_rtrn_length (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8588 { 8589 return xcb_popcount(R->groupsRtrn); 8590 } 8591 8592 8593 /***************************************************************************** 8594 ** 8595 ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_compat_map_group_rtrn_iterator 8596 ** 8597 ** @param const xcb_xkb_get_compat_map_reply_t *R 8598 ** @returns xcb_xkb_mod_def_iterator_t 8599 ** 8600 *****************************************************************************/ 8601 8602 xcb_xkb_mod_def_iterator_t 8603 xcb_xkb_get_compat_map_group_rtrn_iterator (const xcb_xkb_get_compat_map_reply_t *R /**< */) 8604 { 8605 xcb_xkb_mod_def_iterator_t i; 8606 xcb_generic_iterator_t prev = xcb_xkb_get_compat_map_si_rtrn_end(R); 8607 i.data = (xcb_xkb_mod_def_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_mod_def_t, prev.index)); 8608 i.rem = xcb_popcount(R->groupsRtrn); 8609 i.index = (char *) i.data - (char *) R; 8610 return i; 8611 } 8612 8613 8614 /***************************************************************************** 8615 ** 8616 ** xcb_xkb_get_compat_map_reply_t * xcb_xkb_get_compat_map_reply 8617 ** 8618 ** @param xcb_connection_t *c 8619 ** @param xcb_xkb_get_compat_map_cookie_t cookie 8620 ** @param xcb_generic_error_t **e 8621 ** @returns xcb_xkb_get_compat_map_reply_t * 8622 ** 8623 *****************************************************************************/ 8624 8625 xcb_xkb_get_compat_map_reply_t * 8626 xcb_xkb_get_compat_map_reply (xcb_connection_t *c /**< */, 8627 xcb_xkb_get_compat_map_cookie_t cookie /**< */, 8628 xcb_generic_error_t **e /**< */) 8629 { 8630 return (xcb_xkb_get_compat_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 8631 } 8632 8633 int 8634 xcb_xkb_set_compat_map_sizeof (const void *_buffer /**< */) 8635 { 8636 char *xcb_tmp = (char *)_buffer; 8637 const xcb_xkb_set_compat_map_request_t *_aux = (xcb_xkb_set_compat_map_request_t *)_buffer; 8638 unsigned int xcb_buffer_len = 0; 8639 unsigned int xcb_block_len = 0; 8640 unsigned int xcb_pad = 0; 8641 unsigned int xcb_align_to; 8642 8643 8644 xcb_block_len += sizeof(xcb_xkb_set_compat_map_request_t); 8645 xcb_tmp += xcb_block_len; 8646 /* si */ 8647 xcb_block_len += (16 * _aux->nSI) * sizeof(uint8_t); 8648 xcb_tmp += xcb_block_len; 8649 xcb_align_to = ALIGNOF(uint8_t); 8650 /* insert padding */ 8651 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 8652 xcb_buffer_len += xcb_block_len + xcb_pad; 8653 if (0 != xcb_pad) { 8654 xcb_tmp += xcb_pad; 8655 xcb_pad = 0; 8656 } 8657 xcb_block_len = 0; 8658 /* groupMaps */ 8659 xcb_block_len += xcb_popcount(_aux->groups) * sizeof(xcb_xkb_mod_def_t); 8660 xcb_tmp += xcb_block_len; 8661 xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t); 8662 /* insert padding */ 8663 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 8664 xcb_buffer_len += xcb_block_len + xcb_pad; 8665 if (0 != xcb_pad) { 8666 xcb_tmp += xcb_pad; 8667 xcb_pad = 0; 8668 } 8669 xcb_block_len = 0; 8670 8671 return xcb_buffer_len; 8672 } 8673 8674 8675 /***************************************************************************** 8676 ** 8677 ** xcb_void_cookie_t xcb_xkb_set_compat_map_checked 8678 ** 8679 ** @param xcb_connection_t *c 8680 ** @param xcb_xkb_device_spec_t deviceSpec 8681 ** @param uint8_t recomputeActions 8682 ** @param uint8_t truncateSI 8683 ** @param uint8_t groups 8684 ** @param uint16_t firstSI 8685 ** @param uint16_t nSI 8686 ** @param const uint8_t *si 8687 ** @param const xcb_xkb_mod_def_t *groupMaps 8688 ** @returns xcb_void_cookie_t 8689 ** 8690 *****************************************************************************/ 8691 8692 xcb_void_cookie_t 8693 xcb_xkb_set_compat_map_checked (xcb_connection_t *c /**< */, 8694 xcb_xkb_device_spec_t deviceSpec /**< */, 8695 uint8_t recomputeActions /**< */, 8696 uint8_t truncateSI /**< */, 8697 uint8_t groups /**< */, 8698 uint16_t firstSI /**< */, 8699 uint16_t nSI /**< */, 8700 const uint8_t *si /**< */, 8701 const xcb_xkb_mod_def_t *groupMaps /**< */) 8702 { 8703 static const xcb_protocol_request_t xcb_req = { 8704 /* count */ 6, 8705 /* ext */ &xcb_xkb_id, 8706 /* opcode */ XCB_XKB_SET_COMPAT_MAP, 8707 /* isvoid */ 1 8708 }; 8709 8710 struct iovec xcb_parts[8]; 8711 xcb_void_cookie_t xcb_ret; 8712 xcb_xkb_set_compat_map_request_t xcb_out; 8713 8714 xcb_out.deviceSpec = deviceSpec; 8715 xcb_out.pad0 = 0; 8716 xcb_out.recomputeActions = recomputeActions; 8717 xcb_out.truncateSI = truncateSI; 8718 xcb_out.groups = groups; 8719 xcb_out.firstSI = firstSI; 8720 xcb_out.nSI = nSI; 8721 memset(xcb_out.pad1, 0, 2); 8722 8723 xcb_parts[2].iov_base = (char *) &xcb_out; 8724 xcb_parts[2].iov_len = sizeof(xcb_out); 8725 xcb_parts[3].iov_base = 0; 8726 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8727 /* uint8_t si */ 8728 xcb_parts[4].iov_base = (char *) si; 8729 xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t); 8730 xcb_parts[5].iov_base = 0; 8731 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 8732 /* xcb_xkb_mod_def_t groupMaps */ 8733 xcb_parts[6].iov_base = (char *) groupMaps; 8734 xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t); 8735 xcb_parts[7].iov_base = 0; 8736 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 8737 8738 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8739 return xcb_ret; 8740 } 8741 8742 8743 /***************************************************************************** 8744 ** 8745 ** xcb_void_cookie_t xcb_xkb_set_compat_map 8746 ** 8747 ** @param xcb_connection_t *c 8748 ** @param xcb_xkb_device_spec_t deviceSpec 8749 ** @param uint8_t recomputeActions 8750 ** @param uint8_t truncateSI 8751 ** @param uint8_t groups 8752 ** @param uint16_t firstSI 8753 ** @param uint16_t nSI 8754 ** @param const uint8_t *si 8755 ** @param const xcb_xkb_mod_def_t *groupMaps 8756 ** @returns xcb_void_cookie_t 8757 ** 8758 *****************************************************************************/ 8759 8760 xcb_void_cookie_t 8761 xcb_xkb_set_compat_map (xcb_connection_t *c /**< */, 8762 xcb_xkb_device_spec_t deviceSpec /**< */, 8763 uint8_t recomputeActions /**< */, 8764 uint8_t truncateSI /**< */, 8765 uint8_t groups /**< */, 8766 uint16_t firstSI /**< */, 8767 uint16_t nSI /**< */, 8768 const uint8_t *si /**< */, 8769 const xcb_xkb_mod_def_t *groupMaps /**< */) 8770 { 8771 static const xcb_protocol_request_t xcb_req = { 8772 /* count */ 6, 8773 /* ext */ &xcb_xkb_id, 8774 /* opcode */ XCB_XKB_SET_COMPAT_MAP, 8775 /* isvoid */ 1 8776 }; 8777 8778 struct iovec xcb_parts[8]; 8779 xcb_void_cookie_t xcb_ret; 8780 xcb_xkb_set_compat_map_request_t xcb_out; 8781 8782 xcb_out.deviceSpec = deviceSpec; 8783 xcb_out.pad0 = 0; 8784 xcb_out.recomputeActions = recomputeActions; 8785 xcb_out.truncateSI = truncateSI; 8786 xcb_out.groups = groups; 8787 xcb_out.firstSI = firstSI; 8788 xcb_out.nSI = nSI; 8789 memset(xcb_out.pad1, 0, 2); 8790 8791 xcb_parts[2].iov_base = (char *) &xcb_out; 8792 xcb_parts[2].iov_len = sizeof(xcb_out); 8793 xcb_parts[3].iov_base = 0; 8794 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8795 /* uint8_t si */ 8796 xcb_parts[4].iov_base = (char *) si; 8797 xcb_parts[4].iov_len = (16 * nSI) * sizeof(uint8_t); 8798 xcb_parts[5].iov_base = 0; 8799 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 8800 /* xcb_xkb_mod_def_t groupMaps */ 8801 xcb_parts[6].iov_base = (char *) groupMaps; 8802 xcb_parts[6].iov_len = xcb_popcount(groups) * sizeof(xcb_xkb_mod_def_t); 8803 xcb_parts[7].iov_base = 0; 8804 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 8805 8806 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 8807 return xcb_ret; 8808 } 8809 8810 8811 /***************************************************************************** 8812 ** 8813 ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state 8814 ** 8815 ** @param xcb_connection_t *c 8816 ** @param xcb_xkb_device_spec_t deviceSpec 8817 ** @returns xcb_xkb_get_indicator_state_cookie_t 8818 ** 8819 *****************************************************************************/ 8820 8821 xcb_xkb_get_indicator_state_cookie_t 8822 xcb_xkb_get_indicator_state (xcb_connection_t *c /**< */, 8823 xcb_xkb_device_spec_t deviceSpec /**< */) 8824 { 8825 static const xcb_protocol_request_t xcb_req = { 8826 /* count */ 2, 8827 /* ext */ &xcb_xkb_id, 8828 /* opcode */ XCB_XKB_GET_INDICATOR_STATE, 8829 /* isvoid */ 0 8830 }; 8831 8832 struct iovec xcb_parts[4]; 8833 xcb_xkb_get_indicator_state_cookie_t xcb_ret; 8834 xcb_xkb_get_indicator_state_request_t xcb_out; 8835 8836 xcb_out.deviceSpec = deviceSpec; 8837 memset(xcb_out.pad0, 0, 2); 8838 8839 xcb_parts[2].iov_base = (char *) &xcb_out; 8840 xcb_parts[2].iov_len = sizeof(xcb_out); 8841 xcb_parts[3].iov_base = 0; 8842 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8843 8844 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8845 return xcb_ret; 8846 } 8847 8848 8849 /***************************************************************************** 8850 ** 8851 ** xcb_xkb_get_indicator_state_cookie_t xcb_xkb_get_indicator_state_unchecked 8852 ** 8853 ** @param xcb_connection_t *c 8854 ** @param xcb_xkb_device_spec_t deviceSpec 8855 ** @returns xcb_xkb_get_indicator_state_cookie_t 8856 ** 8857 *****************************************************************************/ 8858 8859 xcb_xkb_get_indicator_state_cookie_t 8860 xcb_xkb_get_indicator_state_unchecked (xcb_connection_t *c /**< */, 8861 xcb_xkb_device_spec_t deviceSpec /**< */) 8862 { 8863 static const xcb_protocol_request_t xcb_req = { 8864 /* count */ 2, 8865 /* ext */ &xcb_xkb_id, 8866 /* opcode */ XCB_XKB_GET_INDICATOR_STATE, 8867 /* isvoid */ 0 8868 }; 8869 8870 struct iovec xcb_parts[4]; 8871 xcb_xkb_get_indicator_state_cookie_t xcb_ret; 8872 xcb_xkb_get_indicator_state_request_t xcb_out; 8873 8874 xcb_out.deviceSpec = deviceSpec; 8875 memset(xcb_out.pad0, 0, 2); 8876 8877 xcb_parts[2].iov_base = (char *) &xcb_out; 8878 xcb_parts[2].iov_len = sizeof(xcb_out); 8879 xcb_parts[3].iov_base = 0; 8880 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8881 8882 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 8883 return xcb_ret; 8884 } 8885 8886 8887 /***************************************************************************** 8888 ** 8889 ** xcb_xkb_get_indicator_state_reply_t * xcb_xkb_get_indicator_state_reply 8890 ** 8891 ** @param xcb_connection_t *c 8892 ** @param xcb_xkb_get_indicator_state_cookie_t cookie 8893 ** @param xcb_generic_error_t **e 8894 ** @returns xcb_xkb_get_indicator_state_reply_t * 8895 ** 8896 *****************************************************************************/ 8897 8898 xcb_xkb_get_indicator_state_reply_t * 8899 xcb_xkb_get_indicator_state_reply (xcb_connection_t *c /**< */, 8900 xcb_xkb_get_indicator_state_cookie_t cookie /**< */, 8901 xcb_generic_error_t **e /**< */) 8902 { 8903 return (xcb_xkb_get_indicator_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 8904 } 8905 8906 int 8907 xcb_xkb_get_indicator_map_sizeof (const void *_buffer /**< */) 8908 { 8909 char *xcb_tmp = (char *)_buffer; 8910 const xcb_xkb_get_indicator_map_reply_t *_aux = (xcb_xkb_get_indicator_map_reply_t *)_buffer; 8911 unsigned int xcb_buffer_len = 0; 8912 unsigned int xcb_block_len = 0; 8913 unsigned int xcb_pad = 0; 8914 unsigned int xcb_align_to; 8915 8916 8917 xcb_block_len += sizeof(xcb_xkb_get_indicator_map_reply_t); 8918 xcb_tmp += xcb_block_len; 8919 /* maps */ 8920 xcb_block_len += _aux->nIndicators * sizeof(xcb_xkb_indicator_map_t); 8921 xcb_tmp += xcb_block_len; 8922 xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t); 8923 /* insert padding */ 8924 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 8925 xcb_buffer_len += xcb_block_len + xcb_pad; 8926 if (0 != xcb_pad) { 8927 xcb_tmp += xcb_pad; 8928 xcb_pad = 0; 8929 } 8930 xcb_block_len = 0; 8931 8932 return xcb_buffer_len; 8933 } 8934 8935 8936 /***************************************************************************** 8937 ** 8938 ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map 8939 ** 8940 ** @param xcb_connection_t *c 8941 ** @param xcb_xkb_device_spec_t deviceSpec 8942 ** @param uint32_t which 8943 ** @returns xcb_xkb_get_indicator_map_cookie_t 8944 ** 8945 *****************************************************************************/ 8946 8947 xcb_xkb_get_indicator_map_cookie_t 8948 xcb_xkb_get_indicator_map (xcb_connection_t *c /**< */, 8949 xcb_xkb_device_spec_t deviceSpec /**< */, 8950 uint32_t which /**< */) 8951 { 8952 static const xcb_protocol_request_t xcb_req = { 8953 /* count */ 2, 8954 /* ext */ &xcb_xkb_id, 8955 /* opcode */ XCB_XKB_GET_INDICATOR_MAP, 8956 /* isvoid */ 0 8957 }; 8958 8959 struct iovec xcb_parts[4]; 8960 xcb_xkb_get_indicator_map_cookie_t xcb_ret; 8961 xcb_xkb_get_indicator_map_request_t xcb_out; 8962 8963 xcb_out.deviceSpec = deviceSpec; 8964 memset(xcb_out.pad0, 0, 2); 8965 xcb_out.which = which; 8966 8967 xcb_parts[2].iov_base = (char *) &xcb_out; 8968 xcb_parts[2].iov_len = sizeof(xcb_out); 8969 xcb_parts[3].iov_base = 0; 8970 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 8971 8972 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 8973 return xcb_ret; 8974 } 8975 8976 8977 /***************************************************************************** 8978 ** 8979 ** xcb_xkb_get_indicator_map_cookie_t xcb_xkb_get_indicator_map_unchecked 8980 ** 8981 ** @param xcb_connection_t *c 8982 ** @param xcb_xkb_device_spec_t deviceSpec 8983 ** @param uint32_t which 8984 ** @returns xcb_xkb_get_indicator_map_cookie_t 8985 ** 8986 *****************************************************************************/ 8987 8988 xcb_xkb_get_indicator_map_cookie_t 8989 xcb_xkb_get_indicator_map_unchecked (xcb_connection_t *c /**< */, 8990 xcb_xkb_device_spec_t deviceSpec /**< */, 8991 uint32_t which /**< */) 8992 { 8993 static const xcb_protocol_request_t xcb_req = { 8994 /* count */ 2, 8995 /* ext */ &xcb_xkb_id, 8996 /* opcode */ XCB_XKB_GET_INDICATOR_MAP, 8997 /* isvoid */ 0 8998 }; 8999 9000 struct iovec xcb_parts[4]; 9001 xcb_xkb_get_indicator_map_cookie_t xcb_ret; 9002 xcb_xkb_get_indicator_map_request_t xcb_out; 9003 9004 xcb_out.deviceSpec = deviceSpec; 9005 memset(xcb_out.pad0, 0, 2); 9006 xcb_out.which = which; 9007 9008 xcb_parts[2].iov_base = (char *) &xcb_out; 9009 xcb_parts[2].iov_len = sizeof(xcb_out); 9010 xcb_parts[3].iov_base = 0; 9011 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9012 9013 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 9014 return xcb_ret; 9015 } 9016 9017 9018 /***************************************************************************** 9019 ** 9020 ** xcb_xkb_indicator_map_t * xcb_xkb_get_indicator_map_maps 9021 ** 9022 ** @param const xcb_xkb_get_indicator_map_reply_t *R 9023 ** @returns xcb_xkb_indicator_map_t * 9024 ** 9025 *****************************************************************************/ 9026 9027 xcb_xkb_indicator_map_t * 9028 xcb_xkb_get_indicator_map_maps (const xcb_xkb_get_indicator_map_reply_t *R /**< */) 9029 { 9030 return (xcb_xkb_indicator_map_t *) (R + 1); 9031 } 9032 9033 9034 /***************************************************************************** 9035 ** 9036 ** int xcb_xkb_get_indicator_map_maps_length 9037 ** 9038 ** @param const xcb_xkb_get_indicator_map_reply_t *R 9039 ** @returns int 9040 ** 9041 *****************************************************************************/ 9042 9043 int 9044 xcb_xkb_get_indicator_map_maps_length (const xcb_xkb_get_indicator_map_reply_t *R /**< */) 9045 { 9046 return R->nIndicators; 9047 } 9048 9049 9050 /***************************************************************************** 9051 ** 9052 ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_indicator_map_maps_iterator 9053 ** 9054 ** @param const xcb_xkb_get_indicator_map_reply_t *R 9055 ** @returns xcb_xkb_indicator_map_iterator_t 9056 ** 9057 *****************************************************************************/ 9058 9059 xcb_xkb_indicator_map_iterator_t 9060 xcb_xkb_get_indicator_map_maps_iterator (const xcb_xkb_get_indicator_map_reply_t *R /**< */) 9061 { 9062 xcb_xkb_indicator_map_iterator_t i; 9063 i.data = (xcb_xkb_indicator_map_t *) (R + 1); 9064 i.rem = R->nIndicators; 9065 i.index = (char *) i.data - (char *) R; 9066 return i; 9067 } 9068 9069 9070 /***************************************************************************** 9071 ** 9072 ** xcb_xkb_get_indicator_map_reply_t * xcb_xkb_get_indicator_map_reply 9073 ** 9074 ** @param xcb_connection_t *c 9075 ** @param xcb_xkb_get_indicator_map_cookie_t cookie 9076 ** @param xcb_generic_error_t **e 9077 ** @returns xcb_xkb_get_indicator_map_reply_t * 9078 ** 9079 *****************************************************************************/ 9080 9081 xcb_xkb_get_indicator_map_reply_t * 9082 xcb_xkb_get_indicator_map_reply (xcb_connection_t *c /**< */, 9083 xcb_xkb_get_indicator_map_cookie_t cookie /**< */, 9084 xcb_generic_error_t **e /**< */) 9085 { 9086 return (xcb_xkb_get_indicator_map_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 9087 } 9088 9089 int 9090 xcb_xkb_set_indicator_map_sizeof (const void *_buffer /**< */) 9091 { 9092 char *xcb_tmp = (char *)_buffer; 9093 const xcb_xkb_set_indicator_map_request_t *_aux = (xcb_xkb_set_indicator_map_request_t *)_buffer; 9094 unsigned int xcb_buffer_len = 0; 9095 unsigned int xcb_block_len = 0; 9096 unsigned int xcb_pad = 0; 9097 unsigned int xcb_align_to; 9098 9099 9100 xcb_block_len += sizeof(xcb_xkb_set_indicator_map_request_t); 9101 xcb_tmp += xcb_block_len; 9102 /* maps */ 9103 xcb_block_len += xcb_popcount(_aux->which) * sizeof(xcb_xkb_indicator_map_t); 9104 xcb_tmp += xcb_block_len; 9105 xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t); 9106 /* insert padding */ 9107 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 9108 xcb_buffer_len += xcb_block_len + xcb_pad; 9109 if (0 != xcb_pad) { 9110 xcb_tmp += xcb_pad; 9111 xcb_pad = 0; 9112 } 9113 xcb_block_len = 0; 9114 9115 return xcb_buffer_len; 9116 } 9117 9118 9119 /***************************************************************************** 9120 ** 9121 ** xcb_void_cookie_t xcb_xkb_set_indicator_map_checked 9122 ** 9123 ** @param xcb_connection_t *c 9124 ** @param xcb_xkb_device_spec_t deviceSpec 9125 ** @param uint32_t which 9126 ** @param const xcb_xkb_indicator_map_t *maps 9127 ** @returns xcb_void_cookie_t 9128 ** 9129 *****************************************************************************/ 9130 9131 xcb_void_cookie_t 9132 xcb_xkb_set_indicator_map_checked (xcb_connection_t *c /**< */, 9133 xcb_xkb_device_spec_t deviceSpec /**< */, 9134 uint32_t which /**< */, 9135 const xcb_xkb_indicator_map_t *maps /**< */) 9136 { 9137 static const xcb_protocol_request_t xcb_req = { 9138 /* count */ 4, 9139 /* ext */ &xcb_xkb_id, 9140 /* opcode */ XCB_XKB_SET_INDICATOR_MAP, 9141 /* isvoid */ 1 9142 }; 9143 9144 struct iovec xcb_parts[6]; 9145 xcb_void_cookie_t xcb_ret; 9146 xcb_xkb_set_indicator_map_request_t xcb_out; 9147 9148 xcb_out.deviceSpec = deviceSpec; 9149 memset(xcb_out.pad0, 0, 2); 9150 xcb_out.which = which; 9151 9152 xcb_parts[2].iov_base = (char *) &xcb_out; 9153 xcb_parts[2].iov_len = sizeof(xcb_out); 9154 xcb_parts[3].iov_base = 0; 9155 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9156 /* xcb_xkb_indicator_map_t maps */ 9157 xcb_parts[4].iov_base = (char *) maps; 9158 xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t); 9159 xcb_parts[5].iov_base = 0; 9160 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 9161 9162 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 9163 return xcb_ret; 9164 } 9165 9166 9167 /***************************************************************************** 9168 ** 9169 ** xcb_void_cookie_t xcb_xkb_set_indicator_map 9170 ** 9171 ** @param xcb_connection_t *c 9172 ** @param xcb_xkb_device_spec_t deviceSpec 9173 ** @param uint32_t which 9174 ** @param const xcb_xkb_indicator_map_t *maps 9175 ** @returns xcb_void_cookie_t 9176 ** 9177 *****************************************************************************/ 9178 9179 xcb_void_cookie_t 9180 xcb_xkb_set_indicator_map (xcb_connection_t *c /**< */, 9181 xcb_xkb_device_spec_t deviceSpec /**< */, 9182 uint32_t which /**< */, 9183 const xcb_xkb_indicator_map_t *maps /**< */) 9184 { 9185 static const xcb_protocol_request_t xcb_req = { 9186 /* count */ 4, 9187 /* ext */ &xcb_xkb_id, 9188 /* opcode */ XCB_XKB_SET_INDICATOR_MAP, 9189 /* isvoid */ 1 9190 }; 9191 9192 struct iovec xcb_parts[6]; 9193 xcb_void_cookie_t xcb_ret; 9194 xcb_xkb_set_indicator_map_request_t xcb_out; 9195 9196 xcb_out.deviceSpec = deviceSpec; 9197 memset(xcb_out.pad0, 0, 2); 9198 xcb_out.which = which; 9199 9200 xcb_parts[2].iov_base = (char *) &xcb_out; 9201 xcb_parts[2].iov_len = sizeof(xcb_out); 9202 xcb_parts[3].iov_base = 0; 9203 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9204 /* xcb_xkb_indicator_map_t maps */ 9205 xcb_parts[4].iov_base = (char *) maps; 9206 xcb_parts[4].iov_len = xcb_popcount(which) * sizeof(xcb_xkb_indicator_map_t); 9207 xcb_parts[5].iov_base = 0; 9208 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 9209 9210 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 9211 return xcb_ret; 9212 } 9213 9214 9215 /***************************************************************************** 9216 ** 9217 ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator 9218 ** 9219 ** @param xcb_connection_t *c 9220 ** @param xcb_xkb_device_spec_t deviceSpec 9221 ** @param xcb_xkb_led_class_spec_t ledClass 9222 ** @param xcb_xkb_id_spec_t ledID 9223 ** @param xcb_atom_t indicator 9224 ** @returns xcb_xkb_get_named_indicator_cookie_t 9225 ** 9226 *****************************************************************************/ 9227 9228 xcb_xkb_get_named_indicator_cookie_t 9229 xcb_xkb_get_named_indicator (xcb_connection_t *c /**< */, 9230 xcb_xkb_device_spec_t deviceSpec /**< */, 9231 xcb_xkb_led_class_spec_t ledClass /**< */, 9232 xcb_xkb_id_spec_t ledID /**< */, 9233 xcb_atom_t indicator /**< */) 9234 { 9235 static const xcb_protocol_request_t xcb_req = { 9236 /* count */ 2, 9237 /* ext */ &xcb_xkb_id, 9238 /* opcode */ XCB_XKB_GET_NAMED_INDICATOR, 9239 /* isvoid */ 0 9240 }; 9241 9242 struct iovec xcb_parts[4]; 9243 xcb_xkb_get_named_indicator_cookie_t xcb_ret; 9244 xcb_xkb_get_named_indicator_request_t xcb_out; 9245 9246 xcb_out.deviceSpec = deviceSpec; 9247 xcb_out.ledClass = ledClass; 9248 xcb_out.ledID = ledID; 9249 memset(xcb_out.pad0, 0, 2); 9250 xcb_out.indicator = indicator; 9251 9252 xcb_parts[2].iov_base = (char *) &xcb_out; 9253 xcb_parts[2].iov_len = sizeof(xcb_out); 9254 xcb_parts[3].iov_base = 0; 9255 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9256 9257 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 9258 return xcb_ret; 9259 } 9260 9261 9262 /***************************************************************************** 9263 ** 9264 ** xcb_xkb_get_named_indicator_cookie_t xcb_xkb_get_named_indicator_unchecked 9265 ** 9266 ** @param xcb_connection_t *c 9267 ** @param xcb_xkb_device_spec_t deviceSpec 9268 ** @param xcb_xkb_led_class_spec_t ledClass 9269 ** @param xcb_xkb_id_spec_t ledID 9270 ** @param xcb_atom_t indicator 9271 ** @returns xcb_xkb_get_named_indicator_cookie_t 9272 ** 9273 *****************************************************************************/ 9274 9275 xcb_xkb_get_named_indicator_cookie_t 9276 xcb_xkb_get_named_indicator_unchecked (xcb_connection_t *c /**< */, 9277 xcb_xkb_device_spec_t deviceSpec /**< */, 9278 xcb_xkb_led_class_spec_t ledClass /**< */, 9279 xcb_xkb_id_spec_t ledID /**< */, 9280 xcb_atom_t indicator /**< */) 9281 { 9282 static const xcb_protocol_request_t xcb_req = { 9283 /* count */ 2, 9284 /* ext */ &xcb_xkb_id, 9285 /* opcode */ XCB_XKB_GET_NAMED_INDICATOR, 9286 /* isvoid */ 0 9287 }; 9288 9289 struct iovec xcb_parts[4]; 9290 xcb_xkb_get_named_indicator_cookie_t xcb_ret; 9291 xcb_xkb_get_named_indicator_request_t xcb_out; 9292 9293 xcb_out.deviceSpec = deviceSpec; 9294 xcb_out.ledClass = ledClass; 9295 xcb_out.ledID = ledID; 9296 memset(xcb_out.pad0, 0, 2); 9297 xcb_out.indicator = indicator; 9298 9299 xcb_parts[2].iov_base = (char *) &xcb_out; 9300 xcb_parts[2].iov_len = sizeof(xcb_out); 9301 xcb_parts[3].iov_base = 0; 9302 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9303 9304 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 9305 return xcb_ret; 9306 } 9307 9308 9309 /***************************************************************************** 9310 ** 9311 ** xcb_xkb_get_named_indicator_reply_t * xcb_xkb_get_named_indicator_reply 9312 ** 9313 ** @param xcb_connection_t *c 9314 ** @param xcb_xkb_get_named_indicator_cookie_t cookie 9315 ** @param xcb_generic_error_t **e 9316 ** @returns xcb_xkb_get_named_indicator_reply_t * 9317 ** 9318 *****************************************************************************/ 9319 9320 xcb_xkb_get_named_indicator_reply_t * 9321 xcb_xkb_get_named_indicator_reply (xcb_connection_t *c /**< */, 9322 xcb_xkb_get_named_indicator_cookie_t cookie /**< */, 9323 xcb_generic_error_t **e /**< */) 9324 { 9325 return (xcb_xkb_get_named_indicator_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 9326 } 9327 9328 9329 /***************************************************************************** 9330 ** 9331 ** xcb_void_cookie_t xcb_xkb_set_named_indicator_checked 9332 ** 9333 ** @param xcb_connection_t *c 9334 ** @param xcb_xkb_device_spec_t deviceSpec 9335 ** @param xcb_xkb_led_class_spec_t ledClass 9336 ** @param xcb_xkb_id_spec_t ledID 9337 ** @param xcb_atom_t indicator 9338 ** @param uint8_t setState 9339 ** @param uint8_t on 9340 ** @param uint8_t setMap 9341 ** @param uint8_t createMap 9342 ** @param uint8_t map_flags 9343 ** @param uint8_t map_whichGroups 9344 ** @param uint8_t map_groups 9345 ** @param uint8_t map_whichMods 9346 ** @param uint8_t map_realMods 9347 ** @param uint16_t map_vmods 9348 ** @param uint32_t map_ctrls 9349 ** @returns xcb_void_cookie_t 9350 ** 9351 *****************************************************************************/ 9352 9353 xcb_void_cookie_t 9354 xcb_xkb_set_named_indicator_checked (xcb_connection_t *c /**< */, 9355 xcb_xkb_device_spec_t deviceSpec /**< */, 9356 xcb_xkb_led_class_spec_t ledClass /**< */, 9357 xcb_xkb_id_spec_t ledID /**< */, 9358 xcb_atom_t indicator /**< */, 9359 uint8_t setState /**< */, 9360 uint8_t on /**< */, 9361 uint8_t setMap /**< */, 9362 uint8_t createMap /**< */, 9363 uint8_t map_flags /**< */, 9364 uint8_t map_whichGroups /**< */, 9365 uint8_t map_groups /**< */, 9366 uint8_t map_whichMods /**< */, 9367 uint8_t map_realMods /**< */, 9368 uint16_t map_vmods /**< */, 9369 uint32_t map_ctrls /**< */) 9370 { 9371 static const xcb_protocol_request_t xcb_req = { 9372 /* count */ 2, 9373 /* ext */ &xcb_xkb_id, 9374 /* opcode */ XCB_XKB_SET_NAMED_INDICATOR, 9375 /* isvoid */ 1 9376 }; 9377 9378 struct iovec xcb_parts[4]; 9379 xcb_void_cookie_t xcb_ret; 9380 xcb_xkb_set_named_indicator_request_t xcb_out; 9381 9382 xcb_out.deviceSpec = deviceSpec; 9383 xcb_out.ledClass = ledClass; 9384 xcb_out.ledID = ledID; 9385 memset(xcb_out.pad0, 0, 2); 9386 xcb_out.indicator = indicator; 9387 xcb_out.setState = setState; 9388 xcb_out.on = on; 9389 xcb_out.setMap = setMap; 9390 xcb_out.createMap = createMap; 9391 xcb_out.pad1 = 0; 9392 xcb_out.map_flags = map_flags; 9393 xcb_out.map_whichGroups = map_whichGroups; 9394 xcb_out.map_groups = map_groups; 9395 xcb_out.map_whichMods = map_whichMods; 9396 xcb_out.map_realMods = map_realMods; 9397 xcb_out.map_vmods = map_vmods; 9398 xcb_out.map_ctrls = map_ctrls; 9399 9400 xcb_parts[2].iov_base = (char *) &xcb_out; 9401 xcb_parts[2].iov_len = sizeof(xcb_out); 9402 xcb_parts[3].iov_base = 0; 9403 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9404 9405 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 9406 return xcb_ret; 9407 } 9408 9409 9410 /***************************************************************************** 9411 ** 9412 ** xcb_void_cookie_t xcb_xkb_set_named_indicator 9413 ** 9414 ** @param xcb_connection_t *c 9415 ** @param xcb_xkb_device_spec_t deviceSpec 9416 ** @param xcb_xkb_led_class_spec_t ledClass 9417 ** @param xcb_xkb_id_spec_t ledID 9418 ** @param xcb_atom_t indicator 9419 ** @param uint8_t setState 9420 ** @param uint8_t on 9421 ** @param uint8_t setMap 9422 ** @param uint8_t createMap 9423 ** @param uint8_t map_flags 9424 ** @param uint8_t map_whichGroups 9425 ** @param uint8_t map_groups 9426 ** @param uint8_t map_whichMods 9427 ** @param uint8_t map_realMods 9428 ** @param uint16_t map_vmods 9429 ** @param uint32_t map_ctrls 9430 ** @returns xcb_void_cookie_t 9431 ** 9432 *****************************************************************************/ 9433 9434 xcb_void_cookie_t 9435 xcb_xkb_set_named_indicator (xcb_connection_t *c /**< */, 9436 xcb_xkb_device_spec_t deviceSpec /**< */, 9437 xcb_xkb_led_class_spec_t ledClass /**< */, 9438 xcb_xkb_id_spec_t ledID /**< */, 9439 xcb_atom_t indicator /**< */, 9440 uint8_t setState /**< */, 9441 uint8_t on /**< */, 9442 uint8_t setMap /**< */, 9443 uint8_t createMap /**< */, 9444 uint8_t map_flags /**< */, 9445 uint8_t map_whichGroups /**< */, 9446 uint8_t map_groups /**< */, 9447 uint8_t map_whichMods /**< */, 9448 uint8_t map_realMods /**< */, 9449 uint16_t map_vmods /**< */, 9450 uint32_t map_ctrls /**< */) 9451 { 9452 static const xcb_protocol_request_t xcb_req = { 9453 /* count */ 2, 9454 /* ext */ &xcb_xkb_id, 9455 /* opcode */ XCB_XKB_SET_NAMED_INDICATOR, 9456 /* isvoid */ 1 9457 }; 9458 9459 struct iovec xcb_parts[4]; 9460 xcb_void_cookie_t xcb_ret; 9461 xcb_xkb_set_named_indicator_request_t xcb_out; 9462 9463 xcb_out.deviceSpec = deviceSpec; 9464 xcb_out.ledClass = ledClass; 9465 xcb_out.ledID = ledID; 9466 memset(xcb_out.pad0, 0, 2); 9467 xcb_out.indicator = indicator; 9468 xcb_out.setState = setState; 9469 xcb_out.on = on; 9470 xcb_out.setMap = setMap; 9471 xcb_out.createMap = createMap; 9472 xcb_out.pad1 = 0; 9473 xcb_out.map_flags = map_flags; 9474 xcb_out.map_whichGroups = map_whichGroups; 9475 xcb_out.map_groups = map_groups; 9476 xcb_out.map_whichMods = map_whichMods; 9477 xcb_out.map_realMods = map_realMods; 9478 xcb_out.map_vmods = map_vmods; 9479 xcb_out.map_ctrls = map_ctrls; 9480 9481 xcb_parts[2].iov_base = (char *) &xcb_out; 9482 xcb_parts[2].iov_len = sizeof(xcb_out); 9483 xcb_parts[3].iov_base = 0; 9484 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 9485 9486 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 9487 return xcb_ret; 9488 } 9489 9490 9491 /***************************************************************************** 9492 ** 9493 ** xcb_atom_t * xcb_xkb_get_names_value_list_type_names 9494 ** 9495 ** @param const xcb_xkb_get_names_value_list_t *S 9496 ** @returns xcb_atom_t * 9497 ** 9498 *****************************************************************************/ 9499 9500 xcb_atom_t * 9501 xcb_xkb_get_names_value_list_type_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9502 { 9503 return /* valueList */ S->typeNames; 9504 } 9505 9506 9507 /***************************************************************************** 9508 ** 9509 ** int xcb_xkb_get_names_value_list_type_names_length 9510 ** 9511 ** @param const xcb_xkb_get_names_value_list_t *R 9512 ** @returns int 9513 ** 9514 *****************************************************************************/ 9515 9516 int 9517 xcb_xkb_get_names_value_list_type_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9518 const xcb_xkb_get_names_value_list_t *S /**< */) 9519 { 9520 return R->nTypes; 9521 } 9522 9523 9524 /***************************************************************************** 9525 ** 9526 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_type_names_end 9527 ** 9528 ** @param const xcb_xkb_get_names_value_list_t *R 9529 ** @returns xcb_generic_iterator_t 9530 ** 9531 *****************************************************************************/ 9532 9533 xcb_generic_iterator_t 9534 xcb_xkb_get_names_value_list_type_names_end (const xcb_xkb_get_names_reply_t *R /**< */, 9535 const xcb_xkb_get_names_value_list_t *S /**< */) 9536 { 9537 xcb_generic_iterator_t i; 9538 i.data = /* valueList */ S->typeNames + R->nTypes; 9539 i.rem = 0; 9540 i.index = (char *) i.data - (char *) S; 9541 return i; 9542 } 9543 9544 9545 /***************************************************************************** 9546 ** 9547 ** uint8_t * xcb_xkb_get_names_value_list_n_levels_per_type 9548 ** 9549 ** @param const xcb_xkb_get_names_value_list_t *S 9550 ** @returns uint8_t * 9551 ** 9552 *****************************************************************************/ 9553 9554 uint8_t * 9555 xcb_xkb_get_names_value_list_n_levels_per_type (const xcb_xkb_get_names_value_list_t *S /**< */) 9556 { 9557 return /* valueList */ S->nLevelsPerType; 9558 } 9559 9560 9561 /***************************************************************************** 9562 ** 9563 ** int xcb_xkb_get_names_value_list_n_levels_per_type_length 9564 ** 9565 ** @param const xcb_xkb_get_names_value_list_t *R 9566 ** @returns int 9567 ** 9568 *****************************************************************************/ 9569 9570 int 9571 xcb_xkb_get_names_value_list_n_levels_per_type_length (const xcb_xkb_get_names_reply_t *R /**< */, 9572 const xcb_xkb_get_names_value_list_t *S /**< */) 9573 { 9574 return R->nTypes; 9575 } 9576 9577 9578 /***************************************************************************** 9579 ** 9580 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_n_levels_per_type_end 9581 ** 9582 ** @param const xcb_xkb_get_names_value_list_t *R 9583 ** @returns xcb_generic_iterator_t 9584 ** 9585 *****************************************************************************/ 9586 9587 xcb_generic_iterator_t 9588 xcb_xkb_get_names_value_list_n_levels_per_type_end (const xcb_xkb_get_names_reply_t *R /**< */, 9589 const xcb_xkb_get_names_value_list_t *S /**< */) 9590 { 9591 xcb_generic_iterator_t i; 9592 i.data = /* valueList */ S->nLevelsPerType + R->nTypes; 9593 i.rem = 0; 9594 i.index = (char *) i.data - (char *) S; 9595 return i; 9596 } 9597 9598 9599 /***************************************************************************** 9600 ** 9601 ** xcb_atom_t * xcb_xkb_get_names_value_list_kt_level_names 9602 ** 9603 ** @param const xcb_xkb_get_names_value_list_t *S 9604 ** @returns xcb_atom_t * 9605 ** 9606 *****************************************************************************/ 9607 9608 xcb_atom_t * 9609 xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9610 { 9611 return /* valueList */ S->ktLevelNames; 9612 } 9613 9614 9615 /***************************************************************************** 9616 ** 9617 ** int xcb_xkb_get_names_value_list_kt_level_names_length 9618 ** 9619 ** @param const xcb_xkb_get_names_value_list_t *R 9620 ** @returns int 9621 ** 9622 *****************************************************************************/ 9623 9624 int 9625 xcb_xkb_get_names_value_list_kt_level_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9626 const xcb_xkb_get_names_value_list_t *S /**< */) 9627 { 9628 return xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes); 9629 } 9630 9631 9632 /***************************************************************************** 9633 ** 9634 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_kt_level_names_end 9635 ** 9636 ** @param const xcb_xkb_get_names_value_list_t *R 9637 ** @returns xcb_generic_iterator_t 9638 ** 9639 *****************************************************************************/ 9640 9641 xcb_generic_iterator_t 9642 xcb_xkb_get_names_value_list_kt_level_names_end (const xcb_xkb_get_names_reply_t *R /**< */, 9643 const xcb_xkb_get_names_value_list_t *S /**< */) 9644 { 9645 xcb_generic_iterator_t i; 9646 i.data = /* valueList */ S->ktLevelNames + xcb_sumof(/* valueList */ S->nLevelsPerType, R->nTypes); 9647 i.rem = 0; 9648 i.index = (char *) i.data - (char *) S; 9649 return i; 9650 } 9651 9652 9653 /***************************************************************************** 9654 ** 9655 ** xcb_atom_t * xcb_xkb_get_names_value_list_indicator_names 9656 ** 9657 ** @param const xcb_xkb_get_names_value_list_t *S 9658 ** @returns xcb_atom_t * 9659 ** 9660 *****************************************************************************/ 9661 9662 xcb_atom_t * 9663 xcb_xkb_get_names_value_list_indicator_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9664 { 9665 return /* valueList */ S->indicatorNames; 9666 } 9667 9668 9669 /***************************************************************************** 9670 ** 9671 ** int xcb_xkb_get_names_value_list_indicator_names_length 9672 ** 9673 ** @param const xcb_xkb_get_names_value_list_t *R 9674 ** @returns int 9675 ** 9676 *****************************************************************************/ 9677 9678 int 9679 xcb_xkb_get_names_value_list_indicator_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9680 const xcb_xkb_get_names_value_list_t *S /**< */) 9681 { 9682 return xcb_popcount(R->indicators); 9683 } 9684 9685 9686 /***************************************************************************** 9687 ** 9688 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_indicator_names_end 9689 ** 9690 ** @param const xcb_xkb_get_names_value_list_t *R 9691 ** @returns xcb_generic_iterator_t 9692 ** 9693 *****************************************************************************/ 9694 9695 xcb_generic_iterator_t 9696 xcb_xkb_get_names_value_list_indicator_names_end (const xcb_xkb_get_names_reply_t *R /**< */, 9697 const xcb_xkb_get_names_value_list_t *S /**< */) 9698 { 9699 xcb_generic_iterator_t i; 9700 i.data = /* valueList */ S->indicatorNames + xcb_popcount(R->indicators); 9701 i.rem = 0; 9702 i.index = (char *) i.data - (char *) S; 9703 return i; 9704 } 9705 9706 9707 /***************************************************************************** 9708 ** 9709 ** xcb_atom_t * xcb_xkb_get_names_value_list_virtual_mod_names 9710 ** 9711 ** @param const xcb_xkb_get_names_value_list_t *S 9712 ** @returns xcb_atom_t * 9713 ** 9714 *****************************************************************************/ 9715 9716 xcb_atom_t * 9717 xcb_xkb_get_names_value_list_virtual_mod_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9718 { 9719 return /* valueList */ S->virtualModNames; 9720 } 9721 9722 9723 /***************************************************************************** 9724 ** 9725 ** int xcb_xkb_get_names_value_list_virtual_mod_names_length 9726 ** 9727 ** @param const xcb_xkb_get_names_value_list_t *R 9728 ** @returns int 9729 ** 9730 *****************************************************************************/ 9731 9732 int 9733 xcb_xkb_get_names_value_list_virtual_mod_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9734 const xcb_xkb_get_names_value_list_t *S /**< */) 9735 { 9736 return xcb_popcount(R->virtualMods); 9737 } 9738 9739 9740 /***************************************************************************** 9741 ** 9742 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_virtual_mod_names_end 9743 ** 9744 ** @param const xcb_xkb_get_names_value_list_t *R 9745 ** @returns xcb_generic_iterator_t 9746 ** 9747 *****************************************************************************/ 9748 9749 xcb_generic_iterator_t 9750 xcb_xkb_get_names_value_list_virtual_mod_names_end (const xcb_xkb_get_names_reply_t *R /**< */, 9751 const xcb_xkb_get_names_value_list_t *S /**< */) 9752 { 9753 xcb_generic_iterator_t i; 9754 i.data = /* valueList */ S->virtualModNames + xcb_popcount(R->virtualMods); 9755 i.rem = 0; 9756 i.index = (char *) i.data - (char *) S; 9757 return i; 9758 } 9759 9760 9761 /***************************************************************************** 9762 ** 9763 ** xcb_atom_t * xcb_xkb_get_names_value_list_groups 9764 ** 9765 ** @param const xcb_xkb_get_names_value_list_t *S 9766 ** @returns xcb_atom_t * 9767 ** 9768 *****************************************************************************/ 9769 9770 xcb_atom_t * 9771 xcb_xkb_get_names_value_list_groups (const xcb_xkb_get_names_value_list_t *S /**< */) 9772 { 9773 return /* valueList */ S->groups; 9774 } 9775 9776 9777 /***************************************************************************** 9778 ** 9779 ** int xcb_xkb_get_names_value_list_groups_length 9780 ** 9781 ** @param const xcb_xkb_get_names_value_list_t *R 9782 ** @returns int 9783 ** 9784 *****************************************************************************/ 9785 9786 int 9787 xcb_xkb_get_names_value_list_groups_length (const xcb_xkb_get_names_reply_t *R /**< */, 9788 const xcb_xkb_get_names_value_list_t *S /**< */) 9789 { 9790 return xcb_popcount(R->groupNames); 9791 } 9792 9793 9794 /***************************************************************************** 9795 ** 9796 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_groups_end 9797 ** 9798 ** @param const xcb_xkb_get_names_value_list_t *R 9799 ** @returns xcb_generic_iterator_t 9800 ** 9801 *****************************************************************************/ 9802 9803 xcb_generic_iterator_t 9804 xcb_xkb_get_names_value_list_groups_end (const xcb_xkb_get_names_reply_t *R /**< */, 9805 const xcb_xkb_get_names_value_list_t *S /**< */) 9806 { 9807 xcb_generic_iterator_t i; 9808 i.data = /* valueList */ S->groups + xcb_popcount(R->groupNames); 9809 i.rem = 0; 9810 i.index = (char *) i.data - (char *) S; 9811 return i; 9812 } 9813 9814 9815 /***************************************************************************** 9816 ** 9817 ** xcb_xkb_key_name_t * xcb_xkb_get_names_value_list_key_names 9818 ** 9819 ** @param const xcb_xkb_get_names_value_list_t *S 9820 ** @returns xcb_xkb_key_name_t * 9821 ** 9822 *****************************************************************************/ 9823 9824 xcb_xkb_key_name_t * 9825 xcb_xkb_get_names_value_list_key_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9826 { 9827 return /* valueList */ S->keyNames; 9828 } 9829 9830 9831 /***************************************************************************** 9832 ** 9833 ** int xcb_xkb_get_names_value_list_key_names_length 9834 ** 9835 ** @param const xcb_xkb_get_names_value_list_t *R 9836 ** @returns int 9837 ** 9838 *****************************************************************************/ 9839 9840 int 9841 xcb_xkb_get_names_value_list_key_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9842 const xcb_xkb_get_names_value_list_t *S /**< */) 9843 { 9844 return R->nKeys; 9845 } 9846 9847 9848 /***************************************************************************** 9849 ** 9850 ** xcb_xkb_key_name_iterator_t xcb_xkb_get_names_value_list_key_names_iterator 9851 ** 9852 ** @param const xcb_xkb_get_names_value_list_t *R 9853 ** @returns xcb_xkb_key_name_iterator_t 9854 ** 9855 *****************************************************************************/ 9856 9857 xcb_xkb_key_name_iterator_t 9858 xcb_xkb_get_names_value_list_key_names_iterator (const xcb_xkb_get_names_reply_t *R /**< */, 9859 const xcb_xkb_get_names_value_list_t *S /**< */) 9860 { 9861 xcb_xkb_key_name_iterator_t i; 9862 i.data = /* valueList */ S->keyNames; 9863 i.rem = R->nKeys; 9864 i.index = (char *) i.data - (char *) S; 9865 return i; 9866 } 9867 9868 9869 /***************************************************************************** 9870 ** 9871 ** xcb_xkb_key_alias_t * xcb_xkb_get_names_value_list_key_aliases 9872 ** 9873 ** @param const xcb_xkb_get_names_value_list_t *S 9874 ** @returns xcb_xkb_key_alias_t * 9875 ** 9876 *****************************************************************************/ 9877 9878 xcb_xkb_key_alias_t * 9879 xcb_xkb_get_names_value_list_key_aliases (const xcb_xkb_get_names_value_list_t *S /**< */) 9880 { 9881 return /* valueList */ S->keyAliases; 9882 } 9883 9884 9885 /***************************************************************************** 9886 ** 9887 ** int xcb_xkb_get_names_value_list_key_aliases_length 9888 ** 9889 ** @param const xcb_xkb_get_names_value_list_t *R 9890 ** @returns int 9891 ** 9892 *****************************************************************************/ 9893 9894 int 9895 xcb_xkb_get_names_value_list_key_aliases_length (const xcb_xkb_get_names_reply_t *R /**< */, 9896 const xcb_xkb_get_names_value_list_t *S /**< */) 9897 { 9898 return R->nKeyAliases; 9899 } 9900 9901 9902 /***************************************************************************** 9903 ** 9904 ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_names_value_list_key_aliases_iterator 9905 ** 9906 ** @param const xcb_xkb_get_names_value_list_t *R 9907 ** @returns xcb_xkb_key_alias_iterator_t 9908 ** 9909 *****************************************************************************/ 9910 9911 xcb_xkb_key_alias_iterator_t 9912 xcb_xkb_get_names_value_list_key_aliases_iterator (const xcb_xkb_get_names_reply_t *R /**< */, 9913 const xcb_xkb_get_names_value_list_t *S /**< */) 9914 { 9915 xcb_xkb_key_alias_iterator_t i; 9916 i.data = /* valueList */ S->keyAliases; 9917 i.rem = R->nKeyAliases; 9918 i.index = (char *) i.data - (char *) S; 9919 return i; 9920 } 9921 9922 9923 /***************************************************************************** 9924 ** 9925 ** xcb_atom_t * xcb_xkb_get_names_value_list_radio_group_names 9926 ** 9927 ** @param const xcb_xkb_get_names_value_list_t *S 9928 ** @returns xcb_atom_t * 9929 ** 9930 *****************************************************************************/ 9931 9932 xcb_atom_t * 9933 xcb_xkb_get_names_value_list_radio_group_names (const xcb_xkb_get_names_value_list_t *S /**< */) 9934 { 9935 return /* valueList */ S->radioGroupNames; 9936 } 9937 9938 9939 /***************************************************************************** 9940 ** 9941 ** int xcb_xkb_get_names_value_list_radio_group_names_length 9942 ** 9943 ** @param const xcb_xkb_get_names_value_list_t *R 9944 ** @returns int 9945 ** 9946 *****************************************************************************/ 9947 9948 int 9949 xcb_xkb_get_names_value_list_radio_group_names_length (const xcb_xkb_get_names_reply_t *R /**< */, 9950 const xcb_xkb_get_names_value_list_t *S /**< */) 9951 { 9952 return R->nRadioGroups; 9953 } 9954 9955 9956 /***************************************************************************** 9957 ** 9958 ** xcb_generic_iterator_t xcb_xkb_get_names_value_list_radio_group_names_end 9959 ** 9960 ** @param const xcb_xkb_get_names_value_list_t *R 9961 ** @returns xcb_generic_iterator_t 9962 ** 9963 *****************************************************************************/ 9964 9965 xcb_generic_iterator_t 9966 xcb_xkb_get_names_value_list_radio_group_names_end (const xcb_xkb_get_names_reply_t *R /**< */, 9967 const xcb_xkb_get_names_value_list_t *S /**< */) 9968 { 9969 xcb_generic_iterator_t i; 9970 i.data = /* valueList */ S->radioGroupNames + R->nRadioGroups; 9971 i.rem = 0; 9972 i.index = (char *) i.data - (char *) S; 9973 return i; 9974 } 9975 9976 int 9977 xcb_xkb_get_names_value_list_serialize (void **_buffer /**< */, 9978 uint8_t nTypes /**< */, 9979 uint32_t indicators /**< */, 9980 uint16_t virtualMods /**< */, 9981 uint8_t groupNames /**< */, 9982 uint8_t nKeys /**< */, 9983 uint8_t nKeyAliases /**< */, 9984 uint8_t nRadioGroups /**< */, 9985 uint32_t which /**< */, 9986 const xcb_xkb_get_names_value_list_t *_aux /**< */) 9987 { 9988 char *xcb_out = *_buffer; 9989 unsigned int xcb_buffer_len = 0; 9990 unsigned int xcb_align_to; 9991 9992 unsigned int xcb_pad = 0; 9993 char xcb_pad0[3] = {0, 0, 0}; 9994 struct iovec xcb_parts[25]; 9995 unsigned int xcb_parts_idx = 0; 9996 unsigned int xcb_block_len = 0; 9997 unsigned int i; 9998 char *xcb_tmp; 9999 10000 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 10001 /* xcb_xkb_get_names_value_list_t.keycodesName */ 10002 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName; 10003 xcb_block_len += sizeof(xcb_atom_t); 10004 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10005 xcb_parts_idx++; 10006 xcb_align_to = ALIGNOF(xcb_atom_t); 10007 } 10008 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 10009 /* xcb_xkb_get_names_value_list_t.geometryName */ 10010 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName; 10011 xcb_block_len += sizeof(xcb_atom_t); 10012 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10013 xcb_parts_idx++; 10014 xcb_align_to = ALIGNOF(xcb_atom_t); 10015 } 10016 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 10017 /* xcb_xkb_get_names_value_list_t.symbolsName */ 10018 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName; 10019 xcb_block_len += sizeof(xcb_atom_t); 10020 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10021 xcb_parts_idx++; 10022 xcb_align_to = ALIGNOF(xcb_atom_t); 10023 } 10024 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 10025 /* xcb_xkb_get_names_value_list_t.physSymbolsName */ 10026 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName; 10027 xcb_block_len += sizeof(xcb_atom_t); 10028 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10029 xcb_parts_idx++; 10030 xcb_align_to = ALIGNOF(xcb_atom_t); 10031 } 10032 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 10033 /* xcb_xkb_get_names_value_list_t.typesName */ 10034 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName; 10035 xcb_block_len += sizeof(xcb_atom_t); 10036 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10037 xcb_parts_idx++; 10038 xcb_align_to = ALIGNOF(xcb_atom_t); 10039 } 10040 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 10041 /* xcb_xkb_get_names_value_list_t.compatName */ 10042 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName; 10043 xcb_block_len += sizeof(xcb_atom_t); 10044 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 10045 xcb_parts_idx++; 10046 xcb_align_to = ALIGNOF(xcb_atom_t); 10047 } 10048 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 10049 /* insert padding */ 10050 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10051 xcb_buffer_len += xcb_block_len + xcb_pad; 10052 if (0 != xcb_pad) { 10053 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10054 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10055 xcb_parts_idx++; 10056 xcb_pad = 0; 10057 } 10058 xcb_block_len = 0; 10059 /* typeNames */ 10060 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames; 10061 xcb_block_len += nTypes * sizeof(xcb_atom_t); 10062 xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t); 10063 xcb_parts_idx++; 10064 xcb_align_to = ALIGNOF(xcb_atom_t); 10065 } 10066 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 10067 /* insert padding */ 10068 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10069 xcb_buffer_len += xcb_block_len + xcb_pad; 10070 if (0 != xcb_pad) { 10071 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10072 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10073 xcb_parts_idx++; 10074 xcb_pad = 0; 10075 } 10076 xcb_block_len = 0; 10077 /* nLevelsPerType */ 10078 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType; 10079 xcb_block_len += nTypes * sizeof(uint8_t); 10080 xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(uint8_t); 10081 xcb_parts_idx++; 10082 xcb_align_to = ALIGNOF(uint8_t); 10083 /* insert padding */ 10084 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10085 xcb_buffer_len += xcb_block_len + xcb_pad; 10086 if (0 != xcb_pad) { 10087 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10088 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10089 xcb_parts_idx++; 10090 xcb_pad = 0; 10091 } 10092 xcb_block_len = 0; 10093 /* ktLevelNames */ 10094 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames; 10095 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t); 10096 xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t); 10097 xcb_parts_idx++; 10098 xcb_align_to = ALIGNOF(xcb_atom_t); 10099 } 10100 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 10101 /* insert padding */ 10102 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10103 xcb_buffer_len += xcb_block_len + xcb_pad; 10104 if (0 != xcb_pad) { 10105 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10106 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10107 xcb_parts_idx++; 10108 xcb_pad = 0; 10109 } 10110 xcb_block_len = 0; 10111 /* indicatorNames */ 10112 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames; 10113 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 10114 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t); 10115 xcb_parts_idx++; 10116 xcb_align_to = ALIGNOF(xcb_atom_t); 10117 } 10118 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 10119 /* insert padding */ 10120 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10121 xcb_buffer_len += xcb_block_len + xcb_pad; 10122 if (0 != xcb_pad) { 10123 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10124 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10125 xcb_parts_idx++; 10126 xcb_pad = 0; 10127 } 10128 xcb_block_len = 0; 10129 /* virtualModNames */ 10130 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames; 10131 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 10132 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 10133 xcb_parts_idx++; 10134 xcb_align_to = ALIGNOF(xcb_atom_t); 10135 } 10136 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 10137 /* insert padding */ 10138 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10139 xcb_buffer_len += xcb_block_len + xcb_pad; 10140 if (0 != xcb_pad) { 10141 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10142 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10143 xcb_parts_idx++; 10144 xcb_pad = 0; 10145 } 10146 xcb_block_len = 0; 10147 /* groups */ 10148 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups; 10149 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 10150 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t); 10151 xcb_parts_idx++; 10152 xcb_align_to = ALIGNOF(xcb_atom_t); 10153 } 10154 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 10155 /* insert padding */ 10156 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10157 xcb_buffer_len += xcb_block_len + xcb_pad; 10158 if (0 != xcb_pad) { 10159 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10160 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10161 xcb_parts_idx++; 10162 xcb_pad = 0; 10163 } 10164 xcb_block_len = 0; 10165 /* keyNames */ 10166 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames; 10167 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 10168 xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t); 10169 xcb_parts_idx++; 10170 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 10171 } 10172 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 10173 /* insert padding */ 10174 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10175 xcb_buffer_len += xcb_block_len + xcb_pad; 10176 if (0 != xcb_pad) { 10177 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10178 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10179 xcb_parts_idx++; 10180 xcb_pad = 0; 10181 } 10182 xcb_block_len = 0; 10183 /* keyAliases */ 10184 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases; 10185 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 10186 xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 10187 xcb_parts_idx++; 10188 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 10189 } 10190 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 10191 /* insert padding */ 10192 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10193 xcb_buffer_len += xcb_block_len + xcb_pad; 10194 if (0 != xcb_pad) { 10195 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10196 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10197 xcb_parts_idx++; 10198 xcb_pad = 0; 10199 } 10200 xcb_block_len = 0; 10201 /* radioGroupNames */ 10202 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames; 10203 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 10204 xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t); 10205 xcb_parts_idx++; 10206 xcb_align_to = ALIGNOF(xcb_atom_t); 10207 } 10208 /* insert padding */ 10209 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10210 xcb_buffer_len += xcb_block_len + xcb_pad; 10211 if (0 != xcb_pad) { 10212 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 10213 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 10214 xcb_parts_idx++; 10215 xcb_pad = 0; 10216 } 10217 xcb_block_len = 0; 10218 10219 if (NULL == xcb_out) { 10220 /* allocate memory */ 10221 xcb_out = malloc(xcb_buffer_len); 10222 *_buffer = xcb_out; 10223 } 10224 10225 xcb_tmp = xcb_out; 10226 for(i=0; i<xcb_parts_idx; i++) { 10227 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 10228 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 10229 if (0 != xcb_parts[i].iov_len) 10230 xcb_tmp += xcb_parts[i].iov_len; 10231 } 10232 10233 return xcb_buffer_len; 10234 } 10235 10236 int 10237 xcb_xkb_get_names_value_list_unpack (const void *_buffer /**< */, 10238 uint8_t nTypes /**< */, 10239 uint32_t indicators /**< */, 10240 uint16_t virtualMods /**< */, 10241 uint8_t groupNames /**< */, 10242 uint8_t nKeys /**< */, 10243 uint8_t nKeyAliases /**< */, 10244 uint8_t nRadioGroups /**< */, 10245 uint32_t which /**< */, 10246 xcb_xkb_get_names_value_list_t *_aux /**< */) 10247 { 10248 char *xcb_tmp = (char *)_buffer; 10249 unsigned int xcb_buffer_len = 0; 10250 unsigned int xcb_block_len = 0; 10251 unsigned int xcb_pad = 0; 10252 unsigned int xcb_align_to; 10253 10254 10255 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 10256 /* xcb_xkb_get_names_value_list_t.keycodesName */ 10257 _aux->keycodesName = *(xcb_atom_t *)xcb_tmp; 10258 xcb_block_len += sizeof(xcb_atom_t); 10259 xcb_tmp += sizeof(xcb_atom_t); 10260 xcb_align_to = ALIGNOF(xcb_atom_t); 10261 } 10262 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 10263 /* xcb_xkb_get_names_value_list_t.geometryName */ 10264 _aux->geometryName = *(xcb_atom_t *)xcb_tmp; 10265 xcb_block_len += sizeof(xcb_atom_t); 10266 xcb_tmp += sizeof(xcb_atom_t); 10267 xcb_align_to = ALIGNOF(xcb_atom_t); 10268 } 10269 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 10270 /* xcb_xkb_get_names_value_list_t.symbolsName */ 10271 _aux->symbolsName = *(xcb_atom_t *)xcb_tmp; 10272 xcb_block_len += sizeof(xcb_atom_t); 10273 xcb_tmp += sizeof(xcb_atom_t); 10274 xcb_align_to = ALIGNOF(xcb_atom_t); 10275 } 10276 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 10277 /* xcb_xkb_get_names_value_list_t.physSymbolsName */ 10278 _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp; 10279 xcb_block_len += sizeof(xcb_atom_t); 10280 xcb_tmp += sizeof(xcb_atom_t); 10281 xcb_align_to = ALIGNOF(xcb_atom_t); 10282 } 10283 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 10284 /* xcb_xkb_get_names_value_list_t.typesName */ 10285 _aux->typesName = *(xcb_atom_t *)xcb_tmp; 10286 xcb_block_len += sizeof(xcb_atom_t); 10287 xcb_tmp += sizeof(xcb_atom_t); 10288 xcb_align_to = ALIGNOF(xcb_atom_t); 10289 } 10290 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 10291 /* xcb_xkb_get_names_value_list_t.compatName */ 10292 _aux->compatName = *(xcb_atom_t *)xcb_tmp; 10293 xcb_block_len += sizeof(xcb_atom_t); 10294 xcb_tmp += sizeof(xcb_atom_t); 10295 xcb_align_to = ALIGNOF(xcb_atom_t); 10296 } 10297 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 10298 /* insert padding */ 10299 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10300 xcb_buffer_len += xcb_block_len + xcb_pad; 10301 if (0 != xcb_pad) { 10302 xcb_tmp += xcb_pad; 10303 xcb_pad = 0; 10304 } 10305 xcb_block_len = 0; 10306 /* typeNames */ 10307 _aux->typeNames = (xcb_atom_t *)xcb_tmp; 10308 xcb_block_len += nTypes * sizeof(xcb_atom_t); 10309 xcb_tmp += xcb_block_len; 10310 xcb_align_to = ALIGNOF(xcb_atom_t); 10311 } 10312 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 10313 /* insert padding */ 10314 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10315 xcb_buffer_len += xcb_block_len + xcb_pad; 10316 if (0 != xcb_pad) { 10317 xcb_tmp += xcb_pad; 10318 xcb_pad = 0; 10319 } 10320 xcb_block_len = 0; 10321 /* nLevelsPerType */ 10322 _aux->nLevelsPerType = (uint8_t *)xcb_tmp; 10323 xcb_block_len += nTypes * sizeof(uint8_t); 10324 xcb_tmp += xcb_block_len; 10325 xcb_align_to = ALIGNOF(uint8_t); 10326 /* insert padding */ 10327 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10328 xcb_buffer_len += xcb_block_len + xcb_pad; 10329 if (0 != xcb_pad) { 10330 xcb_tmp += xcb_pad; 10331 xcb_pad = 0; 10332 } 10333 xcb_block_len = 0; 10334 /* ktLevelNames */ 10335 _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp; 10336 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nTypes) * sizeof(xcb_atom_t); 10337 xcb_tmp += xcb_block_len; 10338 xcb_align_to = ALIGNOF(xcb_atom_t); 10339 } 10340 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 10341 /* insert padding */ 10342 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10343 xcb_buffer_len += xcb_block_len + xcb_pad; 10344 if (0 != xcb_pad) { 10345 xcb_tmp += xcb_pad; 10346 xcb_pad = 0; 10347 } 10348 xcb_block_len = 0; 10349 /* indicatorNames */ 10350 _aux->indicatorNames = (xcb_atom_t *)xcb_tmp; 10351 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 10352 xcb_tmp += xcb_block_len; 10353 xcb_align_to = ALIGNOF(xcb_atom_t); 10354 } 10355 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 10356 /* insert padding */ 10357 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10358 xcb_buffer_len += xcb_block_len + xcb_pad; 10359 if (0 != xcb_pad) { 10360 xcb_tmp += xcb_pad; 10361 xcb_pad = 0; 10362 } 10363 xcb_block_len = 0; 10364 /* virtualModNames */ 10365 _aux->virtualModNames = (xcb_atom_t *)xcb_tmp; 10366 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 10367 xcb_tmp += xcb_block_len; 10368 xcb_align_to = ALIGNOF(xcb_atom_t); 10369 } 10370 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 10371 /* insert padding */ 10372 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10373 xcb_buffer_len += xcb_block_len + xcb_pad; 10374 if (0 != xcb_pad) { 10375 xcb_tmp += xcb_pad; 10376 xcb_pad = 0; 10377 } 10378 xcb_block_len = 0; 10379 /* groups */ 10380 _aux->groups = (xcb_atom_t *)xcb_tmp; 10381 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 10382 xcb_tmp += xcb_block_len; 10383 xcb_align_to = ALIGNOF(xcb_atom_t); 10384 } 10385 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 10386 /* insert padding */ 10387 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10388 xcb_buffer_len += xcb_block_len + xcb_pad; 10389 if (0 != xcb_pad) { 10390 xcb_tmp += xcb_pad; 10391 xcb_pad = 0; 10392 } 10393 xcb_block_len = 0; 10394 /* keyNames */ 10395 _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp; 10396 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 10397 xcb_tmp += xcb_block_len; 10398 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 10399 } 10400 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 10401 /* insert padding */ 10402 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10403 xcb_buffer_len += xcb_block_len + xcb_pad; 10404 if (0 != xcb_pad) { 10405 xcb_tmp += xcb_pad; 10406 xcb_pad = 0; 10407 } 10408 xcb_block_len = 0; 10409 /* keyAliases */ 10410 _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp; 10411 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 10412 xcb_tmp += xcb_block_len; 10413 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 10414 } 10415 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 10416 /* insert padding */ 10417 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10418 xcb_buffer_len += xcb_block_len + xcb_pad; 10419 if (0 != xcb_pad) { 10420 xcb_tmp += xcb_pad; 10421 xcb_pad = 0; 10422 } 10423 xcb_block_len = 0; 10424 /* radioGroupNames */ 10425 _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp; 10426 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 10427 xcb_tmp += xcb_block_len; 10428 xcb_align_to = ALIGNOF(xcb_atom_t); 10429 } 10430 /* insert padding */ 10431 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 10432 xcb_buffer_len += xcb_block_len + xcb_pad; 10433 if (0 != xcb_pad) { 10434 xcb_tmp += xcb_pad; 10435 xcb_pad = 0; 10436 } 10437 xcb_block_len = 0; 10438 10439 return xcb_buffer_len; 10440 } 10441 10442 int 10443 xcb_xkb_get_names_value_list_sizeof (const void *_buffer /**< */, 10444 uint8_t nTypes /**< */, 10445 uint32_t indicators /**< */, 10446 uint16_t virtualMods /**< */, 10447 uint8_t groupNames /**< */, 10448 uint8_t nKeys /**< */, 10449 uint8_t nKeyAliases /**< */, 10450 uint8_t nRadioGroups /**< */, 10451 uint32_t which /**< */) 10452 { 10453 xcb_xkb_get_names_value_list_t _aux; 10454 return xcb_xkb_get_names_value_list_unpack(_buffer, nTypes, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux); 10455 } 10456 10457 10458 /***************************************************************************** 10459 ** 10460 ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names 10461 ** 10462 ** @param xcb_connection_t *c 10463 ** @param xcb_xkb_device_spec_t deviceSpec 10464 ** @param uint32_t which 10465 ** @returns xcb_xkb_get_names_cookie_t 10466 ** 10467 *****************************************************************************/ 10468 10469 xcb_xkb_get_names_cookie_t 10470 xcb_xkb_get_names (xcb_connection_t *c /**< */, 10471 xcb_xkb_device_spec_t deviceSpec /**< */, 10472 uint32_t which /**< */) 10473 { 10474 static const xcb_protocol_request_t xcb_req = { 10475 /* count */ 2, 10476 /* ext */ &xcb_xkb_id, 10477 /* opcode */ XCB_XKB_GET_NAMES, 10478 /* isvoid */ 0 10479 }; 10480 10481 struct iovec xcb_parts[4]; 10482 xcb_xkb_get_names_cookie_t xcb_ret; 10483 xcb_xkb_get_names_request_t xcb_out; 10484 10485 xcb_out.deviceSpec = deviceSpec; 10486 memset(xcb_out.pad0, 0, 2); 10487 xcb_out.which = which; 10488 10489 xcb_parts[2].iov_base = (char *) &xcb_out; 10490 xcb_parts[2].iov_len = sizeof(xcb_out); 10491 xcb_parts[3].iov_base = 0; 10492 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 10493 10494 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 10495 return xcb_ret; 10496 } 10497 10498 10499 /***************************************************************************** 10500 ** 10501 ** xcb_xkb_get_names_cookie_t xcb_xkb_get_names_unchecked 10502 ** 10503 ** @param xcb_connection_t *c 10504 ** @param xcb_xkb_device_spec_t deviceSpec 10505 ** @param uint32_t which 10506 ** @returns xcb_xkb_get_names_cookie_t 10507 ** 10508 *****************************************************************************/ 10509 10510 xcb_xkb_get_names_cookie_t 10511 xcb_xkb_get_names_unchecked (xcb_connection_t *c /**< */, 10512 xcb_xkb_device_spec_t deviceSpec /**< */, 10513 uint32_t which /**< */) 10514 { 10515 static const xcb_protocol_request_t xcb_req = { 10516 /* count */ 2, 10517 /* ext */ &xcb_xkb_id, 10518 /* opcode */ XCB_XKB_GET_NAMES, 10519 /* isvoid */ 0 10520 }; 10521 10522 struct iovec xcb_parts[4]; 10523 xcb_xkb_get_names_cookie_t xcb_ret; 10524 xcb_xkb_get_names_request_t xcb_out; 10525 10526 xcb_out.deviceSpec = deviceSpec; 10527 memset(xcb_out.pad0, 0, 2); 10528 xcb_out.which = which; 10529 10530 xcb_parts[2].iov_base = (char *) &xcb_out; 10531 xcb_parts[2].iov_len = sizeof(xcb_out); 10532 xcb_parts[3].iov_base = 0; 10533 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 10534 10535 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 10536 return xcb_ret; 10537 } 10538 10539 10540 /***************************************************************************** 10541 ** 10542 ** xcb_xkb_get_names_value_list_t * xcb_xkb_get_names_value_list 10543 ** 10544 ** @param const xcb_xkb_get_names_reply_t *R 10545 ** @returns xcb_xkb_get_names_value_list_t * 10546 ** 10547 *****************************************************************************/ 10548 10549 void * 10550 xcb_xkb_get_names_value_list (const xcb_xkb_get_names_reply_t *R /**< */) 10551 { 10552 return (void *) (R + 1); 10553 } 10554 10555 10556 /***************************************************************************** 10557 ** 10558 ** xcb_xkb_get_names_reply_t * xcb_xkb_get_names_reply 10559 ** 10560 ** @param xcb_connection_t *c 10561 ** @param xcb_xkb_get_names_cookie_t cookie 10562 ** @param xcb_generic_error_t **e 10563 ** @returns xcb_xkb_get_names_reply_t * 10564 ** 10565 *****************************************************************************/ 10566 10567 xcb_xkb_get_names_reply_t * 10568 xcb_xkb_get_names_reply (xcb_connection_t *c /**< */, 10569 xcb_xkb_get_names_cookie_t cookie /**< */, 10570 xcb_generic_error_t **e /**< */) 10571 { 10572 return (xcb_xkb_get_names_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 10573 } 10574 10575 10576 /***************************************************************************** 10577 ** 10578 ** xcb_atom_t * xcb_xkb_set_names_values_type_names 10579 ** 10580 ** @param const xcb_xkb_set_names_values_t *S 10581 ** @returns xcb_atom_t * 10582 ** 10583 *****************************************************************************/ 10584 10585 xcb_atom_t * 10586 xcb_xkb_set_names_values_type_names (const xcb_xkb_set_names_values_t *S /**< */) 10587 { 10588 return /* values */ S->typeNames; 10589 } 10590 10591 10592 /***************************************************************************** 10593 ** 10594 ** int xcb_xkb_set_names_values_type_names_length 10595 ** 10596 ** @param const xcb_xkb_set_names_values_t *R 10597 ** @returns int 10598 ** 10599 *****************************************************************************/ 10600 10601 int 10602 xcb_xkb_set_names_values_type_names_length (const xcb_xkb_set_names_request_t *R /**< */, 10603 const xcb_xkb_set_names_values_t *S /**< */) 10604 { 10605 return R->nTypes; 10606 } 10607 10608 10609 /***************************************************************************** 10610 ** 10611 ** xcb_generic_iterator_t xcb_xkb_set_names_values_type_names_end 10612 ** 10613 ** @param const xcb_xkb_set_names_values_t *R 10614 ** @returns xcb_generic_iterator_t 10615 ** 10616 *****************************************************************************/ 10617 10618 xcb_generic_iterator_t 10619 xcb_xkb_set_names_values_type_names_end (const xcb_xkb_set_names_request_t *R /**< */, 10620 const xcb_xkb_set_names_values_t *S /**< */) 10621 { 10622 xcb_generic_iterator_t i; 10623 i.data = /* values */ S->typeNames + R->nTypes; 10624 i.rem = 0; 10625 i.index = (char *) i.data - (char *) S; 10626 return i; 10627 } 10628 10629 10630 /***************************************************************************** 10631 ** 10632 ** uint8_t * xcb_xkb_set_names_values_n_levels_per_type 10633 ** 10634 ** @param const xcb_xkb_set_names_values_t *S 10635 ** @returns uint8_t * 10636 ** 10637 *****************************************************************************/ 10638 10639 uint8_t * 10640 xcb_xkb_set_names_values_n_levels_per_type (const xcb_xkb_set_names_values_t *S /**< */) 10641 { 10642 return /* values */ S->nLevelsPerType; 10643 } 10644 10645 10646 /***************************************************************************** 10647 ** 10648 ** int xcb_xkb_set_names_values_n_levels_per_type_length 10649 ** 10650 ** @param const xcb_xkb_set_names_values_t *R 10651 ** @returns int 10652 ** 10653 *****************************************************************************/ 10654 10655 int 10656 xcb_xkb_set_names_values_n_levels_per_type_length (const xcb_xkb_set_names_request_t *R /**< */, 10657 const xcb_xkb_set_names_values_t *S /**< */) 10658 { 10659 return R->nKTLevels; 10660 } 10661 10662 10663 /***************************************************************************** 10664 ** 10665 ** xcb_generic_iterator_t xcb_xkb_set_names_values_n_levels_per_type_end 10666 ** 10667 ** @param const xcb_xkb_set_names_values_t *R 10668 ** @returns xcb_generic_iterator_t 10669 ** 10670 *****************************************************************************/ 10671 10672 xcb_generic_iterator_t 10673 xcb_xkb_set_names_values_n_levels_per_type_end (const xcb_xkb_set_names_request_t *R /**< */, 10674 const xcb_xkb_set_names_values_t *S /**< */) 10675 { 10676 xcb_generic_iterator_t i; 10677 i.data = /* values */ S->nLevelsPerType + R->nKTLevels; 10678 i.rem = 0; 10679 i.index = (char *) i.data - (char *) S; 10680 return i; 10681 } 10682 10683 10684 /***************************************************************************** 10685 ** 10686 ** xcb_atom_t * xcb_xkb_set_names_values_kt_level_names 10687 ** 10688 ** @param const xcb_xkb_set_names_values_t *S 10689 ** @returns xcb_atom_t * 10690 ** 10691 *****************************************************************************/ 10692 10693 xcb_atom_t * 10694 xcb_xkb_set_names_values_kt_level_names (const xcb_xkb_set_names_values_t *S /**< */) 10695 { 10696 return /* values */ S->ktLevelNames; 10697 } 10698 10699 10700 /***************************************************************************** 10701 ** 10702 ** int xcb_xkb_set_names_values_kt_level_names_length 10703 ** 10704 ** @param const xcb_xkb_set_names_values_t *R 10705 ** @returns int 10706 ** 10707 *****************************************************************************/ 10708 10709 int 10710 xcb_xkb_set_names_values_kt_level_names_length (const xcb_xkb_set_names_request_t *R /**< */, 10711 const xcb_xkb_set_names_values_t *S /**< */) 10712 { 10713 return xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels); 10714 } 10715 10716 10717 /***************************************************************************** 10718 ** 10719 ** xcb_generic_iterator_t xcb_xkb_set_names_values_kt_level_names_end 10720 ** 10721 ** @param const xcb_xkb_set_names_values_t *R 10722 ** @returns xcb_generic_iterator_t 10723 ** 10724 *****************************************************************************/ 10725 10726 xcb_generic_iterator_t 10727 xcb_xkb_set_names_values_kt_level_names_end (const xcb_xkb_set_names_request_t *R /**< */, 10728 const xcb_xkb_set_names_values_t *S /**< */) 10729 { 10730 xcb_generic_iterator_t i; 10731 i.data = /* values */ S->ktLevelNames + xcb_sumof(/* values */ S->nLevelsPerType, R->nKTLevels); 10732 i.rem = 0; 10733 i.index = (char *) i.data - (char *) S; 10734 return i; 10735 } 10736 10737 10738 /***************************************************************************** 10739 ** 10740 ** xcb_atom_t * xcb_xkb_set_names_values_indicator_names 10741 ** 10742 ** @param const xcb_xkb_set_names_values_t *S 10743 ** @returns xcb_atom_t * 10744 ** 10745 *****************************************************************************/ 10746 10747 xcb_atom_t * 10748 xcb_xkb_set_names_values_indicator_names (const xcb_xkb_set_names_values_t *S /**< */) 10749 { 10750 return /* values */ S->indicatorNames; 10751 } 10752 10753 10754 /***************************************************************************** 10755 ** 10756 ** int xcb_xkb_set_names_values_indicator_names_length 10757 ** 10758 ** @param const xcb_xkb_set_names_values_t *R 10759 ** @returns int 10760 ** 10761 *****************************************************************************/ 10762 10763 int 10764 xcb_xkb_set_names_values_indicator_names_length (const xcb_xkb_set_names_request_t *R /**< */, 10765 const xcb_xkb_set_names_values_t *S /**< */) 10766 { 10767 return xcb_popcount(R->indicators); 10768 } 10769 10770 10771 /***************************************************************************** 10772 ** 10773 ** xcb_generic_iterator_t xcb_xkb_set_names_values_indicator_names_end 10774 ** 10775 ** @param const xcb_xkb_set_names_values_t *R 10776 ** @returns xcb_generic_iterator_t 10777 ** 10778 *****************************************************************************/ 10779 10780 xcb_generic_iterator_t 10781 xcb_xkb_set_names_values_indicator_names_end (const xcb_xkb_set_names_request_t *R /**< */, 10782 const xcb_xkb_set_names_values_t *S /**< */) 10783 { 10784 xcb_generic_iterator_t i; 10785 i.data = /* values */ S->indicatorNames + xcb_popcount(R->indicators); 10786 i.rem = 0; 10787 i.index = (char *) i.data - (char *) S; 10788 return i; 10789 } 10790 10791 10792 /***************************************************************************** 10793 ** 10794 ** xcb_atom_t * xcb_xkb_set_names_values_virtual_mod_names 10795 ** 10796 ** @param const xcb_xkb_set_names_values_t *S 10797 ** @returns xcb_atom_t * 10798 ** 10799 *****************************************************************************/ 10800 10801 xcb_atom_t * 10802 xcb_xkb_set_names_values_virtual_mod_names (const xcb_xkb_set_names_values_t *S /**< */) 10803 { 10804 return /* values */ S->virtualModNames; 10805 } 10806 10807 10808 /***************************************************************************** 10809 ** 10810 ** int xcb_xkb_set_names_values_virtual_mod_names_length 10811 ** 10812 ** @param const xcb_xkb_set_names_values_t *R 10813 ** @returns int 10814 ** 10815 *****************************************************************************/ 10816 10817 int 10818 xcb_xkb_set_names_values_virtual_mod_names_length (const xcb_xkb_set_names_request_t *R /**< */, 10819 const xcb_xkb_set_names_values_t *S /**< */) 10820 { 10821 return xcb_popcount(R->virtualMods); 10822 } 10823 10824 10825 /***************************************************************************** 10826 ** 10827 ** xcb_generic_iterator_t xcb_xkb_set_names_values_virtual_mod_names_end 10828 ** 10829 ** @param const xcb_xkb_set_names_values_t *R 10830 ** @returns xcb_generic_iterator_t 10831 ** 10832 *****************************************************************************/ 10833 10834 xcb_generic_iterator_t 10835 xcb_xkb_set_names_values_virtual_mod_names_end (const xcb_xkb_set_names_request_t *R /**< */, 10836 const xcb_xkb_set_names_values_t *S /**< */) 10837 { 10838 xcb_generic_iterator_t i; 10839 i.data = /* values */ S->virtualModNames + xcb_popcount(R->virtualMods); 10840 i.rem = 0; 10841 i.index = (char *) i.data - (char *) S; 10842 return i; 10843 } 10844 10845 10846 /***************************************************************************** 10847 ** 10848 ** xcb_atom_t * xcb_xkb_set_names_values_groups 10849 ** 10850 ** @param const xcb_xkb_set_names_values_t *S 10851 ** @returns xcb_atom_t * 10852 ** 10853 *****************************************************************************/ 10854 10855 xcb_atom_t * 10856 xcb_xkb_set_names_values_groups (const xcb_xkb_set_names_values_t *S /**< */) 10857 { 10858 return /* values */ S->groups; 10859 } 10860 10861 10862 /***************************************************************************** 10863 ** 10864 ** int xcb_xkb_set_names_values_groups_length 10865 ** 10866 ** @param const xcb_xkb_set_names_values_t *R 10867 ** @returns int 10868 ** 10869 *****************************************************************************/ 10870 10871 int 10872 xcb_xkb_set_names_values_groups_length (const xcb_xkb_set_names_request_t *R /**< */, 10873 const xcb_xkb_set_names_values_t *S /**< */) 10874 { 10875 return xcb_popcount(R->groupNames); 10876 } 10877 10878 10879 /***************************************************************************** 10880 ** 10881 ** xcb_generic_iterator_t xcb_xkb_set_names_values_groups_end 10882 ** 10883 ** @param const xcb_xkb_set_names_values_t *R 10884 ** @returns xcb_generic_iterator_t 10885 ** 10886 *****************************************************************************/ 10887 10888 xcb_generic_iterator_t 10889 xcb_xkb_set_names_values_groups_end (const xcb_xkb_set_names_request_t *R /**< */, 10890 const xcb_xkb_set_names_values_t *S /**< */) 10891 { 10892 xcb_generic_iterator_t i; 10893 i.data = /* values */ S->groups + xcb_popcount(R->groupNames); 10894 i.rem = 0; 10895 i.index = (char *) i.data - (char *) S; 10896 return i; 10897 } 10898 10899 10900 /***************************************************************************** 10901 ** 10902 ** xcb_xkb_key_name_t * xcb_xkb_set_names_values_key_names 10903 ** 10904 ** @param const xcb_xkb_set_names_values_t *S 10905 ** @returns xcb_xkb_key_name_t * 10906 ** 10907 *****************************************************************************/ 10908 10909 xcb_xkb_key_name_t * 10910 xcb_xkb_set_names_values_key_names (const xcb_xkb_set_names_values_t *S /**< */) 10911 { 10912 return /* values */ S->keyNames; 10913 } 10914 10915 10916 /***************************************************************************** 10917 ** 10918 ** int xcb_xkb_set_names_values_key_names_length 10919 ** 10920 ** @param const xcb_xkb_set_names_values_t *R 10921 ** @returns int 10922 ** 10923 *****************************************************************************/ 10924 10925 int 10926 xcb_xkb_set_names_values_key_names_length (const xcb_xkb_set_names_request_t *R /**< */, 10927 const xcb_xkb_set_names_values_t *S /**< */) 10928 { 10929 return R->nKeys; 10930 } 10931 10932 10933 /***************************************************************************** 10934 ** 10935 ** xcb_xkb_key_name_iterator_t xcb_xkb_set_names_values_key_names_iterator 10936 ** 10937 ** @param const xcb_xkb_set_names_values_t *R 10938 ** @returns xcb_xkb_key_name_iterator_t 10939 ** 10940 *****************************************************************************/ 10941 10942 xcb_xkb_key_name_iterator_t 10943 xcb_xkb_set_names_values_key_names_iterator (const xcb_xkb_set_names_request_t *R /**< */, 10944 const xcb_xkb_set_names_values_t *S /**< */) 10945 { 10946 xcb_xkb_key_name_iterator_t i; 10947 i.data = /* values */ S->keyNames; 10948 i.rem = R->nKeys; 10949 i.index = (char *) i.data - (char *) S; 10950 return i; 10951 } 10952 10953 10954 /***************************************************************************** 10955 ** 10956 ** xcb_xkb_key_alias_t * xcb_xkb_set_names_values_key_aliases 10957 ** 10958 ** @param const xcb_xkb_set_names_values_t *S 10959 ** @returns xcb_xkb_key_alias_t * 10960 ** 10961 *****************************************************************************/ 10962 10963 xcb_xkb_key_alias_t * 10964 xcb_xkb_set_names_values_key_aliases (const xcb_xkb_set_names_values_t *S /**< */) 10965 { 10966 return /* values */ S->keyAliases; 10967 } 10968 10969 10970 /***************************************************************************** 10971 ** 10972 ** int xcb_xkb_set_names_values_key_aliases_length 10973 ** 10974 ** @param const xcb_xkb_set_names_values_t *R 10975 ** @returns int 10976 ** 10977 *****************************************************************************/ 10978 10979 int 10980 xcb_xkb_set_names_values_key_aliases_length (const xcb_xkb_set_names_request_t *R /**< */, 10981 const xcb_xkb_set_names_values_t *S /**< */) 10982 { 10983 return R->nKeyAliases; 10984 } 10985 10986 10987 /***************************************************************************** 10988 ** 10989 ** xcb_xkb_key_alias_iterator_t xcb_xkb_set_names_values_key_aliases_iterator 10990 ** 10991 ** @param const xcb_xkb_set_names_values_t *R 10992 ** @returns xcb_xkb_key_alias_iterator_t 10993 ** 10994 *****************************************************************************/ 10995 10996 xcb_xkb_key_alias_iterator_t 10997 xcb_xkb_set_names_values_key_aliases_iterator (const xcb_xkb_set_names_request_t *R /**< */, 10998 const xcb_xkb_set_names_values_t *S /**< */) 10999 { 11000 xcb_xkb_key_alias_iterator_t i; 11001 i.data = /* values */ S->keyAliases; 11002 i.rem = R->nKeyAliases; 11003 i.index = (char *) i.data - (char *) S; 11004 return i; 11005 } 11006 11007 11008 /***************************************************************************** 11009 ** 11010 ** xcb_atom_t * xcb_xkb_set_names_values_radio_group_names 11011 ** 11012 ** @param const xcb_xkb_set_names_values_t *S 11013 ** @returns xcb_atom_t * 11014 ** 11015 *****************************************************************************/ 11016 11017 xcb_atom_t * 11018 xcb_xkb_set_names_values_radio_group_names (const xcb_xkb_set_names_values_t *S /**< */) 11019 { 11020 return /* values */ S->radioGroupNames; 11021 } 11022 11023 11024 /***************************************************************************** 11025 ** 11026 ** int xcb_xkb_set_names_values_radio_group_names_length 11027 ** 11028 ** @param const xcb_xkb_set_names_values_t *R 11029 ** @returns int 11030 ** 11031 *****************************************************************************/ 11032 11033 int 11034 xcb_xkb_set_names_values_radio_group_names_length (const xcb_xkb_set_names_request_t *R /**< */, 11035 const xcb_xkb_set_names_values_t *S /**< */) 11036 { 11037 return R->nRadioGroups; 11038 } 11039 11040 11041 /***************************************************************************** 11042 ** 11043 ** xcb_generic_iterator_t xcb_xkb_set_names_values_radio_group_names_end 11044 ** 11045 ** @param const xcb_xkb_set_names_values_t *R 11046 ** @returns xcb_generic_iterator_t 11047 ** 11048 *****************************************************************************/ 11049 11050 xcb_generic_iterator_t 11051 xcb_xkb_set_names_values_radio_group_names_end (const xcb_xkb_set_names_request_t *R /**< */, 11052 const xcb_xkb_set_names_values_t *S /**< */) 11053 { 11054 xcb_generic_iterator_t i; 11055 i.data = /* values */ S->radioGroupNames + R->nRadioGroups; 11056 i.rem = 0; 11057 i.index = (char *) i.data - (char *) S; 11058 return i; 11059 } 11060 11061 int 11062 xcb_xkb_set_names_values_serialize (void **_buffer /**< */, 11063 uint8_t nTypes /**< */, 11064 uint8_t nKTLevels /**< */, 11065 uint32_t indicators /**< */, 11066 uint16_t virtualMods /**< */, 11067 uint8_t groupNames /**< */, 11068 uint8_t nKeys /**< */, 11069 uint8_t nKeyAliases /**< */, 11070 uint8_t nRadioGroups /**< */, 11071 uint32_t which /**< */, 11072 const xcb_xkb_set_names_values_t *_aux /**< */) 11073 { 11074 char *xcb_out = *_buffer; 11075 unsigned int xcb_buffer_len = 0; 11076 unsigned int xcb_align_to; 11077 11078 unsigned int xcb_pad = 0; 11079 char xcb_pad0[3] = {0, 0, 0}; 11080 struct iovec xcb_parts[25]; 11081 unsigned int xcb_parts_idx = 0; 11082 unsigned int xcb_block_len = 0; 11083 unsigned int i; 11084 char *xcb_tmp; 11085 11086 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 11087 /* xcb_xkb_set_names_values_t.keycodesName */ 11088 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName; 11089 xcb_block_len += sizeof(xcb_atom_t); 11090 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11091 xcb_parts_idx++; 11092 xcb_align_to = ALIGNOF(xcb_atom_t); 11093 } 11094 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 11095 /* xcb_xkb_set_names_values_t.geometryName */ 11096 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName; 11097 xcb_block_len += sizeof(xcb_atom_t); 11098 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11099 xcb_parts_idx++; 11100 xcb_align_to = ALIGNOF(xcb_atom_t); 11101 } 11102 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 11103 /* xcb_xkb_set_names_values_t.symbolsName */ 11104 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName; 11105 xcb_block_len += sizeof(xcb_atom_t); 11106 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11107 xcb_parts_idx++; 11108 xcb_align_to = ALIGNOF(xcb_atom_t); 11109 } 11110 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 11111 /* xcb_xkb_set_names_values_t.physSymbolsName */ 11112 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName; 11113 xcb_block_len += sizeof(xcb_atom_t); 11114 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11115 xcb_parts_idx++; 11116 xcb_align_to = ALIGNOF(xcb_atom_t); 11117 } 11118 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 11119 /* xcb_xkb_set_names_values_t.typesName */ 11120 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName; 11121 xcb_block_len += sizeof(xcb_atom_t); 11122 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11123 xcb_parts_idx++; 11124 xcb_align_to = ALIGNOF(xcb_atom_t); 11125 } 11126 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 11127 /* xcb_xkb_set_names_values_t.compatName */ 11128 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName; 11129 xcb_block_len += sizeof(xcb_atom_t); 11130 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 11131 xcb_parts_idx++; 11132 xcb_align_to = ALIGNOF(xcb_atom_t); 11133 } 11134 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 11135 /* insert padding */ 11136 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11137 xcb_buffer_len += xcb_block_len + xcb_pad; 11138 if (0 != xcb_pad) { 11139 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11140 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11141 xcb_parts_idx++; 11142 xcb_pad = 0; 11143 } 11144 xcb_block_len = 0; 11145 /* typeNames */ 11146 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames; 11147 xcb_block_len += nTypes * sizeof(xcb_atom_t); 11148 xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t); 11149 xcb_parts_idx++; 11150 xcb_align_to = ALIGNOF(xcb_atom_t); 11151 } 11152 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 11153 /* insert padding */ 11154 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11155 xcb_buffer_len += xcb_block_len + xcb_pad; 11156 if (0 != xcb_pad) { 11157 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11158 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11159 xcb_parts_idx++; 11160 xcb_pad = 0; 11161 } 11162 xcb_block_len = 0; 11163 /* nLevelsPerType */ 11164 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType; 11165 xcb_block_len += nKTLevels * sizeof(uint8_t); 11166 xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t); 11167 xcb_parts_idx++; 11168 xcb_align_to = ALIGNOF(uint8_t); 11169 /* insert padding */ 11170 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11171 xcb_buffer_len += xcb_block_len + xcb_pad; 11172 if (0 != xcb_pad) { 11173 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11174 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11175 xcb_parts_idx++; 11176 xcb_pad = 0; 11177 } 11178 xcb_block_len = 0; 11179 /* ktLevelNames */ 11180 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames; 11181 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 11182 xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 11183 xcb_parts_idx++; 11184 xcb_align_to = ALIGNOF(xcb_atom_t); 11185 } 11186 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 11187 /* insert padding */ 11188 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11189 xcb_buffer_len += xcb_block_len + xcb_pad; 11190 if (0 != xcb_pad) { 11191 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11192 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11193 xcb_parts_idx++; 11194 xcb_pad = 0; 11195 } 11196 xcb_block_len = 0; 11197 /* indicatorNames */ 11198 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames; 11199 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 11200 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t); 11201 xcb_parts_idx++; 11202 xcb_align_to = ALIGNOF(xcb_atom_t); 11203 } 11204 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 11205 /* insert padding */ 11206 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11207 xcb_buffer_len += xcb_block_len + xcb_pad; 11208 if (0 != xcb_pad) { 11209 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11210 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11211 xcb_parts_idx++; 11212 xcb_pad = 0; 11213 } 11214 xcb_block_len = 0; 11215 /* virtualModNames */ 11216 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames; 11217 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 11218 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 11219 xcb_parts_idx++; 11220 xcb_align_to = ALIGNOF(xcb_atom_t); 11221 } 11222 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 11223 /* insert padding */ 11224 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11225 xcb_buffer_len += xcb_block_len + xcb_pad; 11226 if (0 != xcb_pad) { 11227 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11228 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11229 xcb_parts_idx++; 11230 xcb_pad = 0; 11231 } 11232 xcb_block_len = 0; 11233 /* groups */ 11234 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups; 11235 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 11236 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t); 11237 xcb_parts_idx++; 11238 xcb_align_to = ALIGNOF(xcb_atom_t); 11239 } 11240 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 11241 /* insert padding */ 11242 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11243 xcb_buffer_len += xcb_block_len + xcb_pad; 11244 if (0 != xcb_pad) { 11245 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11246 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11247 xcb_parts_idx++; 11248 xcb_pad = 0; 11249 } 11250 xcb_block_len = 0; 11251 /* keyNames */ 11252 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames; 11253 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 11254 xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t); 11255 xcb_parts_idx++; 11256 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 11257 } 11258 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 11259 /* insert padding */ 11260 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11261 xcb_buffer_len += xcb_block_len + xcb_pad; 11262 if (0 != xcb_pad) { 11263 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11264 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11265 xcb_parts_idx++; 11266 xcb_pad = 0; 11267 } 11268 xcb_block_len = 0; 11269 /* keyAliases */ 11270 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases; 11271 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 11272 xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 11273 xcb_parts_idx++; 11274 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 11275 } 11276 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 11277 /* insert padding */ 11278 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11279 xcb_buffer_len += xcb_block_len + xcb_pad; 11280 if (0 != xcb_pad) { 11281 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11282 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11283 xcb_parts_idx++; 11284 xcb_pad = 0; 11285 } 11286 xcb_block_len = 0; 11287 /* radioGroupNames */ 11288 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames; 11289 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 11290 xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t); 11291 xcb_parts_idx++; 11292 xcb_align_to = ALIGNOF(xcb_atom_t); 11293 } 11294 /* insert padding */ 11295 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11296 xcb_buffer_len += xcb_block_len + xcb_pad; 11297 if (0 != xcb_pad) { 11298 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 11299 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 11300 xcb_parts_idx++; 11301 xcb_pad = 0; 11302 } 11303 xcb_block_len = 0; 11304 11305 if (NULL == xcb_out) { 11306 /* allocate memory */ 11307 xcb_out = malloc(xcb_buffer_len); 11308 *_buffer = xcb_out; 11309 } 11310 11311 xcb_tmp = xcb_out; 11312 for(i=0; i<xcb_parts_idx; i++) { 11313 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 11314 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 11315 if (0 != xcb_parts[i].iov_len) 11316 xcb_tmp += xcb_parts[i].iov_len; 11317 } 11318 11319 return xcb_buffer_len; 11320 } 11321 11322 int 11323 xcb_xkb_set_names_values_unpack (const void *_buffer /**< */, 11324 uint8_t nTypes /**< */, 11325 uint8_t nKTLevels /**< */, 11326 uint32_t indicators /**< */, 11327 uint16_t virtualMods /**< */, 11328 uint8_t groupNames /**< */, 11329 uint8_t nKeys /**< */, 11330 uint8_t nKeyAliases /**< */, 11331 uint8_t nRadioGroups /**< */, 11332 uint32_t which /**< */, 11333 xcb_xkb_set_names_values_t *_aux /**< */) 11334 { 11335 char *xcb_tmp = (char *)_buffer; 11336 unsigned int xcb_buffer_len = 0; 11337 unsigned int xcb_block_len = 0; 11338 unsigned int xcb_pad = 0; 11339 unsigned int xcb_align_to; 11340 11341 11342 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 11343 /* xcb_xkb_set_names_values_t.keycodesName */ 11344 _aux->keycodesName = *(xcb_atom_t *)xcb_tmp; 11345 xcb_block_len += sizeof(xcb_atom_t); 11346 xcb_tmp += sizeof(xcb_atom_t); 11347 xcb_align_to = ALIGNOF(xcb_atom_t); 11348 } 11349 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 11350 /* xcb_xkb_set_names_values_t.geometryName */ 11351 _aux->geometryName = *(xcb_atom_t *)xcb_tmp; 11352 xcb_block_len += sizeof(xcb_atom_t); 11353 xcb_tmp += sizeof(xcb_atom_t); 11354 xcb_align_to = ALIGNOF(xcb_atom_t); 11355 } 11356 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 11357 /* xcb_xkb_set_names_values_t.symbolsName */ 11358 _aux->symbolsName = *(xcb_atom_t *)xcb_tmp; 11359 xcb_block_len += sizeof(xcb_atom_t); 11360 xcb_tmp += sizeof(xcb_atom_t); 11361 xcb_align_to = ALIGNOF(xcb_atom_t); 11362 } 11363 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 11364 /* xcb_xkb_set_names_values_t.physSymbolsName */ 11365 _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp; 11366 xcb_block_len += sizeof(xcb_atom_t); 11367 xcb_tmp += sizeof(xcb_atom_t); 11368 xcb_align_to = ALIGNOF(xcb_atom_t); 11369 } 11370 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 11371 /* xcb_xkb_set_names_values_t.typesName */ 11372 _aux->typesName = *(xcb_atom_t *)xcb_tmp; 11373 xcb_block_len += sizeof(xcb_atom_t); 11374 xcb_tmp += sizeof(xcb_atom_t); 11375 xcb_align_to = ALIGNOF(xcb_atom_t); 11376 } 11377 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 11378 /* xcb_xkb_set_names_values_t.compatName */ 11379 _aux->compatName = *(xcb_atom_t *)xcb_tmp; 11380 xcb_block_len += sizeof(xcb_atom_t); 11381 xcb_tmp += sizeof(xcb_atom_t); 11382 xcb_align_to = ALIGNOF(xcb_atom_t); 11383 } 11384 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 11385 /* insert padding */ 11386 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11387 xcb_buffer_len += xcb_block_len + xcb_pad; 11388 if (0 != xcb_pad) { 11389 xcb_tmp += xcb_pad; 11390 xcb_pad = 0; 11391 } 11392 xcb_block_len = 0; 11393 /* typeNames */ 11394 _aux->typeNames = (xcb_atom_t *)xcb_tmp; 11395 xcb_block_len += nTypes * sizeof(xcb_atom_t); 11396 xcb_tmp += xcb_block_len; 11397 xcb_align_to = ALIGNOF(xcb_atom_t); 11398 } 11399 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 11400 /* insert padding */ 11401 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11402 xcb_buffer_len += xcb_block_len + xcb_pad; 11403 if (0 != xcb_pad) { 11404 xcb_tmp += xcb_pad; 11405 xcb_pad = 0; 11406 } 11407 xcb_block_len = 0; 11408 /* nLevelsPerType */ 11409 _aux->nLevelsPerType = (uint8_t *)xcb_tmp; 11410 xcb_block_len += nKTLevels * sizeof(uint8_t); 11411 xcb_tmp += xcb_block_len; 11412 xcb_align_to = ALIGNOF(uint8_t); 11413 /* insert padding */ 11414 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11415 xcb_buffer_len += xcb_block_len + xcb_pad; 11416 if (0 != xcb_pad) { 11417 xcb_tmp += xcb_pad; 11418 xcb_pad = 0; 11419 } 11420 xcb_block_len = 0; 11421 /* ktLevelNames */ 11422 _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp; 11423 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 11424 xcb_tmp += xcb_block_len; 11425 xcb_align_to = ALIGNOF(xcb_atom_t); 11426 } 11427 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 11428 /* insert padding */ 11429 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11430 xcb_buffer_len += xcb_block_len + xcb_pad; 11431 if (0 != xcb_pad) { 11432 xcb_tmp += xcb_pad; 11433 xcb_pad = 0; 11434 } 11435 xcb_block_len = 0; 11436 /* indicatorNames */ 11437 _aux->indicatorNames = (xcb_atom_t *)xcb_tmp; 11438 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 11439 xcb_tmp += xcb_block_len; 11440 xcb_align_to = ALIGNOF(xcb_atom_t); 11441 } 11442 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 11443 /* insert padding */ 11444 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11445 xcb_buffer_len += xcb_block_len + xcb_pad; 11446 if (0 != xcb_pad) { 11447 xcb_tmp += xcb_pad; 11448 xcb_pad = 0; 11449 } 11450 xcb_block_len = 0; 11451 /* virtualModNames */ 11452 _aux->virtualModNames = (xcb_atom_t *)xcb_tmp; 11453 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 11454 xcb_tmp += xcb_block_len; 11455 xcb_align_to = ALIGNOF(xcb_atom_t); 11456 } 11457 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 11458 /* insert padding */ 11459 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11460 xcb_buffer_len += xcb_block_len + xcb_pad; 11461 if (0 != xcb_pad) { 11462 xcb_tmp += xcb_pad; 11463 xcb_pad = 0; 11464 } 11465 xcb_block_len = 0; 11466 /* groups */ 11467 _aux->groups = (xcb_atom_t *)xcb_tmp; 11468 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 11469 xcb_tmp += xcb_block_len; 11470 xcb_align_to = ALIGNOF(xcb_atom_t); 11471 } 11472 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 11473 /* insert padding */ 11474 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11475 xcb_buffer_len += xcb_block_len + xcb_pad; 11476 if (0 != xcb_pad) { 11477 xcb_tmp += xcb_pad; 11478 xcb_pad = 0; 11479 } 11480 xcb_block_len = 0; 11481 /* keyNames */ 11482 _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp; 11483 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 11484 xcb_tmp += xcb_block_len; 11485 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 11486 } 11487 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 11488 /* insert padding */ 11489 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11490 xcb_buffer_len += xcb_block_len + xcb_pad; 11491 if (0 != xcb_pad) { 11492 xcb_tmp += xcb_pad; 11493 xcb_pad = 0; 11494 } 11495 xcb_block_len = 0; 11496 /* keyAliases */ 11497 _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp; 11498 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 11499 xcb_tmp += xcb_block_len; 11500 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 11501 } 11502 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 11503 /* insert padding */ 11504 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11505 xcb_buffer_len += xcb_block_len + xcb_pad; 11506 if (0 != xcb_pad) { 11507 xcb_tmp += xcb_pad; 11508 xcb_pad = 0; 11509 } 11510 xcb_block_len = 0; 11511 /* radioGroupNames */ 11512 _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp; 11513 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 11514 xcb_tmp += xcb_block_len; 11515 xcb_align_to = ALIGNOF(xcb_atom_t); 11516 } 11517 /* insert padding */ 11518 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11519 xcb_buffer_len += xcb_block_len + xcb_pad; 11520 if (0 != xcb_pad) { 11521 xcb_tmp += xcb_pad; 11522 xcb_pad = 0; 11523 } 11524 xcb_block_len = 0; 11525 11526 return xcb_buffer_len; 11527 } 11528 11529 int 11530 xcb_xkb_set_names_values_sizeof (const void *_buffer /**< */, 11531 uint8_t nTypes /**< */, 11532 uint8_t nKTLevels /**< */, 11533 uint32_t indicators /**< */, 11534 uint16_t virtualMods /**< */, 11535 uint8_t groupNames /**< */, 11536 uint8_t nKeys /**< */, 11537 uint8_t nKeyAliases /**< */, 11538 uint8_t nRadioGroups /**< */, 11539 uint32_t which /**< */) 11540 { 11541 xcb_xkb_set_names_values_t _aux; 11542 return xcb_xkb_set_names_values_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux); 11543 } 11544 11545 11546 /***************************************************************************** 11547 ** 11548 ** xcb_void_cookie_t xcb_xkb_set_names_checked 11549 ** 11550 ** @param xcb_connection_t *c 11551 ** @param xcb_xkb_device_spec_t deviceSpec 11552 ** @param uint16_t virtualMods 11553 ** @param uint32_t which 11554 ** @param uint8_t firstType 11555 ** @param uint8_t nTypes 11556 ** @param uint8_t firstKTLevelt 11557 ** @param uint8_t nKTLevels 11558 ** @param uint32_t indicators 11559 ** @param uint8_t groupNames 11560 ** @param uint8_t nRadioGroups 11561 ** @param xcb_keycode_t firstKey 11562 ** @param uint8_t nKeys 11563 ** @param uint8_t nKeyAliases 11564 ** @param uint16_t totalKTLevelNames 11565 ** @param const void *values 11566 ** @returns xcb_void_cookie_t 11567 ** 11568 *****************************************************************************/ 11569 11570 xcb_void_cookie_t 11571 xcb_xkb_set_names_checked (xcb_connection_t *c /**< */, 11572 xcb_xkb_device_spec_t deviceSpec /**< */, 11573 uint16_t virtualMods /**< */, 11574 uint32_t which /**< */, 11575 uint8_t firstType /**< */, 11576 uint8_t nTypes /**< */, 11577 uint8_t firstKTLevelt /**< */, 11578 uint8_t nKTLevels /**< */, 11579 uint32_t indicators /**< */, 11580 uint8_t groupNames /**< */, 11581 uint8_t nRadioGroups /**< */, 11582 xcb_keycode_t firstKey /**< */, 11583 uint8_t nKeys /**< */, 11584 uint8_t nKeyAliases /**< */, 11585 uint16_t totalKTLevelNames /**< */, 11586 const void *values /**< */) 11587 { 11588 static const xcb_protocol_request_t xcb_req = { 11589 /* count */ 3, 11590 /* ext */ &xcb_xkb_id, 11591 /* opcode */ XCB_XKB_SET_NAMES, 11592 /* isvoid */ 1 11593 }; 11594 11595 struct iovec xcb_parts[5]; 11596 xcb_void_cookie_t xcb_ret; 11597 xcb_xkb_set_names_request_t xcb_out; 11598 11599 xcb_out.deviceSpec = deviceSpec; 11600 xcb_out.virtualMods = virtualMods; 11601 xcb_out.which = which; 11602 xcb_out.firstType = firstType; 11603 xcb_out.nTypes = nTypes; 11604 xcb_out.firstKTLevelt = firstKTLevelt; 11605 xcb_out.nKTLevels = nKTLevels; 11606 xcb_out.indicators = indicators; 11607 xcb_out.groupNames = groupNames; 11608 xcb_out.nRadioGroups = nRadioGroups; 11609 xcb_out.firstKey = firstKey; 11610 xcb_out.nKeys = nKeys; 11611 xcb_out.nKeyAliases = nKeyAliases; 11612 xcb_out.pad0 = 0; 11613 xcb_out.totalKTLevelNames = totalKTLevelNames; 11614 11615 xcb_parts[2].iov_base = (char *) &xcb_out; 11616 xcb_parts[2].iov_len = sizeof(xcb_out); 11617 xcb_parts[3].iov_base = 0; 11618 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 11619 /* xcb_xkb_set_names_values_t values */ 11620 xcb_parts[4].iov_base = (char *) values; 11621 xcb_parts[4].iov_len = 11622 xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which); 11623 11624 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 11625 return xcb_ret; 11626 } 11627 11628 11629 /***************************************************************************** 11630 ** 11631 ** xcb_void_cookie_t xcb_xkb_set_names 11632 ** 11633 ** @param xcb_connection_t *c 11634 ** @param xcb_xkb_device_spec_t deviceSpec 11635 ** @param uint16_t virtualMods 11636 ** @param uint32_t which 11637 ** @param uint8_t firstType 11638 ** @param uint8_t nTypes 11639 ** @param uint8_t firstKTLevelt 11640 ** @param uint8_t nKTLevels 11641 ** @param uint32_t indicators 11642 ** @param uint8_t groupNames 11643 ** @param uint8_t nRadioGroups 11644 ** @param xcb_keycode_t firstKey 11645 ** @param uint8_t nKeys 11646 ** @param uint8_t nKeyAliases 11647 ** @param uint16_t totalKTLevelNames 11648 ** @param const void *values 11649 ** @returns xcb_void_cookie_t 11650 ** 11651 *****************************************************************************/ 11652 11653 xcb_void_cookie_t 11654 xcb_xkb_set_names (xcb_connection_t *c /**< */, 11655 xcb_xkb_device_spec_t deviceSpec /**< */, 11656 uint16_t virtualMods /**< */, 11657 uint32_t which /**< */, 11658 uint8_t firstType /**< */, 11659 uint8_t nTypes /**< */, 11660 uint8_t firstKTLevelt /**< */, 11661 uint8_t nKTLevels /**< */, 11662 uint32_t indicators /**< */, 11663 uint8_t groupNames /**< */, 11664 uint8_t nRadioGroups /**< */, 11665 xcb_keycode_t firstKey /**< */, 11666 uint8_t nKeys /**< */, 11667 uint8_t nKeyAliases /**< */, 11668 uint16_t totalKTLevelNames /**< */, 11669 const void *values /**< */) 11670 { 11671 static const xcb_protocol_request_t xcb_req = { 11672 /* count */ 3, 11673 /* ext */ &xcb_xkb_id, 11674 /* opcode */ XCB_XKB_SET_NAMES, 11675 /* isvoid */ 1 11676 }; 11677 11678 struct iovec xcb_parts[5]; 11679 xcb_void_cookie_t xcb_ret; 11680 xcb_xkb_set_names_request_t xcb_out; 11681 11682 xcb_out.deviceSpec = deviceSpec; 11683 xcb_out.virtualMods = virtualMods; 11684 xcb_out.which = which; 11685 xcb_out.firstType = firstType; 11686 xcb_out.nTypes = nTypes; 11687 xcb_out.firstKTLevelt = firstKTLevelt; 11688 xcb_out.nKTLevels = nKTLevels; 11689 xcb_out.indicators = indicators; 11690 xcb_out.groupNames = groupNames; 11691 xcb_out.nRadioGroups = nRadioGroups; 11692 xcb_out.firstKey = firstKey; 11693 xcb_out.nKeys = nKeys; 11694 xcb_out.nKeyAliases = nKeyAliases; 11695 xcb_out.pad0 = 0; 11696 xcb_out.totalKTLevelNames = totalKTLevelNames; 11697 11698 xcb_parts[2].iov_base = (char *) &xcb_out; 11699 xcb_parts[2].iov_len = sizeof(xcb_out); 11700 xcb_parts[3].iov_base = 0; 11701 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 11702 /* xcb_xkb_set_names_values_t values */ 11703 xcb_parts[4].iov_base = (char *) values; 11704 xcb_parts[4].iov_len = 11705 xcb_xkb_set_names_values_sizeof (values, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which); 11706 11707 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 11708 return xcb_ret; 11709 } 11710 11711 11712 /***************************************************************************** 11713 ** 11714 ** xcb_void_cookie_t xcb_xkb_set_names_aux_checked 11715 ** 11716 ** @param xcb_connection_t *c 11717 ** @param xcb_xkb_device_spec_t deviceSpec 11718 ** @param uint16_t virtualMods 11719 ** @param uint32_t which 11720 ** @param uint8_t firstType 11721 ** @param uint8_t nTypes 11722 ** @param uint8_t firstKTLevelt 11723 ** @param uint8_t nKTLevels 11724 ** @param uint32_t indicators 11725 ** @param uint8_t groupNames 11726 ** @param uint8_t nRadioGroups 11727 ** @param xcb_keycode_t firstKey 11728 ** @param uint8_t nKeys 11729 ** @param uint8_t nKeyAliases 11730 ** @param uint16_t totalKTLevelNames 11731 ** @param const xcb_xkb_set_names_values_t *values 11732 ** @returns xcb_void_cookie_t 11733 ** 11734 *****************************************************************************/ 11735 11736 xcb_void_cookie_t 11737 xcb_xkb_set_names_aux_checked (xcb_connection_t *c /**< */, 11738 xcb_xkb_device_spec_t deviceSpec /**< */, 11739 uint16_t virtualMods /**< */, 11740 uint32_t which /**< */, 11741 uint8_t firstType /**< */, 11742 uint8_t nTypes /**< */, 11743 uint8_t firstKTLevelt /**< */, 11744 uint8_t nKTLevels /**< */, 11745 uint32_t indicators /**< */, 11746 uint8_t groupNames /**< */, 11747 uint8_t nRadioGroups /**< */, 11748 xcb_keycode_t firstKey /**< */, 11749 uint8_t nKeys /**< */, 11750 uint8_t nKeyAliases /**< */, 11751 uint16_t totalKTLevelNames /**< */, 11752 const xcb_xkb_set_names_values_t *values /**< */) 11753 { 11754 static const xcb_protocol_request_t xcb_req = { 11755 /* count */ 3, 11756 /* ext */ &xcb_xkb_id, 11757 /* opcode */ XCB_XKB_SET_NAMES, 11758 /* isvoid */ 1 11759 }; 11760 11761 struct iovec xcb_parts[5]; 11762 xcb_void_cookie_t xcb_ret; 11763 xcb_xkb_set_names_request_t xcb_out; 11764 void *xcb_aux0 = 0; 11765 11766 xcb_out.deviceSpec = deviceSpec; 11767 xcb_out.virtualMods = virtualMods; 11768 xcb_out.which = which; 11769 xcb_out.firstType = firstType; 11770 xcb_out.nTypes = nTypes; 11771 xcb_out.firstKTLevelt = firstKTLevelt; 11772 xcb_out.nKTLevels = nKTLevels; 11773 xcb_out.indicators = indicators; 11774 xcb_out.groupNames = groupNames; 11775 xcb_out.nRadioGroups = nRadioGroups; 11776 xcb_out.firstKey = firstKey; 11777 xcb_out.nKeys = nKeys; 11778 xcb_out.nKeyAliases = nKeyAliases; 11779 xcb_out.pad0 = 0; 11780 xcb_out.totalKTLevelNames = totalKTLevelNames; 11781 11782 xcb_parts[2].iov_base = (char *) &xcb_out; 11783 xcb_parts[2].iov_len = sizeof(xcb_out); 11784 xcb_parts[3].iov_base = 0; 11785 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 11786 /* xcb_xkb_set_names_values_t values */ 11787 xcb_parts[4].iov_len = 11788 xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values); 11789 xcb_parts[4].iov_base = xcb_aux0; 11790 11791 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 11792 free(xcb_aux0); 11793 return xcb_ret; 11794 } 11795 11796 11797 /***************************************************************************** 11798 ** 11799 ** xcb_void_cookie_t xcb_xkb_set_names_aux 11800 ** 11801 ** @param xcb_connection_t *c 11802 ** @param xcb_xkb_device_spec_t deviceSpec 11803 ** @param uint16_t virtualMods 11804 ** @param uint32_t which 11805 ** @param uint8_t firstType 11806 ** @param uint8_t nTypes 11807 ** @param uint8_t firstKTLevelt 11808 ** @param uint8_t nKTLevels 11809 ** @param uint32_t indicators 11810 ** @param uint8_t groupNames 11811 ** @param uint8_t nRadioGroups 11812 ** @param xcb_keycode_t firstKey 11813 ** @param uint8_t nKeys 11814 ** @param uint8_t nKeyAliases 11815 ** @param uint16_t totalKTLevelNames 11816 ** @param const xcb_xkb_set_names_values_t *values 11817 ** @returns xcb_void_cookie_t 11818 ** 11819 *****************************************************************************/ 11820 11821 xcb_void_cookie_t 11822 xcb_xkb_set_names_aux (xcb_connection_t *c /**< */, 11823 xcb_xkb_device_spec_t deviceSpec /**< */, 11824 uint16_t virtualMods /**< */, 11825 uint32_t which /**< */, 11826 uint8_t firstType /**< */, 11827 uint8_t nTypes /**< */, 11828 uint8_t firstKTLevelt /**< */, 11829 uint8_t nKTLevels /**< */, 11830 uint32_t indicators /**< */, 11831 uint8_t groupNames /**< */, 11832 uint8_t nRadioGroups /**< */, 11833 xcb_keycode_t firstKey /**< */, 11834 uint8_t nKeys /**< */, 11835 uint8_t nKeyAliases /**< */, 11836 uint16_t totalKTLevelNames /**< */, 11837 const xcb_xkb_set_names_values_t *values /**< */) 11838 { 11839 static const xcb_protocol_request_t xcb_req = { 11840 /* count */ 3, 11841 /* ext */ &xcb_xkb_id, 11842 /* opcode */ XCB_XKB_SET_NAMES, 11843 /* isvoid */ 1 11844 }; 11845 11846 struct iovec xcb_parts[5]; 11847 xcb_void_cookie_t xcb_ret; 11848 xcb_xkb_set_names_request_t xcb_out; 11849 void *xcb_aux0 = 0; 11850 11851 xcb_out.deviceSpec = deviceSpec; 11852 xcb_out.virtualMods = virtualMods; 11853 xcb_out.which = which; 11854 xcb_out.firstType = firstType; 11855 xcb_out.nTypes = nTypes; 11856 xcb_out.firstKTLevelt = firstKTLevelt; 11857 xcb_out.nKTLevels = nKTLevels; 11858 xcb_out.indicators = indicators; 11859 xcb_out.groupNames = groupNames; 11860 xcb_out.nRadioGroups = nRadioGroups; 11861 xcb_out.firstKey = firstKey; 11862 xcb_out.nKeys = nKeys; 11863 xcb_out.nKeyAliases = nKeyAliases; 11864 xcb_out.pad0 = 0; 11865 xcb_out.totalKTLevelNames = totalKTLevelNames; 11866 11867 xcb_parts[2].iov_base = (char *) &xcb_out; 11868 xcb_parts[2].iov_len = sizeof(xcb_out); 11869 xcb_parts[3].iov_base = 0; 11870 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 11871 /* xcb_xkb_set_names_values_t values */ 11872 xcb_parts[4].iov_len = 11873 xcb_xkb_set_names_values_serialize (&xcb_aux0, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, values); 11874 xcb_parts[4].iov_base = xcb_aux0; 11875 11876 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 11877 free(xcb_aux0); 11878 return xcb_ret; 11879 } 11880 11881 int 11882 xcb_xkb_get_geometry_sizeof (const void *_buffer /**< */) 11883 { 11884 char *xcb_tmp = (char *)_buffer; 11885 const xcb_xkb_get_geometry_reply_t *_aux = (xcb_xkb_get_geometry_reply_t *)_buffer; 11886 unsigned int xcb_buffer_len = 0; 11887 unsigned int xcb_block_len = 0; 11888 unsigned int xcb_pad = 0; 11889 unsigned int xcb_align_to; 11890 11891 unsigned int i; 11892 unsigned int xcb_tmp_len; 11893 11894 xcb_block_len += sizeof(xcb_xkb_get_geometry_reply_t); 11895 xcb_tmp += xcb_block_len; 11896 /* labelFont */ 11897 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 11898 xcb_tmp += xcb_block_len; 11899 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 11900 /* insert padding */ 11901 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11902 xcb_buffer_len += xcb_block_len + xcb_pad; 11903 if (0 != xcb_pad) { 11904 xcb_tmp += xcb_pad; 11905 xcb_pad = 0; 11906 } 11907 xcb_block_len = 0; 11908 /* properties */ 11909 for(i=0; i<_aux->nProperties; i++) { 11910 xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp); 11911 xcb_block_len += xcb_tmp_len; 11912 xcb_tmp += xcb_tmp_len; 11913 } 11914 xcb_align_to = ALIGNOF(xcb_xkb_property_t); 11915 /* insert padding */ 11916 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11917 xcb_buffer_len += xcb_block_len + xcb_pad; 11918 if (0 != xcb_pad) { 11919 xcb_tmp += xcb_pad; 11920 xcb_pad = 0; 11921 } 11922 xcb_block_len = 0; 11923 /* colors */ 11924 for(i=0; i<_aux->nColors; i++) { 11925 xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 11926 xcb_block_len += xcb_tmp_len; 11927 xcb_tmp += xcb_tmp_len; 11928 } 11929 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 11930 /* insert padding */ 11931 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11932 xcb_buffer_len += xcb_block_len + xcb_pad; 11933 if (0 != xcb_pad) { 11934 xcb_tmp += xcb_pad; 11935 xcb_pad = 0; 11936 } 11937 xcb_block_len = 0; 11938 /* shapes */ 11939 for(i=0; i<_aux->nShapes; i++) { 11940 xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp); 11941 xcb_block_len += xcb_tmp_len; 11942 xcb_tmp += xcb_tmp_len; 11943 } 11944 xcb_align_to = ALIGNOF(xcb_xkb_shape_t); 11945 /* insert padding */ 11946 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11947 xcb_buffer_len += xcb_block_len + xcb_pad; 11948 if (0 != xcb_pad) { 11949 xcb_tmp += xcb_pad; 11950 xcb_pad = 0; 11951 } 11952 xcb_block_len = 0; 11953 /* sections */ 11954 for(i=0; i<_aux->nSections; i++) { 11955 xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp); 11956 xcb_block_len += xcb_tmp_len; 11957 xcb_tmp += xcb_tmp_len; 11958 } 11959 xcb_align_to = ALIGNOF(xcb_xkb_section_t); 11960 /* insert padding */ 11961 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11962 xcb_buffer_len += xcb_block_len + xcb_pad; 11963 if (0 != xcb_pad) { 11964 xcb_tmp += xcb_pad; 11965 xcb_pad = 0; 11966 } 11967 xcb_block_len = 0; 11968 /* doodads */ 11969 for(i=0; i<_aux->nDoodads; i++) { 11970 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 11971 xcb_block_len += xcb_tmp_len; 11972 xcb_tmp += xcb_tmp_len; 11973 } 11974 xcb_align_to = ALIGNOF(xcb_xkb_doodad_t); 11975 /* insert padding */ 11976 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11977 xcb_buffer_len += xcb_block_len + xcb_pad; 11978 if (0 != xcb_pad) { 11979 xcb_tmp += xcb_pad; 11980 xcb_pad = 0; 11981 } 11982 xcb_block_len = 0; 11983 /* keyAliases */ 11984 xcb_block_len += _aux->nKeyAliases * sizeof(xcb_xkb_key_alias_t); 11985 xcb_tmp += xcb_block_len; 11986 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 11987 /* insert padding */ 11988 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 11989 xcb_buffer_len += xcb_block_len + xcb_pad; 11990 if (0 != xcb_pad) { 11991 xcb_tmp += xcb_pad; 11992 xcb_pad = 0; 11993 } 11994 xcb_block_len = 0; 11995 11996 return xcb_buffer_len; 11997 } 11998 11999 12000 /***************************************************************************** 12001 ** 12002 ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry 12003 ** 12004 ** @param xcb_connection_t *c 12005 ** @param xcb_xkb_device_spec_t deviceSpec 12006 ** @param xcb_atom_t name 12007 ** @returns xcb_xkb_get_geometry_cookie_t 12008 ** 12009 *****************************************************************************/ 12010 12011 xcb_xkb_get_geometry_cookie_t 12012 xcb_xkb_get_geometry (xcb_connection_t *c /**< */, 12013 xcb_xkb_device_spec_t deviceSpec /**< */, 12014 xcb_atom_t name /**< */) 12015 { 12016 static const xcb_protocol_request_t xcb_req = { 12017 /* count */ 2, 12018 /* ext */ &xcb_xkb_id, 12019 /* opcode */ XCB_XKB_GET_GEOMETRY, 12020 /* isvoid */ 0 12021 }; 12022 12023 struct iovec xcb_parts[4]; 12024 xcb_xkb_get_geometry_cookie_t xcb_ret; 12025 xcb_xkb_get_geometry_request_t xcb_out; 12026 12027 xcb_out.deviceSpec = deviceSpec; 12028 memset(xcb_out.pad0, 0, 2); 12029 xcb_out.name = name; 12030 12031 xcb_parts[2].iov_base = (char *) &xcb_out; 12032 xcb_parts[2].iov_len = sizeof(xcb_out); 12033 xcb_parts[3].iov_base = 0; 12034 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12035 12036 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 12037 return xcb_ret; 12038 } 12039 12040 12041 /***************************************************************************** 12042 ** 12043 ** xcb_xkb_get_geometry_cookie_t xcb_xkb_get_geometry_unchecked 12044 ** 12045 ** @param xcb_connection_t *c 12046 ** @param xcb_xkb_device_spec_t deviceSpec 12047 ** @param xcb_atom_t name 12048 ** @returns xcb_xkb_get_geometry_cookie_t 12049 ** 12050 *****************************************************************************/ 12051 12052 xcb_xkb_get_geometry_cookie_t 12053 xcb_xkb_get_geometry_unchecked (xcb_connection_t *c /**< */, 12054 xcb_xkb_device_spec_t deviceSpec /**< */, 12055 xcb_atom_t name /**< */) 12056 { 12057 static const xcb_protocol_request_t xcb_req = { 12058 /* count */ 2, 12059 /* ext */ &xcb_xkb_id, 12060 /* opcode */ XCB_XKB_GET_GEOMETRY, 12061 /* isvoid */ 0 12062 }; 12063 12064 struct iovec xcb_parts[4]; 12065 xcb_xkb_get_geometry_cookie_t xcb_ret; 12066 xcb_xkb_get_geometry_request_t xcb_out; 12067 12068 xcb_out.deviceSpec = deviceSpec; 12069 memset(xcb_out.pad0, 0, 2); 12070 xcb_out.name = name; 12071 12072 xcb_parts[2].iov_base = (char *) &xcb_out; 12073 xcb_parts[2].iov_len = sizeof(xcb_out); 12074 xcb_parts[3].iov_base = 0; 12075 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12076 12077 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 12078 return xcb_ret; 12079 } 12080 12081 12082 /***************************************************************************** 12083 ** 12084 ** xcb_xkb_counted_string_16_t * xcb_xkb_get_geometry_label_font 12085 ** 12086 ** @param const xcb_xkb_get_geometry_reply_t *R 12087 ** @returns xcb_xkb_counted_string_16_t * 12088 ** 12089 *****************************************************************************/ 12090 12091 xcb_xkb_counted_string_16_t * 12092 xcb_xkb_get_geometry_label_font (const xcb_xkb_get_geometry_reply_t *R /**< */) 12093 { 12094 return (xcb_xkb_counted_string_16_t *) (R + 1); 12095 } 12096 12097 12098 /***************************************************************************** 12099 ** 12100 ** int xcb_xkb_get_geometry_properties_length 12101 ** 12102 ** @param const xcb_xkb_get_geometry_reply_t *R 12103 ** @returns int 12104 ** 12105 *****************************************************************************/ 12106 12107 int 12108 xcb_xkb_get_geometry_properties_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12109 { 12110 return R->nProperties; 12111 } 12112 12113 12114 /***************************************************************************** 12115 ** 12116 ** xcb_xkb_property_iterator_t xcb_xkb_get_geometry_properties_iterator 12117 ** 12118 ** @param const xcb_xkb_get_geometry_reply_t *R 12119 ** @returns xcb_xkb_property_iterator_t 12120 ** 12121 *****************************************************************************/ 12122 12123 xcb_xkb_property_iterator_t 12124 xcb_xkb_get_geometry_properties_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12125 { 12126 xcb_xkb_property_iterator_t i; 12127 xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_string_end(xcb_xkb_get_geometry_label_font(R)); 12128 i.data = (xcb_xkb_property_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_property_t, prev.index)); 12129 i.rem = R->nProperties; 12130 i.index = (char *) i.data - (char *) R; 12131 return i; 12132 } 12133 12134 12135 /***************************************************************************** 12136 ** 12137 ** int xcb_xkb_get_geometry_colors_length 12138 ** 12139 ** @param const xcb_xkb_get_geometry_reply_t *R 12140 ** @returns int 12141 ** 12142 *****************************************************************************/ 12143 12144 int 12145 xcb_xkb_get_geometry_colors_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12146 { 12147 return R->nColors; 12148 } 12149 12150 12151 /***************************************************************************** 12152 ** 12153 ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_geometry_colors_iterator 12154 ** 12155 ** @param const xcb_xkb_get_geometry_reply_t *R 12156 ** @returns xcb_xkb_counted_string_16_iterator_t 12157 ** 12158 *****************************************************************************/ 12159 12160 xcb_xkb_counted_string_16_iterator_t 12161 xcb_xkb_get_geometry_colors_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12162 { 12163 xcb_xkb_counted_string_16_iterator_t i; 12164 xcb_generic_iterator_t prev = xcb_xkb_property_end(xcb_xkb_get_geometry_properties_iterator(R)); 12165 i.data = (xcb_xkb_counted_string_16_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_counted_string_16_t, prev.index)); 12166 i.rem = R->nColors; 12167 i.index = (char *) i.data - (char *) R; 12168 return i; 12169 } 12170 12171 12172 /***************************************************************************** 12173 ** 12174 ** int xcb_xkb_get_geometry_shapes_length 12175 ** 12176 ** @param const xcb_xkb_get_geometry_reply_t *R 12177 ** @returns int 12178 ** 12179 *****************************************************************************/ 12180 12181 int 12182 xcb_xkb_get_geometry_shapes_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12183 { 12184 return R->nShapes; 12185 } 12186 12187 12188 /***************************************************************************** 12189 ** 12190 ** xcb_xkb_shape_iterator_t xcb_xkb_get_geometry_shapes_iterator 12191 ** 12192 ** @param const xcb_xkb_get_geometry_reply_t *R 12193 ** @returns xcb_xkb_shape_iterator_t 12194 ** 12195 *****************************************************************************/ 12196 12197 xcb_xkb_shape_iterator_t 12198 xcb_xkb_get_geometry_shapes_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12199 { 12200 xcb_xkb_shape_iterator_t i; 12201 xcb_generic_iterator_t prev = xcb_xkb_counted_string_16_end(xcb_xkb_get_geometry_colors_iterator(R)); 12202 i.data = (xcb_xkb_shape_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_shape_t, prev.index)); 12203 i.rem = R->nShapes; 12204 i.index = (char *) i.data - (char *) R; 12205 return i; 12206 } 12207 12208 12209 /***************************************************************************** 12210 ** 12211 ** int xcb_xkb_get_geometry_sections_length 12212 ** 12213 ** @param const xcb_xkb_get_geometry_reply_t *R 12214 ** @returns int 12215 ** 12216 *****************************************************************************/ 12217 12218 int 12219 xcb_xkb_get_geometry_sections_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12220 { 12221 return R->nSections; 12222 } 12223 12224 12225 /***************************************************************************** 12226 ** 12227 ** xcb_xkb_section_iterator_t xcb_xkb_get_geometry_sections_iterator 12228 ** 12229 ** @param const xcb_xkb_get_geometry_reply_t *R 12230 ** @returns xcb_xkb_section_iterator_t 12231 ** 12232 *****************************************************************************/ 12233 12234 xcb_xkb_section_iterator_t 12235 xcb_xkb_get_geometry_sections_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12236 { 12237 xcb_xkb_section_iterator_t i; 12238 xcb_generic_iterator_t prev = xcb_xkb_shape_end(xcb_xkb_get_geometry_shapes_iterator(R)); 12239 i.data = (xcb_xkb_section_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_section_t, prev.index)); 12240 i.rem = R->nSections; 12241 i.index = (char *) i.data - (char *) R; 12242 return i; 12243 } 12244 12245 12246 /***************************************************************************** 12247 ** 12248 ** int xcb_xkb_get_geometry_doodads_length 12249 ** 12250 ** @param const xcb_xkb_get_geometry_reply_t *R 12251 ** @returns int 12252 ** 12253 *****************************************************************************/ 12254 12255 int 12256 xcb_xkb_get_geometry_doodads_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12257 { 12258 return R->nDoodads; 12259 } 12260 12261 12262 /***************************************************************************** 12263 ** 12264 ** xcb_xkb_doodad_iterator_t xcb_xkb_get_geometry_doodads_iterator 12265 ** 12266 ** @param const xcb_xkb_get_geometry_reply_t *R 12267 ** @returns xcb_xkb_doodad_iterator_t 12268 ** 12269 *****************************************************************************/ 12270 12271 xcb_xkb_doodad_iterator_t 12272 xcb_xkb_get_geometry_doodads_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12273 { 12274 xcb_xkb_doodad_iterator_t i; 12275 xcb_generic_iterator_t prev = xcb_xkb_section_end(xcb_xkb_get_geometry_sections_iterator(R)); 12276 i.data = (xcb_xkb_doodad_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_doodad_t, prev.index)); 12277 i.rem = R->nDoodads; 12278 i.index = (char *) i.data - (char *) R; 12279 return i; 12280 } 12281 12282 12283 /***************************************************************************** 12284 ** 12285 ** xcb_xkb_key_alias_t * xcb_xkb_get_geometry_key_aliases 12286 ** 12287 ** @param const xcb_xkb_get_geometry_reply_t *R 12288 ** @returns xcb_xkb_key_alias_t * 12289 ** 12290 *****************************************************************************/ 12291 12292 xcb_xkb_key_alias_t * 12293 xcb_xkb_get_geometry_key_aliases (const xcb_xkb_get_geometry_reply_t *R /**< */) 12294 { 12295 xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_get_geometry_doodads_iterator(R)); 12296 return (xcb_xkb_key_alias_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_key_alias_t, prev.index) + 0); 12297 } 12298 12299 12300 /***************************************************************************** 12301 ** 12302 ** int xcb_xkb_get_geometry_key_aliases_length 12303 ** 12304 ** @param const xcb_xkb_get_geometry_reply_t *R 12305 ** @returns int 12306 ** 12307 *****************************************************************************/ 12308 12309 int 12310 xcb_xkb_get_geometry_key_aliases_length (const xcb_xkb_get_geometry_reply_t *R /**< */) 12311 { 12312 return R->nKeyAliases; 12313 } 12314 12315 12316 /***************************************************************************** 12317 ** 12318 ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_geometry_key_aliases_iterator 12319 ** 12320 ** @param const xcb_xkb_get_geometry_reply_t *R 12321 ** @returns xcb_xkb_key_alias_iterator_t 12322 ** 12323 *****************************************************************************/ 12324 12325 xcb_xkb_key_alias_iterator_t 12326 xcb_xkb_get_geometry_key_aliases_iterator (const xcb_xkb_get_geometry_reply_t *R /**< */) 12327 { 12328 xcb_xkb_key_alias_iterator_t i; 12329 xcb_generic_iterator_t prev = xcb_xkb_doodad_end(xcb_xkb_get_geometry_doodads_iterator(R)); 12330 i.data = (xcb_xkb_key_alias_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_key_alias_t, prev.index)); 12331 i.rem = R->nKeyAliases; 12332 i.index = (char *) i.data - (char *) R; 12333 return i; 12334 } 12335 12336 12337 /***************************************************************************** 12338 ** 12339 ** xcb_xkb_get_geometry_reply_t * xcb_xkb_get_geometry_reply 12340 ** 12341 ** @param xcb_connection_t *c 12342 ** @param xcb_xkb_get_geometry_cookie_t cookie 12343 ** @param xcb_generic_error_t **e 12344 ** @returns xcb_xkb_get_geometry_reply_t * 12345 ** 12346 *****************************************************************************/ 12347 12348 xcb_xkb_get_geometry_reply_t * 12349 xcb_xkb_get_geometry_reply (xcb_connection_t *c /**< */, 12350 xcb_xkb_get_geometry_cookie_t cookie /**< */, 12351 xcb_generic_error_t **e /**< */) 12352 { 12353 xcb_xkb_get_geometry_reply_t *reply = (xcb_xkb_get_geometry_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 12354 int i; 12355 xcb_xkb_property_iterator_t properties_iter = xcb_xkb_get_geometry_properties_iterator(reply); 12356 int properties_len = xcb_xkb_get_geometry_properties_length(reply); 12357 xcb_xkb_property_t *properties_data; 12358 /* special cases: transform parts of the reply to match XCB data structures */ 12359 for(i=0; i<properties_len; i++) { 12360 properties_data = properties_iter.data; 12361 xcb_xkb_property_unserialize((const void *)properties_data, &properties_data); 12362 xcb_xkb_property_next(&properties_iter); 12363 } 12364 return reply; 12365 } 12366 12367 int 12368 xcb_xkb_set_geometry_sizeof (const void *_buffer /**< */) 12369 { 12370 char *xcb_tmp = (char *)_buffer; 12371 const xcb_xkb_set_geometry_request_t *_aux = (xcb_xkb_set_geometry_request_t *)_buffer; 12372 unsigned int xcb_buffer_len = 0; 12373 unsigned int xcb_block_len = 0; 12374 unsigned int xcb_pad = 0; 12375 unsigned int xcb_align_to; 12376 12377 unsigned int i; 12378 unsigned int xcb_tmp_len; 12379 12380 xcb_block_len += sizeof(xcb_xkb_set_geometry_request_t); 12381 xcb_tmp += xcb_block_len; 12382 /* labelFont */ 12383 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 12384 xcb_tmp += xcb_block_len; 12385 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 12386 /* insert padding */ 12387 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12388 xcb_buffer_len += xcb_block_len + xcb_pad; 12389 if (0 != xcb_pad) { 12390 xcb_tmp += xcb_pad; 12391 xcb_pad = 0; 12392 } 12393 xcb_block_len = 0; 12394 /* properties */ 12395 for(i=0; i<_aux->nProperties; i++) { 12396 xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp); 12397 xcb_block_len += xcb_tmp_len; 12398 xcb_tmp += xcb_tmp_len; 12399 } 12400 xcb_align_to = ALIGNOF(xcb_xkb_property_t); 12401 /* insert padding */ 12402 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12403 xcb_buffer_len += xcb_block_len + xcb_pad; 12404 if (0 != xcb_pad) { 12405 xcb_tmp += xcb_pad; 12406 xcb_pad = 0; 12407 } 12408 xcb_block_len = 0; 12409 /* colors */ 12410 for(i=0; i<_aux->nColors; i++) { 12411 xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 12412 xcb_block_len += xcb_tmp_len; 12413 xcb_tmp += xcb_tmp_len; 12414 } 12415 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 12416 /* insert padding */ 12417 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12418 xcb_buffer_len += xcb_block_len + xcb_pad; 12419 if (0 != xcb_pad) { 12420 xcb_tmp += xcb_pad; 12421 xcb_pad = 0; 12422 } 12423 xcb_block_len = 0; 12424 /* shapes */ 12425 for(i=0; i<_aux->nShapes; i++) { 12426 xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp); 12427 xcb_block_len += xcb_tmp_len; 12428 xcb_tmp += xcb_tmp_len; 12429 } 12430 xcb_align_to = ALIGNOF(xcb_xkb_shape_t); 12431 /* insert padding */ 12432 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12433 xcb_buffer_len += xcb_block_len + xcb_pad; 12434 if (0 != xcb_pad) { 12435 xcb_tmp += xcb_pad; 12436 xcb_pad = 0; 12437 } 12438 xcb_block_len = 0; 12439 /* sections */ 12440 for(i=0; i<_aux->nSections; i++) { 12441 xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp); 12442 xcb_block_len += xcb_tmp_len; 12443 xcb_tmp += xcb_tmp_len; 12444 } 12445 xcb_align_to = ALIGNOF(xcb_xkb_section_t); 12446 /* insert padding */ 12447 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12448 xcb_buffer_len += xcb_block_len + xcb_pad; 12449 if (0 != xcb_pad) { 12450 xcb_tmp += xcb_pad; 12451 xcb_pad = 0; 12452 } 12453 xcb_block_len = 0; 12454 /* doodads */ 12455 for(i=0; i<_aux->nDoodads; i++) { 12456 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 12457 xcb_block_len += xcb_tmp_len; 12458 xcb_tmp += xcb_tmp_len; 12459 } 12460 xcb_align_to = ALIGNOF(xcb_xkb_doodad_t); 12461 /* insert padding */ 12462 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12463 xcb_buffer_len += xcb_block_len + xcb_pad; 12464 if (0 != xcb_pad) { 12465 xcb_tmp += xcb_pad; 12466 xcb_pad = 0; 12467 } 12468 xcb_block_len = 0; 12469 /* keyAliases */ 12470 xcb_block_len += _aux->nKeyAliases * sizeof(xcb_xkb_key_alias_t); 12471 xcb_tmp += xcb_block_len; 12472 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 12473 /* insert padding */ 12474 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 12475 xcb_buffer_len += xcb_block_len + xcb_pad; 12476 if (0 != xcb_pad) { 12477 xcb_tmp += xcb_pad; 12478 xcb_pad = 0; 12479 } 12480 xcb_block_len = 0; 12481 12482 return xcb_buffer_len; 12483 } 12484 12485 12486 /***************************************************************************** 12487 ** 12488 ** xcb_void_cookie_t xcb_xkb_set_geometry_checked 12489 ** 12490 ** @param xcb_connection_t *c 12491 ** @param xcb_xkb_device_spec_t deviceSpec 12492 ** @param uint8_t nShapes 12493 ** @param uint8_t nSections 12494 ** @param xcb_atom_t name 12495 ** @param uint16_t widthMM 12496 ** @param uint16_t heightMM 12497 ** @param uint16_t nProperties 12498 ** @param uint16_t nColors 12499 ** @param uint16_t nDoodads 12500 ** @param uint16_t nKeyAliases 12501 ** @param uint8_t baseColorNdx 12502 ** @param uint8_t labelColorNdx 12503 ** @param xcb_xkb_counted_string_16_t *labelFont 12504 ** @param const xcb_xkb_property_t *properties 12505 ** @param const xcb_xkb_counted_string_16_t *colors 12506 ** @param const xcb_xkb_shape_t *shapes 12507 ** @param const xcb_xkb_section_t *sections 12508 ** @param const xcb_xkb_doodad_t *doodads 12509 ** @param const xcb_xkb_key_alias_t *keyAliases 12510 ** @returns xcb_void_cookie_t 12511 ** 12512 *****************************************************************************/ 12513 12514 xcb_void_cookie_t 12515 xcb_xkb_set_geometry_checked (xcb_connection_t *c /**< */, 12516 xcb_xkb_device_spec_t deviceSpec /**< */, 12517 uint8_t nShapes /**< */, 12518 uint8_t nSections /**< */, 12519 xcb_atom_t name /**< */, 12520 uint16_t widthMM /**< */, 12521 uint16_t heightMM /**< */, 12522 uint16_t nProperties /**< */, 12523 uint16_t nColors /**< */, 12524 uint16_t nDoodads /**< */, 12525 uint16_t nKeyAliases /**< */, 12526 uint8_t baseColorNdx /**< */, 12527 uint8_t labelColorNdx /**< */, 12528 xcb_xkb_counted_string_16_t *labelFont /**< */, 12529 const xcb_xkb_property_t *properties /**< */, 12530 const xcb_xkb_counted_string_16_t *colors /**< */, 12531 const xcb_xkb_shape_t *shapes /**< */, 12532 const xcb_xkb_section_t *sections /**< */, 12533 const xcb_xkb_doodad_t *doodads /**< */, 12534 const xcb_xkb_key_alias_t *keyAliases /**< */) 12535 { 12536 static const xcb_protocol_request_t xcb_req = { 12537 /* count */ 16, 12538 /* ext */ &xcb_xkb_id, 12539 /* opcode */ XCB_XKB_SET_GEOMETRY, 12540 /* isvoid */ 1 12541 }; 12542 12543 struct iovec xcb_parts[18]; 12544 xcb_void_cookie_t xcb_ret; 12545 xcb_xkb_set_geometry_request_t xcb_out; 12546 unsigned int i; 12547 unsigned int xcb_tmp_len; 12548 char *xcb_tmp; 12549 12550 xcb_out.deviceSpec = deviceSpec; 12551 xcb_out.nShapes = nShapes; 12552 xcb_out.nSections = nSections; 12553 xcb_out.name = name; 12554 xcb_out.widthMM = widthMM; 12555 xcb_out.heightMM = heightMM; 12556 xcb_out.nProperties = nProperties; 12557 xcb_out.nColors = nColors; 12558 xcb_out.nDoodads = nDoodads; 12559 xcb_out.nKeyAliases = nKeyAliases; 12560 xcb_out.baseColorNdx = baseColorNdx; 12561 xcb_out.labelColorNdx = labelColorNdx; 12562 memset(xcb_out.pad0, 0, 2); 12563 12564 xcb_parts[2].iov_base = (char *) &xcb_out; 12565 xcb_parts[2].iov_len = sizeof(xcb_out); 12566 xcb_parts[3].iov_base = 0; 12567 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12568 /* xcb_xkb_counted_string_16_t labelFont */ 12569 xcb_parts[4].iov_base = (char *) labelFont; 12570 xcb_parts[4].iov_len = 12571 xcb_xkb_counted_string_16_sizeof (labelFont); 12572 /* xcb_xkb_property_t properties */ 12573 xcb_parts[5].iov_base = (char *) properties; 12574 xcb_parts[5].iov_len = 0; 12575 xcb_tmp = (char *)properties; 12576 for(i=0; i<nProperties; i++) { 12577 xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp); 12578 xcb_parts[5].iov_len += xcb_tmp_len; 12579 xcb_tmp += xcb_tmp_len; 12580 } 12581 xcb_parts[6].iov_base = 0; 12582 xcb_parts[6].iov_len = -xcb_parts[5].iov_len & 3; 12583 /* xcb_xkb_counted_string_16_t colors */ 12584 xcb_parts[7].iov_base = (char *) colors; 12585 xcb_parts[7].iov_len = 0; 12586 xcb_tmp = (char *)colors; 12587 for(i=0; i<nColors; i++) { 12588 xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 12589 xcb_parts[7].iov_len += xcb_tmp_len; 12590 xcb_tmp += xcb_tmp_len; 12591 } 12592 xcb_parts[8].iov_base = 0; 12593 xcb_parts[8].iov_len = -xcb_parts[7].iov_len & 3; 12594 /* xcb_xkb_shape_t shapes */ 12595 xcb_parts[9].iov_base = (char *) shapes; 12596 xcb_parts[9].iov_len = 0; 12597 xcb_tmp = (char *)shapes; 12598 for(i=0; i<nShapes; i++) { 12599 xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp); 12600 xcb_parts[9].iov_len += xcb_tmp_len; 12601 xcb_tmp += xcb_tmp_len; 12602 } 12603 xcb_parts[10].iov_base = 0; 12604 xcb_parts[10].iov_len = -xcb_parts[9].iov_len & 3; 12605 /* xcb_xkb_section_t sections */ 12606 xcb_parts[11].iov_base = (char *) sections; 12607 xcb_parts[11].iov_len = 0; 12608 xcb_tmp = (char *)sections; 12609 for(i=0; i<nSections; i++) { 12610 xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp); 12611 xcb_parts[11].iov_len += xcb_tmp_len; 12612 xcb_tmp += xcb_tmp_len; 12613 } 12614 xcb_parts[12].iov_base = 0; 12615 xcb_parts[12].iov_len = -xcb_parts[11].iov_len & 3; 12616 /* xcb_xkb_doodad_t doodads */ 12617 xcb_parts[13].iov_base = (char *) doodads; 12618 xcb_parts[13].iov_len = 0; 12619 xcb_tmp = (char *)doodads; 12620 for(i=0; i<nDoodads; i++) { 12621 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 12622 xcb_parts[13].iov_len += xcb_tmp_len; 12623 xcb_tmp += xcb_tmp_len; 12624 } 12625 xcb_parts[14].iov_base = 0; 12626 xcb_parts[14].iov_len = -xcb_parts[13].iov_len & 3; 12627 /* xcb_xkb_key_alias_t keyAliases */ 12628 xcb_parts[15].iov_base = (char *) keyAliases; 12629 xcb_parts[15].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 12630 xcb_parts[16].iov_base = 0; 12631 xcb_parts[16].iov_len = -xcb_parts[15].iov_len & 3; 12632 12633 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 12634 return xcb_ret; 12635 } 12636 12637 12638 /***************************************************************************** 12639 ** 12640 ** xcb_void_cookie_t xcb_xkb_set_geometry 12641 ** 12642 ** @param xcb_connection_t *c 12643 ** @param xcb_xkb_device_spec_t deviceSpec 12644 ** @param uint8_t nShapes 12645 ** @param uint8_t nSections 12646 ** @param xcb_atom_t name 12647 ** @param uint16_t widthMM 12648 ** @param uint16_t heightMM 12649 ** @param uint16_t nProperties 12650 ** @param uint16_t nColors 12651 ** @param uint16_t nDoodads 12652 ** @param uint16_t nKeyAliases 12653 ** @param uint8_t baseColorNdx 12654 ** @param uint8_t labelColorNdx 12655 ** @param xcb_xkb_counted_string_16_t *labelFont 12656 ** @param const xcb_xkb_property_t *properties 12657 ** @param const xcb_xkb_counted_string_16_t *colors 12658 ** @param const xcb_xkb_shape_t *shapes 12659 ** @param const xcb_xkb_section_t *sections 12660 ** @param const xcb_xkb_doodad_t *doodads 12661 ** @param const xcb_xkb_key_alias_t *keyAliases 12662 ** @returns xcb_void_cookie_t 12663 ** 12664 *****************************************************************************/ 12665 12666 xcb_void_cookie_t 12667 xcb_xkb_set_geometry (xcb_connection_t *c /**< */, 12668 xcb_xkb_device_spec_t deviceSpec /**< */, 12669 uint8_t nShapes /**< */, 12670 uint8_t nSections /**< */, 12671 xcb_atom_t name /**< */, 12672 uint16_t widthMM /**< */, 12673 uint16_t heightMM /**< */, 12674 uint16_t nProperties /**< */, 12675 uint16_t nColors /**< */, 12676 uint16_t nDoodads /**< */, 12677 uint16_t nKeyAliases /**< */, 12678 uint8_t baseColorNdx /**< */, 12679 uint8_t labelColorNdx /**< */, 12680 xcb_xkb_counted_string_16_t *labelFont /**< */, 12681 const xcb_xkb_property_t *properties /**< */, 12682 const xcb_xkb_counted_string_16_t *colors /**< */, 12683 const xcb_xkb_shape_t *shapes /**< */, 12684 const xcb_xkb_section_t *sections /**< */, 12685 const xcb_xkb_doodad_t *doodads /**< */, 12686 const xcb_xkb_key_alias_t *keyAliases /**< */) 12687 { 12688 static const xcb_protocol_request_t xcb_req = { 12689 /* count */ 16, 12690 /* ext */ &xcb_xkb_id, 12691 /* opcode */ XCB_XKB_SET_GEOMETRY, 12692 /* isvoid */ 1 12693 }; 12694 12695 struct iovec xcb_parts[18]; 12696 xcb_void_cookie_t xcb_ret; 12697 xcb_xkb_set_geometry_request_t xcb_out; 12698 unsigned int i; 12699 unsigned int xcb_tmp_len; 12700 char *xcb_tmp; 12701 12702 xcb_out.deviceSpec = deviceSpec; 12703 xcb_out.nShapes = nShapes; 12704 xcb_out.nSections = nSections; 12705 xcb_out.name = name; 12706 xcb_out.widthMM = widthMM; 12707 xcb_out.heightMM = heightMM; 12708 xcb_out.nProperties = nProperties; 12709 xcb_out.nColors = nColors; 12710 xcb_out.nDoodads = nDoodads; 12711 xcb_out.nKeyAliases = nKeyAliases; 12712 xcb_out.baseColorNdx = baseColorNdx; 12713 xcb_out.labelColorNdx = labelColorNdx; 12714 memset(xcb_out.pad0, 0, 2); 12715 12716 xcb_parts[2].iov_base = (char *) &xcb_out; 12717 xcb_parts[2].iov_len = sizeof(xcb_out); 12718 xcb_parts[3].iov_base = 0; 12719 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12720 /* xcb_xkb_counted_string_16_t labelFont */ 12721 xcb_parts[4].iov_base = (char *) labelFont; 12722 xcb_parts[4].iov_len = 12723 xcb_xkb_counted_string_16_sizeof (labelFont); 12724 /* xcb_xkb_property_t properties */ 12725 xcb_parts[5].iov_base = (char *) properties; 12726 xcb_parts[5].iov_len = 0; 12727 xcb_tmp = (char *)properties; 12728 for(i=0; i<nProperties; i++) { 12729 xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp); 12730 xcb_parts[5].iov_len += xcb_tmp_len; 12731 xcb_tmp += xcb_tmp_len; 12732 } 12733 xcb_parts[6].iov_base = 0; 12734 xcb_parts[6].iov_len = -xcb_parts[5].iov_len & 3; 12735 /* xcb_xkb_counted_string_16_t colors */ 12736 xcb_parts[7].iov_base = (char *) colors; 12737 xcb_parts[7].iov_len = 0; 12738 xcb_tmp = (char *)colors; 12739 for(i=0; i<nColors; i++) { 12740 xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 12741 xcb_parts[7].iov_len += xcb_tmp_len; 12742 xcb_tmp += xcb_tmp_len; 12743 } 12744 xcb_parts[8].iov_base = 0; 12745 xcb_parts[8].iov_len = -xcb_parts[7].iov_len & 3; 12746 /* xcb_xkb_shape_t shapes */ 12747 xcb_parts[9].iov_base = (char *) shapes; 12748 xcb_parts[9].iov_len = 0; 12749 xcb_tmp = (char *)shapes; 12750 for(i=0; i<nShapes; i++) { 12751 xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp); 12752 xcb_parts[9].iov_len += xcb_tmp_len; 12753 xcb_tmp += xcb_tmp_len; 12754 } 12755 xcb_parts[10].iov_base = 0; 12756 xcb_parts[10].iov_len = -xcb_parts[9].iov_len & 3; 12757 /* xcb_xkb_section_t sections */ 12758 xcb_parts[11].iov_base = (char *) sections; 12759 xcb_parts[11].iov_len = 0; 12760 xcb_tmp = (char *)sections; 12761 for(i=0; i<nSections; i++) { 12762 xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp); 12763 xcb_parts[11].iov_len += xcb_tmp_len; 12764 xcb_tmp += xcb_tmp_len; 12765 } 12766 xcb_parts[12].iov_base = 0; 12767 xcb_parts[12].iov_len = -xcb_parts[11].iov_len & 3; 12768 /* xcb_xkb_doodad_t doodads */ 12769 xcb_parts[13].iov_base = (char *) doodads; 12770 xcb_parts[13].iov_len = 0; 12771 xcb_tmp = (char *)doodads; 12772 for(i=0; i<nDoodads; i++) { 12773 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 12774 xcb_parts[13].iov_len += xcb_tmp_len; 12775 xcb_tmp += xcb_tmp_len; 12776 } 12777 xcb_parts[14].iov_base = 0; 12778 xcb_parts[14].iov_len = -xcb_parts[13].iov_len & 3; 12779 /* xcb_xkb_key_alias_t keyAliases */ 12780 xcb_parts[15].iov_base = (char *) keyAliases; 12781 xcb_parts[15].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 12782 xcb_parts[16].iov_base = 0; 12783 xcb_parts[16].iov_len = -xcb_parts[15].iov_len & 3; 12784 12785 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 12786 return xcb_ret; 12787 } 12788 12789 12790 /***************************************************************************** 12791 ** 12792 ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags 12793 ** 12794 ** @param xcb_connection_t *c 12795 ** @param xcb_xkb_device_spec_t deviceSpec 12796 ** @param uint32_t change 12797 ** @param uint32_t value 12798 ** @param uint32_t ctrlsToChange 12799 ** @param uint32_t autoCtrls 12800 ** @param uint32_t autoCtrlsValues 12801 ** @returns xcb_xkb_per_client_flags_cookie_t 12802 ** 12803 *****************************************************************************/ 12804 12805 xcb_xkb_per_client_flags_cookie_t 12806 xcb_xkb_per_client_flags (xcb_connection_t *c /**< */, 12807 xcb_xkb_device_spec_t deviceSpec /**< */, 12808 uint32_t change /**< */, 12809 uint32_t value /**< */, 12810 uint32_t ctrlsToChange /**< */, 12811 uint32_t autoCtrls /**< */, 12812 uint32_t autoCtrlsValues /**< */) 12813 { 12814 static const xcb_protocol_request_t xcb_req = { 12815 /* count */ 2, 12816 /* ext */ &xcb_xkb_id, 12817 /* opcode */ XCB_XKB_PER_CLIENT_FLAGS, 12818 /* isvoid */ 0 12819 }; 12820 12821 struct iovec xcb_parts[4]; 12822 xcb_xkb_per_client_flags_cookie_t xcb_ret; 12823 xcb_xkb_per_client_flags_request_t xcb_out; 12824 12825 xcb_out.deviceSpec = deviceSpec; 12826 memset(xcb_out.pad0, 0, 2); 12827 xcb_out.change = change; 12828 xcb_out.value = value; 12829 xcb_out.ctrlsToChange = ctrlsToChange; 12830 xcb_out.autoCtrls = autoCtrls; 12831 xcb_out.autoCtrlsValues = autoCtrlsValues; 12832 12833 xcb_parts[2].iov_base = (char *) &xcb_out; 12834 xcb_parts[2].iov_len = sizeof(xcb_out); 12835 xcb_parts[3].iov_base = 0; 12836 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12837 12838 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 12839 return xcb_ret; 12840 } 12841 12842 12843 /***************************************************************************** 12844 ** 12845 ** xcb_xkb_per_client_flags_cookie_t xcb_xkb_per_client_flags_unchecked 12846 ** 12847 ** @param xcb_connection_t *c 12848 ** @param xcb_xkb_device_spec_t deviceSpec 12849 ** @param uint32_t change 12850 ** @param uint32_t value 12851 ** @param uint32_t ctrlsToChange 12852 ** @param uint32_t autoCtrls 12853 ** @param uint32_t autoCtrlsValues 12854 ** @returns xcb_xkb_per_client_flags_cookie_t 12855 ** 12856 *****************************************************************************/ 12857 12858 xcb_xkb_per_client_flags_cookie_t 12859 xcb_xkb_per_client_flags_unchecked (xcb_connection_t *c /**< */, 12860 xcb_xkb_device_spec_t deviceSpec /**< */, 12861 uint32_t change /**< */, 12862 uint32_t value /**< */, 12863 uint32_t ctrlsToChange /**< */, 12864 uint32_t autoCtrls /**< */, 12865 uint32_t autoCtrlsValues /**< */) 12866 { 12867 static const xcb_protocol_request_t xcb_req = { 12868 /* count */ 2, 12869 /* ext */ &xcb_xkb_id, 12870 /* opcode */ XCB_XKB_PER_CLIENT_FLAGS, 12871 /* isvoid */ 0 12872 }; 12873 12874 struct iovec xcb_parts[4]; 12875 xcb_xkb_per_client_flags_cookie_t xcb_ret; 12876 xcb_xkb_per_client_flags_request_t xcb_out; 12877 12878 xcb_out.deviceSpec = deviceSpec; 12879 memset(xcb_out.pad0, 0, 2); 12880 xcb_out.change = change; 12881 xcb_out.value = value; 12882 xcb_out.ctrlsToChange = ctrlsToChange; 12883 xcb_out.autoCtrls = autoCtrls; 12884 xcb_out.autoCtrlsValues = autoCtrlsValues; 12885 12886 xcb_parts[2].iov_base = (char *) &xcb_out; 12887 xcb_parts[2].iov_len = sizeof(xcb_out); 12888 xcb_parts[3].iov_base = 0; 12889 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 12890 12891 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 12892 return xcb_ret; 12893 } 12894 12895 12896 /***************************************************************************** 12897 ** 12898 ** xcb_xkb_per_client_flags_reply_t * xcb_xkb_per_client_flags_reply 12899 ** 12900 ** @param xcb_connection_t *c 12901 ** @param xcb_xkb_per_client_flags_cookie_t cookie 12902 ** @param xcb_generic_error_t **e 12903 ** @returns xcb_xkb_per_client_flags_reply_t * 12904 ** 12905 *****************************************************************************/ 12906 12907 xcb_xkb_per_client_flags_reply_t * 12908 xcb_xkb_per_client_flags_reply (xcb_connection_t *c /**< */, 12909 xcb_xkb_per_client_flags_cookie_t cookie /**< */, 12910 xcb_generic_error_t **e /**< */) 12911 { 12912 return (xcb_xkb_per_client_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 12913 } 12914 12915 int 12916 xcb_xkb_list_components_serialize (void **_buffer /**< */, 12917 const xcb_xkb_list_components_request_t *_aux /**< */, 12918 const xcb_xkb_string8_t *keymapsSpec /**< */, 12919 const xcb_xkb_string8_t *keycodesSpec /**< */, 12920 const xcb_xkb_string8_t *typesSpec /**< */, 12921 const xcb_xkb_string8_t *compatMapSpec /**< */, 12922 const xcb_xkb_string8_t *symbolsSpec /**< */, 12923 const xcb_xkb_string8_t *geometrySpec /**< */) 12924 { 12925 char *xcb_out = *_buffer; 12926 unsigned int xcb_buffer_len = 0; 12927 unsigned int xcb_align_to; 12928 12929 unsigned int xcb_pad = 0; 12930 char xcb_pad0[3] = {0, 0, 0}; 12931 struct iovec xcb_parts[15]; 12932 unsigned int xcb_parts_idx = 0; 12933 unsigned int xcb_block_len = 0; 12934 unsigned int i; 12935 char *xcb_tmp; 12936 12937 /* xcb_xkb_list_components_request_t.deviceSpec */ 12938 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->deviceSpec; 12939 xcb_block_len += sizeof(xcb_xkb_device_spec_t); 12940 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_xkb_device_spec_t); 12941 xcb_parts_idx++; 12942 xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t); 12943 /* xcb_xkb_list_components_request_t.maxNames */ 12944 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->maxNames; 12945 xcb_block_len += sizeof(uint16_t); 12946 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 12947 xcb_parts_idx++; 12948 xcb_align_to = ALIGNOF(uint16_t); 12949 /* xcb_xkb_list_components_request_t.keymapsSpecLen */ 12950 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keymapsSpecLen; 12951 xcb_block_len += sizeof(uint8_t); 12952 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 12953 xcb_parts_idx++; 12954 xcb_align_to = ALIGNOF(uint8_t); 12955 /* keymapsSpec */ 12956 xcb_parts[xcb_parts_idx].iov_base = (char *) keymapsSpec; 12957 xcb_block_len += _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t); 12958 xcb_parts[xcb_parts_idx].iov_len = _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t); 12959 xcb_parts_idx++; 12960 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 12961 /* xcb_xkb_list_components_request_t.keycodesSpecLen */ 12962 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesSpecLen; 12963 xcb_block_len += sizeof(uint8_t); 12964 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 12965 xcb_parts_idx++; 12966 xcb_align_to = ALIGNOF(uint8_t); 12967 /* keycodesSpec */ 12968 xcb_parts[xcb_parts_idx].iov_base = (char *) keycodesSpec; 12969 xcb_block_len += _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t); 12970 xcb_parts[xcb_parts_idx].iov_len = _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t); 12971 xcb_parts_idx++; 12972 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 12973 /* xcb_xkb_list_components_request_t.typesSpecLen */ 12974 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesSpecLen; 12975 xcb_block_len += sizeof(uint8_t); 12976 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 12977 xcb_parts_idx++; 12978 xcb_align_to = ALIGNOF(uint8_t); 12979 /* typesSpec */ 12980 xcb_parts[xcb_parts_idx].iov_base = (char *) typesSpec; 12981 xcb_block_len += _aux->typesSpecLen * sizeof(xcb_xkb_string8_t); 12982 xcb_parts[xcb_parts_idx].iov_len = _aux->typesSpecLen * sizeof(xcb_xkb_string8_t); 12983 xcb_parts_idx++; 12984 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 12985 /* xcb_xkb_list_components_request_t.compatMapSpecLen */ 12986 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatMapSpecLen; 12987 xcb_block_len += sizeof(uint8_t); 12988 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 12989 xcb_parts_idx++; 12990 xcb_align_to = ALIGNOF(uint8_t); 12991 /* compatMapSpec */ 12992 xcb_parts[xcb_parts_idx].iov_base = (char *) compatMapSpec; 12993 xcb_block_len += _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t); 12994 xcb_parts[xcb_parts_idx].iov_len = _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t); 12995 xcb_parts_idx++; 12996 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 12997 /* xcb_xkb_list_components_request_t.symbolsSpecLen */ 12998 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsSpecLen; 12999 xcb_block_len += sizeof(uint8_t); 13000 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13001 xcb_parts_idx++; 13002 xcb_align_to = ALIGNOF(uint8_t); 13003 /* symbolsSpec */ 13004 xcb_parts[xcb_parts_idx].iov_base = (char *) symbolsSpec; 13005 xcb_block_len += _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13006 xcb_parts[xcb_parts_idx].iov_len = _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13007 xcb_parts_idx++; 13008 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13009 /* xcb_xkb_list_components_request_t.geometrySpecLen */ 13010 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometrySpecLen; 13011 xcb_block_len += sizeof(uint8_t); 13012 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13013 xcb_parts_idx++; 13014 xcb_align_to = ALIGNOF(uint8_t); 13015 /* geometrySpec */ 13016 xcb_parts[xcb_parts_idx].iov_base = (char *) geometrySpec; 13017 xcb_block_len += _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t); 13018 xcb_parts[xcb_parts_idx].iov_len = _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t); 13019 xcb_parts_idx++; 13020 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13021 /* insert padding */ 13022 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 13023 xcb_buffer_len += xcb_block_len + xcb_pad; 13024 if (0 != xcb_pad) { 13025 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 13026 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 13027 xcb_parts_idx++; 13028 xcb_pad = 0; 13029 } 13030 xcb_block_len = 0; 13031 13032 if (NULL == xcb_out) { 13033 /* allocate memory */ 13034 xcb_out = malloc(xcb_buffer_len); 13035 *_buffer = xcb_out; 13036 } 13037 13038 xcb_tmp = xcb_out; 13039 for(i=0; i<xcb_parts_idx; i++) { 13040 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 13041 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 13042 if (0 != xcb_parts[i].iov_len) 13043 xcb_tmp += xcb_parts[i].iov_len; 13044 } 13045 13046 return xcb_buffer_len; 13047 } 13048 13049 int 13050 xcb_xkb_list_components_unserialize (const void *_buffer /**< */, 13051 xcb_xkb_list_components_request_t **_aux /**< */) 13052 { 13053 char *xcb_tmp = (char *)_buffer; 13054 xcb_xkb_list_components_request_t xcb_out; 13055 unsigned int xcb_buffer_len = 0; 13056 unsigned int xcb_block_len = 0; 13057 unsigned int xcb_pad = 0; 13058 unsigned int xcb_align_to; 13059 13060 xcb_xkb_string8_t *keymapsSpec; 13061 int keymapsSpec_len; 13062 xcb_xkb_string8_t *keycodesSpec; 13063 int keycodesSpec_len; 13064 xcb_xkb_string8_t *typesSpec; 13065 int typesSpec_len; 13066 xcb_xkb_string8_t *compatMapSpec; 13067 int compatMapSpec_len; 13068 xcb_xkb_string8_t *symbolsSpec; 13069 int symbolsSpec_len; 13070 xcb_xkb_string8_t *geometrySpec; 13071 int geometrySpec_len; 13072 13073 /* xcb_xkb_list_components_request_t.major_opcode */ 13074 xcb_out.major_opcode = *(uint8_t *)xcb_tmp; 13075 xcb_block_len += sizeof(uint8_t); 13076 xcb_tmp += sizeof(uint8_t); 13077 xcb_align_to = ALIGNOF(uint8_t); 13078 /* xcb_xkb_list_components_request_t.minor_opcode */ 13079 xcb_out.minor_opcode = *(uint8_t *)xcb_tmp; 13080 xcb_block_len += sizeof(uint8_t); 13081 xcb_tmp += sizeof(uint8_t); 13082 xcb_align_to = ALIGNOF(uint8_t); 13083 /* xcb_xkb_list_components_request_t.length */ 13084 xcb_out.length = *(uint16_t *)xcb_tmp; 13085 xcb_block_len += sizeof(uint16_t); 13086 xcb_tmp += sizeof(uint16_t); 13087 xcb_align_to = ALIGNOF(uint16_t); 13088 /* xcb_xkb_list_components_request_t.deviceSpec */ 13089 xcb_out.deviceSpec = *(xcb_xkb_device_spec_t *)xcb_tmp; 13090 xcb_block_len += sizeof(xcb_xkb_device_spec_t); 13091 xcb_tmp += sizeof(xcb_xkb_device_spec_t); 13092 xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t); 13093 /* xcb_xkb_list_components_request_t.maxNames */ 13094 xcb_out.maxNames = *(uint16_t *)xcb_tmp; 13095 xcb_block_len += sizeof(uint16_t); 13096 xcb_tmp += sizeof(uint16_t); 13097 xcb_align_to = ALIGNOF(uint16_t); 13098 /* xcb_xkb_list_components_request_t.keymapsSpecLen */ 13099 xcb_out.keymapsSpecLen = *(uint8_t *)xcb_tmp; 13100 xcb_block_len += sizeof(uint8_t); 13101 xcb_tmp += sizeof(uint8_t); 13102 xcb_align_to = ALIGNOF(uint8_t); 13103 /* keymapsSpec */ 13104 keymapsSpec = (xcb_xkb_string8_t *)xcb_tmp; 13105 keymapsSpec_len = xcb_out.keymapsSpecLen * sizeof(xcb_xkb_string8_t); 13106 xcb_block_len += keymapsSpec_len; 13107 xcb_tmp += keymapsSpec_len; 13108 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13109 /* xcb_xkb_list_components_request_t.keycodesSpecLen */ 13110 xcb_out.keycodesSpecLen = *(uint8_t *)xcb_tmp; 13111 xcb_block_len += sizeof(uint8_t); 13112 xcb_tmp += sizeof(uint8_t); 13113 xcb_align_to = ALIGNOF(uint8_t); 13114 /* keycodesSpec */ 13115 keycodesSpec = (xcb_xkb_string8_t *)xcb_tmp; 13116 keycodesSpec_len = xcb_out.keycodesSpecLen * sizeof(xcb_xkb_string8_t); 13117 xcb_block_len += keycodesSpec_len; 13118 xcb_tmp += keycodesSpec_len; 13119 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13120 /* xcb_xkb_list_components_request_t.typesSpecLen */ 13121 xcb_out.typesSpecLen = *(uint8_t *)xcb_tmp; 13122 xcb_block_len += sizeof(uint8_t); 13123 xcb_tmp += sizeof(uint8_t); 13124 xcb_align_to = ALIGNOF(uint8_t); 13125 /* typesSpec */ 13126 typesSpec = (xcb_xkb_string8_t *)xcb_tmp; 13127 typesSpec_len = xcb_out.typesSpecLen * sizeof(xcb_xkb_string8_t); 13128 xcb_block_len += typesSpec_len; 13129 xcb_tmp += typesSpec_len; 13130 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13131 /* xcb_xkb_list_components_request_t.compatMapSpecLen */ 13132 xcb_out.compatMapSpecLen = *(uint8_t *)xcb_tmp; 13133 xcb_block_len += sizeof(uint8_t); 13134 xcb_tmp += sizeof(uint8_t); 13135 xcb_align_to = ALIGNOF(uint8_t); 13136 /* compatMapSpec */ 13137 compatMapSpec = (xcb_xkb_string8_t *)xcb_tmp; 13138 compatMapSpec_len = xcb_out.compatMapSpecLen * sizeof(xcb_xkb_string8_t); 13139 xcb_block_len += compatMapSpec_len; 13140 xcb_tmp += compatMapSpec_len; 13141 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13142 /* xcb_xkb_list_components_request_t.symbolsSpecLen */ 13143 xcb_out.symbolsSpecLen = *(uint8_t *)xcb_tmp; 13144 xcb_block_len += sizeof(uint8_t); 13145 xcb_tmp += sizeof(uint8_t); 13146 xcb_align_to = ALIGNOF(uint8_t); 13147 /* symbolsSpec */ 13148 symbolsSpec = (xcb_xkb_string8_t *)xcb_tmp; 13149 symbolsSpec_len = xcb_out.symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13150 xcb_block_len += symbolsSpec_len; 13151 xcb_tmp += symbolsSpec_len; 13152 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13153 /* xcb_xkb_list_components_request_t.geometrySpecLen */ 13154 xcb_out.geometrySpecLen = *(uint8_t *)xcb_tmp; 13155 xcb_block_len += sizeof(uint8_t); 13156 xcb_tmp += sizeof(uint8_t); 13157 xcb_align_to = ALIGNOF(uint8_t); 13158 /* geometrySpec */ 13159 geometrySpec = (xcb_xkb_string8_t *)xcb_tmp; 13160 geometrySpec_len = xcb_out.geometrySpecLen * sizeof(xcb_xkb_string8_t); 13161 xcb_block_len += geometrySpec_len; 13162 xcb_tmp += geometrySpec_len; 13163 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13164 /* insert padding */ 13165 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 13166 xcb_buffer_len += xcb_block_len + xcb_pad; 13167 if (0 != xcb_pad) { 13168 xcb_tmp += xcb_pad; 13169 xcb_pad = 0; 13170 } 13171 xcb_block_len = 0; 13172 13173 if (NULL == _aux) 13174 return xcb_buffer_len; 13175 13176 if (NULL == *_aux) { 13177 /* allocate memory */ 13178 *_aux = malloc(xcb_buffer_len); 13179 } 13180 13181 xcb_tmp = ((char *)*_aux)+xcb_buffer_len; 13182 xcb_tmp -= geometrySpec_len; 13183 memmove(xcb_tmp, geometrySpec, geometrySpec_len); 13184 xcb_tmp -= symbolsSpec_len; 13185 memmove(xcb_tmp, symbolsSpec, symbolsSpec_len); 13186 xcb_tmp -= compatMapSpec_len; 13187 memmove(xcb_tmp, compatMapSpec, compatMapSpec_len); 13188 xcb_tmp -= typesSpec_len; 13189 memmove(xcb_tmp, typesSpec, typesSpec_len); 13190 xcb_tmp -= keycodesSpec_len; 13191 memmove(xcb_tmp, keycodesSpec, keycodesSpec_len); 13192 xcb_tmp -= keymapsSpec_len; 13193 memmove(xcb_tmp, keymapsSpec, keymapsSpec_len); 13194 **_aux = xcb_out; 13195 13196 return xcb_buffer_len; 13197 } 13198 13199 int 13200 xcb_xkb_list_components_sizeof (const void *_buffer /**< */) 13201 { 13202 return xcb_xkb_list_components_unserialize(_buffer, NULL); 13203 } 13204 13205 13206 /***************************************************************************** 13207 ** 13208 ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components 13209 ** 13210 ** @param xcb_connection_t *c 13211 ** @param xcb_xkb_device_spec_t deviceSpec 13212 ** @param uint16_t maxNames 13213 ** @param uint8_t keymapsSpecLen 13214 ** @param const xcb_xkb_string8_t *keymapsSpec 13215 ** @param uint8_t keycodesSpecLen 13216 ** @param const xcb_xkb_string8_t *keycodesSpec 13217 ** @param uint8_t typesSpecLen 13218 ** @param const xcb_xkb_string8_t *typesSpec 13219 ** @param uint8_t compatMapSpecLen 13220 ** @param const xcb_xkb_string8_t *compatMapSpec 13221 ** @param uint8_t symbolsSpecLen 13222 ** @param const xcb_xkb_string8_t *symbolsSpec 13223 ** @param uint8_t geometrySpecLen 13224 ** @param const xcb_xkb_string8_t *geometrySpec 13225 ** @returns xcb_xkb_list_components_cookie_t 13226 ** 13227 *****************************************************************************/ 13228 13229 xcb_xkb_list_components_cookie_t 13230 xcb_xkb_list_components (xcb_connection_t *c /**< */, 13231 xcb_xkb_device_spec_t deviceSpec /**< */, 13232 uint16_t maxNames /**< */, 13233 uint8_t keymapsSpecLen /**< */, 13234 const xcb_xkb_string8_t *keymapsSpec /**< */, 13235 uint8_t keycodesSpecLen /**< */, 13236 const xcb_xkb_string8_t *keycodesSpec /**< */, 13237 uint8_t typesSpecLen /**< */, 13238 const xcb_xkb_string8_t *typesSpec /**< */, 13239 uint8_t compatMapSpecLen /**< */, 13240 const xcb_xkb_string8_t *compatMapSpec /**< */, 13241 uint8_t symbolsSpecLen /**< */, 13242 const xcb_xkb_string8_t *symbolsSpec /**< */, 13243 uint8_t geometrySpecLen /**< */, 13244 const xcb_xkb_string8_t *geometrySpec /**< */) 13245 { 13246 static const xcb_protocol_request_t xcb_req = { 13247 /* count */ 2, 13248 /* ext */ &xcb_xkb_id, 13249 /* opcode */ XCB_XKB_LIST_COMPONENTS, 13250 /* isvoid */ 0 13251 }; 13252 13253 struct iovec xcb_parts[4]; 13254 xcb_xkb_list_components_cookie_t xcb_ret; 13255 xcb_xkb_list_components_request_t xcb_out; 13256 /* in the protocol description, variable size fields are followed by fixed size fields */ 13257 void *xcb_aux = 0; 13258 13259 xcb_out.deviceSpec = deviceSpec; 13260 xcb_out.maxNames = maxNames; 13261 xcb_out.keymapsSpecLen = keymapsSpecLen; 13262 xcb_out.keycodesSpecLen = keycodesSpecLen; 13263 xcb_out.typesSpecLen = typesSpecLen; 13264 xcb_out.compatMapSpecLen = compatMapSpecLen; 13265 xcb_out.symbolsSpecLen = symbolsSpecLen; 13266 xcb_out.geometrySpecLen = geometrySpecLen; 13267 13268 xcb_parts[2].iov_base = (char *) &xcb_out; 13269 xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t); 13270 xcb_parts[3].iov_len = xcb_xkb_list_components_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec); 13271 xcb_parts[3].iov_base = (char *) xcb_aux; 13272 13273 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 13274 free(xcb_aux); 13275 return xcb_ret; 13276 } 13277 13278 13279 /***************************************************************************** 13280 ** 13281 ** xcb_xkb_list_components_cookie_t xcb_xkb_list_components_unchecked 13282 ** 13283 ** @param xcb_connection_t *c 13284 ** @param xcb_xkb_device_spec_t deviceSpec 13285 ** @param uint16_t maxNames 13286 ** @param uint8_t keymapsSpecLen 13287 ** @param const xcb_xkb_string8_t *keymapsSpec 13288 ** @param uint8_t keycodesSpecLen 13289 ** @param const xcb_xkb_string8_t *keycodesSpec 13290 ** @param uint8_t typesSpecLen 13291 ** @param const xcb_xkb_string8_t *typesSpec 13292 ** @param uint8_t compatMapSpecLen 13293 ** @param const xcb_xkb_string8_t *compatMapSpec 13294 ** @param uint8_t symbolsSpecLen 13295 ** @param const xcb_xkb_string8_t *symbolsSpec 13296 ** @param uint8_t geometrySpecLen 13297 ** @param const xcb_xkb_string8_t *geometrySpec 13298 ** @returns xcb_xkb_list_components_cookie_t 13299 ** 13300 *****************************************************************************/ 13301 13302 xcb_xkb_list_components_cookie_t 13303 xcb_xkb_list_components_unchecked (xcb_connection_t *c /**< */, 13304 xcb_xkb_device_spec_t deviceSpec /**< */, 13305 uint16_t maxNames /**< */, 13306 uint8_t keymapsSpecLen /**< */, 13307 const xcb_xkb_string8_t *keymapsSpec /**< */, 13308 uint8_t keycodesSpecLen /**< */, 13309 const xcb_xkb_string8_t *keycodesSpec /**< */, 13310 uint8_t typesSpecLen /**< */, 13311 const xcb_xkb_string8_t *typesSpec /**< */, 13312 uint8_t compatMapSpecLen /**< */, 13313 const xcb_xkb_string8_t *compatMapSpec /**< */, 13314 uint8_t symbolsSpecLen /**< */, 13315 const xcb_xkb_string8_t *symbolsSpec /**< */, 13316 uint8_t geometrySpecLen /**< */, 13317 const xcb_xkb_string8_t *geometrySpec /**< */) 13318 { 13319 static const xcb_protocol_request_t xcb_req = { 13320 /* count */ 2, 13321 /* ext */ &xcb_xkb_id, 13322 /* opcode */ XCB_XKB_LIST_COMPONENTS, 13323 /* isvoid */ 0 13324 }; 13325 13326 struct iovec xcb_parts[4]; 13327 xcb_xkb_list_components_cookie_t xcb_ret; 13328 xcb_xkb_list_components_request_t xcb_out; 13329 /* in the protocol description, variable size fields are followed by fixed size fields */ 13330 void *xcb_aux = 0; 13331 13332 xcb_out.deviceSpec = deviceSpec; 13333 xcb_out.maxNames = maxNames; 13334 xcb_out.keymapsSpecLen = keymapsSpecLen; 13335 xcb_out.keycodesSpecLen = keycodesSpecLen; 13336 xcb_out.typesSpecLen = typesSpecLen; 13337 xcb_out.compatMapSpecLen = compatMapSpecLen; 13338 xcb_out.symbolsSpecLen = symbolsSpecLen; 13339 xcb_out.geometrySpecLen = geometrySpecLen; 13340 13341 xcb_parts[2].iov_base = (char *) &xcb_out; 13342 xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t); 13343 xcb_parts[3].iov_len = xcb_xkb_list_components_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec); 13344 xcb_parts[3].iov_base = (char *) xcb_aux; 13345 13346 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 13347 free(xcb_aux); 13348 return xcb_ret; 13349 } 13350 13351 13352 /***************************************************************************** 13353 ** 13354 ** int xcb_xkb_list_components_keymaps_length 13355 ** 13356 ** @param const xcb_xkb_list_components_reply_t *R 13357 ** @returns int 13358 ** 13359 *****************************************************************************/ 13360 13361 int 13362 xcb_xkb_list_components_keymaps_length (const xcb_xkb_list_components_reply_t *R /**< */) 13363 { 13364 return R->nKeymaps; 13365 } 13366 13367 13368 /***************************************************************************** 13369 ** 13370 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keymaps_iterator 13371 ** 13372 ** @param const xcb_xkb_list_components_reply_t *R 13373 ** @returns xcb_xkb_listing_iterator_t 13374 ** 13375 *****************************************************************************/ 13376 13377 xcb_xkb_listing_iterator_t 13378 xcb_xkb_list_components_keymaps_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13379 { 13380 xcb_xkb_listing_iterator_t i; 13381 i.data = (xcb_xkb_listing_t *) (R + 1); 13382 i.rem = R->nKeymaps; 13383 i.index = (char *) i.data - (char *) R; 13384 return i; 13385 } 13386 13387 13388 /***************************************************************************** 13389 ** 13390 ** int xcb_xkb_list_components_keycodes_length 13391 ** 13392 ** @param const xcb_xkb_list_components_reply_t *R 13393 ** @returns int 13394 ** 13395 *****************************************************************************/ 13396 13397 int 13398 xcb_xkb_list_components_keycodes_length (const xcb_xkb_list_components_reply_t *R /**< */) 13399 { 13400 return R->nKeycodes; 13401 } 13402 13403 13404 /***************************************************************************** 13405 ** 13406 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_keycodes_iterator 13407 ** 13408 ** @param const xcb_xkb_list_components_reply_t *R 13409 ** @returns xcb_xkb_listing_iterator_t 13410 ** 13411 *****************************************************************************/ 13412 13413 xcb_xkb_listing_iterator_t 13414 xcb_xkb_list_components_keycodes_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13415 { 13416 xcb_xkb_listing_iterator_t i; 13417 xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keymaps_iterator(R)); 13418 i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index)); 13419 i.rem = R->nKeycodes; 13420 i.index = (char *) i.data - (char *) R; 13421 return i; 13422 } 13423 13424 13425 /***************************************************************************** 13426 ** 13427 ** int xcb_xkb_list_components_types_length 13428 ** 13429 ** @param const xcb_xkb_list_components_reply_t *R 13430 ** @returns int 13431 ** 13432 *****************************************************************************/ 13433 13434 int 13435 xcb_xkb_list_components_types_length (const xcb_xkb_list_components_reply_t *R /**< */) 13436 { 13437 return R->nTypes; 13438 } 13439 13440 13441 /***************************************************************************** 13442 ** 13443 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_types_iterator 13444 ** 13445 ** @param const xcb_xkb_list_components_reply_t *R 13446 ** @returns xcb_xkb_listing_iterator_t 13447 ** 13448 *****************************************************************************/ 13449 13450 xcb_xkb_listing_iterator_t 13451 xcb_xkb_list_components_types_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13452 { 13453 xcb_xkb_listing_iterator_t i; 13454 xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_keycodes_iterator(R)); 13455 i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index)); 13456 i.rem = R->nTypes; 13457 i.index = (char *) i.data - (char *) R; 13458 return i; 13459 } 13460 13461 13462 /***************************************************************************** 13463 ** 13464 ** int xcb_xkb_list_components_compat_maps_length 13465 ** 13466 ** @param const xcb_xkb_list_components_reply_t *R 13467 ** @returns int 13468 ** 13469 *****************************************************************************/ 13470 13471 int 13472 xcb_xkb_list_components_compat_maps_length (const xcb_xkb_list_components_reply_t *R /**< */) 13473 { 13474 return R->nCompatMaps; 13475 } 13476 13477 13478 /***************************************************************************** 13479 ** 13480 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_compat_maps_iterator 13481 ** 13482 ** @param const xcb_xkb_list_components_reply_t *R 13483 ** @returns xcb_xkb_listing_iterator_t 13484 ** 13485 *****************************************************************************/ 13486 13487 xcb_xkb_listing_iterator_t 13488 xcb_xkb_list_components_compat_maps_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13489 { 13490 xcb_xkb_listing_iterator_t i; 13491 xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_types_iterator(R)); 13492 i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index)); 13493 i.rem = R->nCompatMaps; 13494 i.index = (char *) i.data - (char *) R; 13495 return i; 13496 } 13497 13498 13499 /***************************************************************************** 13500 ** 13501 ** int xcb_xkb_list_components_symbols_length 13502 ** 13503 ** @param const xcb_xkb_list_components_reply_t *R 13504 ** @returns int 13505 ** 13506 *****************************************************************************/ 13507 13508 int 13509 xcb_xkb_list_components_symbols_length (const xcb_xkb_list_components_reply_t *R /**< */) 13510 { 13511 return R->nSymbols; 13512 } 13513 13514 13515 /***************************************************************************** 13516 ** 13517 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_symbols_iterator 13518 ** 13519 ** @param const xcb_xkb_list_components_reply_t *R 13520 ** @returns xcb_xkb_listing_iterator_t 13521 ** 13522 *****************************************************************************/ 13523 13524 xcb_xkb_listing_iterator_t 13525 xcb_xkb_list_components_symbols_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13526 { 13527 xcb_xkb_listing_iterator_t i; 13528 xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_compat_maps_iterator(R)); 13529 i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index)); 13530 i.rem = R->nSymbols; 13531 i.index = (char *) i.data - (char *) R; 13532 return i; 13533 } 13534 13535 13536 /***************************************************************************** 13537 ** 13538 ** int xcb_xkb_list_components_geometries_length 13539 ** 13540 ** @param const xcb_xkb_list_components_reply_t *R 13541 ** @returns int 13542 ** 13543 *****************************************************************************/ 13544 13545 int 13546 xcb_xkb_list_components_geometries_length (const xcb_xkb_list_components_reply_t *R /**< */) 13547 { 13548 return R->nGeometries; 13549 } 13550 13551 13552 /***************************************************************************** 13553 ** 13554 ** xcb_xkb_listing_iterator_t xcb_xkb_list_components_geometries_iterator 13555 ** 13556 ** @param const xcb_xkb_list_components_reply_t *R 13557 ** @returns xcb_xkb_listing_iterator_t 13558 ** 13559 *****************************************************************************/ 13560 13561 xcb_xkb_listing_iterator_t 13562 xcb_xkb_list_components_geometries_iterator (const xcb_xkb_list_components_reply_t *R /**< */) 13563 { 13564 xcb_xkb_listing_iterator_t i; 13565 xcb_generic_iterator_t prev = xcb_xkb_listing_end(xcb_xkb_list_components_symbols_iterator(R)); 13566 i.data = (xcb_xkb_listing_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_listing_t, prev.index)); 13567 i.rem = R->nGeometries; 13568 i.index = (char *) i.data - (char *) R; 13569 return i; 13570 } 13571 13572 13573 /***************************************************************************** 13574 ** 13575 ** xcb_xkb_list_components_reply_t * xcb_xkb_list_components_reply 13576 ** 13577 ** @param xcb_connection_t *c 13578 ** @param xcb_xkb_list_components_cookie_t cookie 13579 ** @param xcb_generic_error_t **e 13580 ** @returns xcb_xkb_list_components_reply_t * 13581 ** 13582 *****************************************************************************/ 13583 13584 xcb_xkb_list_components_reply_t * 13585 xcb_xkb_list_components_reply (xcb_connection_t *c /**< */, 13586 xcb_xkb_list_components_cookie_t cookie /**< */, 13587 xcb_generic_error_t **e /**< */) 13588 { 13589 return (xcb_xkb_list_components_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 13590 } 13591 13592 int 13593 xcb_xkb_get_kbd_by_name_serialize (void **_buffer /**< */, 13594 const xcb_xkb_get_kbd_by_name_request_t *_aux /**< */, 13595 const xcb_xkb_string8_t *keymapsSpec /**< */, 13596 const xcb_xkb_string8_t *keycodesSpec /**< */, 13597 const xcb_xkb_string8_t *typesSpec /**< */, 13598 const xcb_xkb_string8_t *compatMapSpec /**< */, 13599 const xcb_xkb_string8_t *symbolsSpec /**< */, 13600 const xcb_xkb_string8_t *geometrySpec /**< */) 13601 { 13602 char *xcb_out = *_buffer; 13603 unsigned int xcb_buffer_len = 0; 13604 unsigned int xcb_align_to; 13605 13606 unsigned int xcb_pad = 0; 13607 char xcb_pad0[3] = {0, 0, 0}; 13608 struct iovec xcb_parts[18]; 13609 unsigned int xcb_parts_idx = 0; 13610 unsigned int xcb_block_len = 0; 13611 unsigned int i; 13612 char *xcb_tmp; 13613 13614 /* xcb_xkb_get_kbd_by_name_request_t.deviceSpec */ 13615 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->deviceSpec; 13616 xcb_block_len += sizeof(xcb_xkb_device_spec_t); 13617 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_xkb_device_spec_t); 13618 xcb_parts_idx++; 13619 xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t); 13620 /* xcb_xkb_get_kbd_by_name_request_t.need */ 13621 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->need; 13622 xcb_block_len += sizeof(uint16_t); 13623 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 13624 xcb_parts_idx++; 13625 xcb_align_to = ALIGNOF(uint16_t); 13626 /* xcb_xkb_get_kbd_by_name_request_t.want */ 13627 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->want; 13628 xcb_block_len += sizeof(uint16_t); 13629 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 13630 xcb_parts_idx++; 13631 xcb_align_to = ALIGNOF(uint16_t); 13632 /* xcb_xkb_get_kbd_by_name_request_t.load */ 13633 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->load; 13634 xcb_block_len += sizeof(uint8_t); 13635 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13636 xcb_parts_idx++; 13637 xcb_align_to = ALIGNOF(uint8_t); 13638 /* xcb_xkb_get_kbd_by_name_request_t.pad0 */ 13639 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 13640 xcb_block_len += sizeof(uint8_t); 13641 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13642 xcb_parts_idx++; 13643 xcb_align_to = ALIGNOF(uint8_t); 13644 /* xcb_xkb_get_kbd_by_name_request_t.keymapsSpecLen */ 13645 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keymapsSpecLen; 13646 xcb_block_len += sizeof(uint8_t); 13647 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13648 xcb_parts_idx++; 13649 xcb_align_to = ALIGNOF(uint8_t); 13650 /* keymapsSpec */ 13651 xcb_parts[xcb_parts_idx].iov_base = (char *) keymapsSpec; 13652 xcb_block_len += _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t); 13653 xcb_parts[xcb_parts_idx].iov_len = _aux->keymapsSpecLen * sizeof(xcb_xkb_string8_t); 13654 xcb_parts_idx++; 13655 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13656 /* xcb_xkb_get_kbd_by_name_request_t.keycodesSpecLen */ 13657 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesSpecLen; 13658 xcb_block_len += sizeof(uint8_t); 13659 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13660 xcb_parts_idx++; 13661 xcb_align_to = ALIGNOF(uint8_t); 13662 /* keycodesSpec */ 13663 xcb_parts[xcb_parts_idx].iov_base = (char *) keycodesSpec; 13664 xcb_block_len += _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t); 13665 xcb_parts[xcb_parts_idx].iov_len = _aux->keycodesSpecLen * sizeof(xcb_xkb_string8_t); 13666 xcb_parts_idx++; 13667 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13668 /* xcb_xkb_get_kbd_by_name_request_t.typesSpecLen */ 13669 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesSpecLen; 13670 xcb_block_len += sizeof(uint8_t); 13671 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13672 xcb_parts_idx++; 13673 xcb_align_to = ALIGNOF(uint8_t); 13674 /* typesSpec */ 13675 xcb_parts[xcb_parts_idx].iov_base = (char *) typesSpec; 13676 xcb_block_len += _aux->typesSpecLen * sizeof(xcb_xkb_string8_t); 13677 xcb_parts[xcb_parts_idx].iov_len = _aux->typesSpecLen * sizeof(xcb_xkb_string8_t); 13678 xcb_parts_idx++; 13679 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13680 /* xcb_xkb_get_kbd_by_name_request_t.compatMapSpecLen */ 13681 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatMapSpecLen; 13682 xcb_block_len += sizeof(uint8_t); 13683 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13684 xcb_parts_idx++; 13685 xcb_align_to = ALIGNOF(uint8_t); 13686 /* compatMapSpec */ 13687 xcb_parts[xcb_parts_idx].iov_base = (char *) compatMapSpec; 13688 xcb_block_len += _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t); 13689 xcb_parts[xcb_parts_idx].iov_len = _aux->compatMapSpecLen * sizeof(xcb_xkb_string8_t); 13690 xcb_parts_idx++; 13691 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13692 /* xcb_xkb_get_kbd_by_name_request_t.symbolsSpecLen */ 13693 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsSpecLen; 13694 xcb_block_len += sizeof(uint8_t); 13695 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13696 xcb_parts_idx++; 13697 xcb_align_to = ALIGNOF(uint8_t); 13698 /* symbolsSpec */ 13699 xcb_parts[xcb_parts_idx].iov_base = (char *) symbolsSpec; 13700 xcb_block_len += _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13701 xcb_parts[xcb_parts_idx].iov_len = _aux->symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13702 xcb_parts_idx++; 13703 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13704 /* xcb_xkb_get_kbd_by_name_request_t.geometrySpecLen */ 13705 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometrySpecLen; 13706 xcb_block_len += sizeof(uint8_t); 13707 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 13708 xcb_parts_idx++; 13709 xcb_align_to = ALIGNOF(uint8_t); 13710 /* geometrySpec */ 13711 xcb_parts[xcb_parts_idx].iov_base = (char *) geometrySpec; 13712 xcb_block_len += _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t); 13713 xcb_parts[xcb_parts_idx].iov_len = _aux->geometrySpecLen * sizeof(xcb_xkb_string8_t); 13714 xcb_parts_idx++; 13715 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13716 /* insert padding */ 13717 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 13718 xcb_buffer_len += xcb_block_len + xcb_pad; 13719 if (0 != xcb_pad) { 13720 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 13721 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 13722 xcb_parts_idx++; 13723 xcb_pad = 0; 13724 } 13725 xcb_block_len = 0; 13726 13727 if (NULL == xcb_out) { 13728 /* allocate memory */ 13729 xcb_out = malloc(xcb_buffer_len); 13730 *_buffer = xcb_out; 13731 } 13732 13733 xcb_tmp = xcb_out; 13734 for(i=0; i<xcb_parts_idx; i++) { 13735 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 13736 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 13737 if (0 != xcb_parts[i].iov_len) 13738 xcb_tmp += xcb_parts[i].iov_len; 13739 } 13740 13741 return xcb_buffer_len; 13742 } 13743 13744 int 13745 xcb_xkb_get_kbd_by_name_unserialize (const void *_buffer /**< */, 13746 xcb_xkb_get_kbd_by_name_request_t **_aux /**< */) 13747 { 13748 char *xcb_tmp = (char *)_buffer; 13749 xcb_xkb_get_kbd_by_name_request_t xcb_out; 13750 unsigned int xcb_buffer_len = 0; 13751 unsigned int xcb_block_len = 0; 13752 unsigned int xcb_pad = 0; 13753 unsigned int xcb_align_to; 13754 13755 xcb_xkb_string8_t *keymapsSpec; 13756 int keymapsSpec_len; 13757 xcb_xkb_string8_t *keycodesSpec; 13758 int keycodesSpec_len; 13759 xcb_xkb_string8_t *typesSpec; 13760 int typesSpec_len; 13761 xcb_xkb_string8_t *compatMapSpec; 13762 int compatMapSpec_len; 13763 xcb_xkb_string8_t *symbolsSpec; 13764 int symbolsSpec_len; 13765 xcb_xkb_string8_t *geometrySpec; 13766 int geometrySpec_len; 13767 13768 /* xcb_xkb_get_kbd_by_name_request_t.major_opcode */ 13769 xcb_out.major_opcode = *(uint8_t *)xcb_tmp; 13770 xcb_block_len += sizeof(uint8_t); 13771 xcb_tmp += sizeof(uint8_t); 13772 xcb_align_to = ALIGNOF(uint8_t); 13773 /* xcb_xkb_get_kbd_by_name_request_t.minor_opcode */ 13774 xcb_out.minor_opcode = *(uint8_t *)xcb_tmp; 13775 xcb_block_len += sizeof(uint8_t); 13776 xcb_tmp += sizeof(uint8_t); 13777 xcb_align_to = ALIGNOF(uint8_t); 13778 /* xcb_xkb_get_kbd_by_name_request_t.length */ 13779 xcb_out.length = *(uint16_t *)xcb_tmp; 13780 xcb_block_len += sizeof(uint16_t); 13781 xcb_tmp += sizeof(uint16_t); 13782 xcb_align_to = ALIGNOF(uint16_t); 13783 /* xcb_xkb_get_kbd_by_name_request_t.deviceSpec */ 13784 xcb_out.deviceSpec = *(xcb_xkb_device_spec_t *)xcb_tmp; 13785 xcb_block_len += sizeof(xcb_xkb_device_spec_t); 13786 xcb_tmp += sizeof(xcb_xkb_device_spec_t); 13787 xcb_align_to = ALIGNOF(xcb_xkb_device_spec_t); 13788 /* xcb_xkb_get_kbd_by_name_request_t.need */ 13789 xcb_out.need = *(uint16_t *)xcb_tmp; 13790 xcb_block_len += sizeof(uint16_t); 13791 xcb_tmp += sizeof(uint16_t); 13792 xcb_align_to = ALIGNOF(uint16_t); 13793 /* xcb_xkb_get_kbd_by_name_request_t.want */ 13794 xcb_out.want = *(uint16_t *)xcb_tmp; 13795 xcb_block_len += sizeof(uint16_t); 13796 xcb_tmp += sizeof(uint16_t); 13797 xcb_align_to = ALIGNOF(uint16_t); 13798 /* xcb_xkb_get_kbd_by_name_request_t.load */ 13799 xcb_out.load = *(uint8_t *)xcb_tmp; 13800 xcb_block_len += sizeof(uint8_t); 13801 xcb_tmp += sizeof(uint8_t); 13802 xcb_align_to = ALIGNOF(uint8_t); 13803 /* xcb_xkb_get_kbd_by_name_request_t.pad0 */ 13804 xcb_out.pad0 = *(uint8_t *)xcb_tmp; 13805 xcb_block_len += sizeof(uint8_t); 13806 xcb_tmp += sizeof(uint8_t); 13807 xcb_align_to = ALIGNOF(uint8_t); 13808 /* xcb_xkb_get_kbd_by_name_request_t.keymapsSpecLen */ 13809 xcb_out.keymapsSpecLen = *(uint8_t *)xcb_tmp; 13810 xcb_block_len += sizeof(uint8_t); 13811 xcb_tmp += sizeof(uint8_t); 13812 xcb_align_to = ALIGNOF(uint8_t); 13813 /* keymapsSpec */ 13814 keymapsSpec = (xcb_xkb_string8_t *)xcb_tmp; 13815 keymapsSpec_len = xcb_out.keymapsSpecLen * sizeof(xcb_xkb_string8_t); 13816 xcb_block_len += keymapsSpec_len; 13817 xcb_tmp += keymapsSpec_len; 13818 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13819 /* xcb_xkb_get_kbd_by_name_request_t.keycodesSpecLen */ 13820 xcb_out.keycodesSpecLen = *(uint8_t *)xcb_tmp; 13821 xcb_block_len += sizeof(uint8_t); 13822 xcb_tmp += sizeof(uint8_t); 13823 xcb_align_to = ALIGNOF(uint8_t); 13824 /* keycodesSpec */ 13825 keycodesSpec = (xcb_xkb_string8_t *)xcb_tmp; 13826 keycodesSpec_len = xcb_out.keycodesSpecLen * sizeof(xcb_xkb_string8_t); 13827 xcb_block_len += keycodesSpec_len; 13828 xcb_tmp += keycodesSpec_len; 13829 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13830 /* xcb_xkb_get_kbd_by_name_request_t.typesSpecLen */ 13831 xcb_out.typesSpecLen = *(uint8_t *)xcb_tmp; 13832 xcb_block_len += sizeof(uint8_t); 13833 xcb_tmp += sizeof(uint8_t); 13834 xcb_align_to = ALIGNOF(uint8_t); 13835 /* typesSpec */ 13836 typesSpec = (xcb_xkb_string8_t *)xcb_tmp; 13837 typesSpec_len = xcb_out.typesSpecLen * sizeof(xcb_xkb_string8_t); 13838 xcb_block_len += typesSpec_len; 13839 xcb_tmp += typesSpec_len; 13840 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13841 /* xcb_xkb_get_kbd_by_name_request_t.compatMapSpecLen */ 13842 xcb_out.compatMapSpecLen = *(uint8_t *)xcb_tmp; 13843 xcb_block_len += sizeof(uint8_t); 13844 xcb_tmp += sizeof(uint8_t); 13845 xcb_align_to = ALIGNOF(uint8_t); 13846 /* compatMapSpec */ 13847 compatMapSpec = (xcb_xkb_string8_t *)xcb_tmp; 13848 compatMapSpec_len = xcb_out.compatMapSpecLen * sizeof(xcb_xkb_string8_t); 13849 xcb_block_len += compatMapSpec_len; 13850 xcb_tmp += compatMapSpec_len; 13851 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13852 /* xcb_xkb_get_kbd_by_name_request_t.symbolsSpecLen */ 13853 xcb_out.symbolsSpecLen = *(uint8_t *)xcb_tmp; 13854 xcb_block_len += sizeof(uint8_t); 13855 xcb_tmp += sizeof(uint8_t); 13856 xcb_align_to = ALIGNOF(uint8_t); 13857 /* symbolsSpec */ 13858 symbolsSpec = (xcb_xkb_string8_t *)xcb_tmp; 13859 symbolsSpec_len = xcb_out.symbolsSpecLen * sizeof(xcb_xkb_string8_t); 13860 xcb_block_len += symbolsSpec_len; 13861 xcb_tmp += symbolsSpec_len; 13862 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13863 /* xcb_xkb_get_kbd_by_name_request_t.geometrySpecLen */ 13864 xcb_out.geometrySpecLen = *(uint8_t *)xcb_tmp; 13865 xcb_block_len += sizeof(uint8_t); 13866 xcb_tmp += sizeof(uint8_t); 13867 xcb_align_to = ALIGNOF(uint8_t); 13868 /* geometrySpec */ 13869 geometrySpec = (xcb_xkb_string8_t *)xcb_tmp; 13870 geometrySpec_len = xcb_out.geometrySpecLen * sizeof(xcb_xkb_string8_t); 13871 xcb_block_len += geometrySpec_len; 13872 xcb_tmp += geometrySpec_len; 13873 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 13874 /* insert padding */ 13875 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 13876 xcb_buffer_len += xcb_block_len + xcb_pad; 13877 if (0 != xcb_pad) { 13878 xcb_tmp += xcb_pad; 13879 xcb_pad = 0; 13880 } 13881 xcb_block_len = 0; 13882 13883 if (NULL == _aux) 13884 return xcb_buffer_len; 13885 13886 if (NULL == *_aux) { 13887 /* allocate memory */ 13888 *_aux = malloc(xcb_buffer_len); 13889 } 13890 13891 xcb_tmp = ((char *)*_aux)+xcb_buffer_len; 13892 xcb_tmp -= geometrySpec_len; 13893 memmove(xcb_tmp, geometrySpec, geometrySpec_len); 13894 xcb_tmp -= symbolsSpec_len; 13895 memmove(xcb_tmp, symbolsSpec, symbolsSpec_len); 13896 xcb_tmp -= compatMapSpec_len; 13897 memmove(xcb_tmp, compatMapSpec, compatMapSpec_len); 13898 xcb_tmp -= typesSpec_len; 13899 memmove(xcb_tmp, typesSpec, typesSpec_len); 13900 xcb_tmp -= keycodesSpec_len; 13901 memmove(xcb_tmp, keycodesSpec, keycodesSpec_len); 13902 xcb_tmp -= keymapsSpec_len; 13903 memmove(xcb_tmp, keymapsSpec, keymapsSpec_len); 13904 **_aux = xcb_out; 13905 13906 return xcb_buffer_len; 13907 } 13908 13909 int 13910 xcb_xkb_get_kbd_by_name_sizeof (const void *_buffer /**< */) 13911 { 13912 return xcb_xkb_get_kbd_by_name_unserialize(_buffer, NULL); 13913 } 13914 13915 13916 /***************************************************************************** 13917 ** 13918 ** int xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length 13919 ** 13920 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 13921 ** @returns int 13922 ** 13923 *****************************************************************************/ 13924 13925 int 13926 xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 13927 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 13928 { 13929 return /* replies */ S->types.nTypes; 13930 } 13931 13932 13933 /***************************************************************************** 13934 ** 13935 ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator 13936 ** 13937 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 13938 ** @returns xcb_xkb_key_type_iterator_t 13939 ** 13940 *****************************************************************************/ 13941 13942 xcb_xkb_key_type_iterator_t 13943 xcb_xkb_get_kbd_by_name_replies_types_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 13944 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 13945 { 13946 xcb_xkb_key_type_iterator_t i; 13947 i.data = /* replies */ S->types.map.types_rtrn; 13948 i.rem = /* replies */ S->types.nTypes; 13949 i.index = (char *) i.data - (char *) S; 13950 return i; 13951 } 13952 13953 13954 /***************************************************************************** 13955 ** 13956 ** int xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length 13957 ** 13958 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 13959 ** @returns int 13960 ** 13961 *****************************************************************************/ 13962 13963 int 13964 xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 13965 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 13966 { 13967 return /* replies */ S->types.nKeySyms; 13968 } 13969 13970 13971 /***************************************************************************** 13972 ** 13973 ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator 13974 ** 13975 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 13976 ** @returns xcb_xkb_key_sym_map_iterator_t 13977 ** 13978 *****************************************************************************/ 13979 13980 xcb_xkb_key_sym_map_iterator_t 13981 xcb_xkb_get_kbd_by_name_replies_types_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 13982 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 13983 { 13984 xcb_xkb_key_sym_map_iterator_t i; 13985 i.data = /* replies */ S->types.map.syms_rtrn; 13986 i.rem = /* replies */ S->types.nKeySyms; 13987 i.index = (char *) i.data - (char *) S; 13988 return i; 13989 } 13990 13991 13992 /***************************************************************************** 13993 ** 13994 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count 13995 ** 13996 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 13997 ** @returns uint8_t * 13998 ** 13999 *****************************************************************************/ 14000 14001 uint8_t * 14002 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14003 { 14004 return /* replies */ S->types.map.acts_rtrn_count; 14005 } 14006 14007 14008 /***************************************************************************** 14009 ** 14010 ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length 14011 ** 14012 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14013 ** @returns int 14014 ** 14015 *****************************************************************************/ 14016 14017 int 14018 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14019 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14020 { 14021 return /* replies */ S->types.nKeyActions; 14022 } 14023 14024 14025 /***************************************************************************** 14026 ** 14027 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end 14028 ** 14029 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14030 ** @returns xcb_generic_iterator_t 14031 ** 14032 *****************************************************************************/ 14033 14034 xcb_generic_iterator_t 14035 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14036 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14037 { 14038 xcb_generic_iterator_t i; 14039 i.data = /* replies */ S->types.map.acts_rtrn_count + /* replies */ S->types.nKeyActions; 14040 i.rem = 0; 14041 i.index = (char *) i.data - (char *) S; 14042 return i; 14043 } 14044 14045 14046 /***************************************************************************** 14047 ** 14048 ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts 14049 ** 14050 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14051 ** @returns xcb_xkb_action_t * 14052 ** 14053 *****************************************************************************/ 14054 14055 xcb_xkb_action_t * 14056 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14057 { 14058 return /* replies */ S->types.map.acts_rtrn_acts; 14059 } 14060 14061 14062 /***************************************************************************** 14063 ** 14064 ** int xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length 14065 ** 14066 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14067 ** @returns int 14068 ** 14069 *****************************************************************************/ 14070 14071 int 14072 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14073 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14074 { 14075 return /* replies */ S->types.totalActions; 14076 } 14077 14078 14079 /***************************************************************************** 14080 ** 14081 ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator 14082 ** 14083 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14084 ** @returns xcb_xkb_action_iterator_t 14085 ** 14086 *****************************************************************************/ 14087 14088 xcb_xkb_action_iterator_t 14089 xcb_xkb_get_kbd_by_name_replies_types_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14090 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14091 { 14092 xcb_xkb_action_iterator_t i; 14093 i.data = /* replies */ S->types.map.acts_rtrn_acts; 14094 i.rem = /* replies */ S->types.totalActions; 14095 i.index = (char *) i.data - (char *) S; 14096 return i; 14097 } 14098 14099 14100 /***************************************************************************** 14101 ** 14102 ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn 14103 ** 14104 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14105 ** @returns xcb_xkb_set_behavior_t * 14106 ** 14107 *****************************************************************************/ 14108 14109 xcb_xkb_set_behavior_t * 14110 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14111 { 14112 return /* replies */ S->types.map.behaviors_rtrn; 14113 } 14114 14115 14116 /***************************************************************************** 14117 ** 14118 ** int xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length 14119 ** 14120 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14121 ** @returns int 14122 ** 14123 *****************************************************************************/ 14124 14125 int 14126 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14127 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14128 { 14129 return /* replies */ S->types.totalKeyBehaviors; 14130 } 14131 14132 14133 /***************************************************************************** 14134 ** 14135 ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator 14136 ** 14137 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14138 ** @returns xcb_xkb_set_behavior_iterator_t 14139 ** 14140 *****************************************************************************/ 14141 14142 xcb_xkb_set_behavior_iterator_t 14143 xcb_xkb_get_kbd_by_name_replies_types_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14144 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14145 { 14146 xcb_xkb_set_behavior_iterator_t i; 14147 i.data = /* replies */ S->types.map.behaviors_rtrn; 14148 i.rem = /* replies */ S->types.totalKeyBehaviors; 14149 i.index = (char *) i.data - (char *) S; 14150 return i; 14151 } 14152 14153 14154 /***************************************************************************** 14155 ** 14156 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn 14157 ** 14158 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14159 ** @returns uint8_t * 14160 ** 14161 *****************************************************************************/ 14162 14163 uint8_t * 14164 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14165 { 14166 return /* replies */ S->types.map.vmods_rtrn; 14167 } 14168 14169 14170 /***************************************************************************** 14171 ** 14172 ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length 14173 ** 14174 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14175 ** @returns int 14176 ** 14177 *****************************************************************************/ 14178 14179 int 14180 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14181 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14182 { 14183 return /* replies */ S->types.nVModMapKeys; 14184 } 14185 14186 14187 /***************************************************************************** 14188 ** 14189 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end 14190 ** 14191 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14192 ** @returns xcb_generic_iterator_t 14193 ** 14194 *****************************************************************************/ 14195 14196 xcb_generic_iterator_t 14197 xcb_xkb_get_kbd_by_name_replies_types_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14198 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14199 { 14200 xcb_generic_iterator_t i; 14201 i.data = /* replies */ S->types.map.vmods_rtrn + /* replies */ S->types.nVModMapKeys; 14202 i.rem = 0; 14203 i.index = (char *) i.data - (char *) S; 14204 return i; 14205 } 14206 14207 14208 /***************************************************************************** 14209 ** 14210 ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn 14211 ** 14212 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14213 ** @returns xcb_xkb_set_explicit_t * 14214 ** 14215 *****************************************************************************/ 14216 14217 xcb_xkb_set_explicit_t * 14218 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14219 { 14220 return /* replies */ S->types.map.explicit_rtrn; 14221 } 14222 14223 14224 /***************************************************************************** 14225 ** 14226 ** int xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length 14227 ** 14228 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14229 ** @returns int 14230 ** 14231 *****************************************************************************/ 14232 14233 int 14234 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14235 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14236 { 14237 return /* replies */ S->types.totalKeyExplicit; 14238 } 14239 14240 14241 /***************************************************************************** 14242 ** 14243 ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator 14244 ** 14245 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14246 ** @returns xcb_xkb_set_explicit_iterator_t 14247 ** 14248 *****************************************************************************/ 14249 14250 xcb_xkb_set_explicit_iterator_t 14251 xcb_xkb_get_kbd_by_name_replies_types_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14252 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14253 { 14254 xcb_xkb_set_explicit_iterator_t i; 14255 i.data = /* replies */ S->types.map.explicit_rtrn; 14256 i.rem = /* replies */ S->types.totalKeyExplicit; 14257 i.index = (char *) i.data - (char *) S; 14258 return i; 14259 } 14260 14261 14262 /***************************************************************************** 14263 ** 14264 ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn 14265 ** 14266 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14267 ** @returns xcb_xkb_key_mod_map_t * 14268 ** 14269 *****************************************************************************/ 14270 14271 xcb_xkb_key_mod_map_t * 14272 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14273 { 14274 return /* replies */ S->types.map.modmap_rtrn; 14275 } 14276 14277 14278 /***************************************************************************** 14279 ** 14280 ** int xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length 14281 ** 14282 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14283 ** @returns int 14284 ** 14285 *****************************************************************************/ 14286 14287 int 14288 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14289 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14290 { 14291 return /* replies */ S->types.totalModMapKeys; 14292 } 14293 14294 14295 /***************************************************************************** 14296 ** 14297 ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator 14298 ** 14299 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14300 ** @returns xcb_xkb_key_mod_map_iterator_t 14301 ** 14302 *****************************************************************************/ 14303 14304 xcb_xkb_key_mod_map_iterator_t 14305 xcb_xkb_get_kbd_by_name_replies_types_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14306 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14307 { 14308 xcb_xkb_key_mod_map_iterator_t i; 14309 i.data = /* replies */ S->types.map.modmap_rtrn; 14310 i.rem = /* replies */ S->types.totalModMapKeys; 14311 i.index = (char *) i.data - (char *) S; 14312 return i; 14313 } 14314 14315 14316 /***************************************************************************** 14317 ** 14318 ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn 14319 ** 14320 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14321 ** @returns xcb_xkb_key_v_mod_map_t * 14322 ** 14323 *****************************************************************************/ 14324 14325 xcb_xkb_key_v_mod_map_t * 14326 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14327 { 14328 return /* replies */ S->types.map.vmodmap_rtrn; 14329 } 14330 14331 14332 /***************************************************************************** 14333 ** 14334 ** int xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length 14335 ** 14336 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14337 ** @returns int 14338 ** 14339 *****************************************************************************/ 14340 14341 int 14342 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14343 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14344 { 14345 return /* replies */ S->types.totalVModMapKeys; 14346 } 14347 14348 14349 /***************************************************************************** 14350 ** 14351 ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator 14352 ** 14353 ** @param const xcb_xkb_get_kbd_by_name_replies_types_map_t *R 14354 ** @returns xcb_xkb_key_v_mod_map_iterator_t 14355 ** 14356 *****************************************************************************/ 14357 14358 xcb_xkb_key_v_mod_map_iterator_t 14359 xcb_xkb_get_kbd_by_name_replies_types_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14360 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14361 { 14362 xcb_xkb_key_v_mod_map_iterator_t i; 14363 i.data = /* replies */ S->types.map.vmodmap_rtrn; 14364 i.rem = /* replies */ S->types.totalVModMapKeys; 14365 i.index = (char *) i.data - (char *) S; 14366 return i; 14367 } 14368 14369 int 14370 xcb_xkb_get_kbd_by_name_replies_types_map_serialize (void **_buffer /**< */, 14371 uint8_t nTypes /**< */, 14372 uint8_t nKeySyms /**< */, 14373 uint8_t nKeyActions /**< */, 14374 uint16_t totalActions /**< */, 14375 uint8_t totalKeyBehaviors /**< */, 14376 uint8_t nVModMapKeys /**< */, 14377 uint8_t totalKeyExplicit /**< */, 14378 uint8_t totalModMapKeys /**< */, 14379 uint8_t totalVModMapKeys /**< */, 14380 uint16_t present /**< */, 14381 const xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */) 14382 { 14383 char *xcb_out = *_buffer; 14384 unsigned int xcb_buffer_len = 0; 14385 unsigned int xcb_align_to; 14386 14387 unsigned int xcb_pad = 0; 14388 char xcb_pad0[3] = {0, 0, 0}; 14389 struct iovec xcb_parts[19]; 14390 unsigned int xcb_parts_idx = 0; 14391 unsigned int xcb_block_len = 0; 14392 unsigned int i; 14393 char *xcb_tmp; 14394 14395 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 14396 /* insert padding */ 14397 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14398 xcb_buffer_len += xcb_block_len + xcb_pad; 14399 if (0 != xcb_pad) { 14400 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14401 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14402 xcb_parts_idx++; 14403 xcb_pad = 0; 14404 } 14405 xcb_block_len = 0; 14406 /* types_rtrn */ 14407 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn; 14408 xcb_parts[xcb_parts_idx].iov_len = 0; 14409 xcb_tmp = (char *) _aux->types_rtrn; 14410 for(i=0; i<nTypes; i++) { 14411 xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp); 14412 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 14413 } 14414 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 14415 xcb_parts_idx++; 14416 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 14417 } 14418 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 14419 /* insert padding */ 14420 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14421 xcb_buffer_len += xcb_block_len + xcb_pad; 14422 if (0 != xcb_pad) { 14423 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14424 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14425 xcb_parts_idx++; 14426 xcb_pad = 0; 14427 } 14428 xcb_block_len = 0; 14429 /* syms_rtrn */ 14430 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn; 14431 xcb_parts[xcb_parts_idx].iov_len = 0; 14432 xcb_tmp = (char *) _aux->syms_rtrn; 14433 for(i=0; i<nKeySyms; i++) { 14434 xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 14435 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 14436 } 14437 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 14438 xcb_parts_idx++; 14439 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 14440 } 14441 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 14442 /* insert padding */ 14443 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14444 xcb_buffer_len += xcb_block_len + xcb_pad; 14445 if (0 != xcb_pad) { 14446 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14447 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14448 xcb_parts_idx++; 14449 xcb_pad = 0; 14450 } 14451 xcb_block_len = 0; 14452 /* acts_rtrn_count */ 14453 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count; 14454 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 14455 xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t); 14456 xcb_parts_idx++; 14457 xcb_align_to = ALIGNOF(uint8_t); 14458 /* insert padding */ 14459 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14460 xcb_buffer_len += xcb_block_len + xcb_pad; 14461 if (0 != xcb_pad) { 14462 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14463 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14464 xcb_parts_idx++; 14465 xcb_pad = 0; 14466 } 14467 xcb_block_len = 0; 14468 /* acts_rtrn_acts */ 14469 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts; 14470 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 14471 xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t); 14472 xcb_parts_idx++; 14473 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 14474 } 14475 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 14476 /* insert padding */ 14477 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14478 xcb_buffer_len += xcb_block_len + xcb_pad; 14479 if (0 != xcb_pad) { 14480 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14481 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14482 xcb_parts_idx++; 14483 xcb_pad = 0; 14484 } 14485 xcb_block_len = 0; 14486 /* behaviors_rtrn */ 14487 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn; 14488 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 14489 xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 14490 xcb_parts_idx++; 14491 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 14492 } 14493 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 14494 /* insert padding */ 14495 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14496 xcb_buffer_len += xcb_block_len + xcb_pad; 14497 if (0 != xcb_pad) { 14498 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14499 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14500 xcb_parts_idx++; 14501 xcb_pad = 0; 14502 } 14503 xcb_block_len = 0; 14504 /* vmods_rtrn */ 14505 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn; 14506 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 14507 xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t); 14508 xcb_parts_idx++; 14509 xcb_align_to = ALIGNOF(uint8_t); 14510 } 14511 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 14512 /* insert padding */ 14513 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14514 xcb_buffer_len += xcb_block_len + xcb_pad; 14515 if (0 != xcb_pad) { 14516 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14517 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14518 xcb_parts_idx++; 14519 xcb_pad = 0; 14520 } 14521 xcb_block_len = 0; 14522 /* explicit_rtrn */ 14523 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn; 14524 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 14525 xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 14526 xcb_parts_idx++; 14527 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 14528 } 14529 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 14530 /* insert padding */ 14531 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14532 xcb_buffer_len += xcb_block_len + xcb_pad; 14533 if (0 != xcb_pad) { 14534 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14535 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14536 xcb_parts_idx++; 14537 xcb_pad = 0; 14538 } 14539 xcb_block_len = 0; 14540 /* modmap_rtrn */ 14541 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn; 14542 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 14543 xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 14544 xcb_parts_idx++; 14545 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 14546 } 14547 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 14548 /* insert padding */ 14549 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14550 xcb_buffer_len += xcb_block_len + xcb_pad; 14551 if (0 != xcb_pad) { 14552 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14553 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14554 xcb_parts_idx++; 14555 xcb_pad = 0; 14556 } 14557 xcb_block_len = 0; 14558 /* vmodmap_rtrn */ 14559 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn; 14560 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 14561 xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 14562 xcb_parts_idx++; 14563 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 14564 } 14565 /* insert padding */ 14566 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14567 xcb_buffer_len += xcb_block_len + xcb_pad; 14568 if (0 != xcb_pad) { 14569 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 14570 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 14571 xcb_parts_idx++; 14572 xcb_pad = 0; 14573 } 14574 xcb_block_len = 0; 14575 14576 if (NULL == xcb_out) { 14577 /* allocate memory */ 14578 xcb_out = malloc(xcb_buffer_len); 14579 *_buffer = xcb_out; 14580 } 14581 14582 xcb_tmp = xcb_out; 14583 for(i=0; i<xcb_parts_idx; i++) { 14584 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 14585 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 14586 if (0 != xcb_parts[i].iov_len) 14587 xcb_tmp += xcb_parts[i].iov_len; 14588 } 14589 14590 return xcb_buffer_len; 14591 } 14592 14593 int 14594 xcb_xkb_get_kbd_by_name_replies_types_map_unpack (const void *_buffer /**< */, 14595 uint8_t nTypes /**< */, 14596 uint8_t nKeySyms /**< */, 14597 uint8_t nKeyActions /**< */, 14598 uint16_t totalActions /**< */, 14599 uint8_t totalKeyBehaviors /**< */, 14600 uint8_t nVModMapKeys /**< */, 14601 uint8_t totalKeyExplicit /**< */, 14602 uint8_t totalModMapKeys /**< */, 14603 uint8_t totalVModMapKeys /**< */, 14604 uint16_t present /**< */, 14605 xcb_xkb_get_kbd_by_name_replies_types_map_t *_aux /**< */) 14606 { 14607 char *xcb_tmp = (char *)_buffer; 14608 unsigned int xcb_buffer_len = 0; 14609 unsigned int xcb_block_len = 0; 14610 unsigned int xcb_pad = 0; 14611 unsigned int xcb_align_to; 14612 14613 unsigned int i; 14614 unsigned int xcb_tmp_len; 14615 14616 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 14617 /* insert padding */ 14618 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14619 xcb_buffer_len += xcb_block_len + xcb_pad; 14620 if (0 != xcb_pad) { 14621 xcb_tmp += xcb_pad; 14622 xcb_pad = 0; 14623 } 14624 xcb_block_len = 0; 14625 /* types_rtrn */ 14626 _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp; 14627 for(i=0; i<nTypes; i++) { 14628 xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp); 14629 xcb_block_len += xcb_tmp_len; 14630 xcb_tmp += xcb_tmp_len; 14631 } 14632 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 14633 } 14634 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 14635 /* insert padding */ 14636 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14637 xcb_buffer_len += xcb_block_len + xcb_pad; 14638 if (0 != xcb_pad) { 14639 xcb_tmp += xcb_pad; 14640 xcb_pad = 0; 14641 } 14642 xcb_block_len = 0; 14643 /* syms_rtrn */ 14644 _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp; 14645 for(i=0; i<nKeySyms; i++) { 14646 xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 14647 xcb_block_len += xcb_tmp_len; 14648 xcb_tmp += xcb_tmp_len; 14649 } 14650 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 14651 } 14652 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 14653 /* insert padding */ 14654 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14655 xcb_buffer_len += xcb_block_len + xcb_pad; 14656 if (0 != xcb_pad) { 14657 xcb_tmp += xcb_pad; 14658 xcb_pad = 0; 14659 } 14660 xcb_block_len = 0; 14661 /* acts_rtrn_count */ 14662 _aux->acts_rtrn_count = (uint8_t *)xcb_tmp; 14663 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 14664 xcb_tmp += xcb_block_len; 14665 xcb_align_to = ALIGNOF(uint8_t); 14666 /* insert padding */ 14667 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14668 xcb_buffer_len += xcb_block_len + xcb_pad; 14669 if (0 != xcb_pad) { 14670 xcb_tmp += xcb_pad; 14671 xcb_pad = 0; 14672 } 14673 xcb_block_len = 0; 14674 /* acts_rtrn_acts */ 14675 _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp; 14676 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 14677 xcb_tmp += xcb_block_len; 14678 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 14679 } 14680 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 14681 /* insert padding */ 14682 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14683 xcb_buffer_len += xcb_block_len + xcb_pad; 14684 if (0 != xcb_pad) { 14685 xcb_tmp += xcb_pad; 14686 xcb_pad = 0; 14687 } 14688 xcb_block_len = 0; 14689 /* behaviors_rtrn */ 14690 _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp; 14691 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 14692 xcb_tmp += xcb_block_len; 14693 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 14694 } 14695 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 14696 /* insert padding */ 14697 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14698 xcb_buffer_len += xcb_block_len + xcb_pad; 14699 if (0 != xcb_pad) { 14700 xcb_tmp += xcb_pad; 14701 xcb_pad = 0; 14702 } 14703 xcb_block_len = 0; 14704 /* vmods_rtrn */ 14705 _aux->vmods_rtrn = (uint8_t *)xcb_tmp; 14706 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 14707 xcb_tmp += xcb_block_len; 14708 xcb_align_to = ALIGNOF(uint8_t); 14709 } 14710 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 14711 /* insert padding */ 14712 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14713 xcb_buffer_len += xcb_block_len + xcb_pad; 14714 if (0 != xcb_pad) { 14715 xcb_tmp += xcb_pad; 14716 xcb_pad = 0; 14717 } 14718 xcb_block_len = 0; 14719 /* explicit_rtrn */ 14720 _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp; 14721 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 14722 xcb_tmp += xcb_block_len; 14723 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 14724 } 14725 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 14726 /* insert padding */ 14727 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14728 xcb_buffer_len += xcb_block_len + xcb_pad; 14729 if (0 != xcb_pad) { 14730 xcb_tmp += xcb_pad; 14731 xcb_pad = 0; 14732 } 14733 xcb_block_len = 0; 14734 /* modmap_rtrn */ 14735 _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp; 14736 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 14737 xcb_tmp += xcb_block_len; 14738 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 14739 } 14740 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 14741 /* insert padding */ 14742 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14743 xcb_buffer_len += xcb_block_len + xcb_pad; 14744 if (0 != xcb_pad) { 14745 xcb_tmp += xcb_pad; 14746 xcb_pad = 0; 14747 } 14748 xcb_block_len = 0; 14749 /* vmodmap_rtrn */ 14750 _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp; 14751 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 14752 xcb_tmp += xcb_block_len; 14753 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 14754 } 14755 /* insert padding */ 14756 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 14757 xcb_buffer_len += xcb_block_len + xcb_pad; 14758 if (0 != xcb_pad) { 14759 xcb_tmp += xcb_pad; 14760 xcb_pad = 0; 14761 } 14762 xcb_block_len = 0; 14763 14764 return xcb_buffer_len; 14765 } 14766 14767 int 14768 xcb_xkb_get_kbd_by_name_replies_types_map_sizeof (const void *_buffer /**< */, 14769 uint8_t nTypes /**< */, 14770 uint8_t nKeySyms /**< */, 14771 uint8_t nKeyActions /**< */, 14772 uint16_t totalActions /**< */, 14773 uint8_t totalKeyBehaviors /**< */, 14774 uint8_t nVModMapKeys /**< */, 14775 uint8_t totalKeyExplicit /**< */, 14776 uint8_t totalModMapKeys /**< */, 14777 uint8_t totalVModMapKeys /**< */, 14778 uint16_t present /**< */) 14779 { 14780 xcb_xkb_get_kbd_by_name_replies_types_map_t _aux; 14781 return xcb_xkb_get_kbd_by_name_replies_types_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux); 14782 } 14783 14784 14785 /***************************************************************************** 14786 ** 14787 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length 14788 ** 14789 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14790 ** @returns int 14791 ** 14792 *****************************************************************************/ 14793 14794 int 14795 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14796 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14797 { 14798 return /* replies */ S->client_symbols.nTypes; 14799 } 14800 14801 14802 /***************************************************************************** 14803 ** 14804 ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator 14805 ** 14806 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14807 ** @returns xcb_xkb_key_type_iterator_t 14808 ** 14809 *****************************************************************************/ 14810 14811 xcb_xkb_key_type_iterator_t 14812 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14813 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14814 { 14815 xcb_xkb_key_type_iterator_t i; 14816 i.data = /* replies */ S->client_symbols.map.types_rtrn; 14817 i.rem = /* replies */ S->client_symbols.nTypes; 14818 i.index = (char *) i.data - (char *) S; 14819 return i; 14820 } 14821 14822 14823 /***************************************************************************** 14824 ** 14825 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length 14826 ** 14827 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14828 ** @returns int 14829 ** 14830 *****************************************************************************/ 14831 14832 int 14833 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14834 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14835 { 14836 return /* replies */ S->client_symbols.nKeySyms; 14837 } 14838 14839 14840 /***************************************************************************** 14841 ** 14842 ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator 14843 ** 14844 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14845 ** @returns xcb_xkb_key_sym_map_iterator_t 14846 ** 14847 *****************************************************************************/ 14848 14849 xcb_xkb_key_sym_map_iterator_t 14850 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14851 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14852 { 14853 xcb_xkb_key_sym_map_iterator_t i; 14854 i.data = /* replies */ S->client_symbols.map.syms_rtrn; 14855 i.rem = /* replies */ S->client_symbols.nKeySyms; 14856 i.index = (char *) i.data - (char *) S; 14857 return i; 14858 } 14859 14860 14861 /***************************************************************************** 14862 ** 14863 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count 14864 ** 14865 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14866 ** @returns uint8_t * 14867 ** 14868 *****************************************************************************/ 14869 14870 uint8_t * 14871 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14872 { 14873 return /* replies */ S->client_symbols.map.acts_rtrn_count; 14874 } 14875 14876 14877 /***************************************************************************** 14878 ** 14879 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length 14880 ** 14881 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14882 ** @returns int 14883 ** 14884 *****************************************************************************/ 14885 14886 int 14887 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14888 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14889 { 14890 return /* replies */ S->client_symbols.nKeyActions; 14891 } 14892 14893 14894 /***************************************************************************** 14895 ** 14896 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end 14897 ** 14898 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14899 ** @returns xcb_generic_iterator_t 14900 ** 14901 *****************************************************************************/ 14902 14903 xcb_generic_iterator_t 14904 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14905 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14906 { 14907 xcb_generic_iterator_t i; 14908 i.data = /* replies */ S->client_symbols.map.acts_rtrn_count + /* replies */ S->client_symbols.nKeyActions; 14909 i.rem = 0; 14910 i.index = (char *) i.data - (char *) S; 14911 return i; 14912 } 14913 14914 14915 /***************************************************************************** 14916 ** 14917 ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts 14918 ** 14919 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14920 ** @returns xcb_xkb_action_t * 14921 ** 14922 *****************************************************************************/ 14923 14924 xcb_xkb_action_t * 14925 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14926 { 14927 return /* replies */ S->client_symbols.map.acts_rtrn_acts; 14928 } 14929 14930 14931 /***************************************************************************** 14932 ** 14933 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length 14934 ** 14935 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14936 ** @returns int 14937 ** 14938 *****************************************************************************/ 14939 14940 int 14941 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14942 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14943 { 14944 return /* replies */ S->client_symbols.totalActions; 14945 } 14946 14947 14948 /***************************************************************************** 14949 ** 14950 ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator 14951 ** 14952 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14953 ** @returns xcb_xkb_action_iterator_t 14954 ** 14955 *****************************************************************************/ 14956 14957 xcb_xkb_action_iterator_t 14958 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14959 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14960 { 14961 xcb_xkb_action_iterator_t i; 14962 i.data = /* replies */ S->client_symbols.map.acts_rtrn_acts; 14963 i.rem = /* replies */ S->client_symbols.totalActions; 14964 i.index = (char *) i.data - (char *) S; 14965 return i; 14966 } 14967 14968 14969 /***************************************************************************** 14970 ** 14971 ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn 14972 ** 14973 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 14974 ** @returns xcb_xkb_set_behavior_t * 14975 ** 14976 *****************************************************************************/ 14977 14978 xcb_xkb_set_behavior_t * 14979 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14980 { 14981 return /* replies */ S->client_symbols.map.behaviors_rtrn; 14982 } 14983 14984 14985 /***************************************************************************** 14986 ** 14987 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length 14988 ** 14989 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 14990 ** @returns int 14991 ** 14992 *****************************************************************************/ 14993 14994 int 14995 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 14996 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 14997 { 14998 return /* replies */ S->client_symbols.totalKeyBehaviors; 14999 } 15000 15001 15002 /***************************************************************************** 15003 ** 15004 ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator 15005 ** 15006 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15007 ** @returns xcb_xkb_set_behavior_iterator_t 15008 ** 15009 *****************************************************************************/ 15010 15011 xcb_xkb_set_behavior_iterator_t 15012 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15013 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15014 { 15015 xcb_xkb_set_behavior_iterator_t i; 15016 i.data = /* replies */ S->client_symbols.map.behaviors_rtrn; 15017 i.rem = /* replies */ S->client_symbols.totalKeyBehaviors; 15018 i.index = (char *) i.data - (char *) S; 15019 return i; 15020 } 15021 15022 15023 /***************************************************************************** 15024 ** 15025 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn 15026 ** 15027 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15028 ** @returns uint8_t * 15029 ** 15030 *****************************************************************************/ 15031 15032 uint8_t * 15033 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15034 { 15035 return /* replies */ S->client_symbols.map.vmods_rtrn; 15036 } 15037 15038 15039 /***************************************************************************** 15040 ** 15041 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length 15042 ** 15043 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15044 ** @returns int 15045 ** 15046 *****************************************************************************/ 15047 15048 int 15049 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15050 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15051 { 15052 return /* replies */ S->client_symbols.nVModMapKeys; 15053 } 15054 15055 15056 /***************************************************************************** 15057 ** 15058 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end 15059 ** 15060 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15061 ** @returns xcb_generic_iterator_t 15062 ** 15063 *****************************************************************************/ 15064 15065 xcb_generic_iterator_t 15066 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15067 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15068 { 15069 xcb_generic_iterator_t i; 15070 i.data = /* replies */ S->client_symbols.map.vmods_rtrn + /* replies */ S->client_symbols.nVModMapKeys; 15071 i.rem = 0; 15072 i.index = (char *) i.data - (char *) S; 15073 return i; 15074 } 15075 15076 15077 /***************************************************************************** 15078 ** 15079 ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn 15080 ** 15081 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15082 ** @returns xcb_xkb_set_explicit_t * 15083 ** 15084 *****************************************************************************/ 15085 15086 xcb_xkb_set_explicit_t * 15087 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15088 { 15089 return /* replies */ S->client_symbols.map.explicit_rtrn; 15090 } 15091 15092 15093 /***************************************************************************** 15094 ** 15095 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length 15096 ** 15097 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15098 ** @returns int 15099 ** 15100 *****************************************************************************/ 15101 15102 int 15103 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15104 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15105 { 15106 return /* replies */ S->client_symbols.totalKeyExplicit; 15107 } 15108 15109 15110 /***************************************************************************** 15111 ** 15112 ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator 15113 ** 15114 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15115 ** @returns xcb_xkb_set_explicit_iterator_t 15116 ** 15117 *****************************************************************************/ 15118 15119 xcb_xkb_set_explicit_iterator_t 15120 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15121 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15122 { 15123 xcb_xkb_set_explicit_iterator_t i; 15124 i.data = /* replies */ S->client_symbols.map.explicit_rtrn; 15125 i.rem = /* replies */ S->client_symbols.totalKeyExplicit; 15126 i.index = (char *) i.data - (char *) S; 15127 return i; 15128 } 15129 15130 15131 /***************************************************************************** 15132 ** 15133 ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn 15134 ** 15135 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15136 ** @returns xcb_xkb_key_mod_map_t * 15137 ** 15138 *****************************************************************************/ 15139 15140 xcb_xkb_key_mod_map_t * 15141 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15142 { 15143 return /* replies */ S->client_symbols.map.modmap_rtrn; 15144 } 15145 15146 15147 /***************************************************************************** 15148 ** 15149 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length 15150 ** 15151 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15152 ** @returns int 15153 ** 15154 *****************************************************************************/ 15155 15156 int 15157 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15158 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15159 { 15160 return /* replies */ S->client_symbols.totalModMapKeys; 15161 } 15162 15163 15164 /***************************************************************************** 15165 ** 15166 ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator 15167 ** 15168 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15169 ** @returns xcb_xkb_key_mod_map_iterator_t 15170 ** 15171 *****************************************************************************/ 15172 15173 xcb_xkb_key_mod_map_iterator_t 15174 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15175 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15176 { 15177 xcb_xkb_key_mod_map_iterator_t i; 15178 i.data = /* replies */ S->client_symbols.map.modmap_rtrn; 15179 i.rem = /* replies */ S->client_symbols.totalModMapKeys; 15180 i.index = (char *) i.data - (char *) S; 15181 return i; 15182 } 15183 15184 15185 /***************************************************************************** 15186 ** 15187 ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn 15188 ** 15189 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15190 ** @returns xcb_xkb_key_v_mod_map_t * 15191 ** 15192 *****************************************************************************/ 15193 15194 xcb_xkb_key_v_mod_map_t * 15195 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15196 { 15197 return /* replies */ S->client_symbols.map.vmodmap_rtrn; 15198 } 15199 15200 15201 /***************************************************************************** 15202 ** 15203 ** int xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length 15204 ** 15205 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15206 ** @returns int 15207 ** 15208 *****************************************************************************/ 15209 15210 int 15211 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15212 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15213 { 15214 return /* replies */ S->client_symbols.totalVModMapKeys; 15215 } 15216 15217 15218 /***************************************************************************** 15219 ** 15220 ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator 15221 ** 15222 ** @param const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *R 15223 ** @returns xcb_xkb_key_v_mod_map_iterator_t 15224 ** 15225 *****************************************************************************/ 15226 15227 xcb_xkb_key_v_mod_map_iterator_t 15228 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15229 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15230 { 15231 xcb_xkb_key_v_mod_map_iterator_t i; 15232 i.data = /* replies */ S->client_symbols.map.vmodmap_rtrn; 15233 i.rem = /* replies */ S->client_symbols.totalVModMapKeys; 15234 i.index = (char *) i.data - (char *) S; 15235 return i; 15236 } 15237 15238 int 15239 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize (void **_buffer /**< */, 15240 uint8_t nTypes /**< */, 15241 uint8_t nKeySyms /**< */, 15242 uint8_t nKeyActions /**< */, 15243 uint16_t totalActions /**< */, 15244 uint8_t totalKeyBehaviors /**< */, 15245 uint8_t nVModMapKeys /**< */, 15246 uint8_t totalKeyExplicit /**< */, 15247 uint8_t totalModMapKeys /**< */, 15248 uint8_t totalVModMapKeys /**< */, 15249 uint16_t present /**< */, 15250 const xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */) 15251 { 15252 char *xcb_out = *_buffer; 15253 unsigned int xcb_buffer_len = 0; 15254 unsigned int xcb_align_to; 15255 15256 unsigned int xcb_pad = 0; 15257 char xcb_pad0[3] = {0, 0, 0}; 15258 struct iovec xcb_parts[19]; 15259 unsigned int xcb_parts_idx = 0; 15260 unsigned int xcb_block_len = 0; 15261 unsigned int i; 15262 char *xcb_tmp; 15263 15264 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 15265 /* insert padding */ 15266 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15267 xcb_buffer_len += xcb_block_len + xcb_pad; 15268 if (0 != xcb_pad) { 15269 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15270 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15271 xcb_parts_idx++; 15272 xcb_pad = 0; 15273 } 15274 xcb_block_len = 0; 15275 /* types_rtrn */ 15276 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn; 15277 xcb_parts[xcb_parts_idx].iov_len = 0; 15278 xcb_tmp = (char *) _aux->types_rtrn; 15279 for(i=0; i<nTypes; i++) { 15280 xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp); 15281 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 15282 } 15283 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 15284 xcb_parts_idx++; 15285 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 15286 } 15287 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 15288 /* insert padding */ 15289 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15290 xcb_buffer_len += xcb_block_len + xcb_pad; 15291 if (0 != xcb_pad) { 15292 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15293 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15294 xcb_parts_idx++; 15295 xcb_pad = 0; 15296 } 15297 xcb_block_len = 0; 15298 /* syms_rtrn */ 15299 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn; 15300 xcb_parts[xcb_parts_idx].iov_len = 0; 15301 xcb_tmp = (char *) _aux->syms_rtrn; 15302 for(i=0; i<nKeySyms; i++) { 15303 xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 15304 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 15305 } 15306 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 15307 xcb_parts_idx++; 15308 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 15309 } 15310 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 15311 /* insert padding */ 15312 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15313 xcb_buffer_len += xcb_block_len + xcb_pad; 15314 if (0 != xcb_pad) { 15315 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15316 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15317 xcb_parts_idx++; 15318 xcb_pad = 0; 15319 } 15320 xcb_block_len = 0; 15321 /* acts_rtrn_count */ 15322 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count; 15323 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 15324 xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t); 15325 xcb_parts_idx++; 15326 xcb_align_to = ALIGNOF(uint8_t); 15327 /* insert padding */ 15328 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15329 xcb_buffer_len += xcb_block_len + xcb_pad; 15330 if (0 != xcb_pad) { 15331 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15332 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15333 xcb_parts_idx++; 15334 xcb_pad = 0; 15335 } 15336 xcb_block_len = 0; 15337 /* acts_rtrn_acts */ 15338 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts; 15339 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 15340 xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t); 15341 xcb_parts_idx++; 15342 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 15343 } 15344 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 15345 /* insert padding */ 15346 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15347 xcb_buffer_len += xcb_block_len + xcb_pad; 15348 if (0 != xcb_pad) { 15349 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15350 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15351 xcb_parts_idx++; 15352 xcb_pad = 0; 15353 } 15354 xcb_block_len = 0; 15355 /* behaviors_rtrn */ 15356 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn; 15357 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 15358 xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 15359 xcb_parts_idx++; 15360 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 15361 } 15362 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 15363 /* insert padding */ 15364 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15365 xcb_buffer_len += xcb_block_len + xcb_pad; 15366 if (0 != xcb_pad) { 15367 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15368 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15369 xcb_parts_idx++; 15370 xcb_pad = 0; 15371 } 15372 xcb_block_len = 0; 15373 /* vmods_rtrn */ 15374 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn; 15375 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 15376 xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t); 15377 xcb_parts_idx++; 15378 xcb_align_to = ALIGNOF(uint8_t); 15379 } 15380 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 15381 /* insert padding */ 15382 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15383 xcb_buffer_len += xcb_block_len + xcb_pad; 15384 if (0 != xcb_pad) { 15385 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15386 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15387 xcb_parts_idx++; 15388 xcb_pad = 0; 15389 } 15390 xcb_block_len = 0; 15391 /* explicit_rtrn */ 15392 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn; 15393 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 15394 xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 15395 xcb_parts_idx++; 15396 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 15397 } 15398 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 15399 /* insert padding */ 15400 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15401 xcb_buffer_len += xcb_block_len + xcb_pad; 15402 if (0 != xcb_pad) { 15403 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15404 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15405 xcb_parts_idx++; 15406 xcb_pad = 0; 15407 } 15408 xcb_block_len = 0; 15409 /* modmap_rtrn */ 15410 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn; 15411 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 15412 xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 15413 xcb_parts_idx++; 15414 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 15415 } 15416 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 15417 /* insert padding */ 15418 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15419 xcb_buffer_len += xcb_block_len + xcb_pad; 15420 if (0 != xcb_pad) { 15421 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15422 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15423 xcb_parts_idx++; 15424 xcb_pad = 0; 15425 } 15426 xcb_block_len = 0; 15427 /* vmodmap_rtrn */ 15428 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn; 15429 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 15430 xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 15431 xcb_parts_idx++; 15432 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 15433 } 15434 /* insert padding */ 15435 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15436 xcb_buffer_len += xcb_block_len + xcb_pad; 15437 if (0 != xcb_pad) { 15438 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 15439 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 15440 xcb_parts_idx++; 15441 xcb_pad = 0; 15442 } 15443 xcb_block_len = 0; 15444 15445 if (NULL == xcb_out) { 15446 /* allocate memory */ 15447 xcb_out = malloc(xcb_buffer_len); 15448 *_buffer = xcb_out; 15449 } 15450 15451 xcb_tmp = xcb_out; 15452 for(i=0; i<xcb_parts_idx; i++) { 15453 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 15454 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 15455 if (0 != xcb_parts[i].iov_len) 15456 xcb_tmp += xcb_parts[i].iov_len; 15457 } 15458 15459 return xcb_buffer_len; 15460 } 15461 15462 int 15463 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack (const void *_buffer /**< */, 15464 uint8_t nTypes /**< */, 15465 uint8_t nKeySyms /**< */, 15466 uint8_t nKeyActions /**< */, 15467 uint16_t totalActions /**< */, 15468 uint8_t totalKeyBehaviors /**< */, 15469 uint8_t nVModMapKeys /**< */, 15470 uint8_t totalKeyExplicit /**< */, 15471 uint8_t totalModMapKeys /**< */, 15472 uint8_t totalVModMapKeys /**< */, 15473 uint16_t present /**< */, 15474 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *_aux /**< */) 15475 { 15476 char *xcb_tmp = (char *)_buffer; 15477 unsigned int xcb_buffer_len = 0; 15478 unsigned int xcb_block_len = 0; 15479 unsigned int xcb_pad = 0; 15480 unsigned int xcb_align_to; 15481 15482 unsigned int i; 15483 unsigned int xcb_tmp_len; 15484 15485 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 15486 /* insert padding */ 15487 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15488 xcb_buffer_len += xcb_block_len + xcb_pad; 15489 if (0 != xcb_pad) { 15490 xcb_tmp += xcb_pad; 15491 xcb_pad = 0; 15492 } 15493 xcb_block_len = 0; 15494 /* types_rtrn */ 15495 _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp; 15496 for(i=0; i<nTypes; i++) { 15497 xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp); 15498 xcb_block_len += xcb_tmp_len; 15499 xcb_tmp += xcb_tmp_len; 15500 } 15501 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 15502 } 15503 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 15504 /* insert padding */ 15505 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15506 xcb_buffer_len += xcb_block_len + xcb_pad; 15507 if (0 != xcb_pad) { 15508 xcb_tmp += xcb_pad; 15509 xcb_pad = 0; 15510 } 15511 xcb_block_len = 0; 15512 /* syms_rtrn */ 15513 _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp; 15514 for(i=0; i<nKeySyms; i++) { 15515 xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 15516 xcb_block_len += xcb_tmp_len; 15517 xcb_tmp += xcb_tmp_len; 15518 } 15519 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 15520 } 15521 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 15522 /* insert padding */ 15523 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15524 xcb_buffer_len += xcb_block_len + xcb_pad; 15525 if (0 != xcb_pad) { 15526 xcb_tmp += xcb_pad; 15527 xcb_pad = 0; 15528 } 15529 xcb_block_len = 0; 15530 /* acts_rtrn_count */ 15531 _aux->acts_rtrn_count = (uint8_t *)xcb_tmp; 15532 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 15533 xcb_tmp += xcb_block_len; 15534 xcb_align_to = ALIGNOF(uint8_t); 15535 /* insert padding */ 15536 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15537 xcb_buffer_len += xcb_block_len + xcb_pad; 15538 if (0 != xcb_pad) { 15539 xcb_tmp += xcb_pad; 15540 xcb_pad = 0; 15541 } 15542 xcb_block_len = 0; 15543 /* acts_rtrn_acts */ 15544 _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp; 15545 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 15546 xcb_tmp += xcb_block_len; 15547 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 15548 } 15549 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 15550 /* insert padding */ 15551 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15552 xcb_buffer_len += xcb_block_len + xcb_pad; 15553 if (0 != xcb_pad) { 15554 xcb_tmp += xcb_pad; 15555 xcb_pad = 0; 15556 } 15557 xcb_block_len = 0; 15558 /* behaviors_rtrn */ 15559 _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp; 15560 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 15561 xcb_tmp += xcb_block_len; 15562 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 15563 } 15564 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 15565 /* insert padding */ 15566 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15567 xcb_buffer_len += xcb_block_len + xcb_pad; 15568 if (0 != xcb_pad) { 15569 xcb_tmp += xcb_pad; 15570 xcb_pad = 0; 15571 } 15572 xcb_block_len = 0; 15573 /* vmods_rtrn */ 15574 _aux->vmods_rtrn = (uint8_t *)xcb_tmp; 15575 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 15576 xcb_tmp += xcb_block_len; 15577 xcb_align_to = ALIGNOF(uint8_t); 15578 } 15579 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 15580 /* insert padding */ 15581 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15582 xcb_buffer_len += xcb_block_len + xcb_pad; 15583 if (0 != xcb_pad) { 15584 xcb_tmp += xcb_pad; 15585 xcb_pad = 0; 15586 } 15587 xcb_block_len = 0; 15588 /* explicit_rtrn */ 15589 _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp; 15590 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 15591 xcb_tmp += xcb_block_len; 15592 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 15593 } 15594 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 15595 /* insert padding */ 15596 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15597 xcb_buffer_len += xcb_block_len + xcb_pad; 15598 if (0 != xcb_pad) { 15599 xcb_tmp += xcb_pad; 15600 xcb_pad = 0; 15601 } 15602 xcb_block_len = 0; 15603 /* modmap_rtrn */ 15604 _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp; 15605 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 15606 xcb_tmp += xcb_block_len; 15607 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 15608 } 15609 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 15610 /* insert padding */ 15611 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15612 xcb_buffer_len += xcb_block_len + xcb_pad; 15613 if (0 != xcb_pad) { 15614 xcb_tmp += xcb_pad; 15615 xcb_pad = 0; 15616 } 15617 xcb_block_len = 0; 15618 /* vmodmap_rtrn */ 15619 _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp; 15620 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 15621 xcb_tmp += xcb_block_len; 15622 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 15623 } 15624 /* insert padding */ 15625 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 15626 xcb_buffer_len += xcb_block_len + xcb_pad; 15627 if (0 != xcb_pad) { 15628 xcb_tmp += xcb_pad; 15629 xcb_pad = 0; 15630 } 15631 xcb_block_len = 0; 15632 15633 return xcb_buffer_len; 15634 } 15635 15636 int 15637 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_sizeof (const void *_buffer /**< */, 15638 uint8_t nTypes /**< */, 15639 uint8_t nKeySyms /**< */, 15640 uint8_t nKeyActions /**< */, 15641 uint16_t totalActions /**< */, 15642 uint8_t totalKeyBehaviors /**< */, 15643 uint8_t nVModMapKeys /**< */, 15644 uint8_t totalKeyExplicit /**< */, 15645 uint8_t totalModMapKeys /**< */, 15646 uint8_t totalVModMapKeys /**< */, 15647 uint16_t present /**< */) 15648 { 15649 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t _aux; 15650 return xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux); 15651 } 15652 15653 15654 /***************************************************************************** 15655 ** 15656 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length 15657 ** 15658 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15659 ** @returns int 15660 ** 15661 *****************************************************************************/ 15662 15663 int 15664 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15665 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15666 { 15667 return /* replies */ S->server_symbols.nTypes; 15668 } 15669 15670 15671 /***************************************************************************** 15672 ** 15673 ** xcb_xkb_key_type_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator 15674 ** 15675 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15676 ** @returns xcb_xkb_key_type_iterator_t 15677 ** 15678 *****************************************************************************/ 15679 15680 xcb_xkb_key_type_iterator_t 15681 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_types_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15682 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15683 { 15684 xcb_xkb_key_type_iterator_t i; 15685 i.data = /* replies */ S->server_symbols.map.types_rtrn; 15686 i.rem = /* replies */ S->server_symbols.nTypes; 15687 i.index = (char *) i.data - (char *) S; 15688 return i; 15689 } 15690 15691 15692 /***************************************************************************** 15693 ** 15694 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length 15695 ** 15696 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15697 ** @returns int 15698 ** 15699 *****************************************************************************/ 15700 15701 int 15702 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15703 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15704 { 15705 return /* replies */ S->server_symbols.nKeySyms; 15706 } 15707 15708 15709 /***************************************************************************** 15710 ** 15711 ** xcb_xkb_key_sym_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator 15712 ** 15713 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15714 ** @returns xcb_xkb_key_sym_map_iterator_t 15715 ** 15716 *****************************************************************************/ 15717 15718 xcb_xkb_key_sym_map_iterator_t 15719 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_syms_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15720 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15721 { 15722 xcb_xkb_key_sym_map_iterator_t i; 15723 i.data = /* replies */ S->server_symbols.map.syms_rtrn; 15724 i.rem = /* replies */ S->server_symbols.nKeySyms; 15725 i.index = (char *) i.data - (char *) S; 15726 return i; 15727 } 15728 15729 15730 /***************************************************************************** 15731 ** 15732 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count 15733 ** 15734 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15735 ** @returns uint8_t * 15736 ** 15737 *****************************************************************************/ 15738 15739 uint8_t * 15740 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15741 { 15742 return /* replies */ S->server_symbols.map.acts_rtrn_count; 15743 } 15744 15745 15746 /***************************************************************************** 15747 ** 15748 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length 15749 ** 15750 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15751 ** @returns int 15752 ** 15753 *****************************************************************************/ 15754 15755 int 15756 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15757 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15758 { 15759 return /* replies */ S->server_symbols.nKeyActions; 15760 } 15761 15762 15763 /***************************************************************************** 15764 ** 15765 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end 15766 ** 15767 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15768 ** @returns xcb_generic_iterator_t 15769 ** 15770 *****************************************************************************/ 15771 15772 xcb_generic_iterator_t 15773 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_count_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15774 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15775 { 15776 xcb_generic_iterator_t i; 15777 i.data = /* replies */ S->server_symbols.map.acts_rtrn_count + /* replies */ S->server_symbols.nKeyActions; 15778 i.rem = 0; 15779 i.index = (char *) i.data - (char *) S; 15780 return i; 15781 } 15782 15783 15784 /***************************************************************************** 15785 ** 15786 ** xcb_xkb_action_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts 15787 ** 15788 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15789 ** @returns xcb_xkb_action_t * 15790 ** 15791 *****************************************************************************/ 15792 15793 xcb_xkb_action_t * 15794 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15795 { 15796 return /* replies */ S->server_symbols.map.acts_rtrn_acts; 15797 } 15798 15799 15800 /***************************************************************************** 15801 ** 15802 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length 15803 ** 15804 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15805 ** @returns int 15806 ** 15807 *****************************************************************************/ 15808 15809 int 15810 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15811 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15812 { 15813 return /* replies */ S->server_symbols.totalActions; 15814 } 15815 15816 15817 /***************************************************************************** 15818 ** 15819 ** xcb_xkb_action_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator 15820 ** 15821 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15822 ** @returns xcb_xkb_action_iterator_t 15823 ** 15824 *****************************************************************************/ 15825 15826 xcb_xkb_action_iterator_t 15827 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_acts_rtrn_acts_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15828 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15829 { 15830 xcb_xkb_action_iterator_t i; 15831 i.data = /* replies */ S->server_symbols.map.acts_rtrn_acts; 15832 i.rem = /* replies */ S->server_symbols.totalActions; 15833 i.index = (char *) i.data - (char *) S; 15834 return i; 15835 } 15836 15837 15838 /***************************************************************************** 15839 ** 15840 ** xcb_xkb_set_behavior_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn 15841 ** 15842 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15843 ** @returns xcb_xkb_set_behavior_t * 15844 ** 15845 *****************************************************************************/ 15846 15847 xcb_xkb_set_behavior_t * 15848 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15849 { 15850 return /* replies */ S->server_symbols.map.behaviors_rtrn; 15851 } 15852 15853 15854 /***************************************************************************** 15855 ** 15856 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length 15857 ** 15858 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15859 ** @returns int 15860 ** 15861 *****************************************************************************/ 15862 15863 int 15864 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15865 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15866 { 15867 return /* replies */ S->server_symbols.totalKeyBehaviors; 15868 } 15869 15870 15871 /***************************************************************************** 15872 ** 15873 ** xcb_xkb_set_behavior_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator 15874 ** 15875 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15876 ** @returns xcb_xkb_set_behavior_iterator_t 15877 ** 15878 *****************************************************************************/ 15879 15880 xcb_xkb_set_behavior_iterator_t 15881 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_behaviors_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15882 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15883 { 15884 xcb_xkb_set_behavior_iterator_t i; 15885 i.data = /* replies */ S->server_symbols.map.behaviors_rtrn; 15886 i.rem = /* replies */ S->server_symbols.totalKeyBehaviors; 15887 i.index = (char *) i.data - (char *) S; 15888 return i; 15889 } 15890 15891 15892 /***************************************************************************** 15893 ** 15894 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn 15895 ** 15896 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15897 ** @returns uint8_t * 15898 ** 15899 *****************************************************************************/ 15900 15901 uint8_t * 15902 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15903 { 15904 return /* replies */ S->server_symbols.map.vmods_rtrn; 15905 } 15906 15907 15908 /***************************************************************************** 15909 ** 15910 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length 15911 ** 15912 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15913 ** @returns int 15914 ** 15915 *****************************************************************************/ 15916 15917 int 15918 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15919 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15920 { 15921 return /* replies */ S->server_symbols.nVModMapKeys; 15922 } 15923 15924 15925 /***************************************************************************** 15926 ** 15927 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end 15928 ** 15929 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15930 ** @returns xcb_generic_iterator_t 15931 ** 15932 *****************************************************************************/ 15933 15934 xcb_generic_iterator_t 15935 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmods_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15936 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15937 { 15938 xcb_generic_iterator_t i; 15939 i.data = /* replies */ S->server_symbols.map.vmods_rtrn + /* replies */ S->server_symbols.nVModMapKeys; 15940 i.rem = 0; 15941 i.index = (char *) i.data - (char *) S; 15942 return i; 15943 } 15944 15945 15946 /***************************************************************************** 15947 ** 15948 ** xcb_xkb_set_explicit_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn 15949 ** 15950 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 15951 ** @returns xcb_xkb_set_explicit_t * 15952 ** 15953 *****************************************************************************/ 15954 15955 xcb_xkb_set_explicit_t * 15956 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15957 { 15958 return /* replies */ S->server_symbols.map.explicit_rtrn; 15959 } 15960 15961 15962 /***************************************************************************** 15963 ** 15964 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length 15965 ** 15966 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15967 ** @returns int 15968 ** 15969 *****************************************************************************/ 15970 15971 int 15972 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15973 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15974 { 15975 return /* replies */ S->server_symbols.totalKeyExplicit; 15976 } 15977 15978 15979 /***************************************************************************** 15980 ** 15981 ** xcb_xkb_set_explicit_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator 15982 ** 15983 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 15984 ** @returns xcb_xkb_set_explicit_iterator_t 15985 ** 15986 *****************************************************************************/ 15987 15988 xcb_xkb_set_explicit_iterator_t 15989 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_explicit_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 15990 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 15991 { 15992 xcb_xkb_set_explicit_iterator_t i; 15993 i.data = /* replies */ S->server_symbols.map.explicit_rtrn; 15994 i.rem = /* replies */ S->server_symbols.totalKeyExplicit; 15995 i.index = (char *) i.data - (char *) S; 15996 return i; 15997 } 15998 15999 16000 /***************************************************************************** 16001 ** 16002 ** xcb_xkb_key_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn 16003 ** 16004 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16005 ** @returns xcb_xkb_key_mod_map_t * 16006 ** 16007 *****************************************************************************/ 16008 16009 xcb_xkb_key_mod_map_t * 16010 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16011 { 16012 return /* replies */ S->server_symbols.map.modmap_rtrn; 16013 } 16014 16015 16016 /***************************************************************************** 16017 ** 16018 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length 16019 ** 16020 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 16021 ** @returns int 16022 ** 16023 *****************************************************************************/ 16024 16025 int 16026 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16027 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16028 { 16029 return /* replies */ S->server_symbols.totalModMapKeys; 16030 } 16031 16032 16033 /***************************************************************************** 16034 ** 16035 ** xcb_xkb_key_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator 16036 ** 16037 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 16038 ** @returns xcb_xkb_key_mod_map_iterator_t 16039 ** 16040 *****************************************************************************/ 16041 16042 xcb_xkb_key_mod_map_iterator_t 16043 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_modmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16044 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16045 { 16046 xcb_xkb_key_mod_map_iterator_t i; 16047 i.data = /* replies */ S->server_symbols.map.modmap_rtrn; 16048 i.rem = /* replies */ S->server_symbols.totalModMapKeys; 16049 i.index = (char *) i.data - (char *) S; 16050 return i; 16051 } 16052 16053 16054 /***************************************************************************** 16055 ** 16056 ** xcb_xkb_key_v_mod_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn 16057 ** 16058 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16059 ** @returns xcb_xkb_key_v_mod_map_t * 16060 ** 16061 *****************************************************************************/ 16062 16063 xcb_xkb_key_v_mod_map_t * 16064 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16065 { 16066 return /* replies */ S->server_symbols.map.vmodmap_rtrn; 16067 } 16068 16069 16070 /***************************************************************************** 16071 ** 16072 ** int xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length 16073 ** 16074 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 16075 ** @returns int 16076 ** 16077 *****************************************************************************/ 16078 16079 int 16080 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16081 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16082 { 16083 return /* replies */ S->server_symbols.totalVModMapKeys; 16084 } 16085 16086 16087 /***************************************************************************** 16088 ** 16089 ** xcb_xkb_key_v_mod_map_iterator_t xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator 16090 ** 16091 ** @param const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *R 16092 ** @returns xcb_xkb_key_v_mod_map_iterator_t 16093 ** 16094 *****************************************************************************/ 16095 16096 xcb_xkb_key_v_mod_map_iterator_t 16097 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_vmodmap_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16098 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16099 { 16100 xcb_xkb_key_v_mod_map_iterator_t i; 16101 i.data = /* replies */ S->server_symbols.map.vmodmap_rtrn; 16102 i.rem = /* replies */ S->server_symbols.totalVModMapKeys; 16103 i.index = (char *) i.data - (char *) S; 16104 return i; 16105 } 16106 16107 int 16108 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize (void **_buffer /**< */, 16109 uint8_t nTypes /**< */, 16110 uint8_t nKeySyms /**< */, 16111 uint8_t nKeyActions /**< */, 16112 uint16_t totalActions /**< */, 16113 uint8_t totalKeyBehaviors /**< */, 16114 uint8_t nVModMapKeys /**< */, 16115 uint8_t totalKeyExplicit /**< */, 16116 uint8_t totalModMapKeys /**< */, 16117 uint8_t totalVModMapKeys /**< */, 16118 uint16_t present /**< */, 16119 const xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */) 16120 { 16121 char *xcb_out = *_buffer; 16122 unsigned int xcb_buffer_len = 0; 16123 unsigned int xcb_align_to; 16124 16125 unsigned int xcb_pad = 0; 16126 char xcb_pad0[3] = {0, 0, 0}; 16127 struct iovec xcb_parts[19]; 16128 unsigned int xcb_parts_idx = 0; 16129 unsigned int xcb_block_len = 0; 16130 unsigned int i; 16131 char *xcb_tmp; 16132 16133 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 16134 /* insert padding */ 16135 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16136 xcb_buffer_len += xcb_block_len + xcb_pad; 16137 if (0 != xcb_pad) { 16138 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16139 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16140 xcb_parts_idx++; 16141 xcb_pad = 0; 16142 } 16143 xcb_block_len = 0; 16144 /* types_rtrn */ 16145 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->types_rtrn; 16146 xcb_parts[xcb_parts_idx].iov_len = 0; 16147 xcb_tmp = (char *) _aux->types_rtrn; 16148 for(i=0; i<nTypes; i++) { 16149 xcb_block_len = xcb_xkb_key_type_sizeof(xcb_tmp); 16150 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 16151 } 16152 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 16153 xcb_parts_idx++; 16154 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 16155 } 16156 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 16157 /* insert padding */ 16158 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16159 xcb_buffer_len += xcb_block_len + xcb_pad; 16160 if (0 != xcb_pad) { 16161 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16162 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16163 xcb_parts_idx++; 16164 xcb_pad = 0; 16165 } 16166 xcb_block_len = 0; 16167 /* syms_rtrn */ 16168 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->syms_rtrn; 16169 xcb_parts[xcb_parts_idx].iov_len = 0; 16170 xcb_tmp = (char *) _aux->syms_rtrn; 16171 for(i=0; i<nKeySyms; i++) { 16172 xcb_block_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 16173 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 16174 } 16175 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 16176 xcb_parts_idx++; 16177 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 16178 } 16179 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 16180 /* insert padding */ 16181 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16182 xcb_buffer_len += xcb_block_len + xcb_pad; 16183 if (0 != xcb_pad) { 16184 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16185 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16186 xcb_parts_idx++; 16187 xcb_pad = 0; 16188 } 16189 xcb_block_len = 0; 16190 /* acts_rtrn_count */ 16191 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_count; 16192 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 16193 xcb_parts[xcb_parts_idx].iov_len = nKeyActions * sizeof(xcb_keycode_t); 16194 xcb_parts_idx++; 16195 xcb_align_to = ALIGNOF(uint8_t); 16196 /* insert padding */ 16197 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16198 xcb_buffer_len += xcb_block_len + xcb_pad; 16199 if (0 != xcb_pad) { 16200 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16201 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16202 xcb_parts_idx++; 16203 xcb_pad = 0; 16204 } 16205 xcb_block_len = 0; 16206 /* acts_rtrn_acts */ 16207 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->acts_rtrn_acts; 16208 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 16209 xcb_parts[xcb_parts_idx].iov_len = totalActions * sizeof(xcb_xkb_action_t); 16210 xcb_parts_idx++; 16211 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 16212 } 16213 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 16214 /* insert padding */ 16215 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16216 xcb_buffer_len += xcb_block_len + xcb_pad; 16217 if (0 != xcb_pad) { 16218 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16219 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16220 xcb_parts_idx++; 16221 xcb_pad = 0; 16222 } 16223 xcb_block_len = 0; 16224 /* behaviors_rtrn */ 16225 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->behaviors_rtrn; 16226 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 16227 xcb_parts[xcb_parts_idx].iov_len = totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 16228 xcb_parts_idx++; 16229 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 16230 } 16231 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 16232 /* insert padding */ 16233 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16234 xcb_buffer_len += xcb_block_len + xcb_pad; 16235 if (0 != xcb_pad) { 16236 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16237 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16238 xcb_parts_idx++; 16239 xcb_pad = 0; 16240 } 16241 xcb_block_len = 0; 16242 /* vmods_rtrn */ 16243 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmods_rtrn; 16244 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 16245 xcb_parts[xcb_parts_idx].iov_len = nVModMapKeys * sizeof(xcb_keycode_t); 16246 xcb_parts_idx++; 16247 xcb_align_to = ALIGNOF(uint8_t); 16248 } 16249 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 16250 /* insert padding */ 16251 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16252 xcb_buffer_len += xcb_block_len + xcb_pad; 16253 if (0 != xcb_pad) { 16254 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16255 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16256 xcb_parts_idx++; 16257 xcb_pad = 0; 16258 } 16259 xcb_block_len = 0; 16260 /* explicit_rtrn */ 16261 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->explicit_rtrn; 16262 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 16263 xcb_parts[xcb_parts_idx].iov_len = totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 16264 xcb_parts_idx++; 16265 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 16266 } 16267 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 16268 /* insert padding */ 16269 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16270 xcb_buffer_len += xcb_block_len + xcb_pad; 16271 if (0 != xcb_pad) { 16272 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16273 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16274 xcb_parts_idx++; 16275 xcb_pad = 0; 16276 } 16277 xcb_block_len = 0; 16278 /* modmap_rtrn */ 16279 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->modmap_rtrn; 16280 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 16281 xcb_parts[xcb_parts_idx].iov_len = totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 16282 xcb_parts_idx++; 16283 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 16284 } 16285 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 16286 /* insert padding */ 16287 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16288 xcb_buffer_len += xcb_block_len + xcb_pad; 16289 if (0 != xcb_pad) { 16290 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16291 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16292 xcb_parts_idx++; 16293 xcb_pad = 0; 16294 } 16295 xcb_block_len = 0; 16296 /* vmodmap_rtrn */ 16297 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->vmodmap_rtrn; 16298 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 16299 xcb_parts[xcb_parts_idx].iov_len = totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 16300 xcb_parts_idx++; 16301 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 16302 } 16303 /* insert padding */ 16304 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16305 xcb_buffer_len += xcb_block_len + xcb_pad; 16306 if (0 != xcb_pad) { 16307 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 16308 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 16309 xcb_parts_idx++; 16310 xcb_pad = 0; 16311 } 16312 xcb_block_len = 0; 16313 16314 if (NULL == xcb_out) { 16315 /* allocate memory */ 16316 xcb_out = malloc(xcb_buffer_len); 16317 *_buffer = xcb_out; 16318 } 16319 16320 xcb_tmp = xcb_out; 16321 for(i=0; i<xcb_parts_idx; i++) { 16322 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 16323 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 16324 if (0 != xcb_parts[i].iov_len) 16325 xcb_tmp += xcb_parts[i].iov_len; 16326 } 16327 16328 return xcb_buffer_len; 16329 } 16330 16331 int 16332 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack (const void *_buffer /**< */, 16333 uint8_t nTypes /**< */, 16334 uint8_t nKeySyms /**< */, 16335 uint8_t nKeyActions /**< */, 16336 uint16_t totalActions /**< */, 16337 uint8_t totalKeyBehaviors /**< */, 16338 uint8_t nVModMapKeys /**< */, 16339 uint8_t totalKeyExplicit /**< */, 16340 uint8_t totalModMapKeys /**< */, 16341 uint8_t totalVModMapKeys /**< */, 16342 uint16_t present /**< */, 16343 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *_aux /**< */) 16344 { 16345 char *xcb_tmp = (char *)_buffer; 16346 unsigned int xcb_buffer_len = 0; 16347 unsigned int xcb_block_len = 0; 16348 unsigned int xcb_pad = 0; 16349 unsigned int xcb_align_to; 16350 16351 unsigned int i; 16352 unsigned int xcb_tmp_len; 16353 16354 if(present & XCB_XKB_MAP_PART_KEY_TYPES) { 16355 /* insert padding */ 16356 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16357 xcb_buffer_len += xcb_block_len + xcb_pad; 16358 if (0 != xcb_pad) { 16359 xcb_tmp += xcb_pad; 16360 xcb_pad = 0; 16361 } 16362 xcb_block_len = 0; 16363 /* types_rtrn */ 16364 _aux->types_rtrn = (xcb_xkb_key_type_t *)xcb_tmp; 16365 for(i=0; i<nTypes; i++) { 16366 xcb_tmp_len = xcb_xkb_key_type_sizeof(xcb_tmp); 16367 xcb_block_len += xcb_tmp_len; 16368 xcb_tmp += xcb_tmp_len; 16369 } 16370 xcb_align_to = ALIGNOF(xcb_xkb_key_type_t); 16371 } 16372 if(present & XCB_XKB_MAP_PART_KEY_SYMS) { 16373 /* insert padding */ 16374 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16375 xcb_buffer_len += xcb_block_len + xcb_pad; 16376 if (0 != xcb_pad) { 16377 xcb_tmp += xcb_pad; 16378 xcb_pad = 0; 16379 } 16380 xcb_block_len = 0; 16381 /* syms_rtrn */ 16382 _aux->syms_rtrn = (xcb_xkb_key_sym_map_t *)xcb_tmp; 16383 for(i=0; i<nKeySyms; i++) { 16384 xcb_tmp_len = xcb_xkb_key_sym_map_sizeof(xcb_tmp); 16385 xcb_block_len += xcb_tmp_len; 16386 xcb_tmp += xcb_tmp_len; 16387 } 16388 xcb_align_to = ALIGNOF(xcb_xkb_key_sym_map_t); 16389 } 16390 if(present & XCB_XKB_MAP_PART_KEY_ACTIONS) { 16391 /* insert padding */ 16392 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16393 xcb_buffer_len += xcb_block_len + xcb_pad; 16394 if (0 != xcb_pad) { 16395 xcb_tmp += xcb_pad; 16396 xcb_pad = 0; 16397 } 16398 xcb_block_len = 0; 16399 /* acts_rtrn_count */ 16400 _aux->acts_rtrn_count = (uint8_t *)xcb_tmp; 16401 xcb_block_len += nKeyActions * sizeof(xcb_keycode_t); 16402 xcb_tmp += xcb_block_len; 16403 xcb_align_to = ALIGNOF(uint8_t); 16404 /* insert padding */ 16405 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16406 xcb_buffer_len += xcb_block_len + xcb_pad; 16407 if (0 != xcb_pad) { 16408 xcb_tmp += xcb_pad; 16409 xcb_pad = 0; 16410 } 16411 xcb_block_len = 0; 16412 /* acts_rtrn_acts */ 16413 _aux->acts_rtrn_acts = (xcb_xkb_action_t *)xcb_tmp; 16414 xcb_block_len += totalActions * sizeof(xcb_xkb_action_t); 16415 xcb_tmp += xcb_block_len; 16416 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 16417 } 16418 if(present & XCB_XKB_MAP_PART_KEY_BEHAVIORS) { 16419 /* insert padding */ 16420 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16421 xcb_buffer_len += xcb_block_len + xcb_pad; 16422 if (0 != xcb_pad) { 16423 xcb_tmp += xcb_pad; 16424 xcb_pad = 0; 16425 } 16426 xcb_block_len = 0; 16427 /* behaviors_rtrn */ 16428 _aux->behaviors_rtrn = (xcb_xkb_set_behavior_t *)xcb_tmp; 16429 xcb_block_len += totalKeyBehaviors * sizeof(xcb_xkb_set_behavior_t); 16430 xcb_tmp += xcb_block_len; 16431 xcb_align_to = ALIGNOF(xcb_xkb_set_behavior_t); 16432 } 16433 if(present & XCB_XKB_MAP_PART_VIRTUAL_MODS) { 16434 /* insert padding */ 16435 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16436 xcb_buffer_len += xcb_block_len + xcb_pad; 16437 if (0 != xcb_pad) { 16438 xcb_tmp += xcb_pad; 16439 xcb_pad = 0; 16440 } 16441 xcb_block_len = 0; 16442 /* vmods_rtrn */ 16443 _aux->vmods_rtrn = (uint8_t *)xcb_tmp; 16444 xcb_block_len += nVModMapKeys * sizeof(xcb_keycode_t); 16445 xcb_tmp += xcb_block_len; 16446 xcb_align_to = ALIGNOF(uint8_t); 16447 } 16448 if(present & XCB_XKB_MAP_PART_EXPLICIT_COMPONENTS) { 16449 /* insert padding */ 16450 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16451 xcb_buffer_len += xcb_block_len + xcb_pad; 16452 if (0 != xcb_pad) { 16453 xcb_tmp += xcb_pad; 16454 xcb_pad = 0; 16455 } 16456 xcb_block_len = 0; 16457 /* explicit_rtrn */ 16458 _aux->explicit_rtrn = (xcb_xkb_set_explicit_t *)xcb_tmp; 16459 xcb_block_len += totalKeyExplicit * sizeof(xcb_xkb_set_explicit_t); 16460 xcb_tmp += xcb_block_len; 16461 xcb_align_to = ALIGNOF(xcb_xkb_set_explicit_t); 16462 } 16463 if(present & XCB_XKB_MAP_PART_MODIFIER_MAP) { 16464 /* insert padding */ 16465 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16466 xcb_buffer_len += xcb_block_len + xcb_pad; 16467 if (0 != xcb_pad) { 16468 xcb_tmp += xcb_pad; 16469 xcb_pad = 0; 16470 } 16471 xcb_block_len = 0; 16472 /* modmap_rtrn */ 16473 _aux->modmap_rtrn = (xcb_xkb_key_mod_map_t *)xcb_tmp; 16474 xcb_block_len += totalModMapKeys * sizeof(xcb_xkb_key_mod_map_t); 16475 xcb_tmp += xcb_block_len; 16476 xcb_align_to = ALIGNOF(xcb_xkb_key_mod_map_t); 16477 } 16478 if(present & XCB_XKB_MAP_PART_VIRTUAL_MOD_MAP) { 16479 /* insert padding */ 16480 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16481 xcb_buffer_len += xcb_block_len + xcb_pad; 16482 if (0 != xcb_pad) { 16483 xcb_tmp += xcb_pad; 16484 xcb_pad = 0; 16485 } 16486 xcb_block_len = 0; 16487 /* vmodmap_rtrn */ 16488 _aux->vmodmap_rtrn = (xcb_xkb_key_v_mod_map_t *)xcb_tmp; 16489 xcb_block_len += totalVModMapKeys * sizeof(xcb_xkb_key_v_mod_map_t); 16490 xcb_tmp += xcb_block_len; 16491 xcb_align_to = ALIGNOF(xcb_xkb_key_v_mod_map_t); 16492 } 16493 /* insert padding */ 16494 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 16495 xcb_buffer_len += xcb_block_len + xcb_pad; 16496 if (0 != xcb_pad) { 16497 xcb_tmp += xcb_pad; 16498 xcb_pad = 0; 16499 } 16500 xcb_block_len = 0; 16501 16502 return xcb_buffer_len; 16503 } 16504 16505 int 16506 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_sizeof (const void *_buffer /**< */, 16507 uint8_t nTypes /**< */, 16508 uint8_t nKeySyms /**< */, 16509 uint8_t nKeyActions /**< */, 16510 uint16_t totalActions /**< */, 16511 uint8_t totalKeyBehaviors /**< */, 16512 uint8_t nVModMapKeys /**< */, 16513 uint8_t totalKeyExplicit /**< */, 16514 uint8_t totalModMapKeys /**< */, 16515 uint8_t totalVModMapKeys /**< */, 16516 uint16_t present /**< */) 16517 { 16518 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t _aux; 16519 return xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack(_buffer, nTypes, nKeySyms, nKeyActions, totalActions, totalKeyBehaviors, nVModMapKeys, totalKeyExplicit, totalModMapKeys, totalVModMapKeys, present, &_aux); 16520 } 16521 16522 16523 /***************************************************************************** 16524 ** 16525 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names 16526 ** 16527 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16528 ** @returns xcb_atom_t * 16529 ** 16530 *****************************************************************************/ 16531 16532 xcb_atom_t * 16533 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16534 { 16535 return /* replies */ S->key_names.valueList.typeNames; 16536 } 16537 16538 16539 /***************************************************************************** 16540 ** 16541 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length 16542 ** 16543 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16544 ** @returns int 16545 ** 16546 *****************************************************************************/ 16547 16548 int 16549 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16550 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16551 { 16552 return /* replies */ S->key_names.nTypes; 16553 } 16554 16555 16556 /***************************************************************************** 16557 ** 16558 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end 16559 ** 16560 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16561 ** @returns xcb_generic_iterator_t 16562 ** 16563 *****************************************************************************/ 16564 16565 xcb_generic_iterator_t 16566 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16567 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16568 { 16569 xcb_generic_iterator_t i; 16570 i.data = /* replies */ S->key_names.valueList.typeNames + /* replies */ S->key_names.nTypes; 16571 i.rem = 0; 16572 i.index = (char *) i.data - (char *) S; 16573 return i; 16574 } 16575 16576 16577 /***************************************************************************** 16578 ** 16579 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type 16580 ** 16581 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16582 ** @returns uint8_t * 16583 ** 16584 *****************************************************************************/ 16585 16586 uint8_t * 16587 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16588 { 16589 return /* replies */ S->key_names.valueList.nLevelsPerType; 16590 } 16591 16592 16593 /***************************************************************************** 16594 ** 16595 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length 16596 ** 16597 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16598 ** @returns int 16599 ** 16600 *****************************************************************************/ 16601 16602 int 16603 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16604 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16605 { 16606 return /* replies */ S->key_names.nKTLevels; 16607 } 16608 16609 16610 /***************************************************************************** 16611 ** 16612 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end 16613 ** 16614 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16615 ** @returns xcb_generic_iterator_t 16616 ** 16617 *****************************************************************************/ 16618 16619 xcb_generic_iterator_t 16620 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16621 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16622 { 16623 xcb_generic_iterator_t i; 16624 i.data = /* replies */ S->key_names.valueList.nLevelsPerType + /* replies */ S->key_names.nKTLevels; 16625 i.rem = 0; 16626 i.index = (char *) i.data - (char *) S; 16627 return i; 16628 } 16629 16630 16631 /***************************************************************************** 16632 ** 16633 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names 16634 ** 16635 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16636 ** @returns xcb_atom_t * 16637 ** 16638 *****************************************************************************/ 16639 16640 xcb_atom_t * 16641 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16642 { 16643 return /* replies */ S->key_names.valueList.ktLevelNames; 16644 } 16645 16646 16647 /***************************************************************************** 16648 ** 16649 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length 16650 ** 16651 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16652 ** @returns int 16653 ** 16654 *****************************************************************************/ 16655 16656 int 16657 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16658 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16659 { 16660 return xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels); 16661 } 16662 16663 16664 /***************************************************************************** 16665 ** 16666 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end 16667 ** 16668 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16669 ** @returns xcb_generic_iterator_t 16670 ** 16671 *****************************************************************************/ 16672 16673 xcb_generic_iterator_t 16674 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16675 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16676 { 16677 xcb_generic_iterator_t i; 16678 i.data = /* replies */ S->key_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->key_names.valueList.nLevelsPerType, /* replies */ S->key_names.nKTLevels); 16679 i.rem = 0; 16680 i.index = (char *) i.data - (char *) S; 16681 return i; 16682 } 16683 16684 16685 /***************************************************************************** 16686 ** 16687 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names 16688 ** 16689 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16690 ** @returns xcb_atom_t * 16691 ** 16692 *****************************************************************************/ 16693 16694 xcb_atom_t * 16695 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16696 { 16697 return /* replies */ S->key_names.valueList.indicatorNames; 16698 } 16699 16700 16701 /***************************************************************************** 16702 ** 16703 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length 16704 ** 16705 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16706 ** @returns int 16707 ** 16708 *****************************************************************************/ 16709 16710 int 16711 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16712 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16713 { 16714 return xcb_popcount(/* replies */ S->key_names.indicators); 16715 } 16716 16717 16718 /***************************************************************************** 16719 ** 16720 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end 16721 ** 16722 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16723 ** @returns xcb_generic_iterator_t 16724 ** 16725 *****************************************************************************/ 16726 16727 xcb_generic_iterator_t 16728 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16729 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16730 { 16731 xcb_generic_iterator_t i; 16732 i.data = /* replies */ S->key_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->key_names.indicators); 16733 i.rem = 0; 16734 i.index = (char *) i.data - (char *) S; 16735 return i; 16736 } 16737 16738 16739 /***************************************************************************** 16740 ** 16741 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names 16742 ** 16743 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16744 ** @returns xcb_atom_t * 16745 ** 16746 *****************************************************************************/ 16747 16748 xcb_atom_t * 16749 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16750 { 16751 return /* replies */ S->key_names.valueList.virtualModNames; 16752 } 16753 16754 16755 /***************************************************************************** 16756 ** 16757 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length 16758 ** 16759 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16760 ** @returns int 16761 ** 16762 *****************************************************************************/ 16763 16764 int 16765 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16766 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16767 { 16768 return xcb_popcount(/* replies */ S->key_names.virtualMods); 16769 } 16770 16771 16772 /***************************************************************************** 16773 ** 16774 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end 16775 ** 16776 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16777 ** @returns xcb_generic_iterator_t 16778 ** 16779 *****************************************************************************/ 16780 16781 xcb_generic_iterator_t 16782 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16783 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16784 { 16785 xcb_generic_iterator_t i; 16786 i.data = /* replies */ S->key_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->key_names.virtualMods); 16787 i.rem = 0; 16788 i.index = (char *) i.data - (char *) S; 16789 return i; 16790 } 16791 16792 16793 /***************************************************************************** 16794 ** 16795 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups 16796 ** 16797 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16798 ** @returns xcb_atom_t * 16799 ** 16800 *****************************************************************************/ 16801 16802 xcb_atom_t * 16803 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16804 { 16805 return /* replies */ S->key_names.valueList.groups; 16806 } 16807 16808 16809 /***************************************************************************** 16810 ** 16811 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length 16812 ** 16813 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16814 ** @returns int 16815 ** 16816 *****************************************************************************/ 16817 16818 int 16819 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16820 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16821 { 16822 return xcb_popcount(/* replies */ S->key_names.groupNames); 16823 } 16824 16825 16826 /***************************************************************************** 16827 ** 16828 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end 16829 ** 16830 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16831 ** @returns xcb_generic_iterator_t 16832 ** 16833 *****************************************************************************/ 16834 16835 xcb_generic_iterator_t 16836 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16837 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16838 { 16839 xcb_generic_iterator_t i; 16840 i.data = /* replies */ S->key_names.valueList.groups + xcb_popcount(/* replies */ S->key_names.groupNames); 16841 i.rem = 0; 16842 i.index = (char *) i.data - (char *) S; 16843 return i; 16844 } 16845 16846 16847 /***************************************************************************** 16848 ** 16849 ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names 16850 ** 16851 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16852 ** @returns xcb_xkb_key_name_t * 16853 ** 16854 *****************************************************************************/ 16855 16856 xcb_xkb_key_name_t * 16857 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16858 { 16859 return /* replies */ S->key_names.valueList.keyNames; 16860 } 16861 16862 16863 /***************************************************************************** 16864 ** 16865 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length 16866 ** 16867 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16868 ** @returns int 16869 ** 16870 *****************************************************************************/ 16871 16872 int 16873 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16874 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16875 { 16876 return /* replies */ S->key_names.nKeys; 16877 } 16878 16879 16880 /***************************************************************************** 16881 ** 16882 ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator 16883 ** 16884 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16885 ** @returns xcb_xkb_key_name_iterator_t 16886 ** 16887 *****************************************************************************/ 16888 16889 xcb_xkb_key_name_iterator_t 16890 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16891 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16892 { 16893 xcb_xkb_key_name_iterator_t i; 16894 i.data = /* replies */ S->key_names.valueList.keyNames; 16895 i.rem = /* replies */ S->key_names.nKeys; 16896 i.index = (char *) i.data - (char *) S; 16897 return i; 16898 } 16899 16900 16901 /***************************************************************************** 16902 ** 16903 ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases 16904 ** 16905 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16906 ** @returns xcb_xkb_key_alias_t * 16907 ** 16908 *****************************************************************************/ 16909 16910 xcb_xkb_key_alias_t * 16911 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16912 { 16913 return /* replies */ S->key_names.valueList.keyAliases; 16914 } 16915 16916 16917 /***************************************************************************** 16918 ** 16919 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length 16920 ** 16921 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16922 ** @returns int 16923 ** 16924 *****************************************************************************/ 16925 16926 int 16927 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16928 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16929 { 16930 return /* replies */ S->key_names.nKeyAliases; 16931 } 16932 16933 16934 /***************************************************************************** 16935 ** 16936 ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator 16937 ** 16938 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16939 ** @returns xcb_xkb_key_alias_iterator_t 16940 ** 16941 *****************************************************************************/ 16942 16943 xcb_xkb_key_alias_iterator_t 16944 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16945 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16946 { 16947 xcb_xkb_key_alias_iterator_t i; 16948 i.data = /* replies */ S->key_names.valueList.keyAliases; 16949 i.rem = /* replies */ S->key_names.nKeyAliases; 16950 i.index = (char *) i.data - (char *) S; 16951 return i; 16952 } 16953 16954 16955 /***************************************************************************** 16956 ** 16957 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names 16958 ** 16959 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 16960 ** @returns xcb_atom_t * 16961 ** 16962 *****************************************************************************/ 16963 16964 xcb_atom_t * 16965 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16966 { 16967 return /* replies */ S->key_names.valueList.radioGroupNames; 16968 } 16969 16970 16971 /***************************************************************************** 16972 ** 16973 ** int xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length 16974 ** 16975 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16976 ** @returns int 16977 ** 16978 *****************************************************************************/ 16979 16980 int 16981 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16982 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 16983 { 16984 return /* replies */ S->key_names.nRadioGroups; 16985 } 16986 16987 16988 /***************************************************************************** 16989 ** 16990 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end 16991 ** 16992 ** @param const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *R 16993 ** @returns xcb_generic_iterator_t 16994 ** 16995 *****************************************************************************/ 16996 16997 xcb_generic_iterator_t 16998 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 16999 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17000 { 17001 xcb_generic_iterator_t i; 17002 i.data = /* replies */ S->key_names.valueList.radioGroupNames + /* replies */ S->key_names.nRadioGroups; 17003 i.rem = 0; 17004 i.index = (char *) i.data - (char *) S; 17005 return i; 17006 } 17007 17008 int 17009 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize (void **_buffer /**< */, 17010 uint8_t nTypes /**< */, 17011 uint16_t nKTLevels /**< */, 17012 uint32_t indicators /**< */, 17013 uint16_t virtualMods /**< */, 17014 uint8_t groupNames /**< */, 17015 uint8_t nKeys /**< */, 17016 uint8_t nKeyAliases /**< */, 17017 uint8_t nRadioGroups /**< */, 17018 uint32_t which /**< */, 17019 const xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */) 17020 { 17021 char *xcb_out = *_buffer; 17022 unsigned int xcb_buffer_len = 0; 17023 unsigned int xcb_align_to; 17024 17025 unsigned int xcb_pad = 0; 17026 char xcb_pad0[3] = {0, 0, 0}; 17027 struct iovec xcb_parts[25]; 17028 unsigned int xcb_parts_idx = 0; 17029 unsigned int xcb_block_len = 0; 17030 unsigned int i; 17031 char *xcb_tmp; 17032 17033 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 17034 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */ 17035 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName; 17036 xcb_block_len += sizeof(xcb_atom_t); 17037 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17038 xcb_parts_idx++; 17039 xcb_align_to = ALIGNOF(xcb_atom_t); 17040 } 17041 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 17042 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */ 17043 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName; 17044 xcb_block_len += sizeof(xcb_atom_t); 17045 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17046 xcb_parts_idx++; 17047 xcb_align_to = ALIGNOF(xcb_atom_t); 17048 } 17049 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 17050 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */ 17051 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName; 17052 xcb_block_len += sizeof(xcb_atom_t); 17053 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17054 xcb_parts_idx++; 17055 xcb_align_to = ALIGNOF(xcb_atom_t); 17056 } 17057 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 17058 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */ 17059 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName; 17060 xcb_block_len += sizeof(xcb_atom_t); 17061 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17062 xcb_parts_idx++; 17063 xcb_align_to = ALIGNOF(xcb_atom_t); 17064 } 17065 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 17066 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */ 17067 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName; 17068 xcb_block_len += sizeof(xcb_atom_t); 17069 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17070 xcb_parts_idx++; 17071 xcb_align_to = ALIGNOF(xcb_atom_t); 17072 } 17073 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 17074 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */ 17075 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName; 17076 xcb_block_len += sizeof(xcb_atom_t); 17077 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 17078 xcb_parts_idx++; 17079 xcb_align_to = ALIGNOF(xcb_atom_t); 17080 } 17081 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 17082 /* insert padding */ 17083 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17084 xcb_buffer_len += xcb_block_len + xcb_pad; 17085 if (0 != xcb_pad) { 17086 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17087 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17088 xcb_parts_idx++; 17089 xcb_pad = 0; 17090 } 17091 xcb_block_len = 0; 17092 /* typeNames */ 17093 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames; 17094 xcb_block_len += nTypes * sizeof(xcb_atom_t); 17095 xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t); 17096 xcb_parts_idx++; 17097 xcb_align_to = ALIGNOF(xcb_atom_t); 17098 } 17099 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 17100 /* insert padding */ 17101 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17102 xcb_buffer_len += xcb_block_len + xcb_pad; 17103 if (0 != xcb_pad) { 17104 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17105 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17106 xcb_parts_idx++; 17107 xcb_pad = 0; 17108 } 17109 xcb_block_len = 0; 17110 /* nLevelsPerType */ 17111 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType; 17112 xcb_block_len += nKTLevels * sizeof(uint8_t); 17113 xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t); 17114 xcb_parts_idx++; 17115 xcb_align_to = ALIGNOF(uint8_t); 17116 /* insert padding */ 17117 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17118 xcb_buffer_len += xcb_block_len + xcb_pad; 17119 if (0 != xcb_pad) { 17120 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17121 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17122 xcb_parts_idx++; 17123 xcb_pad = 0; 17124 } 17125 xcb_block_len = 0; 17126 /* ktLevelNames */ 17127 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames; 17128 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 17129 xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 17130 xcb_parts_idx++; 17131 xcb_align_to = ALIGNOF(xcb_atom_t); 17132 } 17133 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 17134 /* insert padding */ 17135 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17136 xcb_buffer_len += xcb_block_len + xcb_pad; 17137 if (0 != xcb_pad) { 17138 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17139 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17140 xcb_parts_idx++; 17141 xcb_pad = 0; 17142 } 17143 xcb_block_len = 0; 17144 /* indicatorNames */ 17145 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames; 17146 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 17147 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t); 17148 xcb_parts_idx++; 17149 xcb_align_to = ALIGNOF(xcb_atom_t); 17150 } 17151 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 17152 /* insert padding */ 17153 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17154 xcb_buffer_len += xcb_block_len + xcb_pad; 17155 if (0 != xcb_pad) { 17156 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17157 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17158 xcb_parts_idx++; 17159 xcb_pad = 0; 17160 } 17161 xcb_block_len = 0; 17162 /* virtualModNames */ 17163 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames; 17164 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 17165 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 17166 xcb_parts_idx++; 17167 xcb_align_to = ALIGNOF(xcb_atom_t); 17168 } 17169 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 17170 /* insert padding */ 17171 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17172 xcb_buffer_len += xcb_block_len + xcb_pad; 17173 if (0 != xcb_pad) { 17174 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17175 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17176 xcb_parts_idx++; 17177 xcb_pad = 0; 17178 } 17179 xcb_block_len = 0; 17180 /* groups */ 17181 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups; 17182 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 17183 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t); 17184 xcb_parts_idx++; 17185 xcb_align_to = ALIGNOF(xcb_atom_t); 17186 } 17187 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 17188 /* insert padding */ 17189 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17190 xcb_buffer_len += xcb_block_len + xcb_pad; 17191 if (0 != xcb_pad) { 17192 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17193 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17194 xcb_parts_idx++; 17195 xcb_pad = 0; 17196 } 17197 xcb_block_len = 0; 17198 /* keyNames */ 17199 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames; 17200 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 17201 xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t); 17202 xcb_parts_idx++; 17203 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 17204 } 17205 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 17206 /* insert padding */ 17207 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17208 xcb_buffer_len += xcb_block_len + xcb_pad; 17209 if (0 != xcb_pad) { 17210 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17211 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17212 xcb_parts_idx++; 17213 xcb_pad = 0; 17214 } 17215 xcb_block_len = 0; 17216 /* keyAliases */ 17217 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases; 17218 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 17219 xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 17220 xcb_parts_idx++; 17221 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 17222 } 17223 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 17224 /* insert padding */ 17225 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17226 xcb_buffer_len += xcb_block_len + xcb_pad; 17227 if (0 != xcb_pad) { 17228 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17229 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17230 xcb_parts_idx++; 17231 xcb_pad = 0; 17232 } 17233 xcb_block_len = 0; 17234 /* radioGroupNames */ 17235 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames; 17236 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 17237 xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t); 17238 xcb_parts_idx++; 17239 xcb_align_to = ALIGNOF(xcb_atom_t); 17240 } 17241 /* insert padding */ 17242 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17243 xcb_buffer_len += xcb_block_len + xcb_pad; 17244 if (0 != xcb_pad) { 17245 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 17246 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 17247 xcb_parts_idx++; 17248 xcb_pad = 0; 17249 } 17250 xcb_block_len = 0; 17251 17252 if (NULL == xcb_out) { 17253 /* allocate memory */ 17254 xcb_out = malloc(xcb_buffer_len); 17255 *_buffer = xcb_out; 17256 } 17257 17258 xcb_tmp = xcb_out; 17259 for(i=0; i<xcb_parts_idx; i++) { 17260 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 17261 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 17262 if (0 != xcb_parts[i].iov_len) 17263 xcb_tmp += xcb_parts[i].iov_len; 17264 } 17265 17266 return xcb_buffer_len; 17267 } 17268 17269 int 17270 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack (const void *_buffer /**< */, 17271 uint8_t nTypes /**< */, 17272 uint16_t nKTLevels /**< */, 17273 uint32_t indicators /**< */, 17274 uint16_t virtualMods /**< */, 17275 uint8_t groupNames /**< */, 17276 uint8_t nKeys /**< */, 17277 uint8_t nKeyAliases /**< */, 17278 uint8_t nRadioGroups /**< */, 17279 uint32_t which /**< */, 17280 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *_aux /**< */) 17281 { 17282 char *xcb_tmp = (char *)_buffer; 17283 unsigned int xcb_buffer_len = 0; 17284 unsigned int xcb_block_len = 0; 17285 unsigned int xcb_pad = 0; 17286 unsigned int xcb_align_to; 17287 17288 17289 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 17290 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.keycodesName */ 17291 _aux->keycodesName = *(xcb_atom_t *)xcb_tmp; 17292 xcb_block_len += sizeof(xcb_atom_t); 17293 xcb_tmp += sizeof(xcb_atom_t); 17294 xcb_align_to = ALIGNOF(xcb_atom_t); 17295 } 17296 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 17297 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.geometryName */ 17298 _aux->geometryName = *(xcb_atom_t *)xcb_tmp; 17299 xcb_block_len += sizeof(xcb_atom_t); 17300 xcb_tmp += sizeof(xcb_atom_t); 17301 xcb_align_to = ALIGNOF(xcb_atom_t); 17302 } 17303 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 17304 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.symbolsName */ 17305 _aux->symbolsName = *(xcb_atom_t *)xcb_tmp; 17306 xcb_block_len += sizeof(xcb_atom_t); 17307 xcb_tmp += sizeof(xcb_atom_t); 17308 xcb_align_to = ALIGNOF(xcb_atom_t); 17309 } 17310 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 17311 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.physSymbolsName */ 17312 _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp; 17313 xcb_block_len += sizeof(xcb_atom_t); 17314 xcb_tmp += sizeof(xcb_atom_t); 17315 xcb_align_to = ALIGNOF(xcb_atom_t); 17316 } 17317 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 17318 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.typesName */ 17319 _aux->typesName = *(xcb_atom_t *)xcb_tmp; 17320 xcb_block_len += sizeof(xcb_atom_t); 17321 xcb_tmp += sizeof(xcb_atom_t); 17322 xcb_align_to = ALIGNOF(xcb_atom_t); 17323 } 17324 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 17325 /* xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t.compatName */ 17326 _aux->compatName = *(xcb_atom_t *)xcb_tmp; 17327 xcb_block_len += sizeof(xcb_atom_t); 17328 xcb_tmp += sizeof(xcb_atom_t); 17329 xcb_align_to = ALIGNOF(xcb_atom_t); 17330 } 17331 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 17332 /* insert padding */ 17333 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17334 xcb_buffer_len += xcb_block_len + xcb_pad; 17335 if (0 != xcb_pad) { 17336 xcb_tmp += xcb_pad; 17337 xcb_pad = 0; 17338 } 17339 xcb_block_len = 0; 17340 /* typeNames */ 17341 _aux->typeNames = (xcb_atom_t *)xcb_tmp; 17342 xcb_block_len += nTypes * sizeof(xcb_atom_t); 17343 xcb_tmp += xcb_block_len; 17344 xcb_align_to = ALIGNOF(xcb_atom_t); 17345 } 17346 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 17347 /* insert padding */ 17348 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17349 xcb_buffer_len += xcb_block_len + xcb_pad; 17350 if (0 != xcb_pad) { 17351 xcb_tmp += xcb_pad; 17352 xcb_pad = 0; 17353 } 17354 xcb_block_len = 0; 17355 /* nLevelsPerType */ 17356 _aux->nLevelsPerType = (uint8_t *)xcb_tmp; 17357 xcb_block_len += nKTLevels * sizeof(uint8_t); 17358 xcb_tmp += xcb_block_len; 17359 xcb_align_to = ALIGNOF(uint8_t); 17360 /* insert padding */ 17361 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17362 xcb_buffer_len += xcb_block_len + xcb_pad; 17363 if (0 != xcb_pad) { 17364 xcb_tmp += xcb_pad; 17365 xcb_pad = 0; 17366 } 17367 xcb_block_len = 0; 17368 /* ktLevelNames */ 17369 _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp; 17370 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 17371 xcb_tmp += xcb_block_len; 17372 xcb_align_to = ALIGNOF(xcb_atom_t); 17373 } 17374 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 17375 /* insert padding */ 17376 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17377 xcb_buffer_len += xcb_block_len + xcb_pad; 17378 if (0 != xcb_pad) { 17379 xcb_tmp += xcb_pad; 17380 xcb_pad = 0; 17381 } 17382 xcb_block_len = 0; 17383 /* indicatorNames */ 17384 _aux->indicatorNames = (xcb_atom_t *)xcb_tmp; 17385 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 17386 xcb_tmp += xcb_block_len; 17387 xcb_align_to = ALIGNOF(xcb_atom_t); 17388 } 17389 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 17390 /* insert padding */ 17391 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17392 xcb_buffer_len += xcb_block_len + xcb_pad; 17393 if (0 != xcb_pad) { 17394 xcb_tmp += xcb_pad; 17395 xcb_pad = 0; 17396 } 17397 xcb_block_len = 0; 17398 /* virtualModNames */ 17399 _aux->virtualModNames = (xcb_atom_t *)xcb_tmp; 17400 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 17401 xcb_tmp += xcb_block_len; 17402 xcb_align_to = ALIGNOF(xcb_atom_t); 17403 } 17404 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 17405 /* insert padding */ 17406 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17407 xcb_buffer_len += xcb_block_len + xcb_pad; 17408 if (0 != xcb_pad) { 17409 xcb_tmp += xcb_pad; 17410 xcb_pad = 0; 17411 } 17412 xcb_block_len = 0; 17413 /* groups */ 17414 _aux->groups = (xcb_atom_t *)xcb_tmp; 17415 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 17416 xcb_tmp += xcb_block_len; 17417 xcb_align_to = ALIGNOF(xcb_atom_t); 17418 } 17419 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 17420 /* insert padding */ 17421 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17422 xcb_buffer_len += xcb_block_len + xcb_pad; 17423 if (0 != xcb_pad) { 17424 xcb_tmp += xcb_pad; 17425 xcb_pad = 0; 17426 } 17427 xcb_block_len = 0; 17428 /* keyNames */ 17429 _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp; 17430 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 17431 xcb_tmp += xcb_block_len; 17432 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 17433 } 17434 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 17435 /* insert padding */ 17436 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17437 xcb_buffer_len += xcb_block_len + xcb_pad; 17438 if (0 != xcb_pad) { 17439 xcb_tmp += xcb_pad; 17440 xcb_pad = 0; 17441 } 17442 xcb_block_len = 0; 17443 /* keyAliases */ 17444 _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp; 17445 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 17446 xcb_tmp += xcb_block_len; 17447 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 17448 } 17449 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 17450 /* insert padding */ 17451 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17452 xcb_buffer_len += xcb_block_len + xcb_pad; 17453 if (0 != xcb_pad) { 17454 xcb_tmp += xcb_pad; 17455 xcb_pad = 0; 17456 } 17457 xcb_block_len = 0; 17458 /* radioGroupNames */ 17459 _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp; 17460 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 17461 xcb_tmp += xcb_block_len; 17462 xcb_align_to = ALIGNOF(xcb_atom_t); 17463 } 17464 /* insert padding */ 17465 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 17466 xcb_buffer_len += xcb_block_len + xcb_pad; 17467 if (0 != xcb_pad) { 17468 xcb_tmp += xcb_pad; 17469 xcb_pad = 0; 17470 } 17471 xcb_block_len = 0; 17472 17473 return xcb_buffer_len; 17474 } 17475 17476 int 17477 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof (const void *_buffer /**< */, 17478 uint8_t nTypes /**< */, 17479 uint16_t nKTLevels /**< */, 17480 uint32_t indicators /**< */, 17481 uint16_t virtualMods /**< */, 17482 uint8_t groupNames /**< */, 17483 uint8_t nKeys /**< */, 17484 uint8_t nKeyAliases /**< */, 17485 uint8_t nRadioGroups /**< */, 17486 uint32_t which /**< */) 17487 { 17488 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t _aux; 17489 return xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux); 17490 } 17491 17492 17493 /***************************************************************************** 17494 ** 17495 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names 17496 ** 17497 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17498 ** @returns xcb_atom_t * 17499 ** 17500 *****************************************************************************/ 17501 17502 xcb_atom_t * 17503 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17504 { 17505 return /* replies */ S->other_names.valueList.typeNames; 17506 } 17507 17508 17509 /***************************************************************************** 17510 ** 17511 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length 17512 ** 17513 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17514 ** @returns int 17515 ** 17516 *****************************************************************************/ 17517 17518 int 17519 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17520 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17521 { 17522 return /* replies */ S->other_names.nTypes; 17523 } 17524 17525 17526 /***************************************************************************** 17527 ** 17528 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end 17529 ** 17530 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17531 ** @returns xcb_generic_iterator_t 17532 ** 17533 *****************************************************************************/ 17534 17535 xcb_generic_iterator_t 17536 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_type_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17537 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17538 { 17539 xcb_generic_iterator_t i; 17540 i.data = /* replies */ S->other_names.valueList.typeNames + /* replies */ S->other_names.nTypes; 17541 i.rem = 0; 17542 i.index = (char *) i.data - (char *) S; 17543 return i; 17544 } 17545 17546 17547 /***************************************************************************** 17548 ** 17549 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type 17550 ** 17551 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17552 ** @returns uint8_t * 17553 ** 17554 *****************************************************************************/ 17555 17556 uint8_t * 17557 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17558 { 17559 return /* replies */ S->other_names.valueList.nLevelsPerType; 17560 } 17561 17562 17563 /***************************************************************************** 17564 ** 17565 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length 17566 ** 17567 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17568 ** @returns int 17569 ** 17570 *****************************************************************************/ 17571 17572 int 17573 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17574 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17575 { 17576 return /* replies */ S->other_names.nKTLevels; 17577 } 17578 17579 17580 /***************************************************************************** 17581 ** 17582 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end 17583 ** 17584 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17585 ** @returns xcb_generic_iterator_t 17586 ** 17587 *****************************************************************************/ 17588 17589 xcb_generic_iterator_t 17590 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_n_levels_per_type_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17591 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17592 { 17593 xcb_generic_iterator_t i; 17594 i.data = /* replies */ S->other_names.valueList.nLevelsPerType + /* replies */ S->other_names.nKTLevels; 17595 i.rem = 0; 17596 i.index = (char *) i.data - (char *) S; 17597 return i; 17598 } 17599 17600 17601 /***************************************************************************** 17602 ** 17603 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names 17604 ** 17605 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17606 ** @returns xcb_atom_t * 17607 ** 17608 *****************************************************************************/ 17609 17610 xcb_atom_t * 17611 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17612 { 17613 return /* replies */ S->other_names.valueList.ktLevelNames; 17614 } 17615 17616 17617 /***************************************************************************** 17618 ** 17619 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length 17620 ** 17621 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17622 ** @returns int 17623 ** 17624 *****************************************************************************/ 17625 17626 int 17627 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17628 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17629 { 17630 return xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels); 17631 } 17632 17633 17634 /***************************************************************************** 17635 ** 17636 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end 17637 ** 17638 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17639 ** @returns xcb_generic_iterator_t 17640 ** 17641 *****************************************************************************/ 17642 17643 xcb_generic_iterator_t 17644 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_kt_level_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17645 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17646 { 17647 xcb_generic_iterator_t i; 17648 i.data = /* replies */ S->other_names.valueList.ktLevelNames + xcb_sumof(/* replies */ S->other_names.valueList.nLevelsPerType, /* replies */ S->other_names.nKTLevels); 17649 i.rem = 0; 17650 i.index = (char *) i.data - (char *) S; 17651 return i; 17652 } 17653 17654 17655 /***************************************************************************** 17656 ** 17657 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names 17658 ** 17659 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17660 ** @returns xcb_atom_t * 17661 ** 17662 *****************************************************************************/ 17663 17664 xcb_atom_t * 17665 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17666 { 17667 return /* replies */ S->other_names.valueList.indicatorNames; 17668 } 17669 17670 17671 /***************************************************************************** 17672 ** 17673 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length 17674 ** 17675 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17676 ** @returns int 17677 ** 17678 *****************************************************************************/ 17679 17680 int 17681 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17682 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17683 { 17684 return xcb_popcount(/* replies */ S->other_names.indicators); 17685 } 17686 17687 17688 /***************************************************************************** 17689 ** 17690 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end 17691 ** 17692 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17693 ** @returns xcb_generic_iterator_t 17694 ** 17695 *****************************************************************************/ 17696 17697 xcb_generic_iterator_t 17698 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_indicator_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17699 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17700 { 17701 xcb_generic_iterator_t i; 17702 i.data = /* replies */ S->other_names.valueList.indicatorNames + xcb_popcount(/* replies */ S->other_names.indicators); 17703 i.rem = 0; 17704 i.index = (char *) i.data - (char *) S; 17705 return i; 17706 } 17707 17708 17709 /***************************************************************************** 17710 ** 17711 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names 17712 ** 17713 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17714 ** @returns xcb_atom_t * 17715 ** 17716 *****************************************************************************/ 17717 17718 xcb_atom_t * 17719 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17720 { 17721 return /* replies */ S->other_names.valueList.virtualModNames; 17722 } 17723 17724 17725 /***************************************************************************** 17726 ** 17727 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length 17728 ** 17729 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17730 ** @returns int 17731 ** 17732 *****************************************************************************/ 17733 17734 int 17735 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17736 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17737 { 17738 return xcb_popcount(/* replies */ S->other_names.virtualMods); 17739 } 17740 17741 17742 /***************************************************************************** 17743 ** 17744 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end 17745 ** 17746 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17747 ** @returns xcb_generic_iterator_t 17748 ** 17749 *****************************************************************************/ 17750 17751 xcb_generic_iterator_t 17752 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_virtual_mod_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17753 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17754 { 17755 xcb_generic_iterator_t i; 17756 i.data = /* replies */ S->other_names.valueList.virtualModNames + xcb_popcount(/* replies */ S->other_names.virtualMods); 17757 i.rem = 0; 17758 i.index = (char *) i.data - (char *) S; 17759 return i; 17760 } 17761 17762 17763 /***************************************************************************** 17764 ** 17765 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups 17766 ** 17767 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17768 ** @returns xcb_atom_t * 17769 ** 17770 *****************************************************************************/ 17771 17772 xcb_atom_t * 17773 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17774 { 17775 return /* replies */ S->other_names.valueList.groups; 17776 } 17777 17778 17779 /***************************************************************************** 17780 ** 17781 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length 17782 ** 17783 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17784 ** @returns int 17785 ** 17786 *****************************************************************************/ 17787 17788 int 17789 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17790 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17791 { 17792 return xcb_popcount(/* replies */ S->other_names.groupNames); 17793 } 17794 17795 17796 /***************************************************************************** 17797 ** 17798 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end 17799 ** 17800 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17801 ** @returns xcb_generic_iterator_t 17802 ** 17803 *****************************************************************************/ 17804 17805 xcb_generic_iterator_t 17806 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_groups_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17807 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17808 { 17809 xcb_generic_iterator_t i; 17810 i.data = /* replies */ S->other_names.valueList.groups + xcb_popcount(/* replies */ S->other_names.groupNames); 17811 i.rem = 0; 17812 i.index = (char *) i.data - (char *) S; 17813 return i; 17814 } 17815 17816 17817 /***************************************************************************** 17818 ** 17819 ** xcb_xkb_key_name_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names 17820 ** 17821 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17822 ** @returns xcb_xkb_key_name_t * 17823 ** 17824 *****************************************************************************/ 17825 17826 xcb_xkb_key_name_t * 17827 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17828 { 17829 return /* replies */ S->other_names.valueList.keyNames; 17830 } 17831 17832 17833 /***************************************************************************** 17834 ** 17835 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length 17836 ** 17837 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17838 ** @returns int 17839 ** 17840 *****************************************************************************/ 17841 17842 int 17843 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17844 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17845 { 17846 return /* replies */ S->other_names.nKeys; 17847 } 17848 17849 17850 /***************************************************************************** 17851 ** 17852 ** xcb_xkb_key_name_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator 17853 ** 17854 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17855 ** @returns xcb_xkb_key_name_iterator_t 17856 ** 17857 *****************************************************************************/ 17858 17859 xcb_xkb_key_name_iterator_t 17860 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_names_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17861 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17862 { 17863 xcb_xkb_key_name_iterator_t i; 17864 i.data = /* replies */ S->other_names.valueList.keyNames; 17865 i.rem = /* replies */ S->other_names.nKeys; 17866 i.index = (char *) i.data - (char *) S; 17867 return i; 17868 } 17869 17870 17871 /***************************************************************************** 17872 ** 17873 ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases 17874 ** 17875 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17876 ** @returns xcb_xkb_key_alias_t * 17877 ** 17878 *****************************************************************************/ 17879 17880 xcb_xkb_key_alias_t * 17881 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17882 { 17883 return /* replies */ S->other_names.valueList.keyAliases; 17884 } 17885 17886 17887 /***************************************************************************** 17888 ** 17889 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length 17890 ** 17891 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17892 ** @returns int 17893 ** 17894 *****************************************************************************/ 17895 17896 int 17897 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17898 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17899 { 17900 return /* replies */ S->other_names.nKeyAliases; 17901 } 17902 17903 17904 /***************************************************************************** 17905 ** 17906 ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator 17907 ** 17908 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17909 ** @returns xcb_xkb_key_alias_iterator_t 17910 ** 17911 *****************************************************************************/ 17912 17913 xcb_xkb_key_alias_iterator_t 17914 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17915 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17916 { 17917 xcb_xkb_key_alias_iterator_t i; 17918 i.data = /* replies */ S->other_names.valueList.keyAliases; 17919 i.rem = /* replies */ S->other_names.nKeyAliases; 17920 i.index = (char *) i.data - (char *) S; 17921 return i; 17922 } 17923 17924 17925 /***************************************************************************** 17926 ** 17927 ** xcb_atom_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names 17928 ** 17929 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 17930 ** @returns xcb_atom_t * 17931 ** 17932 *****************************************************************************/ 17933 17934 xcb_atom_t * 17935 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17936 { 17937 return /* replies */ S->other_names.valueList.radioGroupNames; 17938 } 17939 17940 17941 /***************************************************************************** 17942 ** 17943 ** int xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length 17944 ** 17945 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17946 ** @returns int 17947 ** 17948 *****************************************************************************/ 17949 17950 int 17951 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17952 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17953 { 17954 return /* replies */ S->other_names.nRadioGroups; 17955 } 17956 17957 17958 /***************************************************************************** 17959 ** 17960 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end 17961 ** 17962 ** @param const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *R 17963 ** @returns xcb_generic_iterator_t 17964 ** 17965 *****************************************************************************/ 17966 17967 xcb_generic_iterator_t 17968 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_radio_group_names_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 17969 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 17970 { 17971 xcb_generic_iterator_t i; 17972 i.data = /* replies */ S->other_names.valueList.radioGroupNames + /* replies */ S->other_names.nRadioGroups; 17973 i.rem = 0; 17974 i.index = (char *) i.data - (char *) S; 17975 return i; 17976 } 17977 17978 int 17979 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize (void **_buffer /**< */, 17980 uint8_t nTypes /**< */, 17981 uint16_t nKTLevels /**< */, 17982 uint32_t indicators /**< */, 17983 uint16_t virtualMods /**< */, 17984 uint8_t groupNames /**< */, 17985 uint8_t nKeys /**< */, 17986 uint8_t nKeyAliases /**< */, 17987 uint8_t nRadioGroups /**< */, 17988 uint32_t which /**< */, 17989 const xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */) 17990 { 17991 char *xcb_out = *_buffer; 17992 unsigned int xcb_buffer_len = 0; 17993 unsigned int xcb_align_to; 17994 17995 unsigned int xcb_pad = 0; 17996 char xcb_pad0[3] = {0, 0, 0}; 17997 struct iovec xcb_parts[25]; 17998 unsigned int xcb_parts_idx = 0; 17999 unsigned int xcb_block_len = 0; 18000 unsigned int i; 18001 char *xcb_tmp; 18002 18003 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 18004 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.keycodesName */ 18005 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->keycodesName; 18006 xcb_block_len += sizeof(xcb_atom_t); 18007 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18008 xcb_parts_idx++; 18009 xcb_align_to = ALIGNOF(xcb_atom_t); 18010 } 18011 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 18012 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.geometryName */ 18013 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometryName; 18014 xcb_block_len += sizeof(xcb_atom_t); 18015 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18016 xcb_parts_idx++; 18017 xcb_align_to = ALIGNOF(xcb_atom_t); 18018 } 18019 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 18020 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.symbolsName */ 18021 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->symbolsName; 18022 xcb_block_len += sizeof(xcb_atom_t); 18023 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18024 xcb_parts_idx++; 18025 xcb_align_to = ALIGNOF(xcb_atom_t); 18026 } 18027 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 18028 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.physSymbolsName */ 18029 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->physSymbolsName; 18030 xcb_block_len += sizeof(xcb_atom_t); 18031 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18032 xcb_parts_idx++; 18033 xcb_align_to = ALIGNOF(xcb_atom_t); 18034 } 18035 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 18036 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.typesName */ 18037 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->typesName; 18038 xcb_block_len += sizeof(xcb_atom_t); 18039 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18040 xcb_parts_idx++; 18041 xcb_align_to = ALIGNOF(xcb_atom_t); 18042 } 18043 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 18044 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.compatName */ 18045 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compatName; 18046 xcb_block_len += sizeof(xcb_atom_t); 18047 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 18048 xcb_parts_idx++; 18049 xcb_align_to = ALIGNOF(xcb_atom_t); 18050 } 18051 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 18052 /* insert padding */ 18053 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18054 xcb_buffer_len += xcb_block_len + xcb_pad; 18055 if (0 != xcb_pad) { 18056 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18057 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18058 xcb_parts_idx++; 18059 xcb_pad = 0; 18060 } 18061 xcb_block_len = 0; 18062 /* typeNames */ 18063 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->typeNames; 18064 xcb_block_len += nTypes * sizeof(xcb_atom_t); 18065 xcb_parts[xcb_parts_idx].iov_len = nTypes * sizeof(xcb_atom_t); 18066 xcb_parts_idx++; 18067 xcb_align_to = ALIGNOF(xcb_atom_t); 18068 } 18069 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 18070 /* insert padding */ 18071 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18072 xcb_buffer_len += xcb_block_len + xcb_pad; 18073 if (0 != xcb_pad) { 18074 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18075 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18076 xcb_parts_idx++; 18077 xcb_pad = 0; 18078 } 18079 xcb_block_len = 0; 18080 /* nLevelsPerType */ 18081 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->nLevelsPerType; 18082 xcb_block_len += nKTLevels * sizeof(uint8_t); 18083 xcb_parts[xcb_parts_idx].iov_len = nKTLevels * sizeof(uint8_t); 18084 xcb_parts_idx++; 18085 xcb_align_to = ALIGNOF(uint8_t); 18086 /* insert padding */ 18087 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18088 xcb_buffer_len += xcb_block_len + xcb_pad; 18089 if (0 != xcb_pad) { 18090 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18091 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18092 xcb_parts_idx++; 18093 xcb_pad = 0; 18094 } 18095 xcb_block_len = 0; 18096 /* ktLevelNames */ 18097 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->ktLevelNames; 18098 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 18099 xcb_parts[xcb_parts_idx].iov_len = xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 18100 xcb_parts_idx++; 18101 xcb_align_to = ALIGNOF(xcb_atom_t); 18102 } 18103 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 18104 /* insert padding */ 18105 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18106 xcb_buffer_len += xcb_block_len + xcb_pad; 18107 if (0 != xcb_pad) { 18108 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18109 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18110 xcb_parts_idx++; 18111 xcb_pad = 0; 18112 } 18113 xcb_block_len = 0; 18114 /* indicatorNames */ 18115 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicatorNames; 18116 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 18117 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(indicators) * sizeof(xcb_atom_t); 18118 xcb_parts_idx++; 18119 xcb_align_to = ALIGNOF(xcb_atom_t); 18120 } 18121 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 18122 /* insert padding */ 18123 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18124 xcb_buffer_len += xcb_block_len + xcb_pad; 18125 if (0 != xcb_pad) { 18126 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18127 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18128 xcb_parts_idx++; 18129 xcb_pad = 0; 18130 } 18131 xcb_block_len = 0; 18132 /* virtualModNames */ 18133 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->virtualModNames; 18134 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 18135 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 18136 xcb_parts_idx++; 18137 xcb_align_to = ALIGNOF(xcb_atom_t); 18138 } 18139 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 18140 /* insert padding */ 18141 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18142 xcb_buffer_len += xcb_block_len + xcb_pad; 18143 if (0 != xcb_pad) { 18144 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18145 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18146 xcb_parts_idx++; 18147 xcb_pad = 0; 18148 } 18149 xcb_block_len = 0; 18150 /* groups */ 18151 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->groups; 18152 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 18153 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(groupNames) * sizeof(xcb_atom_t); 18154 xcb_parts_idx++; 18155 xcb_align_to = ALIGNOF(xcb_atom_t); 18156 } 18157 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 18158 /* insert padding */ 18159 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18160 xcb_buffer_len += xcb_block_len + xcb_pad; 18161 if (0 != xcb_pad) { 18162 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18163 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18164 xcb_parts_idx++; 18165 xcb_pad = 0; 18166 } 18167 xcb_block_len = 0; 18168 /* keyNames */ 18169 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyNames; 18170 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 18171 xcb_parts[xcb_parts_idx].iov_len = nKeys * sizeof(xcb_xkb_key_name_t); 18172 xcb_parts_idx++; 18173 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 18174 } 18175 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 18176 /* insert padding */ 18177 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18178 xcb_buffer_len += xcb_block_len + xcb_pad; 18179 if (0 != xcb_pad) { 18180 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18181 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18182 xcb_parts_idx++; 18183 xcb_pad = 0; 18184 } 18185 xcb_block_len = 0; 18186 /* keyAliases */ 18187 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->keyAliases; 18188 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 18189 xcb_parts[xcb_parts_idx].iov_len = nKeyAliases * sizeof(xcb_xkb_key_alias_t); 18190 xcb_parts_idx++; 18191 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 18192 } 18193 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 18194 /* insert padding */ 18195 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18196 xcb_buffer_len += xcb_block_len + xcb_pad; 18197 if (0 != xcb_pad) { 18198 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18199 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18200 xcb_parts_idx++; 18201 xcb_pad = 0; 18202 } 18203 xcb_block_len = 0; 18204 /* radioGroupNames */ 18205 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->radioGroupNames; 18206 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 18207 xcb_parts[xcb_parts_idx].iov_len = nRadioGroups * sizeof(xcb_atom_t); 18208 xcb_parts_idx++; 18209 xcb_align_to = ALIGNOF(xcb_atom_t); 18210 } 18211 /* insert padding */ 18212 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18213 xcb_buffer_len += xcb_block_len + xcb_pad; 18214 if (0 != xcb_pad) { 18215 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 18216 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 18217 xcb_parts_idx++; 18218 xcb_pad = 0; 18219 } 18220 xcb_block_len = 0; 18221 18222 if (NULL == xcb_out) { 18223 /* allocate memory */ 18224 xcb_out = malloc(xcb_buffer_len); 18225 *_buffer = xcb_out; 18226 } 18227 18228 xcb_tmp = xcb_out; 18229 for(i=0; i<xcb_parts_idx; i++) { 18230 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 18231 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 18232 if (0 != xcb_parts[i].iov_len) 18233 xcb_tmp += xcb_parts[i].iov_len; 18234 } 18235 18236 return xcb_buffer_len; 18237 } 18238 18239 int 18240 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack (const void *_buffer /**< */, 18241 uint8_t nTypes /**< */, 18242 uint16_t nKTLevels /**< */, 18243 uint32_t indicators /**< */, 18244 uint16_t virtualMods /**< */, 18245 uint8_t groupNames /**< */, 18246 uint8_t nKeys /**< */, 18247 uint8_t nKeyAliases /**< */, 18248 uint8_t nRadioGroups /**< */, 18249 uint32_t which /**< */, 18250 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *_aux /**< */) 18251 { 18252 char *xcb_tmp = (char *)_buffer; 18253 unsigned int xcb_buffer_len = 0; 18254 unsigned int xcb_block_len = 0; 18255 unsigned int xcb_pad = 0; 18256 unsigned int xcb_align_to; 18257 18258 18259 if(which & XCB_XKB_NAME_DETAIL_KEYCODES) { 18260 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.keycodesName */ 18261 _aux->keycodesName = *(xcb_atom_t *)xcb_tmp; 18262 xcb_block_len += sizeof(xcb_atom_t); 18263 xcb_tmp += sizeof(xcb_atom_t); 18264 xcb_align_to = ALIGNOF(xcb_atom_t); 18265 } 18266 if(which & XCB_XKB_NAME_DETAIL_GEOMETRY) { 18267 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.geometryName */ 18268 _aux->geometryName = *(xcb_atom_t *)xcb_tmp; 18269 xcb_block_len += sizeof(xcb_atom_t); 18270 xcb_tmp += sizeof(xcb_atom_t); 18271 xcb_align_to = ALIGNOF(xcb_atom_t); 18272 } 18273 if(which & XCB_XKB_NAME_DETAIL_SYMBOLS) { 18274 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.symbolsName */ 18275 _aux->symbolsName = *(xcb_atom_t *)xcb_tmp; 18276 xcb_block_len += sizeof(xcb_atom_t); 18277 xcb_tmp += sizeof(xcb_atom_t); 18278 xcb_align_to = ALIGNOF(xcb_atom_t); 18279 } 18280 if(which & XCB_XKB_NAME_DETAIL_PHYS_SYMBOLS) { 18281 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.physSymbolsName */ 18282 _aux->physSymbolsName = *(xcb_atom_t *)xcb_tmp; 18283 xcb_block_len += sizeof(xcb_atom_t); 18284 xcb_tmp += sizeof(xcb_atom_t); 18285 xcb_align_to = ALIGNOF(xcb_atom_t); 18286 } 18287 if(which & XCB_XKB_NAME_DETAIL_TYPES) { 18288 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.typesName */ 18289 _aux->typesName = *(xcb_atom_t *)xcb_tmp; 18290 xcb_block_len += sizeof(xcb_atom_t); 18291 xcb_tmp += sizeof(xcb_atom_t); 18292 xcb_align_to = ALIGNOF(xcb_atom_t); 18293 } 18294 if(which & XCB_XKB_NAME_DETAIL_COMPAT) { 18295 /* xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t.compatName */ 18296 _aux->compatName = *(xcb_atom_t *)xcb_tmp; 18297 xcb_block_len += sizeof(xcb_atom_t); 18298 xcb_tmp += sizeof(xcb_atom_t); 18299 xcb_align_to = ALIGNOF(xcb_atom_t); 18300 } 18301 if(which & XCB_XKB_NAME_DETAIL_KEY_TYPE_NAMES) { 18302 /* insert padding */ 18303 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18304 xcb_buffer_len += xcb_block_len + xcb_pad; 18305 if (0 != xcb_pad) { 18306 xcb_tmp += xcb_pad; 18307 xcb_pad = 0; 18308 } 18309 xcb_block_len = 0; 18310 /* typeNames */ 18311 _aux->typeNames = (xcb_atom_t *)xcb_tmp; 18312 xcb_block_len += nTypes * sizeof(xcb_atom_t); 18313 xcb_tmp += xcb_block_len; 18314 xcb_align_to = ALIGNOF(xcb_atom_t); 18315 } 18316 if(which & XCB_XKB_NAME_DETAIL_KT_LEVEL_NAMES) { 18317 /* insert padding */ 18318 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18319 xcb_buffer_len += xcb_block_len + xcb_pad; 18320 if (0 != xcb_pad) { 18321 xcb_tmp += xcb_pad; 18322 xcb_pad = 0; 18323 } 18324 xcb_block_len = 0; 18325 /* nLevelsPerType */ 18326 _aux->nLevelsPerType = (uint8_t *)xcb_tmp; 18327 xcb_block_len += nKTLevels * sizeof(uint8_t); 18328 xcb_tmp += xcb_block_len; 18329 xcb_align_to = ALIGNOF(uint8_t); 18330 /* insert padding */ 18331 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18332 xcb_buffer_len += xcb_block_len + xcb_pad; 18333 if (0 != xcb_pad) { 18334 xcb_tmp += xcb_pad; 18335 xcb_pad = 0; 18336 } 18337 xcb_block_len = 0; 18338 /* ktLevelNames */ 18339 _aux->ktLevelNames = (xcb_atom_t *)xcb_tmp; 18340 xcb_block_len += xcb_sumof(_aux->nLevelsPerType, nKTLevels) * sizeof(xcb_atom_t); 18341 xcb_tmp += xcb_block_len; 18342 xcb_align_to = ALIGNOF(xcb_atom_t); 18343 } 18344 if(which & XCB_XKB_NAME_DETAIL_INDICATOR_NAMES) { 18345 /* insert padding */ 18346 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18347 xcb_buffer_len += xcb_block_len + xcb_pad; 18348 if (0 != xcb_pad) { 18349 xcb_tmp += xcb_pad; 18350 xcb_pad = 0; 18351 } 18352 xcb_block_len = 0; 18353 /* indicatorNames */ 18354 _aux->indicatorNames = (xcb_atom_t *)xcb_tmp; 18355 xcb_block_len += xcb_popcount(indicators) * sizeof(xcb_atom_t); 18356 xcb_tmp += xcb_block_len; 18357 xcb_align_to = ALIGNOF(xcb_atom_t); 18358 } 18359 if(which & XCB_XKB_NAME_DETAIL_VIRTUAL_MOD_NAMES) { 18360 /* insert padding */ 18361 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18362 xcb_buffer_len += xcb_block_len + xcb_pad; 18363 if (0 != xcb_pad) { 18364 xcb_tmp += xcb_pad; 18365 xcb_pad = 0; 18366 } 18367 xcb_block_len = 0; 18368 /* virtualModNames */ 18369 _aux->virtualModNames = (xcb_atom_t *)xcb_tmp; 18370 xcb_block_len += xcb_popcount(virtualMods) * sizeof(xcb_atom_t); 18371 xcb_tmp += xcb_block_len; 18372 xcb_align_to = ALIGNOF(xcb_atom_t); 18373 } 18374 if(which & XCB_XKB_NAME_DETAIL_GROUP_NAMES) { 18375 /* insert padding */ 18376 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18377 xcb_buffer_len += xcb_block_len + xcb_pad; 18378 if (0 != xcb_pad) { 18379 xcb_tmp += xcb_pad; 18380 xcb_pad = 0; 18381 } 18382 xcb_block_len = 0; 18383 /* groups */ 18384 _aux->groups = (xcb_atom_t *)xcb_tmp; 18385 xcb_block_len += xcb_popcount(groupNames) * sizeof(xcb_atom_t); 18386 xcb_tmp += xcb_block_len; 18387 xcb_align_to = ALIGNOF(xcb_atom_t); 18388 } 18389 if(which & XCB_XKB_NAME_DETAIL_KEY_NAMES) { 18390 /* insert padding */ 18391 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18392 xcb_buffer_len += xcb_block_len + xcb_pad; 18393 if (0 != xcb_pad) { 18394 xcb_tmp += xcb_pad; 18395 xcb_pad = 0; 18396 } 18397 xcb_block_len = 0; 18398 /* keyNames */ 18399 _aux->keyNames = (xcb_xkb_key_name_t *)xcb_tmp; 18400 xcb_block_len += nKeys * sizeof(xcb_xkb_key_name_t); 18401 xcb_tmp += xcb_block_len; 18402 xcb_align_to = ALIGNOF(xcb_xkb_key_name_t); 18403 } 18404 if(which & XCB_XKB_NAME_DETAIL_KEY_ALIASES) { 18405 /* insert padding */ 18406 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18407 xcb_buffer_len += xcb_block_len + xcb_pad; 18408 if (0 != xcb_pad) { 18409 xcb_tmp += xcb_pad; 18410 xcb_pad = 0; 18411 } 18412 xcb_block_len = 0; 18413 /* keyAliases */ 18414 _aux->keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp; 18415 xcb_block_len += nKeyAliases * sizeof(xcb_xkb_key_alias_t); 18416 xcb_tmp += xcb_block_len; 18417 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 18418 } 18419 if(which & XCB_XKB_NAME_DETAIL_RG_NAMES) { 18420 /* insert padding */ 18421 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18422 xcb_buffer_len += xcb_block_len + xcb_pad; 18423 if (0 != xcb_pad) { 18424 xcb_tmp += xcb_pad; 18425 xcb_pad = 0; 18426 } 18427 xcb_block_len = 0; 18428 /* radioGroupNames */ 18429 _aux->radioGroupNames = (xcb_atom_t *)xcb_tmp; 18430 xcb_block_len += nRadioGroups * sizeof(xcb_atom_t); 18431 xcb_tmp += xcb_block_len; 18432 xcb_align_to = ALIGNOF(xcb_atom_t); 18433 } 18434 /* insert padding */ 18435 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 18436 xcb_buffer_len += xcb_block_len + xcb_pad; 18437 if (0 != xcb_pad) { 18438 xcb_tmp += xcb_pad; 18439 xcb_pad = 0; 18440 } 18441 xcb_block_len = 0; 18442 18443 return xcb_buffer_len; 18444 } 18445 18446 int 18447 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_sizeof (const void *_buffer /**< */, 18448 uint8_t nTypes /**< */, 18449 uint16_t nKTLevels /**< */, 18450 uint32_t indicators /**< */, 18451 uint16_t virtualMods /**< */, 18452 uint8_t groupNames /**< */, 18453 uint8_t nKeys /**< */, 18454 uint8_t nKeyAliases /**< */, 18455 uint8_t nRadioGroups /**< */, 18456 uint32_t which /**< */) 18457 { 18458 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t _aux; 18459 return xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack(_buffer, nTypes, nKTLevels, indicators, virtualMods, groupNames, nKeys, nKeyAliases, nRadioGroups, which, &_aux); 18460 } 18461 18462 18463 /***************************************************************************** 18464 ** 18465 ** xcb_xkb_get_kbd_by_name_replies_types_map_t * xcb_xkb_get_kbd_by_name_replies_types_map 18466 ** 18467 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18468 ** @returns xcb_xkb_get_kbd_by_name_replies_types_map_t * 18469 ** 18470 *****************************************************************************/ 18471 18472 xcb_xkb_get_kbd_by_name_replies_types_map_t * 18473 xcb_xkb_get_kbd_by_name_replies_types_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18474 { 18475 return (xcb_xkb_get_kbd_by_name_replies_types_map_t *) (R + 1); 18476 } 18477 18478 18479 /***************************************************************************** 18480 ** 18481 ** uint8_t * xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn 18482 ** 18483 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 18484 ** @returns uint8_t * 18485 ** 18486 *****************************************************************************/ 18487 18488 uint8_t * 18489 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18490 { 18491 return /* replies */ S->compat_map.si_rtrn; 18492 } 18493 18494 18495 /***************************************************************************** 18496 ** 18497 ** int xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length 18498 ** 18499 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18500 ** @returns int 18501 ** 18502 *****************************************************************************/ 18503 18504 int 18505 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18506 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18507 { 18508 return (16 * /* replies */ S->compat_map.nSIRtrn); 18509 } 18510 18511 18512 /***************************************************************************** 18513 ** 18514 ** xcb_generic_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end 18515 ** 18516 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18517 ** @returns xcb_generic_iterator_t 18518 ** 18519 *****************************************************************************/ 18520 18521 xcb_generic_iterator_t 18522 xcb_xkb_get_kbd_by_name_replies_compat_map_si_rtrn_end (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18523 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18524 { 18525 xcb_generic_iterator_t i; 18526 i.data = /* replies */ S->compat_map.si_rtrn + (16 * /* replies */ S->compat_map.nSIRtrn); 18527 i.rem = 0; 18528 i.index = (char *) i.data - (char *) S; 18529 return i; 18530 } 18531 18532 18533 /***************************************************************************** 18534 ** 18535 ** xcb_xkb_mod_def_t * xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn 18536 ** 18537 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 18538 ** @returns xcb_xkb_mod_def_t * 18539 ** 18540 *****************************************************************************/ 18541 18542 xcb_xkb_mod_def_t * 18543 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18544 { 18545 return /* replies */ S->compat_map.group_rtrn; 18546 } 18547 18548 18549 /***************************************************************************** 18550 ** 18551 ** int xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length 18552 ** 18553 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18554 ** @returns int 18555 ** 18556 *****************************************************************************/ 18557 18558 int 18559 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18560 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18561 { 18562 return xcb_popcount(/* replies */ S->compat_map.groupsRtrn); 18563 } 18564 18565 18566 /***************************************************************************** 18567 ** 18568 ** xcb_xkb_mod_def_iterator_t xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator 18569 ** 18570 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18571 ** @returns xcb_xkb_mod_def_iterator_t 18572 ** 18573 *****************************************************************************/ 18574 18575 xcb_xkb_mod_def_iterator_t 18576 xcb_xkb_get_kbd_by_name_replies_compat_map_group_rtrn_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18577 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18578 { 18579 xcb_xkb_mod_def_iterator_t i; 18580 i.data = /* replies */ S->compat_map.group_rtrn; 18581 i.rem = xcb_popcount(/* replies */ S->compat_map.groupsRtrn); 18582 i.index = (char *) i.data - (char *) S; 18583 return i; 18584 } 18585 18586 18587 /***************************************************************************** 18588 ** 18589 ** xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_client_symbols_map 18590 ** 18591 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18592 ** @returns xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t * 18593 ** 18594 *****************************************************************************/ 18595 18596 xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t * 18597 xcb_xkb_get_kbd_by_name_replies_client_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18598 { 18599 return (xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t *) (R + 1); 18600 } 18601 18602 18603 /***************************************************************************** 18604 ** 18605 ** xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t * xcb_xkb_get_kbd_by_name_replies_server_symbols_map 18606 ** 18607 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18608 ** @returns xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t * 18609 ** 18610 *****************************************************************************/ 18611 18612 xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t * 18613 xcb_xkb_get_kbd_by_name_replies_server_symbols_map (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18614 { 18615 return (xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t *) (R + 1); 18616 } 18617 18618 18619 /***************************************************************************** 18620 ** 18621 ** xcb_xkb_indicator_map_t * xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps 18622 ** 18623 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 18624 ** @returns xcb_xkb_indicator_map_t * 18625 ** 18626 *****************************************************************************/ 18627 18628 xcb_xkb_indicator_map_t * 18629 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18630 { 18631 return /* replies */ S->indicator_maps.maps; 18632 } 18633 18634 18635 /***************************************************************************** 18636 ** 18637 ** int xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length 18638 ** 18639 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18640 ** @returns int 18641 ** 18642 *****************************************************************************/ 18643 18644 int 18645 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18646 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18647 { 18648 return /* replies */ S->indicator_maps.nIndicators; 18649 } 18650 18651 18652 /***************************************************************************** 18653 ** 18654 ** xcb_xkb_indicator_map_iterator_t xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator 18655 ** 18656 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18657 ** @returns xcb_xkb_indicator_map_iterator_t 18658 ** 18659 *****************************************************************************/ 18660 18661 xcb_xkb_indicator_map_iterator_t 18662 xcb_xkb_get_kbd_by_name_replies_indicator_maps_maps_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18663 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18664 { 18665 xcb_xkb_indicator_map_iterator_t i; 18666 i.data = /* replies */ S->indicator_maps.maps; 18667 i.rem = /* replies */ S->indicator_maps.nIndicators; 18668 i.index = (char *) i.data - (char *) S; 18669 return i; 18670 } 18671 18672 18673 /***************************************************************************** 18674 ** 18675 ** xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_key_names_value_list 18676 ** 18677 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18678 ** @returns xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * 18679 ** 18680 *****************************************************************************/ 18681 18682 xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t * 18683 xcb_xkb_get_kbd_by_name_replies_key_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18684 { 18685 return (xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t *) (R + 1); 18686 } 18687 18688 18689 /***************************************************************************** 18690 ** 18691 ** xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t * xcb_xkb_get_kbd_by_name_replies_other_names_value_list 18692 ** 18693 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18694 ** @returns xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t * 18695 ** 18696 *****************************************************************************/ 18697 18698 xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t * 18699 xcb_xkb_get_kbd_by_name_replies_other_names_value_list (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18700 { 18701 return (xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t *) (R + 1); 18702 } 18703 18704 18705 /***************************************************************************** 18706 ** 18707 ** xcb_xkb_counted_string_16_t * xcb_xkb_get_kbd_by_name_replies_geometry_label_font 18708 ** 18709 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18710 ** @returns xcb_xkb_counted_string_16_t * 18711 ** 18712 *****************************************************************************/ 18713 18714 xcb_xkb_counted_string_16_t * 18715 xcb_xkb_get_kbd_by_name_replies_geometry_label_font (const xcb_xkb_get_kbd_by_name_replies_t *R /**< */) 18716 { 18717 return (xcb_xkb_counted_string_16_t *) (R + 1); 18718 } 18719 18720 18721 /***************************************************************************** 18722 ** 18723 ** int xcb_xkb_get_kbd_by_name_replies_geometry_properties_length 18724 ** 18725 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18726 ** @returns int 18727 ** 18728 *****************************************************************************/ 18729 18730 int 18731 xcb_xkb_get_kbd_by_name_replies_geometry_properties_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18732 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18733 { 18734 return /* replies */ S->geometry.nProperties; 18735 } 18736 18737 18738 /***************************************************************************** 18739 ** 18740 ** xcb_xkb_property_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator 18741 ** 18742 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18743 ** @returns xcb_xkb_property_iterator_t 18744 ** 18745 *****************************************************************************/ 18746 18747 xcb_xkb_property_iterator_t 18748 xcb_xkb_get_kbd_by_name_replies_geometry_properties_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18749 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18750 { 18751 xcb_xkb_property_iterator_t i; 18752 i.data = /* replies */ S->geometry.properties; 18753 i.rem = /* replies */ S->geometry.nProperties; 18754 i.index = (char *) i.data - (char *) S; 18755 return i; 18756 } 18757 18758 18759 /***************************************************************************** 18760 ** 18761 ** int xcb_xkb_get_kbd_by_name_replies_geometry_colors_length 18762 ** 18763 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18764 ** @returns int 18765 ** 18766 *****************************************************************************/ 18767 18768 int 18769 xcb_xkb_get_kbd_by_name_replies_geometry_colors_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18770 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18771 { 18772 return /* replies */ S->geometry.nColors; 18773 } 18774 18775 18776 /***************************************************************************** 18777 ** 18778 ** xcb_xkb_counted_string_16_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator 18779 ** 18780 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18781 ** @returns xcb_xkb_counted_string_16_iterator_t 18782 ** 18783 *****************************************************************************/ 18784 18785 xcb_xkb_counted_string_16_iterator_t 18786 xcb_xkb_get_kbd_by_name_replies_geometry_colors_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18787 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18788 { 18789 xcb_xkb_counted_string_16_iterator_t i; 18790 i.data = /* replies */ S->geometry.colors; 18791 i.rem = /* replies */ S->geometry.nColors; 18792 i.index = (char *) i.data - (char *) S; 18793 return i; 18794 } 18795 18796 18797 /***************************************************************************** 18798 ** 18799 ** int xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length 18800 ** 18801 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18802 ** @returns int 18803 ** 18804 *****************************************************************************/ 18805 18806 int 18807 xcb_xkb_get_kbd_by_name_replies_geometry_shapes_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18808 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18809 { 18810 return /* replies */ S->geometry.nShapes; 18811 } 18812 18813 18814 /***************************************************************************** 18815 ** 18816 ** xcb_xkb_shape_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator 18817 ** 18818 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18819 ** @returns xcb_xkb_shape_iterator_t 18820 ** 18821 *****************************************************************************/ 18822 18823 xcb_xkb_shape_iterator_t 18824 xcb_xkb_get_kbd_by_name_replies_geometry_shapes_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18825 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18826 { 18827 xcb_xkb_shape_iterator_t i; 18828 i.data = /* replies */ S->geometry.shapes; 18829 i.rem = /* replies */ S->geometry.nShapes; 18830 i.index = (char *) i.data - (char *) S; 18831 return i; 18832 } 18833 18834 18835 /***************************************************************************** 18836 ** 18837 ** int xcb_xkb_get_kbd_by_name_replies_geometry_sections_length 18838 ** 18839 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18840 ** @returns int 18841 ** 18842 *****************************************************************************/ 18843 18844 int 18845 xcb_xkb_get_kbd_by_name_replies_geometry_sections_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18846 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18847 { 18848 return /* replies */ S->geometry.nSections; 18849 } 18850 18851 18852 /***************************************************************************** 18853 ** 18854 ** xcb_xkb_section_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator 18855 ** 18856 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18857 ** @returns xcb_xkb_section_iterator_t 18858 ** 18859 *****************************************************************************/ 18860 18861 xcb_xkb_section_iterator_t 18862 xcb_xkb_get_kbd_by_name_replies_geometry_sections_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18863 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18864 { 18865 xcb_xkb_section_iterator_t i; 18866 i.data = /* replies */ S->geometry.sections; 18867 i.rem = /* replies */ S->geometry.nSections; 18868 i.index = (char *) i.data - (char *) S; 18869 return i; 18870 } 18871 18872 18873 /***************************************************************************** 18874 ** 18875 ** int xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length 18876 ** 18877 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18878 ** @returns int 18879 ** 18880 *****************************************************************************/ 18881 18882 int 18883 xcb_xkb_get_kbd_by_name_replies_geometry_doodads_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18884 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18885 { 18886 return /* replies */ S->geometry.nDoodads; 18887 } 18888 18889 18890 /***************************************************************************** 18891 ** 18892 ** xcb_xkb_doodad_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator 18893 ** 18894 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18895 ** @returns xcb_xkb_doodad_iterator_t 18896 ** 18897 *****************************************************************************/ 18898 18899 xcb_xkb_doodad_iterator_t 18900 xcb_xkb_get_kbd_by_name_replies_geometry_doodads_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18901 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18902 { 18903 xcb_xkb_doodad_iterator_t i; 18904 i.data = /* replies */ S->geometry.doodads; 18905 i.rem = /* replies */ S->geometry.nDoodads; 18906 i.index = (char *) i.data - (char *) S; 18907 return i; 18908 } 18909 18910 18911 /***************************************************************************** 18912 ** 18913 ** xcb_xkb_key_alias_t * xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases 18914 ** 18915 ** @param const xcb_xkb_get_kbd_by_name_replies_t *S 18916 ** @returns xcb_xkb_key_alias_t * 18917 ** 18918 *****************************************************************************/ 18919 18920 xcb_xkb_key_alias_t * 18921 xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases (const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18922 { 18923 return /* replies */ S->geometry.keyAliases; 18924 } 18925 18926 18927 /***************************************************************************** 18928 ** 18929 ** int xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length 18930 ** 18931 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18932 ** @returns int 18933 ** 18934 *****************************************************************************/ 18935 18936 int 18937 xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_length (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18938 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18939 { 18940 return /* replies */ S->geometry.nKeyAliases; 18941 } 18942 18943 18944 /***************************************************************************** 18945 ** 18946 ** xcb_xkb_key_alias_iterator_t xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator 18947 ** 18948 ** @param const xcb_xkb_get_kbd_by_name_replies_t *R 18949 ** @returns xcb_xkb_key_alias_iterator_t 18950 ** 18951 *****************************************************************************/ 18952 18953 xcb_xkb_key_alias_iterator_t 18954 xcb_xkb_get_kbd_by_name_replies_geometry_key_aliases_iterator (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */, 18955 const xcb_xkb_get_kbd_by_name_replies_t *S /**< */) 18956 { 18957 xcb_xkb_key_alias_iterator_t i; 18958 i.data = /* replies */ S->geometry.keyAliases; 18959 i.rem = /* replies */ S->geometry.nKeyAliases; 18960 i.index = (char *) i.data - (char *) S; 18961 return i; 18962 } 18963 18964 int 18965 xcb_xkb_get_kbd_by_name_replies_serialize (void **_buffer /**< */, 18966 uint16_t reported /**< */, 18967 const xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */) 18968 { 18969 char *xcb_out = *_buffer; 18970 unsigned int xcb_buffer_len = 0; 18971 unsigned int xcb_align_to; 18972 18973 unsigned int xcb_pad = 0; 18974 char xcb_pad0[3] = {0, 0, 0}; 18975 struct iovec xcb_parts[172]; 18976 unsigned int xcb_parts_idx = 0; 18977 unsigned int xcb_block_len = 0; 18978 unsigned int i; 18979 char *xcb_tmp; 18980 18981 if(reported & XCB_XKB_GBN_DETAIL_TYPES) { 18982 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */ 18983 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_type; 18984 xcb_block_len += sizeof(uint8_t); 18985 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 18986 xcb_parts_idx++; 18987 xcb_align_to = ALIGNOF(uint8_t); 18988 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */ 18989 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeDeviceID; 18990 xcb_block_len += sizeof(uint8_t); 18991 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 18992 xcb_parts_idx++; 18993 xcb_align_to = ALIGNOF(uint8_t); 18994 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */ 18995 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_sequence; 18996 xcb_block_len += sizeof(uint16_t); 18997 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 18998 xcb_parts_idx++; 18999 xcb_align_to = ALIGNOF(uint16_t); 19000 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */ 19001 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.getmap_length; 19002 xcb_block_len += sizeof(uint32_t); 19003 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19004 xcb_parts_idx++; 19005 xcb_align_to = ALIGNOF(uint32_t); 19006 /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */ 19007 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19008 xcb_block_len += sizeof(uint8_t)*2; 19009 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2; 19010 xcb_parts_idx++; 19011 xcb_align_to = ALIGNOF(uint8_t); 19012 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */ 19013 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMinKeyCode; 19014 xcb_block_len += sizeof(xcb_keycode_t); 19015 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19016 xcb_parts_idx++; 19017 xcb_align_to = ALIGNOF(xcb_keycode_t); 19018 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */ 19019 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.typeMaxKeyCode; 19020 xcb_block_len += sizeof(xcb_keycode_t); 19021 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19022 xcb_parts_idx++; 19023 xcb_align_to = ALIGNOF(xcb_keycode_t); 19024 /* xcb_xkb_get_kbd_by_name_replies_t.types.present */ 19025 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.present; 19026 xcb_block_len += sizeof(uint16_t); 19027 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19028 xcb_parts_idx++; 19029 xcb_align_to = ALIGNOF(uint16_t); 19030 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */ 19031 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstType; 19032 xcb_block_len += sizeof(uint8_t); 19033 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19034 xcb_parts_idx++; 19035 xcb_align_to = ALIGNOF(uint8_t); 19036 /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */ 19037 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nTypes; 19038 xcb_block_len += sizeof(uint8_t); 19039 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19040 xcb_parts_idx++; 19041 xcb_align_to = ALIGNOF(uint8_t); 19042 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */ 19043 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalTypes; 19044 xcb_block_len += sizeof(uint8_t); 19045 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19046 xcb_parts_idx++; 19047 xcb_align_to = ALIGNOF(uint8_t); 19048 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */ 19049 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeySym; 19050 xcb_block_len += sizeof(xcb_keycode_t); 19051 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19052 xcb_parts_idx++; 19053 xcb_align_to = ALIGNOF(xcb_keycode_t); 19054 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */ 19055 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalSyms; 19056 xcb_block_len += sizeof(uint16_t); 19057 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19058 xcb_parts_idx++; 19059 xcb_align_to = ALIGNOF(uint16_t); 19060 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */ 19061 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeySyms; 19062 xcb_block_len += sizeof(uint8_t); 19063 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19064 xcb_parts_idx++; 19065 xcb_align_to = ALIGNOF(uint8_t); 19066 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */ 19067 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyAction; 19068 xcb_block_len += sizeof(xcb_keycode_t); 19069 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19070 xcb_parts_idx++; 19071 xcb_align_to = ALIGNOF(xcb_keycode_t); 19072 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */ 19073 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalActions; 19074 xcb_block_len += sizeof(uint16_t); 19075 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19076 xcb_parts_idx++; 19077 xcb_align_to = ALIGNOF(uint16_t); 19078 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */ 19079 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyActions; 19080 xcb_block_len += sizeof(uint8_t); 19081 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19082 xcb_parts_idx++; 19083 xcb_align_to = ALIGNOF(uint8_t); 19084 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */ 19085 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyBehavior; 19086 xcb_block_len += sizeof(xcb_keycode_t); 19087 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19088 xcb_parts_idx++; 19089 xcb_align_to = ALIGNOF(xcb_keycode_t); 19090 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */ 19091 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyBehaviors; 19092 xcb_block_len += sizeof(uint8_t); 19093 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19094 xcb_parts_idx++; 19095 xcb_align_to = ALIGNOF(uint8_t); 19096 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */ 19097 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyBehaviors; 19098 xcb_block_len += sizeof(uint8_t); 19099 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19100 xcb_parts_idx++; 19101 xcb_align_to = ALIGNOF(uint8_t); 19102 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */ 19103 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstKeyExplicit; 19104 xcb_block_len += sizeof(xcb_keycode_t); 19105 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19106 xcb_parts_idx++; 19107 xcb_align_to = ALIGNOF(xcb_keycode_t); 19108 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */ 19109 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nKeyExplicit; 19110 xcb_block_len += sizeof(uint8_t); 19111 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19112 xcb_parts_idx++; 19113 xcb_align_to = ALIGNOF(uint8_t); 19114 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */ 19115 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalKeyExplicit; 19116 xcb_block_len += sizeof(uint8_t); 19117 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19118 xcb_parts_idx++; 19119 xcb_align_to = ALIGNOF(uint8_t); 19120 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */ 19121 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstModMapKey; 19122 xcb_block_len += sizeof(xcb_keycode_t); 19123 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19124 xcb_parts_idx++; 19125 xcb_align_to = ALIGNOF(xcb_keycode_t); 19126 /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */ 19127 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nModMapKeys; 19128 xcb_block_len += sizeof(uint8_t); 19129 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19130 xcb_parts_idx++; 19131 xcb_align_to = ALIGNOF(uint8_t); 19132 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */ 19133 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalModMapKeys; 19134 xcb_block_len += sizeof(uint8_t); 19135 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19136 xcb_parts_idx++; 19137 xcb_align_to = ALIGNOF(uint8_t); 19138 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */ 19139 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.firstVModMapKey; 19140 xcb_block_len += sizeof(xcb_keycode_t); 19141 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19142 xcb_parts_idx++; 19143 xcb_align_to = ALIGNOF(xcb_keycode_t); 19144 /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */ 19145 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.nVModMapKeys; 19146 xcb_block_len += sizeof(uint8_t); 19147 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19148 xcb_parts_idx++; 19149 xcb_align_to = ALIGNOF(uint8_t); 19150 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */ 19151 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.totalVModMapKeys; 19152 xcb_block_len += sizeof(uint8_t); 19153 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19154 xcb_parts_idx++; 19155 xcb_align_to = ALIGNOF(uint8_t); 19156 /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */ 19157 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 19158 xcb_block_len += sizeof(uint8_t); 19159 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19160 xcb_parts_idx++; 19161 xcb_align_to = ALIGNOF(uint8_t); 19162 /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */ 19163 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->types.virtualMods; 19164 xcb_block_len += sizeof(uint16_t); 19165 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19166 xcb_parts_idx++; 19167 xcb_align_to = ALIGNOF(uint16_t); 19168 /* insert padding */ 19169 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19170 xcb_buffer_len += xcb_block_len + xcb_pad; 19171 if (0 != xcb_pad) { 19172 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19173 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19174 xcb_parts_idx++; 19175 xcb_pad = 0; 19176 } 19177 xcb_block_len = 0; 19178 /* map */ 19179 xcb_parts[xcb_parts_idx].iov_base = (char *)0; 19180 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map); 19181 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_types_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map); 19182 xcb_parts_idx++; 19183 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t); 19184 } 19185 if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) { 19186 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */ 19187 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.compatDeviceID; 19188 xcb_block_len += sizeof(uint8_t); 19189 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19190 xcb_parts_idx++; 19191 xcb_align_to = ALIGNOF(uint8_t); 19192 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */ 19193 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.groupsRtrn; 19194 xcb_block_len += sizeof(uint8_t); 19195 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19196 xcb_parts_idx++; 19197 xcb_align_to = ALIGNOF(uint8_t); 19198 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */ 19199 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 19200 xcb_block_len += sizeof(uint8_t); 19201 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19202 xcb_parts_idx++; 19203 xcb_align_to = ALIGNOF(uint8_t); 19204 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */ 19205 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.firstSIRtrn; 19206 xcb_block_len += sizeof(uint16_t); 19207 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19208 xcb_parts_idx++; 19209 xcb_align_to = ALIGNOF(uint16_t); 19210 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */ 19211 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nSIRtrn; 19212 xcb_block_len += sizeof(uint16_t); 19213 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19214 xcb_parts_idx++; 19215 xcb_align_to = ALIGNOF(uint16_t); 19216 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */ 19217 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->compat_map.nTotalSI; 19218 xcb_block_len += sizeof(uint16_t); 19219 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19220 xcb_parts_idx++; 19221 xcb_align_to = ALIGNOF(uint16_t); 19222 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */ 19223 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19224 xcb_block_len += sizeof(uint8_t)*16; 19225 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*16; 19226 xcb_parts_idx++; 19227 xcb_align_to = ALIGNOF(uint8_t); 19228 /* insert padding */ 19229 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19230 xcb_buffer_len += xcb_block_len + xcb_pad; 19231 if (0 != xcb_pad) { 19232 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19233 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19234 xcb_parts_idx++; 19235 xcb_pad = 0; 19236 } 19237 xcb_block_len = 0; 19238 /* si_rtrn */ 19239 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.si_rtrn; 19240 xcb_block_len += (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t); 19241 xcb_parts[xcb_parts_idx].iov_len = (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t); 19242 xcb_parts_idx++; 19243 xcb_align_to = ALIGNOF(uint8_t); 19244 /* insert padding */ 19245 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19246 xcb_buffer_len += xcb_block_len + xcb_pad; 19247 if (0 != xcb_pad) { 19248 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19249 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19250 xcb_parts_idx++; 19251 xcb_pad = 0; 19252 } 19253 xcb_block_len = 0; 19254 /* group_rtrn */ 19255 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->compat_map.group_rtrn; 19256 xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t); 19257 xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t); 19258 xcb_parts_idx++; 19259 xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t); 19260 } 19261 if(reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) { 19262 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientDeviceID */ 19263 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientDeviceID; 19264 xcb_block_len += sizeof(uint8_t); 19265 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19266 xcb_parts_idx++; 19267 xcb_align_to = ALIGNOF(uint8_t); 19268 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad0 */ 19269 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19270 xcb_block_len += sizeof(uint8_t)*2; 19271 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2; 19272 xcb_parts_idx++; 19273 xcb_align_to = ALIGNOF(uint8_t); 19274 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMinKeyCode */ 19275 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientMinKeyCode; 19276 xcb_block_len += sizeof(xcb_keycode_t); 19277 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19278 xcb_parts_idx++; 19279 xcb_align_to = ALIGNOF(xcb_keycode_t); 19280 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMaxKeyCode */ 19281 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.clientMaxKeyCode; 19282 xcb_block_len += sizeof(xcb_keycode_t); 19283 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19284 xcb_parts_idx++; 19285 xcb_align_to = ALIGNOF(xcb_keycode_t); 19286 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.present */ 19287 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.present; 19288 xcb_block_len += sizeof(uint16_t); 19289 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19290 xcb_parts_idx++; 19291 xcb_align_to = ALIGNOF(uint16_t); 19292 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstType */ 19293 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstType; 19294 xcb_block_len += sizeof(uint8_t); 19295 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19296 xcb_parts_idx++; 19297 xcb_align_to = ALIGNOF(uint8_t); 19298 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nTypes */ 19299 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nTypes; 19300 xcb_block_len += sizeof(uint8_t); 19301 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19302 xcb_parts_idx++; 19303 xcb_align_to = ALIGNOF(uint8_t); 19304 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalTypes */ 19305 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalTypes; 19306 xcb_block_len += sizeof(uint8_t); 19307 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19308 xcb_parts_idx++; 19309 xcb_align_to = ALIGNOF(uint8_t); 19310 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeySym */ 19311 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeySym; 19312 xcb_block_len += sizeof(xcb_keycode_t); 19313 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19314 xcb_parts_idx++; 19315 xcb_align_to = ALIGNOF(xcb_keycode_t); 19316 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalSyms */ 19317 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalSyms; 19318 xcb_block_len += sizeof(uint16_t); 19319 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19320 xcb_parts_idx++; 19321 xcb_align_to = ALIGNOF(uint16_t); 19322 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeySyms */ 19323 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeySyms; 19324 xcb_block_len += sizeof(uint8_t); 19325 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19326 xcb_parts_idx++; 19327 xcb_align_to = ALIGNOF(uint8_t); 19328 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyAction */ 19329 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyAction; 19330 xcb_block_len += sizeof(xcb_keycode_t); 19331 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19332 xcb_parts_idx++; 19333 xcb_align_to = ALIGNOF(xcb_keycode_t); 19334 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalActions */ 19335 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalActions; 19336 xcb_block_len += sizeof(uint16_t); 19337 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19338 xcb_parts_idx++; 19339 xcb_align_to = ALIGNOF(uint16_t); 19340 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyActions */ 19341 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyActions; 19342 xcb_block_len += sizeof(uint8_t); 19343 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19344 xcb_parts_idx++; 19345 xcb_align_to = ALIGNOF(uint8_t); 19346 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyBehavior */ 19347 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyBehavior; 19348 xcb_block_len += sizeof(xcb_keycode_t); 19349 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19350 xcb_parts_idx++; 19351 xcb_align_to = ALIGNOF(xcb_keycode_t); 19352 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyBehaviors */ 19353 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyBehaviors; 19354 xcb_block_len += sizeof(uint8_t); 19355 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19356 xcb_parts_idx++; 19357 xcb_align_to = ALIGNOF(uint8_t); 19358 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyBehaviors */ 19359 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalKeyBehaviors; 19360 xcb_block_len += sizeof(uint8_t); 19361 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19362 xcb_parts_idx++; 19363 xcb_align_to = ALIGNOF(uint8_t); 19364 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyExplicit */ 19365 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstKeyExplicit; 19366 xcb_block_len += sizeof(xcb_keycode_t); 19367 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19368 xcb_parts_idx++; 19369 xcb_align_to = ALIGNOF(xcb_keycode_t); 19370 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyExplicit */ 19371 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nKeyExplicit; 19372 xcb_block_len += sizeof(uint8_t); 19373 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19374 xcb_parts_idx++; 19375 xcb_align_to = ALIGNOF(uint8_t); 19376 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyExplicit */ 19377 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalKeyExplicit; 19378 xcb_block_len += sizeof(uint8_t); 19379 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19380 xcb_parts_idx++; 19381 xcb_align_to = ALIGNOF(uint8_t); 19382 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstModMapKey */ 19383 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstModMapKey; 19384 xcb_block_len += sizeof(xcb_keycode_t); 19385 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19386 xcb_parts_idx++; 19387 xcb_align_to = ALIGNOF(xcb_keycode_t); 19388 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nModMapKeys */ 19389 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nModMapKeys; 19390 xcb_block_len += sizeof(uint8_t); 19391 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19392 xcb_parts_idx++; 19393 xcb_align_to = ALIGNOF(uint8_t); 19394 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalModMapKeys */ 19395 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalModMapKeys; 19396 xcb_block_len += sizeof(uint8_t); 19397 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19398 xcb_parts_idx++; 19399 xcb_align_to = ALIGNOF(uint8_t); 19400 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstVModMapKey */ 19401 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.firstVModMapKey; 19402 xcb_block_len += sizeof(xcb_keycode_t); 19403 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19404 xcb_parts_idx++; 19405 xcb_align_to = ALIGNOF(xcb_keycode_t); 19406 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nVModMapKeys */ 19407 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.nVModMapKeys; 19408 xcb_block_len += sizeof(uint8_t); 19409 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19410 xcb_parts_idx++; 19411 xcb_align_to = ALIGNOF(uint8_t); 19412 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalVModMapKeys */ 19413 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.totalVModMapKeys; 19414 xcb_block_len += sizeof(uint8_t); 19415 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19416 xcb_parts_idx++; 19417 xcb_align_to = ALIGNOF(uint8_t); 19418 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad1 */ 19419 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 19420 xcb_block_len += sizeof(uint8_t); 19421 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19422 xcb_parts_idx++; 19423 xcb_align_to = ALIGNOF(uint8_t); 19424 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.virtualMods */ 19425 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->client_symbols.virtualMods; 19426 xcb_block_len += sizeof(uint16_t); 19427 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19428 xcb_parts_idx++; 19429 xcb_align_to = ALIGNOF(uint16_t); 19430 /* insert padding */ 19431 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19432 xcb_buffer_len += xcb_block_len + xcb_pad; 19433 if (0 != xcb_pad) { 19434 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19435 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19436 xcb_parts_idx++; 19437 xcb_pad = 0; 19438 } 19439 xcb_block_len = 0; 19440 /* map */ 19441 xcb_parts[xcb_parts_idx].iov_base = (char *)0; 19442 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map); 19443 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_client_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map); 19444 xcb_parts_idx++; 19445 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t); 19446 } 19447 if(reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS) { 19448 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverDeviceID */ 19449 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverDeviceID; 19450 xcb_block_len += sizeof(uint8_t); 19451 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19452 xcb_parts_idx++; 19453 xcb_align_to = ALIGNOF(uint8_t); 19454 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad0 */ 19455 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19456 xcb_block_len += sizeof(uint8_t)*2; 19457 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*2; 19458 xcb_parts_idx++; 19459 xcb_align_to = ALIGNOF(uint8_t); 19460 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMinKeyCode */ 19461 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverMinKeyCode; 19462 xcb_block_len += sizeof(xcb_keycode_t); 19463 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19464 xcb_parts_idx++; 19465 xcb_align_to = ALIGNOF(xcb_keycode_t); 19466 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMaxKeyCode */ 19467 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.serverMaxKeyCode; 19468 xcb_block_len += sizeof(xcb_keycode_t); 19469 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19470 xcb_parts_idx++; 19471 xcb_align_to = ALIGNOF(xcb_keycode_t); 19472 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.present */ 19473 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.present; 19474 xcb_block_len += sizeof(uint16_t); 19475 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19476 xcb_parts_idx++; 19477 xcb_align_to = ALIGNOF(uint16_t); 19478 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstType */ 19479 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstType; 19480 xcb_block_len += sizeof(uint8_t); 19481 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19482 xcb_parts_idx++; 19483 xcb_align_to = ALIGNOF(uint8_t); 19484 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nTypes */ 19485 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nTypes; 19486 xcb_block_len += sizeof(uint8_t); 19487 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19488 xcb_parts_idx++; 19489 xcb_align_to = ALIGNOF(uint8_t); 19490 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalTypes */ 19491 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalTypes; 19492 xcb_block_len += sizeof(uint8_t); 19493 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19494 xcb_parts_idx++; 19495 xcb_align_to = ALIGNOF(uint8_t); 19496 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeySym */ 19497 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeySym; 19498 xcb_block_len += sizeof(xcb_keycode_t); 19499 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19500 xcb_parts_idx++; 19501 xcb_align_to = ALIGNOF(xcb_keycode_t); 19502 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalSyms */ 19503 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalSyms; 19504 xcb_block_len += sizeof(uint16_t); 19505 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19506 xcb_parts_idx++; 19507 xcb_align_to = ALIGNOF(uint16_t); 19508 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeySyms */ 19509 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeySyms; 19510 xcb_block_len += sizeof(uint8_t); 19511 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19512 xcb_parts_idx++; 19513 xcb_align_to = ALIGNOF(uint8_t); 19514 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyAction */ 19515 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyAction; 19516 xcb_block_len += sizeof(xcb_keycode_t); 19517 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19518 xcb_parts_idx++; 19519 xcb_align_to = ALIGNOF(xcb_keycode_t); 19520 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalActions */ 19521 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalActions; 19522 xcb_block_len += sizeof(uint16_t); 19523 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19524 xcb_parts_idx++; 19525 xcb_align_to = ALIGNOF(uint16_t); 19526 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyActions */ 19527 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyActions; 19528 xcb_block_len += sizeof(uint8_t); 19529 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19530 xcb_parts_idx++; 19531 xcb_align_to = ALIGNOF(uint8_t); 19532 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyBehavior */ 19533 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyBehavior; 19534 xcb_block_len += sizeof(xcb_keycode_t); 19535 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19536 xcb_parts_idx++; 19537 xcb_align_to = ALIGNOF(xcb_keycode_t); 19538 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyBehaviors */ 19539 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyBehaviors; 19540 xcb_block_len += sizeof(uint8_t); 19541 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19542 xcb_parts_idx++; 19543 xcb_align_to = ALIGNOF(uint8_t); 19544 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyBehaviors */ 19545 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalKeyBehaviors; 19546 xcb_block_len += sizeof(uint8_t); 19547 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19548 xcb_parts_idx++; 19549 xcb_align_to = ALIGNOF(uint8_t); 19550 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyExplicit */ 19551 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstKeyExplicit; 19552 xcb_block_len += sizeof(xcb_keycode_t); 19553 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19554 xcb_parts_idx++; 19555 xcb_align_to = ALIGNOF(xcb_keycode_t); 19556 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyExplicit */ 19557 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nKeyExplicit; 19558 xcb_block_len += sizeof(uint8_t); 19559 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19560 xcb_parts_idx++; 19561 xcb_align_to = ALIGNOF(uint8_t); 19562 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyExplicit */ 19563 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalKeyExplicit; 19564 xcb_block_len += sizeof(uint8_t); 19565 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19566 xcb_parts_idx++; 19567 xcb_align_to = ALIGNOF(uint8_t); 19568 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstModMapKey */ 19569 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstModMapKey; 19570 xcb_block_len += sizeof(xcb_keycode_t); 19571 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19572 xcb_parts_idx++; 19573 xcb_align_to = ALIGNOF(xcb_keycode_t); 19574 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nModMapKeys */ 19575 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nModMapKeys; 19576 xcb_block_len += sizeof(uint8_t); 19577 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19578 xcb_parts_idx++; 19579 xcb_align_to = ALIGNOF(uint8_t); 19580 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalModMapKeys */ 19581 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalModMapKeys; 19582 xcb_block_len += sizeof(uint8_t); 19583 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19584 xcb_parts_idx++; 19585 xcb_align_to = ALIGNOF(uint8_t); 19586 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstVModMapKey */ 19587 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.firstVModMapKey; 19588 xcb_block_len += sizeof(xcb_keycode_t); 19589 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19590 xcb_parts_idx++; 19591 xcb_align_to = ALIGNOF(xcb_keycode_t); 19592 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nVModMapKeys */ 19593 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.nVModMapKeys; 19594 xcb_block_len += sizeof(uint8_t); 19595 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19596 xcb_parts_idx++; 19597 xcb_align_to = ALIGNOF(uint8_t); 19598 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalVModMapKeys */ 19599 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.totalVModMapKeys; 19600 xcb_block_len += sizeof(uint8_t); 19601 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19602 xcb_parts_idx++; 19603 xcb_align_to = ALIGNOF(uint8_t); 19604 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad1 */ 19605 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 19606 xcb_block_len += sizeof(uint8_t); 19607 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19608 xcb_parts_idx++; 19609 xcb_align_to = ALIGNOF(uint8_t); 19610 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.virtualMods */ 19611 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->server_symbols.virtualMods; 19612 xcb_block_len += sizeof(uint16_t); 19613 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19614 xcb_parts_idx++; 19615 xcb_align_to = ALIGNOF(uint16_t); 19616 /* insert padding */ 19617 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19618 xcb_buffer_len += xcb_block_len + xcb_pad; 19619 if (0 != xcb_pad) { 19620 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19621 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19622 xcb_parts_idx++; 19623 xcb_pad = 0; 19624 } 19625 xcb_block_len = 0; 19626 /* map */ 19627 xcb_parts[xcb_parts_idx].iov_base = (char *)0; 19628 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map); 19629 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_server_symbols_map_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map); 19630 xcb_parts_idx++; 19631 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t); 19632 } 19633 if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) { 19634 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */ 19635 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.indicatorDeviceID; 19636 xcb_block_len += sizeof(uint8_t); 19637 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19638 xcb_parts_idx++; 19639 xcb_align_to = ALIGNOF(uint8_t); 19640 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */ 19641 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.which; 19642 xcb_block_len += sizeof(uint32_t); 19643 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19644 xcb_parts_idx++; 19645 xcb_align_to = ALIGNOF(uint32_t); 19646 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */ 19647 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.realIndicators; 19648 xcb_block_len += sizeof(uint32_t); 19649 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19650 xcb_parts_idx++; 19651 xcb_align_to = ALIGNOF(uint32_t); 19652 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */ 19653 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->indicator_maps.nIndicators; 19654 xcb_block_len += sizeof(uint8_t); 19655 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19656 xcb_parts_idx++; 19657 xcb_align_to = ALIGNOF(uint8_t); 19658 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */ 19659 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19660 xcb_block_len += sizeof(uint8_t)*15; 19661 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*15; 19662 xcb_parts_idx++; 19663 xcb_align_to = ALIGNOF(uint8_t); 19664 /* insert padding */ 19665 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19666 xcb_buffer_len += xcb_block_len + xcb_pad; 19667 if (0 != xcb_pad) { 19668 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19669 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19670 xcb_parts_idx++; 19671 xcb_pad = 0; 19672 } 19673 xcb_block_len = 0; 19674 /* maps */ 19675 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->indicator_maps.maps; 19676 xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t); 19677 xcb_parts[xcb_parts_idx].iov_len = _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t); 19678 xcb_parts_idx++; 19679 xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t); 19680 } 19681 if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) { 19682 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */ 19683 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyDeviceID; 19684 xcb_block_len += sizeof(uint8_t); 19685 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19686 xcb_parts_idx++; 19687 xcb_align_to = ALIGNOF(uint8_t); 19688 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */ 19689 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.which; 19690 xcb_block_len += sizeof(uint32_t); 19691 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19692 xcb_parts_idx++; 19693 xcb_align_to = ALIGNOF(uint32_t); 19694 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */ 19695 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMinKeyCode; 19696 xcb_block_len += sizeof(xcb_keycode_t); 19697 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19698 xcb_parts_idx++; 19699 xcb_align_to = ALIGNOF(xcb_keycode_t); 19700 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */ 19701 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.keyMaxKeyCode; 19702 xcb_block_len += sizeof(xcb_keycode_t); 19703 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19704 xcb_parts_idx++; 19705 xcb_align_to = ALIGNOF(xcb_keycode_t); 19706 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */ 19707 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nTypes; 19708 xcb_block_len += sizeof(uint8_t); 19709 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19710 xcb_parts_idx++; 19711 xcb_align_to = ALIGNOF(uint8_t); 19712 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */ 19713 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.groupNames; 19714 xcb_block_len += sizeof(uint8_t); 19715 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19716 xcb_parts_idx++; 19717 xcb_align_to = ALIGNOF(uint8_t); 19718 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */ 19719 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.virtualMods; 19720 xcb_block_len += sizeof(uint16_t); 19721 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19722 xcb_parts_idx++; 19723 xcb_align_to = ALIGNOF(uint16_t); 19724 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */ 19725 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.firstKey; 19726 xcb_block_len += sizeof(xcb_keycode_t); 19727 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19728 xcb_parts_idx++; 19729 xcb_align_to = ALIGNOF(xcb_keycode_t); 19730 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */ 19731 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeys; 19732 xcb_block_len += sizeof(uint8_t); 19733 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19734 xcb_parts_idx++; 19735 xcb_align_to = ALIGNOF(uint8_t); 19736 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */ 19737 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.indicators; 19738 xcb_block_len += sizeof(uint32_t); 19739 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19740 xcb_parts_idx++; 19741 xcb_align_to = ALIGNOF(uint32_t); 19742 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */ 19743 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nRadioGroups; 19744 xcb_block_len += sizeof(uint8_t); 19745 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19746 xcb_parts_idx++; 19747 xcb_align_to = ALIGNOF(uint8_t); 19748 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */ 19749 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKeyAliases; 19750 xcb_block_len += sizeof(uint8_t); 19751 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19752 xcb_parts_idx++; 19753 xcb_align_to = ALIGNOF(uint8_t); 19754 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */ 19755 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->key_names.nKTLevels; 19756 xcb_block_len += sizeof(uint16_t); 19757 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19758 xcb_parts_idx++; 19759 xcb_align_to = ALIGNOF(uint16_t); 19760 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */ 19761 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19762 xcb_block_len += sizeof(uint8_t)*4; 19763 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4; 19764 xcb_parts_idx++; 19765 xcb_align_to = ALIGNOF(uint8_t); 19766 /* insert padding */ 19767 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19768 xcb_buffer_len += xcb_block_len + xcb_pad; 19769 if (0 != xcb_pad) { 19770 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19771 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19772 xcb_parts_idx++; 19773 xcb_pad = 0; 19774 } 19775 xcb_block_len = 0; 19776 /* valueList */ 19777 xcb_parts[xcb_parts_idx].iov_base = (char *)0; 19778 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList); 19779 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_key_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList); 19780 xcb_parts_idx++; 19781 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t); 19782 } 19783 if(reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES) { 19784 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherDeviceID */ 19785 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherDeviceID; 19786 xcb_block_len += sizeof(uint8_t); 19787 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19788 xcb_parts_idx++; 19789 xcb_align_to = ALIGNOF(uint8_t); 19790 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.which */ 19791 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.which; 19792 xcb_block_len += sizeof(uint32_t); 19793 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19794 xcb_parts_idx++; 19795 xcb_align_to = ALIGNOF(uint32_t); 19796 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMinKeyCode */ 19797 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherMinKeyCode; 19798 xcb_block_len += sizeof(xcb_keycode_t); 19799 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19800 xcb_parts_idx++; 19801 xcb_align_to = ALIGNOF(xcb_keycode_t); 19802 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMaxKeyCode */ 19803 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.otherMaxKeyCode; 19804 xcb_block_len += sizeof(xcb_keycode_t); 19805 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19806 xcb_parts_idx++; 19807 xcb_align_to = ALIGNOF(xcb_keycode_t); 19808 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nTypes */ 19809 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nTypes; 19810 xcb_block_len += sizeof(uint8_t); 19811 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19812 xcb_parts_idx++; 19813 xcb_align_to = ALIGNOF(uint8_t); 19814 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.groupNames */ 19815 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.groupNames; 19816 xcb_block_len += sizeof(uint8_t); 19817 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19818 xcb_parts_idx++; 19819 xcb_align_to = ALIGNOF(uint8_t); 19820 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.virtualMods */ 19821 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.virtualMods; 19822 xcb_block_len += sizeof(uint16_t); 19823 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19824 xcb_parts_idx++; 19825 xcb_align_to = ALIGNOF(uint16_t); 19826 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.firstKey */ 19827 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.firstKey; 19828 xcb_block_len += sizeof(xcb_keycode_t); 19829 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_keycode_t); 19830 xcb_parts_idx++; 19831 xcb_align_to = ALIGNOF(xcb_keycode_t); 19832 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeys */ 19833 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKeys; 19834 xcb_block_len += sizeof(uint8_t); 19835 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19836 xcb_parts_idx++; 19837 xcb_align_to = ALIGNOF(uint8_t); 19838 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.indicators */ 19839 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.indicators; 19840 xcb_block_len += sizeof(uint32_t); 19841 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); 19842 xcb_parts_idx++; 19843 xcb_align_to = ALIGNOF(uint32_t); 19844 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nRadioGroups */ 19845 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nRadioGroups; 19846 xcb_block_len += sizeof(uint8_t); 19847 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19848 xcb_parts_idx++; 19849 xcb_align_to = ALIGNOF(uint8_t); 19850 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeyAliases */ 19851 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKeyAliases; 19852 xcb_block_len += sizeof(uint8_t); 19853 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19854 xcb_parts_idx++; 19855 xcb_align_to = ALIGNOF(uint8_t); 19856 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKTLevels */ 19857 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->other_names.nKTLevels; 19858 xcb_block_len += sizeof(uint16_t); 19859 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19860 xcb_parts_idx++; 19861 xcb_align_to = ALIGNOF(uint16_t); 19862 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.pad0 */ 19863 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19864 xcb_block_len += sizeof(uint8_t)*4; 19865 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t)*4; 19866 xcb_parts_idx++; 19867 xcb_align_to = ALIGNOF(uint8_t); 19868 /* insert padding */ 19869 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19870 xcb_buffer_len += xcb_block_len + xcb_pad; 19871 if (0 != xcb_pad) { 19872 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19873 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19874 xcb_parts_idx++; 19875 xcb_pad = 0; 19876 } 19877 xcb_block_len = 0; 19878 /* valueList */ 19879 xcb_parts[xcb_parts_idx].iov_base = (char *)0; 19880 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList); 19881 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_get_kbd_by_name_replies_other_names_value_list_serialize(&xcb_parts[xcb_parts_idx].iov_base, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList); 19882 xcb_parts_idx++; 19883 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t); 19884 } 19885 if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) { 19886 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */ 19887 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryDeviceID; 19888 xcb_block_len += sizeof(uint8_t); 19889 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19890 xcb_parts_idx++; 19891 xcb_align_to = ALIGNOF(uint8_t); 19892 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */ 19893 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.name; 19894 xcb_block_len += sizeof(xcb_atom_t); 19895 xcb_parts[xcb_parts_idx].iov_len = sizeof(xcb_atom_t); 19896 xcb_parts_idx++; 19897 xcb_align_to = ALIGNOF(xcb_atom_t); 19898 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */ 19899 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.geometryFound; 19900 xcb_block_len += sizeof(uint8_t); 19901 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19902 xcb_parts_idx++; 19903 xcb_align_to = ALIGNOF(uint8_t); 19904 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */ 19905 xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; 19906 xcb_block_len += sizeof(uint8_t); 19907 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19908 xcb_parts_idx++; 19909 xcb_align_to = ALIGNOF(uint8_t); 19910 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */ 19911 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.widthMM; 19912 xcb_block_len += sizeof(uint16_t); 19913 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19914 xcb_parts_idx++; 19915 xcb_align_to = ALIGNOF(uint16_t); 19916 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */ 19917 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.heightMM; 19918 xcb_block_len += sizeof(uint16_t); 19919 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19920 xcb_parts_idx++; 19921 xcb_align_to = ALIGNOF(uint16_t); 19922 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */ 19923 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nProperties; 19924 xcb_block_len += sizeof(uint16_t); 19925 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19926 xcb_parts_idx++; 19927 xcb_align_to = ALIGNOF(uint16_t); 19928 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */ 19929 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nColors; 19930 xcb_block_len += sizeof(uint16_t); 19931 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19932 xcb_parts_idx++; 19933 xcb_align_to = ALIGNOF(uint16_t); 19934 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */ 19935 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nShapes; 19936 xcb_block_len += sizeof(uint16_t); 19937 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19938 xcb_parts_idx++; 19939 xcb_align_to = ALIGNOF(uint16_t); 19940 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */ 19941 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nSections; 19942 xcb_block_len += sizeof(uint16_t); 19943 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19944 xcb_parts_idx++; 19945 xcb_align_to = ALIGNOF(uint16_t); 19946 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */ 19947 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nDoodads; 19948 xcb_block_len += sizeof(uint16_t); 19949 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19950 xcb_parts_idx++; 19951 xcb_align_to = ALIGNOF(uint16_t); 19952 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */ 19953 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.nKeyAliases; 19954 xcb_block_len += sizeof(uint16_t); 19955 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint16_t); 19956 xcb_parts_idx++; 19957 xcb_align_to = ALIGNOF(uint16_t); 19958 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */ 19959 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.baseColorNdx; 19960 xcb_block_len += sizeof(uint8_t); 19961 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19962 xcb_parts_idx++; 19963 xcb_align_to = ALIGNOF(uint8_t); 19964 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */ 19965 xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->geometry.labelColorNdx; 19966 xcb_block_len += sizeof(uint8_t); 19967 xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); 19968 xcb_parts_idx++; 19969 xcb_align_to = ALIGNOF(uint8_t); 19970 /* insert padding */ 19971 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19972 xcb_buffer_len += xcb_block_len + xcb_pad; 19973 if (0 != xcb_pad) { 19974 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19975 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19976 xcb_parts_idx++; 19977 xcb_pad = 0; 19978 } 19979 xcb_block_len = 0; 19980 /* labelFont */ 19981 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.labelFont; 19982 xcb_block_len += xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont); 19983 xcb_parts[xcb_parts_idx].iov_len = xcb_xkb_counted_string_16_sizeof(_aux->geometry.labelFont); 19984 xcb_parts_idx++; 19985 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 19986 /* insert padding */ 19987 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 19988 xcb_buffer_len += xcb_block_len + xcb_pad; 19989 if (0 != xcb_pad) { 19990 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 19991 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 19992 xcb_parts_idx++; 19993 xcb_pad = 0; 19994 } 19995 xcb_block_len = 0; 19996 /* properties */ 19997 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.properties; 19998 xcb_parts[xcb_parts_idx].iov_len = 0; 19999 xcb_tmp = (char *) _aux->geometry.properties; 20000 for(i=0; i<_aux->geometry.nProperties; i++) { 20001 xcb_block_len = xcb_xkb_property_sizeof(xcb_tmp); 20002 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 20003 } 20004 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 20005 xcb_parts_idx++; 20006 xcb_align_to = ALIGNOF(xcb_xkb_property_t); 20007 /* insert padding */ 20008 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20009 xcb_buffer_len += xcb_block_len + xcb_pad; 20010 if (0 != xcb_pad) { 20011 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20012 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20013 xcb_parts_idx++; 20014 xcb_pad = 0; 20015 } 20016 xcb_block_len = 0; 20017 /* colors */ 20018 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.colors; 20019 xcb_parts[xcb_parts_idx].iov_len = 0; 20020 xcb_tmp = (char *) _aux->geometry.colors; 20021 for(i=0; i<_aux->geometry.nColors; i++) { 20022 xcb_block_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 20023 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 20024 } 20025 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 20026 xcb_parts_idx++; 20027 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 20028 /* insert padding */ 20029 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20030 xcb_buffer_len += xcb_block_len + xcb_pad; 20031 if (0 != xcb_pad) { 20032 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20033 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20034 xcb_parts_idx++; 20035 xcb_pad = 0; 20036 } 20037 xcb_block_len = 0; 20038 /* shapes */ 20039 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.shapes; 20040 xcb_parts[xcb_parts_idx].iov_len = 0; 20041 xcb_tmp = (char *) _aux->geometry.shapes; 20042 for(i=0; i<_aux->geometry.nShapes; i++) { 20043 xcb_block_len = xcb_xkb_shape_sizeof(xcb_tmp); 20044 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 20045 } 20046 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 20047 xcb_parts_idx++; 20048 xcb_align_to = ALIGNOF(xcb_xkb_shape_t); 20049 /* insert padding */ 20050 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20051 xcb_buffer_len += xcb_block_len + xcb_pad; 20052 if (0 != xcb_pad) { 20053 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20054 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20055 xcb_parts_idx++; 20056 xcb_pad = 0; 20057 } 20058 xcb_block_len = 0; 20059 /* sections */ 20060 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.sections; 20061 xcb_parts[xcb_parts_idx].iov_len = 0; 20062 xcb_tmp = (char *) _aux->geometry.sections; 20063 for(i=0; i<_aux->geometry.nSections; i++) { 20064 xcb_block_len = xcb_xkb_section_sizeof(xcb_tmp); 20065 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 20066 } 20067 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 20068 xcb_parts_idx++; 20069 xcb_align_to = ALIGNOF(xcb_xkb_section_t); 20070 /* insert padding */ 20071 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20072 xcb_buffer_len += xcb_block_len + xcb_pad; 20073 if (0 != xcb_pad) { 20074 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20075 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20076 xcb_parts_idx++; 20077 xcb_pad = 0; 20078 } 20079 xcb_block_len = 0; 20080 /* doodads */ 20081 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.doodads; 20082 xcb_parts[xcb_parts_idx].iov_len = 0; 20083 xcb_tmp = (char *) _aux->geometry.doodads; 20084 for(i=0; i<_aux->geometry.nDoodads; i++) { 20085 xcb_block_len = xcb_xkb_doodad_sizeof(xcb_tmp); 20086 xcb_parts[xcb_parts_idx].iov_len += xcb_block_len; 20087 } 20088 xcb_block_len = xcb_parts[xcb_parts_idx].iov_len; 20089 xcb_parts_idx++; 20090 xcb_align_to = ALIGNOF(xcb_xkb_doodad_t); 20091 /* insert padding */ 20092 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20093 xcb_buffer_len += xcb_block_len + xcb_pad; 20094 if (0 != xcb_pad) { 20095 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20096 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20097 xcb_parts_idx++; 20098 xcb_pad = 0; 20099 } 20100 xcb_block_len = 0; 20101 /* keyAliases */ 20102 xcb_parts[xcb_parts_idx].iov_base = (char *) _aux->geometry.keyAliases; 20103 xcb_block_len += _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t); 20104 xcb_parts[xcb_parts_idx].iov_len = _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t); 20105 xcb_parts_idx++; 20106 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 20107 } 20108 /* insert padding */ 20109 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20110 xcb_buffer_len += xcb_block_len + xcb_pad; 20111 if (0 != xcb_pad) { 20112 xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; 20113 xcb_parts[xcb_parts_idx].iov_len = xcb_pad; 20114 xcb_parts_idx++; 20115 xcb_pad = 0; 20116 } 20117 xcb_block_len = 0; 20118 20119 if (NULL == xcb_out) { 20120 /* allocate memory */ 20121 xcb_out = malloc(xcb_buffer_len); 20122 *_buffer = xcb_out; 20123 } 20124 20125 xcb_tmp = xcb_out; 20126 for(i=0; i<xcb_parts_idx; i++) { 20127 if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) 20128 memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); 20129 if (0 != xcb_parts[i].iov_len) 20130 xcb_tmp += xcb_parts[i].iov_len; 20131 } 20132 20133 return xcb_buffer_len; 20134 } 20135 20136 int 20137 xcb_xkb_get_kbd_by_name_replies_unpack (const void *_buffer /**< */, 20138 uint16_t reported /**< */, 20139 xcb_xkb_get_kbd_by_name_replies_t *_aux /**< */) 20140 { 20141 char *xcb_tmp = (char *)_buffer; 20142 unsigned int xcb_buffer_len = 0; 20143 unsigned int xcb_block_len = 0; 20144 unsigned int xcb_pad = 0; 20145 unsigned int xcb_align_to; 20146 20147 unsigned int i; 20148 unsigned int xcb_tmp_len; 20149 20150 if(reported & XCB_XKB_GBN_DETAIL_TYPES) { 20151 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_type */ 20152 _aux->types.getmap_type = *(uint8_t *)xcb_tmp; 20153 xcb_block_len += sizeof(uint8_t); 20154 xcb_tmp += sizeof(uint8_t); 20155 xcb_align_to = ALIGNOF(uint8_t); 20156 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeDeviceID */ 20157 _aux->types.typeDeviceID = *(uint8_t *)xcb_tmp; 20158 xcb_block_len += sizeof(uint8_t); 20159 xcb_tmp += sizeof(uint8_t); 20160 xcb_align_to = ALIGNOF(uint8_t); 20161 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_sequence */ 20162 _aux->types.getmap_sequence = *(uint16_t *)xcb_tmp; 20163 xcb_block_len += sizeof(uint16_t); 20164 xcb_tmp += sizeof(uint16_t); 20165 xcb_align_to = ALIGNOF(uint16_t); 20166 /* xcb_xkb_get_kbd_by_name_replies_t.types.getmap_length */ 20167 _aux->types.getmap_length = *(uint32_t *)xcb_tmp; 20168 xcb_block_len += sizeof(uint32_t); 20169 xcb_tmp += sizeof(uint32_t); 20170 xcb_align_to = ALIGNOF(uint32_t); 20171 /* xcb_xkb_get_kbd_by_name_replies_t.types.pad0 */ 20172 _aux->types.pad0[0] = *(uint8_t *)xcb_tmp; 20173 _aux->types.pad0[1] = *(uint8_t *)xcb_tmp; 20174 xcb_block_len += sizeof(uint8_t) * 2; 20175 xcb_tmp += sizeof(uint8_t) * 2; 20176 xcb_align_to = ALIGNOF(uint8_t); 20177 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMinKeyCode */ 20178 _aux->types.typeMinKeyCode = *(xcb_keycode_t *)xcb_tmp; 20179 xcb_block_len += sizeof(xcb_keycode_t); 20180 xcb_tmp += sizeof(xcb_keycode_t); 20181 xcb_align_to = ALIGNOF(xcb_keycode_t); 20182 /* xcb_xkb_get_kbd_by_name_replies_t.types.typeMaxKeyCode */ 20183 _aux->types.typeMaxKeyCode = *(xcb_keycode_t *)xcb_tmp; 20184 xcb_block_len += sizeof(xcb_keycode_t); 20185 xcb_tmp += sizeof(xcb_keycode_t); 20186 xcb_align_to = ALIGNOF(xcb_keycode_t); 20187 /* xcb_xkb_get_kbd_by_name_replies_t.types.present */ 20188 _aux->types.present = *(uint16_t *)xcb_tmp; 20189 xcb_block_len += sizeof(uint16_t); 20190 xcb_tmp += sizeof(uint16_t); 20191 xcb_align_to = ALIGNOF(uint16_t); 20192 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstType */ 20193 _aux->types.firstType = *(uint8_t *)xcb_tmp; 20194 xcb_block_len += sizeof(uint8_t); 20195 xcb_tmp += sizeof(uint8_t); 20196 xcb_align_to = ALIGNOF(uint8_t); 20197 /* xcb_xkb_get_kbd_by_name_replies_t.types.nTypes */ 20198 _aux->types.nTypes = *(uint8_t *)xcb_tmp; 20199 xcb_block_len += sizeof(uint8_t); 20200 xcb_tmp += sizeof(uint8_t); 20201 xcb_align_to = ALIGNOF(uint8_t); 20202 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalTypes */ 20203 _aux->types.totalTypes = *(uint8_t *)xcb_tmp; 20204 xcb_block_len += sizeof(uint8_t); 20205 xcb_tmp += sizeof(uint8_t); 20206 xcb_align_to = ALIGNOF(uint8_t); 20207 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeySym */ 20208 _aux->types.firstKeySym = *(xcb_keycode_t *)xcb_tmp; 20209 xcb_block_len += sizeof(xcb_keycode_t); 20210 xcb_tmp += sizeof(xcb_keycode_t); 20211 xcb_align_to = ALIGNOF(xcb_keycode_t); 20212 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalSyms */ 20213 _aux->types.totalSyms = *(uint16_t *)xcb_tmp; 20214 xcb_block_len += sizeof(uint16_t); 20215 xcb_tmp += sizeof(uint16_t); 20216 xcb_align_to = ALIGNOF(uint16_t); 20217 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeySyms */ 20218 _aux->types.nKeySyms = *(uint8_t *)xcb_tmp; 20219 xcb_block_len += sizeof(uint8_t); 20220 xcb_tmp += sizeof(uint8_t); 20221 xcb_align_to = ALIGNOF(uint8_t); 20222 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyAction */ 20223 _aux->types.firstKeyAction = *(xcb_keycode_t *)xcb_tmp; 20224 xcb_block_len += sizeof(xcb_keycode_t); 20225 xcb_tmp += sizeof(xcb_keycode_t); 20226 xcb_align_to = ALIGNOF(xcb_keycode_t); 20227 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalActions */ 20228 _aux->types.totalActions = *(uint16_t *)xcb_tmp; 20229 xcb_block_len += sizeof(uint16_t); 20230 xcb_tmp += sizeof(uint16_t); 20231 xcb_align_to = ALIGNOF(uint16_t); 20232 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyActions */ 20233 _aux->types.nKeyActions = *(uint8_t *)xcb_tmp; 20234 xcb_block_len += sizeof(uint8_t); 20235 xcb_tmp += sizeof(uint8_t); 20236 xcb_align_to = ALIGNOF(uint8_t); 20237 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyBehavior */ 20238 _aux->types.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp; 20239 xcb_block_len += sizeof(xcb_keycode_t); 20240 xcb_tmp += sizeof(xcb_keycode_t); 20241 xcb_align_to = ALIGNOF(xcb_keycode_t); 20242 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyBehaviors */ 20243 _aux->types.nKeyBehaviors = *(uint8_t *)xcb_tmp; 20244 xcb_block_len += sizeof(uint8_t); 20245 xcb_tmp += sizeof(uint8_t); 20246 xcb_align_to = ALIGNOF(uint8_t); 20247 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyBehaviors */ 20248 _aux->types.totalKeyBehaviors = *(uint8_t *)xcb_tmp; 20249 xcb_block_len += sizeof(uint8_t); 20250 xcb_tmp += sizeof(uint8_t); 20251 xcb_align_to = ALIGNOF(uint8_t); 20252 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstKeyExplicit */ 20253 _aux->types.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp; 20254 xcb_block_len += sizeof(xcb_keycode_t); 20255 xcb_tmp += sizeof(xcb_keycode_t); 20256 xcb_align_to = ALIGNOF(xcb_keycode_t); 20257 /* xcb_xkb_get_kbd_by_name_replies_t.types.nKeyExplicit */ 20258 _aux->types.nKeyExplicit = *(uint8_t *)xcb_tmp; 20259 xcb_block_len += sizeof(uint8_t); 20260 xcb_tmp += sizeof(uint8_t); 20261 xcb_align_to = ALIGNOF(uint8_t); 20262 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalKeyExplicit */ 20263 _aux->types.totalKeyExplicit = *(uint8_t *)xcb_tmp; 20264 xcb_block_len += sizeof(uint8_t); 20265 xcb_tmp += sizeof(uint8_t); 20266 xcb_align_to = ALIGNOF(uint8_t); 20267 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstModMapKey */ 20268 _aux->types.firstModMapKey = *(xcb_keycode_t *)xcb_tmp; 20269 xcb_block_len += sizeof(xcb_keycode_t); 20270 xcb_tmp += sizeof(xcb_keycode_t); 20271 xcb_align_to = ALIGNOF(xcb_keycode_t); 20272 /* xcb_xkb_get_kbd_by_name_replies_t.types.nModMapKeys */ 20273 _aux->types.nModMapKeys = *(uint8_t *)xcb_tmp; 20274 xcb_block_len += sizeof(uint8_t); 20275 xcb_tmp += sizeof(uint8_t); 20276 xcb_align_to = ALIGNOF(uint8_t); 20277 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalModMapKeys */ 20278 _aux->types.totalModMapKeys = *(uint8_t *)xcb_tmp; 20279 xcb_block_len += sizeof(uint8_t); 20280 xcb_tmp += sizeof(uint8_t); 20281 xcb_align_to = ALIGNOF(uint8_t); 20282 /* xcb_xkb_get_kbd_by_name_replies_t.types.firstVModMapKey */ 20283 _aux->types.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp; 20284 xcb_block_len += sizeof(xcb_keycode_t); 20285 xcb_tmp += sizeof(xcb_keycode_t); 20286 xcb_align_to = ALIGNOF(xcb_keycode_t); 20287 /* xcb_xkb_get_kbd_by_name_replies_t.types.nVModMapKeys */ 20288 _aux->types.nVModMapKeys = *(uint8_t *)xcb_tmp; 20289 xcb_block_len += sizeof(uint8_t); 20290 xcb_tmp += sizeof(uint8_t); 20291 xcb_align_to = ALIGNOF(uint8_t); 20292 /* xcb_xkb_get_kbd_by_name_replies_t.types.totalVModMapKeys */ 20293 _aux->types.totalVModMapKeys = *(uint8_t *)xcb_tmp; 20294 xcb_block_len += sizeof(uint8_t); 20295 xcb_tmp += sizeof(uint8_t); 20296 xcb_align_to = ALIGNOF(uint8_t); 20297 /* xcb_xkb_get_kbd_by_name_replies_t.types.pad1 */ 20298 _aux->types.pad1 = *(uint8_t *)xcb_tmp; 20299 xcb_block_len += sizeof(uint8_t); 20300 xcb_tmp += sizeof(uint8_t); 20301 xcb_align_to = ALIGNOF(uint8_t); 20302 /* xcb_xkb_get_kbd_by_name_replies_t.types.virtualMods */ 20303 _aux->types.virtualMods = *(uint16_t *)xcb_tmp; 20304 xcb_block_len += sizeof(uint16_t); 20305 xcb_tmp += sizeof(uint16_t); 20306 xcb_align_to = ALIGNOF(uint16_t); 20307 /* insert padding */ 20308 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20309 xcb_buffer_len += xcb_block_len + xcb_pad; 20310 if (0 != xcb_pad) { 20311 xcb_tmp += xcb_pad; 20312 xcb_pad = 0; 20313 } 20314 xcb_block_len = 0; 20315 /* map */ 20316 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_types_map_unpack(xcb_tmp, _aux->types.nTypes, _aux->types.nKeySyms, _aux->types.nKeyActions, _aux->types.totalActions, _aux->types.totalKeyBehaviors, _aux->types.nVModMapKeys, _aux->types.totalKeyExplicit, _aux->types.totalModMapKeys, _aux->types.totalVModMapKeys, _aux->types.present, &_aux->types.map); 20317 xcb_tmp += xcb_block_len; 20318 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_types_map_t); 20319 } 20320 if(reported & XCB_XKB_GBN_DETAIL_COMPAT_MAP) { 20321 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.compatDeviceID */ 20322 _aux->compat_map.compatDeviceID = *(uint8_t *)xcb_tmp; 20323 xcb_block_len += sizeof(uint8_t); 20324 xcb_tmp += sizeof(uint8_t); 20325 xcb_align_to = ALIGNOF(uint8_t); 20326 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.groupsRtrn */ 20327 _aux->compat_map.groupsRtrn = *(uint8_t *)xcb_tmp; 20328 xcb_block_len += sizeof(uint8_t); 20329 xcb_tmp += sizeof(uint8_t); 20330 xcb_align_to = ALIGNOF(uint8_t); 20331 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad0 */ 20332 _aux->compat_map.pad0 = *(uint8_t *)xcb_tmp; 20333 xcb_block_len += sizeof(uint8_t); 20334 xcb_tmp += sizeof(uint8_t); 20335 xcb_align_to = ALIGNOF(uint8_t); 20336 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.firstSIRtrn */ 20337 _aux->compat_map.firstSIRtrn = *(uint16_t *)xcb_tmp; 20338 xcb_block_len += sizeof(uint16_t); 20339 xcb_tmp += sizeof(uint16_t); 20340 xcb_align_to = ALIGNOF(uint16_t); 20341 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nSIRtrn */ 20342 _aux->compat_map.nSIRtrn = *(uint16_t *)xcb_tmp; 20343 xcb_block_len += sizeof(uint16_t); 20344 xcb_tmp += sizeof(uint16_t); 20345 xcb_align_to = ALIGNOF(uint16_t); 20346 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.nTotalSI */ 20347 _aux->compat_map.nTotalSI = *(uint16_t *)xcb_tmp; 20348 xcb_block_len += sizeof(uint16_t); 20349 xcb_tmp += sizeof(uint16_t); 20350 xcb_align_to = ALIGNOF(uint16_t); 20351 /* xcb_xkb_get_kbd_by_name_replies_t.compat_map.pad1 */ 20352 _aux->compat_map.pad1[0] = *(uint8_t *)xcb_tmp; 20353 _aux->compat_map.pad1[1] = *(uint8_t *)xcb_tmp; 20354 _aux->compat_map.pad1[2] = *(uint8_t *)xcb_tmp; 20355 _aux->compat_map.pad1[3] = *(uint8_t *)xcb_tmp; 20356 _aux->compat_map.pad1[4] = *(uint8_t *)xcb_tmp; 20357 _aux->compat_map.pad1[5] = *(uint8_t *)xcb_tmp; 20358 _aux->compat_map.pad1[6] = *(uint8_t *)xcb_tmp; 20359 _aux->compat_map.pad1[7] = *(uint8_t *)xcb_tmp; 20360 _aux->compat_map.pad1[8] = *(uint8_t *)xcb_tmp; 20361 _aux->compat_map.pad1[9] = *(uint8_t *)xcb_tmp; 20362 _aux->compat_map.pad1[10] = *(uint8_t *)xcb_tmp; 20363 _aux->compat_map.pad1[11] = *(uint8_t *)xcb_tmp; 20364 _aux->compat_map.pad1[12] = *(uint8_t *)xcb_tmp; 20365 _aux->compat_map.pad1[13] = *(uint8_t *)xcb_tmp; 20366 _aux->compat_map.pad1[14] = *(uint8_t *)xcb_tmp; 20367 _aux->compat_map.pad1[15] = *(uint8_t *)xcb_tmp; 20368 xcb_block_len += sizeof(uint8_t) * 16; 20369 xcb_tmp += sizeof(uint8_t) * 16; 20370 xcb_align_to = ALIGNOF(uint8_t); 20371 /* insert padding */ 20372 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20373 xcb_buffer_len += xcb_block_len + xcb_pad; 20374 if (0 != xcb_pad) { 20375 xcb_tmp += xcb_pad; 20376 xcb_pad = 0; 20377 } 20378 xcb_block_len = 0; 20379 /* si_rtrn */ 20380 _aux->compat_map.si_rtrn = (uint8_t *)xcb_tmp; 20381 xcb_block_len += (16 * _aux->compat_map.nSIRtrn) * sizeof(uint8_t); 20382 xcb_tmp += xcb_block_len; 20383 xcb_align_to = ALIGNOF(uint8_t); 20384 /* insert padding */ 20385 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20386 xcb_buffer_len += xcb_block_len + xcb_pad; 20387 if (0 != xcb_pad) { 20388 xcb_tmp += xcb_pad; 20389 xcb_pad = 0; 20390 } 20391 xcb_block_len = 0; 20392 /* group_rtrn */ 20393 _aux->compat_map.group_rtrn = (xcb_xkb_mod_def_t *)xcb_tmp; 20394 xcb_block_len += xcb_popcount(_aux->compat_map.groupsRtrn) * sizeof(xcb_xkb_mod_def_t); 20395 xcb_tmp += xcb_block_len; 20396 xcb_align_to = ALIGNOF(xcb_xkb_mod_def_t); 20397 } 20398 if(reported & XCB_XKB_GBN_DETAIL_CLIENT_SYMBOLS) { 20399 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientDeviceID */ 20400 _aux->client_symbols.clientDeviceID = *(uint8_t *)xcb_tmp; 20401 xcb_block_len += sizeof(uint8_t); 20402 xcb_tmp += sizeof(uint8_t); 20403 xcb_align_to = ALIGNOF(uint8_t); 20404 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad0 */ 20405 _aux->client_symbols.pad0[0] = *(uint8_t *)xcb_tmp; 20406 _aux->client_symbols.pad0[1] = *(uint8_t *)xcb_tmp; 20407 xcb_block_len += sizeof(uint8_t) * 2; 20408 xcb_tmp += sizeof(uint8_t) * 2; 20409 xcb_align_to = ALIGNOF(uint8_t); 20410 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMinKeyCode */ 20411 _aux->client_symbols.clientMinKeyCode = *(xcb_keycode_t *)xcb_tmp; 20412 xcb_block_len += sizeof(xcb_keycode_t); 20413 xcb_tmp += sizeof(xcb_keycode_t); 20414 xcb_align_to = ALIGNOF(xcb_keycode_t); 20415 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.clientMaxKeyCode */ 20416 _aux->client_symbols.clientMaxKeyCode = *(xcb_keycode_t *)xcb_tmp; 20417 xcb_block_len += sizeof(xcb_keycode_t); 20418 xcb_tmp += sizeof(xcb_keycode_t); 20419 xcb_align_to = ALIGNOF(xcb_keycode_t); 20420 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.present */ 20421 _aux->client_symbols.present = *(uint16_t *)xcb_tmp; 20422 xcb_block_len += sizeof(uint16_t); 20423 xcb_tmp += sizeof(uint16_t); 20424 xcb_align_to = ALIGNOF(uint16_t); 20425 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstType */ 20426 _aux->client_symbols.firstType = *(uint8_t *)xcb_tmp; 20427 xcb_block_len += sizeof(uint8_t); 20428 xcb_tmp += sizeof(uint8_t); 20429 xcb_align_to = ALIGNOF(uint8_t); 20430 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nTypes */ 20431 _aux->client_symbols.nTypes = *(uint8_t *)xcb_tmp; 20432 xcb_block_len += sizeof(uint8_t); 20433 xcb_tmp += sizeof(uint8_t); 20434 xcb_align_to = ALIGNOF(uint8_t); 20435 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalTypes */ 20436 _aux->client_symbols.totalTypes = *(uint8_t *)xcb_tmp; 20437 xcb_block_len += sizeof(uint8_t); 20438 xcb_tmp += sizeof(uint8_t); 20439 xcb_align_to = ALIGNOF(uint8_t); 20440 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeySym */ 20441 _aux->client_symbols.firstKeySym = *(xcb_keycode_t *)xcb_tmp; 20442 xcb_block_len += sizeof(xcb_keycode_t); 20443 xcb_tmp += sizeof(xcb_keycode_t); 20444 xcb_align_to = ALIGNOF(xcb_keycode_t); 20445 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalSyms */ 20446 _aux->client_symbols.totalSyms = *(uint16_t *)xcb_tmp; 20447 xcb_block_len += sizeof(uint16_t); 20448 xcb_tmp += sizeof(uint16_t); 20449 xcb_align_to = ALIGNOF(uint16_t); 20450 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeySyms */ 20451 _aux->client_symbols.nKeySyms = *(uint8_t *)xcb_tmp; 20452 xcb_block_len += sizeof(uint8_t); 20453 xcb_tmp += sizeof(uint8_t); 20454 xcb_align_to = ALIGNOF(uint8_t); 20455 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyAction */ 20456 _aux->client_symbols.firstKeyAction = *(xcb_keycode_t *)xcb_tmp; 20457 xcb_block_len += sizeof(xcb_keycode_t); 20458 xcb_tmp += sizeof(xcb_keycode_t); 20459 xcb_align_to = ALIGNOF(xcb_keycode_t); 20460 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalActions */ 20461 _aux->client_symbols.totalActions = *(uint16_t *)xcb_tmp; 20462 xcb_block_len += sizeof(uint16_t); 20463 xcb_tmp += sizeof(uint16_t); 20464 xcb_align_to = ALIGNOF(uint16_t); 20465 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyActions */ 20466 _aux->client_symbols.nKeyActions = *(uint8_t *)xcb_tmp; 20467 xcb_block_len += sizeof(uint8_t); 20468 xcb_tmp += sizeof(uint8_t); 20469 xcb_align_to = ALIGNOF(uint8_t); 20470 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyBehavior */ 20471 _aux->client_symbols.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp; 20472 xcb_block_len += sizeof(xcb_keycode_t); 20473 xcb_tmp += sizeof(xcb_keycode_t); 20474 xcb_align_to = ALIGNOF(xcb_keycode_t); 20475 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyBehaviors */ 20476 _aux->client_symbols.nKeyBehaviors = *(uint8_t *)xcb_tmp; 20477 xcb_block_len += sizeof(uint8_t); 20478 xcb_tmp += sizeof(uint8_t); 20479 xcb_align_to = ALIGNOF(uint8_t); 20480 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyBehaviors */ 20481 _aux->client_symbols.totalKeyBehaviors = *(uint8_t *)xcb_tmp; 20482 xcb_block_len += sizeof(uint8_t); 20483 xcb_tmp += sizeof(uint8_t); 20484 xcb_align_to = ALIGNOF(uint8_t); 20485 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstKeyExplicit */ 20486 _aux->client_symbols.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp; 20487 xcb_block_len += sizeof(xcb_keycode_t); 20488 xcb_tmp += sizeof(xcb_keycode_t); 20489 xcb_align_to = ALIGNOF(xcb_keycode_t); 20490 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nKeyExplicit */ 20491 _aux->client_symbols.nKeyExplicit = *(uint8_t *)xcb_tmp; 20492 xcb_block_len += sizeof(uint8_t); 20493 xcb_tmp += sizeof(uint8_t); 20494 xcb_align_to = ALIGNOF(uint8_t); 20495 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalKeyExplicit */ 20496 _aux->client_symbols.totalKeyExplicit = *(uint8_t *)xcb_tmp; 20497 xcb_block_len += sizeof(uint8_t); 20498 xcb_tmp += sizeof(uint8_t); 20499 xcb_align_to = ALIGNOF(uint8_t); 20500 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstModMapKey */ 20501 _aux->client_symbols.firstModMapKey = *(xcb_keycode_t *)xcb_tmp; 20502 xcb_block_len += sizeof(xcb_keycode_t); 20503 xcb_tmp += sizeof(xcb_keycode_t); 20504 xcb_align_to = ALIGNOF(xcb_keycode_t); 20505 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nModMapKeys */ 20506 _aux->client_symbols.nModMapKeys = *(uint8_t *)xcb_tmp; 20507 xcb_block_len += sizeof(uint8_t); 20508 xcb_tmp += sizeof(uint8_t); 20509 xcb_align_to = ALIGNOF(uint8_t); 20510 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalModMapKeys */ 20511 _aux->client_symbols.totalModMapKeys = *(uint8_t *)xcb_tmp; 20512 xcb_block_len += sizeof(uint8_t); 20513 xcb_tmp += sizeof(uint8_t); 20514 xcb_align_to = ALIGNOF(uint8_t); 20515 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.firstVModMapKey */ 20516 _aux->client_symbols.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp; 20517 xcb_block_len += sizeof(xcb_keycode_t); 20518 xcb_tmp += sizeof(xcb_keycode_t); 20519 xcb_align_to = ALIGNOF(xcb_keycode_t); 20520 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.nVModMapKeys */ 20521 _aux->client_symbols.nVModMapKeys = *(uint8_t *)xcb_tmp; 20522 xcb_block_len += sizeof(uint8_t); 20523 xcb_tmp += sizeof(uint8_t); 20524 xcb_align_to = ALIGNOF(uint8_t); 20525 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.totalVModMapKeys */ 20526 _aux->client_symbols.totalVModMapKeys = *(uint8_t *)xcb_tmp; 20527 xcb_block_len += sizeof(uint8_t); 20528 xcb_tmp += sizeof(uint8_t); 20529 xcb_align_to = ALIGNOF(uint8_t); 20530 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.pad1 */ 20531 _aux->client_symbols.pad1 = *(uint8_t *)xcb_tmp; 20532 xcb_block_len += sizeof(uint8_t); 20533 xcb_tmp += sizeof(uint8_t); 20534 xcb_align_to = ALIGNOF(uint8_t); 20535 /* xcb_xkb_get_kbd_by_name_replies_t.client_symbols.virtualMods */ 20536 _aux->client_symbols.virtualMods = *(uint16_t *)xcb_tmp; 20537 xcb_block_len += sizeof(uint16_t); 20538 xcb_tmp += sizeof(uint16_t); 20539 xcb_align_to = ALIGNOF(uint16_t); 20540 /* insert padding */ 20541 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20542 xcb_buffer_len += xcb_block_len + xcb_pad; 20543 if (0 != xcb_pad) { 20544 xcb_tmp += xcb_pad; 20545 xcb_pad = 0; 20546 } 20547 xcb_block_len = 0; 20548 /* map */ 20549 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_client_symbols_map_unpack(xcb_tmp, _aux->client_symbols.nTypes, _aux->client_symbols.nKeySyms, _aux->client_symbols.nKeyActions, _aux->client_symbols.totalActions, _aux->client_symbols.totalKeyBehaviors, _aux->client_symbols.nVModMapKeys, _aux->client_symbols.totalKeyExplicit, _aux->client_symbols.totalModMapKeys, _aux->client_symbols.totalVModMapKeys, _aux->client_symbols.present, &_aux->client_symbols.map); 20550 xcb_tmp += xcb_block_len; 20551 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_client_symbols_map_t); 20552 } 20553 if(reported & XCB_XKB_GBN_DETAIL_SERVER_SYMBOLS) { 20554 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverDeviceID */ 20555 _aux->server_symbols.serverDeviceID = *(uint8_t *)xcb_tmp; 20556 xcb_block_len += sizeof(uint8_t); 20557 xcb_tmp += sizeof(uint8_t); 20558 xcb_align_to = ALIGNOF(uint8_t); 20559 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad0 */ 20560 _aux->server_symbols.pad0[0] = *(uint8_t *)xcb_tmp; 20561 _aux->server_symbols.pad0[1] = *(uint8_t *)xcb_tmp; 20562 xcb_block_len += sizeof(uint8_t) * 2; 20563 xcb_tmp += sizeof(uint8_t) * 2; 20564 xcb_align_to = ALIGNOF(uint8_t); 20565 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMinKeyCode */ 20566 _aux->server_symbols.serverMinKeyCode = *(xcb_keycode_t *)xcb_tmp; 20567 xcb_block_len += sizeof(xcb_keycode_t); 20568 xcb_tmp += sizeof(xcb_keycode_t); 20569 xcb_align_to = ALIGNOF(xcb_keycode_t); 20570 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.serverMaxKeyCode */ 20571 _aux->server_symbols.serverMaxKeyCode = *(xcb_keycode_t *)xcb_tmp; 20572 xcb_block_len += sizeof(xcb_keycode_t); 20573 xcb_tmp += sizeof(xcb_keycode_t); 20574 xcb_align_to = ALIGNOF(xcb_keycode_t); 20575 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.present */ 20576 _aux->server_symbols.present = *(uint16_t *)xcb_tmp; 20577 xcb_block_len += sizeof(uint16_t); 20578 xcb_tmp += sizeof(uint16_t); 20579 xcb_align_to = ALIGNOF(uint16_t); 20580 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstType */ 20581 _aux->server_symbols.firstType = *(uint8_t *)xcb_tmp; 20582 xcb_block_len += sizeof(uint8_t); 20583 xcb_tmp += sizeof(uint8_t); 20584 xcb_align_to = ALIGNOF(uint8_t); 20585 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nTypes */ 20586 _aux->server_symbols.nTypes = *(uint8_t *)xcb_tmp; 20587 xcb_block_len += sizeof(uint8_t); 20588 xcb_tmp += sizeof(uint8_t); 20589 xcb_align_to = ALIGNOF(uint8_t); 20590 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalTypes */ 20591 _aux->server_symbols.totalTypes = *(uint8_t *)xcb_tmp; 20592 xcb_block_len += sizeof(uint8_t); 20593 xcb_tmp += sizeof(uint8_t); 20594 xcb_align_to = ALIGNOF(uint8_t); 20595 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeySym */ 20596 _aux->server_symbols.firstKeySym = *(xcb_keycode_t *)xcb_tmp; 20597 xcb_block_len += sizeof(xcb_keycode_t); 20598 xcb_tmp += sizeof(xcb_keycode_t); 20599 xcb_align_to = ALIGNOF(xcb_keycode_t); 20600 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalSyms */ 20601 _aux->server_symbols.totalSyms = *(uint16_t *)xcb_tmp; 20602 xcb_block_len += sizeof(uint16_t); 20603 xcb_tmp += sizeof(uint16_t); 20604 xcb_align_to = ALIGNOF(uint16_t); 20605 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeySyms */ 20606 _aux->server_symbols.nKeySyms = *(uint8_t *)xcb_tmp; 20607 xcb_block_len += sizeof(uint8_t); 20608 xcb_tmp += sizeof(uint8_t); 20609 xcb_align_to = ALIGNOF(uint8_t); 20610 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyAction */ 20611 _aux->server_symbols.firstKeyAction = *(xcb_keycode_t *)xcb_tmp; 20612 xcb_block_len += sizeof(xcb_keycode_t); 20613 xcb_tmp += sizeof(xcb_keycode_t); 20614 xcb_align_to = ALIGNOF(xcb_keycode_t); 20615 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalActions */ 20616 _aux->server_symbols.totalActions = *(uint16_t *)xcb_tmp; 20617 xcb_block_len += sizeof(uint16_t); 20618 xcb_tmp += sizeof(uint16_t); 20619 xcb_align_to = ALIGNOF(uint16_t); 20620 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyActions */ 20621 _aux->server_symbols.nKeyActions = *(uint8_t *)xcb_tmp; 20622 xcb_block_len += sizeof(uint8_t); 20623 xcb_tmp += sizeof(uint8_t); 20624 xcb_align_to = ALIGNOF(uint8_t); 20625 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyBehavior */ 20626 _aux->server_symbols.firstKeyBehavior = *(xcb_keycode_t *)xcb_tmp; 20627 xcb_block_len += sizeof(xcb_keycode_t); 20628 xcb_tmp += sizeof(xcb_keycode_t); 20629 xcb_align_to = ALIGNOF(xcb_keycode_t); 20630 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyBehaviors */ 20631 _aux->server_symbols.nKeyBehaviors = *(uint8_t *)xcb_tmp; 20632 xcb_block_len += sizeof(uint8_t); 20633 xcb_tmp += sizeof(uint8_t); 20634 xcb_align_to = ALIGNOF(uint8_t); 20635 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyBehaviors */ 20636 _aux->server_symbols.totalKeyBehaviors = *(uint8_t *)xcb_tmp; 20637 xcb_block_len += sizeof(uint8_t); 20638 xcb_tmp += sizeof(uint8_t); 20639 xcb_align_to = ALIGNOF(uint8_t); 20640 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstKeyExplicit */ 20641 _aux->server_symbols.firstKeyExplicit = *(xcb_keycode_t *)xcb_tmp; 20642 xcb_block_len += sizeof(xcb_keycode_t); 20643 xcb_tmp += sizeof(xcb_keycode_t); 20644 xcb_align_to = ALIGNOF(xcb_keycode_t); 20645 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nKeyExplicit */ 20646 _aux->server_symbols.nKeyExplicit = *(uint8_t *)xcb_tmp; 20647 xcb_block_len += sizeof(uint8_t); 20648 xcb_tmp += sizeof(uint8_t); 20649 xcb_align_to = ALIGNOF(uint8_t); 20650 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalKeyExplicit */ 20651 _aux->server_symbols.totalKeyExplicit = *(uint8_t *)xcb_tmp; 20652 xcb_block_len += sizeof(uint8_t); 20653 xcb_tmp += sizeof(uint8_t); 20654 xcb_align_to = ALIGNOF(uint8_t); 20655 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstModMapKey */ 20656 _aux->server_symbols.firstModMapKey = *(xcb_keycode_t *)xcb_tmp; 20657 xcb_block_len += sizeof(xcb_keycode_t); 20658 xcb_tmp += sizeof(xcb_keycode_t); 20659 xcb_align_to = ALIGNOF(xcb_keycode_t); 20660 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nModMapKeys */ 20661 _aux->server_symbols.nModMapKeys = *(uint8_t *)xcb_tmp; 20662 xcb_block_len += sizeof(uint8_t); 20663 xcb_tmp += sizeof(uint8_t); 20664 xcb_align_to = ALIGNOF(uint8_t); 20665 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalModMapKeys */ 20666 _aux->server_symbols.totalModMapKeys = *(uint8_t *)xcb_tmp; 20667 xcb_block_len += sizeof(uint8_t); 20668 xcb_tmp += sizeof(uint8_t); 20669 xcb_align_to = ALIGNOF(uint8_t); 20670 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.firstVModMapKey */ 20671 _aux->server_symbols.firstVModMapKey = *(xcb_keycode_t *)xcb_tmp; 20672 xcb_block_len += sizeof(xcb_keycode_t); 20673 xcb_tmp += sizeof(xcb_keycode_t); 20674 xcb_align_to = ALIGNOF(xcb_keycode_t); 20675 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.nVModMapKeys */ 20676 _aux->server_symbols.nVModMapKeys = *(uint8_t *)xcb_tmp; 20677 xcb_block_len += sizeof(uint8_t); 20678 xcb_tmp += sizeof(uint8_t); 20679 xcb_align_to = ALIGNOF(uint8_t); 20680 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.totalVModMapKeys */ 20681 _aux->server_symbols.totalVModMapKeys = *(uint8_t *)xcb_tmp; 20682 xcb_block_len += sizeof(uint8_t); 20683 xcb_tmp += sizeof(uint8_t); 20684 xcb_align_to = ALIGNOF(uint8_t); 20685 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.pad1 */ 20686 _aux->server_symbols.pad1 = *(uint8_t *)xcb_tmp; 20687 xcb_block_len += sizeof(uint8_t); 20688 xcb_tmp += sizeof(uint8_t); 20689 xcb_align_to = ALIGNOF(uint8_t); 20690 /* xcb_xkb_get_kbd_by_name_replies_t.server_symbols.virtualMods */ 20691 _aux->server_symbols.virtualMods = *(uint16_t *)xcb_tmp; 20692 xcb_block_len += sizeof(uint16_t); 20693 xcb_tmp += sizeof(uint16_t); 20694 xcb_align_to = ALIGNOF(uint16_t); 20695 /* insert padding */ 20696 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20697 xcb_buffer_len += xcb_block_len + xcb_pad; 20698 if (0 != xcb_pad) { 20699 xcb_tmp += xcb_pad; 20700 xcb_pad = 0; 20701 } 20702 xcb_block_len = 0; 20703 /* map */ 20704 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_server_symbols_map_unpack(xcb_tmp, _aux->server_symbols.nTypes, _aux->server_symbols.nKeySyms, _aux->server_symbols.nKeyActions, _aux->server_symbols.totalActions, _aux->server_symbols.totalKeyBehaviors, _aux->server_symbols.nVModMapKeys, _aux->server_symbols.totalKeyExplicit, _aux->server_symbols.totalModMapKeys, _aux->server_symbols.totalVModMapKeys, _aux->server_symbols.present, &_aux->server_symbols.map); 20705 xcb_tmp += xcb_block_len; 20706 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_server_symbols_map_t); 20707 } 20708 if(reported & XCB_XKB_GBN_DETAIL_INDICATOR_MAPS) { 20709 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.indicatorDeviceID */ 20710 _aux->indicator_maps.indicatorDeviceID = *(uint8_t *)xcb_tmp; 20711 xcb_block_len += sizeof(uint8_t); 20712 xcb_tmp += sizeof(uint8_t); 20713 xcb_align_to = ALIGNOF(uint8_t); 20714 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.which */ 20715 _aux->indicator_maps.which = *(uint32_t *)xcb_tmp; 20716 xcb_block_len += sizeof(uint32_t); 20717 xcb_tmp += sizeof(uint32_t); 20718 xcb_align_to = ALIGNOF(uint32_t); 20719 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.realIndicators */ 20720 _aux->indicator_maps.realIndicators = *(uint32_t *)xcb_tmp; 20721 xcb_block_len += sizeof(uint32_t); 20722 xcb_tmp += sizeof(uint32_t); 20723 xcb_align_to = ALIGNOF(uint32_t); 20724 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.nIndicators */ 20725 _aux->indicator_maps.nIndicators = *(uint8_t *)xcb_tmp; 20726 xcb_block_len += sizeof(uint8_t); 20727 xcb_tmp += sizeof(uint8_t); 20728 xcb_align_to = ALIGNOF(uint8_t); 20729 /* xcb_xkb_get_kbd_by_name_replies_t.indicator_maps.pad0 */ 20730 _aux->indicator_maps.pad0[0] = *(uint8_t *)xcb_tmp; 20731 _aux->indicator_maps.pad0[1] = *(uint8_t *)xcb_tmp; 20732 _aux->indicator_maps.pad0[2] = *(uint8_t *)xcb_tmp; 20733 _aux->indicator_maps.pad0[3] = *(uint8_t *)xcb_tmp; 20734 _aux->indicator_maps.pad0[4] = *(uint8_t *)xcb_tmp; 20735 _aux->indicator_maps.pad0[5] = *(uint8_t *)xcb_tmp; 20736 _aux->indicator_maps.pad0[6] = *(uint8_t *)xcb_tmp; 20737 _aux->indicator_maps.pad0[7] = *(uint8_t *)xcb_tmp; 20738 _aux->indicator_maps.pad0[8] = *(uint8_t *)xcb_tmp; 20739 _aux->indicator_maps.pad0[9] = *(uint8_t *)xcb_tmp; 20740 _aux->indicator_maps.pad0[10] = *(uint8_t *)xcb_tmp; 20741 _aux->indicator_maps.pad0[11] = *(uint8_t *)xcb_tmp; 20742 _aux->indicator_maps.pad0[12] = *(uint8_t *)xcb_tmp; 20743 _aux->indicator_maps.pad0[13] = *(uint8_t *)xcb_tmp; 20744 _aux->indicator_maps.pad0[14] = *(uint8_t *)xcb_tmp; 20745 xcb_block_len += sizeof(uint8_t) * 15; 20746 xcb_tmp += sizeof(uint8_t) * 15; 20747 xcb_align_to = ALIGNOF(uint8_t); 20748 /* insert padding */ 20749 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20750 xcb_buffer_len += xcb_block_len + xcb_pad; 20751 if (0 != xcb_pad) { 20752 xcb_tmp += xcb_pad; 20753 xcb_pad = 0; 20754 } 20755 xcb_block_len = 0; 20756 /* maps */ 20757 _aux->indicator_maps.maps = (xcb_xkb_indicator_map_t *)xcb_tmp; 20758 xcb_block_len += _aux->indicator_maps.nIndicators * sizeof(xcb_xkb_indicator_map_t); 20759 xcb_tmp += xcb_block_len; 20760 xcb_align_to = ALIGNOF(xcb_xkb_indicator_map_t); 20761 } 20762 if(reported & XCB_XKB_GBN_DETAIL_KEY_NAMES) { 20763 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyDeviceID */ 20764 _aux->key_names.keyDeviceID = *(uint8_t *)xcb_tmp; 20765 xcb_block_len += sizeof(uint8_t); 20766 xcb_tmp += sizeof(uint8_t); 20767 xcb_align_to = ALIGNOF(uint8_t); 20768 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.which */ 20769 _aux->key_names.which = *(uint32_t *)xcb_tmp; 20770 xcb_block_len += sizeof(uint32_t); 20771 xcb_tmp += sizeof(uint32_t); 20772 xcb_align_to = ALIGNOF(uint32_t); 20773 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMinKeyCode */ 20774 _aux->key_names.keyMinKeyCode = *(xcb_keycode_t *)xcb_tmp; 20775 xcb_block_len += sizeof(xcb_keycode_t); 20776 xcb_tmp += sizeof(xcb_keycode_t); 20777 xcb_align_to = ALIGNOF(xcb_keycode_t); 20778 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.keyMaxKeyCode */ 20779 _aux->key_names.keyMaxKeyCode = *(xcb_keycode_t *)xcb_tmp; 20780 xcb_block_len += sizeof(xcb_keycode_t); 20781 xcb_tmp += sizeof(xcb_keycode_t); 20782 xcb_align_to = ALIGNOF(xcb_keycode_t); 20783 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nTypes */ 20784 _aux->key_names.nTypes = *(uint8_t *)xcb_tmp; 20785 xcb_block_len += sizeof(uint8_t); 20786 xcb_tmp += sizeof(uint8_t); 20787 xcb_align_to = ALIGNOF(uint8_t); 20788 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.groupNames */ 20789 _aux->key_names.groupNames = *(uint8_t *)xcb_tmp; 20790 xcb_block_len += sizeof(uint8_t); 20791 xcb_tmp += sizeof(uint8_t); 20792 xcb_align_to = ALIGNOF(uint8_t); 20793 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.virtualMods */ 20794 _aux->key_names.virtualMods = *(uint16_t *)xcb_tmp; 20795 xcb_block_len += sizeof(uint16_t); 20796 xcb_tmp += sizeof(uint16_t); 20797 xcb_align_to = ALIGNOF(uint16_t); 20798 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.firstKey */ 20799 _aux->key_names.firstKey = *(xcb_keycode_t *)xcb_tmp; 20800 xcb_block_len += sizeof(xcb_keycode_t); 20801 xcb_tmp += sizeof(xcb_keycode_t); 20802 xcb_align_to = ALIGNOF(xcb_keycode_t); 20803 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeys */ 20804 _aux->key_names.nKeys = *(uint8_t *)xcb_tmp; 20805 xcb_block_len += sizeof(uint8_t); 20806 xcb_tmp += sizeof(uint8_t); 20807 xcb_align_to = ALIGNOF(uint8_t); 20808 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.indicators */ 20809 _aux->key_names.indicators = *(uint32_t *)xcb_tmp; 20810 xcb_block_len += sizeof(uint32_t); 20811 xcb_tmp += sizeof(uint32_t); 20812 xcb_align_to = ALIGNOF(uint32_t); 20813 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nRadioGroups */ 20814 _aux->key_names.nRadioGroups = *(uint8_t *)xcb_tmp; 20815 xcb_block_len += sizeof(uint8_t); 20816 xcb_tmp += sizeof(uint8_t); 20817 xcb_align_to = ALIGNOF(uint8_t); 20818 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKeyAliases */ 20819 _aux->key_names.nKeyAliases = *(uint8_t *)xcb_tmp; 20820 xcb_block_len += sizeof(uint8_t); 20821 xcb_tmp += sizeof(uint8_t); 20822 xcb_align_to = ALIGNOF(uint8_t); 20823 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.nKTLevels */ 20824 _aux->key_names.nKTLevels = *(uint16_t *)xcb_tmp; 20825 xcb_block_len += sizeof(uint16_t); 20826 xcb_tmp += sizeof(uint16_t); 20827 xcb_align_to = ALIGNOF(uint16_t); 20828 /* xcb_xkb_get_kbd_by_name_replies_t.key_names.pad0 */ 20829 _aux->key_names.pad0[0] = *(uint8_t *)xcb_tmp; 20830 _aux->key_names.pad0[1] = *(uint8_t *)xcb_tmp; 20831 _aux->key_names.pad0[2] = *(uint8_t *)xcb_tmp; 20832 _aux->key_names.pad0[3] = *(uint8_t *)xcb_tmp; 20833 xcb_block_len += sizeof(uint8_t) * 4; 20834 xcb_tmp += sizeof(uint8_t) * 4; 20835 xcb_align_to = ALIGNOF(uint8_t); 20836 /* insert padding */ 20837 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20838 xcb_buffer_len += xcb_block_len + xcb_pad; 20839 if (0 != xcb_pad) { 20840 xcb_tmp += xcb_pad; 20841 xcb_pad = 0; 20842 } 20843 xcb_block_len = 0; 20844 /* valueList */ 20845 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_key_names_value_list_unpack(xcb_tmp, _aux->key_names.nTypes, _aux->key_names.nKTLevels, _aux->key_names.indicators, _aux->key_names.virtualMods, _aux->key_names.groupNames, _aux->key_names.nKeys, _aux->key_names.nKeyAliases, _aux->key_names.nRadioGroups, _aux->key_names.which, &_aux->key_names.valueList); 20846 xcb_tmp += xcb_block_len; 20847 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_key_names_value_list_t); 20848 } 20849 if(reported & XCB_XKB_GBN_DETAIL_OTHER_NAMES) { 20850 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherDeviceID */ 20851 _aux->other_names.otherDeviceID = *(uint8_t *)xcb_tmp; 20852 xcb_block_len += sizeof(uint8_t); 20853 xcb_tmp += sizeof(uint8_t); 20854 xcb_align_to = ALIGNOF(uint8_t); 20855 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.which */ 20856 _aux->other_names.which = *(uint32_t *)xcb_tmp; 20857 xcb_block_len += sizeof(uint32_t); 20858 xcb_tmp += sizeof(uint32_t); 20859 xcb_align_to = ALIGNOF(uint32_t); 20860 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMinKeyCode */ 20861 _aux->other_names.otherMinKeyCode = *(xcb_keycode_t *)xcb_tmp; 20862 xcb_block_len += sizeof(xcb_keycode_t); 20863 xcb_tmp += sizeof(xcb_keycode_t); 20864 xcb_align_to = ALIGNOF(xcb_keycode_t); 20865 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.otherMaxKeyCode */ 20866 _aux->other_names.otherMaxKeyCode = *(xcb_keycode_t *)xcb_tmp; 20867 xcb_block_len += sizeof(xcb_keycode_t); 20868 xcb_tmp += sizeof(xcb_keycode_t); 20869 xcb_align_to = ALIGNOF(xcb_keycode_t); 20870 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nTypes */ 20871 _aux->other_names.nTypes = *(uint8_t *)xcb_tmp; 20872 xcb_block_len += sizeof(uint8_t); 20873 xcb_tmp += sizeof(uint8_t); 20874 xcb_align_to = ALIGNOF(uint8_t); 20875 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.groupNames */ 20876 _aux->other_names.groupNames = *(uint8_t *)xcb_tmp; 20877 xcb_block_len += sizeof(uint8_t); 20878 xcb_tmp += sizeof(uint8_t); 20879 xcb_align_to = ALIGNOF(uint8_t); 20880 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.virtualMods */ 20881 _aux->other_names.virtualMods = *(uint16_t *)xcb_tmp; 20882 xcb_block_len += sizeof(uint16_t); 20883 xcb_tmp += sizeof(uint16_t); 20884 xcb_align_to = ALIGNOF(uint16_t); 20885 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.firstKey */ 20886 _aux->other_names.firstKey = *(xcb_keycode_t *)xcb_tmp; 20887 xcb_block_len += sizeof(xcb_keycode_t); 20888 xcb_tmp += sizeof(xcb_keycode_t); 20889 xcb_align_to = ALIGNOF(xcb_keycode_t); 20890 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeys */ 20891 _aux->other_names.nKeys = *(uint8_t *)xcb_tmp; 20892 xcb_block_len += sizeof(uint8_t); 20893 xcb_tmp += sizeof(uint8_t); 20894 xcb_align_to = ALIGNOF(uint8_t); 20895 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.indicators */ 20896 _aux->other_names.indicators = *(uint32_t *)xcb_tmp; 20897 xcb_block_len += sizeof(uint32_t); 20898 xcb_tmp += sizeof(uint32_t); 20899 xcb_align_to = ALIGNOF(uint32_t); 20900 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nRadioGroups */ 20901 _aux->other_names.nRadioGroups = *(uint8_t *)xcb_tmp; 20902 xcb_block_len += sizeof(uint8_t); 20903 xcb_tmp += sizeof(uint8_t); 20904 xcb_align_to = ALIGNOF(uint8_t); 20905 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKeyAliases */ 20906 _aux->other_names.nKeyAliases = *(uint8_t *)xcb_tmp; 20907 xcb_block_len += sizeof(uint8_t); 20908 xcb_tmp += sizeof(uint8_t); 20909 xcb_align_to = ALIGNOF(uint8_t); 20910 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.nKTLevels */ 20911 _aux->other_names.nKTLevels = *(uint16_t *)xcb_tmp; 20912 xcb_block_len += sizeof(uint16_t); 20913 xcb_tmp += sizeof(uint16_t); 20914 xcb_align_to = ALIGNOF(uint16_t); 20915 /* xcb_xkb_get_kbd_by_name_replies_t.other_names.pad0 */ 20916 _aux->other_names.pad0[0] = *(uint8_t *)xcb_tmp; 20917 _aux->other_names.pad0[1] = *(uint8_t *)xcb_tmp; 20918 _aux->other_names.pad0[2] = *(uint8_t *)xcb_tmp; 20919 _aux->other_names.pad0[3] = *(uint8_t *)xcb_tmp; 20920 xcb_block_len += sizeof(uint8_t) * 4; 20921 xcb_tmp += sizeof(uint8_t) * 4; 20922 xcb_align_to = ALIGNOF(uint8_t); 20923 /* insert padding */ 20924 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 20925 xcb_buffer_len += xcb_block_len + xcb_pad; 20926 if (0 != xcb_pad) { 20927 xcb_tmp += xcb_pad; 20928 xcb_pad = 0; 20929 } 20930 xcb_block_len = 0; 20931 /* valueList */ 20932 xcb_block_len += xcb_xkb_get_kbd_by_name_replies_other_names_value_list_unpack(xcb_tmp, _aux->other_names.nTypes, _aux->other_names.nKTLevels, _aux->other_names.indicators, _aux->other_names.virtualMods, _aux->other_names.groupNames, _aux->other_names.nKeys, _aux->other_names.nKeyAliases, _aux->other_names.nRadioGroups, _aux->other_names.which, &_aux->other_names.valueList); 20933 xcb_tmp += xcb_block_len; 20934 xcb_align_to = ALIGNOF(xcb_xkb_get_kbd_by_name_replies_other_names_value_list_t); 20935 } 20936 if(reported & XCB_XKB_GBN_DETAIL_GEOMETRY) { 20937 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryDeviceID */ 20938 _aux->geometry.geometryDeviceID = *(uint8_t *)xcb_tmp; 20939 xcb_block_len += sizeof(uint8_t); 20940 xcb_tmp += sizeof(uint8_t); 20941 xcb_align_to = ALIGNOF(uint8_t); 20942 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.name */ 20943 _aux->geometry.name = *(xcb_atom_t *)xcb_tmp; 20944 xcb_block_len += sizeof(xcb_atom_t); 20945 xcb_tmp += sizeof(xcb_atom_t); 20946 xcb_align_to = ALIGNOF(xcb_atom_t); 20947 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.geometryFound */ 20948 _aux->geometry.geometryFound = *(uint8_t *)xcb_tmp; 20949 xcb_block_len += sizeof(uint8_t); 20950 xcb_tmp += sizeof(uint8_t); 20951 xcb_align_to = ALIGNOF(uint8_t); 20952 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.pad0 */ 20953 _aux->geometry.pad0 = *(uint8_t *)xcb_tmp; 20954 xcb_block_len += sizeof(uint8_t); 20955 xcb_tmp += sizeof(uint8_t); 20956 xcb_align_to = ALIGNOF(uint8_t); 20957 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.widthMM */ 20958 _aux->geometry.widthMM = *(uint16_t *)xcb_tmp; 20959 xcb_block_len += sizeof(uint16_t); 20960 xcb_tmp += sizeof(uint16_t); 20961 xcb_align_to = ALIGNOF(uint16_t); 20962 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.heightMM */ 20963 _aux->geometry.heightMM = *(uint16_t *)xcb_tmp; 20964 xcb_block_len += sizeof(uint16_t); 20965 xcb_tmp += sizeof(uint16_t); 20966 xcb_align_to = ALIGNOF(uint16_t); 20967 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nProperties */ 20968 _aux->geometry.nProperties = *(uint16_t *)xcb_tmp; 20969 xcb_block_len += sizeof(uint16_t); 20970 xcb_tmp += sizeof(uint16_t); 20971 xcb_align_to = ALIGNOF(uint16_t); 20972 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nColors */ 20973 _aux->geometry.nColors = *(uint16_t *)xcb_tmp; 20974 xcb_block_len += sizeof(uint16_t); 20975 xcb_tmp += sizeof(uint16_t); 20976 xcb_align_to = ALIGNOF(uint16_t); 20977 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nShapes */ 20978 _aux->geometry.nShapes = *(uint16_t *)xcb_tmp; 20979 xcb_block_len += sizeof(uint16_t); 20980 xcb_tmp += sizeof(uint16_t); 20981 xcb_align_to = ALIGNOF(uint16_t); 20982 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nSections */ 20983 _aux->geometry.nSections = *(uint16_t *)xcb_tmp; 20984 xcb_block_len += sizeof(uint16_t); 20985 xcb_tmp += sizeof(uint16_t); 20986 xcb_align_to = ALIGNOF(uint16_t); 20987 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nDoodads */ 20988 _aux->geometry.nDoodads = *(uint16_t *)xcb_tmp; 20989 xcb_block_len += sizeof(uint16_t); 20990 xcb_tmp += sizeof(uint16_t); 20991 xcb_align_to = ALIGNOF(uint16_t); 20992 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.nKeyAliases */ 20993 _aux->geometry.nKeyAliases = *(uint16_t *)xcb_tmp; 20994 xcb_block_len += sizeof(uint16_t); 20995 xcb_tmp += sizeof(uint16_t); 20996 xcb_align_to = ALIGNOF(uint16_t); 20997 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.baseColorNdx */ 20998 _aux->geometry.baseColorNdx = *(uint8_t *)xcb_tmp; 20999 xcb_block_len += sizeof(uint8_t); 21000 xcb_tmp += sizeof(uint8_t); 21001 xcb_align_to = ALIGNOF(uint8_t); 21002 /* xcb_xkb_get_kbd_by_name_replies_t.geometry.labelColorNdx */ 21003 _aux->geometry.labelColorNdx = *(uint8_t *)xcb_tmp; 21004 xcb_block_len += sizeof(uint8_t); 21005 xcb_tmp += sizeof(uint8_t); 21006 xcb_align_to = ALIGNOF(uint8_t); 21007 /* insert padding */ 21008 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21009 xcb_buffer_len += xcb_block_len + xcb_pad; 21010 if (0 != xcb_pad) { 21011 xcb_tmp += xcb_pad; 21012 xcb_pad = 0; 21013 } 21014 xcb_block_len = 0; 21015 /* labelFont */ 21016 _aux->geometry.labelFont = (xcb_xkb_counted_string_16_t *)xcb_tmp; 21017 xcb_block_len += xcb_xkb_counted_string_16_sizeof(xcb_tmp); 21018 xcb_tmp += xcb_block_len; 21019 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 21020 /* insert padding */ 21021 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21022 xcb_buffer_len += xcb_block_len + xcb_pad; 21023 if (0 != xcb_pad) { 21024 xcb_tmp += xcb_pad; 21025 xcb_pad = 0; 21026 } 21027 xcb_block_len = 0; 21028 /* properties */ 21029 _aux->geometry.properties = (xcb_xkb_property_t *)xcb_tmp; 21030 for(i=0; i<_aux->geometry.nProperties; i++) { 21031 xcb_tmp_len = xcb_xkb_property_sizeof(xcb_tmp); 21032 xcb_block_len += xcb_tmp_len; 21033 xcb_tmp += xcb_tmp_len; 21034 } 21035 xcb_align_to = ALIGNOF(xcb_xkb_property_t); 21036 /* insert padding */ 21037 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21038 xcb_buffer_len += xcb_block_len + xcb_pad; 21039 if (0 != xcb_pad) { 21040 xcb_tmp += xcb_pad; 21041 xcb_pad = 0; 21042 } 21043 xcb_block_len = 0; 21044 /* colors */ 21045 _aux->geometry.colors = (xcb_xkb_counted_string_16_t *)xcb_tmp; 21046 for(i=0; i<_aux->geometry.nColors; i++) { 21047 xcb_tmp_len = xcb_xkb_counted_string_16_sizeof(xcb_tmp); 21048 xcb_block_len += xcb_tmp_len; 21049 xcb_tmp += xcb_tmp_len; 21050 } 21051 xcb_align_to = ALIGNOF(xcb_xkb_counted_string_16_t); 21052 /* insert padding */ 21053 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21054 xcb_buffer_len += xcb_block_len + xcb_pad; 21055 if (0 != xcb_pad) { 21056 xcb_tmp += xcb_pad; 21057 xcb_pad = 0; 21058 } 21059 xcb_block_len = 0; 21060 /* shapes */ 21061 _aux->geometry.shapes = (xcb_xkb_shape_t *)xcb_tmp; 21062 for(i=0; i<_aux->geometry.nShapes; i++) { 21063 xcb_tmp_len = xcb_xkb_shape_sizeof(xcb_tmp); 21064 xcb_block_len += xcb_tmp_len; 21065 xcb_tmp += xcb_tmp_len; 21066 } 21067 xcb_align_to = ALIGNOF(xcb_xkb_shape_t); 21068 /* insert padding */ 21069 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21070 xcb_buffer_len += xcb_block_len + xcb_pad; 21071 if (0 != xcb_pad) { 21072 xcb_tmp += xcb_pad; 21073 xcb_pad = 0; 21074 } 21075 xcb_block_len = 0; 21076 /* sections */ 21077 _aux->geometry.sections = (xcb_xkb_section_t *)xcb_tmp; 21078 for(i=0; i<_aux->geometry.nSections; i++) { 21079 xcb_tmp_len = xcb_xkb_section_sizeof(xcb_tmp); 21080 xcb_block_len += xcb_tmp_len; 21081 xcb_tmp += xcb_tmp_len; 21082 } 21083 xcb_align_to = ALIGNOF(xcb_xkb_section_t); 21084 /* insert padding */ 21085 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21086 xcb_buffer_len += xcb_block_len + xcb_pad; 21087 if (0 != xcb_pad) { 21088 xcb_tmp += xcb_pad; 21089 xcb_pad = 0; 21090 } 21091 xcb_block_len = 0; 21092 /* doodads */ 21093 _aux->geometry.doodads = (xcb_xkb_doodad_t *)xcb_tmp; 21094 for(i=0; i<_aux->geometry.nDoodads; i++) { 21095 xcb_tmp_len = xcb_xkb_doodad_sizeof(xcb_tmp); 21096 xcb_block_len += xcb_tmp_len; 21097 xcb_tmp += xcb_tmp_len; 21098 } 21099 xcb_align_to = ALIGNOF(xcb_xkb_doodad_t); 21100 /* insert padding */ 21101 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21102 xcb_buffer_len += xcb_block_len + xcb_pad; 21103 if (0 != xcb_pad) { 21104 xcb_tmp += xcb_pad; 21105 xcb_pad = 0; 21106 } 21107 xcb_block_len = 0; 21108 /* keyAliases */ 21109 _aux->geometry.keyAliases = (xcb_xkb_key_alias_t *)xcb_tmp; 21110 xcb_block_len += _aux->geometry.nKeyAliases * sizeof(xcb_xkb_key_alias_t); 21111 xcb_tmp += xcb_block_len; 21112 xcb_align_to = ALIGNOF(xcb_xkb_key_alias_t); 21113 } 21114 /* insert padding */ 21115 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21116 xcb_buffer_len += xcb_block_len + xcb_pad; 21117 if (0 != xcb_pad) { 21118 xcb_tmp += xcb_pad; 21119 xcb_pad = 0; 21120 } 21121 xcb_block_len = 0; 21122 21123 return xcb_buffer_len; 21124 } 21125 21126 int 21127 xcb_xkb_get_kbd_by_name_replies_sizeof (const void *_buffer /**< */, 21128 uint16_t reported /**< */) 21129 { 21130 xcb_xkb_get_kbd_by_name_replies_t _aux; 21131 return xcb_xkb_get_kbd_by_name_replies_unpack(_buffer, reported, &_aux); 21132 } 21133 21134 21135 /***************************************************************************** 21136 ** 21137 ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name 21138 ** 21139 ** @param xcb_connection_t *c 21140 ** @param xcb_xkb_device_spec_t deviceSpec 21141 ** @param uint16_t need 21142 ** @param uint16_t want 21143 ** @param uint8_t load 21144 ** @param uint8_t keymapsSpecLen 21145 ** @param const xcb_xkb_string8_t *keymapsSpec 21146 ** @param uint8_t keycodesSpecLen 21147 ** @param const xcb_xkb_string8_t *keycodesSpec 21148 ** @param uint8_t typesSpecLen 21149 ** @param const xcb_xkb_string8_t *typesSpec 21150 ** @param uint8_t compatMapSpecLen 21151 ** @param const xcb_xkb_string8_t *compatMapSpec 21152 ** @param uint8_t symbolsSpecLen 21153 ** @param const xcb_xkb_string8_t *symbolsSpec 21154 ** @param uint8_t geometrySpecLen 21155 ** @param const xcb_xkb_string8_t *geometrySpec 21156 ** @returns xcb_xkb_get_kbd_by_name_cookie_t 21157 ** 21158 *****************************************************************************/ 21159 21160 xcb_xkb_get_kbd_by_name_cookie_t 21161 xcb_xkb_get_kbd_by_name (xcb_connection_t *c /**< */, 21162 xcb_xkb_device_spec_t deviceSpec /**< */, 21163 uint16_t need /**< */, 21164 uint16_t want /**< */, 21165 uint8_t load /**< */, 21166 uint8_t keymapsSpecLen /**< */, 21167 const xcb_xkb_string8_t *keymapsSpec /**< */, 21168 uint8_t keycodesSpecLen /**< */, 21169 const xcb_xkb_string8_t *keycodesSpec /**< */, 21170 uint8_t typesSpecLen /**< */, 21171 const xcb_xkb_string8_t *typesSpec /**< */, 21172 uint8_t compatMapSpecLen /**< */, 21173 const xcb_xkb_string8_t *compatMapSpec /**< */, 21174 uint8_t symbolsSpecLen /**< */, 21175 const xcb_xkb_string8_t *symbolsSpec /**< */, 21176 uint8_t geometrySpecLen /**< */, 21177 const xcb_xkb_string8_t *geometrySpec /**< */) 21178 { 21179 static const xcb_protocol_request_t xcb_req = { 21180 /* count */ 2, 21181 /* ext */ &xcb_xkb_id, 21182 /* opcode */ XCB_XKB_GET_KBD_BY_NAME, 21183 /* isvoid */ 0 21184 }; 21185 21186 struct iovec xcb_parts[4]; 21187 xcb_xkb_get_kbd_by_name_cookie_t xcb_ret; 21188 xcb_xkb_get_kbd_by_name_request_t xcb_out; 21189 /* in the protocol description, variable size fields are followed by fixed size fields */ 21190 void *xcb_aux = 0; 21191 21192 xcb_out.deviceSpec = deviceSpec; 21193 xcb_out.need = need; 21194 xcb_out.want = want; 21195 xcb_out.load = load; 21196 xcb_out.pad0 = 0; 21197 xcb_out.keymapsSpecLen = keymapsSpecLen; 21198 xcb_out.keycodesSpecLen = keycodesSpecLen; 21199 xcb_out.typesSpecLen = typesSpecLen; 21200 xcb_out.compatMapSpecLen = compatMapSpecLen; 21201 xcb_out.symbolsSpecLen = symbolsSpecLen; 21202 xcb_out.geometrySpecLen = geometrySpecLen; 21203 21204 xcb_parts[2].iov_base = (char *) &xcb_out; 21205 xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t); 21206 xcb_parts[3].iov_len = xcb_xkb_get_kbd_by_name_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec); 21207 xcb_parts[3].iov_base = (char *) xcb_aux; 21208 21209 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 21210 free(xcb_aux); 21211 return xcb_ret; 21212 } 21213 21214 21215 /***************************************************************************** 21216 ** 21217 ** xcb_xkb_get_kbd_by_name_cookie_t xcb_xkb_get_kbd_by_name_unchecked 21218 ** 21219 ** @param xcb_connection_t *c 21220 ** @param xcb_xkb_device_spec_t deviceSpec 21221 ** @param uint16_t need 21222 ** @param uint16_t want 21223 ** @param uint8_t load 21224 ** @param uint8_t keymapsSpecLen 21225 ** @param const xcb_xkb_string8_t *keymapsSpec 21226 ** @param uint8_t keycodesSpecLen 21227 ** @param const xcb_xkb_string8_t *keycodesSpec 21228 ** @param uint8_t typesSpecLen 21229 ** @param const xcb_xkb_string8_t *typesSpec 21230 ** @param uint8_t compatMapSpecLen 21231 ** @param const xcb_xkb_string8_t *compatMapSpec 21232 ** @param uint8_t symbolsSpecLen 21233 ** @param const xcb_xkb_string8_t *symbolsSpec 21234 ** @param uint8_t geometrySpecLen 21235 ** @param const xcb_xkb_string8_t *geometrySpec 21236 ** @returns xcb_xkb_get_kbd_by_name_cookie_t 21237 ** 21238 *****************************************************************************/ 21239 21240 xcb_xkb_get_kbd_by_name_cookie_t 21241 xcb_xkb_get_kbd_by_name_unchecked (xcb_connection_t *c /**< */, 21242 xcb_xkb_device_spec_t deviceSpec /**< */, 21243 uint16_t need /**< */, 21244 uint16_t want /**< */, 21245 uint8_t load /**< */, 21246 uint8_t keymapsSpecLen /**< */, 21247 const xcb_xkb_string8_t *keymapsSpec /**< */, 21248 uint8_t keycodesSpecLen /**< */, 21249 const xcb_xkb_string8_t *keycodesSpec /**< */, 21250 uint8_t typesSpecLen /**< */, 21251 const xcb_xkb_string8_t *typesSpec /**< */, 21252 uint8_t compatMapSpecLen /**< */, 21253 const xcb_xkb_string8_t *compatMapSpec /**< */, 21254 uint8_t symbolsSpecLen /**< */, 21255 const xcb_xkb_string8_t *symbolsSpec /**< */, 21256 uint8_t geometrySpecLen /**< */, 21257 const xcb_xkb_string8_t *geometrySpec /**< */) 21258 { 21259 static const xcb_protocol_request_t xcb_req = { 21260 /* count */ 2, 21261 /* ext */ &xcb_xkb_id, 21262 /* opcode */ XCB_XKB_GET_KBD_BY_NAME, 21263 /* isvoid */ 0 21264 }; 21265 21266 struct iovec xcb_parts[4]; 21267 xcb_xkb_get_kbd_by_name_cookie_t xcb_ret; 21268 xcb_xkb_get_kbd_by_name_request_t xcb_out; 21269 /* in the protocol description, variable size fields are followed by fixed size fields */ 21270 void *xcb_aux = 0; 21271 21272 xcb_out.deviceSpec = deviceSpec; 21273 xcb_out.need = need; 21274 xcb_out.want = want; 21275 xcb_out.load = load; 21276 xcb_out.pad0 = 0; 21277 xcb_out.keymapsSpecLen = keymapsSpecLen; 21278 xcb_out.keycodesSpecLen = keycodesSpecLen; 21279 xcb_out.typesSpecLen = typesSpecLen; 21280 xcb_out.compatMapSpecLen = compatMapSpecLen; 21281 xcb_out.symbolsSpecLen = symbolsSpecLen; 21282 xcb_out.geometrySpecLen = geometrySpecLen; 21283 21284 xcb_parts[2].iov_base = (char *) &xcb_out; 21285 xcb_parts[2].iov_len = 2*sizeof(uint8_t) + sizeof(uint16_t); 21286 xcb_parts[3].iov_len = xcb_xkb_get_kbd_by_name_serialize (&xcb_aux, &xcb_out, keymapsSpec, keycodesSpec, typesSpec, compatMapSpec, symbolsSpec, geometrySpec); 21287 xcb_parts[3].iov_base = (char *) xcb_aux; 21288 21289 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 21290 free(xcb_aux); 21291 return xcb_ret; 21292 } 21293 21294 21295 /***************************************************************************** 21296 ** 21297 ** xcb_xkb_get_kbd_by_name_replies_t * xcb_xkb_get_kbd_by_name_replies 21298 ** 21299 ** @param const xcb_xkb_get_kbd_by_name_reply_t *R 21300 ** @returns xcb_xkb_get_kbd_by_name_replies_t * 21301 ** 21302 *****************************************************************************/ 21303 21304 void * 21305 xcb_xkb_get_kbd_by_name_replies (const xcb_xkb_get_kbd_by_name_reply_t *R /**< */) 21306 { 21307 return (void *) (R + 1); 21308 } 21309 21310 21311 /***************************************************************************** 21312 ** 21313 ** xcb_xkb_get_kbd_by_name_reply_t * xcb_xkb_get_kbd_by_name_reply 21314 ** 21315 ** @param xcb_connection_t *c 21316 ** @param xcb_xkb_get_kbd_by_name_cookie_t cookie 21317 ** @param xcb_generic_error_t **e 21318 ** @returns xcb_xkb_get_kbd_by_name_reply_t * 21319 ** 21320 *****************************************************************************/ 21321 21322 xcb_xkb_get_kbd_by_name_reply_t * 21323 xcb_xkb_get_kbd_by_name_reply (xcb_connection_t *c /**< */, 21324 xcb_xkb_get_kbd_by_name_cookie_t cookie /**< */, 21325 xcb_generic_error_t **e /**< */) 21326 { 21327 return (xcb_xkb_get_kbd_by_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 21328 } 21329 21330 int 21331 xcb_xkb_get_device_info_sizeof (const void *_buffer /**< */) 21332 { 21333 char *xcb_tmp = (char *)_buffer; 21334 const xcb_xkb_get_device_info_reply_t *_aux = (xcb_xkb_get_device_info_reply_t *)_buffer; 21335 unsigned int xcb_buffer_len = 0; 21336 unsigned int xcb_block_len = 0; 21337 unsigned int xcb_pad = 0; 21338 unsigned int xcb_align_to; 21339 21340 unsigned int i; 21341 unsigned int xcb_tmp_len; 21342 21343 xcb_block_len += sizeof(xcb_xkb_get_device_info_reply_t); 21344 xcb_tmp += xcb_block_len; 21345 /* name */ 21346 xcb_block_len += _aux->nameLen * sizeof(xcb_xkb_string8_t); 21347 xcb_tmp += xcb_block_len; 21348 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 21349 /* insert padding */ 21350 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21351 xcb_buffer_len += xcb_block_len + xcb_pad; 21352 if (0 != xcb_pad) { 21353 xcb_tmp += xcb_pad; 21354 xcb_pad = 0; 21355 } 21356 xcb_block_len = 0; 21357 /* btnActions */ 21358 xcb_block_len += _aux->nBtnsRtrn * sizeof(xcb_xkb_action_t); 21359 xcb_tmp += xcb_block_len; 21360 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 21361 /* insert padding */ 21362 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21363 xcb_buffer_len += xcb_block_len + xcb_pad; 21364 if (0 != xcb_pad) { 21365 xcb_tmp += xcb_pad; 21366 xcb_pad = 0; 21367 } 21368 xcb_block_len = 0; 21369 /* leds */ 21370 for(i=0; i<_aux->nDeviceLedFBs; i++) { 21371 xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp); 21372 xcb_block_len += xcb_tmp_len; 21373 xcb_tmp += xcb_tmp_len; 21374 } 21375 xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t); 21376 /* insert padding */ 21377 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21378 xcb_buffer_len += xcb_block_len + xcb_pad; 21379 if (0 != xcb_pad) { 21380 xcb_tmp += xcb_pad; 21381 xcb_pad = 0; 21382 } 21383 xcb_block_len = 0; 21384 21385 return xcb_buffer_len; 21386 } 21387 21388 21389 /***************************************************************************** 21390 ** 21391 ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info 21392 ** 21393 ** @param xcb_connection_t *c 21394 ** @param xcb_xkb_device_spec_t deviceSpec 21395 ** @param uint16_t wanted 21396 ** @param uint8_t allButtons 21397 ** @param uint8_t firstButton 21398 ** @param uint8_t nButtons 21399 ** @param xcb_xkb_led_class_spec_t ledClass 21400 ** @param xcb_xkb_id_spec_t ledID 21401 ** @returns xcb_xkb_get_device_info_cookie_t 21402 ** 21403 *****************************************************************************/ 21404 21405 xcb_xkb_get_device_info_cookie_t 21406 xcb_xkb_get_device_info (xcb_connection_t *c /**< */, 21407 xcb_xkb_device_spec_t deviceSpec /**< */, 21408 uint16_t wanted /**< */, 21409 uint8_t allButtons /**< */, 21410 uint8_t firstButton /**< */, 21411 uint8_t nButtons /**< */, 21412 xcb_xkb_led_class_spec_t ledClass /**< */, 21413 xcb_xkb_id_spec_t ledID /**< */) 21414 { 21415 static const xcb_protocol_request_t xcb_req = { 21416 /* count */ 2, 21417 /* ext */ &xcb_xkb_id, 21418 /* opcode */ XCB_XKB_GET_DEVICE_INFO, 21419 /* isvoid */ 0 21420 }; 21421 21422 struct iovec xcb_parts[4]; 21423 xcb_xkb_get_device_info_cookie_t xcb_ret; 21424 xcb_xkb_get_device_info_request_t xcb_out; 21425 21426 xcb_out.deviceSpec = deviceSpec; 21427 xcb_out.wanted = wanted; 21428 xcb_out.allButtons = allButtons; 21429 xcb_out.firstButton = firstButton; 21430 xcb_out.nButtons = nButtons; 21431 xcb_out.pad0 = 0; 21432 xcb_out.ledClass = ledClass; 21433 xcb_out.ledID = ledID; 21434 21435 xcb_parts[2].iov_base = (char *) &xcb_out; 21436 xcb_parts[2].iov_len = sizeof(xcb_out); 21437 xcb_parts[3].iov_base = 0; 21438 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21439 21440 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 21441 return xcb_ret; 21442 } 21443 21444 21445 /***************************************************************************** 21446 ** 21447 ** xcb_xkb_get_device_info_cookie_t xcb_xkb_get_device_info_unchecked 21448 ** 21449 ** @param xcb_connection_t *c 21450 ** @param xcb_xkb_device_spec_t deviceSpec 21451 ** @param uint16_t wanted 21452 ** @param uint8_t allButtons 21453 ** @param uint8_t firstButton 21454 ** @param uint8_t nButtons 21455 ** @param xcb_xkb_led_class_spec_t ledClass 21456 ** @param xcb_xkb_id_spec_t ledID 21457 ** @returns xcb_xkb_get_device_info_cookie_t 21458 ** 21459 *****************************************************************************/ 21460 21461 xcb_xkb_get_device_info_cookie_t 21462 xcb_xkb_get_device_info_unchecked (xcb_connection_t *c /**< */, 21463 xcb_xkb_device_spec_t deviceSpec /**< */, 21464 uint16_t wanted /**< */, 21465 uint8_t allButtons /**< */, 21466 uint8_t firstButton /**< */, 21467 uint8_t nButtons /**< */, 21468 xcb_xkb_led_class_spec_t ledClass /**< */, 21469 xcb_xkb_id_spec_t ledID /**< */) 21470 { 21471 static const xcb_protocol_request_t xcb_req = { 21472 /* count */ 2, 21473 /* ext */ &xcb_xkb_id, 21474 /* opcode */ XCB_XKB_GET_DEVICE_INFO, 21475 /* isvoid */ 0 21476 }; 21477 21478 struct iovec xcb_parts[4]; 21479 xcb_xkb_get_device_info_cookie_t xcb_ret; 21480 xcb_xkb_get_device_info_request_t xcb_out; 21481 21482 xcb_out.deviceSpec = deviceSpec; 21483 xcb_out.wanted = wanted; 21484 xcb_out.allButtons = allButtons; 21485 xcb_out.firstButton = firstButton; 21486 xcb_out.nButtons = nButtons; 21487 xcb_out.pad0 = 0; 21488 xcb_out.ledClass = ledClass; 21489 xcb_out.ledID = ledID; 21490 21491 xcb_parts[2].iov_base = (char *) &xcb_out; 21492 xcb_parts[2].iov_len = sizeof(xcb_out); 21493 xcb_parts[3].iov_base = 0; 21494 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21495 21496 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 21497 return xcb_ret; 21498 } 21499 21500 21501 /***************************************************************************** 21502 ** 21503 ** xcb_xkb_string8_t * xcb_xkb_get_device_info_name 21504 ** 21505 ** @param const xcb_xkb_get_device_info_reply_t *R 21506 ** @returns xcb_xkb_string8_t * 21507 ** 21508 *****************************************************************************/ 21509 21510 xcb_xkb_string8_t * 21511 xcb_xkb_get_device_info_name (const xcb_xkb_get_device_info_reply_t *R /**< */) 21512 { 21513 return (xcb_xkb_string8_t *) (R + 1); 21514 } 21515 21516 21517 /***************************************************************************** 21518 ** 21519 ** int xcb_xkb_get_device_info_name_length 21520 ** 21521 ** @param const xcb_xkb_get_device_info_reply_t *R 21522 ** @returns int 21523 ** 21524 *****************************************************************************/ 21525 21526 int 21527 xcb_xkb_get_device_info_name_length (const xcb_xkb_get_device_info_reply_t *R /**< */) 21528 { 21529 return R->nameLen; 21530 } 21531 21532 21533 /***************************************************************************** 21534 ** 21535 ** xcb_generic_iterator_t xcb_xkb_get_device_info_name_end 21536 ** 21537 ** @param const xcb_xkb_get_device_info_reply_t *R 21538 ** @returns xcb_generic_iterator_t 21539 ** 21540 *****************************************************************************/ 21541 21542 xcb_generic_iterator_t 21543 xcb_xkb_get_device_info_name_end (const xcb_xkb_get_device_info_reply_t *R /**< */) 21544 { 21545 xcb_generic_iterator_t i; 21546 i.data = ((xcb_xkb_string8_t *) (R + 1)) + (R->nameLen); 21547 i.rem = 0; 21548 i.index = (char *) i.data - (char *) R; 21549 return i; 21550 } 21551 21552 21553 /***************************************************************************** 21554 ** 21555 ** xcb_xkb_action_t * xcb_xkb_get_device_info_btn_actions 21556 ** 21557 ** @param const xcb_xkb_get_device_info_reply_t *R 21558 ** @returns xcb_xkb_action_t * 21559 ** 21560 *****************************************************************************/ 21561 21562 xcb_xkb_action_t * 21563 xcb_xkb_get_device_info_btn_actions (const xcb_xkb_get_device_info_reply_t *R /**< */) 21564 { 21565 xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R); 21566 return (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index) + 0); 21567 } 21568 21569 21570 /***************************************************************************** 21571 ** 21572 ** int xcb_xkb_get_device_info_btn_actions_length 21573 ** 21574 ** @param const xcb_xkb_get_device_info_reply_t *R 21575 ** @returns int 21576 ** 21577 *****************************************************************************/ 21578 21579 int 21580 xcb_xkb_get_device_info_btn_actions_length (const xcb_xkb_get_device_info_reply_t *R /**< */) 21581 { 21582 return R->nBtnsRtrn; 21583 } 21584 21585 21586 /***************************************************************************** 21587 ** 21588 ** xcb_xkb_action_iterator_t xcb_xkb_get_device_info_btn_actions_iterator 21589 ** 21590 ** @param const xcb_xkb_get_device_info_reply_t *R 21591 ** @returns xcb_xkb_action_iterator_t 21592 ** 21593 *****************************************************************************/ 21594 21595 xcb_xkb_action_iterator_t 21596 xcb_xkb_get_device_info_btn_actions_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */) 21597 { 21598 xcb_xkb_action_iterator_t i; 21599 xcb_generic_iterator_t prev = xcb_xkb_get_device_info_name_end(R); 21600 i.data = (xcb_xkb_action_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_action_t, prev.index)); 21601 i.rem = R->nBtnsRtrn; 21602 i.index = (char *) i.data - (char *) R; 21603 return i; 21604 } 21605 21606 21607 /***************************************************************************** 21608 ** 21609 ** int xcb_xkb_get_device_info_leds_length 21610 ** 21611 ** @param const xcb_xkb_get_device_info_reply_t *R 21612 ** @returns int 21613 ** 21614 *****************************************************************************/ 21615 21616 int 21617 xcb_xkb_get_device_info_leds_length (const xcb_xkb_get_device_info_reply_t *R /**< */) 21618 { 21619 return R->nDeviceLedFBs; 21620 } 21621 21622 21623 /***************************************************************************** 21624 ** 21625 ** xcb_xkb_device_led_info_iterator_t xcb_xkb_get_device_info_leds_iterator 21626 ** 21627 ** @param const xcb_xkb_get_device_info_reply_t *R 21628 ** @returns xcb_xkb_device_led_info_iterator_t 21629 ** 21630 *****************************************************************************/ 21631 21632 xcb_xkb_device_led_info_iterator_t 21633 xcb_xkb_get_device_info_leds_iterator (const xcb_xkb_get_device_info_reply_t *R /**< */) 21634 { 21635 xcb_xkb_device_led_info_iterator_t i; 21636 xcb_generic_iterator_t prev = xcb_xkb_action_end(xcb_xkb_get_device_info_btn_actions_iterator(R)); 21637 i.data = (xcb_xkb_device_led_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_xkb_device_led_info_t, prev.index)); 21638 i.rem = R->nDeviceLedFBs; 21639 i.index = (char *) i.data - (char *) R; 21640 return i; 21641 } 21642 21643 21644 /***************************************************************************** 21645 ** 21646 ** xcb_xkb_get_device_info_reply_t * xcb_xkb_get_device_info_reply 21647 ** 21648 ** @param xcb_connection_t *c 21649 ** @param xcb_xkb_get_device_info_cookie_t cookie 21650 ** @param xcb_generic_error_t **e 21651 ** @returns xcb_xkb_get_device_info_reply_t * 21652 ** 21653 *****************************************************************************/ 21654 21655 xcb_xkb_get_device_info_reply_t * 21656 xcb_xkb_get_device_info_reply (xcb_connection_t *c /**< */, 21657 xcb_xkb_get_device_info_cookie_t cookie /**< */, 21658 xcb_generic_error_t **e /**< */) 21659 { 21660 return (xcb_xkb_get_device_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 21661 } 21662 21663 int 21664 xcb_xkb_set_device_info_sizeof (const void *_buffer /**< */) 21665 { 21666 char *xcb_tmp = (char *)_buffer; 21667 const xcb_xkb_set_device_info_request_t *_aux = (xcb_xkb_set_device_info_request_t *)_buffer; 21668 unsigned int xcb_buffer_len = 0; 21669 unsigned int xcb_block_len = 0; 21670 unsigned int xcb_pad = 0; 21671 unsigned int xcb_align_to; 21672 21673 unsigned int i; 21674 unsigned int xcb_tmp_len; 21675 21676 xcb_block_len += sizeof(xcb_xkb_set_device_info_request_t); 21677 xcb_tmp += xcb_block_len; 21678 /* btnActions */ 21679 xcb_block_len += _aux->nBtns * sizeof(xcb_xkb_action_t); 21680 xcb_tmp += xcb_block_len; 21681 xcb_align_to = ALIGNOF(xcb_xkb_action_t); 21682 /* insert padding */ 21683 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21684 xcb_buffer_len += xcb_block_len + xcb_pad; 21685 if (0 != xcb_pad) { 21686 xcb_tmp += xcb_pad; 21687 xcb_pad = 0; 21688 } 21689 xcb_block_len = 0; 21690 /* leds */ 21691 for(i=0; i<_aux->nDeviceLedFBs; i++) { 21692 xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp); 21693 xcb_block_len += xcb_tmp_len; 21694 xcb_tmp += xcb_tmp_len; 21695 } 21696 xcb_align_to = ALIGNOF(xcb_xkb_device_led_info_t); 21697 /* insert padding */ 21698 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21699 xcb_buffer_len += xcb_block_len + xcb_pad; 21700 if (0 != xcb_pad) { 21701 xcb_tmp += xcb_pad; 21702 xcb_pad = 0; 21703 } 21704 xcb_block_len = 0; 21705 21706 return xcb_buffer_len; 21707 } 21708 21709 21710 /***************************************************************************** 21711 ** 21712 ** xcb_void_cookie_t xcb_xkb_set_device_info_checked 21713 ** 21714 ** @param xcb_connection_t *c 21715 ** @param xcb_xkb_device_spec_t deviceSpec 21716 ** @param uint8_t firstBtn 21717 ** @param uint8_t nBtns 21718 ** @param uint16_t change 21719 ** @param uint16_t nDeviceLedFBs 21720 ** @param const xcb_xkb_action_t *btnActions 21721 ** @param const xcb_xkb_device_led_info_t *leds 21722 ** @returns xcb_void_cookie_t 21723 ** 21724 *****************************************************************************/ 21725 21726 xcb_void_cookie_t 21727 xcb_xkb_set_device_info_checked (xcb_connection_t *c /**< */, 21728 xcb_xkb_device_spec_t deviceSpec /**< */, 21729 uint8_t firstBtn /**< */, 21730 uint8_t nBtns /**< */, 21731 uint16_t change /**< */, 21732 uint16_t nDeviceLedFBs /**< */, 21733 const xcb_xkb_action_t *btnActions /**< */, 21734 const xcb_xkb_device_led_info_t *leds /**< */) 21735 { 21736 static const xcb_protocol_request_t xcb_req = { 21737 /* count */ 6, 21738 /* ext */ &xcb_xkb_id, 21739 /* opcode */ XCB_XKB_SET_DEVICE_INFO, 21740 /* isvoid */ 1 21741 }; 21742 21743 struct iovec xcb_parts[8]; 21744 xcb_void_cookie_t xcb_ret; 21745 xcb_xkb_set_device_info_request_t xcb_out; 21746 unsigned int i; 21747 unsigned int xcb_tmp_len; 21748 char *xcb_tmp; 21749 21750 xcb_out.deviceSpec = deviceSpec; 21751 xcb_out.firstBtn = firstBtn; 21752 xcb_out.nBtns = nBtns; 21753 xcb_out.change = change; 21754 xcb_out.nDeviceLedFBs = nDeviceLedFBs; 21755 21756 xcb_parts[2].iov_base = (char *) &xcb_out; 21757 xcb_parts[2].iov_len = sizeof(xcb_out); 21758 xcb_parts[3].iov_base = 0; 21759 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21760 /* xcb_xkb_action_t btnActions */ 21761 xcb_parts[4].iov_base = (char *) btnActions; 21762 xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t); 21763 xcb_parts[5].iov_base = 0; 21764 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 21765 /* xcb_xkb_device_led_info_t leds */ 21766 xcb_parts[6].iov_base = (char *) leds; 21767 xcb_parts[6].iov_len = 0; 21768 xcb_tmp = (char *)leds; 21769 for(i=0; i<nDeviceLedFBs; i++) { 21770 xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp); 21771 xcb_parts[6].iov_len += xcb_tmp_len; 21772 xcb_tmp += xcb_tmp_len; 21773 } 21774 xcb_parts[7].iov_base = 0; 21775 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 21776 21777 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 21778 return xcb_ret; 21779 } 21780 21781 21782 /***************************************************************************** 21783 ** 21784 ** xcb_void_cookie_t xcb_xkb_set_device_info 21785 ** 21786 ** @param xcb_connection_t *c 21787 ** @param xcb_xkb_device_spec_t deviceSpec 21788 ** @param uint8_t firstBtn 21789 ** @param uint8_t nBtns 21790 ** @param uint16_t change 21791 ** @param uint16_t nDeviceLedFBs 21792 ** @param const xcb_xkb_action_t *btnActions 21793 ** @param const xcb_xkb_device_led_info_t *leds 21794 ** @returns xcb_void_cookie_t 21795 ** 21796 *****************************************************************************/ 21797 21798 xcb_void_cookie_t 21799 xcb_xkb_set_device_info (xcb_connection_t *c /**< */, 21800 xcb_xkb_device_spec_t deviceSpec /**< */, 21801 uint8_t firstBtn /**< */, 21802 uint8_t nBtns /**< */, 21803 uint16_t change /**< */, 21804 uint16_t nDeviceLedFBs /**< */, 21805 const xcb_xkb_action_t *btnActions /**< */, 21806 const xcb_xkb_device_led_info_t *leds /**< */) 21807 { 21808 static const xcb_protocol_request_t xcb_req = { 21809 /* count */ 6, 21810 /* ext */ &xcb_xkb_id, 21811 /* opcode */ XCB_XKB_SET_DEVICE_INFO, 21812 /* isvoid */ 1 21813 }; 21814 21815 struct iovec xcb_parts[8]; 21816 xcb_void_cookie_t xcb_ret; 21817 xcb_xkb_set_device_info_request_t xcb_out; 21818 unsigned int i; 21819 unsigned int xcb_tmp_len; 21820 char *xcb_tmp; 21821 21822 xcb_out.deviceSpec = deviceSpec; 21823 xcb_out.firstBtn = firstBtn; 21824 xcb_out.nBtns = nBtns; 21825 xcb_out.change = change; 21826 xcb_out.nDeviceLedFBs = nDeviceLedFBs; 21827 21828 xcb_parts[2].iov_base = (char *) &xcb_out; 21829 xcb_parts[2].iov_len = sizeof(xcb_out); 21830 xcb_parts[3].iov_base = 0; 21831 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21832 /* xcb_xkb_action_t btnActions */ 21833 xcb_parts[4].iov_base = (char *) btnActions; 21834 xcb_parts[4].iov_len = nBtns * sizeof(xcb_xkb_action_t); 21835 xcb_parts[5].iov_base = 0; 21836 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 21837 /* xcb_xkb_device_led_info_t leds */ 21838 xcb_parts[6].iov_base = (char *) leds; 21839 xcb_parts[6].iov_len = 0; 21840 xcb_tmp = (char *)leds; 21841 for(i=0; i<nDeviceLedFBs; i++) { 21842 xcb_tmp_len = xcb_xkb_device_led_info_sizeof(xcb_tmp); 21843 xcb_parts[6].iov_len += xcb_tmp_len; 21844 xcb_tmp += xcb_tmp_len; 21845 } 21846 xcb_parts[7].iov_base = 0; 21847 xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; 21848 21849 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 21850 return xcb_ret; 21851 } 21852 21853 int 21854 xcb_xkb_set_debugging_flags_sizeof (const void *_buffer /**< */) 21855 { 21856 char *xcb_tmp = (char *)_buffer; 21857 const xcb_xkb_set_debugging_flags_request_t *_aux = (xcb_xkb_set_debugging_flags_request_t *)_buffer; 21858 unsigned int xcb_buffer_len = 0; 21859 unsigned int xcb_block_len = 0; 21860 unsigned int xcb_pad = 0; 21861 unsigned int xcb_align_to; 21862 21863 21864 xcb_block_len += sizeof(xcb_xkb_set_debugging_flags_request_t); 21865 xcb_tmp += xcb_block_len; 21866 /* message */ 21867 xcb_block_len += _aux->msgLength * sizeof(xcb_xkb_string8_t); 21868 xcb_tmp += xcb_block_len; 21869 xcb_align_to = ALIGNOF(xcb_xkb_string8_t); 21870 /* insert padding */ 21871 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 21872 xcb_buffer_len += xcb_block_len + xcb_pad; 21873 if (0 != xcb_pad) { 21874 xcb_tmp += xcb_pad; 21875 xcb_pad = 0; 21876 } 21877 xcb_block_len = 0; 21878 21879 return xcb_buffer_len; 21880 } 21881 21882 21883 /***************************************************************************** 21884 ** 21885 ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags 21886 ** 21887 ** @param xcb_connection_t *c 21888 ** @param uint16_t msgLength 21889 ** @param uint32_t affectFlags 21890 ** @param uint32_t flags 21891 ** @param uint32_t affectCtrls 21892 ** @param uint32_t ctrls 21893 ** @param const xcb_xkb_string8_t *message 21894 ** @returns xcb_xkb_set_debugging_flags_cookie_t 21895 ** 21896 *****************************************************************************/ 21897 21898 xcb_xkb_set_debugging_flags_cookie_t 21899 xcb_xkb_set_debugging_flags (xcb_connection_t *c /**< */, 21900 uint16_t msgLength /**< */, 21901 uint32_t affectFlags /**< */, 21902 uint32_t flags /**< */, 21903 uint32_t affectCtrls /**< */, 21904 uint32_t ctrls /**< */, 21905 const xcb_xkb_string8_t *message /**< */) 21906 { 21907 static const xcb_protocol_request_t xcb_req = { 21908 /* count */ 4, 21909 /* ext */ &xcb_xkb_id, 21910 /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS, 21911 /* isvoid */ 0 21912 }; 21913 21914 struct iovec xcb_parts[6]; 21915 xcb_xkb_set_debugging_flags_cookie_t xcb_ret; 21916 xcb_xkb_set_debugging_flags_request_t xcb_out; 21917 21918 xcb_out.msgLength = msgLength; 21919 memset(xcb_out.pad0, 0, 2); 21920 xcb_out.affectFlags = affectFlags; 21921 xcb_out.flags = flags; 21922 xcb_out.affectCtrls = affectCtrls; 21923 xcb_out.ctrls = ctrls; 21924 21925 xcb_parts[2].iov_base = (char *) &xcb_out; 21926 xcb_parts[2].iov_len = sizeof(xcb_out); 21927 xcb_parts[3].iov_base = 0; 21928 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21929 /* xcb_xkb_string8_t message */ 21930 xcb_parts[4].iov_base = (char *) message; 21931 xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t); 21932 xcb_parts[5].iov_base = 0; 21933 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 21934 21935 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 21936 return xcb_ret; 21937 } 21938 21939 21940 /***************************************************************************** 21941 ** 21942 ** xcb_xkb_set_debugging_flags_cookie_t xcb_xkb_set_debugging_flags_unchecked 21943 ** 21944 ** @param xcb_connection_t *c 21945 ** @param uint16_t msgLength 21946 ** @param uint32_t affectFlags 21947 ** @param uint32_t flags 21948 ** @param uint32_t affectCtrls 21949 ** @param uint32_t ctrls 21950 ** @param const xcb_xkb_string8_t *message 21951 ** @returns xcb_xkb_set_debugging_flags_cookie_t 21952 ** 21953 *****************************************************************************/ 21954 21955 xcb_xkb_set_debugging_flags_cookie_t 21956 xcb_xkb_set_debugging_flags_unchecked (xcb_connection_t *c /**< */, 21957 uint16_t msgLength /**< */, 21958 uint32_t affectFlags /**< */, 21959 uint32_t flags /**< */, 21960 uint32_t affectCtrls /**< */, 21961 uint32_t ctrls /**< */, 21962 const xcb_xkb_string8_t *message /**< */) 21963 { 21964 static const xcb_protocol_request_t xcb_req = { 21965 /* count */ 4, 21966 /* ext */ &xcb_xkb_id, 21967 /* opcode */ XCB_XKB_SET_DEBUGGING_FLAGS, 21968 /* isvoid */ 0 21969 }; 21970 21971 struct iovec xcb_parts[6]; 21972 xcb_xkb_set_debugging_flags_cookie_t xcb_ret; 21973 xcb_xkb_set_debugging_flags_request_t xcb_out; 21974 21975 xcb_out.msgLength = msgLength; 21976 memset(xcb_out.pad0, 0, 2); 21977 xcb_out.affectFlags = affectFlags; 21978 xcb_out.flags = flags; 21979 xcb_out.affectCtrls = affectCtrls; 21980 xcb_out.ctrls = ctrls; 21981 21982 xcb_parts[2].iov_base = (char *) &xcb_out; 21983 xcb_parts[2].iov_len = sizeof(xcb_out); 21984 xcb_parts[3].iov_base = 0; 21985 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 21986 /* xcb_xkb_string8_t message */ 21987 xcb_parts[4].iov_base = (char *) message; 21988 xcb_parts[4].iov_len = msgLength * sizeof(xcb_xkb_string8_t); 21989 xcb_parts[5].iov_base = 0; 21990 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 21991 21992 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 21993 return xcb_ret; 21994 } 21995 21996 21997 /***************************************************************************** 21998 ** 21999 ** xcb_xkb_set_debugging_flags_reply_t * xcb_xkb_set_debugging_flags_reply 22000 ** 22001 ** @param xcb_connection_t *c 22002 ** @param xcb_xkb_set_debugging_flags_cookie_t cookie 22003 ** @param xcb_generic_error_t **e 22004 ** @returns xcb_xkb_set_debugging_flags_reply_t * 22005 ** 22006 *****************************************************************************/ 22007 22008 xcb_xkb_set_debugging_flags_reply_t * 22009 xcb_xkb_set_debugging_flags_reply (xcb_connection_t *c /**< */, 22010 xcb_xkb_set_debugging_flags_cookie_t cookie /**< */, 22011 xcb_generic_error_t **e /**< */) 22012 { 22013 return (xcb_xkb_set_debugging_flags_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 22014 } 22015 22016