summaryrefslogtreecommitdiff
path: root/randr/randrstr.h
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-12-03 05:43:34 -0200
commit49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch)
treeeebaec908150abfc0159d9ee941404918f553113 /randr/randrstr.h
parent0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (diff)
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r--randr/randrstr.h203
1 files changed, 102 insertions, 101 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 82c7b6131..e2338b7e3 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -64,10 +64,10 @@ typedef XID RRMode;
typedef XID RROutput;
typedef XID RRCrtc;
-extern int RREventBase, RRErrorBase;
+extern _X_EXPORT int RREventBase, RRErrorBase;
-extern int (*ProcRandrVector[RRNumberRequests])(ClientPtr);
-extern int (*SProcRandrVector[RRNumberRequests])(ClientPtr);
+extern _X_EXPORT int (*ProcRandrVector[RRNumberRequests])(ClientPtr);
+extern _X_EXPORT int (*SProcRandrVector[RRNumberRequests])(ClientPtr);
/*
* Modeline for a monitor. Name follows directly after this struct
@@ -282,7 +282,7 @@ typedef struct _rrScrPriv {
#endif
} rrScrPrivRec, *rrScrPrivPtr;
-extern DevPrivateKey rrPrivKey;
+extern _X_EXPORT DevPrivateKey rrPrivKey;
#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
@@ -317,9 +317,9 @@ typedef struct _RRClient {
/* RRTimesRec times[0]; */
} RRClientRec, *RRClientPtr;
-extern RESTYPE RRClientType, RREventType; /* resource types for event masks */
-extern DevPrivateKey RRClientPrivateKey;
-extern RESTYPE RRCrtcType, RRModeType, RROutputType;
+extern _X_EXPORT RESTYPE RRClientType, RREventType; /* resource types for event masks */
+extern _X_EXPORT DevPrivateKey RRClientPrivateKey;
+extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
#define LookupOutput(client,id,a) ((RROutputPtr) \
(SecurityLookupIDByType (client, id, \
@@ -335,14 +335,14 @@ extern RESTYPE RRCrtcType, RRModeType, RROutputType;
#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
/* Initialize the extension */
-void
+extern _X_EXPORT void
RRExtensionInit (void);
#ifdef RANDR_12_INTERFACE
/*
* Set the range of sizes for the screen
*/
-void
+extern _X_EXPORT void
RRScreenSetSizeRange (ScreenPtr pScreen,
CARD16 minWidth,
CARD16 minHeight,
@@ -356,13 +356,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,
@@ -372,44 +372,44 @@ 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);
-int
+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
+extern _X_EXPORT Bool
miRandRInit (ScreenPtr pScreen);
-Bool
+extern _X_EXPORT Bool
miRRGetInfo (ScreenPtr pScreen, Rotation *rotations);
-Bool
+extern _X_EXPORT Bool
miRRCrtcSet (ScreenPtr pScreen,
RRCrtcPtr crtc,
RRModePtr mode,
@@ -419,23 +419,23 @@ miRRCrtcSet (ScreenPtr pScreen,
int numOutput,
RROutputPtr *outputs);
-Bool
+extern _X_EXPORT Bool
miRROutputSetProperty (ScreenPtr pScreen,
RROutputPtr output,
Atom property,
RRPropertyValuePtr value);
-Bool
+extern _X_EXPORT Bool
miRROutputGetProperty (ScreenPtr pScreen,
RROutputPtr output,
Atom property);
-Bool
+extern _X_EXPORT Bool
miRROutputValidateMode (ScreenPtr pScreen,
RROutputPtr output,
RRModePtr mode);
-void
+extern _X_EXPORT void
miRRModeDestroy (ScreenPtr pScreen,
RRModePtr mode);
@@ -443,26 +443,26 @@ miRRModeDestroy (ScreenPtr pScreen,
/*
* Send all pending events
*/
-void
+extern _X_EXPORT void
RRTellChanged (ScreenPtr pScreen);
/*
* Poll the driver for changed information
*/
-Bool
+extern _X_EXPORT Bool
RRGetInfo (ScreenPtr pScreen);
-Bool RRInit (void);
+extern _X_EXPORT Bool RRInit (void);
-Bool RRScreenInit(ScreenPtr pScreen);
+extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
-RROutputPtr
+extern _X_EXPORT RROutputPtr
RRFirstOutput (ScreenPtr pScreen);
-Rotation
+extern _X_EXPORT Rotation
RRGetRotation (ScreenPtr pScreen);
-CARD16
+extern _X_EXPORT CARD16
RRVerticalRefresh (xRRModeInfo *mode);
#ifdef RANDR_10_INTERFACE
@@ -475,14 +475,15 @@ RRVerticalRefresh (xRRModeInfo *mode);
* 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,
+extern _X_EXPORT Bool
+RRRegisterRate (ScreenPtr pScreen,
RRScreenSizePtr pSize,
int rate);
@@ -490,15 +491,15 @@ Bool RRRegisterRate (ScreenPtr pScreen,
* 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);
+extern _X_EXPORT Bool RRScreenInit (ScreenPtr pScreen);
-Rotation
+extern _X_EXPORT Rotation
RRGetRotation (ScreenPtr pScreen);
#endif
@@ -509,32 +510,32 @@ RRGetRotation (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
+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
*/
-void
+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,
@@ -544,13 +545,13 @@ RRCrtcNotify (RRCrtcPtr crtc,
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,
int x,
@@ -563,7 +564,7 @@ RRCrtcSet (RRCrtcPtr crtc,
* Request that the Crtc gamma be changed
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcGammaSet (RRCrtcPtr crtc,
CARD16 *red,
CARD16 *green,
@@ -575,14 +576,14 @@ RRCrtcGammaSet (RRCrtcPtr crtc,
* 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);
@@ -591,7 +592,7 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc,
* taking into account the current mode and rotation
*/
-void
+extern _X_EXPORT void
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
/*
@@ -601,7 +602,7 @@ RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
*
* Return TRUE if the resulting transform is not a simple translation.
*/
-Bool
+extern _X_EXPORT Bool
RRTransformCompute (int x,
int y,
int width,
@@ -616,19 +617,19 @@ RRTransformCompute (int x,
/*
* Return crtc transform
*/
-RRTransformPtr
+extern _X_EXPORT RRTransformPtr
RRCrtcGetTransform (RRCrtcPtr crtc);
/*
* Check whether the pending and current transforms are the same
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcPendingTransform (RRCrtcPtr crtc);
/*
* Destroy a Crtc at shutdown
*/
-void
+extern _X_EXPORT void
RRCrtcDestroy (RRCrtcPtr crtc);
@@ -636,7 +637,7 @@ RRCrtcDestroy (RRCrtcPtr crtc);
* Set the pending CRTC transformation
*/
-int
+extern _X_EXPORT int
RRCrtcTransformSet (RRCrtcPtr crtc,
PictTransformPtr transform,
struct pict_f_transform *f_transform,
@@ -649,36 +650,36 @@ RRCrtcTransformSet (RRCrtcPtr crtc,
/*
* Initialize crtc type
*/
-Bool
+extern _X_EXPORT Bool
RRCrtcInit (void);
/*
* 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);
-int
+extern _X_EXPORT int
ProcRRSetCrtcTransform (ClientPtr client);
-int
+extern _X_EXPORT int
ProcRRGetCrtcTransform (ClientPtr client);
/* rrdispatch.c */
-Bool
+extern _X_EXPORT Bool
RRClientKnowsRates (ClientPtr pClient);
/* rrmode.c */
@@ -686,7 +687,7 @@ RRClientKnowsRates (ClientPtr pClient);
* Find, and if necessary, create a mode
*/
-RRModePtr
+extern _X_EXPORT RRModePtr
RRModeGet (xRRModeInfo *modeInfo,
const char *name);
@@ -694,31 +695,31 @@ RRModeGet (xRRModeInfo *modeInfo,
* 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 *
+extern _X_EXPORT RRModePtr *
RRModesForScreen (ScreenPtr pScreen, int *num_ret);
/*
* Initialize mode type
*/
-Bool
+extern _X_EXPORT Bool
RRModeInit (void);
-int
+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 */
@@ -729,14 +730,14 @@ ProcRRDeleteOutputMode (ClientPtr client);
* 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,
@@ -745,111 +746,111 @@ RROutputCreate (ScreenPtr pScreen,
/*
* 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);
/*
* Initialize output type
*/
-Bool
+extern _X_EXPORT Bool
RROutputInit (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
+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,
pointer 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);
/* rrxinerama.c */
-void
+extern _X_EXPORT void
RRXineramaExtensionInit(void);
#endif /* _RANDRSTR_H_ */