diff options
author | Keith Packard <keithp@guitar.keithp.com> | 2007-02-18 23:49:38 -0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-03-17 23:20:07 -0700 |
commit | 2c93083edd29a65e73bb2e8eff9d353e92845c9b (patch) | |
tree | 596e34a8f006c18bf9984e87303dac546a048e5c /randr/randrstr.h | |
parent | 3bffb281260476d2f74f0bf451d85d2f7cacd6c4 (diff) |
Add support for user-defined modelines in RandR.
The RandR protocol spec has several requests in support of user-defined
modes, but the implementation was stubbed out inside the X server. Fill out
the DIX portion and start on the xf86 DDX portion. It might be necessary to
add more code to the DDX to insert the user-defined modes into the output
mode list.
(cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e)
Conflicts:
randr/randrstr.h
Updated code to work in master with recent security API changes.
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 505821269..f6d35cf1d 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -80,7 +80,7 @@ struct _rrMode { xRRModeInfo mode; char *name; void *devPrivate; - Bool userDefined; + ScreenPtr userScreen; }; struct _rrPropertyValue { @@ -135,6 +135,8 @@ struct _rrOutput { int numModes; int numPreferred; RRModePtr *modes; + int numUserModes; + RRModePtr *userModes; Bool changed; RRPropertyPtr properties; void *devPrivate; @@ -164,6 +166,13 @@ typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen, Atom property, RRPropertyValuePtr value); +typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen, + RROutputPtr output, + RRModePtr mode); + +typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, + RRModePtr mode); + #endif typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations); @@ -208,6 +217,8 @@ typedef struct _rrScrPriv { RRCrtcSetProcPtr rrCrtcSet; RRCrtcSetGammaProcPtr rrCrtcSetGamma; RROutputSetPropertyProcPtr rrOutputSetProperty; + RROutputValidateModeProcPtr rrOutputValidateMode; + RRModeDestroyProcPtr rrModeDestroy; #endif /* @@ -394,6 +405,15 @@ miRROutputSetProperty (ScreenPtr pScreen, Atom property, RRPropertyValuePtr value); +Bool +miRROutputValidateMode (ScreenPtr pScreen, + RROutputPtr output, + RRModePtr mode); + +void +miRRModeDestroy (ScreenPtr pScreen, + RRModePtr mode); + /* randr.c */ /* * Send all pending events @@ -549,6 +569,11 @@ Bool RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations); +/* + * Return the area of the frame buffer scanned out by the crtc, + * taking into account the current mode and rotation + */ + void RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height); @@ -672,6 +697,14 @@ RROutputSetModes (RROutputPtr output, int numModes, int numPreferred); +int +RROutputAddUserMode (RROutputPtr output, + RRModePtr mode); + +int +RROutputDeleteUserMode (RROutputPtr output, + RRModePtr mode); + Bool RROutputSetCrtcs (RROutputPtr output, RRCrtcPtr *crtcs, |