diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
commit | 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch) | |
tree | eebaec908150abfc0159d9ee941404918f553113 /hw/xfree86/common/xf86VidMode.c | |
parent | 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (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 'hw/xfree86/common/xf86VidMode.c')
-rw-r--r-- | hw/xfree86/common/xf86VidMode.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 24fccd31b..d855bd1a8 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -62,7 +62,7 @@ static Bool VidModeClose(int i, ScreenPtr pScreen); # define DEBUG_P(x) /**/ #endif -_X_EXPORT Bool +Bool VidModeExtensionInit(ScreenPtr pScreen) { #ifdef XF86VIDMODE @@ -142,7 +142,7 @@ VidModeAvailable(int scrnIndex) } } -_X_EXPORT Bool +Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -161,7 +161,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT int +int VidModeGetDotClock(int scrnIndex, int Clock) { ScrnInfoPtr pScrn; @@ -176,7 +176,7 @@ VidModeGetDotClock(int scrnIndex, int Clock) return pScrn->clock[Clock]; } -_X_EXPORT int +int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) { ScrnInfoPtr pScrn; @@ -194,7 +194,7 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) } } -_X_EXPORT Bool +Bool VidModeGetClocks(int scrnIndex, int *Clocks) { ScrnInfoPtr pScrn; @@ -215,7 +215,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks) } -_X_EXPORT Bool +Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -238,7 +238,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) return VidModeGetNextModeline(scrnIndex, mode, dotClock); } -_X_EXPORT Bool +Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -263,7 +263,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT Bool +Bool VidModeDeleteModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -276,7 +276,7 @@ VidModeDeleteModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT Bool +Bool VidModeZoomViewport(int scrnIndex, int zoom) { ScrnInfoPtr pScrn; @@ -289,7 +289,7 @@ VidModeZoomViewport(int scrnIndex, int zoom) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetViewPort(int scrnIndex, int x, int y) { ScrnInfoPtr pScrn; @@ -310,7 +310,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetViewPort(int scrnIndex, int *x, int *y) { ScrnInfoPtr pScrn; @@ -324,7 +324,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y) return TRUE; } -_X_EXPORT Bool +Bool VidModeSwitchMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -346,7 +346,7 @@ VidModeSwitchMode(int scrnIndex, pointer mode) return retval; } -_X_EXPORT Bool +Bool VidModeLockZoom(int scrnIndex, Bool lock) { ScrnInfoPtr pScrn; @@ -363,7 +363,7 @@ VidModeLockZoom(int scrnIndex, Bool lock) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetMonitor(int scrnIndex, pointer *monitor) { ScrnInfoPtr pScrn; @@ -377,7 +377,7 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor) return TRUE; } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -390,7 +390,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode) return xf86CheckModeForMonitor((DisplayModePtr)mode, pScrn->monitor); } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -403,7 +403,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode) return xf86CheckModeForDriver(pScrn, (DisplayModePtr)mode, 0); } -_X_EXPORT void +void VidModeSetCrtcForMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -422,7 +422,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode) return; } -_X_EXPORT Bool +Bool VidModeAddModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -443,7 +443,7 @@ VidModeAddModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT int +int VidModeGetNumOfModes(int scrnIndex) { pointer mode = NULL; @@ -459,7 +459,7 @@ VidModeGetNumOfModes(int scrnIndex) } while (TRUE); } -_X_EXPORT Bool +Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue) { ScrnInfoPtr pScrn; @@ -478,7 +478,7 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) { ScrnInfoPtr pScrn; @@ -493,7 +493,7 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -506,7 +506,7 @@ VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -519,7 +519,7 @@ VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT int +int VidModeGetGammaRampSize(int scrnIndex) { if (!VidModeAvailable(scrnIndex)) @@ -528,7 +528,7 @@ VidModeGetGammaRampSize(int scrnIndex) return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen); } -_X_EXPORT pointer +pointer VidModeCreateMode(void) { DisplayModePtr mode; @@ -544,14 +544,14 @@ VidModeCreateMode(void) return mode; } -_X_EXPORT void +void VidModeCopyMode(pointer modefrom, pointer modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } -_X_EXPORT int +int VidModeGetModeValue(pointer mode, int valtyp) { int ret = 0; @@ -594,7 +594,7 @@ VidModeGetModeValue(pointer mode, int valtyp) return ret; } -_X_EXPORT void +void VidModeSetModeValue(pointer mode, int valtyp, int val) { switch (valtyp) { @@ -635,7 +635,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val) return; } -_X_EXPORT vidMonitorValue +vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx) { vidMonitorValue ret; |