summaryrefslogtreecommitdiff
path: root/miext
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 /miext
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 'miext')
-rw-r--r--miext/damage/damage.c32
-rw-r--r--miext/damage/damage.h32
-rw-r--r--miext/shadow/shadow.c10
-rw-r--r--miext/shadow/shadow.h56
-rw-r--r--miext/shadow/shalloc.c2
-rw-r--r--miext/shadow/shpacked.c4
-rw-r--r--miext/shadow/shplanar.c6
-rw-r--r--miext/shadow/shplanar8.c2
-rw-r--r--miext/shadow/shrotate.c4
-rw-r--r--miext/shadow/shrotpack.h2
10 files changed, 75 insertions, 75 deletions
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 74d87e37c..9e0533fa5 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1859,7 +1859,7 @@ damageCloseScreen (int i, ScreenPtr pScreen)
* Public functions for consumption outside this file.
*/
-_X_EXPORT Bool
+Bool
DamageSetup (ScreenPtr pScreen)
{
DamageScrPrivPtr pScrPriv;
@@ -1898,7 +1898,7 @@ DamageSetup (ScreenPtr pScreen)
return TRUE;
}
-_X_EXPORT DamagePtr
+DamagePtr
DamageCreate (DamageReportFunc damageReport,
DamageDestroyFunc damageDestroy,
DamageReportLevel damageLevel,
@@ -1930,7 +1930,7 @@ DamageCreate (DamageReportFunc damageReport,
return pDamage;
}
-_X_EXPORT void
+void
DamageRegister (DrawablePtr pDrawable,
DamagePtr pDamage)
{
@@ -1958,7 +1958,7 @@ DamageRegister (DrawablePtr pDrawable,
damageInsertDamage (getDrawableDamageRef (pDrawable), pDamage);
}
-_X_EXPORT void
+void
DamageDrawInternal (ScreenPtr pScreen, Bool enable)
{
damageScrPriv (pScreen);
@@ -1966,7 +1966,7 @@ DamageDrawInternal (ScreenPtr pScreen, Bool enable)
pScrPriv->internalLevel += enable ? 1 : -1;
}
-_X_EXPORT void
+void
DamageUnregister (DrawablePtr pDrawable,
DamagePtr pDamage)
{
@@ -2001,7 +2001,7 @@ DamageUnregister (DrawablePtr pDrawable,
damageRemoveDamage (getDrawableDamageRef (pDrawable), pDamage);
}
-_X_EXPORT void
+void
DamageDestroy (DamagePtr pDamage)
{
if (pDamage->damageDestroy)
@@ -2011,7 +2011,7 @@ DamageDestroy (DamagePtr pDamage)
xfree (pDamage);
}
-_X_EXPORT Bool
+Bool
DamageSubtract (DamagePtr pDamage,
const RegionPtr pRegion)
{
@@ -2044,31 +2044,31 @@ DamageSubtract (DamagePtr pDamage,
return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage);
}
-_X_EXPORT void
+void
DamageEmpty (DamagePtr pDamage)
{
REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage);
}
-_X_EXPORT RegionPtr
+RegionPtr
DamageRegion (DamagePtr pDamage)
{
return &pDamage->damage;
}
-_X_EXPORT RegionPtr
+RegionPtr
DamagePendingRegion (DamagePtr pDamage)
{
return &pDamage->pendingDamage;
}
-_X_EXPORT void
+void
DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion)
{
damageRegionAppend (pDrawable, pRegion, FALSE, -1);
}
-_X_EXPORT void
+void
DamageRegionProcessPending (DrawablePtr pDrawable)
{
damageRegionProcessPending (pDrawable);
@@ -2077,7 +2077,7 @@ DamageRegionProcessPending (DrawablePtr pDrawable)
/* If a damage marker is provided, then this function must be called after rendering is done. */
/* Please do call back so any future enhancements can assume this function is called. */
/* There are no strict timing requirements for calling this function, just as soon as (is cheaply) possible. */
-_X_EXPORT void
+void
DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion)
{
if (pDamage->damageReportPostRendering)
@@ -2085,7 +2085,7 @@ DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDa
}
/* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */
-_X_EXPORT void
+void
DamageDamageRegion (DrawablePtr pDrawable,
RegionPtr pRegion)
{
@@ -2098,13 +2098,13 @@ DamageDamageRegion (DrawablePtr pDrawable,
damageRegionProcessPending (pDrawable);
}
-_X_EXPORT void
+void
DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter)
{
pDamage->reportAfter = reportAfter;
}
-_X_EXPORT void
+void
DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering,
DamageMarkerFunc damageMarker)
{
diff --git a/miext/damage/damage.h b/miext/damage/damage.h
index a70f1f86e..9ead92567 100644
--- a/miext/damage/damage.h
+++ b/miext/damage/damage.h
@@ -43,10 +43,10 @@ typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure);
/* At some point DamageRegionRendered() must be called. */
typedef void (*DamageMarkerFunc) (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion, void *closure);
-Bool
+extern _X_EXPORT Bool
DamageSetup (ScreenPtr pScreen);
-DamagePtr
+extern _X_EXPORT DamagePtr
DamageCreate (DamageReportFunc damageReport,
DamageDestroyFunc damageDestroy,
DamageReportLevel damageLevel,
@@ -54,54 +54,54 @@ DamageCreate (DamageReportFunc damageReport,
ScreenPtr pScreen,
void * closure);
-void
+extern _X_EXPORT void
DamageDrawInternal (ScreenPtr pScreen, Bool enable);
-void
+extern _X_EXPORT void
DamageRegister (DrawablePtr pDrawable,
DamagePtr pDamage);
-void
+extern _X_EXPORT void
DamageUnregister (DrawablePtr pDrawable,
DamagePtr pDamage);
-void
+extern _X_EXPORT void
DamageDestroy (DamagePtr pDamage);
-Bool
+extern _X_EXPORT Bool
DamageSubtract (DamagePtr pDamage,
const RegionPtr pRegion);
-void
+extern _X_EXPORT void
DamageEmpty (DamagePtr pDamage);
-RegionPtr
+extern _X_EXPORT RegionPtr
DamageRegion (DamagePtr pDamage);
-RegionPtr
+extern _X_EXPORT RegionPtr
DamagePendingRegion (DamagePtr pDamage);
/* In case of rendering, call this before the submitting the commands. */
-void
+extern _X_EXPORT void
DamageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion);
/* Call this directly after the rendering operation has been submitted. */
-void
+extern _X_EXPORT void
DamageRegionProcessPending (DrawablePtr pDrawable);
/* Call this some time after rendering is done, only relevant when a damageMarker is provided. */
-void
+extern _X_EXPORT void
DamageRegionRendered (DrawablePtr pDrawable, DamagePtr pDamage, RegionPtr pOldDamage, RegionPtr pRegion);
/* Avoid using this call, it only exists for API compatibility. */
-void
+extern _X_EXPORT void
DamageDamageRegion (DrawablePtr pDrawable,
const RegionPtr pRegion);
-void
+extern _X_EXPORT void
DamageSetReportAfterOp (DamagePtr pDamage, Bool reportAfter);
-void
+extern _X_EXPORT void
DamageSetPostRenderingFunctions(DamagePtr pDamage, DamageReportFunc damageReportPostRendering,
DamageMarkerFunc damageMarker);
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index a18a42089..21f1de2d5 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -37,7 +37,7 @@
#include "shadow.h"
static int shadowScrPrivateKeyIndex;
-_X_EXPORT DevPrivateKey shadowScrPrivateKey = &shadowScrPrivateKeyIndex;
+DevPrivateKey shadowScrPrivateKey = &shadowScrPrivateKeyIndex;
#define wrap(priv, real, mem) {\
priv->mem = real->mem; \
@@ -131,7 +131,7 @@ shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure)
}
#endif
-_X_EXPORT Bool
+Bool
shadowSetup(ScreenPtr pScreen)
{
shadowBufPtr pBuf;
@@ -173,7 +173,7 @@ shadowSetup(ScreenPtr pScreen)
return TRUE;
}
-_X_EXPORT Bool
+Bool
shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update,
ShadowWindowProc window, int randr, void *closure)
{
@@ -210,7 +210,7 @@ shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update,
return TRUE;
}
-_X_EXPORT void
+void
shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap)
{
shadowBuf(pScreen);
@@ -228,7 +228,7 @@ shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap)
(pointer) pScreen);
}
-_X_EXPORT Bool
+Bool
shadowInit(ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window)
{
PixmapPtr pPixmap;
diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h
index ee99fe61f..ef85c0bb9 100644
--- a/miext/shadow/shadow.h
+++ b/miext/shadow/shadow.h
@@ -74,17 +74,17 @@ typedef struct _shadowBuf {
#define SHADOW_REFLECT_Y 32
#define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y)
-extern DevPrivateKey shadowScrPrivateKey;
+extern _X_EXPORT DevPrivateKey shadowScrPrivateKey;
#define shadowGetBuf(pScr) ((shadowBufPtr) \
dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey))
#define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr)
#define shadowDamage(pBuf) DamageRegion(pBuf->pDamage)
-Bool
+extern _X_EXPORT Bool
shadowSetup (ScreenPtr pScreen);
-Bool
+extern _X_EXPORT Bool
shadowAdd (ScreenPtr pScreen,
PixmapPtr pPixmap,
ShadowUpdateProc update,
@@ -92,92 +92,92 @@ shadowAdd (ScreenPtr pScreen,
int randr,
void *closure);
-void
+extern _X_EXPORT void
shadowRemove (ScreenPtr pScreen, PixmapPtr pPixmap);
-Bool
+extern _X_EXPORT Bool
shadowInit (ScreenPtr pScreen, ShadowUpdateProc update, ShadowWindowProc window);
-void *
+extern _X_EXPORT void *
shadowAlloc (int width, int height, int bpp);
-void
+extern _X_EXPORT void
shadowUpdatePacked (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdatePlanar4 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdatePlanar4x8 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotatePacked (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate8_90 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16_90 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16_90YX (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate32_90 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate8_180 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16_180 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate32_180 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate8_270 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16_270 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16_270YX (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate32_270 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate8 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate16 (ScreenPtr pScreen,
shadowBufPtr pBuf);
-void
+extern _X_EXPORT void
shadowUpdateRotate32 (ScreenPtr pScreen,
shadowBufPtr pBuf);
typedef void (* shadowUpdateProc)(ScreenPtr, shadowBufPtr);
-shadowUpdateProc shadowUpdatePackedWeak(void);
-shadowUpdateProc shadowUpdatePlanar4Weak(void);
-shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
-shadowUpdateProc shadowUpdateRotatePackedWeak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdatePackedWeak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4Weak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdatePlanar4x8Weak(void);
+extern _X_EXPORT shadowUpdateProc shadowUpdateRotatePackedWeak(void);
#endif /* _SHADOW_H_ */
diff --git a/miext/shadow/shalloc.c b/miext/shadow/shalloc.c
index 5aefb7d39..72aa28b14 100644
--- a/miext/shadow/shalloc.c
+++ b/miext/shadow/shalloc.c
@@ -37,7 +37,7 @@
#include "gcstruct.h"
#include "shadow.h"
-_X_EXPORT void *
+void *
shadowAlloc (int width, int height, int bpp)
{
int stride;
diff --git a/miext/shadow/shpacked.c b/miext/shadow/shpacked.c
index f4717ff68..6736162e2 100644
--- a/miext/shadow/shpacked.c
+++ b/miext/shadow/shpacked.c
@@ -40,7 +40,7 @@
#include "shadow.h"
#include "fb.h"
-_X_EXPORT void
+void
shadowUpdatePacked (ScreenPtr pScreen,
shadowBufPtr pBuf)
{
@@ -112,7 +112,7 @@ shadowUpdatePacked (ScreenPtr pScreen,
}
}
-_X_EXPORT shadowUpdateProc
+shadowUpdateProc
shadowUpdatePackedWeak(void) {
return shadowUpdatePacked;
}
diff --git a/miext/shadow/shplanar.c b/miext/shadow/shplanar.c
index 5fc86ee6b..b5983dc73 100644
--- a/miext/shadow/shplanar.c
+++ b/miext/shadow/shplanar.c
@@ -86,7 +86,7 @@
}
#endif
-_X_EXPORT void
+void
shadowUpdatePlanar4 (ScreenPtr pScreen,
shadowBufPtr pBuf)
{
@@ -171,10 +171,10 @@ shadowUpdatePlanar4 (ScreenPtr pScreen,
}
}
-_X_EXPORT shadowUpdateProc shadowUpdatePlanar4Weak(void) {
+shadowUpdateProc shadowUpdatePlanar4Weak(void) {
return shadowUpdatePlanar4;
}
-_X_EXPORT shadowUpdateProc shadowUpdatePlanar4x8Weak(void) {
+shadowUpdateProc shadowUpdatePlanar4x8Weak(void) {
return shadowUpdatePlanar4x8;
}
diff --git a/miext/shadow/shplanar8.c b/miext/shadow/shplanar8.c
index a4a392b8c..6d8defa58 100644
--- a/miext/shadow/shplanar8.c
+++ b/miext/shadow/shplanar8.c
@@ -89,7 +89,7 @@
}
#endif
-_X_EXPORT void
+void
shadowUpdatePlanar4x8 (ScreenPtr pScreen,
shadowBufPtr pBuf)
{
diff --git a/miext/shadow/shrotate.c b/miext/shadow/shrotate.c
index fd159154d..673cd76b5 100644
--- a/miext/shadow/shrotate.c
+++ b/miext/shadow/shrotate.c
@@ -48,7 +48,7 @@
#define TOP_TO_BOTTOM 2
#define BOTTOM_TO_TOP -2
-_X_EXPORT void
+void
shadowUpdateRotatePacked (ScreenPtr pScreen,
shadowBufPtr pBuf)
{
@@ -308,6 +308,6 @@ shadowUpdateRotatePacked (ScreenPtr pScreen,
}
}
-_X_EXPORT shadowUpdateProc shadowUpdateRotatePackedWeak(void) {
+shadowUpdateProc shadowUpdateRotatePackedWeak(void) {
return shadowUpdateRotatePacked;
}
diff --git a/miext/shadow/shrotpack.h b/miext/shadow/shrotpack.h
index f49b174dd..015a98595 100644
--- a/miext/shadow/shrotpack.h
+++ b/miext/shadow/shrotpack.h
@@ -93,7 +93,7 @@
#endif
-_X_EXPORT void
+void
FUNC (ScreenPtr pScreen,
shadowBufPtr pBuf)
{