diff options
author | Keith Packard <keithp@keithp.com> | 2014-12-16 01:59:03 -0800 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-03-31 12:32:04 +1000 |
commit | 7e1f86d42b54fb7f6492875e47a718eaeca3069b (patch) | |
tree | 5af781974f9bf0fd6ebfab80ad5b384a30090045 /randr/randrstr.h | |
parent | 9c2b4f8e0e2b5d4b5e1102d6eea7bdb4211baa68 (diff) |
randr: Add Monitor support (v1.1)
Store the user-defined monitors in the RandR screen private.
Generate a list of monitors from both the user-defined ones and from
any outputs not mentioned in one of the user-defined monitors. This list
covers both the outputs in the main screen as well as any slaves.
v1.1: airlied: fix up primary skipping bug,
fix wrong height initialiser
add get_active flag from updated protocol.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 13e6a8596..438a52aeb 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -80,6 +80,7 @@ typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr; typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr; typedef struct _rrOutput RROutputRec, *RROutputPtr; typedef struct _rrProvider RRProviderRec, *RRProviderPtr; +typedef struct _rrMonitor RRMonitorRec, *RRMonitorPtr; struct _rrMode { int refcnt; @@ -169,6 +170,22 @@ struct _rrProvider { struct _rrProvider *output_source; }; +typedef struct _rrMonitorGeometry { + BoxRec box; + CARD32 mmWidth; + CARD32 mmHeight; +} RRMonitorGeometryRec, *RRMonitorGeometryPtr; + +struct _rrMonitor { + Atom name; + ScreenPtr pScreen; + int numOutputs; + RROutput *outputs; + Bool primary; + Bool automatic; + RRMonitorGeometryRec geometry; +}; + #if RANDR_12_INTERFACE typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen, CARD16 width, @@ -338,6 +355,9 @@ typedef struct _rrScrPriv { RRProviderDestroyProcPtr rrProviderDestroy; + int numMonitors; + RRMonitorPtr *monitors; + } rrScrPrivRec, *rrScrPrivPtr; extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec; @@ -981,6 +1001,30 @@ extern _X_EXPORT void RRXineramaExtensionInit(void); #endif +void +RRMonitorInit(ScreenPtr screen); + +Bool +RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret); + +int +RRMonitorCountList(ScreenPtr screen); + +void +RRMonitorFreeList(RRMonitorPtr monitors, int nmon); + +void +RRMonitorClose(ScreenPtr screen); + +int +ProcRRGetMonitors(ClientPtr client); + +int +ProcRRSetMonitor(ClientPtr client); + +int +ProcRRDeleteMonitor(ClientPtr client); + #endif /* _RANDRSTR_H_ */ /* |