diff options
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 66 |
1 files changed, 43 insertions, 23 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 505821269..4cc3a469e 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -79,8 +79,7 @@ struct _rrMode { int refcnt; xRRModeInfo mode; char *name; - void *devPrivate; - Bool userDefined; + ScreenPtr userScreen; }; struct _rrPropertyValue { @@ -135,8 +134,11 @@ struct _rrOutput { int numModes; int numPreferred; RRModePtr *modes; + int numUserModes; + RRModePtr *userModes; Bool changed; RRPropertyPtr properties; + Bool pendingProperties; 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 @@ -477,16 +497,14 @@ RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged); * Create a CRTC */ RRCrtcPtr -RRCrtcCreate (void *devPrivate); +RRCrtcCreate (ScreenPtr pScreen, void *devPrivate); /* - * Attach a CRTC to a screen. Once done, this cannot be - * undone without destroying the CRTC; it is separate from Create - * only to allow an xf86-based driver to create objects in preinit + * Set the allowed rotations on a CRTC */ -Bool -RRCrtcAttachScreen (RRCrtcPtr crtc, ScreenPtr pScreen); - +void +RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations); + /* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode @@ -543,11 +561,9 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc, int size); /* - * Set the allowable rotations of the CRTC. + * Return the area of the frame buffer scanned out by the crtc, + * taking into account the current mode and rotation */ -Bool -RRCrtcSetRotations (RRCrtcPtr crtc, - Rotation rotations); void RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height); @@ -646,19 +662,12 @@ RROutputChanged (RROutputPtr output, Bool configChanged); */ RROutputPtr -RROutputCreate (const char *name, +RROutputCreate (ScreenPtr pScreen, + const char *name, int nameLength, void *devPrivate); /* - * Attach an output to a screen, again split from creation so - * xf86 DDXen can create randr resources before the ScreenRec - * exists - */ -Bool -RROutputAttachScreen (RROutputPtr output, ScreenPtr pScreen); - -/* * Notify extension that output parameters have been changed */ Bool @@ -672,6 +681,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, @@ -729,10 +746,13 @@ RRQueryOutputProperty (RROutputPtr output, Atom property); void RRDeleteOutputProperty (RROutputPtr output, Atom property); +Bool +RRPostPendingProperties (RROutputPtr output); + int RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, int format, int mode, unsigned long len, - pointer value, Bool sendevent); + pointer value, Bool sendevent, Bool pending); int RRConfigureOutputProperty (RROutputPtr output, Atom property, |