1 /* 2 * Copyright 2000 Compaq Computer Corporation 3 * Copyright 2002 Hewlett-Packard Company 4 * Copyright 2006 Intel Corporation 5 * Copyright 2008 Red Hat, Inc. 6 * 7 * Permission to use, copy, modify, distribute, and sell this software and its 8 * documentation for any purpose is hereby granted without fee, provided that 9 * the above copyright notice appear in all copies and that both that copyright 10 * notice and this permission notice appear in supporting documentation, and 11 * that the name of the copyright holders not be used in advertising or 12 * publicity pertaining to distribution of the software without specific, 13 * written prior permission. The copyright holders make no representations 14 * about the suitability of this software for any purpose. It is provided "as 15 * is" without express or implied warranty. 16 * 17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 19 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 20 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 22 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 23 * OF THIS SOFTWARE. 24 * 25 * Author: Jim Gettys, Hewlett-Packard Company, Inc. 26 * Keith Packard, Intel Corporation 27 */ 28 29 /* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ 30 /* V1.0 removes depth switching from the protocol */ 31 #ifndef _XRANDRP_H_ 32 #define _XRANDRP_H_ 33 34 #include <X11/extensions/randr.h> 35 #include <X11/extensions/renderproto.h> 36 37 #define Window CARD32 38 #define Drawable CARD32 39 #define Font CARD32 40 #define Pixmap CARD32 41 #define Cursor CARD32 42 #define Colormap CARD32 43 #define GContext CARD32 44 #define Atom CARD32 45 #define Time CARD32 46 #define KeyCode CARD8 47 #define KeySym CARD32 48 49 /* All also defined in <randr/randrstr.h> */ 50 #ifndef RROutput 51 #define RROutput CARD32 52 #define RRMode CARD32 53 #define RRCrtc CARD32 54 #define RRProvider CARD32 55 #define RRModeFlags CARD32 56 #define RRLease CARD32 57 #endif 58 59 #define Rotation CARD16 60 #define SizeID CARD16 61 #define SubpixelOrder CARD16 62 63 /* 64 * data structures 65 */ 66 67 typedef struct { 68 CARD16 widthInPixels; 69 CARD16 heightInPixels; 70 CARD16 widthInMillimeters; 71 CARD16 heightInMillimeters; 72 } xScreenSizes; 73 #define sz_xScreenSizes 8 74 75 /* 76 * requests and replies 77 */ 78 79 typedef struct { 80 CARD8 reqType; 81 CARD8 randrReqType; 82 CARD16 length; 83 CARD32 majorVersion; 84 CARD32 minorVersion; 85 } xRRQueryVersionReq; 86 #define sz_xRRQueryVersionReq 12 87 88 typedef struct { 89 BYTE type; /* X_Reply */ 90 BYTE pad1; 91 CARD16 sequenceNumber; 92 CARD32 length; 93 CARD32 majorVersion; 94 CARD32 minorVersion; 95 CARD32 pad2; 96 CARD32 pad3; 97 CARD32 pad4; 98 CARD32 pad5; 99 } xRRQueryVersionReply; 100 #define sz_xRRQueryVersionReply 32 101 102 typedef struct { 103 CARD8 reqType; 104 CARD8 randrReqType; 105 CARD16 length; 106 Window window; 107 } xRRGetScreenInfoReq; 108 #define sz_xRRGetScreenInfoReq 8 109 110 /* 111 * the xRRScreenInfoReply structure is followed by: 112 * 113 * the size information 114 */ 115 116 117 typedef struct { 118 BYTE type; /* X_Reply */ 119 BYTE setOfRotations; 120 CARD16 sequenceNumber; 121 CARD32 length; 122 Window root; 123 Time timestamp; 124 Time configTimestamp; 125 CARD16 nSizes; 126 SizeID sizeID; 127 Rotation rotation; 128 CARD16 rate; 129 CARD16 nrateEnts; 130 CARD16 pad; 131 } xRRGetScreenInfoReply; 132 #define sz_xRRGetScreenInfoReply 32 133 134 typedef struct { 135 CARD8 reqType; 136 CARD8 randrReqType; 137 CARD16 length; 138 Drawable drawable; 139 Time timestamp; 140 Time configTimestamp; 141 SizeID sizeID; 142 Rotation rotation; 143 } xRR1_0SetScreenConfigReq; 144 #define sz_xRR1_0SetScreenConfigReq 20 145 146 typedef struct { 147 CARD8 reqType; 148 CARD8 randrReqType; 149 CARD16 length; 150 Drawable drawable; 151 Time timestamp; 152 Time configTimestamp; 153 SizeID sizeID; 154 Rotation rotation; 155 CARD16 rate; 156 CARD16 pad; 157 } xRRSetScreenConfigReq; 158 #define sz_xRRSetScreenConfigReq 24 159 160 typedef struct { 161 BYTE type; /* X_Reply */ 162 CARD8 status; 163 CARD16 sequenceNumber; 164 CARD32 length; 165 Time newTimestamp; 166 Time newConfigTimestamp; 167 Window root; 168 CARD16 subpixelOrder; 169 CARD16 pad4; 170 CARD32 pad5; 171 CARD32 pad6; 172 } xRRSetScreenConfigReply; 173 #define sz_xRRSetScreenConfigReply 32 174 175 typedef struct { 176 CARD8 reqType; 177 CARD8 randrReqType; 178 CARD16 length; 179 Window window; 180 CARD16 enable; 181 CARD16 pad2; 182 } xRRSelectInputReq; 183 #define sz_xRRSelectInputReq 12 184 185 /* 186 * Additions for version 1.2 187 */ 188 189 typedef struct _xRRModeInfo { 190 RRMode id; 191 CARD16 width; 192 CARD16 height; 193 CARD32 dotClock; 194 CARD16 hSyncStart; 195 CARD16 hSyncEnd; 196 CARD16 hTotal; 197 CARD16 hSkew; 198 CARD16 vSyncStart; 199 CARD16 vSyncEnd; 200 CARD16 vTotal; 201 CARD16 nameLength; 202 RRModeFlags modeFlags; 203 } xRRModeInfo; 204 #define sz_xRRModeInfo 32 205 206 typedef struct { 207 CARD8 reqType; 208 CARD8 randrReqType; 209 CARD16 length; 210 Window window; 211 } xRRGetScreenSizeRangeReq; 212 #define sz_xRRGetScreenSizeRangeReq 8 213 214 typedef struct { 215 BYTE type; /* X_Reply */ 216 CARD8 pad; 217 CARD16 sequenceNumber; 218 CARD32 length; 219 CARD16 minWidth; 220 CARD16 minHeight; 221 CARD16 maxWidth; 222 CARD16 maxHeight; 223 CARD32 pad0; 224 CARD32 pad1; 225 CARD32 pad2; 226 CARD32 pad3; 227 } xRRGetScreenSizeRangeReply; 228 #define sz_xRRGetScreenSizeRangeReply 32 229 230 typedef struct { 231 CARD8 reqType; 232 CARD8 randrReqType; 233 CARD16 length; 234 Window window; 235 CARD16 width; 236 CARD16 height; 237 CARD32 widthInMillimeters; 238 CARD32 heightInMillimeters; 239 } xRRSetScreenSizeReq; 240 #define sz_xRRSetScreenSizeReq 20 241 242 typedef struct { 243 CARD8 reqType; 244 CARD8 randrReqType; 245 CARD16 length; 246 Window window; 247 } xRRGetScreenResourcesReq; 248 #define sz_xRRGetScreenResourcesReq 8 249 250 typedef struct { 251 BYTE type; 252 CARD8 pad; 253 CARD16 sequenceNumber; 254 CARD32 length; 255 Time timestamp; 256 Time configTimestamp; 257 CARD16 nCrtcs; 258 CARD16 nOutputs; 259 CARD16 nModes; 260 CARD16 nbytesNames; 261 CARD32 pad1; 262 CARD32 pad2; 263 } xRRGetScreenResourcesReply; 264 #define sz_xRRGetScreenResourcesReply 32 265 266 typedef struct { 267 CARD8 reqType; 268 CARD8 randrReqType; 269 CARD16 length; 270 RROutput output; 271 Time configTimestamp; 272 } xRRGetOutputInfoReq; 273 #define sz_xRRGetOutputInfoReq 12 274 275 typedef struct { 276 BYTE type; 277 CARD8 status; 278 CARD16 sequenceNumber; 279 CARD32 length; 280 Time timestamp; 281 RRCrtc crtc; 282 CARD32 mmWidth; 283 CARD32 mmHeight; 284 CARD8 connection; 285 CARD8 subpixelOrder; 286 CARD16 nCrtcs; 287 CARD16 nModes; 288 CARD16 nPreferred; 289 CARD16 nClones; 290 CARD16 nameLength; 291 } xRRGetOutputInfoReply; 292 #define sz_xRRGetOutputInfoReply 36 293 294 typedef struct { 295 CARD8 reqType; 296 CARD8 randrReqType; 297 CARD16 length; 298 RROutput output; 299 } xRRListOutputPropertiesReq; 300 #define sz_xRRListOutputPropertiesReq 8 301 302 typedef struct { 303 BYTE type; 304 CARD8 pad0; 305 CARD16 sequenceNumber; 306 CARD32 length; 307 CARD16 nAtoms; 308 CARD16 pad1; 309 CARD32 pad2; 310 CARD32 pad3; 311 CARD32 pad4; 312 CARD32 pad5; 313 CARD32 pad6; 314 } xRRListOutputPropertiesReply; 315 #define sz_xRRListOutputPropertiesReply 32 316 317 typedef struct { 318 CARD8 reqType; 319 CARD8 randrReqType; 320 CARD16 length; 321 RROutput output; 322 Atom property; 323 } xRRQueryOutputPropertyReq; 324 #define sz_xRRQueryOutputPropertyReq 12 325 326 typedef struct { 327 BYTE type; 328 BYTE pad0; 329 CARD16 sequenceNumber; 330 CARD32 length; 331 BOOL pending; 332 BOOL range; 333 BOOL immutable; 334 BYTE pad1; 335 CARD32 pad2; 336 CARD32 pad3; 337 CARD32 pad4; 338 CARD32 pad5; 339 CARD32 pad6; 340 } xRRQueryOutputPropertyReply; 341 #define sz_xRRQueryOutputPropertyReply 32 342 343 typedef struct { 344 CARD8 reqType; 345 CARD8 randrReqType; 346 CARD16 length; 347 RROutput output; 348 Atom property; 349 BOOL pending; 350 BOOL range; 351 CARD16 pad; 352 } xRRConfigureOutputPropertyReq; 353 #define sz_xRRConfigureOutputPropertyReq 16 354 355 typedef struct { 356 CARD8 reqType; 357 CARD8 randrReqType; 358 CARD16 length; 359 RROutput output; 360 Atom property; 361 Atom type; 362 CARD8 format; 363 CARD8 mode; 364 CARD16 pad; 365 CARD32 nUnits; 366 } xRRChangeOutputPropertyReq; 367 #define sz_xRRChangeOutputPropertyReq 24 368 369 typedef struct { 370 CARD8 reqType; 371 CARD8 randrReqType; 372 CARD16 length; 373 RROutput output; 374 Atom property; 375 } xRRDeleteOutputPropertyReq; 376 #define sz_xRRDeleteOutputPropertyReq 12 377 378 typedef struct { 379 CARD8 reqType; 380 CARD8 randrReqType; 381 CARD16 length; 382 RROutput output; 383 Atom property; 384 Atom type; 385 CARD32 longOffset; 386 CARD32 longLength; 387 #ifdef __cplusplus 388 BOOL _delete; 389 #else 390 BOOL delete; 391 #endif 392 BOOL pending; 393 CARD16 pad1; 394 } xRRGetOutputPropertyReq; 395 #define sz_xRRGetOutputPropertyReq 28 396 397 typedef struct { 398 BYTE type; 399 CARD8 format; 400 CARD16 sequenceNumber; 401 CARD32 length; 402 Atom propertyType; 403 CARD32 bytesAfter; 404 CARD32 nItems; 405 CARD32 pad1; 406 CARD32 pad2; 407 CARD32 pad3; 408 } xRRGetOutputPropertyReply; 409 #define sz_xRRGetOutputPropertyReply 32 410 411 typedef struct { 412 CARD8 reqType; 413 CARD8 randrReqType; 414 CARD16 length; 415 Window window; 416 xRRModeInfo modeInfo; 417 } xRRCreateModeReq; 418 #define sz_xRRCreateModeReq 40 419 420 typedef struct { 421 BYTE type; 422 CARD8 pad0; 423 CARD16 sequenceNumber; 424 CARD32 length; 425 RRMode mode; 426 CARD32 pad1; 427 CARD32 pad2; 428 CARD32 pad3; 429 CARD32 pad4; 430 CARD32 pad5; 431 } xRRCreateModeReply; 432 #define sz_xRRCreateModeReply 32 433 434 typedef struct { 435 CARD8 reqType; 436 CARD8 randrReqType; 437 CARD16 length; 438 RRMode mode; 439 } xRRDestroyModeReq; 440 #define sz_xRRDestroyModeReq 8 441 442 typedef struct { 443 CARD8 reqType; 444 CARD8 randrReqType; 445 CARD16 length; 446 RROutput output; 447 RRMode mode; 448 } xRRAddOutputModeReq; 449 #define sz_xRRAddOutputModeReq 12 450 451 typedef struct { 452 CARD8 reqType; 453 CARD8 randrReqType; 454 CARD16 length; 455 RROutput output; 456 RRMode mode; 457 } xRRDeleteOutputModeReq; 458 #define sz_xRRDeleteOutputModeReq 12 459 460 typedef struct { 461 CARD8 reqType; 462 CARD8 randrReqType; 463 CARD16 length; 464 RRCrtc crtc; 465 Time configTimestamp; 466 } xRRGetCrtcInfoReq; 467 #define sz_xRRGetCrtcInfoReq 12 468 469 typedef struct { 470 BYTE type; 471 CARD8 status; 472 CARD16 sequenceNumber; 473 CARD32 length; 474 Time timestamp; 475 INT16 x; 476 INT16 y; 477 CARD16 width; 478 CARD16 height; 479 RRMode mode; 480 Rotation rotation; 481 Rotation rotations; 482 CARD16 nOutput; 483 CARD16 nPossibleOutput; 484 } xRRGetCrtcInfoReply; 485 #define sz_xRRGetCrtcInfoReply 32 486 487 typedef struct { 488 CARD8 reqType; 489 CARD8 randrReqType; 490 CARD16 length; 491 RRCrtc crtc; 492 Time timestamp; 493 Time configTimestamp; 494 INT16 x; 495 INT16 y; 496 RRMode mode; 497 Rotation rotation; 498 CARD16 pad; 499 } xRRSetCrtcConfigReq; 500 #define sz_xRRSetCrtcConfigReq 28 501 502 typedef struct { 503 BYTE type; 504 CARD8 status; 505 CARD16 sequenceNumber; 506 CARD32 length; 507 Time newTimestamp; 508 CARD32 pad1; 509 CARD32 pad2; 510 CARD32 pad3; 511 CARD32 pad4; 512 CARD32 pad5; 513 } xRRSetCrtcConfigReply; 514 #define sz_xRRSetCrtcConfigReply 32 515 516 typedef struct { 517 CARD8 reqType; 518 CARD8 randrReqType; 519 CARD16 length; 520 RRCrtc crtc; 521 } xRRGetCrtcGammaSizeReq; 522 #define sz_xRRGetCrtcGammaSizeReq 8 523 524 typedef struct { 525 BYTE type; 526 CARD8 status; 527 CARD16 sequenceNumber; 528 CARD32 length; 529 CARD16 size; 530 CARD16 pad1; 531 CARD32 pad2; 532 CARD32 pad3; 533 CARD32 pad4; 534 CARD32 pad5; 535 CARD32 pad6; 536 } xRRGetCrtcGammaSizeReply; 537 #define sz_xRRGetCrtcGammaSizeReply 32 538 539 typedef struct { 540 CARD8 reqType; 541 CARD8 randrReqType; 542 CARD16 length; 543 RRCrtc crtc; 544 } xRRGetCrtcGammaReq; 545 #define sz_xRRGetCrtcGammaReq 8 546 547 typedef struct { 548 BYTE type; 549 CARD8 status; 550 CARD16 sequenceNumber; 551 CARD32 length; 552 CARD16 size; 553 CARD16 pad1; 554 CARD32 pad2; 555 CARD32 pad3; 556 CARD32 pad4; 557 CARD32 pad5; 558 CARD32 pad6; 559 } xRRGetCrtcGammaReply; 560 #define sz_xRRGetCrtcGammaReply 32 561 562 typedef struct { 563 CARD8 reqType; 564 CARD8 randrReqType; 565 CARD16 length; 566 RRCrtc crtc; 567 CARD16 size; 568 CARD16 pad1; 569 } xRRSetCrtcGammaReq; 570 #define sz_xRRSetCrtcGammaReq 12 571 572 /* 573 * Additions for V1.3 574 */ 575 576 typedef xRRGetScreenResourcesReq xRRGetScreenResourcesCurrentReq; 577 578 #define sz_xRRGetScreenResourcesCurrentReq sz_xRRGetScreenResourcesReq 579 580 typedef xRRGetScreenResourcesReply xRRGetScreenResourcesCurrentReply; 581 #define sz_xRRGetScreenResourcesCurrentReply sz_xRRGetScreenResourcesReply 582 583 typedef struct { 584 CARD8 reqType; 585 CARD8 randrReqType; 586 CARD16 length; 587 RRCrtc crtc; 588 xRenderTransform transform; 589 CARD16 nbytesFilter; /* number of bytes in filter name */ 590 CARD16 pad; 591 } xRRSetCrtcTransformReq; 592 593 #define sz_xRRSetCrtcTransformReq 48 594 595 typedef struct { 596 CARD8 reqType; 597 CARD8 randrReqType; 598 CARD16 length; 599 RRCrtc crtc; 600 } xRRGetCrtcTransformReq; 601 602 #define sz_xRRGetCrtcTransformReq 8 603 604 typedef struct { 605 BYTE type; 606 CARD8 status; 607 CARD16 sequenceNumber; 608 CARD32 length; 609 xRenderTransform pendingTransform; 610 BYTE hasTransforms; 611 CARD8 pad0; 612 CARD16 pad1; 613 xRenderTransform currentTransform; 614 CARD32 pad2; 615 CARD16 pendingNbytesFilter; /* number of bytes in filter name */ 616 CARD16 pendingNparamsFilter; /* number of filter params */ 617 CARD16 currentNbytesFilter; /* number of bytes in filter name */ 618 CARD16 currentNparamsFilter; /* number of filter params */ 619 } xRRGetCrtcTransformReply; 620 621 #define sz_xRRGetCrtcTransformReply 96 622 623 typedef struct { 624 CARD8 reqType; 625 CARD8 randrReqType; 626 CARD16 length; 627 Window window; 628 RROutput output; 629 } xRRSetOutputPrimaryReq; 630 #define sz_xRRSetOutputPrimaryReq 12 631 632 typedef struct { 633 CARD8 reqType; 634 CARD8 randrReqType; 635 CARD16 length; 636 Window window; 637 } xRRGetOutputPrimaryReq; 638 #define sz_xRRGetOutputPrimaryReq 8 639 640 typedef struct { 641 BYTE type; 642 CARD8 pad; 643 CARD16 sequenceNumber; 644 CARD32 length; 645 RROutput output; 646 CARD32 pad1; 647 CARD32 pad2; 648 CARD32 pad3; 649 CARD32 pad4; 650 CARD32 pad5; 651 } xRRGetOutputPrimaryReply; 652 #define sz_xRRGetOutputPrimaryReply 32 653 654 /* 655 * Additions for V1.4 656 */ 657 658 typedef struct { 659 CARD8 reqType; 660 CARD8 randrReqType; 661 CARD16 length; 662 Window window; 663 } xRRGetProvidersReq; 664 #define sz_xRRGetProvidersReq 8 665 666 typedef struct { 667 BYTE type; 668 CARD8 pad; 669 CARD16 sequenceNumber; 670 CARD32 length; 671 Time timestamp; 672 CARD16 nProviders; 673 CARD16 pad1; 674 CARD32 pad2; 675 CARD32 pad3; 676 CARD32 pad4; 677 CARD32 pad5; 678 } xRRGetProvidersReply; 679 #define sz_xRRGetProvidersReply 32 680 681 typedef struct { 682 CARD8 reqType; 683 CARD8 randrReqType; 684 CARD16 length; 685 RRProvider provider; 686 Time configTimestamp; 687 } xRRGetProviderInfoReq; 688 #define sz_xRRGetProviderInfoReq 12 689 690 typedef struct { 691 BYTE type; 692 CARD8 status; 693 CARD16 sequenceNumber; 694 CARD32 length; 695 Time timestamp; 696 CARD32 capabilities; 697 CARD16 nCrtcs; 698 CARD16 nOutputs; 699 CARD16 nAssociatedProviders; 700 CARD16 nameLength; 701 CARD32 pad1; 702 CARD32 pad2; 703 } xRRGetProviderInfoReply; 704 #define sz_xRRGetProviderInfoReply 32 705 706 typedef struct { 707 CARD8 reqType; 708 CARD8 randrReqType; 709 CARD16 length; 710 RRProvider provider; 711 RRProvider source_provider; 712 Time configTimestamp; 713 } xRRSetProviderOutputSourceReq; 714 #define sz_xRRSetProviderOutputSourceReq 16 715 716 typedef struct { 717 CARD8 reqType; 718 CARD8 randrReqType; 719 CARD16 length; 720 RRProvider provider; 721 RRProvider sink_provider; 722 Time configTimestamp; 723 } xRRSetProviderOffloadSinkReq; 724 #define sz_xRRSetProviderOffloadSinkReq 16 725 726 typedef struct { 727 CARD8 reqType; 728 CARD8 randrReqType; 729 CARD16 length; 730 RRProvider provider; 731 } xRRListProviderPropertiesReq; 732 #define sz_xRRListProviderPropertiesReq 8 733 734 typedef struct { 735 BYTE type; 736 CARD8 pad0; 737 CARD16 sequenceNumber; 738 CARD32 length; 739 CARD16 nAtoms; 740 CARD16 pad1; 741 CARD32 pad2; 742 CARD32 pad3; 743 CARD32 pad4; 744 CARD32 pad5; 745 CARD32 pad6; 746 } xRRListProviderPropertiesReply; 747 #define sz_xRRListProviderPropertiesReply 32 748 749 typedef struct { 750 CARD8 reqType; 751 CARD8 randrReqType; 752 CARD16 length; 753 RRProvider provider; 754 Atom property; 755 } xRRQueryProviderPropertyReq; 756 #define sz_xRRQueryProviderPropertyReq 12 757 758 typedef struct { 759 BYTE type; 760 BYTE pad0; 761 CARD16 sequenceNumber; 762 CARD32 length; 763 BOOL pending; 764 BOOL range; 765 BOOL immutable; 766 BYTE pad1; 767 CARD32 pad2; 768 CARD32 pad3; 769 CARD32 pad4; 770 CARD32 pad5; 771 CARD32 pad6; 772 } xRRQueryProviderPropertyReply; 773 #define sz_xRRQueryProviderPropertyReply 32 774 775 typedef struct { 776 CARD8 reqType; 777 CARD8 randrReqType; 778 CARD16 length; 779 RRProvider provider; 780 Atom property; 781 BOOL pending; 782 BOOL range; 783 CARD16 pad; 784 } xRRConfigureProviderPropertyReq; 785 #define sz_xRRConfigureProviderPropertyReq 16 786 787 typedef struct { 788 CARD8 reqType; 789 CARD8 randrReqType; 790 CARD16 length; 791 RRProvider provider; 792 Atom property; 793 Atom type; 794 CARD8 format; 795 CARD8 mode; 796 CARD16 pad; 797 CARD32 nUnits; 798 } xRRChangeProviderPropertyReq; 799 #define sz_xRRChangeProviderPropertyReq 24 800 801 typedef struct { 802 CARD8 reqType; 803 CARD8 randrReqType; 804 CARD16 length; 805 RRProvider provider; 806 Atom property; 807 } xRRDeleteProviderPropertyReq; 808 #define sz_xRRDeleteProviderPropertyReq 12 809 810 typedef struct { 811 CARD8 reqType; 812 CARD8 randrReqType; 813 CARD16 length; 814 RRProvider provider; 815 Atom property; 816 Atom type; 817 CARD32 longOffset; 818 CARD32 longLength; 819 #ifdef __cplusplus 820 BOOL _delete; 821 #else 822 BOOL delete; 823 #endif 824 BOOL pending; 825 CARD16 pad1; 826 } xRRGetProviderPropertyReq; 827 #define sz_xRRGetProviderPropertyReq 28 828 829 typedef struct { 830 BYTE type; 831 CARD8 format; 832 CARD16 sequenceNumber; 833 CARD32 length; 834 Atom propertyType; 835 CARD32 bytesAfter; 836 CARD32 nItems; 837 CARD32 pad1; 838 CARD32 pad2; 839 CARD32 pad3; 840 } xRRGetProviderPropertyReply; 841 #define sz_xRRGetProviderPropertyReply 32 842 843 /* 844 * Additions for V1.6 845 */ 846 847 typedef struct { 848 CARD8 reqType; 849 CARD8 randrReqType; 850 CARD16 length; 851 Window window; 852 RRLease lid; 853 CARD16 nCrtcs; 854 CARD16 nOutputs; 855 } xRRCreateLeaseReq; 856 #define sz_xRRCreateLeaseReq 16 857 858 typedef struct { 859 BYTE type; 860 CARD8 nfd; 861 CARD16 sequenceNumber; 862 CARD32 length; 863 CARD32 pad2; 864 CARD32 pad3; 865 CARD32 pad4; 866 CARD32 pad5; 867 CARD32 pad6; 868 CARD32 pad7; 869 } xRRCreateLeaseReply; 870 #define sz_xRRCreateLeaseReply 32 871 872 typedef struct { 873 CARD8 reqType; 874 CARD8 randrReqType; 875 CARD16 length; 876 RRLease lid; 877 BYTE terminate; 878 CARD8 pad1; 879 CARD16 pad2; 880 } xRRFreeLeaseReq; 881 #define sz_xRRFreeLeaseReq 12 882 883 /* 884 * event 885 */ 886 typedef struct { 887 CARD8 type; /* always evBase + ScreenChangeNotify */ 888 CARD8 rotation; /* new rotation */ 889 CARD16 sequenceNumber; 890 Time timestamp; /* time screen was changed */ 891 Time configTimestamp; /* time config data was changed */ 892 Window root; /* root window */ 893 Window window; /* window requesting notification */ 894 SizeID sizeID; /* new size ID */ 895 CARD16 subpixelOrder; /* subpixel order */ 896 CARD16 widthInPixels; /* new size */ 897 CARD16 heightInPixels; 898 CARD16 widthInMillimeters; 899 CARD16 heightInMillimeters; 900 } xRRScreenChangeNotifyEvent; 901 #define sz_xRRScreenChangeNotifyEvent 32 902 903 typedef struct { 904 CARD8 type; /* always evBase + RRNotify */ 905 CARD8 subCode; /* RRNotify_CrtcChange */ 906 CARD16 sequenceNumber; 907 Time timestamp; /* time crtc was changed */ 908 Window window; /* window requesting notification */ 909 RRCrtc crtc; /* affected CRTC */ 910 RRMode mode; /* current mode */ 911 CARD16 rotation; /* rotation and reflection */ 912 CARD16 pad1; /* unused */ 913 INT16 x; /* new location */ 914 INT16 y; 915 CARD16 width; /* new size */ 916 CARD16 height; 917 } xRRCrtcChangeNotifyEvent; 918 #define sz_xRRCrtcChangeNotifyEvent 32 919 920 typedef struct { 921 CARD8 type; /* always evBase + RRNotify */ 922 CARD8 subCode; /* RRNotify_OutputChange */ 923 CARD16 sequenceNumber; 924 Time timestamp; /* time output was changed */ 925 Time configTimestamp; /* time config was changed */ 926 Window window; /* window requesting notification */ 927 RROutput output; /* affected output */ 928 RRCrtc crtc; /* current crtc */ 929 RRMode mode; /* current mode */ 930 CARD16 rotation; /* rotation and reflection */ 931 CARD8 connection; /* connection status */ 932 CARD8 subpixelOrder; /* subpixel order */ 933 } xRROutputChangeNotifyEvent; 934 #define sz_xRROutputChangeNotifyEvent 32 935 936 typedef struct { 937 CARD8 type; /* always evBase + RRNotify */ 938 CARD8 subCode; /* RRNotify_OutputProperty */ 939 CARD16 sequenceNumber; 940 Window window; /* window requesting notification */ 941 RROutput output; /* affected output */ 942 Atom atom; /* property name */ 943 Time timestamp; /* time crtc was changed */ 944 CARD8 state; /* NewValue or Deleted */ 945 CARD8 pad1; 946 CARD16 pad2; 947 CARD32 pad3; 948 CARD32 pad4; 949 } xRROutputPropertyNotifyEvent; 950 #define sz_xRROutputPropertyNotifyEvent 32 951 952 typedef struct { 953 CARD8 type; /* always evBase + RRNotify */ 954 CARD8 subCode; /* RRNotify_ProviderChange */ 955 CARD16 sequenceNumber; 956 Time timestamp; /* time provider was changed */ 957 Window window; /* window requesting notification */ 958 RRProvider provider; /* affected provider */ 959 CARD32 pad1; 960 CARD32 pad2; 961 CARD32 pad3; 962 CARD32 pad4; 963 } xRRProviderChangeNotifyEvent; 964 #define sz_xRRProviderChangeNotifyEvent 32 965 966 typedef struct { 967 CARD8 type; /* always evBase + RRNotify */ 968 CARD8 subCode; /* RRNotify_ProviderProperty */ 969 CARD16 sequenceNumber; 970 Window window; /* window requesting notification */ 971 RRProvider provider; /* affected provider */ 972 Atom atom; /* property name */ 973 Time timestamp; /* time provider was changed */ 974 CARD8 state; /* NewValue or Deleted */ 975 CARD8 pad1; 976 CARD16 pad2; 977 CARD32 pad3; 978 CARD32 pad4; 979 } xRRProviderPropertyNotifyEvent; 980 #define sz_xRRProviderPropertyNotifyEvent 32 981 982 typedef struct { 983 CARD8 type; /* always evBase + RRNotify */ 984 CARD8 subCode; /* RRNotify_ResourceChange */ 985 CARD16 sequenceNumber; 986 Time timestamp; /* time resource was changed */ 987 Window window; /* window requesting notification */ 988 CARD32 pad1; 989 CARD32 pad2; 990 CARD32 pad3; 991 CARD32 pad4; 992 CARD32 pad5; 993 } xRRResourceChangeNotifyEvent; 994 #define sz_xRRResourceChangeNotifyEvent 32 995 996 typedef struct { 997 CARD8 type; /* always evBase + RRNotify */ 998 CARD8 subCode; /* RRNotify_Lease */ 999 CARD16 sequenceNumber; 1000 Time timestamp; /* time resource was changed */ 1001 Window window; /* window requesting notification */ 1002 RRLease lease; 1003 CARD8 created; /* created/deleted */ 1004 CARD8 pad0; 1005 CARD16 pad1; 1006 CARD32 pad2; 1007 CARD32 pad3; 1008 CARD32 pad4; 1009 } xRRLeaseNotifyEvent; 1010 #define sz_xRRLeaseNotifyEvent 32 1011 1012 typedef struct { 1013 CARD8 reqType; 1014 CARD8 randrReqType; 1015 CARD16 length; 1016 RRCrtc crtc; 1017 } xRRGetPanningReq; 1018 #define sz_xRRGetPanningReq 8 1019 1020 typedef struct { 1021 BYTE type; 1022 CARD8 status; 1023 CARD16 sequenceNumber; 1024 CARD32 length; 1025 Time timestamp; 1026 CARD16 left; 1027 CARD16 top; 1028 CARD16 width; 1029 CARD16 height; 1030 CARD16 track_left; 1031 CARD16 track_top; 1032 CARD16 track_width; 1033 CARD16 track_height; 1034 INT16 border_left; 1035 INT16 border_top; 1036 INT16 border_right; 1037 INT16 border_bottom; 1038 } xRRGetPanningReply; 1039 #define sz_xRRGetPanningReply 36 1040 1041 typedef struct { 1042 CARD8 reqType; 1043 CARD8 randrReqType; 1044 CARD16 length; 1045 RRCrtc crtc; 1046 Time timestamp; 1047 CARD16 left; 1048 CARD16 top; 1049 CARD16 width; 1050 CARD16 height; 1051 CARD16 track_left; 1052 CARD16 track_top; 1053 CARD16 track_width; 1054 CARD16 track_height; 1055 INT16 border_left; 1056 INT16 border_top; 1057 INT16 border_right; 1058 INT16 border_bottom; 1059 } xRRSetPanningReq; 1060 #define sz_xRRSetPanningReq 36 1061 1062 typedef struct { 1063 BYTE type; 1064 CARD8 status; 1065 CARD16 sequenceNumber; 1066 CARD32 length; 1067 Time newTimestamp; 1068 CARD32 pad1; 1069 CARD32 pad2; 1070 CARD32 pad3; 1071 CARD32 pad4; 1072 CARD32 pad5; 1073 } xRRSetPanningReply; 1074 #define sz_xRRSetPanningReply 32 1075 1076 typedef struct { 1077 Atom name; 1078 BOOL primary; 1079 BOOL automatic; 1080 CARD16 noutput; 1081 INT16 x; 1082 INT16 y; 1083 CARD16 width; 1084 CARD16 height; 1085 CARD32 widthInMillimeters; 1086 CARD32 heightInMillimeters; 1087 } xRRMonitorInfo; 1088 #define sz_xRRMonitorInfo 24 1089 1090 typedef struct { 1091 CARD8 reqType; 1092 CARD8 randrReqType; 1093 CARD16 length; 1094 Window window; 1095 BOOL get_active; 1096 CARD8 pad; 1097 CARD16 pad2; 1098 } xRRGetMonitorsReq; 1099 #define sz_xRRGetMonitorsReq 12 1100 1101 typedef struct { 1102 BYTE type; 1103 CARD8 status; 1104 CARD16 sequenceNumber; 1105 CARD32 length; 1106 Time timestamp; 1107 CARD32 nmonitors; 1108 CARD32 noutputs; 1109 CARD32 pad1; 1110 CARD32 pad2; 1111 CARD32 pad3; 1112 } xRRGetMonitorsReply; 1113 #define sz_xRRGetMonitorsReply 32 1114 1115 typedef struct { 1116 CARD8 reqType; 1117 CARD8 randrReqType; 1118 CARD16 length; 1119 Window window; 1120 xRRMonitorInfo monitor; 1121 } xRRSetMonitorReq; 1122 #define sz_xRRSetMonitorReq 32 1123 1124 typedef struct { 1125 CARD8 reqType; 1126 CARD8 randrReqType; 1127 CARD16 length; 1128 Window window; 1129 Atom name; 1130 } xRRDeleteMonitorReq; 1131 #define sz_xRRDeleteMonitorReq 12 1132 1133 #undef RRLease 1134 #undef RRModeFlags 1135 #undef RRCrtc 1136 #undef RRMode 1137 #undef RROutput 1138 #undef RRMode 1139 #undef RRCrtc 1140 #undef RRProvider 1141 #undef Drawable 1142 #undef Window 1143 #undef Font 1144 #undef Pixmap 1145 #undef Cursor 1146 #undef Colormap 1147 #undef GContext 1148 #undef Atom 1149 #undef Time 1150 #undef KeyCode 1151 #undef KeySym 1152 #undef Rotation 1153 #undef SizeID 1154 #undef SubpixelOrder 1155 1156 #endif /* _XRANDRP_H_ */ 1157