aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/randrstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/randr/randrstr.h')
-rw-r--r--nx-X11/programs/Xserver/randr/randrstr.h673
1 files changed, 524 insertions, 149 deletions
diff --git a/nx-X11/programs/Xserver/randr/randrstr.h b/nx-X11/programs/Xserver/randr/randrstr.h
index 8e9107c9f..1bd0b9535 100644
--- a/nx-X11/programs/Xserver/randr/randrstr.h
+++ b/nx-X11/programs/Xserver/randr/randrstr.h
@@ -2,6 +2,7 @@
* Copyright © 2000 Compaq Computer Corporation
* Copyright © 2002 Hewlett-Packard Company
* Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -32,6 +33,10 @@
#ifndef _RANDRSTR_H_
#define _RANDRSTR_H_
+#ifndef NXAGENT_SERVER
+#include "list.h"
+#endif
+
#include <nx-X11/X.h>
#include <nx-X11/Xproto.h>
#include "misc.h"
@@ -43,26 +48,26 @@
#include "pixmapstr.h"
#include "extnsionst.h"
#include "servermd.h"
-#ifndef NXAGENT_SERVER
-#include <nx-X11/extensions/randr.h>
-#include <nx-X11/extensions/randrproto.h>
-#else
+#include "rrtransform.h"
#include "randr.h"
#include "randrproto.h"
-#endif
-#ifdef RENDER
#include <nx-X11/extensions/render.h> /* we share subpixel order information */
#include "picturestr.h"
-#endif
#include <nx-X11/Xfuncproto.h>
/* required for ABI compatibility for now */
#define RANDR_10_INTERFACE 1
#define RANDR_12_INTERFACE 1
+#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
+#define RANDR_15_INTERFACE 1
+#define RANDR_GET_CRTC_INTERFACE 1
+
+#define RANDR_INTERFACE_VERSION 0x0104
typedef XID RRMode;
typedef XID RROutput;
typedef XID RRCrtc;
+typedef XID RRProvider;
extern int RREventBase, RRErrorBase;
@@ -79,6 +84,8 @@ typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr;
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;
@@ -120,6 +127,14 @@ struct _rrCrtc {
CARD16 *gammaBlue;
CARD16 *gammaGreen;
void *devPrivate;
+ Bool transforms;
+ RRTransformRec client_pending_transform;
+ RRTransformRec client_current_transform;
+ PictTransform transform;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
+
+ PixmapPtr scanout_pixmap;
};
struct _rrOutput {
@@ -147,6 +162,35 @@ struct _rrOutput {
void *devPrivate;
};
+struct _rrProvider {
+ RRProvider id;
+ ScreenPtr pScreen;
+ uint32_t capabilities;
+ char *name;
+ int nameLength;
+ RRPropertyPtr properties;
+ Bool pendingProperties;
+ Bool changed;
+ struct _rrProvider *offload_sink;
+ 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,
@@ -163,6 +207,8 @@ typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
+typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
+
typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
RROutputPtr output,
Atom property,
@@ -176,8 +222,41 @@ typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, RRModePtr mode);
#endif
+#if RANDR_13_INTERFACE
+typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
+ RROutputPtr output, Atom property);
+typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea, INT16 *border);
+typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea, INT16 *border);
+
+#endif /* RANDR_13_INTERFACE */
+
+typedef Bool (*RRProviderGetPropertyProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider,
+ Atom property);
+typedef Bool (*RRProviderSetPropertyProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider,
+ Atom property,
+ RRPropertyValuePtr value);
+
typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations);
-typedef Bool (*RRCloseScreenProcPtr) (int i, ScreenPtr pscreen);
+typedef Bool (*RRCloseScreenProcPtr) (ScreenPtr pscreen);
+
+typedef Bool (*RRProviderSetOutputSourceProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider,
+ RRProviderPtr output_source);
+
+typedef Bool (*RRProviderSetOffloadSinkProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider,
+ RRProviderPtr offload_sink);
+
+typedef void (*RRProviderDestroyProcPtr) (ScreenPtr pScreen,
+ RRProviderPtr provider);
/* These are for 1.0 compatibility */
@@ -202,6 +281,8 @@ typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
#endif
+typedef Bool (*RRCrtcSetScanoutPixmapProcPtr) (RRCrtcPtr crtc, PixmapPtr pixmap);
+
typedef struct _rrScrPriv {
/*
* 'public' part of the structure; DDXen fill this in
@@ -215,10 +296,23 @@ typedef struct _rrScrPriv {
RRScreenSetSizeProcPtr rrScreenSetSize;
RRCrtcSetProcPtr rrCrtcSet;
RRCrtcSetGammaProcPtr rrCrtcSetGamma;
+ RRCrtcGetGammaProcPtr rrCrtcGetGamma;
RROutputSetPropertyProcPtr rrOutputSetProperty;
RROutputValidateModeProcPtr rrOutputValidateMode;
RRModeDestroyProcPtr rrModeDestroy;
#endif
+#if RANDR_13_INTERFACE
+ RROutputGetPropertyProcPtr rrOutputGetProperty;
+ RRGetPanningProcPtr rrGetPanning;
+ RRSetPanningProcPtr rrSetPanning;
+#endif
+ /* TODO #if RANDR_15_INTERFACE */
+ RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap;
+
+ RRProviderSetOutputSourceProcPtr rrProviderSetOutputSource;
+ RRProviderSetOffloadSinkProcPtr rrProviderSetOffloadSink;
+ RRProviderGetPropertyProcPtr rrProviderGetProperty;
+ RRProviderSetPropertyProcPtr rrProviderSetProperty;
/*
* Private part of the structure; not considered part of the ABI
@@ -230,6 +324,7 @@ typedef struct _rrScrPriv {
Bool changed; /* some config changed */
Bool configChanged; /* configuration changed */
Bool layoutChanged; /* screen layout changed */
+ Bool resourcesChanged; /* screen resources change */
CARD16 minWidth, minHeight;
CARD16 maxWidth, maxHeight;
@@ -238,6 +333,7 @@ typedef struct _rrScrPriv {
int numOutputs;
RROutputPtr *outputs;
+ RROutputPtr primaryOutput;
int numCrtcs;
RRCrtcPtr *crtcs;
@@ -259,9 +355,21 @@ typedef struct _rrScrPriv {
int rate;
int size;
#endif
+ Bool discontiguous;
+
+ RRProviderPtr provider;
+
+ RRProviderDestroyProcPtr rrProviderDestroy;
+
+ int numMonitors;
+ RRMonitorPtr *monitors;
+
} rrScrPrivRec, *rrScrPrivPtr;
#ifndef NXAGENT_SERVER
+extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
+
+#define rrPrivKey (&rrPrivKeyRec)
extern DevPrivateKey rrPrivKey;
#else
extern int rrPrivIndex;
@@ -269,17 +377,17 @@ extern int rrPrivIndex;
#ifndef NXAGENT_SERVER
-#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
-#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
+#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
+#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
-#else
+#else /* !defined(NXAGENT_SERVER) */
-#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
-#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
+#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr)
+#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (void *) (p))
-#endif
+#endif /* !defined(NXAGENT_SERVER) */
/*
* each window has a list of clients requesting
@@ -317,43 +425,132 @@ extern DevPrivateKey RRClientPrivateKey;
#else
extern int RRClientPrivateIndex;
#endif
-extern RESTYPE RRCrtcType, RRModeType, RROutputType;
+
+extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
+
+#ifdef NXAGENT_SERVER
#define LookupOutput(client,id,a) ((RROutputPtr) \
- (SecurityLookupIDByType (client, id, \
- RROutputType, a)))
+ (SecurityLookupIDByType (client, id, \
+ RROutputType, a)))
#define LookupCrtc(client,id,a) ((RRCrtcPtr) \
- (SecurityLookupIDByType (client, id, \
- RRCrtcType, a)))
+ (SecurityLookupIDByType (client, id, \
+ RRCrtcType, a)))
#define LookupMode(client,id,a) ((RRModePtr) \
- (SecurityLookupIDByType (client, id, \
- RRModeType, a)))
-#ifndef NXAGENT_SERVER
-
-#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
-#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
-
-#else
-
-#define GetRRClient(pClient) ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr)
-#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
+ (SecurityLookupIDByType (client, id, \
+ RRModeType, a)))
+#define LookupProvider(client,id,a) ((RRProviderPtr) \
+ (SecurityLookupIDByType (client, id, \
+ RRProviderType, a)))
#define DixUnknownAccess SecurityUnknownAccess
#define DixReadAccess SecurityReadAccess
#define DixWriteAccess SecurityWriteAccess
+#define DixSetAttrAccess SecurityWriteAccess
+#define DixUseAccess SecurityWriteAccess
#define DixDestroyAccess SecurityDestroyAccess
#endif
+#ifndef NXAGENT_SERVER
+
+#define RRClientPrivateKey (&RRClientPrivateKeyRec)
+#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
+
+#else /* !defined/NXAGENT_SERVER) */
+
+#define GetRRClient(pClient) ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr)
+
+#endif /* !defined(NXAGENT_SERVER) */
+#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
+
/* Initialize the extension */
void
RRExtensionInit(void);
+#ifndef NXAGENT_SERVER
+#define VERIFY_RR_OUTPUT(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RROutputType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_CRTC(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRCrtcType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_MODE(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRModeType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+
+#define VERIFY_RR_PROVIDER(id, ptr, a)\
+ {\
+ int rc = dixLookupResourceByType((void **)&(ptr), id,\
+ RRProviderType, client, a);\
+ if (rc != Success) {\
+ client->errorValue = id;\
+ return rc;\
+ }\
+ }
+#else /* !defined(NXAGENT_SERVER) */
+#define VERIFY_RR_OUTPUT(id, ptr, a)\
+ {\
+ ptr = LookupOutput(client, id, a);\
+ if (!ptr) {\
+ client->errorValue = id;\
+ return RRErrorBase + BadRROutput;\
+ }\
+ }
+
+#define VERIFY_RR_CRTC(id, ptr, a)\
+ {\
+ ptr = LookupCrtc (client, id, a);\
+ if (!ptr) {\
+ client->errorValue = id;\
+ return RRErrorBase + BadRRCrtc;\
+ }\
+ }
+
+#define VERIFY_RR_MODE(id, ptr, a)\
+ {\
+ ptr = LookupMode (client, id, a);\
+ if (!ptr) {\
+ client->errorValue = id;\
+ return RRErrorBase + BadRRMode;\
+ }\
+ }
+
+#define VERIFY_RR_PROVIDER(id, ptr, a)\
+ {\
+ ptr = LookupProvider (client, id, a);\
+ if (!ptr) {\
+ client->errorValue = id;\
+ return RRErrorBase + BadRRProvider;\
+ }\
+ }
+#endif /* !defined(NXAGENT_SERVER) */
+
#ifdef RANDR_12_INTERFACE
/*
* Set the range of sizes for the screen
*/
-void
+extern _X_EXPORT void
RRScreenSetSizeRange(ScreenPtr pScreen,
CARD16 minWidth,
@@ -366,13 +563,13 @@ RRScreenSetSizeRange(ScreenPtr pScreen,
* The driver is responsible for calling this whenever it has changed
* the size of the screen
*/
-void
+extern _X_EXPORT void
RRScreenSizeNotify(ScreenPtr pScreen);
/*
* Request that the screen be resized
*/
-Bool
+extern _X_EXPORT Bool
RRScreenSizeSet(ScreenPtr pScreen,
CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
@@ -380,85 +577,63 @@ RRScreenSizeSet(ScreenPtr pScreen,
/*
* Send ConfigureNotify event to root window when 'something' happens
*/
-void
+extern _X_EXPORT void
RRSendConfigNotify(ScreenPtr pScreen);
/*
* screen dispatch
*/
-int
+extern _X_EXPORT int
ProcRRGetScreenSizeRange(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRSetScreenSize(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetScreenResources(ClientPtr client);
-int
+extern _X_EXPORT int
+ ProcRRGetScreenResourcesCurrent(ClientPtr client);
+
+extern _X_EXPORT int
ProcRRSetScreenConfig(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetScreenInfo(ClientPtr client);
/*
* Deliver a ScreenNotify event
*/
-void
+extern _X_EXPORT void
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
-/* mirandr.c */
-Bool
- miRandRInit(ScreenPtr pScreen);
-
-Bool
- miRRGetInfo(ScreenPtr pScreen, Rotation * rotations);
-
-Bool
- miRRGetScreenInfo(ScreenPtr pScreen);
-
-Bool
-
-miRRCrtcSet(ScreenPtr pScreen,
- RRCrtcPtr crtc,
- RRModePtr mode,
- int x,
- int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
-
-Bool
-
-miRROutputSetProperty(ScreenPtr pScreen,
- RROutputPtr output,
- Atom property, RRPropertyValuePtr value);
-
-Bool
- miRROutputValidateMode(ScreenPtr pScreen, RROutputPtr output, RRModePtr mode);
-
-void
- miRRModeDestroy(ScreenPtr pScreen, RRModePtr mode);
+extern _X_EXPORT void
+ RRResourcesChanged(ScreenPtr pScreen);
/* randr.c */
+/* set a screen change on the primary screen */
+extern _X_EXPORT void
+ RRSetChanged(ScreenPtr pScreen);
+
/*
* Send all pending events
*/
-void
+extern _X_EXPORT void
RRTellChanged(ScreenPtr pScreen);
/*
* Poll the driver for changed information
*/
-Bool
- RRGetInfo(ScreenPtr pScreen);
+extern _X_EXPORT Bool
+ RRGetInfo(ScreenPtr pScreen, Bool force_query);
-Bool RRInit(void);
+extern _X_EXPORT Bool RRInit(void);
-Bool RRScreenInit(ScreenPtr pScreen);
+extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
-RROutputPtr RRFirstOutput(ScreenPtr pScreen);
+extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen);
-Rotation RRGetRotation(ScreenPtr pScreen);
-
-CARD16
+extern _X_EXPORT CARD16
RRVerticalRefresh(xRRModeInfo * mode);
#ifdef RANDR_10_INTERFACE
@@ -471,29 +646,24 @@ CARD16
* Then, register the specific size with the screen
*/
-RRScreenSizePtr
+extern _X_EXPORT RRScreenSizePtr
RRRegisterSize(ScreenPtr pScreen,
short width, short height, short mmWidth, short mmHeight);
-Bool RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
+extern _X_EXPORT Bool
+ RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
/*
* Finally, set the current configuration of the screen
*/
-void
+extern _X_EXPORT void
+
RRSetCurrentConfig(ScreenPtr pScreen,
Rotation rotation, int rate, RRScreenSizePtr pSize);
-Bool RRScreenInit(ScreenPtr pScreen);
-
-Rotation RRGetRotation(ScreenPtr pScreen);
-
-int
-
-RRSetScreenConfig(ScreenPtr pScreen,
- Rotation rotation, int rate, RRScreenSizePtr pSize);
+extern _X_EXPORT Rotation RRGetRotation(ScreenPtr pScreen);
#endif
@@ -503,38 +673,46 @@ RRSetScreenConfig(ScreenPtr pScreen,
* Notify the CRTC of some change; layoutChanged indicates that
* some position or size element changed
*/
-void
+extern _X_EXPORT void
RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged);
/*
* Create a CRTC
*/
-RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
+extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
/*
* Set the allowed rotations on a CRTC
*/
-void
+extern _X_EXPORT void
RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations);
/*
+ * Set whether transforms are allowed on a CRTC
+ */
+extern _X_EXPORT void
+ RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms);
+
+/*
* Notify the extension that the Crtc has been reconfigured,
* the driver calls this whenever it has updated the mode
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcNotify(RRCrtcPtr crtc,
RRModePtr mode,
int x,
- int y, Rotation rotation, int numOutputs, RROutputPtr * outputs);
+ int y,
+ Rotation rotation,
+ RRTransformPtr transform, int numOutputs, RROutputPtr * outputs);
-void
+extern _X_EXPORT void
RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
/*
* Request that the Crtc be reconfigured
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcSet(RRCrtcPtr crtc,
RRModePtr mode,
@@ -545,23 +723,31 @@ RRCrtcSet(RRCrtcPtr crtc,
* Request that the Crtc gamma be changed
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue);
/*
+ * Request current gamma back from the DDX (if possible).
+ * This includes gamma size.
+ */
+
+extern _X_EXPORT Bool
+ RRCrtcGammaGet(RRCrtcPtr crtc);
+
+/*
* Notify the extension that the Crtc gamma has been changed
* The driver calls this whenever it has changed the gamma values
* in the RRCrtcRec
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcGammaNotify(RRCrtcPtr crtc);
/*
* Set the size of the gamma table at server startup time
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcGammaSetSize(RRCrtcPtr crtc, int size);
/*
@@ -569,42 +755,99 @@ Bool
* taking into account the current mode and rotation
*/
-void
+extern _X_EXPORT void
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
/*
+ * Return crtc transform
+ */
+extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc);
+
+/*
+ * Check whether the pending and current transforms are the same
+ */
+extern _X_EXPORT Bool
+ RRCrtcPendingTransform(RRCrtcPtr crtc);
+
+/*
* Destroy a Crtc at shutdown
*/
-void
+extern _X_EXPORT void
RRCrtcDestroy(RRCrtcPtr crtc);
/*
+ * Set the pending CRTC transformation
+ */
+
+extern _X_EXPORT int
+
+RRCrtcTransformSet(RRCrtcPtr crtc,
+ PictTransformPtr transform,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse,
+ char *filter, int filter_len, xFixed * params, int nparams);
+
+/*
* Initialize crtc type
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcInit(void);
/*
+ * Initialize crtc type error value
+ */
+extern _X_EXPORT void
+ RRCrtcInitErrorValue(void);
+
+/*
+ * Detach and free a scanout pixmap
+ */
+extern _X_EXPORT void
+ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc);
+
+extern _X_EXPORT Bool
+ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable);
+
+/*
* Crtc dispatch
*/
-int
+extern _X_EXPORT int
ProcRRGetCrtcInfo(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRSetCrtcConfig(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetCrtcGammaSize(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetCrtcGamma(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRSetCrtcGamma(ClientPtr client);
+extern _X_EXPORT int
+ ProcRRSetCrtcTransform(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetCrtcTransform(ClientPtr client);
+
+int
+ ProcRRGetPanning(ClientPtr client);
+
+int
+ ProcRRSetPanning(ClientPtr client);
+
+void
+ RRConstrainCursorHarder(
+#ifndef NXAGENT_SERVER
+ DeviceIntPtr,
+#endif /* !defined(NXAGENT_SERVER) */
+ ScreenPtr, int, int *, int *);
+
/* rrdispatch.c */
-Bool
+extern _X_EXPORT Bool
RRClientKnowsRates(ClientPtr pClient);
/* rrmode.c */
@@ -612,39 +855,42 @@ Bool
* Find, and if necessary, create a mode
*/
-RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
-
-void
- RRModePruneUnused(ScreenPtr pScreen);
+extern _X_EXPORT RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
/*
* Destroy a mode.
*/
-void
+extern _X_EXPORT void
RRModeDestroy(RRModePtr mode);
/*
* Return a list of modes that are valid for some output in pScreen
*/
-RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
+extern _X_EXPORT RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
/*
* Initialize mode type
*/
-Bool
+extern _X_EXPORT Bool
RRModeInit(void);
-int
+/*
+ * Initialize mode type error value
+ */
+extern _X_EXPORT void
+ RRModeInitErrorValue(void);
+
+extern _X_EXPORT int
ProcRRCreateMode(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRDestroyMode(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRAddOutputMode(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRDeleteOutputMode(ClientPtr client);
/* rroutput.c */
@@ -655,116 +901,245 @@ int
* has changed, or whether the change was strictly internal
* (which crtc is in use)
*/
-void
+extern _X_EXPORT void
RROutputChanged(RROutputPtr output, Bool configChanged);
/*
* Create an output
*/
-RROutputPtr
+extern _X_EXPORT RROutputPtr
RROutputCreate(ScreenPtr pScreen,
const char *name, int nameLength, void *devPrivate);
/*
* Notify extension that output parameters have been changed
*/
-Bool
+extern _X_EXPORT Bool
RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
-Bool
+extern _X_EXPORT Bool
RROutputSetModes(RROutputPtr output,
RRModePtr * modes, int numModes, int numPreferred);
-int
+extern _X_EXPORT int
RROutputAddUserMode(RROutputPtr output, RRModePtr mode);
-int
+extern _X_EXPORT int
RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode);
-Bool
+extern _X_EXPORT Bool
RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs);
-Bool
+extern _X_EXPORT Bool
RROutputSetConnection(RROutputPtr output, CARD8 connection);
-Bool
+extern _X_EXPORT Bool
RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder);
-Bool
+extern _X_EXPORT Bool
RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight);
-void
+extern _X_EXPORT void
RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
-void
+extern _X_EXPORT void
RROutputDestroy(RROutputPtr output);
-int
+extern _X_EXPORT int
ProcRRGetOutputInfo(ClientPtr client);
+extern _X_EXPORT int
+ ProcRRSetOutputPrimary(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetOutputPrimary(ClientPtr client);
+
/*
* Initialize output type
*/
-Bool
+extern _X_EXPORT Bool
RROutputInit(void);
+/*
+ * Initialize output type error value
+ */
+extern _X_EXPORT void
+ RROutputInitErrorValue(void);
+
/* rrpointer.c */
-void
+extern _X_EXPORT void
RRPointerMoved(ScreenPtr pScreen, int x, int y);
-void
+extern _X_EXPORT void
RRPointerScreenConfigured(ScreenPtr pScreen);
/* rrproperty.c */
-void
+extern _X_EXPORT void
RRDeleteAllOutputProperties(RROutputPtr output);
-RRPropertyValuePtr
+extern _X_EXPORT RRPropertyValuePtr
RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending);
-RRPropertyPtr RRQueryOutputProperty(RROutputPtr output, Atom property);
+extern _X_EXPORT RRPropertyPtr
+RRQueryOutputProperty(RROutputPtr output, Atom property);
-void
+extern _X_EXPORT void
RRDeleteOutputProperty(RROutputPtr output, Atom property);
-Bool
+extern _X_EXPORT Bool
RRPostPendingProperties(RROutputPtr output);
-int
+extern _X_EXPORT int
RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
int format, int mode, unsigned long len,
void *value, Bool sendevent, Bool pending);
-int
+extern _X_EXPORT int
RRConfigureOutputProperty(RROutputPtr output, Atom property,
Bool pending, Bool range, Bool immutable,
int num_values, INT32 *values);
-int
+extern _X_EXPORT int
ProcRRChangeOutputProperty(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetOutputProperty(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRListOutputProperties(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRQueryOutputProperty(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRConfigureOutputProperty(ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRDeleteOutputProperty(ClientPtr client);
+/* rrprovider.c */
+extern _X_EXPORT void
+ RRProviderInitErrorValue(void);
+
+extern _X_EXPORT int
+ ProcRRGetProviders(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRGetProviderInfo(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetProviderOutputSource(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRSetProviderOffloadSink(ClientPtr client);
+
+extern _X_EXPORT Bool
+ RRProviderInit(void);
+
+extern _X_EXPORT RRProviderPtr
+RRProviderCreate(ScreenPtr pScreen, const char *name, int nameLength);
+
+extern _X_EXPORT void
+ RRProviderDestroy(RRProviderPtr provider);
+
+extern _X_EXPORT void
+ RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities);
+
+extern _X_EXPORT Bool
+ RRProviderLookup(XID id, RRProviderPtr * provider_p);
+
+extern _X_EXPORT void
+
+RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
+
+/* rrproviderproperty.c */
+
+extern _X_EXPORT void
+ RRDeleteAllProviderProperties(RRProviderPtr provider);
+
+extern _X_EXPORT RRPropertyValuePtr
+RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending);
+
+extern _X_EXPORT RRPropertyPtr
+RRQueryProviderProperty(RRProviderPtr provider, Atom property);
+
+extern _X_EXPORT void
+ RRDeleteProviderProperty(RRProviderPtr provider, Atom property);
+
+extern _X_EXPORT int
+RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
+ int format, int mode, unsigned long len,
+ void *value, Bool sendevent, Bool pending);
+
+extern _X_EXPORT int
+RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
+ Bool pending, Bool range, Bool immutable,
+ int num_values, INT32 *values);
+
+extern _X_EXPORT Bool
+ RRPostProviderPendingProperties(RRProviderPtr provider);
+
+extern _X_EXPORT int
+ ProcRRGetProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRListProviderProperties(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRQueryProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRConfigureProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRChangeProviderProperty(ClientPtr client);
+
+extern _X_EXPORT int
+ ProcRRDeleteProviderProperty(ClientPtr client);
+
/* rrxinerama.c */
-void
+#ifdef XINERAMA
+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);
+
+RRMonitorPtr
+RRMonitorAlloc(int noutput);
+
+int
+ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor);
+
+void
+ RRMonitorFree(RRMonitorPtr monitor);
+
+int
+ ProcRRGetMonitors(ClientPtr client);
+
+int
+ ProcRRSetMonitor(ClientPtr client);
+
+int
+ ProcRRDeleteMonitor(ClientPtr client);
#endif /* _RANDRSTR_H_ */