| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | #ifndef _XI2PROTO_H_ |
| 58 | #define _XI2PROTO_H_ |
| 59 | |
| 60 | #include <X11/Xproto.h> |
| 61 | #include <X11/X.h> |
| 62 | #include <X11/extensions/XI2.h> |
| 63 | #include <stdint.h> |
| 64 | |
| 65 | |
| 66 | #define Window uint32_t |
| 67 | #define Time uint32_t |
| 68 | #define Atom uint32_t |
| 69 | #define Cursor uint32_t |
| 70 | #define Barrier uint32_t |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | #define X_XIQueryPointer 40 |
| 76 | #define X_XIWarpPointer 41 |
| 77 | #define X_XIChangeCursor 42 |
| 78 | #define X_XIChangeHierarchy 43 |
| 79 | #define X_XISetClientPointer 44 |
| 80 | #define X_XIGetClientPointer 45 |
| 81 | #define X_XISelectEvents 46 |
| 82 | #define X_XIQueryVersion 47 |
| 83 | #define X_XIQueryDevice 48 |
| 84 | #define X_XISetFocus 49 |
| 85 | #define X_XIGetFocus 50 |
| 86 | #define X_XIGrabDevice 51 |
| 87 | #define X_XIUngrabDevice 52 |
| 88 | #define X_XIAllowEvents 53 |
| 89 | #define X_XIPassiveGrabDevice 54 |
| 90 | #define X_XIPassiveUngrabDevice 55 |
| 91 | #define X_XIListProperties 56 |
| 92 | #define X_XIChangeProperty 57 |
| 93 | #define X_XIDeleteProperty 58 |
| 94 | #define X_XIGetProperty 59 |
| 95 | #define X_XIGetSelectedEvents 60 |
| 96 | #define X_XIBarrierReleasePointer 61 |
| 97 | |
| 98 | |
| 99 | #define XI2REQUESTS (X_XIBarrierReleasePointer - X_XIQueryPointer + 1) |
| 100 | |
| 101 | #define XI2EVENTS (XI_LASTEVENT + 1) |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | typedef int32_t FP1616; |
| 110 | |
| 111 | |
| 112 | typedef struct { |
| 113 | int32_t integral; |
| 114 | uint32_t frac; |
| 115 | } FP3232; |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | typedef struct { |
| 127 | uint16_t deviceid; |
| 128 | uint16_t use; |
| 129 | |
| 130 | |
| 131 | uint16_t attachment; |
| 132 | uint16_t num_classes; |
| 133 | uint16_t name_len; |
| 134 | uint8_t enabled; |
| 135 | uint8_t pad; |
| 136 | } xXIDeviceInfo; |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | typedef struct { |
| 144 | uint16_t type; |
| 145 | uint16_t length; |
| 146 | uint16_t sourceid; |
| 147 | uint16_t pad; |
| 148 | } xXIAnyInfo; |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | typedef struct { |
| 157 | uint16_t type; |
| 158 | uint16_t length; |
| 159 | uint16_t sourceid; |
| 160 | uint16_t num_buttons; |
| 161 | } xXIButtonInfo; |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | typedef struct { |
| 169 | uint16_t type; |
| 170 | uint16_t length; |
| 171 | uint16_t sourceid; |
| 172 | uint16_t num_keycodes; |
| 173 | } xXIKeyInfo; |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | typedef struct { |
| 180 | uint16_t type; |
| 181 | uint16_t length; |
| 182 | uint16_t sourceid; |
| 183 | uint16_t number; |
| 184 | Atom label; |
| 185 | FP3232 min; |
| 186 | FP3232 max; |
| 187 | FP3232 value; |
| 188 | uint32_t resolution; |
| 189 | uint8_t mode; |
| 190 | uint8_t pad1; |
| 191 | uint16_t pad2; |
| 192 | } xXIValuatorInfo; |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | typedef struct { |
| 200 | uint16_t type; |
| 201 | uint16_t length; |
| 202 | uint16_t sourceid; |
| 203 | uint16_t number; |
| 204 | uint16_t scroll_type; |
| 205 | uint16_t pad0; |
| 206 | uint32_t flags; |
| 207 | FP3232 increment; |
| 208 | } xXIScrollInfo; |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | typedef struct { |
| 214 | uint16_t type; |
| 215 | uint16_t length; |
| 216 | uint16_t sourceid; |
| 217 | uint8_t mode; |
| 218 | uint8_t num_touches; |
| 219 | } xXITouchInfo; |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | typedef struct { |
| 225 | uint16_t type; |
| 226 | uint16_t length; |
| 227 | uint16_t sourceid; |
| 228 | uint8_t num_touches; |
| 229 | uint8_t pad0; |
| 230 | } xXIGestureInfo; |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | typedef struct { |
| 239 | uint16_t deviceid; |
| 240 | uint16_t mask_len; |
| 241 | } xXIEventMask; |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | typedef struct |
| 249 | { |
| 250 | uint32_t base_mods; |
| 251 | uint32_t latched_mods; |
| 252 | uint32_t locked_mods; |
| 253 | uint32_t effective_mods; |
| 254 | } xXIModifierInfo; |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | typedef struct |
| 262 | { |
| 263 | uint8_t base_group; |
| 264 | uint8_t latched_group; |
| 265 | uint8_t locked_group; |
| 266 | uint8_t effective_group; |
| 267 | } xXIGroupInfo; |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | typedef struct { |
| 281 | uint8_t reqType; |
| 282 | uint8_t ReqType; |
| 283 | uint16_t length; |
| 284 | uint16_t major_version; |
| 285 | uint16_t minor_version; |
| 286 | } xXIQueryVersionReq; |
| 287 | #define sz_xXIQueryVersionReq 8 |
| 288 | |
| 289 | typedef struct { |
| 290 | uint8_t repType; |
| 291 | uint8_t RepType; |
| 292 | uint16_t sequenceNumber; |
| 293 | uint32_t length; |
| 294 | uint16_t major_version; |
| 295 | uint16_t minor_version; |
| 296 | uint32_t pad1; |
| 297 | uint32_t pad2; |
| 298 | uint32_t pad3; |
| 299 | uint32_t pad4; |
| 300 | uint32_t pad5; |
| 301 | } xXIQueryVersionReply; |
| 302 | #define sz_xXIQueryVersionReply 32 |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | typedef struct { |
| 309 | uint8_t reqType; |
| 310 | uint8_t ReqType; |
| 311 | uint16_t length; |
| 312 | uint16_t deviceid; |
| 313 | uint16_t pad; |
| 314 | } xXIQueryDeviceReq; |
| 315 | #define sz_xXIQueryDeviceReq 8 |
| 316 | |
| 317 | typedef struct { |
| 318 | uint8_t repType; |
| 319 | uint8_t RepType; |
| 320 | uint16_t sequenceNumber; |
| 321 | uint32_t length; |
| 322 | uint16_t num_devices; |
| 323 | uint16_t pad0; |
| 324 | uint32_t pad1; |
| 325 | uint32_t pad2; |
| 326 | uint32_t pad3; |
| 327 | uint32_t pad4; |
| 328 | uint32_t pad5; |
| 329 | } xXIQueryDeviceReply; |
| 330 | #define sz_xXIQueryDeviceReply 32 |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | typedef struct { |
| 336 | uint8_t reqType; |
| 337 | uint8_t ReqType; |
| 338 | uint16_t length; |
| 339 | Window win; |
| 340 | uint16_t num_masks; |
| 341 | uint16_t pad; |
| 342 | } xXISelectEventsReq; |
| 343 | #define sz_xXISelectEventsReq 12 |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | typedef struct { |
| 349 | uint8_t reqType; |
| 350 | uint8_t ReqType; |
| 351 | uint16_t length; |
| 352 | Window win; |
| 353 | } xXIGetSelectedEventsReq; |
| 354 | #define sz_xXIGetSelectedEventsReq 8 |
| 355 | |
| 356 | typedef struct { |
| 357 | uint8_t repType; |
| 358 | uint8_t RepType; |
| 359 | uint16_t sequenceNumber; |
| 360 | uint32_t length; |
| 361 | uint16_t num_masks; |
| 362 | |
| 363 | uint16_t pad0; |
| 364 | uint32_t pad1; |
| 365 | uint32_t pad2; |
| 366 | uint32_t pad3; |
| 367 | uint32_t pad4; |
| 368 | uint32_t pad5; |
| 369 | } xXIGetSelectedEventsReply; |
| 370 | #define sz_xXIGetSelectedEventsReply 32 |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | typedef struct { |
| 377 | uint8_t reqType; |
| 378 | uint8_t ReqType; |
| 379 | uint16_t length; |
| 380 | Window win; |
| 381 | uint16_t deviceid; |
| 382 | uint16_t pad1; |
| 383 | } xXIQueryPointerReq; |
| 384 | #define sz_xXIQueryPointerReq 12 |
| 385 | |
| 386 | |
| 387 | typedef struct { |
| 388 | uint8_t repType; |
| 389 | uint8_t RepType; |
| 390 | uint16_t sequenceNumber; |
| 391 | uint32_t length; |
| 392 | Window root; |
| 393 | Window child; |
| 394 | FP1616 root_x; |
| 395 | FP1616 root_y; |
| 396 | FP1616 win_x; |
| 397 | FP1616 win_y; |
| 398 | uint8_t same_screen; |
| 399 | uint8_t pad0; |
| 400 | uint16_t buttons_len; |
| 401 | xXIModifierInfo mods; |
| 402 | xXIGroupInfo group; |
| 403 | } xXIQueryPointerReply; |
| 404 | #define sz_xXIQueryPointerReply 56 |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | typedef struct { |
| 411 | uint8_t reqType; |
| 412 | uint8_t ReqType; |
| 413 | uint16_t length; |
| 414 | Window src_win; |
| 415 | Window dst_win; |
| 416 | FP1616 src_x; |
| 417 | FP1616 src_y; |
| 418 | uint16_t src_width; |
| 419 | uint16_t src_height; |
| 420 | FP1616 dst_x; |
| 421 | FP1616 dst_y; |
| 422 | uint16_t deviceid; |
| 423 | uint16_t pad1; |
| 424 | } xXIWarpPointerReq; |
| 425 | #define sz_xXIWarpPointerReq 36 |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | typedef struct { |
| 432 | uint8_t reqType; |
| 433 | uint8_t ReqType; |
| 434 | uint16_t length; |
| 435 | Window win; |
| 436 | Cursor cursor; |
| 437 | uint16_t deviceid; |
| 438 | uint16_t pad1; |
| 439 | } xXIChangeCursorReq; |
| 440 | #define sz_xXIChangeCursorReq 16 |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | typedef struct { |
| 447 | uint8_t reqType; |
| 448 | uint8_t ReqType; |
| 449 | uint16_t length; |
| 450 | uint8_t num_changes; |
| 451 | uint8_t pad0; |
| 452 | uint16_t pad1; |
| 453 | } xXIChangeHierarchyReq; |
| 454 | #define sz_xXIChangeHierarchyReq 8 |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | typedef struct { |
| 460 | uint16_t type; |
| 461 | uint16_t length; |
| 462 | } xXIAnyHierarchyChangeInfo; |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | typedef struct { |
| 469 | uint16_t type; |
| 470 | uint16_t length; |
| 471 | uint16_t name_len; |
| 472 | uint8_t send_core; |
| 473 | uint8_t enable; |
| 474 | } xXIAddMasterInfo; |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | typedef struct { |
| 481 | uint16_t type; |
| 482 | uint16_t length; |
| 483 | uint16_t deviceid; |
| 484 | uint8_t return_mode; |
| 485 | uint8_t pad; |
| 486 | uint16_t return_pointer; |
| 487 | uint16_t return_keyboard; |
| 488 | } xXIRemoveMasterInfo; |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | typedef struct { |
| 495 | uint16_t type; |
| 496 | uint16_t length; |
| 497 | uint16_t deviceid; |
| 498 | uint16_t new_master; |
| 499 | } xXIAttachSlaveInfo; |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | typedef struct { |
| 505 | uint16_t type; |
| 506 | uint16_t length; |
| 507 | uint16_t deviceid; |
| 508 | uint16_t pad; |
| 509 | } xXIDetachSlaveInfo; |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | typedef struct { |
| 516 | uint8_t reqType; |
| 517 | uint8_t ReqType; |
| 518 | uint16_t length; |
| 519 | Window win; |
| 520 | uint16_t deviceid; |
| 521 | uint16_t pad1; |
| 522 | } xXISetClientPointerReq; |
| 523 | #define sz_xXISetClientPointerReq 12 |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | typedef struct { |
| 529 | uint8_t reqType; |
| 530 | uint8_t ReqType; |
| 531 | uint16_t length; |
| 532 | Window win; |
| 533 | } xXIGetClientPointerReq; |
| 534 | #define sz_xXIGetClientPointerReq 8 |
| 535 | |
| 536 | typedef struct { |
| 537 | uint8_t repType; |
| 538 | uint8_t RepType; |
| 539 | uint16_t sequenceNumber; |
| 540 | uint32_t length; |
| 541 | BOOL set; |
| 542 | uint8_t pad0; |
| 543 | uint16_t deviceid; |
| 544 | uint32_t pad1; |
| 545 | uint32_t pad2; |
| 546 | uint32_t pad3; |
| 547 | uint32_t pad4; |
| 548 | uint32_t pad5; |
| 549 | } xXIGetClientPointerReply; |
| 550 | #define sz_xXIGetClientPointerReply 32 |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | typedef struct { |
| 556 | uint8_t reqType; |
| 557 | uint8_t ReqType; |
| 558 | uint16_t length; |
| 559 | Window focus; |
| 560 | Time time; |
| 561 | uint16_t deviceid; |
| 562 | uint16_t pad0; |
| 563 | } xXISetFocusReq; |
| 564 | #define sz_xXISetFocusReq 16 |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | typedef struct { |
| 570 | uint8_t reqType; |
| 571 | uint8_t ReqType; |
| 572 | uint16_t length; |
| 573 | uint16_t deviceid; |
| 574 | uint16_t pad0; |
| 575 | } xXIGetFocusReq; |
| 576 | #define sz_xXIGetFocusReq 8 |
| 577 | |
| 578 | typedef struct { |
| 579 | uint8_t repType; |
| 580 | uint8_t RepType; |
| 581 | uint16_t sequenceNumber; |
| 582 | uint32_t length; |
| 583 | Window focus; |
| 584 | uint32_t pad1; |
| 585 | uint32_t pad2; |
| 586 | uint32_t pad3; |
| 587 | uint32_t pad4; |
| 588 | uint32_t pad5; |
| 589 | } xXIGetFocusReply; |
| 590 | #define sz_xXIGetFocusReply 32 |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | typedef struct { |
| 597 | uint8_t reqType; |
| 598 | uint8_t ReqType; |
| 599 | uint16_t length; |
| 600 | Window grab_window; |
| 601 | Time time; |
| 602 | Cursor cursor; |
| 603 | uint16_t deviceid; |
| 604 | uint8_t grab_mode; |
| 605 | uint8_t paired_device_mode; |
| 606 | uint8_t owner_events; |
| 607 | uint8_t pad; |
| 608 | uint16_t mask_len; |
| 609 | } xXIGrabDeviceReq; |
| 610 | #define sz_xXIGrabDeviceReq 24 |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | typedef struct { |
| 616 | uint32_t modifiers; |
| 617 | uint8_t status; |
| 618 | uint8_t pad0; |
| 619 | uint16_t pad1; |
| 620 | } xXIGrabModifierInfo; |
| 621 | |
| 622 | typedef struct { |
| 623 | uint8_t repType; |
| 624 | uint8_t RepType; |
| 625 | uint16_t sequenceNumber; |
| 626 | uint32_t length; |
| 627 | uint8_t status; |
| 628 | uint8_t pad0; |
| 629 | uint16_t pad1; |
| 630 | uint32_t pad2; |
| 631 | uint32_t pad3; |
| 632 | uint32_t pad4; |
| 633 | uint32_t pad5; |
| 634 | uint32_t pad6; |
| 635 | } xXIGrabDeviceReply; |
| 636 | #define sz_xXIGrabDeviceReply 32 |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | typedef struct { |
| 643 | uint8_t reqType; |
| 644 | uint8_t ReqType; |
| 645 | uint16_t length; |
| 646 | Time time; |
| 647 | uint16_t deviceid; |
| 648 | uint16_t pad; |
| 649 | } xXIUngrabDeviceReq; |
| 650 | #define sz_xXIUngrabDeviceReq 12 |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | typedef struct { |
| 657 | uint8_t reqType; |
| 658 | uint8_t ReqType; |
| 659 | uint16_t length; |
| 660 | Time time; |
| 661 | uint16_t deviceid; |
| 662 | uint8_t mode; |
| 663 | uint8_t pad; |
| 664 | } xXIAllowEventsReq; |
| 665 | #define sz_xXIAllowEventsReq 12 |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | typedef struct { |
| 672 | uint8_t reqType; |
| 673 | uint8_t ReqType; |
| 674 | uint16_t length; |
| 675 | Time time; |
| 676 | uint16_t deviceid; |
| 677 | uint8_t mode; |
| 678 | uint8_t pad; |
| 679 | uint32_t touchid; |
| 680 | Window grab_window; |
| 681 | } xXI2_2AllowEventsReq; |
| 682 | #define sz_xXI2_2AllowEventsReq 20 |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | typedef struct { |
| 689 | uint8_t reqType; |
| 690 | uint8_t ReqType; |
| 691 | uint16_t length; |
| 692 | Time time; |
| 693 | Window grab_window; |
| 694 | Cursor cursor; |
| 695 | uint32_t detail; |
| 696 | uint16_t deviceid; |
| 697 | uint16_t num_modifiers; |
| 698 | uint16_t mask_len; |
| 699 | uint8_t grab_type; |
| 700 | uint8_t grab_mode; |
| 701 | uint8_t paired_device_mode; |
| 702 | uint8_t owner_events; |
| 703 | uint16_t pad1; |
| 704 | } xXIPassiveGrabDeviceReq; |
| 705 | #define sz_xXIPassiveGrabDeviceReq 32 |
| 706 | |
| 707 | typedef struct { |
| 708 | uint8_t repType; |
| 709 | uint8_t RepType; |
| 710 | uint16_t sequenceNumber; |
| 711 | uint32_t length; |
| 712 | uint16_t num_modifiers; |
| 713 | uint16_t pad1; |
| 714 | uint32_t pad2; |
| 715 | uint32_t pad3; |
| 716 | uint32_t pad4; |
| 717 | uint32_t pad5; |
| 718 | uint32_t pad6; |
| 719 | } xXIPassiveGrabDeviceReply; |
| 720 | #define sz_xXIPassiveGrabDeviceReply 32 |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | typedef struct { |
| 726 | uint8_t reqType; |
| 727 | uint8_t ReqType; |
| 728 | uint16_t length; |
| 729 | Window grab_window; |
| 730 | uint32_t detail; |
| 731 | uint16_t deviceid; |
| 732 | uint16_t num_modifiers; |
| 733 | uint8_t grab_type; |
| 734 | uint8_t pad0; |
| 735 | uint16_t pad1; |
| 736 | } xXIPassiveUngrabDeviceReq; |
| 737 | #define sz_xXIPassiveUngrabDeviceReq 20 |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | typedef struct { |
| 743 | uint8_t reqType; |
| 744 | uint8_t ReqType; |
| 745 | uint16_t length; |
| 746 | uint16_t deviceid; |
| 747 | uint16_t pad; |
| 748 | } xXIListPropertiesReq; |
| 749 | #define sz_xXIListPropertiesReq 8 |
| 750 | |
| 751 | typedef struct { |
| 752 | uint8_t repType; |
| 753 | uint8_t RepType; |
| 754 | uint16_t sequenceNumber; |
| 755 | uint32_t length; |
| 756 | uint16_t num_properties; |
| 757 | uint16_t pad0; |
| 758 | uint32_t pad1; |
| 759 | uint32_t pad2; |
| 760 | uint32_t pad3; |
| 761 | uint32_t pad4; |
| 762 | uint32_t pad5; |
| 763 | } xXIListPropertiesReply; |
| 764 | #define sz_xXIListPropertiesReply 32 |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | typedef struct { |
| 770 | uint8_t reqType; |
| 771 | uint8_t ReqType; |
| 772 | uint16_t length; |
| 773 | uint16_t deviceid; |
| 774 | uint8_t mode; |
| 775 | uint8_t format; |
| 776 | Atom property; |
| 777 | Atom type; |
| 778 | uint32_t num_items; |
| 779 | } xXIChangePropertyReq; |
| 780 | #define sz_xXIChangePropertyReq 20 |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | typedef struct { |
| 786 | uint8_t reqType; |
| 787 | uint8_t ReqType; |
| 788 | uint16_t length; |
| 789 | uint16_t deviceid; |
| 790 | uint16_t pad0; |
| 791 | Atom property; |
| 792 | } xXIDeletePropertyReq; |
| 793 | #define sz_xXIDeletePropertyReq 12 |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | typedef struct { |
| 799 | uint8_t reqType; |
| 800 | uint8_t ReqType; |
| 801 | uint16_t length; |
| 802 | uint16_t deviceid; |
| 803 | #if defined(__cplusplus) || defined(c_plusplus) |
| 804 | uint8_t c_delete; |
| 805 | #else |
| 806 | uint8_t delete; |
| 807 | #endif |
| 808 | uint8_t pad0; |
| 809 | Atom property; |
| 810 | Atom type; |
| 811 | uint32_t offset; |
| 812 | uint32_t len; |
| 813 | } xXIGetPropertyReq; |
| 814 | #define sz_xXIGetPropertyReq 24 |
| 815 | |
| 816 | typedef struct { |
| 817 | uint8_t repType; |
| 818 | uint8_t RepType; |
| 819 | uint16_t sequenceNumber; |
| 820 | uint32_t length; |
| 821 | Atom type; |
| 822 | uint32_t bytes_after; |
| 823 | uint32_t num_items; |
| 824 | uint8_t format; |
| 825 | uint8_t pad0; |
| 826 | uint16_t pad1; |
| 827 | uint32_t pad2; |
| 828 | uint32_t pad3; |
| 829 | } xXIGetPropertyReply; |
| 830 | #define sz_xXIGetPropertyReply 32 |
| 831 | |
| 832 | typedef struct { |
| 833 | uint16_t deviceid; |
| 834 | uint16_t pad; |
| 835 | Barrier barrier; |
| 836 | uint32_t eventid; |
| 837 | } xXIBarrierReleasePointerInfo; |
| 838 | |
| 839 | typedef struct { |
| 840 | uint8_t reqType; |
| 841 | uint8_t ReqType; |
| 842 | uint16_t length; |
| 843 | uint32_t num_barriers; |
| 844 | |
| 845 | } xXIBarrierReleasePointerReq; |
| 846 | #define sz_xXIBarrierReleasePointerReq 8 |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | typedef struct |
| 858 | { |
| 859 | uint8_t type; |
| 860 | uint8_t extension; |
| 861 | uint16_t sequenceNumber; |
| 862 | uint32_t length; |
| 863 | uint16_t evtype; |
| 864 | uint16_t deviceid; |
| 865 | Time time; |
| 866 | } xXIGenericDeviceEvent; |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | typedef struct |
| 872 | { |
| 873 | uint16_t deviceid; |
| 874 | uint16_t attachment; |
| 875 | uint8_t use; |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | BOOL enabled; |
| 881 | uint16_t pad; |
| 882 | uint32_t flags; |
| 883 | |
| 884 | |
| 885 | |
| 886 | } xXIHierarchyInfo; |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | typedef struct |
| 893 | { |
| 894 | uint8_t type; |
| 895 | uint8_t extension; |
| 896 | uint16_t sequenceNumber; |
| 897 | uint32_t length; |
| 898 | uint16_t evtype; |
| 899 | uint16_t deviceid; |
| 900 | Time time; |
| 901 | uint32_t flags; |
| 902 | |
| 903 | |
| 904 | |
| 905 | uint16_t num_info; |
| 906 | uint16_t pad0; |
| 907 | uint32_t pad1; |
| 908 | uint32_t pad2; |
| 909 | } xXIHierarchyEvent; |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | typedef struct |
| 915 | { |
| 916 | uint8_t type; |
| 917 | uint8_t extension; |
| 918 | uint16_t sequenceNumber; |
| 919 | uint32_t length; |
| 920 | uint16_t evtype; |
| 921 | uint16_t deviceid; |
| 922 | Time time; |
| 923 | uint16_t num_classes; |
| 924 | uint16_t sourceid; |
| 925 | uint8_t reason; |
| 926 | uint8_t pad0; |
| 927 | uint16_t pad1; |
| 928 | uint32_t pad2; |
| 929 | uint32_t pad3; |
| 930 | } xXIDeviceChangedEvent; |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | typedef struct |
| 936 | { |
| 937 | uint8_t type; |
| 938 | uint8_t extension; |
| 939 | uint16_t sequenceNumber; |
| 940 | uint32_t length; |
| 941 | uint16_t evtype; |
| 942 | uint16_t deviceid; |
| 943 | Time time; |
| 944 | uint32_t touchid; |
| 945 | Window root; |
| 946 | Window event; |
| 947 | Window child; |
| 948 | |
| 949 | uint16_t sourceid; |
| 950 | uint16_t pad0; |
| 951 | uint32_t flags; |
| 952 | uint32_t pad1; |
| 953 | uint32_t pad2; |
| 954 | } xXITouchOwnershipEvent; |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | typedef struct |
| 960 | { |
| 961 | uint8_t type; |
| 962 | uint8_t extension; |
| 963 | uint16_t sequenceNumber; |
| 964 | uint32_t length; |
| 965 | uint16_t evtype; |
| 966 | uint16_t deviceid; |
| 967 | Time time; |
| 968 | uint32_t detail; |
| 969 | Window root; |
| 970 | Window event; |
| 971 | Window child; |
| 972 | |
| 973 | FP1616 root_x; |
| 974 | FP1616 root_y; |
| 975 | FP1616 event_x; |
| 976 | FP1616 event_y; |
| 977 | uint16_t buttons_len; |
| 978 | uint16_t valuators_len; |
| 979 | uint16_t sourceid; |
| 980 | uint16_t pad0; |
| 981 | uint32_t flags; |
| 982 | xXIModifierInfo mods; |
| 983 | xXIGroupInfo group; |
| 984 | } xXIDeviceEvent; |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | typedef struct |
| 993 | { |
| 994 | uint8_t type; |
| 995 | uint8_t extension; |
| 996 | uint16_t sequenceNumber; |
| 997 | uint32_t length; |
| 998 | uint16_t evtype; |
| 999 | uint16_t deviceid; |
| 1000 | Time time; |
| 1001 | uint32_t detail; |
| 1002 | uint16_t sourceid; |
| 1003 | uint16_t valuators_len; |
| 1004 | |
| 1005 | uint32_t flags; |
| 1006 | uint32_t pad2; |
| 1007 | } xXIRawEvent; |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | typedef struct |
| 1014 | { |
| 1015 | uint8_t type; |
| 1016 | uint8_t extension; |
| 1017 | uint16_t sequenceNumber; |
| 1018 | uint32_t length; |
| 1019 | uint16_t evtype; |
| 1020 | uint16_t deviceid; |
| 1021 | Time time; |
| 1022 | uint16_t sourceid; |
| 1023 | uint8_t mode; |
| 1024 | uint8_t detail; |
| 1025 | Window root; |
| 1026 | Window event; |
| 1027 | Window child; |
| 1028 | |
| 1029 | FP1616 root_x; |
| 1030 | FP1616 root_y; |
| 1031 | FP1616 event_x; |
| 1032 | FP1616 event_y; |
| 1033 | BOOL same_screen; |
| 1034 | BOOL focus; |
| 1035 | uint16_t buttons_len; |
| 1036 | |
| 1037 | xXIModifierInfo mods; |
| 1038 | xXIGroupInfo group; |
| 1039 | } xXIEnterEvent; |
| 1040 | |
| 1041 | typedef xXIEnterEvent xXILeaveEvent; |
| 1042 | typedef xXIEnterEvent xXIFocusInEvent; |
| 1043 | typedef xXIEnterEvent xXIFocusOutEvent; |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | |
| 1048 | |
| 1049 | typedef struct |
| 1050 | { |
| 1051 | uint8_t type; |
| 1052 | uint8_t extension; |
| 1053 | uint16_t sequenceNumber; |
| 1054 | uint32_t length; |
| 1055 | uint16_t evtype; |
| 1056 | uint16_t deviceid; |
| 1057 | Time time; |
| 1058 | Atom property; |
| 1059 | uint8_t what; |
| 1060 | |
| 1061 | |
| 1062 | uint8_t pad0; |
| 1063 | uint16_t pad1; |
| 1064 | uint32_t pad2; |
| 1065 | uint32_t pad3; |
| 1066 | } xXIPropertyEvent; |
| 1067 | |
| 1068 | typedef struct |
| 1069 | { |
| 1070 | uint8_t type; |
| 1071 | uint8_t extension; |
| 1072 | uint16_t sequenceNumber; |
| 1073 | uint32_t length; |
| 1074 | uint16_t evtype; |
| 1075 | uint16_t deviceid; |
| 1076 | Time time; |
| 1077 | uint32_t eventid; |
| 1078 | Window root; |
| 1079 | Window event; |
| 1080 | Barrier barrier; |
| 1081 | |
| 1082 | uint32_t dtime; |
| 1083 | uint32_t flags; |
| 1084 | |
| 1085 | uint16_t sourceid; |
| 1086 | int16_t pad; |
| 1087 | FP1616 root_x; |
| 1088 | FP1616 root_y; |
| 1089 | FP3232 dx; |
| 1090 | FP3232 dy; |
| 1091 | } xXIBarrierEvent; |
| 1092 | |
| 1093 | typedef xXIBarrierEvent xXIBarrierHitEvent; |
| 1094 | typedef xXIBarrierEvent xXIBarrierPointerReleasedEvent; |
| 1095 | typedef xXIBarrierEvent xXIBarrierLeaveEvent; |
| 1096 | |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | typedef struct |
| 1101 | { |
| 1102 | uint8_t type; |
| 1103 | uint8_t extension; |
| 1104 | uint16_t sequenceNumber; |
| 1105 | uint32_t length; |
| 1106 | uint16_t evtype; |
| 1107 | uint16_t deviceid; |
| 1108 | Time time; |
| 1109 | uint32_t detail; |
| 1110 | Window root; |
| 1111 | Window event; |
| 1112 | Window child; |
| 1113 | |
| 1114 | FP1616 root_x; |
| 1115 | FP1616 root_y; |
| 1116 | FP1616 event_x; |
| 1117 | FP1616 event_y; |
| 1118 | FP1616 delta_x; |
| 1119 | FP1616 delta_y; |
| 1120 | FP1616 delta_unaccel_x; |
| 1121 | FP1616 delta_unaccel_y; |
| 1122 | FP1616 scale; |
| 1123 | FP1616 delta_angle; |
| 1124 | uint16_t sourceid; |
| 1125 | uint16_t pad0; |
| 1126 | xXIModifierInfo mods; |
| 1127 | xXIGroupInfo group; |
| 1128 | uint32_t flags; |
| 1129 | } xXIGesturePinchEvent; |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | typedef struct |
| 1135 | { |
| 1136 | uint8_t type; |
| 1137 | uint8_t extension; |
| 1138 | uint16_t sequenceNumber; |
| 1139 | uint32_t length; |
| 1140 | uint16_t evtype; |
| 1141 | uint16_t deviceid; |
| 1142 | Time time; |
| 1143 | uint32_t detail; |
| 1144 | Window root; |
| 1145 | Window event; |
| 1146 | Window child; |
| 1147 | |
| 1148 | FP1616 root_x; |
| 1149 | FP1616 root_y; |
| 1150 | FP1616 event_x; |
| 1151 | FP1616 event_y; |
| 1152 | FP1616 delta_x; |
| 1153 | FP1616 delta_y; |
| 1154 | FP1616 delta_unaccel_x; |
| 1155 | FP1616 delta_unaccel_y; |
| 1156 | uint16_t sourceid; |
| 1157 | uint16_t pad0; |
| 1158 | xXIModifierInfo mods; |
| 1159 | xXIGroupInfo group; |
| 1160 | uint32_t flags; |
| 1161 | } xXIGestureSwipeEvent; |
| 1162 | |
| 1163 | #undef Window |
| 1164 | #undef Time |
| 1165 | #undef Atom |
| 1166 | #undef Cursor |
| 1167 | #undef Barrier |
| 1168 | |
| 1169 | #endif |