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 /render/picture.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 'render/picture.c')
-rw-r--r-- | render/picture.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/render/picture.c b/render/picture.c index 0be9997a5..f99c53f86 100644 --- a/render/picture.c +++ b/render/picture.c @@ -44,16 +44,16 @@ #include "registry.h" static int PictureScreenPrivateKeyIndex; -_X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; +DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; static int PictureWindowPrivateKeyIndex; -_X_EXPORT DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKeyIndex; +DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKeyIndex; static int PictureGeneration; -_X_EXPORT RESTYPE PictureType; -_X_EXPORT RESTYPE PictFormatType; -_X_EXPORT RESTYPE GlyphSetType; -_X_EXPORT int PictureCmapPolicy = PictureCmapPolicyDefault; +RESTYPE PictureType; +RESTYPE PictFormatType; +RESTYPE GlyphSetType; +int PictureCmapPolicy = PictureCmapPolicyDefault; -_X_EXPORT Bool +Bool PictureDestroyWindow (WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; @@ -75,7 +75,7 @@ PictureDestroyWindow (WindowPtr pWindow) return ret; } -_X_EXPORT Bool +Bool PictureCloseScreen (int index, ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); @@ -95,7 +95,7 @@ PictureCloseScreen (int index, ScreenPtr pScreen) return ret; } -_X_EXPORT void +void PictureStoreColors (ColormapPtr pColormap, int ndef, xColorItem *pdef) { ScreenPtr pScreen = pColormap->pScreen; @@ -163,7 +163,7 @@ addFormat (FormatInitRec formats[256], #define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1)) -_X_EXPORT PictFormatPtr +PictFormatPtr PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) { int nformats, f; @@ -401,7 +401,7 @@ PictureFindVisual (ScreenPtr pScreen, VisualID visual) return 0; } -_X_EXPORT Bool +Bool PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -441,7 +441,7 @@ PictureInitIndexedFormats (ScreenPtr pScreen) return TRUE; } -_X_EXPORT Bool +Bool PictureFinishInit (void) { int s; @@ -456,7 +456,7 @@ PictureFinishInit (void) return TRUE; } -_X_EXPORT Bool +Bool PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -468,7 +468,7 @@ PictureSetSubpixelOrder (ScreenPtr pScreen, int subpixel) } -_X_EXPORT int +int PictureGetSubpixelOrder (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -478,7 +478,7 @@ PictureGetSubpixelOrder (ScreenPtr pScreen) return ps->subpixel; } -_X_EXPORT PictFormatPtr +PictFormatPtr PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -531,7 +531,7 @@ PictureMatchVisual (ScreenPtr pScreen, int depth, VisualPtr pVisual) return 0; } -_X_EXPORT PictFormatPtr +PictFormatPtr PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 f) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); @@ -551,7 +551,7 @@ PictureMatchFormat (ScreenPtr pScreen, int depth, CARD32 f) return 0; } -_X_EXPORT int +int PictureParseCmapPolicy (const char *name) { if ( strcmp (name, "default" ) == 0) @@ -568,7 +568,7 @@ PictureParseCmapPolicy (const char *name) return PictureCmapPolicyInvalid; } -_X_EXPORT Bool +Bool PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; @@ -668,7 +668,7 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) return TRUE; } -_X_EXPORT void +void SetPictureToDefaults (PicturePtr pPicture) { pPicture->refcnt = 1; @@ -702,7 +702,7 @@ SetPictureToDefaults (PicturePtr pPicture) pPicture->pSourcePict = 0; } -_X_EXPORT PicturePtr +PicturePtr CreatePicture (Picture pid, DrawablePtr pDrawable, PictFormatPtr pFormat, @@ -797,7 +797,7 @@ static unsigned int INTERPOLATE_PIXEL_256(unsigned int x, unsigned int a, return x; } -_X_EXPORT CARD32 +CARD32 PictureGradientColor (PictGradientStopPtr stop1, PictGradientStopPtr stop2, CARD32 x) @@ -868,7 +868,7 @@ static PicturePtr createSourcePicture(void) return pPicture; } -_X_EXPORT PicturePtr +PicturePtr CreateSolidPicture (Picture pid, xRenderColor *color, int *error) { PicturePtr pPicture; @@ -890,7 +890,7 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) return pPicture; } -_X_EXPORT PicturePtr +PicturePtr CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, int nStops, xFixed *stops, xRenderColor *colors, int *error) { @@ -929,7 +929,7 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, #define FixedToDouble(x) ((x)/65536.) -_X_EXPORT PicturePtr +PicturePtr CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer, xFixed innerRadius, xFixed outerRadius, int nStops, xFixed *stops, xRenderColor *colors, int *error) @@ -979,7 +979,7 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer return pPicture; } -_X_EXPORT PicturePtr +PicturePtr CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, int nStops, xFixed *stops, xRenderColor *colors, int *error) { @@ -1020,7 +1020,7 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, #define NEXT_PTR(_type) ((_type) ulist++->ptr) -_X_EXPORT int +int ChangePicture (PicturePtr pPicture, Mask vmask, XID *vlist, @@ -1249,7 +1249,7 @@ ChangePicture (PicturePtr pPicture, return error; } -_X_EXPORT int +int SetPictureClipRects (PicturePtr pPicture, int xOrigin, int yOrigin, @@ -1277,7 +1277,7 @@ SetPictureClipRects (PicturePtr pPicture, return result; } -_X_EXPORT int +int SetPictureClipRegion (PicturePtr pPicture, int xOrigin, int yOrigin, @@ -1335,7 +1335,7 @@ transformIsIdentity(PictTransform *t) (t->matrix[2][1] == 0)); } -_X_EXPORT int +int SetPictureTransform (PicturePtr pPicture, PictTransform *transform) { @@ -1374,7 +1374,7 @@ SetPictureTransform (PicturePtr pPicture, return Success; } -_X_EXPORT void +void CopyPicture (PicturePtr pSrc, Mask mask, PicturePtr pDst) @@ -1471,7 +1471,7 @@ ValidateOnePicture (PicturePtr pPicture) } } -_X_EXPORT void +void ValidatePicture(PicturePtr pPicture) { ValidateOnePicture (pPicture); @@ -1479,7 +1479,7 @@ ValidatePicture(PicturePtr pPicture) ValidateOnePicture (pPicture->alphaMap); } -_X_EXPORT int +int FreePicture (pointer value, XID pid) { @@ -1535,7 +1535,7 @@ FreePicture (pointer value, return Success; } -_X_EXPORT int +int FreePictFormat (pointer pPictFormat, XID pid) { @@ -1647,7 +1647,7 @@ ReduceCompositeOp (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, return op; } -_X_EXPORT void +void CompositePicture (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -1686,7 +1686,7 @@ CompositePicture (CARD8 op, height); } -_X_EXPORT void +void CompositeRects (CARD8 op, PicturePtr pDst, xRenderColor *color, @@ -1699,7 +1699,7 @@ CompositeRects (CARD8 op, (*ps->CompositeRects) (op, pDst, color, nRect, rects); } -_X_EXPORT void +void CompositeTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1716,7 +1716,7 @@ CompositeTrapezoids (CARD8 op, (*ps->Trapezoids) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, traps); } -_X_EXPORT void +void CompositeTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1733,7 +1733,7 @@ CompositeTriangles (CARD8 op, (*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntriangles, triangles); } -_X_EXPORT void +void CompositeTriStrip (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1750,7 +1750,7 @@ CompositeTriStrip (CARD8 op, (*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); } -_X_EXPORT void +void CompositeTriFan (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1767,7 +1767,7 @@ CompositeTriFan (CARD8 op, (*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); } -_X_EXPORT void +void AddTraps (PicturePtr pPicture, INT16 xOff, INT16 yOff, |