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 /include/globals.h | |
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 'include/globals.h')
-rw-r--r-- | include/globals.h | 102 |
1 files changed, 53 insertions, 49 deletions
diff --git a/include/globals.h b/include/globals.h index c3d2dcfa2..e70e7c69e 100644 --- a/include/globals.h +++ b/include/globals.h @@ -6,135 +6,139 @@ /* Global X server variables that are visible to mi, dix, os, and ddx */ -extern CARD32 defaultScreenSaverTime; -extern CARD32 defaultScreenSaverInterval; -extern CARD32 ScreenSaverTime; -extern CARD32 ScreenSaverInterval; +extern _X_EXPORT CARD32 defaultScreenSaverTime; +extern _X_EXPORT CARD32 defaultScreenSaverInterval; +extern _X_EXPORT CARD32 ScreenSaverTime; +extern _X_EXPORT CARD32 ScreenSaverInterval; #ifdef SCREENSAVER -extern Bool screenSaverSuspended; +extern _X_EXPORT Bool screenSaverSuspended; #endif -extern char *defaultFontPath; -extern int monitorResolution; -extern int defaultColorVisualClass; +extern _X_EXPORT char *defaultFontPath; +extern _X_EXPORT int monitorResolution; +extern _X_EXPORT int defaultColorVisualClass; -extern WindowPtr WindowTable[MAXSCREENS]; -extern int GrabInProgress; -extern Bool noTestExtensions; +extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS]; +extern _X_EXPORT int GrabInProgress; +extern _X_EXPORT Bool noTestExtensions; -extern DDXPointRec dixScreenOrigins[MAXSCREENS]; +extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS]; -extern char *ConnectionInfo; +extern _X_EXPORT char *ConnectionInfo; #ifdef DPMSExtension -extern CARD32 defaultDPMSStandbyTime; -extern CARD32 defaultDPMSSuspendTime; -extern CARD32 defaultDPMSOffTime; -extern CARD32 DPMSStandbyTime; -extern CARD32 DPMSSuspendTime; -extern CARD32 DPMSOffTime; -extern CARD16 DPMSPowerLevel; -extern Bool defaultDPMSEnabled; -extern Bool DPMSEnabled; -extern Bool DPMSEnabledSwitch; -extern Bool DPMSDisabledSwitch; -extern Bool DPMSCapableFlag; +extern _X_EXPORT CARD32 defaultDPMSStandbyTime; +extern _X_EXPORT CARD32 defaultDPMSSuspendTime; +extern _X_EXPORT CARD32 defaultDPMSOffTime; +extern _X_EXPORT CARD32 DPMSStandbyTime; +extern _X_EXPORT CARD32 DPMSSuspendTime; +extern _X_EXPORT CARD32 DPMSOffTime; +extern _X_EXPORT CARD16 DPMSPowerLevel; +extern _X_EXPORT Bool defaultDPMSEnabled; +extern _X_EXPORT Bool DPMSEnabled; +extern _X_EXPORT Bool DPMSEnabledSwitch; +extern _X_EXPORT Bool DPMSDisabledSwitch; +extern _X_EXPORT Bool DPMSCapableFlag; #endif #ifdef PANORAMIX -extern Bool PanoramiXExtensionDisabledHack; +extern _X_EXPORT Bool PanoramiXExtensionDisabledHack; #endif #ifdef COMPOSITE -extern Bool noCompositeExtension; +extern _X_EXPORT Bool noCompositeExtension; #endif #ifdef DAMAGE -extern Bool noDamageExtension; +extern _X_EXPORT Bool noDamageExtension; #endif #ifdef DBE -extern Bool noDbeExtension; +extern _X_EXPORT Bool noDbeExtension; #endif #ifdef DPMSExtension -extern Bool noDPMSExtension; +extern _X_EXPORT Bool noDPMSExtension; #endif #ifdef GLXEXT -extern Bool noGlxExtension; +extern _X_EXPORT Bool noGlxExtension; #endif #ifdef SCREENSAVER -extern Bool noScreenSaverExtension; +extern _X_EXPORT Bool noScreenSaverExtension; #endif #ifdef MITSHM -extern Bool noMITShmExtension; +extern _X_EXPORT Bool noMITShmExtension; #endif #ifdef MULTIBUFFER -extern Bool noMultibufferExtension; +extern _X_EXPORT Bool noMultibufferExtension; #endif #ifdef RANDR -extern Bool noRRExtension; +extern _X_EXPORT Bool noRRExtension; #endif #ifdef RENDER -extern Bool noRenderExtension; +extern _X_EXPORT Bool noRenderExtension; #endif #ifdef XCSECURITY -extern Bool noSecurityExtension; +extern _X_EXPORT Bool noSecurityExtension; #endif #ifdef RES -extern Bool noResExtension; +extern _X_EXPORT Bool noResExtension; #endif #ifdef XF86BIGFONT -extern Bool noXFree86BigfontExtension; +extern _X_EXPORT Bool noXFree86BigfontExtension; #endif #ifdef XFreeXDGA -extern Bool noXFree86DGAExtension; +extern _X_EXPORT Bool noXFree86DGAExtension; #endif #ifdef XF86DRI -extern Bool noXFree86DRIExtension; +extern _X_EXPORT Bool noXFree86DRIExtension; #endif #ifdef XF86VIDMODE -extern Bool noXFree86VidModeExtension; +extern _X_EXPORT Bool noXFree86VidModeExtension; #endif #ifdef XFIXES -extern Bool noXFixesExtension; +extern _X_EXPORT Bool noXFixesExtension; #endif #ifdef XKB -/* |noXkbExtension| is defined in xc/programs/Xserver/xkb/xkbInit.c */ -extern Bool noXkbExtension; +/* noXkbExtension is defined in xkb/xkbInit.c */ +extern _X_EXPORT Bool noXkbExtension; #endif #ifdef PANORAMIX -extern Bool noPanoramiXExtension; +extern _X_EXPORT Bool noPanoramiXExtension; #endif #ifdef XSELINUX -extern Bool noSELinuxExtension; +extern _X_EXPORT Bool noSELinuxExtension; #define SELINUX_MODE_DEFAULT 0 #define SELINUX_MODE_DISABLED 1 #define SELINUX_MODE_PERMISSIVE 2 #define SELINUX_MODE_ENFORCING 3 -extern int selinuxEnforcingState; +extern _X_EXPORT int selinuxEnforcingState; #endif #ifdef XV -extern Bool noXvExtension; +extern _X_EXPORT Bool noXvExtension; +#endif + +#ifdef DRI2 +extern _X_EXPORT Bool noDRI2Extension; #endif #endif /* !_XSERV_GLOBAL_H_ */ |