proto/randrproto: Branch 'multi-monitor' - 6 commits
Keith Packard
keithp at kemper.freedesktop.org
Fri Sep 15 09:55:53 EEST 2006
.gitignore | 11
randr.h | 35 +
randrproto.h | 437 ++++++++++++++++++------
randrproto.txt | 1033 ++++++++++++++++++++++++++++++++++++++++-----------------
4 files changed, 1114 insertions(+), 402 deletions(-)
New commits:
diff-tree e9a5a489acd591ff53823b406dca13c622439c14 (from 81ecda4300e007d62b36942fd6ac56a3ee1a1fa0)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Thu Sep 14 23:53:04 2006 -0700
Update header files for new 1.2 spec. Fix missing bits in spec.
Spec was missing a few things in the encoding section.
diff --git a/randr.h b/randr.h
index 5975cdc..be00793 100644
--- a/randr.h
+++ b/randr.h
@@ -43,6 +43,7 @@ typedef unsigned short XRandrMonitor;
#define RRNumberErrors 0
#define RRNumberEvents 2
+#define RRNumberRequests 12
#define X_RRQueryVersion 0
/* we skip 1 to make old clients fail pretty immediately */
@@ -56,24 +57,39 @@ typedef unsigned short XRandrMonitor;
#define X_RRGetScreenInfo 5
/* V1.2 additions */
-#define X_RRGetScreenSizeRange 6
-#define X_RRSetScreenSize 7
-#define X_RRGetMonitorInfo 8
-#define X_RRAddMonitorMode 9
-#define X_RRDeleteMonitorMode 10
-#define X_RRSetMonitorConfig 11
+#define X_RRGetScreenSizeRange 6
+#define X_RRSetScreenSize 7
+#define X_RRGetScreenResources 8
+#define X_RRGetOutputInfo 9
+#define X_RRListOutputProperties 10
+#define X_RRChangeOutputProperty 11
+#define X_RRDeleteOutputProperty 12
+#define X_RRGetOutputProperty 13
+#define X_RRCreateMode 14
+#define X_RRDestroyMode 15
+#define X_RRAddOutputMode 16
+#define X_RRDeleteOutputMode 17
+#define X_RRGetCrtcInfo 18
+#define X_RRSetCrtcConfig 19
+#define X_RRGetCrtcGammaSize 20
+#define X_RRGetCrtcGamma 21
+#define X_RRSetCrtcGamma 22
/* Event selection bits */
#define RRScreenChangeNotifyMask (1L << 0)
/* V1.2 additions */
-#define RRMonitorChangeNotifyMask (1L << 1)
+#define RRCrtcChangeNotifyMask (1L << 1)
+#define RROutputChangeNotifyMask (1L << 2)
+#define RROutputPropertyNotifyMask (1L << 3)
/* Event codes */
#define RRScreenChangeNotify 0
/* V1.2 additions */
-#define RRNotify 1
+#define RRNotify 1
/* RRNotify Subcodes */
-#define RRNotify_MonitorChange 0
+#define RRNotify_CrtcChange 0
+#define RRNotify_OutputChange 1
+#define RRNotify_OutputProperty 2
/* used in the rotation field; rotation and reflection in 0.1 proto. */
#define RR_Rotate_0 1
@@ -92,7 +108,6 @@ typedef unsigned short XRandrMonitor;
#define RRSetConfigFailed 3
/* new in 1.2 protocol */
-#define RR_MonitorDisabled 0xffff
#define RR_HSyncPositive 0x00000001
#define RR_HSyncNegative 0x00000002
diff --git a/randrproto.h b/randrproto.h
index 015df9a..9249239 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -43,11 +43,14 @@
#define Time CARD32
#define KeyCode CARD8
#define KeySym CARD32
+#define RROutput CARD32
+#define RRMode CARD32
+#define RRCrtc CARD32
+#define RRModeFlags CARD32
#define Rotation CARD16
#define SizeID CARD16
#define SubpixelOrder CARD16
-#define ModeID CARD16
/*
* data structures
@@ -175,17 +178,35 @@ typedef struct {
* Additions for version 1.2
*/
+typedef struct _xRRModeInfo {
+ RRMode id B32;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD32 mmWidth B32;
+ CARD32 mmHeight B32;
+ CARD32 dotClock B32;
+ CARD16 hSyncStart B16;
+ CARD16 hSyncEnd B16;
+ CARD16 hTotal B16;
+ CARD16 hSkew B16;
+ CARD16 vSyncStart B16;
+ CARD16 vSyncEnd B16;
+ CARD16 vTotal B16;
+ CARD16 nameLength B32;
+ RRModeFlags modeFlags B32;
+} xRRModeInfo;
+
typedef struct {
CARD8 reqType;
CARD8 randrReqType;
CARD16 length B16;
- Window window B32;
+ Window window B32;
} xRRGetScreenSizeRangeReq;
#define sz_xRRGetScreenSizeRangeReq 8
typedef struct {
BYTE type; /* X_Reply */
- CARD8 status;
+ CARD8 pad;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 minWidth B16;
@@ -216,108 +237,291 @@ typedef struct {
CARD8 randrReqType;
CARD16 length B16;
Window window B32;
-} xRRGetMonitorModesReq;
-
-typedef struct {
- BYTE type; /* X_Reply */
- CARD8 status;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- Window root B32;
- CARD16 i B16;
- CARD16 m B16;
- CARD16 b B16;
- CARD16 pad0 B16;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
- CARD32 pad3 B32;
-} xRRGetMonitorModesReply;
-#define sz_xRRGetMonitorModesReply 32
+} xRRGetScreenResourcesReq;
+#define sz_xRRGetScreenResourcesReq 8
typedef struct {
+ BYTE type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
Time timestamp B32;
Time configTimestamp B32;
- INT16 x B16;
- INT16 y B16;
- Rotation rotation B16;
- ModeID mode B16;
- ModeID defaultMode B16;
- Rotation rotations B16;
- CARD16 firstMode B16;
- CARD16 numModes B16;
-} xRRMonitorInfo;
-#define sz_xRRMonitorInfo 24
+ CARD16 nCrtcs B16;
+ CARD16 nOutputs B16;
+ CARD16 nModes B16;
+ CARD16 nbytesNames B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xRRGetScreenResourcesReply;
+#define sz_xRRGetScreenResourcesReply 32
typedef struct {
- CARD16 width B16;
- CARD16 height B16;
- CARD32 widthInMillimeters B32;
- CARD32 heightInMillimeters B32;
- CARD32 dotClock B32;
- CARD16 hSyncStart B16;
- CARD16 hSyncEnd B16;
- CARD16 hTotal B16;
- CARD16 hSkew B16;
- CARD16 vSyncStart B16;
- CARD16 vSyncEnd B16;
- CARD16 vTotal B16;
- CARD16 nameLength B16;
- CARD32 modeFlags B32;
-} xRRMonitorMode;
-#define sz_xRRMonitorMode 36
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Time configTimestamp B32;
+} xRRGetOutputInfoReq;
+#define sz_xRRGetOutputInfoReq 12
typedef struct {
- CARD8 reqType;
- CARD8 randrReqType;
- CARD16 length B16;
- Window window B32;
- CARD16 monitorIndex B16;
- CARD16 pad B16;
- xRRMonitorMode mode;
-} xRRAddMonitorModeReq;
-#define sz_xRRAddMonitorModeReq 48
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ RRCrtc crtc B32;
+ CARD8 connection;
+ CARD8 subpixelOrder;
+ CARD16 nCrtcs B16;
+ CARD16 nModes B16;
+ CARD16 nClones B16;
+ CARD16 nameLength B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+} xRRGetOutputInfoReply;
+#define sz_xRRGetOutputInfoReply 32
typedef struct {
- CARD8 reqType;
- CARD8 randrReqType;
- CARD16 length B16;
- Window window B32;
- CARD16 monitorIndex B16;
- CARD16 nameLength B16;
-} xRRDeleteMonitorModeReq;
-#define sz_xRRDeleteMonitorModeReq 12
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+} xRRListOutputPropertiesReq;
+#define sz_xRRListOutputPropertiesReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 nAtoms B16;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRListOutputPropertiesReply;
+#define sz_xRRListOutputPropertiesReply 32
typedef struct {
- CARD8 reqType;
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+ Atom type B32;
+ CARD8 format;
+ CARD8 mode;
+ CARD16 pad;
+ CARD32 nUnits B32;
+} xRRChangeOutputPropertyReq;
+#define sz_xRRChangeOutputPropertyReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+} xDeleteOutputPropertyReq;
+#define sz_xDeleteOutputPropertyReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ Atom property B32;
+ Atom type B32;
+ CARD32 longOffset B32;
+ CARD32 longLength B32;
+ BOOL delete;
+ CARD8 pad1;
+ CARD16 pad2;
+} xGetOutputPropertyReq;
+#define sz_xGetOutputPropertyReq 28
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom propertyType B32;
+ CARD32 bytesAfter B32;
+ CARD32 nItems B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+} xGetOutputPropertyReply;
+#define sz_xGetOutputPropertyReply 32
+
+typedef struct {
+ CARD8 reqType;
CARD8 randrReqType;
CARD16 length B16;
Window window B32;
- Time timestamp B32;
+ xRRModeInfo modeInfo;
+} xRRCreateModeReq;
+#define sz_xRRCreateModeReq 48
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RRMode mode B32;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xRRCreateModeReply;
+#define sz_xRRCreateModeReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRMode mode B32;
+} xRRDestroyModeReq;
+#define sz_xRRDestroyModeReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ RRMode mode B32;
+} xRRAddOutputModeReq;
+#define sz_xRRAddOutputModeReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RROutput output B32;
+ RRMode mode B32;
+} xRRDeleteOutputModeReq;
+#define sz_xRRDeleteOutputModeReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
Time configTimestamp B32;
- CARD16 monitorIndex B16;
+} xGetCrtcInfoReq;
+#define sz_xGetCrtcInfoReq 12
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
INT16 x B16;
INT16 y B16;
- ModeID mode B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ RRMode mode B32;
Rotation rotation B16;
- CARD16 pad B16;
-} xRRSetMonitorConfigReq;
-#define sz_xRRSetMonitorConfigReq 28
+ Rotation rotations B16;
+ CARD16 nOutput B16;
+ CARD16 nPossibleOutput B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+} xRRGetCrtcInfoReply;
+#define sz_xRRGetCrtcInfoReply 32
typedef struct {
- BYTE type; /* X_Reply */
- CARD8 status;
- CARD16 sequenceNumber B16;
- CARD32 length B32;
- Time timestamp B32;
- Time configTimestamp B32;
- Window root B32;
- SubpixelOrder subpixelOrder B16;
- CARD16 monitor B16;
- CARD32 pad1 B32;
- CARD32 pad2 B32;
-} xRRSetMonitorConfigReply;
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ Time timestamp B32;
+ Time configTimestamp B32;
+ INT16 x B16;
+ INT16 y B16;
+ RRMode mode B32;
+ Rotation rotation B16;
+ CARD16 nOutputs B16;
+} xRRSetCrtcConfigReq;
+#define sz_xRRSetCrtcConfigReq 28
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Time timestamp B32;
+ CARD8 subpixelOrder;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xRRSetCrtcConfigReply;
+#define sz_xRRSetCrtcConfigReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xGetCrtcGammaSizeReq;
+#define sz_xGetCrtcGammaSizeReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+ CARD16 pad2 B32;
+ CARD16 pad3 B32;
+ CARD16 pad4 B32;
+ CARD16 pad5 B32;
+ CARD16 pad6 B32;
+} xGetCrtcGammaSizeReply;
+#define sz_xGetCrtcGammaSizeReply 32
-#define sz_xRRSetMonitorConfigReply
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+} xGetCrtcGammaReq;
+#define sz_xGetCrtcGammaReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 status;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+ CARD16 pad2 B32;
+ CARD16 pad3 B32;
+ CARD16 pad4 B32;
+ CARD16 pad5 B32;
+ CARD16 pad6 B32;
+} xGetCrtcGammaReply;
+#define sz_xGetCrtcGammaReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRCrtc crtc B32;
+ CARD16 size B16;
+ CARD16 pad1 B16;
+} xRRSetCrtcGammaReq;
+#define sz_xRRSetCrtcGammaReq 12
/*
* event
@@ -326,8 +530,8 @@ typedef struct {
CARD8 type; /* always evBase + ScreenChangeNotify */
CARD8 rotation; /* new rotation */
CARD16 sequenceNumber B16;
- Time timestamp B32; /* time screen was changed */
- Time configTimestamp B32; /* time config data was changed */
+ Time timestamp B32; B32; /* time screen was changed */
+ Time configTimestamp B32; B32; /* time config data was changed */
Window root B32; /* root window */
Window window B32; /* window requesting notification */
SizeID sizeID B16; /* new size ID */
@@ -340,23 +544,58 @@ typedef struct {
#define sz_xRRScreenChangeNotifyEvent 32
typedef struct {
- CARD8 type; /* always evBase + RRNotify */
- CARD8 subCode; /* RRNotify_MonitorChange */
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_CrtcChange */
CARD16 sequenceNumber B16;
- Time timestamp B32; /* time screen was changed */
- Time configTimestamp B32; /* time config data was changed */
- Window root B32; /* root window */
+ Time timestamp B32; /* time crtc was changed */
Window window B32; /* window requesting notification */
- CARD16 monitor B16; /* monitor index */
- ModeID modeID B16; /* mode ID */
- Rotation rotation B16; /* rotation/reflection */
- SubpixelOrder subpixelOrder B16; /* new subpixel order */
- INT16 x B16; /* x */
- INT16 y B16; /* y */
-} xRRMonitorChangeNotifyEvent;
-#define sz_xRRMonitorChangeNotifyEvent 32
+ RRCrtc crtc B32; /* affected CRTC */
+ RRMode mode B32; /* current mode */
+ CARD16 rotation B16; /* rotation and reflection */
+ CARD16 pad1 B16; /* unused */
+ INT16 x B16; /* new location */
+ INT16 y B16;
+ CARD16 width B16; /* new size */
+ CARD16 height B16;
+} xRRCrtcChangeNotifyEvent;
+#define sz_xRRCrtcChangeNotifyEvent 32
-#undef Window
+typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_OutputChange */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32; /* time crtc was changed */
+ Time configTimestamp B32; /* time crtc was changed */
+ Window window B32; /* window requesting notification */
+ RROutput output B32; /* affected output */
+ RRCrtc crtc B32; /* current crtc */
+ RRMode mode B32; /* current mode */
+ CARD16 rotation B16; /* rotation and reflection */
+ CARD8 connection; /* connection status */
+ CARD8 subpixelOrder; /* subpixel order */
+} xRROutputChangeNotifyEvent;
+#define sz_xRROUtputChangeNotifyEvent 32
+
+typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_OutputProperty */
+ CARD16 sequenceNumber B16;
+ Window window B32; /* window requesting notification */
+ RROutput output B32; /* affected output */
+ Atom atom B32; /* property name */
+ Time timestamp B32; /* time crtc was changed */
+ CARD8 state; /* NewValue or Deleted */
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xRROutputPropertyNotifyEvent;
+#define sz_xRROUtputPropertyNotifyEvent 32
+
+
+#undef RROutput
+#undef RRMode
+#undef RRCrtc
#undef Window
#undef Font
#undef Pixmap
diff --git a/randrproto.txt b/randrproto.txt
index be6b5e2..a0fc39d 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -230,15 +230,20 @@ SUBPIXELORDER { SubPixelUnknown The sub
SCREENSIZE { widthInPixels, heightInPixels: CARD16
widthInMillimeters, heightInMillimeters: CARD16 }
-MODEFLAG { hsync_positive hsync_negative
- vsync_positive vsync_negative
- interlace double_scan
- csync csync_positive csync_negative
- hskew_present
- bcast
- pixel_multiplex
- double_clock
- clock_divide_by_2 }
+MODEFLAG { HSyncPositive
+ HSyncNegative
+ VSyncPositive
+ VSyncNegative
+ Interlace
+ DoubleScan
+ CSync
+ CSyncPositive
+ CSyncNegative
+ HSkewPresent
+ BCast
+ PixelMultiplex
+ DoubleClock
+ ClockDivideBy2 }
MODEINFO { id: MODE
name: STRING
@@ -1100,6 +1105,7 @@ A.1 Common Types
0x0001 ScreenChangeNotifyMask
0x0002 CrtcChangeNotifyMask Added in version 1.2
0x0004 OutputChangeNotifyMask Added in version 1.2
+ 0x0008 OutputPropertyNotifyMask Added in version 1.2
ââââ
Event select mask for RRSelectInput
@@ -1139,6 +1145,24 @@ A.1 Common Types
indicates that the timings are unknown or otherwise unused.
The name itself will be encoded separately in each usage.
+ââââ
+ MODEFLAG
+ 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
+ââââ
+
A.2 Protocol Requests
Opcodes 1 and 3 were used in the 0.0 protocols, and will return
@@ -1301,8 +1325,9 @@ A.2.1 Protocol Requests added with versi
1 SUBPIXELORDER subpixel-order
2 c number of CRTCs
2 m number of modes
+ 2 o number of clones
2 n length of name
- 8 unused
+ 6 unused
4c LISTofCRTC crtcs
4m LISTofMODE modes
n STRING8 name
@@ -1541,11 +1566,27 @@ A.3 Protocol Events
A.3.1 Protocol Events added with version 1.2
ââââ
- RROutputChangeNotify
+ RRCrtcChangeNotify
1 Base + 1 code
1 0 sub-code
2 CARD16 sequence number
4 TIMESTAMP timestamp
+ 4 WINDOW request window
+ 4 CRTC crtc affected
+ 4 MODE mode in use
+ 2 ROTATION new rotation and reflection
+ 2 unused
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ââââ
+ââââ
+ RROutputChangeNotify
+ 1 Base + 1 code
+ 1 1 sub-code
+ 2 CARD16 sequence number
+ 4 TIMESTAMP timestamp
4 TIMESTAMP configuration timestamp
4 WINDOW request window
4 OUTPUT output affected
@@ -1556,20 +1597,18 @@ A.3.1 Protocol Events added with version
1 SUBPIXELORDER subpixel order
ââââ
ââââ
- RRCrtcChangeNotify
- 1 Base + 2 code
- 1 1 sub-code
+ RROutputPropertyNotify
+ 1 Base + 1 code
+ 1 2 sub-code
2 CARD16 sequence number
- 4 TIMESTAMP timestamp
- 4 WINDOW request window
- 4 CRTC crtc affected
- 4 MODE mode in use
- 2 ROTATION new rotation and reflection
- 2 INT16 x
- 2 INT16 y
- 2 CARD16 width
- 2 CARD16 height
- 2 unused
+ 4 WINDOW window
+ 4 OUTPUT output
+ 4 ATOM atom
+ 4 TIMESTAMP time
+ 1 state
+ 0 NewValue
+ 1 Deleted
+ 11 unused
ââââ
Bibliography
diff-tree 81ecda4300e007d62b36942fd6ac56a3ee1a1fa0 (from 1cb8f4cda51fc256908a199c2599f46211c0cd52)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Sep 13 12:35:05 2006 -0700
Add .gitignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c0562cd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+*~
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.log
+config.status
+configure
+install-sh
+missing
+randrproto.pc
diff-tree 1cb8f4cda51fc256908a199c2599f46211c0cd52 (from b34676e8f709c4f8f6a2112c83103dfd0cabcbd7)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Sep 13 12:33:58 2006 -0700
Fix RandR opcodes
diff --git a/randrproto.txt b/randrproto.txt
index a87c011..be6b5e2 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1141,14 +1141,14 @@ A.1 Common Types
A.2 Protocol Requests
-Opcodes 0x1 and 0x3 were used in the 0.0 protocols, and will return
+Opcodes 1 and 3 were used in the 0.0 protocols, and will return
errors if used in version 1.0.
ââââ
RRQueryVersion
1 CARD8 major opcode
- 1 0x00 RandR opcode
+ 1 0 RandR opcode
2 3 length
4 CARD32 major version
4 CARD32 minor version
@@ -1164,7 +1164,7 @@ errors if used in version 1.0.
RRSetScreenConfig
1 CARD8 major opcode
- 1 0x02 RandR opcode
+ 1 2 RandR opcode
2 6 length
4 WINDOW window on screen to be configured
4 TIMESTAMP timestamp
@@ -1190,7 +1190,7 @@ errors if used in version 1.0.
RRSelectInput
1 CARD8 major opcode
- 1 0x04 RandR opcode
+ 1 4 RandR opcode
2 3 length
4 WINDOW window
2 SETofRRSELECTMASK enable
@@ -1200,7 +1200,7 @@ errors if used in version 1.0.
RRGetScreenInfo
1 CARD8 major opcode
- 1 0x05 RandR opcode
+ 1 5 RandR opcode
2 2 length
4 WINDOW window
â¶
@@ -1234,7 +1234,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetScreenSizeRange
1 CARD8 major opcode
- 1 0x06 RandR opcode
+ 1 6 RandR opcode
2 2 length
4 WINDOW window
â¶
@@ -1251,7 +1251,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRSetScreenSize
1 CARD8 major opcode
- 1 0x07 RandR opcode
+ 1 7 RandR opcode
2 5 length
4 WINDOW window
2 CARD16 width
@@ -1262,7 +1262,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetScreenResources
1 CARD8 major opcode
- 1 0x08 RandR opcode
+ 1 8 RandR opcode
2 2 length
4 WINDOW window
â¶
@@ -1286,7 +1286,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetOutputInfo
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 9 RandR opcode
2 3 length
4 OUTPUT output
4 TIMESTAMP config-timestamp
@@ -1311,7 +1311,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRListOutputProperties
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 10 RandR opcode
2 3 length
4 OUTPUT output
â¶
@@ -1326,7 +1326,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRChangeOutputProperty
1 CARD8 major opcode
- 1 RandR opcode
+ 1 11 RandR opcode
2 6+(n+p)/4 request length
4 OUTPUT output
4 ATOM property
@@ -1349,7 +1349,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRDeleteOutputProperty
1 CARD8 major opcode
- 1 RandR opcode
+ 1 12 RandR opcode
2 3 request length
4 OUTPUT output
4 ATOM property
@@ -1357,7 +1357,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetOutputProperty
1 CARD8 major opcode
- 1 RandR opcode
+ 1 13 RandR opcode
2 7 request length
4 OUTPUT output
4 ATOM property
@@ -1390,7 +1390,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRCreateMode
1 CARD8 major opcode
- 1 0x0a RandR opcode
+ 1 14 RandR opcode
2 12+(n+p)/4 length
4 WINDOW window
40 MODEINFO mode
@@ -1407,14 +1407,14 @@ A.2.1 Protocol Requests added with versi
ââââ
RRDestroyMode
1 CARD8 major opcode
- 1 0x0b RandR opcode
+ 1 15 RandR opcode
2 2 length
4 MODE mode
ââââ
ââââ
RRAddOutputMode
1 CARD8 major opcode
- 1 0x0c RandR opcode
+ 1 16 RandR opcode
2 3 length
4 OUTPUT output
4 MODE mode
@@ -1422,7 +1422,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRDeleteOutputMode
1 CARD8 major opcode
- 1 0x0d RandR opcode
+ 1 17 RandR opcode
2 3 length
4 OUTPUT output
4 MODE mode
@@ -1430,7 +1430,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetCrtcInfo
1 CARD8 major opcode
- 1 0x0e RandR opcode
+ 1 18 RandR opcode
2 3 length
4 CRTC crtc
4 TIMESTAMP config-timestamp
@@ -1455,7 +1455,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRSetCrtcConfig
1 CARD8 major opcode
- 1 0x0f RandR opcode
+ 1 19 RandR opcode
2 7+n length
4 CRTC crtc
4 TIMESTAMP timestamp
@@ -1478,7 +1478,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetCrtcGammaSize
1 CARD8 major opcode
- 1 RandR opcode
+ 1 20 RandR opcode
2 2 length
4 CRTC crtc
â¶
@@ -1492,7 +1492,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetCrtcGamma
1 CARD8 major opcode
- 1 RandR opcode
+ 1 21 RandR opcode
2 2 length
4 CRTC crtc
â¶
@@ -1509,7 +1509,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRSetCrtcGamma
1 CARD8 major opcode
- 1 0x0f RandR opcode
+ 1 22 RandR opcode
2 3+(6n+2)/4 length
4 CRTC crtc
2 n size
diff-tree b34676e8f709c4f8f6a2112c83103dfd0cabcbd7 (from 1ec6ea06b8b7182b465e5c0d34475c20de76812b)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Sep 13 12:23:08 2006 -0700
Add Output properties and CRTC Gamma ramps. Move sub-pixel to Output.
The property requests mirror the core window property requests, except that
notify events are delivered to windows, rather than to outputs.
Gamma ramps lifted from XFree86V-idModeExtension; clients get to deal with
converting single value to ramp though.
Subpixel moved to output; clients get to figure out the effect of rotation
on subpixel ordering.
diff --git a/randrproto.txt b/randrproto.txt
index a252f36..a87c011 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -207,7 +207,8 @@ ROTATION { Rotate_0
RRSELECTMASK { RRScreenChangeNotifyMask
RRCrtcChangeNotifyMask (New in version 1.2)
- RROutputChangeNotifyMask (New in version 1.2) }
+ RROutputChangeNotifyMask (New in version 1.2)
+ RROutputPropertyNotifyMask (New in version 1.2) }
SIZEID { CARD16 }
@@ -306,6 +307,10 @@ The name of this extension is "RANDR".
detected external changes. RROutputChangeNotify may also be sent
when this request executes if the output configuration has changed
since the client connected, to avoid race conditions.
+
+ If 'enable' contains RROutputPropertyNotifyMask,
+ RROutputPropertyNotify events will be sent when properties change on
+ this output.
ââââ
RRSetScreenConfig
@@ -503,6 +508,7 @@ dynamic changes in the display environme
name: STRING
connection: CONNECTION
+ subpixel-order: SUBPIXELORDER
crtcs: LISTofCRTC
clones: LISTofOUTPUT
modes: LISTofMODE
@@ -530,6 +536,9 @@ dynamic changes in the display environme
whether something is connected, it will set this to
UnknownConnection.
+ 'subpixel-order' contains the resulting subpixel order of the
+ connected device to allow correct subpixel rendering.
+
'crtcs' is the list of CRTCs that this output may be connected to.
Attempting to connect this output to a different CRTC results in a
Match error.
@@ -544,6 +553,109 @@ dynamic changes in the display environme
in a Match error.
ââââ
+ RRListOutputProperties
+ output:OUTPUT
+ â¶
+ atoms: LISTof ATOM
+ââââ
+ Errors: Output
+
+ This request returns the atoms of properties currently defined on
+ the output.
+
+ââââ
+ RRChangeOutputProperty
+ output: OUTPUT
+ property, type: ATOM
+ format: {8, 16, 32}
+ mode: { Replace, Prepend, Append }
+ data: LISTofINT8 or LISTofINT16 or LISTofINT32
+ââââ
+ Errors: Alloc, Atom, Match, Value, Output
+
+ This request alters the property for the specified output. The type
+ is uninterpreted by the server. The format specifies whether the
+ data should be viewed as a list of 8-bit, 16-bit, or 32-bit
+ quantities so that the server can correctly byte-swap as necessary.
+
+ If the mode is Replace, the previous property value is discarded.
+ If the mode is Prepend or Append, then the type and format must
+ match the existing property value (or a Match error results). If
+ the property is undefined, it is treated as defined with the correct
+ type and format with zero-length data.
+
+ For Prepend, the data is tacked on to the beginning of the existing
+ data, and for Append, it is tacked on to the end of the existing data.
+
+ This request generates a OutputPropertyNotify
+
+ The lifetime of a property is not tied to the storing client.
+ Properties remain until explicitly deleted, until the output is
+ destroyed, or until server reset (see section 10).
+
+ The maximum size of a property is server-dependent and may vary
+ dynamically.
+
+ââââ
+ RRDeleteOutputProperty
+ output: OUTPUT
+ property: ATOM
+ââââ
+ Errors: Atom, Output
+
+ This request deletes the property from the specified window if the
+ property exists and generates a OutputPropertyNotify event unless
+ the property does not exist.
+
+ââââ
+ RRGetOutputProperty
+ output: OUTPUT
+ property: ATOM
+ type: ATOM or AnyPropertyType
+ long-offset, long-length: CARD32
+ delete: BOOL
+ â¶
+ type: ATOM or None
+ format: {0, 8, 16, 32}
+ bytes-after: CARD32
+ value: LISTofINT8 or LISTofINT16 or LISTofINT32
+ââââ
+ Errors: Atom, Value, Output
+
+ If the specified property does not exist for the specified output,
+ then the return type is None, the format and bytes-after are zero,
+ and the value is empty. The delete argument is ignored in this
+ case.
+
+ If the specified property exists but its type does not match the
+ specified type, then the return type is the actual type of the
+ property, the format is the actual format of the property (never
+ zero), the bytes-after is the length of the property in bytes (even
+ if the format is 16 or 32), and the value is empty. The delete
+ argument is ignored in this case.
+
+ If the specified property exists and either AnyPropertyType is
+ specified or the specified type matches the actual type of the
+ property, then the return type is the actual type of the property,
+ the format is the actual format of the property (never zero), and
+ the bytes-after and value are as follows, given:
+
+ N = actual length of the stored property in bytes
+ (even if the format is 16 or 32)
+ I = 4 Ã offset
+ T = N - I
+ L = MINIMUM(T, 4 Ã long-length)
+ A = N - (I + L)
+
+ The returned value starts at byte index I in the property (indexing
+ from 0), and its length in bytes is L. However, it is a Value error
+ if long-offset is given such that L is negative. The value of
+ bytes-after is A, giving the number of trailing unread bytes in the
+ stored property. If delete is True and the bytes-after is zero, the
+ property is also deleted from the output, and a
+ RROutputPropertyNotify event is generated.
+
+ââââ
RRCreateMode
window: WINDOW
modeinfo: MODEINFO
@@ -662,7 +774,6 @@ dynamic changes in the display environme
â¶
status: RRCONFIGSTATUS
new-timestamp: TIMESTAMP
- subpixelOrder: SUBPIXELORDER
ââââ
Errors: Value, Match
@@ -718,8 +829,42 @@ dynamic changes in the display environme
'new-time-stamp' contains the time at which this request was
executed.
- 'subpixelOrder' contains the resulting subpixel order of the monitor
- to allow correct subpixel rendering.
+ââââ
+ RRGetCrtcGammaSize
+ crtc: CRTC
+ â¶
+ size: CARD16
+ââââ
+ Errors: Crtc
+
+ This request returns the size of the gamma ramps used by 'crtc'.
+
+ââââ
+ RRGetCrtcGamma
+ crtc: CRTC
+ â¶
+ red: LISTofCARD16
+ green: LISTofCARD16
+ blue: LISTofCARD16
+ââââ
+ Errors: Crtc
+
+ This request returns the currently set gamma ramps for 'crtc'. All
+ three lists will be the size returned by the RRGetCrtcGammaSize
+ request.
+
+ââââ
+ RRSetCrtcGamma
+ crtc: CRTC
+ red: LISTofCARD16
+ green: LISTofCARD16
+ blue: LISTofCARD16
+ââââ
+ Errors: Crtc, Match
+
+ This request sets the gamma ramps for 'crtc'. All three lists
+ must be the size returned by RRGetCrtcGammaSize else a Value error
+ results.
â§â§â§â§â§â§â§â§â§â§â§
@@ -778,7 +923,6 @@ factors, such as re-cabling a monitor, e
ââââ
RROutputChangeNotify:
- sequence-number: CARD16 low 16 bits of request seq. number
timestamp: TIMESTAMP time screen was reconfigured
config-timestamp: TIMESTAMP time available config data was changed
window: WINDOW window requesting notification
@@ -798,8 +942,26 @@ factors, such as re-cabling a monitor, e
system.
ââââ
- RRCrtcChangeNotify /* XXX need to fit to 32 bytes */
- sequence-number: CARD16 low 16 bits of request seq. number
+ RROutputPropertyNotify:
+ window: WINDOW window requesting notification
+ output: OUTPUT output affected by change
+ atom: ATOM affected property
+ time: TIMESTAMP time property was changed
+ subpixel-order: SUBPIXELORDER order of subpixels
+ state: { NewValue, Deleted } new property state
+ââââ
+
+ This event is reported to clients selecting RROutputPropertyChange
+ on the window and is generated with state NewValue when a property
+ of the window is changed using RRChangeOutputProperty even when
+ adding zero-length data and when replacing all or part of a property
+ with identical data. It is generated with state Deleted when a
+ property of the window is deleted using either
+ RRDeleteOutputProperty or RRGetOutputProperty. The timestamp
+ indicates the server time when the property was changed.
+
+ââââ
+ RRCrtcChangeNotify
timestamp: TIMESTAMP time monitor was changed
config-timestamp: TIMESTAMP time config data was changed
root: WINDOW root window of screen
@@ -807,7 +969,6 @@ factors, such as re-cabling a monitor, e
crtc: CRTC CRTC which changed
mode: MODE new mode
rotation: ROTATION; new rotation
- subpixelOrder: SUBPIXELORDER order of subpixels
x: INT16 x position of CRTC within screen
y: INT16 y position of CRTC within screen
ââââ
@@ -843,9 +1004,9 @@ The RandR extension was developed in par
to ensure the feasibility of various portions of the design. As
portions of the extension are implemented, the version number of the
extension has changed to reflect the portions of the standard provided.
-This document describes the version 1.0 of the specification, the
+This document describes the version 1.2 of the specification, the
partial implementations have version numbers less than that. Here's a
-list of what each version before 1.0 implemented:
+list of what each version provided:
0.0: This prototype implemented resize and rotation in the
TinyX server Used approximately the protocol described in
@@ -870,7 +1031,9 @@ will fail against 1.0 servers. The wire
changed for GetScreenInfo to ensure this failure in a relatively
graceful way. Version 1.1 servers and clients are cross compatible with
1.0. Version 1.1 is considered to be stable and we intend upward
-compatibility from this point.
+compatibility from this point. Version 1.2 offers an extended model of the
+system with multiple output support. It offers backward compatibility with
+version 1.1.
â§â§â§â§â§â§â§â§â§â§â§
@@ -892,11 +1055,9 @@ defined by the extension. Version 2.0 of
adjust the DAC values in a TrueColor server to modify the brightness curves
of the display.
-Most of the utility of this extension is subsumed by RandR version 1.2,
-except for the gamma adjustments. If this features continue to be useful,
-either some relationship between the screen indices used in the
-XFree86-VidModeExtension and the screen/monitor pairs used int RandR or an
-incorporation of this functionality into RandR might be needed.
+All of the utility of this extension is subsumed by RandR version 1.2, RandR
+should be used in preference to XFree86-VidModeExtension where both are
+present.
10.2 Xinerama
@@ -976,6 +1137,7 @@ A.1 Common Types
values. If the dot clock is zero, then all of the timing
parameters and flags are not used, and must be zero as this
indicates that the timings are unknown or otherwise unused.
+ The name itself will be encoded separately in each usage.
A.2 Protocol Requests
@@ -1084,10 +1246,7 @@ A.2.1 Protocol Requests added with versi
2 CARD16 minHeight
2 CARD16 maxWidth
2 CARD16 maxHeight
- 4 unused
- 4 unused
- 4 unused
- 4 unused
+ 16 unused
ââââ
ââââ
RRSetScreenSize
@@ -1139,7 +1298,7 @@ A.2.1 Protocol Requests added with versi
4 TIMESTAMP timestamp
4 CRTC current connected crtc
1 CONNECTION connection
- 1 unused
+ 1 SUBPIXELORDER subpixel-order
2 c number of CRTCs
2 m number of modes
2 n length of name
@@ -1150,6 +1309,85 @@ A.2.1 Protocol Requests added with versi
p unused, p=pad(n)
ââââ
ââââ
+ RRListOutputProperties
+ 1 CARD8 major opcode
+ 1 0x09 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ â¶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 n reply length
+ 2 n number of ATOMs in atoms
+ 22 unused
+ 4n LISTofATOM atoms
+ââââ
+ââââ
+ RRChangeOutputProperty
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 6+(n+p)/4 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ 4 ATOM type
+ 1 CARD8 format
+ 1 mode
+ 0 Replace
+ 1 Prepend
+ 2 Append
+ 2 unused
+ 4 CARD32 length of data in format units
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ n LISTofBYTE data
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+ââââ
+ââââ
+ RRDeleteOutputProperty
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 3 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ââââ
+ââââ
+ RRGetOutputProperty
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 7 request length
+ 4 OUTPUT output
+ 4 ATOM property
+ 4 ATOM type
+ 0 AnyPropertyType
+ 4 CARD32 long-offset
+ 4 CARD32 long-length
+ 1 BOOL delete
+ 3 unused
+ â¶
+ 1 1 Reply
+ 1 CARD8 format
+ 2 CARD16 sequence number
+ 4 (n+p)/4 reply length
+ 4 ATOM type
+ 0 None
+ 4 CARD32 bytes-after
+ 4 CARD32 length of value in format units
+ (= 0 for format = 0)
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+ 12 unused
+ n LISTofBYTE value
+ (n is zero for format = 0)
+ (n is a multiple of 2 for format = 16)
+ (n is a multiple of 4 for format = 32)
+ p unused, p=pad(n)
+ââââ
+ââââ
RRCreateMode
1 CARD8 major opcode
1 0x0a RandR opcode
@@ -1234,8 +1472,51 @@ A.2.1 Protocol Requests added with versi
2 CARD16 sequence number
4 0 reply length
4 TIMESTAMP new timestamp
- 2 SUBPIXELORDER subpixel order
- 18 unused
+ 1 SUBPIXELORDER subpixel order
+ 19 unused
+ââââ
+ââââ
+ RRGetCrtcGammaSize
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ â¶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 2 CARD16 size
+ 22 unused
+ââââ
+ââââ
+ RRGetCrtcGamma
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 2 length
+ 4 CRTC crtc
+ â¶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 (6n+2)/4 reply length
+ 2 n size
+ 20 unused
+ 2n LISTofCARD16 red
+ 2n LISTofCARD16 green
+ 2n LISTofCARD16 blue
+ââââ
+ââââ
+ RRSetCrtcGamma
+ 1 CARD8 major opcode
+ 1 0x0f RandR opcode
+ 2 3+(6n+2)/4 length
+ 4 CRTC crtc
+ 2 n size
+ 2 unused
+ 2n LISTofCARD16 red
+ 2n LISTofCARD16 green
+ 2n LISTofCARD16 blue
ââââ
A.3 Protocol Events
diff-tree 1ec6ea06b8b7182b465e5c0d34475c20de76812b (from e81693720d5d1acf31780de3f5fa90bf0f46a801)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Tue Sep 12 18:40:03 2006 -0700
Spelling and formatting fixes.
diff --git a/randrproto.txt b/randrproto.txt
index 7861bcf..a252f36 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -35,7 +35,7 @@ These events include:
on laptops or desktop systems
⺠The continued decline of legacy toolkits whose design would have
required depth switching to support migration
- ⺠The lack of depth switchin implementation experience in the
+ ⺠The lack of depth switching implementation experience in the
intervening time, due to events beyond our control
Additionally, the requirement to support depth switching might
@@ -46,7 +46,7 @@ Rather than further delaying RandR's wid
long wanted by the community (resizing of screens, particularly on laptops),
or the deployment of a protocol design that might be flawed due to lack of
implementation experience, we decided to remove depth switching from the
-protocol. It may be implementated at a later time if resources and
+protocol. It may be implemented at a later time if resources and
interests permit as a revision to the protocol described here, which will
remain a stable base for applications. The protocol described here has been
implemented in the main X.org server, and more fully in the hw/kdrive
@@ -105,12 +105,12 @@ the hardware will probably impose restri
configurations. The protocol doesn't try to describe these restrictions,
instead it provides a mechanism to find out what combinations are supported.
-For instance, dual-link DVI gangs two CRTC outputs togther to provide higher
+For instance, dual-link DVI gangs two CRTC outputs together to provide higher
bandwidth for large resolution screens. This is exposed in RandR by
requiring that nothing be connected to the second CRTC when driving a high
resolution screen on the first.
-1.1 Acknowlegements
+1.1 Acknowledgements
Our thanks to the contributors to the design found on the xpert mailing
list, in particular:
@@ -144,7 +144,7 @@ screen configuration (by requiring a tim
Interested applications are notified whenever the screen configuration
changes, providing the current size of the screen and subpixel order (see
-the Render extension [RENDER]), to enabel proper rendering of subpixel
+the Render extension [RENDER]), to enable proper rendering of subpixel
decimated client text to continue, along with a time stamp of the
configuration change. A client must refresh its knowledge of the screen
configuration before attempting to change the configuration after a
@@ -162,7 +162,7 @@ specified in the "normal" orientation, b
other way confusing.
We expect that most clients and toolkits will be oblivious to changes to the
-screen stucture, as they generally use the values in the connections Display
+screen structure, as they generally use the values in the connections Display
structure directly. By toolkits updating the values on the fly, we believe
pop-up menus and other pop up windows will position themselves correctly in
the face of screen configuration changes (the issue is ensuring that pop-ups
@@ -256,14 +256,14 @@ REFRESH { rates: LISTofCARD16 }
The name of this extension is "RANDR".
-RRQueryVersion
+ââââ
+ RRQueryVersion
client-major-version: CARD32
client-minor-version: CARD32
-
- â¶
-
+ â¶
major-version: CARD32
minor-version: CARD32
+ââââ
The client sends the highest supported version to the server
and the server sends the highest version it supports, but no
@@ -277,10 +277,11 @@ RRQueryVersion
7. Extension Requests
-RRSelectInput
+ââââ
+ RRSelectInput
window: WINDOW
enable: SETofRRSELECTMASK
-
+ââââ
Errors: Window, Value
If 'enable' is RRScreenChangeNotifyMask, RRScreenChangeNotify events
@@ -306,22 +307,21 @@ RRSelectInput
when this request executes if the output configuration has changed
since the client connected, to avoid race conditions.
-RRSetScreenConfig
+ââââ
+ RRSetScreenConfig
window: WINDOW
timestamp: TIMESTAMP
config-timestamp: TIMESTAMP
size-id: SIZEID
rotation: ROTATION
rate: CARD16
-
- â¶
-
+ â¶
status: RRCONFIGSTATUS
new-timestamp: TIMESTAMP
config-timestamp: TIMESTAMP
root: WINDOW
subpixelOrder: SUBPIXELORDER
-
+ââââ
Errors: Value, Match
If 'timestamp' is less than the time when the configuration was last
@@ -407,7 +407,7 @@ RRSetScreenConfig
the screen and the pixel size.
'refresh' is the list of refresh rates for each size. Each element
- of 'sizes' has a cooresponding element in 'refresh'. An empty list
+ of 'sizes' has a corresponding element in 'refresh'. An empty list
indicates no known rates, or a device for which refresh is not
relevant.
@@ -428,9 +428,7 @@ dynamic changes in the display environme
ââââ
RRGetScreenSizeRange
window: WINDOW
-
â¶
-
CARD16 minWidth, minHeight
CARD16 maxWidth, maxHeight
ââââ
@@ -509,8 +507,7 @@ dynamic changes in the display environme
clones: LISTofOUTPUT
modes: LISTofMODE
ââââ
-
- Errors: Output,
+ Errors: Output
RRGetOutputInfo returns information about the current and available
configurations 'output'.
@@ -700,7 +697,7 @@ dynamic changes in the display environme
sets for this CRTC or a Match error results.
If 'mode' is None, then 'outputs' must be empty, else a Match error
- results. Conversly, if 'mode' is not None, then 'outputs' must not be
+ results. Conversely, if 'mode' is not None, then 'outputs' must not be
empty, else a Match error results.
This request may fail for other indeterminate reasons, in which case
@@ -735,13 +732,13 @@ round trips to set up the extension.
RRScreenChangeNotify is sent if RRSelectInput has requested it
whenever properties of the screen change, which may be due to external
-factors, such as recabling a monitor, etc.
+factors, such as re-cabling a monitor, etc.
ââââ
RRScreenChangeNotify
rotation: ROTATION; new rotation
- sequenceNumber: CARD16 low 16 bits of request's seq. number
+ sequenceNumber: CARD16 low 16 bits of request seq. number
timestamp: TIMESTAMP time screen was changed
configTimestamp: TIMESTAMP time config data was changed
root: WINDOW root window of screen
@@ -781,7 +778,7 @@ factors, such as recabling a monitor, et
ââââ
RROutputChangeNotify:
- sequence-number: CARD16 low 16 bits of request's seq. number
+ sequence-number: CARD16 low 16 bits of request seq. number
timestamp: TIMESTAMP time screen was reconfigured
config-timestamp: TIMESTAMP time available config data was changed
window: WINDOW window requesting notification
@@ -802,7 +799,7 @@ factors, such as recabling a monitor, et
ââââ
RRCrtcChangeNotify /* XXX need to fit to 32 bytes */
- sequence-number: CARD16 low 16 bits of request's seq. number
+ sequence-number: CARD16 low 16 bits of request seq. number
timestamp: TIMESTAMP time monitor was changed
config-timestamp: TIMESTAMP time config data was changed
root: WINDOW root window of screen
@@ -845,7 +842,7 @@ factors, such as recabling a monitor, et
The RandR extension was developed in parallel with the implementation
to ensure the feasibility of various portions of the design. As
portions of the extension are implemented, the version number of the
-extension has changed to reflect the portions of the standard provied.
+extension has changed to reflect the portions of the standard provided.
This document describes the version 1.0 of the specification, the
partial implementations have version numbers less than that. Here's a
list of what each version before 1.0 implemented:
@@ -923,7 +920,6 @@ Syntactic Conventions
This document uses the same syntactic conventions as the core X
protocol encoding document.
-
A.1 Common Types
ââââ
@@ -954,7 +950,7 @@ A.1 Common Types
0x3 Failed
ââââ
Return status for requests which depend on time.
-
+
ââââ
MODEINFO (40) Added in version 1.2
4 CARD32 id
@@ -975,7 +971,7 @@ A.1 Common Types
ââââ
An output mode specifies the complete CRTC timings for
- a specfic mode. The vertical and horizontal synchronization rates
+ a specific mode. The vertical and horizontal synchronization rates
can be computed given the dot clock and the h total/v total
values. If the dot clock is zero, then all of the timing
parameters and flags are not used, and must be zero as this
@@ -1002,7 +998,6 @@ errors if used in version 1.0.
1 CARD32 major version
1 CARD32 minor version
ââââ
-
ââââ
RRSetScreenConfig
@@ -1029,7 +1024,6 @@ errors if used in version 1.0.
4 CARD32 pad5
4 CARD32 pad6
ââââ
-
ââââ
RRSelectInput
@@ -1040,7 +1034,6 @@ errors if used in version 1.0.
2 SETofRRSELECTMASK enable
2 CARD16 pad
ââââ
-
ââââ
RRGetScreenInfo
@@ -1096,7 +1089,6 @@ A.2.1 Protocol Requests added with versi
4 unused
4 unused
ââââ
-
ââââ
RRSetScreenSize
1 CARD8 major opcode
@@ -1108,7 +1100,6 @@ A.2.1 Protocol Requests added with versi
4 CARD32 width in millimeters
4 CARD32 height in millimeters
ââââ
-
ââââ
RRGetScreenResources
1 CARD8 major opcode
@@ -1133,7 +1124,6 @@ A.2.1 Protocol Requests added with versi
b STRING8 mode names
p unused, p=pad(b)
ââââ
-
ââââ
RRGetOutputInfo
1 CARD8 major opcode
@@ -1159,11 +1149,10 @@ A.2.1 Protocol Requests added with versi
n STRING8 name
p unused, p=pad(n)
ââââ
-
ââââ
RRCreateMode
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 0x0a RandR opcode
2 12+(n+p)/4 length
4 WINDOW window
40 MODEINFO mode
@@ -1180,14 +1169,14 @@ A.2.1 Protocol Requests added with versi
ââââ
RRDestroyMode
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 0x0b RandR opcode
2 2 length
4 MODE mode
ââââ
ââââ
RRAddOutputMode
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 0x0c RandR opcode
2 3 length
4 OUTPUT output
4 MODE mode
@@ -1195,7 +1184,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRDeleteOutputMode
1 CARD8 major opcode
- 1 0x09 RandR opcode
+ 1 0x0d RandR opcode
2 3 length
4 OUTPUT output
4 MODE mode
@@ -1203,7 +1192,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRGetCrtcInfo
1 CARD8 major opcode
- 1 RandR opcode
+ 1 0x0e RandR opcode
2 3 length
4 CRTC crtc
4 TIMESTAMP config-timestamp
@@ -1228,7 +1217,7 @@ A.2.1 Protocol Requests added with versi
ââââ
RRSetCrtcConfig
1 CARD8 major opcode
- 1 RandR opcode
+ 1 0x0f RandR opcode
2 7+n length
4 CRTC crtc
4 TIMESTAMP timestamp
@@ -1288,7 +1277,7 @@ A.3.1 Protocol Events added with version
ââââ
RRCrtcChangeNotify
1 Base + 2 code
- 1 0 sub-code
+ 1 1 sub-code
2 CARD16 sequence number
4 TIMESTAMP timestamp
4 WINDOW request window
diff-tree e81693720d5d1acf31780de3f5fa90bf0f46a801 (from 4e47d7af0574690dcf00516337bf0bbe567c9c75)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Tue Sep 12 16:48:22 2006 -0700
Rearrange modes to be listed with screen resources. Encoding.
Modes are now listed as screen resources instead of with the output; they're
shared across outputs for cloning.
Wrote up encoding.
diff --git a/randrproto.txt b/randrproto.txt
index 6206e4c..7861bcf 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -110,7 +110,7 @@ bandwidth for large resolution screens.
requiring that nothing be connected to the second CRTC when driving a high
resolution screen on the first.
-2. Acknowlegements
+1.1 Acknowlegements
Our thanks to the contributors to the design found on the xpert mailing
list, in particular:
@@ -124,6 +124,8 @@ Thomas Winischhofer for the hardware-acc
Matthew Tippet and Kevin Martin for splitting outputs and CRTCs to more
fully expose what video hardware can do
+ â§â§â§â§â§â§â§â§â§â§â§
+
2. Screen change model
Screens may change dynamically, either under control of this extension, or
@@ -166,15 +168,28 @@ pop-up menus and other pop up windows wi
the face of screen configuration changes (the issue is ensuring that pop-ups
are visible on the reconfigured screen).
+ â§â§â§â§â§â§â§â§â§â§â§
+
3. Data Types
The subpixel order is shared with the Render extension, and is documented
there. The only datatype defined is the screen size, defined in the normal
(0 degree) orientation.
+ â§â§â§â§â§â§â§â§â§â§â§
+
4. Errors
-There are no new error types defined by this extension.
+Errors are sent using core X error reports.
+
+Output
+ A value for an OUTPUT argument does not name a defined OUTPUT.
+CRTC
+ A value for a CRTC argument does not name a defined CRTC.
+Mode
+ A value for a MODE argument does not name a defined MODE.
+
+ â§â§â§â§â§â§â§â§â§â§â§
5. Protocol Types
@@ -198,9 +213,9 @@ SIZEID { CARD16 }
MODE { XID or None }
-CRTC { CARD16 }
+CRTC { XID }
-OUTPUT { CARD16 }
+OUTPUT { XID }
CONNECTION { Connected, Disconnected, UnknownConnection }
@@ -224,16 +239,19 @@ MODEFLAG { hsync_positive hsync_negative
double_clock
clock_divide_by_2 }
-OUTPUTMODE { id: MODE
- widthInPixels, heightInPixels: CARD16
- widthInMillimeters, heightInMillimeters: CARD32
- dotClock: CARD32
- hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
- vSyncStart, vSyncEnd, vTotal: CARD16
- modeFlags: SETofMODEFLAG }
+MODEINFO { id: MODE
+ name: STRING
+ widthInPixels, heightInPixels: CARD16
+ widthInMillimeters, heightInMillimeters: CARD32
+ dotClock: CARD32
+ hSyncStart, hSyncEnd, hTotal, hSkew: CARD16
+ vSyncStart, vSyncEnd, vTotal: CARD16
+ modeFlags: SETofMODEFLAG }
REFRESH { rates: LISTofCARD16 }
+ â§â§â§â§â§â§â§â§â§â§â§
+
6. Extension Initialization
The name of this extension is "RANDR".
@@ -255,6 +273,8 @@ RRQueryVersion
It is the clients responsibility to ensure that the server
supports a version which is compatible with its expectations.
+ â§â§â§â§â§â§â§â§â§â§â§
+
7. Extension Requests
RRSelectInput
@@ -344,11 +364,10 @@ RRSetScreenConfig
Value errors are generated when 'rotation', 'rate' or 'size-id'
are invalid.
-RRGetScreenInfo
+ââââ
+ RRGetScreenInfo
window: WINDOW
-
- â¶
-
+ â¶
rotations: SETofROTATION
root: WINDOW
timestamp: TIMESTAMP
@@ -358,8 +377,7 @@ RRGetScreenInfo
rate: CARD16
sizes: LISTofSCREENSIZE
refresh: LISTofREFRESH
-
- where:
+ââââ
Errors: Window
@@ -397,8 +415,6 @@ RRGetScreenInfo
current size when the server resets) is the first size in the
list.
- â§â§â§â§â§â§â§â§â§â§â§
-
7.1. Extension Requests added in version 1.2 of the extension
As introduced above, version 1.2 of the extension splits the screen size
@@ -409,26 +425,28 @@ range. As crtcs and outputs are added an
returned by the extension will change so that applications can detect
dynamic changes in the display environment.
-RRGetScreenSizeRange
+ââââ
+ RRGetScreenSizeRange
window: WINDOW
- â¶
+ â¶
CARD16 minWidth, minHeight
CARD16 maxWidth, maxHeight
-
+ââââ
Errors: Window
Returns the range of possible screen sizes. The screen may be set to
any size within this range.
-RRSetScreenSize
+ââââ
+ RRSetScreenSize
window: WINDOW
width: CARD16
height: CARD16
width-in-millimeters: CARD32
height-in-millimeters: CARD32
-
+ââââ
Errors: Window, Match, Value
Sets the screen to the specified size. 'width' and 'height' must be
@@ -441,20 +459,20 @@ RRSetScreenSize
extension and the core protocol. They must be non-zero, or Value
error results.
-RRGetScreenResources
+ââââ
+ RRGetScreenResources
window: WINDOW
-
- â¶
-
+ â¶
timestamp: TIMESTAMP
config-timestamp: TIMESTAMP
- number-of-crtcs: CARD16
- number-of-outputs: CARD16
-
+ crtcs: LISTofCRTC
+ outputs: LISTofOUTPUT
+ modes: LISTofMODEINFO
+ââââ
Errors: Window
- RRGetScreenResources returns information about the number of outputs
- and crtcs connected to the screen associated with 'window'.
+ RRGetScreenResources returns the list of outputs and crtcs connected
+ to the screen associated with 'window'.
'timestamp' indicates when the configuration was last set.
@@ -464,43 +482,49 @@ RRGetScreenResources
to date, to ensure clients can be well behaved in the face of race
conditions.
- 'number-of-crtcs' indicates the valid range of CRTC indices.
+ 'crtcs' contains the list of CRTCs associated with the screen.
- 'number-of-outputs' indicates the valid range of OUTPUT indices.
+ 'outputs' contains the list of outputs associated with the screen.
-RRGetOutputInfo
- window: WINDOW
+ 'modes' contains the list of modes associated with the screen
+
+ This request explicitly asks the server to ensure that the
+ configuration data is up-to-date wrt the hardware. If that requires
+ polling, this is when such polling would take place. Requests for
+ further information should not poll, but rather return the data
+ collected at this point.
+
+ââââ
+ RRGetOutputInfo
output: OUTPUT
-
- â¶
-
+ config-timestamp: TIMESTAMP
+ â¶
+ status: RRCONFIGSTATUS
timestamp: TIMESTAMP
crtc: CRTC
- config-timestamp: TIMESTAMP
name: STRING
connection: CONNECTION
crtcs: LISTofCRTC
clones: LISTofOUTPUT
- modes: LISTofOUTPUTMODE
+ modes: LISTofMODE
+ââââ
- Errors: Window
+ Errors: Output,
RRGetOutputInfo returns information about the current and available
- configurations for the specified output connected to the screen
- associated with 'window'.
+ configurations 'output'.
+
+ If 'config-timestamp' does not match the current configuration
+ timestamp (as returned by RRGetScreenResources), 'status' is set to
+ InvalidConfigTime and the remaining reply data is empty. Otherwise,
+ 'status' is set to Success.
'timestamp' indicates when the configuration was last set.
'crtc' is the current source CRTC for video data, or Disabled if the
output is not connected to any CRTC.
- 'config-timestamp' indicates when the configuration information last
- changed. Requests to configure the output will fail unless the
- timestamp indicates that the information the client is using is up
- to date, to ensure clients can be well behaved in the face of race
- conditions.
-
'name' is a UTF-8 encoded string designed to be presented to the
user to indicate which output this is. E.g. "S-Video" or "DVI".
@@ -522,21 +546,78 @@ RRGetOutputInfo
connect this output to a CRTC not using one of these modes results
in a Match error.
-RRGetCrtcInfo
- window: WINDOW
- crtc: CRTC
+ââââ
+ RRCreateMode
+ window: WINDOW
+ modeinfo: MODEINFO
+ â¶
+ mode: MODE
+ââââ
+ Errors: Window, Name, Value
+
+ 'modeinfo' provides a new mode for outputs on the screen
+ associated with 'window'. If the name of 'modeinfo' names an
+ existing mode, a Name error is returned. If some parameter of the
+ mode is not valid in some other way, a Value error is returned.
+
+ The returned 'mode' provides the id for the mode.
+
+ââââ
+ RRDestroyMode
+ mode: MODE
+ââââ
+ Errors: Mode, Access
+
+ The user-defined 'mode' is destroyed. 'mode' must name a mode
+ defined with RRCreateMode, else an Match error is returned. If
+ 'mode' is in use by some CRTC or Output, then an Access error is
+ returned.
+
+ââââ
+ RRAddOutputMode
+ output: OUTPUT
+ mode: MODE
+ââââ
+ Errors: Output, Mode, Match
- â¶
+ 'output' indicates which output is to be configured.
+ 'mode' specifies which mode to add. If 'mode' is not valid for
+ 'output', then a Match error is generated.
+
+ This request generates OutputChangeNotify events.
+
+ââââ
+ RRDeleteOutputMode
+ output: OUTPUT
+ mode: MODE
+ââââ
+ Errors: Output, Mode
+
+ 'output' indicates which output is to be configured.
+
+ 'mode' specifies which mode to delete. 'mode' must have been added
+ with RRAddOutputMode, else an Access error is returned. 'mode' must
+ not be active, else a Match error is returned.
+
+ This request generates OutputChangeNotify events.
+
+ââââ
+ RRGetCrtcInfo
+ crtc: CRTC
+ config-timestamp: TIMESTAMP
+ â¶
+ status: RRCONFIGSTATUS
timestamp: TIMESTAMP
x, y: INT16
+ width, height: CARD16
mode: MODE
rotation: ROTATION
+ outputs: LISTofOUTPUT
- config-timestamp: TIMESTAMP
rotations: SETofROTATION
- default-mode: MODE
- outputs: LISTofOUTPUT
+ possible-outputs: LISTofOUTPUT
+ââââ
Errors: Window
@@ -544,71 +625,36 @@ RRGetCrtcInfo
configurations for the specified crtc connected to the screen
associated with 'window'.
+ If 'config-timestamp' does not match the current configuration
+ timestamp (as returned by RRGetScreenResources), 'status' is set to
+ InvalidConfigTime and the remaining reply data is empty. Otherwise,
+ 'status' is set to Success.
+
'timestamp' indicates when the configuration was last set.
'x' and 'y' indicate the position of this CRTC within the screen
region. They will be set to 0 when the CRTC is disabled.
+
+ 'width' and 'height' indicate the size of the area presented by this
+ CRTC.
- 'mode' indicates which mode is active, or Disabled indicating
- that the CRTC has been disabled and is not displaying the screen
- contents.
+ 'mode' indicates which mode is active, or None indicating that the
+ CRTC has been disabled and is not displaying the screen contents.
'rotation' indicates the active rotation. It is set to Rotate_0
when the CRTC is disabled.
- 'config-timestamp' indicates when the configuration information last
- changed. Requests to configure the CRTC will fail unless the
- timestamp indicates that the information the client is using is up
- to date, to ensure clients can be well behaved in the face of race
- conditions.
-
+ 'outputs' is the list of outputs currently connected to this CRTC
+ and is empty when the CRTC is disabled.
+
'rotations' contains the set of rotations and reflections supported
by the CRTC.
- 'default-mode' is the mode the CRTC is set to at server
- reset time.
+ 'possible-outputs' lists all of the outputs which may be connected
+ to this CRTC.
-RRAddOutputMode
- window: WINDOW
- output: OUTPUT
- config-timestamp: TIMESTAMP
- timestamp: TIMESTAMP
- mode: OUTPUTMODE
-
- â¶
-
- Errors: Window, Value, Match, Name
-
- 'window' and 'output' which output is to be configured. If 'output'
- is out of range, a Value error is returned.
-
- 'mode' provides a new mode for the output. If the name of 'mode'
- names an existing mode, a Name error is returned. If 'mode' cannot be
- supported by the specified output, a Match error is returned. If some
- parameter of the mode is not valid in some other way, a Value error
- is returned.
-
- This request generates OutputChangeNotify events.
-
-RRDeleteOutputMode
- window: WINDOW
- output: OUTPUT
- name: STRING
-
- â¶
-
- Errors: Window, Value, Name
-
- 'window' and 'output' indicate which output is to be configured. If
- 'output' is out of range, a Value error is returned.
-
- 'name' specifies which mode to delete. If no mode of the specified
- name exists, a Name error is returned. The named mode must have been
- added with RRAddOutputMode, else an Access error is returned. The
- named mode must not be active, else a Match error is returned.
-
-RRSetCrtcConfig
- window: WINDOW
+ââââ
+ RRSetCrtcConfig
crtc: CRTC
timestamp: TIMESTAMP
config-timestamp: TIMESTAMP
@@ -616,16 +662,11 @@ RRSetCrtcConfig
mode: MODE
rotation: ROTATION
outputs: LISTofOUTPUT
-
- â¶
-
+ â¶
status: RRCONFIGSTATUS
new-timestamp: TIMESTAMP
- config-timestamp: TIMESTAMP
- root: WINDOW
- monitor: CRTC
subpixelOrder: SUBPIXELORDER
-
+ââââ
Errors: Value, Match
If 'timestamp' is less than the time when the configuration was last
@@ -680,15 +721,11 @@ RRSetCrtcConfig
'new-time-stamp' contains the time at which this request was
executed.
- 'config-timestamp' contains the time when the possible screen
- configurations were last changed.
-
- 'root' contains the root window for the screen indicated by the
- window.
-
'subpixelOrder' contains the resulting subpixel order of the monitor
to allow correct subpixel rendering.
+ â§â§â§â§â§â§â§â§â§â§â§
+
8. Extension Events
Clients MAY select for ConfigureNotify on the root window to be
@@ -700,7 +737,8 @@ RRScreenChangeNotify is sent if RRSelect
whenever properties of the screen change, which may be due to external
factors, such as recabling a monitor, etc.
-RRScreenChangeNotify
+ââââ
+ RRScreenChangeNotify
rotation: ROTATION; new rotation
sequenceNumber: CARD16 low 16 bits of request's seq. number
@@ -714,7 +752,7 @@ RRScreenChangeNotify
heightInPixels: CARD16
widthInMillimeters: CARD16
heightInMillimeters: CARD16
-
+ââââ
This event is generated whenever the screen configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
screen configuration was changed. 'configTimestamp' says when the
@@ -741,12 +779,17 @@ RRScreenChangeNotify
8.1 Events added in version 1.2 of the RandR extension
-RROutputChangeNotify:
+ââââ
+ RROutputChangeNotify:
sequence-number: CARD16 low 16 bits of request's seq. number
timestamp: TIMESTAMP time screen was reconfigured
config-timestamp: TIMESTAMP time available config data was changed
- root: WINDOW root window of screen
window: WINDOW window requesting notification
+ output: OUTPUT output affected by change
+ crtc: CRTC connected CRTC or None
+ mode: MODE mode in use on CRTC or None
+ connection: CONNECTION connection status
+ââââ
This event is generated whenever the available output configurations
have changed and is sent to requesting clients. 'timestamp'
@@ -757,8 +800,8 @@ RROutputChangeNotify:
precise change can be detected by examining the new state of the
system.
-RRCrtcChangeNotify /* XXX need to fit to 32 bytes */
-
+ââââ
+ RRCrtcChangeNotify /* XXX need to fit to 32 bytes */
sequence-number: CARD16 low 16 bits of request's seq. number
timestamp: TIMESTAMP time monitor was changed
config-timestamp: TIMESTAMP time config data was changed
@@ -770,7 +813,7 @@ RRCrtcChangeNotify /* XXX need to fit to
subpixelOrder: SUBPIXELORDER order of subpixels
x: INT16 x position of CRTC within screen
y: INT16 y position of CRTC within screen
-
+ââââ
This event is generated whenever the CRTC configuration is changed
and sent to requesting clients. 'timestamp' indicates when the
CRTC configuration was changed. 'config-timestamp' says when the
@@ -795,6 +838,8 @@ RRCrtcChangeNotify /* XXX need to fit to
just at the time when a display manager or log in script might
be changing the monitor size or configuration.
+ â§â§â§â§â§â§â§â§â§â§â§
+
9. Extension Versioning
The RandR extension was developed in parallel with the implementation
@@ -820,7 +865,8 @@ list of what each version before 1.0 imp
1.1: Added refresh rates
- 1.2: Separate out screens from monitors, switch to full VESA modes
+ 1.2: Separate screens from CRTCs and outputs, switch to full VESA
+ modes
Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients
will fail against 1.0 servers. The wire encoding op-codes were
@@ -829,6 +875,8 @@ graceful way. Version 1.1 servers and cl
1.0. Version 1.1 is considered to be stable and we intend upward
compatibility from this point.
+ â§â§â§â§â§â§â§â§â§â§â§
+
10. Relationship with other extensions
Two other extensions have a direct relationship with this extension. This
@@ -866,6 +914,8 @@ re-querying the configuration with the X
information. It is probably better to view RandR as a superset of Xinerama
at this point and use it in preference to Xinerama where both are present.
+ â§â§â§â§â§â§â§â§â§â§â§
+
Appendix A. Protocol Encoding
Syntactic Conventions
@@ -876,29 +926,38 @@ protocol encoding document.
A.1 Common Types
- ROTATION
+ââââ
+ ROTATION
0x0001 Rotate_0
0x0002 Rotate_90
0x0004 Rotate_180
0x0008 Rotate_270
0x0010 Reflect_X
0x0020 Reflect_Y
+ââââ
+ Used to encode both sets of possible rotations and individual
+ selected rotations.
-
- RRSELECTMASK
+ââââ
+ RRSELECTMASK
0x0001 ScreenChangeNotifyMask
0x0002 CrtcChangeNotifyMask Added in version 1.2
-
- RRCONFIGSTATUS
+ 0x0004 OutputChangeNotifyMask Added in version 1.2
+ââââ
+ Event select mask for RRSelectInput
+
+ââââ
+ RRCONFIGSTATUS
0x0 Success
0x1 InvalidConfigTime
0x2 InvalidTime
0x3 Failed
+ââââ
+ Return status for requests which depend on time.
- SIZEID
- 0xffff Disabled
-
- CRTCMODE (36) Added in version 1.2
+ââââ
+ MODEINFO (40) Added in version 1.2
+ 4 CARD32 id
2 CARD16 width in pixels
2 CARD16 height in pixels
4 CARD32 width in millimeters
@@ -911,41 +970,41 @@ A.1 Common Types
2 CARD16 v sync start
2 CARD16 v sync end
2 CARD16 v total
- 2 CARD16 name length (n)
+ 2 CARD16 name length
4 SETofMODEFLAG mode flags
+ââââ
- A monitor mode specifies the complete CRTC timings for
+ An output mode specifies the complete CRTC timings for
a specfic mode. The vertical and horizontal synchronization rates
can be computed given the dot clock and the h total/v total
values. If the dot clock is zero, then all of the timing
parameters and flags are not used, and must be zero as this
indicates that the timings are unknown or otherwise unused.
- The location of the name in the encoding is specified separately
-
A.2 Protocol Requests
-
Opcodes 0x1 and 0x3 were used in the 0.0 protocols, and will return
errors if used in version 1.0.
- RRQueryVersion
+ââââ
+ RRQueryVersion
1 CARD8 major opcode
- 1 0x01 RandR opcode
+ 1 0x00 RandR opcode
2 3 length
4 CARD32 major version
4 CARD32 minor version
- â¶
+ â¶
1 1 Reply
1 unused
2 CARD16 sequence number
4 0 reply length
1 CARD32 major version
1 CARD32 minor version
+ââââ
-
- RRSetScreenConfig
+ââââ
+ RRSetScreenConfig
1 CARD8 major opcode
1 0x02 RandR opcode
@@ -957,7 +1016,7 @@ errors if used in version 1.0.
2 ROTATION rotation/reflection
2 CARD16 refresh rate (1.1 only)
2 CARD16 pad
- â¶
+ â¶
1 1 Reply
1 RRCONFIGSTATUS status
2 CARD16 sequence number
@@ -969,9 +1028,10 @@ errors if used in version 1.0.
2 CARD16 pad4
4 CARD32 pad5
4 CARD32 pad6
-
-
- RRSelectInput
+ââââ
+
+ââââ
+ RRSelectInput
1 CARD8 major opcode
1 0x04 RandR opcode
@@ -979,15 +1039,16 @@ errors if used in version 1.0.
4 WINDOW window
2 SETofRRSELECTMASK enable
2 CARD16 pad
-
-
- RRGetScreenInfo
+ââââ
+
+ââââ
+ RRGetScreenInfo
1 CARD8 major opcode
1 0x05 RandR opcode
2 2 length
4 WINDOW window
- â¶
+ â¶
1 1 Reply
1 CARD8 set of Rotations
2 CARD16 sequence number
@@ -1011,16 +1072,17 @@ errors if used in version 1.0.
REFRESH
2 CARD16 number of rates (n)
2n CARD16 rates
+ââââ
A.2.1 Protocol Requests added with version 1.2
- RRGetScreenSizeRange
-
+ââââ
+ RRGetScreenSizeRange
1 CARD8 major opcode
1 0x06 RandR opcode
2 2 length
4 WINDOW window
- â¶
+ â¶
1 1 Reply
1 unused
2 CARD16 sequence number
@@ -1033,10 +1095,10 @@ A.2.1 Protocol Requests added with versi
4 unused
4 unused
4 unused
+ââââ
-
- RRSetScreenSize
-
+ââââ
+ RRSetScreenSize
1 CARD8 major opcode
1 0x07 RandR opcode
2 5 length
@@ -1045,93 +1107,152 @@ A.2.1 Protocol Requests added with versi
2 CARD16 height
4 CARD32 width in millimeters
4 CARD32 height in millimeters
-
+ââââ
- RRGetCrtcInfo
-
+ââââ
+ RRGetScreenResources
1 CARD8 major opcode
1 0x08 RandR opcode
2 2 length
4 WINDOW window
- â¶
+ â¶
1 1 Reply
1 unused
2 CARD16 sequence number
- 4 i*6 + m*9 + (b+p)/4 reply length
- 4 WINDOW root
- 2 CARD16 i = number of CRTCINFO following
- 2 CARD16 m = number of CRTCMODE following
- 2 CARD16 b = size of name array following
- 14 unused
- i*24 LISTofCRTCINFO one per monitor
- m*36 LISTofCRTCMODE for all monitors
- b LISTofCARD8 list of mode names
- p pad pad(b)
-
- CRTCINFO
+ 4 c+o+10m+(b+p)/4 reply length
4 TIMESTAMP timestamp
4 TIMESTAMP config-timestamp
- 2 INT16 x
- 2 INT16 y
- 2 ROTATION rotation
- 2 MODE mode
- 2 MODE default mode
- 2 SETofROTATION rotations
- 2 CARD16 start offset in LISTofCRTCMODE
- 2 CARD16 number of CRTCMODE
+ 2 c number of CRTCs
+ 2 o number of outputs
+ 2 m number of modeinfos
+ 2 b total bytes in mode names
+ 10 unused
+ 4c LISTofCRTC crtcs
+ 4o LISTofOUTPUT outputs
+ 40m LISTofMODEINFO modeinfos
+ b STRING8 mode names
+ p unused, p=pad(b)
+ââââ
- RRAddCrtcMode
+ââââ
+ RRGetOutputInfo
1 CARD8 major opcode
1 0x09 RandR opcode
- 2 12+(b+p)/4 length
- 4 WINDOW window
- 2 CRTC monitor index
- 2 unused
- 36 CRTCMODE mode
- b STRING mode name
- p pad(b)
-
- RRDeleteCrtcMode
- 1 CARD8 major opcode
- 1 0x0a RandR opcode
- 2 3+(b+p)/4 length
- 4 WINDOW window
- 2 CRTC monitor index
- 2 CARD16 mode name length
- b STRING mode name
- p pad(b)
-
- RRSetCrtcConfig
+ 2 3 length
+ 4 OUTPUT output
+ 4 TIMESTAMP config-timestamp
+ â¶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 c+m+(n+p)/4 reply length
+ 4 TIMESTAMP timestamp
+ 4 CRTC current connected crtc
+ 1 CONNECTION connection
+ 1 unused
+ 2 c number of CRTCs
+ 2 m number of modes
+ 2 n length of name
+ 8 unused
+ 4c LISTofCRTC crtcs
+ 4m LISTofMODE modes
+ n STRING8 name
+ p unused, p=pad(n)
+ââââ
+ââââ
+ RRCreateMode
1 CARD8 major opcode
- 1 0x0b RandR opcode
- 2 7 length
+ 1 0x09 RandR opcode
+ 2 12+(n+p)/4 length
4 WINDOW window
+ 40 MODEINFO mode
+ n STRING8 mode name
+ p unused, p=pad(n)
+ â¶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 MODE mode
+ 20 unused
+ââââ
+ââââ
+ RRDestroyMode
+ 1 CARD8 major opcode
+ 1 0x09 RandR opcode
+ 2 2 length
+ 4 MODE mode
+ââââ
+ââââ
+ RRAddOutputMode
+ 1 CARD8 major opcode
+ 1 0x09 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ 4 MODE mode
+ââââ
+ââââ
+ RRDeleteOutputMode
+ 1 CARD8 major opcode
+ 1 0x09 RandR opcode
+ 2 3 length
+ 4 OUTPUT output
+ 4 MODE mode
+ââââ
+ââââ
+ RRGetCrtcInfo
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 3 length
+ 4 CRTC crtc
+ 4 TIMESTAMP config-timestamp
+ â¶
+ 1 1 Reply
+ 1 RRCONFIGSTATUS status
+ 2 CARD16 sequence number
+ 4 o+p reply length
+ 2 INT16 x
+ 2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 4 MODE mode
+ 2 ROTATION current rotation and reflection
+ 2 ROTATION set of possible rotations
+ 2 o number of outputs
+ 2 p number of possible outputs
+ 4 unused
+ 4o LISTofOUTPUT outputs
+ 4p LISTofOUTPUT possible outputs
+ââââ
+ââââ
+ RRSetCrtcConfig
+ 1 CARD8 major opcode
+ 1 RandR opcode
+ 2 7+n length
+ 4 CRTC crtc
4 TIMESTAMP timestamp
4 TIMESTAMP config timestamp
- 2 CRTC monitor index
2 INT16 x
2 INT16 y
- 2 MODE mode index
+ 4 MODE mode
2 ROTATION rotation/reflection
- 2 unused
- â¶
+ 2 n number of outputs
+ 4n LISTofOUTPUT outputs
+ â¶
1 1 Reply
1 RRCONFIGSTATUS status
2 CARD16 sequence number
4 0 reply length
4 TIMESTAMP new timestamp
- 4 TIMESTAMP new configuration timestamp
- 4 WINDOW root
- 2 SUBPIXELORDER subpixel order defined in Render
- 2 CRTC monitor
- 8 unused
-
+ 2 SUBPIXELORDER subpixel order
+ 18 unused
+ââââ
A.3 Protocol Events
- RRScreenChangeNotify
-
+ââââ
+ RRScreenChangeNotify
1 Base + 0 code
1 ROTATION new rotation and reflection
2 CARD16 sequence number
@@ -1145,24 +1266,41 @@ A.3 Protocol Events
2 CARD16 height in pixels
2 CARD16 width in millimeters
2 CARD16 height in millimeters
+ââââ
A.3.1 Protocol Events added with version 1.2
- RRCrtcChangeNotify
-
+ââââ
+ RROutputChangeNotify
1 Base + 1 code
1 0 sub-code
2 CARD16 sequence number
4 TIMESTAMP timestamp
4 TIMESTAMP configuration timestamp
- 4 WINDOW root window
4 WINDOW request window
- 2 CRTC monitor index
- 2 MODE mode ID
+ 4 OUTPUT output affected
+ 4 CRTC crtc in use
+ 4 MODE mode in use
+ 2 ROTATION rotation in use
+ 1 CONNECTION connection status
+ 1 SUBPIXELORDER subpixel order
+ââââ
+ââââ
+ RRCrtcChangeNotify
+ 1 Base + 2 code
+ 1 0 sub-code
+ 2 CARD16 sequence number
+ 4 TIMESTAMP timestamp
+ 4 WINDOW request window
+ 4 CRTC crtc affected
+ 4 MODE mode in use
2 ROTATION new rotation and reflection
- 2 SUBPIXELORDER new subpixel order
2 INT16 x
2 INT16 y
+ 2 CARD16 width
+ 2 CARD16 height
+ 2 unused
+ââââ
Bibliography
More information about the xorg-commit
mailing list