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/vbe/vbe.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 'hw/xfree86/vbe/vbe.h')
-rw-r--r-- | hw/xfree86/vbe/vbe.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/hw/xfree86/vbe/vbe.h b/hw/xfree86/vbe/vbe.h index 7f05e6b23..b1ec5a9fb 100644 --- a/hw/xfree86/vbe/vbe.h +++ b/hw/xfree86/vbe/vbe.h @@ -37,10 +37,10 @@ typedef struct { #define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1) #define VBE_VERSION_MINOR(x) (CARD8)(x) -vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); -vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); -void vbeFree(vbeInfoPtr pVbe); -xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); +extern _X_EXPORT vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); +extern _X_EXPORT vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); +extern _X_EXPORT void vbeFree(vbeInfoPtr pVbe); +extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); #pragma pack(1) @@ -99,8 +99,8 @@ struct _VbeInfoBlock { } __attribute__((packed)); /* Return Super VGA Information */ -VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); -void VBEFreeVBEInfo(VbeInfoBlock *block); +extern _X_EXPORT VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEFreeVBEInfo(VbeInfoBlock *block); /* * INT 1 @@ -163,8 +163,8 @@ struct _VbeModeInfoBlock { } __attribute__((packed)); /* Return VBE Mode Information */ -VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); -void VBEFreeModeInfo(VbeModeInfoBlock *block); +extern _X_EXPORT VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT void VBEFreeModeInfo(VbeModeInfoBlock *block); /* * INT2 @@ -189,13 +189,13 @@ struct _VbeCRTCInfoBlock { } __attribute__((packed)); /* VbeCRTCInfoBlock is in the VESA 3.0 specs */ -Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); +extern _X_EXPORT Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); /* * INT 3 */ -Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); +extern _X_EXPORT Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); /* * INT 4 @@ -217,7 +217,7 @@ typedef enum { MODE_RESTORE } vbeSaveRestoreFunction; -Bool +extern _X_EXPORT Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, pointer *memory, int *size, int *real_mode_pages); @@ -225,7 +225,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, * INT 5 */ -Bool +extern _X_EXPORT Bool VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window); /* @@ -251,7 +251,7 @@ typedef enum { #define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \ pixels, bytes, max) -Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, +extern _X_EXPORT Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max); @@ -260,15 +260,15 @@ Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, */ /* 16 bit code */ -Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); -Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); +extern _X_EXPORT Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); +extern _X_EXPORT Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); /* * INT 8 */ /* if bits is 0, then it is a GET */ -int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); +extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); /* * INT 9 @@ -280,7 +280,7 @@ int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); * If setting a palette, it will return the pointer received on success, * NULL on failure. */ -CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, +extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace); #define VBEFreePaletteData(data) xfree(data) @@ -294,7 +294,7 @@ typedef struct _VBEpmi { int tbl_len; } VBEpmi; -VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); +extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); #define VESAFreeVBEpmi(pmi) xfree(pmi) /* high level helper functions */ @@ -315,12 +315,12 @@ typedef struct { int stateMode; } vbeSaveRestoreRec, *vbeSaveRestorePtr; -void +extern _X_EXPORT void VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbeSaveRestoreFunction function); -int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); -Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); +extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); struct vbePanelID { short hsize; @@ -335,7 +335,7 @@ struct vbePanelID { char reserved[14]; }; -void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); -struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); +extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); #endif |