summaryrefslogtreecommitdiff
path: root/miext/shadow
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/shadow
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/shadow')
-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
8 files changed, 43 insertions, 43 deletions
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)
{