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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674
|
# This file is part of "xtrace"
# Copyright (C) 2006 Bernhard R. Link
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# This file is based on /usr/include/X11/extensions/randr{,proto}.h which state:
## Copyright 2000 Compaq Computer Corporation
## Copyright 2002 Hewlett-Packard Company
## and
## Copyright 2000, Compaq Computer Corporation,
## Copyright 2002, Hewlett Packard, Inc.
##
## Permission to use, copy, modify, distribute, and sell this software and its
## documentation for any purpose is hereby granted without fee, provided that
## the above copyright notice appear in all copies and that both that
## copyright notice and this permission notice appear in supporting
## documentation, and that the name of Compaq or HP not be used in advertising
## or publicity pertaining to distribution of the software without specific,
## written prior permission. Compaq and HP makes no representations about the
## suitability of this software for any purpose. It is provided "as is"
## without express or implied warranty.
##
## HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
## BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
## OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
## CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
##
## Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
##
# modified for Xrandr1.2 using /usr/share/doc/x11proto-randr-dev/randrproto.txt.gz:
## The X Resize, Rotate and Reflect Extension
## Version 1.2
## 2006-4-13
##
## Jim Gettys
## Jim.Gettys@hp.com
## Cambridge Research Laboratory
## HP Labs
## Hewlett Packard Company
##
## Keith Packard
## keith.packard@intel.com
## Open Source Technology Center
## Intel Corporation
##
# from x11proto-randr-dev which states:
## Copyright 2000 Compaq Computer Corporation
## Copyright 2002 Hewlett-Packard Company
## Copyright 2006 Intel Corporation
##
## Permission to use, copy, modify, distribute, and sell this software and its
## documentation for any purpose is hereby granted without fee, provided that
## the above copyright notice appear in all copies and that both that copyright
## notice and this permission notice appear in supporting documentation, and
## that the name of the copyright holders not be used in advertising or
## publicity pertaining to distribution of the software without specific,
## written prior permission. The copyright holders make no representations
## about the suitability of this software for any purpose. It is provided "as
## is" without express or implied warranty.
##
## THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
## EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
## DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
## TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
## OF THIS SOFTWARE.
EXTENSION "RANDR" RandR
USE core
REQUESTS
QueryVersion RESPONDS
RandrOldGetScreenInfo UNSUPPORTED
SetScreenConfig RESPONDS
RandrOldScreenChangeSelectInput UNSUPPORTED
SelectInput
GetScreenInfo RESPONDS
# RandR 1.2:
GetScreenSizeRange RESPONDS
SetScreenSize
GetScreenResources RESPONDS
GetOutputInfo RESPONDS
ListOutputProperties RESPONDS
QueryOutputProperty RESPONDS
ConfigureOutputProperty
ChangeOutputProperty
DeleteOutputProperty
GetOutputProperty RESPONDS
CreateMode RESPONDS
DestroyMode
AddOutputMode
DeleteOutputMode
GetCrtcInfo RESPONDS
SetCrtcConfig RESPONDS
GetCrtcGammaSize RESPONDS
GetCrtcGamma RESPONDS
SetCrtcGamma
# RandR 1.3:
GetScreenResourcesCurrent RESPONDS
SetCrtcTransform
GetCrtcTransform RESPONDS
GetPanning RESPONDS
SetPanning RESPONDS
SetOutputPrimary
GetOutputPrimary RESPONDS
# RandR 1.4:
GetProviders RESPONDS UNSUPPORTED
GetProviderInfo RESPONDS UNSUPPORTED
SetProviderOffloadSink
SetProviderOutputSource
ListProviderProperties RESPONDS UNSUPPORTED
QueryProviderProperty RESPONDS UNSUPPORTED
ConfigureProviderProperty UNSUPPORTED
ChangeProviderProperty UNSUPPORTED
DeleteProviderProperty
GetProviderProperty RESPONDS UNSUPPORTED
# RandR 1.5:
GetMonitors RESPONDS UNSUPPORTED
SetMonitor UNSUPPORTED
DeleteMonitor
END
EVENTS
RRScreenChangeNotify
RRNotify
END
ERRORS
BadOutput
BadCrtc
BadMode
BadProvider
END
CONSTANTS randr_notify
0 ScreenChangeNotify
END
TYPE RANDR_NOTIFY ENUM8 randr_notify
BITMASK randr_notify_mask
1<<0 ScreenChangeNotifyMask
1<<2 OutputChangeNotifyMask
1<<3 OutputPropertyNotifyMask
END
TYPE RANDR_NOTIFY_MASK BITMASK8 randr_notify_mask
BITMASK randr_rr
1 Rotate_0
2 Rotate_90
4 Rotate_180
8 Rotate_270
16 Reflect_X
32 Reflect_Y
END
TYPE RANDR_RR BITMASK16 randr_rr
CONSTANTS subpixelorder
0 Unknown
1 HorizontalRGB
2 HorizontalBGR
3 VerticalRGB
4 VerticalBGR
5 None
END
TYPE SUBPIXELORDER CARD16 constants subpixelorder
CONSTANTS randr_status
0 Success
1 InvalidConfigTime
2 InvalidTime
3 Failed
END
TYPE RRCONFIGSTATUS ENUM8 randr_status
CONSTANTS appropriate
0 appropriate
END
CONSTANTS randr_connection
0 Connected
1 Disconnected
2 UnknownConnection
END
TYPE CONNECTION CARD8 constants randr_connection
BITMASK randr_modeflags
0x00000001 HSyncPositive
0x00000002 HSyncNegative
0x00000004 VSyncPositive
0x00000008 VSyncNegative
0x00000010 Interlace
0x00000020 DoubleScan
0x00000040 CSync
0x00000080 CSyncPositive
0x00000100 CSyncNegative
0x00000200 HSkewPresent
0x00000400 BCast
0x00000800 PixelMultiplex
0x00001000 DoubleClock
0x00002000 ClockDivideBy2
END
TYPE SETofMODEFLAG BITMASK32 randr_modeflags
CONSTANTS randr_changemode
0 Replace
1 Prepend
2 Append
END
CONSTANTS randr_changenotifystate
0 NewValue
1 Deleted
END
TYPE OUTPUT CARD32
TYPE LISTofOUTPUT LISTofCARD32
TYPE CRTC CARD32
TYPE LISTofCRTC LISTofCARD32
TYPE MODE CARD32
TYPE LISTofMODE LISTofCARD32
TYPE PROVIDER CARD32
STRUCT MODEINFO length 32
0 id CARD32
4 width[pixels] UINT16
6 height[pixels] UINT16
8 dot_clock UINT32
12 h_sync_start UINT16
14 h_sync_end UINT16
16 h_total UINT16
18 h_skew UINT16
20 v_sync_start UINT16
22 v_sync_end UINT16
24 v_total UINT16
26 name_length UINT16
28 mode_flags SETofMODEFLAG
END
STRUCT TRANSFORM length 36
0 matrix LISTofFIXED
END
REQUEST QueryVersion
4 major-version UINT32
8 minor-version UINT32
END
RESPONSE QueryVersion
8 major-version UINT32
12 minor-version UINT32
END
REQUEST GetScreenInfo
4 window WINDOW
END
STRUCT ScreenSizes length 8
0 width[pixels] UINT16
2 height[pixels] UINT16
4 width[mm] UINT16
6 height[mm] UINT16
END
LIST Rates variable min-length 2
0 count COUNT16
2 r LISTofUINT16
END
RESPONSE GetScreenInfo
1 rotations RANDR_RR
8 root WINDOW
12 timestamp TIMESTAMP
16 config-timestamp TIMESTAMP
20 nSizes COUNT16
22 sizeID CARD16
24 rotation RANDR_RR
32 sizes LISTofScreenSizes
26 rate UINT16
28 nrateEnts COUNT16
LATER rates LISTofRates
END
REQUEST SetScreenConfig
4 window CARD32
8 timestamp TIMESTAMP constants curtime
12 config-timestamp TIMESTAMP
16 "sizei index" CARD16
18 "rotation" RANDR_RR
20 rate UINT16 constants appropriate
END
RESPONSE SetScreenConfig
1 status RRCONFIGSTATUS
8 timestamp TIMESTAMP
12 config-timestamp TIMESTAMP
16 root WINDOW
20 subpixelOrder SUBPIXELORDER
END
REQUEST SelectInput
4 window WINDOW
8 enable RANDR_NOTIFY_MASK
END
REQUEST GetScreenSizeRange
4 window WINDOW
END
RESPONSE GetScreenSizeRange
8 minWidth UINT16
10 minHeight UINT16
12 maxWidth UINT16
14 maxHeight UINT16
END
REQUEST SetScreenSize
4 window WINDOW
8 width UINT16
10 height UINT16
12 width[mm] UINT32
16 height[mm] UINT32
END
REQUEST GetScreenResources
4 window WINDOW
END
RESPONSE GetScreenResources
8 timestamp TIMESTAMP
12 config-timestamp TIMESTAMP
16 "#CRTCs" COUNT16
32 crtcs LISTofCRTC
18 "#outputs" COUNT16
LATER outputs LISTofOUTPUT
20 "#modeinfos" COUNT16
LATER modeinfos LISTofMODEINFO
22 "total bytes in mode names" COUNT16
# a way to seperate them would be nice:
LATER "mode names" STRING8
END
REQUEST GetScreenResourcesCurrent ALIASES GetScreenResources
RESPONSE GetScreenResourcesCurrent ALIASES GetScreenResources
REQUEST GetOutputInfo
4 output OUTPUT
8 config-timestamp TIMESTAMP
END
RESPONSE GetOutputInfo
8 timestamp TIMESTAMP
12 "current connected crtc" CRTC
16 width[mm] UINT32
20 height[mm] UINT32
24 connection CONNECTION
25 subpixel-order SUBPIXELORDER
26 "#CRTCs" COUNT16
36 crtcs LISTofCRTC
28 "#modes" COUNT16
LATER modes LISTofMODE
30 "preferred modes" UINT16
32 clonecount COUNT16
LATER clones LISTofOUTPUT
34 "length of name" COUNT16
LATER name STRING8
END
REQUEST ListOutputProperties
4 output OUTPUT
END
RESPONSE ListOutputProperties
8 "#atoms" COUNT16
32 atoms LISTofATOM
END
REQUEST QueryOutputProperty
4 output OUTPUT
8 property ATOM
END
RESPONSE QueryOutputProperty
8 pending BOOL
9 range BOOL
10 immutable BOOL
32 "valid values" LISTofUINT32
END
REQUEST ConfigureOutputProperty
4 output OUTPUT
8 property ATOM
12 pending BOOL
13 range BOOL
16 "valid values" LISTofUINT32
END
REQUEST ChangeOutputProperty
4 output OUTPUT
8 property ATOM
12 type ATOM
16 format FORMAT8
17 mode ENUM8 randr_changemode
20 length COUNT32
24 data LISTofFormat
END
REQUEST DeleteOutputProperty
4 output OUTPUT
8 property ATOM
END
REQUEST GetOutputProperty
4 output OUTPUT
8 property ATOM
12 type ATOM constants any
16 offset CARD32
20 length CARD32
24 delete BOOL
25 pending BOOL
END
RESPONSE GetOutputProperty
1 format FORMAT8
8 type ATOM constants none
12 bytes-after CARD32
16 length COUNT32
32 value LISTofFormat
END
REQUEST CreateMode
4 window WINDOW
8 mode MODEINFO
40 "mode name" STRING8
END
RESPONSE CreateMode
8 mode MODE
END
REQUEST DestroyMode
4 mode MODE
END
REQUEST AddOutputMode
4 output OUTPUT
8 mode MODE
END
REQUEST DeleteOutputMode ALIASES AddOutputMode
REQUEST GetCrtcInfo
4 crtc CRTC
8 config-timestamp TIMESTAMP
END
RESPONSE GetCrtcInfo
1 status RRCONFIGSTATUS
8 timestamp TIMESTAMP
12 x INT16
14 y INT16
16 width UINT16
18 height UINT16
20 mode MODE
24 "current rr" RANDR_RR
26 "possible rr" RANDR_RR
28 "#outputs" COUNT16
32 outputs LISTofOUTPUT
30 "#possible outputs" COUNT16
LATER "possible outputs" LISTofOUTPUT
END
REQUEST SetCrtcConfig
4 crtc CRTC
8 timestamp TIMESTAMP
12 "config timestamp" TIMESTAMP
16 x INT16
18 y INT16
20 mode MODE
24 rr RANDR_RR
28 outputs LISTofOUTPUT
END
RESPONSE SetCrtcConfig
1 status RRCONFIGSTATUS
END
REQUEST GetCrtcGammaSize
4 crtc CRTC
END
RESPONSE GetCrtcGammaSize
8 size CARD16
END
REQUEST GetCrtcGamma ALIASES GetCrtcGammaSize
RESPONSE GetCrtcGamma
8 size COUNT16
# is this really 22??
22 red LISTofCARD16
8 size COUNT16
LATER green LISTofCARD16
8 size COUNT16
LATER blue LISTofCARD16
END
REQUEST SetCrtcGamma
4 crtc CRTC
8 size COUNT16
12 red LISTofCARD16
8 size COUNT16
LATER green LISTofCARD16
8 size COUNT16
LATER blue LISTofCARD16
END
REQUEST SetCrtcTransform
4 crtc CRTC
8 transform TRANSFORM
44 "filter length" COUNT16
48 "filter name" STRING8
ROUND
RESET_COUNTER
LATER "filter params" LISTofFIXED
END
REQUEST GetCrtcTransform
4 crtc CRTC
END
RESPONSE GetCrtcTransform
8 "pending transform" TRANSFORM
44 "has transforms" BOOL
48 "current transform" TRANSFORM
88 "pending filter name length" COUNT16
96 "pending filter name" STRING8
ROUND
90 "pending filter num params" COUNT16
LATER "pending filter params" LISTofFIXED
92 "current filter name length" COUNT16
LATER "current filter name" STRING8
ROUND
94 "current filter num params" COUNT16
LATER "current filter params" LISTofFIXED
END
REQUEST GetPanning
4 crtc CRTC
END
RESPONSE GetPanning
1 status RRCONFIGSTATUS
8 timestamp TIMESTAMP
12 left UINT16
14 top UINT16
16 width UINT16
18 height UINT16
20 track_left UINT16
22 track_top UINT16
24 track_width UINT16
26 track_height UINT16
28 border_left INT16
30 border_top INT16
32 border_right INT16
34 border_bottom INT16
END
REQUEST SetPanning
4 crtc CRTC
8 timestamp TIMESTAMP
12 left UINT16
14 top UINT16
16 width UINT16
18 height UINT16
20 track_left UINT16
22 track_top UINT16
24 track_width UINT16
26 track_height UINT16
28 border_left INT16
30 border_top INT16
32 border_right INT16
34 border_bottom INT16
END
RESPONSE SetPanning
1 status RRCONFIGSTATUS
8 timestamp TIMESTAMP
END
REQUEST SetOutputPrimary
4 window WINDOW
8 output OUTPUT
END
REQUEST GetOutputPrimary
4 window WINDOW
END
RESPONSE GetOutputPrimary
8 output OUTPUT
END
REQUEST SetProviderOffloadSink
4 provider PROVIDER
8 sinkProvider PROVIDER
12 configTimestamp TIMESTAMP
END
REQUEST SetProviderOutputSource
4 provider PROVIDER
8 sourceProvider PROVIDER
12 configTimestamp TIMESTAMP
END
REQUEST DeleteProviderProperty
4 provider PROVIDER
8 property ATOM
END
REQUEST DeleteMonitor
4 window WINDOW
8 name ATOM
END
EVENT RRScreenChangeNotify
1 rotation RANDR_RR
4 timestamp TIMESTAMP
8 configTimestamp TIMESTAMP
12 root WINDOW
16 window WINDOW
20 size-id CARD16
22 subpixelOrder SUBPIXELORDER
24 width[pixels] UINT16
26 height[pixels] UINT16
28 width[mm] UINT16
30 height[mm] UINT16
END
CONSTANTS RRNotify_kind
0 CrtcChange
1 OutputChange
2 OutputProperty
END
EVENT RRNotify
1 kind ENUM8 RRNotify_kind
IF 1 CARD8 0
4 timestamp TIMESTAMP
8 "request window" WINDOW
12 "crtc affected" CRTC
16 "mode in use" MODE
20 "new rr" RANDR_RR
24 x INT16
26 y INT16
28 width UINT16
30 height UINT16
ELSEIF 1 CARD8 1
4 timestamp TIMESTAMP
8 "config timestamp" TIMESTAMP
12 "request window" WINDOW
16 "output affected" OUTPUT
20 "crtc in use" CRTC
24 "mode in use" MODE
28 rr RANDR_RR
30 "connection status" CONNECTION
31 "subpixel order" SUBPIXELORDER
ELSEIF 1 CARD8 2
4 window WINDOW
8 output OUTPUT
12 atom ATOM
16 time TIMESTAMP
20 state ENUM8 randr_changenotifystate
ELSE
4 unknown LISTofCARD8
END
EOF
|