diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2006-10-03 21:02:39 -0700 |
---|---|---|
committer | Keith Packard <keithp@guitar.keithp.com> | 2006-10-03 21:02:39 -0700 |
commit | ee843ac7077f5dcae677ad1b7c794abb0b89e111 (patch) | |
tree | 359b3bfcbabe09ac927a298a50a85be5dcd657b3 | |
parent | d6c9bdd0e6713a8c4dff53e88bd820ff1140758c (diff) |
Add mode origins and output options.
Mode origins indicate the source of the mode information, from VESA timings,
user config or whatever.
Output options currently include only panel fitting options; more may be
added later (this field is 32 bits wide)
-rw-r--r-- | randr.h | 11 | ||||
-rw-r--r-- | randrproto.h | 20 | ||||
-rw-r--r-- | randrproto.txt | 12 |
3 files changed, 34 insertions, 9 deletions
@@ -132,4 +132,15 @@ typedef unsigned long XRandrModeFlags; #define BadRRCrtc 1 #define BadRRMode 2 +#define RRModeOriginPreferred 0 +#define RRModeOriginDetailed 1 +#define RRModeOriginVESA 2 +#define RRModeOriginConfig 3 +#define RRModeOriginUser 4 +#define RRModeOriginOther 5 + +#define RROutputOptionScaleNone 1 +#define RROutputOptionScaleMaxAspect 2 +#define RROutputOptionScaleMax 4 + #endif /* _RANDR_H_ */ diff --git a/randrproto.h b/randrproto.h index cc78e6d..d55e547 100644 --- a/randrproto.h +++ b/randrproto.h @@ -47,6 +47,8 @@ #define RRMode CARD32 #define RRCrtc CARD32 #define RRModeFlags CARD32 +#define RROutputOptions CARD32 +#define RRModeOrigin CARD8 #define Rotation CARD16 #define SizeID CARD16 @@ -194,8 +196,17 @@ typedef struct _xRRModeInfo { CARD16 vTotal B16; CARD16 nameLength B16; RRModeFlags modeFlags B32; + RRModeOrigin origin; + CARD8 pad1; + CARD16 pad2 B16; } xRRModeInfo; -#define sz_xRRModeInfo 40 +#define sz_xRRModeInfo 44 + +typedef struct { + RROutput output B32; + RROutputOptions options B32; +} xRROutputConfig; +#define sz_xRROutputConfig 8 typedef struct { CARD8 reqType; @@ -273,6 +284,7 @@ typedef struct { CARD32 length B32; Time timestamp B32; RRCrtc crtc B32; + RROutputOptions currentOptions B32; CARD8 connection; CARD8 subpixelOrder; CARD16 nCrtcs B16; @@ -280,9 +292,9 @@ typedef struct { CARD16 nClones B16; CARD16 nameLength B16; CARD16 pad1 B16; - CARD32 pad2 B32; + RROutputOptions possibleOptions B32; } xRRGetOutputInfoReply; -#define sz_xRRGetOutputInfoReply 32 +#define sz_xRRGetOutputInfoReply 36 typedef struct { CARD8 reqType; @@ -366,7 +378,7 @@ typedef struct { Window window B32; xRRModeInfo modeInfo; } xRRCreateModeReq; -#define sz_xRRCreateModeReq 48 +#define sz_xRRCreateModeReq 52 typedef struct { BYTE type; diff --git a/randrproto.txt b/randrproto.txt index 42c50d2..15ab34f 100644 --- a/randrproto.txt +++ b/randrproto.txt @@ -1211,7 +1211,7 @@ A.1 Common Types Origin of mode information. ┌─── - MODEINFO (40) Added in version 1.2 + MODEINFO (44) Added in version 1.2 4 CARD32 id 2 CARD16 width in pixels 2 CARD16 height in pixels @@ -1227,6 +1227,8 @@ A.1 Common Types 2 CARD16 v total 2 CARD16 name length 4 SETofMODEFLAG mode flags + 1 MODEORIGIN mode origin + 3 unused └─── An output mode specifies the complete CRTC timings for @@ -1403,7 +1405,7 @@ A.2.1 Protocol Requests added with version 1.2 1 1 Reply 1 unused 2 CARD16 sequence number - 4 c+o+10m+(b+p)/4 reply length + 4 c+o+11m+(b+p)/4 reply length 4 TIMESTAMP timestamp 4 TIMESTAMP config-timestamp 2 c number of CRTCs @@ -1413,7 +1415,7 @@ A.2.1 Protocol Requests added with version 1.2 8 unused 4c LISTofCRTC crtcs 4o LISTofOUTPUT outputs - 40m LISTofMODEINFO modeinfos + 44m LISTofMODEINFO modeinfos b STRING8 mode names p unused, p=pad(b) └─── @@ -1528,9 +1530,9 @@ A.2.1 Protocol Requests added with version 1.2 RRCreateMode 1 CARD8 major opcode 1 14 RandR opcode - 2 12+(n+p)/4 length + 2 13+(n+p)/4 length 4 WINDOW window - 40 MODEINFO mode + 44 MODEINFO mode n STRING8 mode name p unused, p=pad(n) ▶ |