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/common | |
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/common')
45 files changed, 1057 insertions, 961 deletions
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 77ab4c386..ca452c6f9 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -10,6 +10,10 @@ XVSOURCES = xf86xv.c xf86xvmc.c XVSDKINCS = xf86xv.h xf86xvmc.h endif +if XF86VIDMODE +XF86VMODE_SDK = vidmodeproc.h +endif + XISOURCES = xf86Xinput.c xisb.c XISDKINCS = xf86Xinput.h xisb.h RANDRSOURCES = xf86RandR.c @@ -46,7 +50,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ - $(XVSDKINCS) xorgVersion.h \ + $(XVSDKINCS) $(XF86VMODE_SDK) xorgVersion.h \ xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h DISTCLEANFILES = xf86Build.h @@ -56,6 +60,7 @@ EXTRA_DIST = \ compiler.h \ fourcc.h \ scoasm.h \ + vidmodeproc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index 285d9a3f6..5a3d1268f 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -87,37 +87,37 @@ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ -extern void outb(unsigned short, unsigned char); -extern void outw(unsigned short, unsigned short); -extern void outl(unsigned short, unsigned int); -extern unsigned int inb(unsigned short); -extern unsigned int inw(unsigned short); -extern unsigned int inl(unsigned short); +extern _X_EXPORT void outb(unsigned short, unsigned char); +extern _X_EXPORT void outw(unsigned short, unsigned short); +extern _X_EXPORT void outl(unsigned short, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned short); +extern _X_EXPORT unsigned int inw(unsigned short); +extern _X_EXPORT unsigned int inl(unsigned short); # else /* __sparc__, __arm32__, __alpha__*/ -extern void outb(unsigned long, unsigned char); -extern void outw(unsigned long, unsigned short); -extern void outl(unsigned long, unsigned int); -extern unsigned int inb(unsigned long); -extern unsigned int inw(unsigned long); -extern unsigned int inl(unsigned long); +extern _X_EXPORT void outb(unsigned long, unsigned char); +extern _X_EXPORT void outw(unsigned long, unsigned short); +extern _X_EXPORT void outl(unsigned long, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned long); +extern _X_EXPORT unsigned int inw(unsigned long); +extern _X_EXPORT unsigned int inl(unsigned long); # endif /* __sparc__, __arm32__, __alpha__ */ # endif /* __arm__ */ -extern unsigned long ldq_u(unsigned long *); -extern unsigned long ldl_u(unsigned int *); -extern unsigned long ldw_u(unsigned short *); -extern void stq_u(unsigned long, unsigned long *); -extern void stl_u(unsigned long, unsigned int *); -extern void stw_u(unsigned long, unsigned short *); -extern void mem_barrier(void); -extern void write_mem_barrier(void); -extern void stl_brx(unsigned long, volatile unsigned char *, int); -extern void stw_brx(unsigned short, volatile unsigned char *, int); -extern unsigned long ldl_brx(volatile unsigned char *, int); -extern unsigned short ldw_brx(volatile unsigned char *, int); +extern _X_EXPORT unsigned long ldq_u(unsigned long *); +extern _X_EXPORT unsigned long ldl_u(unsigned int *); +extern _X_EXPORT unsigned long ldw_u(unsigned short *); +extern _X_EXPORT void stq_u(unsigned long, unsigned long *); +extern _X_EXPORT void stl_u(unsigned long, unsigned int *); +extern _X_EXPORT void stw_u(unsigned long, unsigned short *); +extern _X_EXPORT void mem_barrier(void); +extern _X_EXPORT void write_mem_barrier(void); +extern _X_EXPORT void stl_brx(unsigned long, volatile unsigned char *, int); +extern _X_EXPORT void stw_brx(unsigned short, volatile unsigned char *, int); +extern _X_EXPORT unsigned long ldl_brx(volatile unsigned char *, int); +extern _X_EXPORT unsigned short ldw_brx(volatile unsigned char *, int); # endif @@ -130,42 +130,42 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void (*_alpha_outb)(char val, unsigned long port); +extern _X_EXPORT void (*_alpha_outb)(char val, unsigned long port); static __inline__ void outb(unsigned long port, unsigned char val) { _alpha_outb(val, port); } -extern void (*_alpha_outw)(short val, unsigned long port); +extern _X_EXPORT void (*_alpha_outw)(short val, unsigned long port); static __inline__ void outw(unsigned long port, unsigned short val) { _alpha_outw(val, port); } -extern void (*_alpha_outl)(int val, unsigned long port); +extern _X_EXPORT void (*_alpha_outl)(int val, unsigned long port); static __inline__ void outl(unsigned long port, unsigned int val) { _alpha_outl(val, port); } -extern unsigned int (*_alpha_inb)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inb)(unsigned long port); static __inline__ unsigned int inb(unsigned long port) { return _alpha_inb(port); } -extern unsigned int (*_alpha_inw)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inw)(unsigned long port); static __inline__ unsigned int inw(unsigned long port) { return _alpha_inw(port); } -extern unsigned int (*_alpha_inl)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inl)(unsigned long port); static __inline__ unsigned int inl(unsigned long port) { @@ -182,12 +182,12 @@ inl(unsigned long port) /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void outb(unsigned int port, unsigned char val); -extern void outw(unsigned int port, unsigned short val); -extern void outl(unsigned int port, unsigned int val); -extern unsigned char inb(unsigned int port); -extern unsigned short inw(unsigned int port); -extern unsigned int inl(unsigned int port); +extern _X_EXPORT void outb(unsigned int port, unsigned char val); +extern _X_EXPORT void outw(unsigned int port, unsigned short val); +extern _X_EXPORT void outl(unsigned int port, unsigned int val); +extern _X_EXPORT unsigned char inb(unsigned int port); +extern _X_EXPORT unsigned short inw(unsigned int port); +extern _X_EXPORT unsigned int inl(unsigned int port); # endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */ @@ -458,12 +458,12 @@ __ustw (unsigned long r5, unsigned short * r11) # undef inb # undef inw # undef inl -extern void outb(unsigned long port, unsigned char val); -extern void outw(unsigned long port, unsigned short val); -extern void outl(unsigned long port, unsigned int val); -extern unsigned int inb(unsigned long port); -extern unsigned int inw(unsigned long port); -extern unsigned int inl(unsigned long port); +extern _X_EXPORT void outb(unsigned long port, unsigned char val); +extern _X_EXPORT void outw(unsigned long port, unsigned short val); +extern _X_EXPORT void outl(unsigned long port, unsigned int val); +extern _X_EXPORT unsigned int inb(unsigned long port); +extern _X_EXPORT unsigned int inw(unsigned long port); +extern _X_EXPORT unsigned int inl(unsigned long port); # elif defined(linux) && defined(__amd64__) @@ -870,7 +870,7 @@ static __inline__ void stw_u(unsigned long val, unsigned short *p) # define PORT_SIZE short # endif -unsigned int IOPortBase; /* Memory mapped I/O port area */ +_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) @@ -1038,7 +1038,7 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, # define MAP_FAILED ((void *)-1) # endif -extern volatile unsigned char *ioBase; +extern _X_EXPORT volatile unsigned char *ioBase; #if defined(linux) && defined(__powerpc64__) # include <linux/version.h> @@ -1522,10 +1522,10 @@ inl(unsigned short port) # ifdef __alpha__ /* entry points for Mmio memory access routines */ -extern int (*xf86ReadMmio8)(void *, unsigned long); -extern int (*xf86ReadMmio16)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio8)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio16)(void *, unsigned long); # ifndef STANDALONE_MMIO -extern int (*xf86ReadMmio32)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio32)(void *, unsigned long); # else /* Some DRI 3D drivers need MMIO_IN32. */ static __inline__ int @@ -1535,14 +1535,14 @@ xf86ReadMmio32(void *Base, unsigned long Offset) return *(volatile unsigned int*)((unsigned long)Base+(Offset)); } # endif -extern void (*xf86WriteMmio8)(int, void *, unsigned long); -extern void (*xf86WriteMmio16)(int, void *, unsigned long); -extern void (*xf86WriteMmio32)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB8)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB16)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB32)(int, void *, unsigned long); -extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); -extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); +extern _X_EXPORT void (*xf86WriteMmio8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio32)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB32)(int, void *, unsigned long); +extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); +extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); /* Some macros to hide the system dependencies for MMIO accesses */ /* Changed to kill noise generated by gcc's -Wcast-align */ diff --git a/hw/xfree86/common/vidmodeproc.h b/hw/xfree86/common/vidmodeproc.h new file mode 100644 index 000000000..da4d05e1c --- /dev/null +++ b/hw/xfree86/common/vidmodeproc.h @@ -0,0 +1,77 @@ + +/* Prototypes for DGA functions that the DDX must provide */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _VIDMODEPROC_H_ +#define _VIDMODEPROC_H_ + + +typedef enum { + VIDMODE_H_DISPLAY, + VIDMODE_H_SYNCSTART, + VIDMODE_H_SYNCEND, + VIDMODE_H_TOTAL, + VIDMODE_H_SKEW, + VIDMODE_V_DISPLAY, + VIDMODE_V_SYNCSTART, + VIDMODE_V_SYNCEND, + VIDMODE_V_TOTAL, + VIDMODE_FLAGS, + VIDMODE_CLOCK +} VidModeSelectMode; + +typedef enum { + VIDMODE_MON_VENDOR, + VIDMODE_MON_MODEL, + VIDMODE_MON_NHSYNC, + VIDMODE_MON_NVREFRESH, + VIDMODE_MON_HSYNC_LO, + VIDMODE_MON_HSYNC_HI, + VIDMODE_MON_VREFRESH_LO, + VIDMODE_MON_VREFRESH_HI +} VidModeSelectMonitor; + +typedef union { + pointer ptr; + int i; + float f; +} vidMonitorValue; + +extern _X_EXPORT void XFree86VidModeExtensionInit(void); + +extern _X_EXPORT Bool VidModeAvailable(int scrnIndex); +extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom); +extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); +extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y); +extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock); +extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, pointer *monitor); +extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); +extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks); +extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode); +extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode); +extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, pointer mode); +extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock); +extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex); +extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); +extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); +extern _X_EXPORT pointer VidModeCreateMode(void); +extern _X_EXPORT void VidModeCopyMode(pointer modefrom, pointer modeto); +extern _X_EXPORT int VidModeGetModeValue(pointer mode, int valtyp); +extern _X_EXPORT void VidModeSetModeValue(pointer mode, int valtyp, int val); +extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx); +extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex); + +#endif + + diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 90e8ff871..957357654 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -55,23 +55,25 @@ #include "propertyst.h" /* General parameters */ -extern int xf86DoConfigure; -extern int xf86DoShowOptions; -extern Bool xf86DoModalias; -extern Bool xf86DoConfigurePass1; -extern DevPrivateKey xf86ScreenKey; -extern DevPrivateKey xf86CreateRootWindowKey; -extern DevPrivateKey xf86PixmapKey; -extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ -extern const unsigned char byte_reversed[256]; -extern Bool pciSlotClaimed; -extern Bool fbSlotClaimed; +extern _X_EXPORT int xf86DoConfigure; +extern _X_EXPORT int xf86DoShowOptions; +extern _X_EXPORT Bool xf86DoModalias; +extern _X_EXPORT Bool xf86DoConfigurePass1; +extern _X_EXPORT DevPrivateKey xf86ScreenKey; +extern _X_EXPORT DevPrivateKey xf86CreateRootWindowKey; +extern _X_EXPORT DevPrivateKey xf86PixmapKey; +extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ +extern _X_EXPORT const unsigned char byte_reversed[256]; +extern _X_EXPORT Bool pciSlotClaimed; +extern _X_EXPORT Bool fbSlotClaimed; #if defined(__sparc__) || defined(__sparc) -extern Bool sbusSlotClaimed; +extern _X_EXPORT Bool sbusSlotClaimed; #endif -extern confDRIRec xf86ConfigDRI; -extern Bool xf86inSuspend; -extern Bool xf86DRI2Enabled(void); +extern _X_EXPORT confDRIRec xf86ConfigDRI; +extern _X_EXPORT Bool xf86inSuspend; +extern _X_EXPORT Bool xf86DRI2Enabled(void); + +extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */ #define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \ xf86ScreenKey)) @@ -93,282 +95,285 @@ extern Bool xf86DRI2Enabled(void); /* xf86Bus.c */ -Bool xf86CheckPciSlot( const struct pci_device * ); -int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, +extern _X_EXPORT Bool xf86CheckPciSlot( const struct pci_device * ); +extern _X_EXPORT int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, +extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func); -Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); -void xf86FormatPciBusNumber(int busnum, char *buffer); -resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex); -int xf86GetFbInfoForScreen(int scrnIndex); -int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -void xf86EnableAccess(ScrnInfoPtr pScrn); -void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn); -Bool xf86IsPrimaryPci(struct pci_device * pPci); +extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); +extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer); +extern _X_EXPORT resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex); +extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex); +extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT void xf86EnableAccess(ScrnInfoPtr pScrn); +extern _X_EXPORT void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn); +extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci); /* new RAC */ -resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex); -void xf86FreeResList(resPtr rlist); -void xf86ClaimFixedResources(resList list, int entityIndex); -Bool xf86DriverHasEntities(DriverPtr drvp); -void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); -void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, +extern _X_EXPORT resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex); +extern _X_EXPORT void xf86FreeResList(resPtr rlist); +extern _X_EXPORT void xf86ClaimFixedResources(resList list, int entityIndex); +extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp); +extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance); -int xf86GetNumEntityInstances(int entityIndex); -GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); -void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); -EntityInfoPtr xf86GetEntityInfo(int entityIndex); -struct pci_device * xf86GetPciInfoForEntity(int entityIndex); -Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, +extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex); +extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); +extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); +extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex); +extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer); -void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type); -resPtr xf86RegisterResources(int entityIndex, resList list, +extern _X_EXPORT void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type); +extern _X_EXPORT resPtr xf86RegisterResources(int entityIndex, resList list, unsigned long Access); -Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); -void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, +extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); +extern _X_EXPORT void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, xf86SetAccessFuncPtr oldFuncs); -Bool xf86IsEntityPrimary(int entityIndex); -resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); -void xf86EnterServerState(xf86State state); -ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); -Bool xf86NoSharedResources(int screenIndex, resType res); -resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2); -void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg); -Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func); - -int xf86GetLastScrnFlag(int entityIndex); -void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); -Bool xf86IsEntityShared(int entityIndex); -void xf86SetEntityShared(int entityIndex); -Bool xf86IsEntitySharable(int entityIndex); -void xf86SetEntitySharable(int entityIndex); -Bool xf86IsPrimInitDone(int entityIndex); -void xf86SetPrimInitDone(int entityIndex); -void xf86ClearPrimInitDone(int entityIndex); -int xf86AllocateEntityPrivateIndex(void); -DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); +extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); +extern _X_EXPORT resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); +extern _X_EXPORT void xf86EnterServerState(xf86State state); +extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); +extern _X_EXPORT Bool xf86NoSharedResources(int screenIndex, resType res); +extern _X_EXPORT resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2); +extern _X_EXPORT void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg); +extern _X_EXPORT Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func); + +extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex); +extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); +extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex); +extern _X_EXPORT void xf86SetEntityShared(int entityIndex); +extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex); +extern _X_EXPORT void xf86SetEntitySharable(int entityIndex); +extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex); +extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void); +extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); /* xf86Configure.c */ -GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, +extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset); /* xf86Cursor.c */ -void xf86LockZoom(ScreenPtr pScreen, int lock); -void xf86InitViewport(ScrnInfoPtr pScr); -void xf86SetViewport(ScreenPtr pScreen, int x, int y); -void xf86ZoomViewport(ScreenPtr pScreen, int zoom); -Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); -void *xf86GetPointerScreenFuncs(void); -void xf86InitOrigins(void); -void xf86ReconfigureLayout(void); +extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock); +extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr); +extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y); +extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom); +extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); +extern _X_EXPORT void *xf86GetPointerScreenFuncs(void); +extern _X_EXPORT void xf86InitOrigins(void); +extern _X_EXPORT void xf86ReconfigureLayout(void); /* xf86cvt.c */ -DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, +extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); /* xf86DPMS.c */ -Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); +extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); + +extern _X_EXPORT int DPMSSet(ClientPtr client, int level); /* libextmod */ + /* xf86DGA.c */ -Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, +extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num); -Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); -xf86SetDGAModeProc xf86SetDGAMode; +extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); +extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode; /* xf86Events.c */ -void SetTimeSinceLastInputEvent(void); -pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveInputHandler(pointer handler); -void xf86DisableInputHandler(pointer handler); -void xf86EnableInputHandler(pointer handler); -pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveGeneralHandler(pointer handler); -void xf86DisableGeneralHandler(pointer handler); -void xf86EnableGeneralHandler(pointer handler); -void xf86InterceptSignals(int *signo); -void xf86InterceptSigIll(void (*sigillhandler)(void)); -Bool xf86EnableVTSwitch(Bool new); -void xf86ProcessActionEvent(ActionEvent action, void *arg); -void xf86PrintBacktrace(void); +extern _X_EXPORT void SetTimeSinceLastInputEvent(void); +extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveInputHandler(pointer handler); +extern _X_EXPORT void xf86DisableInputHandler(pointer handler); +extern _X_EXPORT void xf86EnableInputHandler(pointer handler); +extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler); +extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86InterceptSignals(int *signo); +extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler)(void)); +extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new); +extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg); +extern _X_EXPORT void xf86PrintBacktrace(void); /* xf86Helper.c */ -void xf86AddDriver(DriverPtr driver, pointer module, int flags); -void xf86DeleteDriver(int drvIndex); -ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); -void xf86DeleteScreen(int scrnIndex, int flags); -int xf86AllocateScrnInfoPrivateIndex(void); -Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); -Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, +extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteDriver(int drvIndex); +extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); +extern _X_EXPORT void xf86DeleteScreen(int scrnIndex, int flags); +extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void); +extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); +extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, int depth24flags); -void xf86PrintDepthBpp(ScrnInfoPtr scrp); -Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); -Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); -Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); -void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); -void xf86SetBlackWhitePixels(ScreenPtr pScreen); -void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); -void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp); +extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); +extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); +extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); +extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); +extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen); +extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); +extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args); -void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _printf_attribute(4,5); -void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) +extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) _printf_attribute(3,4); -void xf86MsgVerb(MessageType type, int verb, const char *format, ...) +extern _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...) _printf_attribute(3,4); -void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); -const char *xf86TokenToString(SymTabPtr table, int token); -int xf86StringToToken(SymTabPtr table, const char *string); -void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); -void xf86PrintChipsets(const char *drvname, const char *drvmsg, +extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); +extern _X_EXPORT const char *xf86TokenToString(SymTabPtr table, int token); +extern _X_EXPORT int xf86StringToToken(SymTabPtr table, const char *string); +extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); +extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips); -int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); -int xf86MatchPciInstances(const char *driverName, int vendorID, +extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); +extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -void xf86GetClocks(ScrnInfoPtr pScrn, int num, +extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, int maskval, int knownclkindex, int knownclkvalue); -void xf86SetPriority(Bool up); -const char *xf86GetVisualName(int visual); -int xf86GetVerbosity(void); -Pix24Flags xf86GetPix24(void); -int xf86GetDepth(void); -rgb xf86GetWeight(void); -Gamma xf86GetGamma(void); -Bool xf86GetFlipPixels(void); -const char *xf86GetServerName(void); -Bool xf86ServerIsExiting(void); -Bool xf86ServerIsResetting(void); -Bool xf86ServerIsInitialising(void); -Bool xf86ServerIsOnlyDetecting(void); -Bool xf86ServerIsOnlyProbing(void); -Bool xf86CaughtSignal(void); -Bool xf86GetVidModeAllowNonLocal(void); -Bool xf86GetVidModeEnabled(void); -Bool xf86GetModInDevAllowNonLocal(void); -Bool xf86GetModInDevEnabled(void); -Bool xf86GetAllowMouseOpenFail(void); -Bool xf86IsPc98(void); -void xf86DisableRandR(void); -CARD32 xorgGetVersion(void); -CARD32 xf86GetModuleVersion(pointer module); -pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); -pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); -pointer xf86LoadOneModule(char *name, pointer optlist); -void xf86UnloadSubModule(pointer mod); -Bool xf86LoaderCheckSymbol(const char *name); -void xf86LoaderReqSymLists(const char **, ...); -void xf86LoaderReqSymbols(const char *, ...); -void xf86LoaderRefSymLists(const char **, ...); -void xf86LoaderRefSymbols(const char *, ...); -void xf86SetBackingStore(ScreenPtr pScreen); -void xf86SetSilkenMouse(ScreenPtr pScreen); -pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, +extern _X_EXPORT void xf86SetPriority(Bool up); +extern _X_EXPORT const char *xf86GetVisualName(int visual); +extern _X_EXPORT int xf86GetVerbosity(void); +extern _X_EXPORT Pix24Flags xf86GetPix24(void); +extern _X_EXPORT int xf86GetDepth(void); +extern _X_EXPORT rgb xf86GetWeight(void); +extern _X_EXPORT Gamma xf86GetGamma(void); +extern _X_EXPORT Bool xf86GetFlipPixels(void); +extern _X_EXPORT const char *xf86GetServerName(void); +extern _X_EXPORT Bool xf86ServerIsExiting(void); +extern _X_EXPORT Bool xf86ServerIsResetting(void); +extern _X_EXPORT Bool xf86ServerIsInitialising(void); +extern _X_EXPORT Bool xf86ServerIsOnlyDetecting(void); +extern _X_EXPORT Bool xf86ServerIsOnlyProbing(void); +extern _X_EXPORT Bool xf86CaughtSignal(void); +extern _X_EXPORT Bool xf86GetVidModeAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetVidModeEnabled(void); +extern _X_EXPORT Bool xf86GetModInDevAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetModInDevEnabled(void); +extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); +extern _X_EXPORT Bool xf86IsPc98(void); +extern _X_EXPORT void xf86DisableRandR(void); +extern _X_EXPORT CARD32 xorgGetVersion(void); +extern _X_EXPORT CARD32 xf86GetModuleVersion(pointer module); +extern _X_EXPORT pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); +extern _X_EXPORT pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); +extern _X_EXPORT pointer xf86LoadOneModule(char *name, pointer optlist); +extern _X_EXPORT void xf86UnloadSubModule(pointer mod); +extern _X_EXPORT Bool xf86LoaderCheckSymbol(const char *name); +extern _X_EXPORT void xf86LoaderReqSymLists(const char **, ...); +extern _X_EXPORT void xf86LoaderReqSymbols(const char *, ...); +extern _X_EXPORT void xf86LoaderRefSymLists(const char **, ...); +extern _X_EXPORT void xf86LoaderRefSymbols(const char *, ...); +extern _X_EXPORT void xf86SetBackingStore(ScreenPtr pScreen); +extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen); +extern _X_EXPORT pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, char **adaptor_name, pointer *adaptor_options); -void xf86GetOS(const char **name, int *major, int *minor, int *teeny); -ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private); /* Obsolete! don't use */ -Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, +extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex,PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private); /* Obsolete! don't use */ -void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, +extern _X_EXPORT void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, +extern _X_EXPORT void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -Bool xf86IsScreenPrimary(int scrnIndex); -int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, +extern _X_EXPORT Bool xf86IsScreenPrimary(int scrnIndex); +extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value); -Bool xf86IsUnblank(int mode); +extern _X_EXPORT Bool xf86IsUnblank(int mode); -_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); -_X_DEPRECATED void xf86DeleteModuleInfo(int idx); +extern _X_EXPORT _X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); +extern _X_EXPORT _X_DEPRECATED void xf86DeleteModuleInfo(int idx); /* xf86Init.c */ -PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); -int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); /* xf86Mode.c */ -int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, +extern _X_EXPORT int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider); -const char *xf86ModeStatusToString(ModeStatus status); -ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, +extern _X_EXPORT const char *xf86ModeStatusToString(ModeStatus status); +extern _X_EXPORT ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy); -ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); -ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); +extern _X_EXPORT ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, int maxPitch, int virtualX, int virtualY); -ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags); -int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, +extern _X_EXPORT int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int minHeight, int maxHeight, int pitchInc, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); -void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); -void xf86PruneDriverModes(ScrnInfoPtr scrp); -void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); -void xf86PrintModes(ScrnInfoPtr scrp); -void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); -double xf86ModeHSync(const DisplayModeRec *mode); -double xf86ModeVRefresh(const DisplayModeRec *mode); -void xf86SetModeDefaultName(DisplayModePtr mode); -void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); -DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -Bool xf86ModesEqual(const DisplayModeRec *pMode1, +extern _X_EXPORT void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); +extern _X_EXPORT void xf86PruneDriverModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); +extern _X_EXPORT void xf86PrintModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); +extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec *mode); +extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec *mode); +extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); +extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); +extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); +extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); +extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2); -void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); -DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); +extern _X_EXPORT void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); +extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); /* xf86Option.c */ -void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); +extern _X_EXPORT void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); /* xf86RandR.c */ #ifdef RANDR -Bool xf86RandRInit (ScreenPtr pScreen); -Rotation xf86GetRotation(ScreenPtr pScreen); -Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, +extern _X_EXPORT Bool xf86RandRInit (ScreenPtr pScreen); +extern _X_EXPORT Rotation xf86GetRotation(ScreenPtr pScreen); +extern _X_EXPORT Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode); #endif /* xf86VidModeExtentionInit.c */ -Bool VidModeExtensionInit(ScreenPtr pScreen); +extern _X_EXPORT Bool VidModeExtensionInit(ScreenPtr pScreen); #endif /* _NO_XF86_PROTOTYPES */ diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index c825d236f..e0e3cb4b5 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -64,7 +64,7 @@ noopEnableDisable(void *arg) { } xf86AccessRec AccessNULL = { noopEnableDisable, noopEnableDisable, NULL }; -_X_EXPORT xf86CurrentAccessRec xf86CurrentAccess = {NULL,NULL}; +xf86CurrentAccessRec xf86CurrentAccess = {NULL,NULL}; BusRec primaryBus = { BUS_NONE, {{0}}}; @@ -75,16 +75,16 @@ static Bool xf86ResAccessEnter = FALSE; resPtr Acc = NULL; /* predefined special resources */ -_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; -_X_EXPORT resRange resVgaShared[] = {_VGA_SHARED, _END}; -_X_EXPORT resRange resVgaMemShared[] = {_VGA_SHARED_MEM,_END}; -_X_EXPORT resRange resVgaIoShared[] = {_VGA_SHARED_IO,_END}; -_X_EXPORT resRange resVgaUnusedExclusive[] = {_VGA_EXCLUSIVE_UNUSED, _END}; -_X_EXPORT resRange resVgaUnusedShared[] = {_VGA_SHARED_UNUSED, _END}; -_X_EXPORT resRange resVgaSparseExclusive[] = {_VGA_EXCLUSIVE_SPARSE, _END}; -_X_EXPORT resRange resVgaSparseShared[] = {_VGA_SHARED_SPARSE, _END}; -_X_EXPORT resRange res8514Exclusive[] = {_8514_EXCLUSIVE, _END}; -_X_EXPORT resRange res8514Shared[] = {_8514_SHARED, _END}; +resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; +resRange resVgaShared[] = {_VGA_SHARED, _END}; +resRange resVgaMemShared[] = {_VGA_SHARED_MEM,_END}; +resRange resVgaIoShared[] = {_VGA_SHARED_IO,_END}; +resRange resVgaUnusedExclusive[] = {_VGA_EXCLUSIVE_UNUSED, _END}; +resRange resVgaUnusedShared[] = {_VGA_SHARED_UNUSED, _END}; +resRange resVgaSparseExclusive[] = {_VGA_EXCLUSIVE_SPARSE, _END}; +resRange resVgaSparseShared[] = {_VGA_SHARED_SPARSE, _END}; +resRange res8514Exclusive[] = {_8514_EXCLUSIVE, _END}; +resRange res8514Shared[] = {_8514_SHARED, _END}; /* Flag: do we need RAC ? */ static Bool needRAC = FALSE; @@ -100,7 +100,7 @@ static void notifyStateChange(xf86NotifyState state); * The only one available so far is for PCI and SBUS. */ -_X_EXPORT void +void xf86BusProbe(void) { xf86PciProbe(); @@ -148,7 +148,7 @@ StringToBusType(const char* busID, const char **retID) * Entity related code. */ -_X_EXPORT void +void xf86EntityInit(void) { int i; @@ -214,7 +214,7 @@ EntityLeave(void) } } -_X_EXPORT Bool +Bool xf86IsEntityPrimary(int entityIndex) { EntityPtr pEnt = xf86Entities[entityIndex]; @@ -231,7 +231,7 @@ xf86IsEntityPrimary(int entityIndex) } } -_X_EXPORT Bool +Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { @@ -244,7 +244,7 @@ xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, return TRUE; } -_X_EXPORT Bool +Bool xf86DriverHasEntities(DriverPtr drvp) { int i; @@ -255,7 +255,7 @@ xf86DriverHasEntities(DriverPtr drvp) return FALSE; } -_X_EXPORT void +void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) { if (entityIndex == -1) @@ -279,7 +279,7 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) pScrn->domainIOBase = xf86Entities[entityIndex]->domainIO; } -_X_EXPORT void +void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) { int i; @@ -299,7 +299,7 @@ xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) * XXX This needs to be updated for the case where a single entity may have * instances associated with more than one screen. */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86FindScreenForEntity(int entityIndex) { int i,j; @@ -317,7 +317,7 @@ xf86FindScreenForEntity(int entityIndex) return NULL; } -_X_EXPORT void +void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) { int i; @@ -348,7 +348,7 @@ xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) * xf86ClearEntitiesForScreen() - called when a screen is deleted * to mark it's entities unused. Called by xf86DeleteScreen(). */ -_X_EXPORT void +void xf86ClearEntityListForScreen(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; @@ -380,7 +380,7 @@ xf86ClearEntityListForScreen(int scrnIndex) pScrn->entityInstanceList = NULL; } -_X_EXPORT void +void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type) { resPtr *pprev_next = &Acc; @@ -402,7 +402,7 @@ xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type) * Add an extra device section (GDevPtr) to an entity. */ -_X_EXPORT void +void xf86AddDevToEntity(int entityIndex, GDevPtr dev) { EntityPtr pEnt; @@ -423,7 +423,7 @@ xf86AddDevToEntity(int entityIndex, GDevPtr dev) * EntityRec struct to the drivers. The EntityRec structure itself * remains invisible to the driver. */ -_X_EXPORT EntityInfoPtr +EntityInfoPtr xf86GetEntityInfo(int entityIndex) { EntityInfoPtr pEnt; @@ -451,7 +451,7 @@ xf86GetEntityInfo(int entityIndex) return pEnt; } -_X_EXPORT int +int xf86GetNumEntityInstances(int entityIndex) { if (entityIndex >= xf86NumEntities) @@ -460,7 +460,7 @@ xf86GetNumEntityInstances(int entityIndex) return xf86Entities[entityIndex]->numInstances; } -_X_EXPORT GDevPtr +GDevPtr xf86GetDevFromEntity(int entityIndex, int instance) { int i; @@ -539,7 +539,7 @@ clearAccess(void) * xf86AccessInit() - set up everything needed for access control * called only once on first server generation. */ -_X_EXPORT void +void xf86AccessInit(void) { initPciState(); @@ -554,7 +554,7 @@ xf86AccessInit(void) * xf86AccessEnter() -- gets called to save the text mode VGA IO * resources when reentering the server after a VT switch. */ -_X_EXPORT void +void xf86AccessEnter(void) { if (xf86ResAccessEnter) @@ -583,7 +583,7 @@ xf86AccessEnter(void) * This was split to call xf86AccessLeaveState() from * ddxGiveUp(). */ -_X_EXPORT void +void xf86AccessLeave(void) { if (!xf86ResAccessEnter) @@ -594,7 +594,7 @@ xf86AccessLeave(void) EntityLeave(); } -_X_EXPORT void +void xf86AccessLeaveState(void) { if (!xf86ResAccessEnter) @@ -632,7 +632,7 @@ xf86AccessRestoreState(void) * by other resources! */ -_X_EXPORT void +void xf86EnableAccess(ScrnInfoPtr pScrn) { register EntityAccessPtr peAcc = (EntityAccessPtr) pScrn->access; @@ -753,7 +753,7 @@ xf86EnableAccess(ScrnInfoPtr pScrn) } } -_X_EXPORT void +void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn) { EntityAccessPtr pceAcc2 = NULL; @@ -793,7 +793,7 @@ xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn) } } -_X_EXPORT void +void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, xf86SetAccessFuncPtr oldFuncs) { @@ -1098,7 +1098,7 @@ xf86JoinResLists(resPtr rlist1, resPtr rlist2) return rlist1; } -_X_EXPORT resPtr +resPtr xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) { resPtr new; @@ -1135,7 +1135,7 @@ xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) return new; } -_X_EXPORT void +void xf86FreeResList(resPtr rlist) { resPtr pRes; @@ -1267,7 +1267,7 @@ xf86PrintResList(int verb, resPtr list) } } -_X_EXPORT resPtr +resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex) { while(pRange && pRange->type != ResEnd) { @@ -1277,7 +1277,7 @@ xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex) return list; } -_X_EXPORT void +void xf86ResourceBrokerInit(void) { Acc = NULL; @@ -1323,7 +1323,7 @@ xf86ConvertListToHost(int entityIndex, resPtr list) * which we mean, NULL. */ -_X_EXPORT resPtr +resPtr xf86RegisterResources(int entityIndex, resList list, unsigned long access) { resRange range; @@ -1543,7 +1543,7 @@ SetSIGIOForState(xf86State state) } } -_X_EXPORT void +void xf86EnterServerState(xf86State state) { EntityPtr pEnt; @@ -1649,7 +1649,7 @@ xf86EnterServerState(xf86State state) /* * xf86SetOperatingState() -- Set ResOperMask for resources listed. */ -_X_EXPORT resPtr +resPtr xf86SetOperatingState(resList list, int entityIndex, int mask) { resPtr acc; @@ -1690,7 +1690,7 @@ xf86SetOperatingState(resList list, int entityIndex, int mask) * xf86ClaimFixedResources() is used to allocate non-relocatable resources. * This should only be done by a driver's Probe() function. */ -_X_EXPORT void +void xf86ClaimFixedResources(resList list, int entityIndex) { resPtr ptr = NULL; @@ -1820,7 +1820,7 @@ checkRoutingForScreens(xf86State state) * xf86PostProbe() -- Allocate all non conflicting resources * This function gets called by xf86Init(). */ -_X_EXPORT void +void xf86PostProbe(void) { memType val; @@ -1935,7 +1935,7 @@ checkRequiredResources(int entityIndex) pEnt->entityProp &= ~(unsigned long)NEED_IO_SHARED; } -_X_EXPORT void +void xf86PostPreInit() { if (doFramebufferMode) return; @@ -1955,7 +1955,7 @@ xf86PostPreInit() xf86PrintResList(3, Acc); } -_X_EXPORT void +void xf86PostScreenInit(void) { int i,j; @@ -2304,7 +2304,7 @@ findIntersect(resRange Range, resPtr list) return new; } -_X_EXPORT resPtr +resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2) { resPtr ret = NULL; @@ -2369,7 +2369,7 @@ xf86ExtractTypeFromList(resPtr list, unsigned long type) * xf86FindPrimaryDevice() - Find the display device which * was active when the server was started. */ -_X_EXPORT void +void xf86FindPrimaryDevice() { if (primaryBus.type != BUS_NONE) { @@ -2398,7 +2398,7 @@ xf86FindPrimaryDevice() } } -_X_EXPORT Bool +Bool xf86NoSharedResources(int screenIndex,resType res) { int j; @@ -2430,7 +2430,7 @@ xf86NoSharedResources(int screenIndex,resType res) return TRUE; } -_X_EXPORT void +void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg) { StateChangeNotificationPtr ptr = @@ -2442,7 +2442,7 @@ xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackF StateChangeNotificationList = ptr; } -_X_EXPORT Bool +Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func) { StateChangeNotificationPtr *ptr = &StateChangeNotificationList; @@ -2472,7 +2472,7 @@ notifyStateChange(xf86NotifyState state) /* Multihead accel sharing accessor functions and entity Private handling */ -_X_EXPORT int +int xf86GetLastScrnFlag(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2482,7 +2482,7 @@ xf86GetLastScrnFlag(int entityIndex) } } -_X_EXPORT void +void xf86SetLastScrnFlag(int entityIndex, int scrnIndex) { if(entityIndex < xf86NumEntities) { @@ -2490,7 +2490,7 @@ xf86SetLastScrnFlag(int entityIndex, int scrnIndex) } } -_X_EXPORT Bool +Bool xf86IsEntityShared(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2501,7 +2501,7 @@ xf86IsEntityShared(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetEntityShared(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2509,7 +2509,7 @@ xf86SetEntityShared(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2520,7 +2520,7 @@ xf86IsEntitySharable(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2528,7 +2528,7 @@ xf86SetEntitySharable(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2539,7 +2539,7 @@ xf86IsPrimInitDone(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2547,7 +2547,7 @@ xf86SetPrimInitDone(int entityIndex) } } -_X_EXPORT void +void xf86ClearPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2560,7 +2560,7 @@ xf86ClearPrimInitDone(int entityIndex) * Allocate a private in the entities. */ -_X_EXPORT int +int xf86AllocateEntityPrivateIndex(void) { int idx, i; @@ -2579,7 +2579,7 @@ xf86AllocateEntityPrivateIndex(void) return idx; } -_X_EXPORT DevUnion * +DevUnion * xf86GetEntityPrivate(int entityIndex, int privIndex) { if (entityIndex >= xf86NumEntities || privIndex >= xf86EntityPrivateCount) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 9bf18b555..5a5a7f20f 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -1118,7 +1118,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) return TRUE; } -_X_EXPORT Bool xf86DRI2Enabled(void) +Bool xf86DRI2Enabled(void) { return xf86Info.dri2; } @@ -2608,7 +2608,7 @@ xf86HandleConfigFile(Bool autoconfig) return CONFIG_OK; } -_X_EXPORT Bool +Bool xf86PathIsSafe(const char *path) { return (xf86pathIsSafe(path) != 0); diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 1430cda4d..b803b4910 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -67,8 +67,8 @@ typedef struct _DevToConfig { static DevToConfigPtr DevToConfig = NULL; static int nDevToConfig = 0, CurrentDriver; -_X_EXPORT xf86MonPtr ConfiguredMonitor; -_X_EXPORT Bool xf86DoConfigurePass1 = TRUE; +xf86MonPtr ConfiguredMonitor; +Bool xf86DoConfigurePass1 = TRUE; static Bool foundMouse = FALSE; #if defined(__SCO__) @@ -92,7 +92,7 @@ static char *DFLT_MOUSE_PROTO = "auto"; * directly. We allocate a GDevRec and fill it in as much as we can, letting * the caller fill in the rest and/or change it as it sees fit. */ -_X_EXPORT GDevPtr +GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) { int i, j; @@ -614,7 +614,7 @@ configureDDCMonitorSection (int screennum) # define PATH_MAX 1024 #endif -_X_EXPORT void +void DoConfigure(void) { int i,j, screennum = -1; diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index f7a469f9a..1203aad43 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -89,7 +89,7 @@ static Bool HardEdges; * is valid if specified. */ -_X_EXPORT void +void xf86InitViewport(ScrnInfoPtr pScr) { @@ -133,7 +133,7 @@ xf86InitViewport(ScrnInfoPtr pScr) * Scroll the visual part of the screen so the pointer is visible. */ -_X_EXPORT void +void xf86SetViewport(ScreenPtr pScreen, int x, int y) { ScrnInfoPtr pScr = XF86SCRNINFO(pScreen); @@ -185,7 +185,7 @@ xf86PointerMoved(int scrnIndex, int x, int y) * Enable/disable ZoomViewport */ -_X_EXPORT void +void xf86LockZoom(ScreenPtr pScreen, Bool lock) { XF86SCRNINFO(pScreen)->zoomLocked = lock; @@ -197,7 +197,7 @@ xf86LockZoom(ScreenPtr pScreen, Bool lock) * set a new mode. */ -_X_EXPORT Bool +Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScr = XF86SCRNINFO(pScreen); @@ -322,7 +322,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) * Reinitialize the visual part of the screen for another mode. */ -_X_EXPORT void +void xf86ZoomViewport(ScreenPtr pScreen, int zoom) { ScrnInfoPtr pScr = XF86SCRNINFO(pScreen); @@ -480,7 +480,7 @@ xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) } -_X_EXPORT void * +void * xf86GetPointerScreenFuncs(void) { return (void *)&xf86PointerScreenFuncs; @@ -579,7 +579,7 @@ FillOutEdge(xf86EdgePtr pEdge, int limit) * on 32 bit architectures, 64 on 64 bit architectures. */ -_X_EXPORT void +void xf86InitOrigins(void) { unsigned long screensLeft, prevScreensLeft, mask; @@ -845,7 +845,7 @@ xf86InitOrigins(void) } } -_X_EXPORT void +void xf86ReconfigureLayout(void) { int i; diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index f378c1399..bbb87929f 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -68,7 +68,7 @@ DGACopyModeInfo( XDGAModePtr xmode ); -_X_EXPORT int *XDGAEventBase = NULL; +int *XDGAEventBase = NULL; #define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey)) @@ -101,7 +101,7 @@ typedef struct { Bool grabKeyboard; } DGAScreenRec, *DGAScreenPtr; -_X_EXPORT Bool +Bool DGAInit( ScreenPtr pScreen, DGAFunctionPtr funcs, @@ -164,7 +164,7 @@ DGAInit( * the DGA mode list. */ -_X_EXPORT Bool +Bool DGAReInitModes( ScreenPtr pScreen, DGAModePtr modes, @@ -334,7 +334,7 @@ DGAUninstallColormap(ColormapPtr pmap) pScreen->UninstallColormap = DGAUninstallColormap; } -_X_EXPORT int +int xf86SetDGAMode( int index, int num, @@ -453,7 +453,7 @@ xf86SetDGAMode( /*********** exported ones ***************/ -_X_EXPORT void +void DGASetInputMode(int index, Bool keyboard, Bool mouse) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -475,7 +475,7 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse) } } -_X_EXPORT Bool +Bool DGAChangePixmapMode(int index, int *x, int *y, int mode) { DGAScreenPtr pScreenPriv; @@ -530,7 +530,7 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) return TRUE; } -_X_EXPORT Bool +Bool DGAAvailable(int index) { if(DGAScreenKey == NULL) @@ -547,7 +547,7 @@ DGAAvailable(int index) return FALSE; } -_X_EXPORT Bool +Bool DGAActive(int index) { DGAScreenPtr pScreenPriv; @@ -567,7 +567,7 @@ DGAActive(int index) /* Called by the event code in case the server is abruptly terminated */ -_X_EXPORT void +void DGAShutdown() { ScrnInfoPtr pScrn; @@ -585,7 +585,7 @@ DGAShutdown() /* Called by the extension to initialize a mode */ -_X_EXPORT int +int DGASetMode( int index, int num, @@ -609,7 +609,7 @@ DGASetMode( /* Called from the extension to let the DDX know which events are requested */ -_X_EXPORT void +void DGASelectInput( int index, ClientPtr client, @@ -622,7 +622,7 @@ DGASelectInput( pScreenPriv->input = mask; } -_X_EXPORT int +int DGAGetViewportStatus(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -635,7 +635,7 @@ DGAGetViewportStatus(int index) return (*pScreenPriv->funcs->GetViewport)(pScreenPriv->pScrn); } -_X_EXPORT int +int DGASetViewport( int index, int x, int y, @@ -663,7 +663,7 @@ BitsClear(CARD32 data) return bits; } -_X_EXPORT int +int DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -732,7 +732,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) /* Called by the extension to install a colormap on DGA active screens */ -_X_EXPORT void +void DGAInstallCmap(ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; @@ -748,7 +748,7 @@ DGAInstallCmap(ColormapPtr cmap) (*pScreen->InstallColormap)(cmap); } -_X_EXPORT int +int DGASync(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -761,7 +761,7 @@ DGASync(int index) return Success; } -_X_EXPORT int +int DGAFillRect( int index, int x, int y, int w, int h, @@ -780,7 +780,7 @@ DGAFillRect( return BadMatch; } -_X_EXPORT int +int DGABlitRect( int index, int srcx, int srcy, @@ -801,7 +801,7 @@ DGABlitRect( return BadMatch; } -_X_EXPORT int +int DGABlitTransRect( int index, int srcx, int srcy, @@ -824,7 +824,7 @@ DGABlitTransRect( } -_X_EXPORT int +int DGAGetModes(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -834,7 +834,7 @@ DGAGetModes(int index) } -_X_EXPORT int +int DGAGetModeInfo( int index, XDGAModePtr mode, @@ -892,7 +892,7 @@ DGACopyModeInfo( } -_X_EXPORT Bool +Bool DGAVTSwitch(void) { ScreenPtr pScreen; @@ -914,7 +914,7 @@ DGAVTSwitch(void) return TRUE; } -_X_EXPORT Bool +Bool DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; @@ -941,7 +941,7 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) static int DGAMouseX, DGAMouseY; -_X_EXPORT Bool +Bool DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; @@ -976,7 +976,7 @@ DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) return TRUE; } -_X_EXPORT Bool +Bool DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; @@ -1004,7 +1004,7 @@ DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) /* We have the power to steal or modify events that are about to get queued */ -_X_EXPORT Bool +Bool DGAIsDgaEvent (xEvent *e) { int coreEquiv; @@ -1125,7 +1125,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) } } -_X_EXPORT Bool +Bool DGAOpenFramebuffer( int index, char **name, @@ -1142,7 +1142,7 @@ DGAOpenFramebuffer( name, mem, size, offset, flags); } -_X_EXPORT void +void DGACloseFramebuffer(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1154,7 +1154,7 @@ DGACloseFramebuffer(int index) /* For DGA 1.0 backwards compatibility only */ -_X_EXPORT int +int DGAGetOldDGAMode(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 5ee5e2451..baa093f75 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -54,7 +54,7 @@ static int DPMSCount = 0; #endif -_X_EXPORT Bool +Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) { #ifdef DPMSExtension @@ -144,7 +144,7 @@ DPMSClose(int i, ScreenPtr pScreen) * Device dependent DPMS mode setting hook. This is called whenever * the DPMS mode is to be changed. */ -_X_EXPORT int +int DPMSSet(ClientPtr client, int level) { int rc, i; @@ -180,7 +180,7 @@ DPMSSet(ClientPtr client, int level) * DPMSSupported -- * Return TRUE if any screen supports DPMS. */ -_X_EXPORT Bool +Bool DPMSSupported(void) { int i; @@ -217,7 +217,7 @@ DPMSSupported(void) * 2. It isn't clear that this function is ever used or what it should * return. */ -_X_EXPORT int +int DPMSGet(int *level) { return DPMSPowerLevel; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index aec43e61e..c7f6c88f3 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -102,7 +102,7 @@ * This has been generalised to work with Linux and *BSD+syscons (DHD) */ -_X_EXPORT Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for +Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for *BSD and for avoiding VT switches when using the DRI automatic full screen mode.*/ @@ -130,7 +130,7 @@ typedef struct x_IHRec { static IHPtr InputHandlers = NULL; -_X_EXPORT Bool +Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return TRUE; @@ -141,7 +141,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) * Function used for screensaver purposes by the os module. Returns the * time in milliseconds since there last was any input. */ -_X_EXPORT int +int TimeSinceLastInputEvent() { if (xf86Info.lastEventTime == 0) { @@ -154,7 +154,7 @@ TimeSinceLastInputEvent() * SetTimeSinceLastInputEvent -- * Set the lastEventTime to now. */ -_X_EXPORT void +void SetTimeSinceLastInputEvent() { xf86Info.lastEventTime = GetTimeInMillis(); @@ -166,7 +166,7 @@ SetTimeSinceLastInputEvent() * correct chronological order. Only reads from the system pointer * and keyboard. */ -_X_EXPORT void +void ProcessInputEvents () { int x, y; @@ -182,7 +182,7 @@ ProcessInputEvents () * Handle keyboard events that cause some kind of "action" * (i.e., server termination, video mode changes, VT switches, etc.) */ -_X_EXPORT void +void xf86ProcessActionEvent(ActionEvent action, void *arg) { #ifdef DEBUG @@ -251,7 +251,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) */ /* ARGSUSED */ -_X_EXPORT void +void xf86Wakeup(pointer blockData, int err, pointer pReadmask) { fd_set* LastSelectMask = (fd_set*)pReadmask; @@ -318,7 +318,7 @@ xf86SigioReadInput(int fd, * xf86AddEnabledDevice -- * */ -_X_EXPORT void +void xf86AddEnabledDevice(InputInfoPtr pInfo) { if (!xf86InstallSIGIOHandler (pInfo->fd, xf86SigioReadInput, pInfo)) { @@ -330,7 +330,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo) * xf86RemoveEnabledDevice -- * */ -_X_EXPORT void +void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { if (!xf86RemoveSIGIOHandler (pInfo->fd)) { @@ -340,7 +340,7 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo) static int *xf86SignalIntercept = NULL; -_X_EXPORT void +void xf86InterceptSignals(int *signo) { if ((xf86SignalIntercept = signo)) @@ -349,7 +349,7 @@ xf86InterceptSignals(int *signo) static void (*xf86SigIllHandler)(void) = NULL; -_X_EXPORT void +void xf86InterceptSigIll(void (*sigillhandler)(void)) { xf86SigIllHandler = sigillhandler; @@ -359,7 +359,7 @@ xf86InterceptSigIll(void (*sigillhandler)(void)) * xf86SigHandler -- * Catch unexpected signals and exit or continue cleanly. */ -_X_EXPORT void +void xf86SigHandler(int signo) { if ((signo == SIGILL) && xf86SigIllHandler) { @@ -391,7 +391,7 @@ xf86SigHandler(int signo) * xf86PrintBacktrace -- * Print a stack backtrace for debugging purposes. */ -_X_EXPORT void +void xf86PrintBacktrace(void) { xorg_backtrace(); @@ -650,7 +650,7 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -660,7 +660,7 @@ xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -687,7 +687,7 @@ removeInputHandler(IHPtr ih) xfree(ih); } -_X_EXPORT int +int xf86RemoveInputHandler(pointer handler) { IHPtr ih; @@ -706,7 +706,7 @@ xf86RemoveInputHandler(pointer handler) return fd; } -_X_EXPORT int +int xf86RemoveGeneralHandler(pointer handler) { IHPtr ih; @@ -725,7 +725,7 @@ xf86RemoveGeneralHandler(pointer handler) return fd; } -_X_EXPORT void +void xf86DisableInputHandler(pointer handler) { IHPtr ih; @@ -739,7 +739,7 @@ xf86DisableInputHandler(pointer handler) RemoveEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86DisableGeneralHandler(pointer handler) { IHPtr ih; @@ -753,7 +753,7 @@ xf86DisableGeneralHandler(pointer handler) RemoveGeneralSocket(ih->fd); } -_X_EXPORT void +void xf86EnableInputHandler(pointer handler) { IHPtr ih; @@ -767,7 +767,7 @@ xf86EnableInputHandler(pointer handler) AddEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86EnableGeneralHandler(pointer handler) { IHPtr ih; @@ -784,7 +784,7 @@ xf86EnableGeneralHandler(pointer handler) /* * As used currently by the DRI, the return value is ignored. */ -_X_EXPORT Bool +Bool xf86EnableVTSwitch(Bool new) { static Bool def = TRUE; @@ -802,7 +802,7 @@ xf86EnableVTSwitch(Bool new) return old; } -_X_EXPORT void +void xf86ReloadInputDevs(int sig) { InputInfoPtr pInfo; @@ -819,7 +819,7 @@ xf86ReloadInputDevs(int sig) return; } -_X_EXPORT void +void DDXRingBell(int volume, int pitch, int duration) { xf86OSRingBell(volume, pitch, duration); } diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index c01f485ab..c27736937 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -48,14 +48,14 @@ /* Index into pScreen.devPrivates */ static int xf86CreateRootWindowKeyIndex; -_X_EXPORT DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; +DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; /* Index of ScrnInfo in pScreen.devPrivates */ static int xf86ScreenKeyIndex; -_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; +DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; static int xf86PixmapKeyIndex; -_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; -_X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ -_X_EXPORT const unsigned char byte_reversed[256] = +DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; +ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ +const unsigned char byte_reversed[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, @@ -92,12 +92,12 @@ _X_EXPORT const unsigned char byte_reversed[256] = }; /* Globals that input drivers may access */ -_X_EXPORT InputInfoPtr xf86InputDevs = NULL; +InputInfoPtr xf86InputDevs = NULL; /* Globals that video drivers may not access */ -_X_EXPORT xf86InfoRec xf86Info = { +xf86InfoRec xf86Info = { .consoleFd = -1, .vtno = -1, .vtSysreq = FALSE, @@ -138,29 +138,29 @@ _X_EXPORT xf86InfoRec xf86Info = { .autoEnableDevices = FALSE #endif }; -_X_EXPORT const char *xf86ConfigFile = NULL; -_X_EXPORT const char *xf86InputDeviceList = NULL; -_X_EXPORT const char *xf86ModulePath = DEFAULT_MODULE_PATH; -_X_EXPORT MessageType xf86ModPathFrom = X_DEFAULT; -_X_EXPORT const char *xf86LogFile = DEFAULT_LOGPREFIX; -_X_EXPORT MessageType xf86LogFileFrom = X_DEFAULT; -_X_EXPORT Bool xf86LogFileWasOpened = FALSE; -_X_EXPORT serverLayoutRec xf86ConfigLayout = {NULL, }; -_X_EXPORT confDRIRec xf86ConfigDRI = {0, }; +const char *xf86ConfigFile = NULL; +const char *xf86InputDeviceList = NULL; +const char *xf86ModulePath = DEFAULT_MODULE_PATH; +MessageType xf86ModPathFrom = X_DEFAULT; +const char *xf86LogFile = DEFAULT_LOGPREFIX; +MessageType xf86LogFileFrom = X_DEFAULT; +Bool xf86LogFileWasOpened = FALSE; +serverLayoutRec xf86ConfigLayout = {NULL, }; +confDRIRec xf86ConfigDRI = {0, }; XF86ConfigPtr xf86configptr = NULL; -_X_EXPORT Bool xf86Resetting = FALSE; -_X_EXPORT Bool xf86Initialising = FALSE; -_X_EXPORT Bool xf86DoProbe = FALSE; -_X_EXPORT Bool xf86DoConfigure = FALSE; -_X_EXPORT Bool xf86DoShowOptions = FALSE; -_X_EXPORT Bool xf86DoModalias = FALSE; -_X_EXPORT DriverPtr *xf86DriverList = NULL; -_X_EXPORT int xf86NumDrivers = 0; +Bool xf86Resetting = FALSE; +Bool xf86Initialising = FALSE; +Bool xf86DoProbe = FALSE; +Bool xf86DoConfigure = FALSE; +Bool xf86DoShowOptions = FALSE; +Bool xf86DoModalias = FALSE; +DriverPtr *xf86DriverList = NULL; +int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; int xf86NumInputDrivers = 0; -_X_EXPORT int xf86NumScreens = 0; +int xf86NumScreens = 0; -_X_EXPORT const char *xf86VisualNames[] = { +const char *xf86VisualNames[] = { "StaticGray", "GrayScale", "StaticColor", @@ -171,36 +171,36 @@ _X_EXPORT const char *xf86VisualNames[] = { /* Parameters set only from the command line */ char *xf86ServerName = "no-name"; -_X_EXPORT Bool xf86fpFlag = FALSE; -_X_EXPORT Bool xf86sFlag = FALSE; -_X_EXPORT Bool xf86bsEnableFlag = FALSE; -_X_EXPORT Bool xf86bsDisableFlag = FALSE; -_X_EXPORT Bool xf86silkenMouseDisableFlag = FALSE; +Bool xf86fpFlag = FALSE; +Bool xf86sFlag = FALSE; +Bool xf86bsEnableFlag = FALSE; +Bool xf86bsDisableFlag = FALSE; +Bool xf86silkenMouseDisableFlag = FALSE; #ifdef HAVE_ACPI -_X_EXPORT Bool xf86acpiDisableFlag = FALSE; +Bool xf86acpiDisableFlag = FALSE; #endif -_X_EXPORT char *xf86LayoutName = NULL; -_X_EXPORT char *xf86ScreenName = NULL; -_X_EXPORT char *xf86PointerName = NULL; -_X_EXPORT char *xf86KeyboardName = NULL; -_X_EXPORT Bool xf86ProbeOnly = FALSE; -_X_EXPORT int xf86Verbose = DEFAULT_VERBOSE; -_X_EXPORT int xf86LogVerbose = DEFAULT_LOG_VERBOSE; -_X_EXPORT int xf86FbBpp = -1; -_X_EXPORT Pix24Flags xf86Pix24 = Pix24DontCare; -_X_EXPORT int xf86Depth = -1; -_X_EXPORT rgb xf86Weight = {0, 0, 0}; -_X_EXPORT Bool xf86FlipPixels = FALSE; -_X_EXPORT Gamma xf86Gamma = {0.0, 0.0, 0.0}; -_X_EXPORT Bool xf86AllowMouseOpenFail = FALSE; +char *xf86LayoutName = NULL; +char *xf86ScreenName = NULL; +char *xf86PointerName = NULL; +char *xf86KeyboardName = NULL; +Bool xf86ProbeOnly = FALSE; +int xf86Verbose = DEFAULT_VERBOSE; +int xf86LogVerbose = DEFAULT_LOG_VERBOSE; +int xf86FbBpp = -1; +Pix24Flags xf86Pix24 = Pix24DontCare; +int xf86Depth = -1; +rgb xf86Weight = {0, 0, 0}; +Bool xf86FlipPixels = FALSE; +Gamma xf86Gamma = {0.0, 0.0, 0.0}; +Bool xf86AllowMouseOpenFail = FALSE; #ifdef XF86VIDMODE -_X_EXPORT Bool xf86VidModeDisabled = FALSE; -_X_EXPORT Bool xf86VidModeAllowNonLocal = FALSE; +Bool xf86VidModeDisabled = FALSE; +Bool xf86VidModeAllowNonLocal = FALSE; #endif -_X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; -_X_EXPORT Bool xf86inSuspend = FALSE; -_X_EXPORT Bool xorgHWAccess = FALSE; +RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; +Bool xf86inSuspend = FALSE; +Bool xorgHWAccess = FALSE; -_X_EXPORT struct pci_slot_match xf86IsolateDevice = { +struct pci_slot_match xf86IsolateDevice = { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0 }; diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 2c550feb5..0a66f8067 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -72,7 +72,7 @@ static int xf86ScrnInfoPrivateCount = 0; /* Add a pointer to a new DriverRec to xf86DriverList */ -_X_EXPORT void +void xf86AddDriver(DriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -99,7 +99,7 @@ xf86AddDriver(DriverPtr driver, pointer module, int flags) xf86DriverList[xf86NumDrivers - 1]->refCount = 0; } -_X_EXPORT void +void xf86DeleteDriver(int drvIndex) { if (xf86DriverList[drvIndex] @@ -113,7 +113,7 @@ xf86DeleteDriver(int drvIndex) /* Add a pointer to a new InputDriverRec to xf86InputDriverList */ -_X_EXPORT void +void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -133,7 +133,7 @@ xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags) xf86InputDriverList[xf86NumInputDrivers - 1]->refCount = 0; } -_X_EXPORT void +void xf86DeleteInputDriver(int drvIndex) { if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module) @@ -142,7 +142,7 @@ xf86DeleteInputDriver(int drvIndex) xf86InputDriverList[drvIndex] = NULL; } -_X_EXPORT InputDriverPtr +InputDriverPtr xf86LookupInputDriver(const char *name) { int i; @@ -155,7 +155,7 @@ xf86LookupInputDriver(const char *name) return NULL; } -_X_EXPORT InputInfoPtr +InputInfoPtr xf86LookupInput(const char *name) { InputInfoPtr p; @@ -169,19 +169,19 @@ xf86LookupInput(const char *name) } /* ABI stubs of despair */ -_X_EXPORT void +void xf86AddModuleInfo(pointer info, pointer module) { } -_X_EXPORT void +void xf86DeleteModuleInfo(int idx) { } /* Allocate a new ScrnInfoRec in xf86Screens */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags) { int i; @@ -232,7 +232,7 @@ xf86AllocateScreen(DriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteScreen(int scrnIndex, int flags) { ScrnInfoPtr pScrn; @@ -288,7 +288,7 @@ xf86DeleteScreen(int scrnIndex, int flags) * Allocate a private in ScrnInfoRec. */ -_X_EXPORT int +int xf86AllocateScrnInfoPrivateIndex(void) { int idx, i; @@ -308,7 +308,7 @@ xf86AllocateScrnInfoPrivateIndex(void) } /* Allocate a new InputInfoRec and append it to the tail of xf86InputDevs. */ -_X_EXPORT InputInfoPtr +InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags) { InputInfoPtr new, *prev = NULL; @@ -335,7 +335,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteInput(InputInfoPtr pInp, int flags) { InputInfoPtr p; @@ -376,7 +376,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) xfree(pInp); } -_X_EXPORT Bool +Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) { int i; @@ -447,7 +447,7 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) #define GLOBAL_DEFAULT_DEPTH 24 #endif -_X_EXPORT Bool +Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, int depth24flags) { @@ -764,7 +764,7 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, /* * Print out the selected depth and bpp. */ -_X_EXPORT void +void xf86PrintDepthBpp(ScrnInfoPtr scrp) { xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth); @@ -775,7 +775,7 @@ xf86PrintDepthBpp(ScrnInfoPtr scrp) * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits. */ -_X_EXPORT Bool +Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) { MessageType weightFrom = X_DEFAULT; @@ -867,7 +867,7 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) return TRUE; } -_X_EXPORT Bool +Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) { MessageType visualFrom = X_DEFAULT; @@ -914,7 +914,7 @@ xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) #define SET_GAMMA(g) \ (g) > GAMMA_ZERO ? (g) : 1.0 -_X_EXPORT Bool +Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) { MessageType from = X_DEFAULT; @@ -968,7 +968,7 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) #undef MMPERINCH #define MMPERINCH 25.4 -_X_EXPORT void +void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) { MessageType from = X_DEFAULT; @@ -1065,7 +1065,7 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) #undef MMPERINCH -_X_EXPORT void +void xf86SetBlackWhitePixels(ScreenPtr pScreen) { if (xf86FlipPixels) { @@ -1196,7 +1196,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) * whether they are switched in or out by keeping track of the root pixmap's * private data, and therefore don't need to access pScrnInfo->vtSema. */ -_X_EXPORT void +void xf86EnableDisableFBAccess(int scrnIndex, Bool enable) { ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex]; @@ -1238,7 +1238,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) #undef PREFIX_SIZE #define PREFIX_SIZE 14 -_X_EXPORT void +void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args) { @@ -1265,7 +1265,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, #undef PREFIX_SIZE /* Print driver messages, with verbose level specified directly */ -_X_EXPORT void +void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { @@ -1277,7 +1277,7 @@ xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, } /* Print driver messages, with verbose level of 1 (default) */ -_X_EXPORT void +void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; @@ -1288,7 +1288,7 @@ xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) } /* Print non-driver messages with verbose level specified directly */ -_X_EXPORT void +void xf86MsgVerb(MessageType type, int verb, const char *format, ...) { va_list ap; @@ -1299,7 +1299,7 @@ xf86MsgVerb(MessageType type, int verb, const char *format, ...) } /* Print non-driver messages with verbose level of 1 (default) */ -_X_EXPORT void +void xf86Msg(MessageType type, const char *format, ...) { va_list ap; @@ -1310,7 +1310,7 @@ xf86Msg(MessageType type, const char *format, ...) } /* Just like ErrorF, but with the verbose level checked */ -_X_EXPORT void +void xf86ErrorFVerb(int verb, const char *format, ...) { va_list ap; @@ -1322,7 +1322,7 @@ xf86ErrorFVerb(int verb, const char *format, ...) } /* Like xf86ErrorFVerb, but with an implied verbose level of 1 */ -_X_EXPORT void +void xf86ErrorF(const char *format, ...) { va_list ap; @@ -1334,7 +1334,7 @@ xf86ErrorF(const char *format, ...) } -_X_EXPORT void +void xf86LogInit() { char *lf = NULL; @@ -1365,7 +1365,7 @@ xf86LogInit() free(lf); } -_X_EXPORT void +void xf86CloseLog() { LogClose(); @@ -1376,7 +1376,7 @@ xf86CloseLog() * Drivers can use these for using their own SymTabRecs. */ -_X_EXPORT const char * +const char * xf86TokenToString(SymTabPtr table, int token) { int i; @@ -1390,7 +1390,7 @@ xf86TokenToString(SymTabPtr table, int token) return(table[i].name); } -_X_EXPORT int +int xf86StringToToken(SymTabPtr table, const char *string) { int i; @@ -1407,7 +1407,7 @@ xf86StringToToken(SymTabPtr table, const char *string) /* * helper to display the clocks found on a card */ -_X_EXPORT void +void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) { int j; @@ -1431,7 +1431,7 @@ xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) * XXX This makes assumptions about the line width, etc. Maybe we could * use a more general "pretty print" function for messages. */ -_X_EXPORT void +void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) { int len, i; @@ -1457,7 +1457,7 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) } -_X_EXPORT int +int xf86MatchDevice(const char *drivername, GDevPtr **sectlist) { GDevPtr gdp, *pgdp = NULL; @@ -1590,7 +1590,7 @@ struct Inst { * \c DriverRec::driverName. In a future version of this function, remove * that parameter. */ -_X_EXPORT int +int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, @@ -1956,7 +1956,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ -_X_EXPORT void +void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, @@ -2047,7 +2047,7 @@ finish: (*ClockFunc)(pScrn, CLK_REG_RESTORE); } -_X_EXPORT void +void xf86SetPriority(Bool up) { static int saved_nice; @@ -2071,7 +2071,7 @@ xf86SetPriority(Bool up) } } -_X_EXPORT const char * +const char * xf86GetVisualName(int visual) { if (visual < 0 || visual > DirectColor) @@ -2081,131 +2081,131 @@ xf86GetVisualName(int visual) } -_X_EXPORT int +int xf86GetVerbosity() { return max(xf86Verbose, xf86LogVerbose); } -_X_EXPORT Pix24Flags +Pix24Flags xf86GetPix24() { return xf86Info.pixmap24; } -_X_EXPORT int +int xf86GetDepth() { return xf86Depth; } -_X_EXPORT rgb +rgb xf86GetWeight() { return xf86Weight; } -_X_EXPORT Gamma +Gamma xf86GetGamma() { return xf86Gamma; } -_X_EXPORT Bool +Bool xf86GetFlipPixels() { return xf86FlipPixels; } -_X_EXPORT const char * +const char * xf86GetServerName() { return xf86ServerName; } -_X_EXPORT Bool +Bool xf86ServerIsExiting() { return (dispatchException & DE_TERMINATE) == DE_TERMINATE; } -_X_EXPORT Bool +Bool xf86ServerIsResetting() { return xf86Resetting; } -_X_EXPORT Bool +Bool xf86ServerIsInitialising() { return xf86Initialising; } -_X_EXPORT Bool +Bool xf86ServerIsOnlyDetecting(void) { return xf86DoProbe || xf86DoConfigure; } -_X_EXPORT Bool +Bool xf86ServerIsOnlyProbing(void) { return xf86ProbeOnly; } -_X_EXPORT Bool +Bool xf86CaughtSignal() { return xf86Info.caughtSignal; } -_X_EXPORT Bool +Bool xf86GetVidModeAllowNonLocal() { return xf86Info.vidModeAllowNonLocal; } -_X_EXPORT Bool +Bool xf86GetVidModeEnabled() { return xf86Info.vidModeEnabled; } -_X_EXPORT Bool +Bool xf86GetModInDevAllowNonLocal() { return xf86Info.miscModInDevAllowNonLocal; } -_X_EXPORT Bool +Bool xf86GetModInDevEnabled() { return xf86Info.miscModInDevEnabled; } -_X_EXPORT Bool +Bool xf86GetAllowMouseOpenFail() { return xf86Info.allowMouseOpenFail; } -_X_EXPORT Bool +Bool xf86IsPc98() { #ifdef __i386__ @@ -2215,20 +2215,20 @@ xf86IsPc98() #endif } -_X_EXPORT void +void xf86DisableRandR() { xf86Info.disableRandR = TRUE; xf86Info.randRFrom = X_PROBED; } -_X_EXPORT CARD32 +CARD32 xf86GetModuleVersion(pointer module) { return (CARD32)LoaderGetModuleVersion(module); } -_X_EXPORT pointer +pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name) { pointer ret; @@ -2241,7 +2241,7 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name) return ret; } -_X_EXPORT pointer +pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { pointer ret; @@ -2257,7 +2257,7 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) /* * xf86LoadOneModule loads a single module. */ -_X_EXPORT pointer +pointer xf86LoadOneModule(char *name, pointer opt) { int errmaj, errmin; @@ -2285,7 +2285,7 @@ xf86LoadOneModule(char *name, pointer opt) return mod; } -_X_EXPORT void +void xf86UnloadSubModule(pointer mod) { /* @@ -2297,29 +2297,29 @@ xf86UnloadSubModule(pointer mod) #endif } -_X_EXPORT Bool +Bool xf86LoaderCheckSymbol(const char *name) { return LoaderSymbol(name) != NULL; } /* These two are just ABI stubs, they don't do anything in dlloader world */ -_X_EXPORT void +void xf86LoaderReqSymLists(const char **list0, ...) { } -_X_EXPORT void +void xf86LoaderReqSymbols(const char *sym0, ...) { } -_X_EXPORT void +void xf86LoaderRefSymLists(const char **list0, ...) { } -_X_EXPORT void +void xf86LoaderRefSymbols(const char *sym0, ...) { } @@ -2334,7 +2334,7 @@ static const OptionInfoRec BSOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetBackingStore(ScreenPtr pScreen) { Bool useBS = FALSE; @@ -2374,7 +2374,7 @@ static const OptionInfoRec SMOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetSilkenMouse (ScreenPtr pScreen) { Bool useSM = TRUE; @@ -2415,7 +2415,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) /* Wrote this function for the PM2 Xv driver, preliminary. */ -_X_EXPORT pointer +pointer xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, char **adaptor_name, pointer *adaptor_options) { @@ -2446,7 +2446,7 @@ xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, /* new RAC */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2490,7 +2490,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, return pScrn; } -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2524,7 +2524,7 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, * It is likely to be removed. Don't use! */ -_X_EXPORT Bool +Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2561,7 +2561,7 @@ xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, * assigned to a screen before it will be removed. If p_chip is * non-NULL all static resources listed there will be registered. */ -_X_EXPORT void +void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, resList res, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2583,7 +2583,7 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); } -_X_EXPORT void +void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { @@ -2594,7 +2594,7 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); } -_X_EXPORT Bool +Bool xf86IsScreenPrimary(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; @@ -2607,7 +2607,7 @@ xf86IsScreenPrimary(int scrnIndex) return FALSE; } -_X_EXPORT int +int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value ) { @@ -2698,7 +2698,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, return(Success); } -_X_EXPORT Bool +Bool xf86IsUnblank(int mode) { switch(mode) { @@ -2714,13 +2714,13 @@ xf86IsUnblank(int mode) } } -_X_EXPORT void +void xf86MotionHistoryAllocate(LocalDevicePtr local) { AllocateMotionHistory(local->dev); } -_X_EXPORT int +int xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, unsigned long stop, ScreenPtr pScreen, BOOL core) { diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index e8095e5d5..eacf34449 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -613,7 +613,7 @@ check_for_matching_devices(DriverPtr drvp) * If a device can be successfully probed by the driver, \c TRUE is * returned. Otherwise, \c FALSE is returned. */ -_X_EXPORT Bool +Bool xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) { Bool foundScreen = FALSE; @@ -719,7 +719,7 @@ DoProbe(void) * That includes vt-manager setup, querying all possible devices and * collecting the pixmap formats. */ -_X_EXPORT void +void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { int i, j, k, scr_index; @@ -1305,7 +1305,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) * Initialize all supported input devices. */ -_X_EXPORT void +void InitInput(argc, argv) int argc; char **argv; @@ -1336,7 +1336,7 @@ InitInput(argc, argv) * is called by dix before establishing the well known sockets. */ -_X_EXPORT void +void OsVendorInit() { static Bool beenHere = FALSE; @@ -1381,7 +1381,7 @@ OsVendorInit() * checking here, since there should be restored as much as possible. */ -_X_EXPORT void +void ddxGiveUp() { int i; @@ -1426,7 +1426,7 @@ ddxGiveUp() * are closed. */ -_X_EXPORT void +void AbortDDX() { int i; @@ -1462,7 +1462,7 @@ AbortDDX() ddxGiveUp(); } -_X_EXPORT void +void OsVendorFatalError() { #ifdef VENDORSUPPORT @@ -1478,7 +1478,7 @@ OsVendorFatalError() ErrorF("\n"); } -_X_EXPORT int +int xf86SetVerbosity(int verb) { int save = xf86Verbose; @@ -1488,7 +1488,7 @@ xf86SetVerbosity(int verb) return save; } -_X_EXPORT int +int xf86SetLogVerbosity(int verb) { int save = xf86LogVerbose; @@ -1519,7 +1519,7 @@ xf86PrintDefaultLibraryPath(void) */ /* ARGSUSED */ -_X_EXPORT int +int ddxProcessArgument(int argc, char **argv, int i) { /* @@ -1854,7 +1854,7 @@ ddxProcessArgument(int argc, char **argv, int i) * Maybe the user now knows what really to do ... */ -_X_EXPORT void +void ddxUseMsg() { ErrorF("\n"); @@ -1908,7 +1908,7 @@ ddxUseMsg() /* * xf86LoadModules iterates over a list that is being passed in. */ -_X_EXPORT Bool +Bool xf86LoadModules(char **list, pointer *optlist) { int errmaj, errmin; @@ -1950,7 +1950,7 @@ xf86LoadModules(char **list, pointer *optlist) /* Pixmap format stuff */ -_X_EXPORT PixmapFormatPtr +PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) { int i; @@ -1995,7 +1995,7 @@ xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) return NULL; } -_X_EXPORT int +int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) { PixmapFormatPtr format; diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 24a431dc5..522d3c28b 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -71,7 +71,7 @@ printModeRejectMessage(int index, DisplayModePtr p, int status) * Find closest clock to given frequency (in kHz). This assumes the * number of clocks is greater than zero. */ -_X_EXPORT int +int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider) { @@ -110,7 +110,7 @@ xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, * Convert a ModeStatus value to a printable message */ -_X_EXPORT const char * +const char * xf86ModeStatusToString(ModeStatus status) { switch (status) { @@ -199,7 +199,7 @@ xf86ModeStatusToString(ModeStatus status) * xf86ShowClockRanges() -- Print the clock ranges allowed * and the clock values scaled by ClockMulFactor and ClockDivFactor */ -_X_EXPORT void +void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges) { ClockRangePtr cp; @@ -399,7 +399,7 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp, * reason. */ -_X_EXPORT ModeStatus +ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy) { @@ -643,7 +643,7 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, * This function takes a mode and monitor description, and determines * if the mode is valid for the monitor. */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) { int i; @@ -790,7 +790,7 @@ xf86CheckModeSize(ScrnInfoPtr scrp, int w, int x, int y) * maxVValue maximum vertical timing value */ -_X_EXPORT ModeStatus +ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, @@ -938,7 +938,7 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, * clockRanges allowable clock ranges */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) { ClockRangesPtr cp; @@ -1185,7 +1185,7 @@ found: * if an unrecoverable error was encountered. */ -_X_EXPORT int +int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, @@ -1771,7 +1771,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, * */ -_X_EXPORT void +void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) { /* Catch the easy/insane cases */ @@ -1803,7 +1803,7 @@ xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) * invalid. */ -_X_EXPORT void +void xf86PruneDriverModes(ScrnInfoPtr scrp) { DisplayModePtr first, p, n; @@ -1843,7 +1843,7 @@ xf86PruneDriverModes(ScrnInfoPtr scrp) * parameters for each mode. The initialisation includes adjustments * for interlaced and double scan modes. */ -_X_EXPORT void +void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) { DisplayModePtr p; @@ -1883,7 +1883,7 @@ add(char **p, char *new) strcat(*p, new); } -_X_EXPORT void +void xf86PrintModeline(int scrnIndex,DisplayModePtr mode) { char tmp[256]; @@ -1920,7 +1920,7 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode) } #endif -_X_EXPORT void +void xf86PrintModes(ScrnInfoPtr scrp) { DisplayModePtr p; @@ -1995,7 +1995,7 @@ xf86PrintModes(ScrnInfoPtr scrp) * * \param modes doubly-linked mode list. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) { if (modes == NULL) diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index f4ce387a4..7557bc5a3 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -181,31 +181,28 @@ typedef struct { const char ** initDependencies; } ExtensionModule; -extern ExtensionModule *ExtensionModuleList; +extern _X_EXPORT ExtensionModule *ExtensionModuleList; /* Prototypes for Loader functions that are exported to modules */ -#ifndef IN_LOADER -/* Prototypes with opaque pointers for use by modules */ -pointer LoadSubModule(pointer, const char *, const char **, +extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); -void UnloadSubModule(pointer); -void UnloadModule (pointer); -#endif -pointer LoaderSymbol(const char *); -pointer LoaderSymbolLocal(pointer module, const char *); -char **LoaderListDirs(const char **, const char **); -void LoaderFreeDirList(char **); -void LoaderErrorMsg(const char *, const char *, int, int); -void LoadExtension(ExtensionModule *, Bool); -void LoaderRefSymLists(const char **, ...); -void LoaderRefSymbols(const char *, ...); -void LoaderReqSymLists(const char **, ...); -void LoaderReqSymbols(const char *, ...); -int LoaderCheckUnresolved(int); -void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); -Bool LoaderShouldIgnoreABI(void); -int LoaderGetABIVersion(const char *abiclass); +extern _X_EXPORT void UnloadSubModule(pointer); +extern _X_EXPORT void UnloadModule (pointer); +extern _X_EXPORT pointer LoaderSymbol(const char *); +extern _X_EXPORT pointer LoaderSymbolLocal(pointer module, const char *); +extern _X_EXPORT char **LoaderListDirs(const char **, const char **); +extern _X_EXPORT void LoaderFreeDirList(char **); +extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); +extern _X_EXPORT void LoadExtension(ExtensionModule *, Bool); +extern _X_EXPORT void LoaderRefSymLists(const char **, ...); +extern _X_EXPORT void LoaderRefSymbols(const char *, ...); +extern _X_EXPORT void LoaderReqSymLists(const char **, ...); +extern _X_EXPORT void LoaderReqSymbols(const char *, ...); +extern _X_EXPORT int LoaderCheckUnresolved(int); +extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); +extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); typedef void (*ModuleTearDownProc)(pointer); diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h index dbb98da03..ce3d76724 100644 --- a/hw/xfree86/common/xf86Opt.h +++ b/hw/xfree86/common/xf86Opt.h @@ -68,46 +68,46 @@ typedef struct { Bool found; } OptionInfoRec, *OptionInfoPtr; -int xf86SetIntOption(pointer optlist, const char *name, int deflt); -double xf86SetRealOption(pointer optlist, const char *name, double deflt); -char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); -int xf86SetBoolOption(pointer list, const char *name, int deflt ); -int xf86CheckIntOption(pointer optlist, const char *name, int deflt); -double xf86CheckRealOption(pointer optlist, const char *name, double deflt); -char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); -int xf86CheckBoolOption(pointer list, const char *name, int deflt ); -pointer xf86AddNewOption(pointer head, const char *name, const char *val ); -pointer xf86NewOption(char *name, char *value ); -pointer xf86NextOption(pointer list ); -pointer xf86OptionListCreate(const char **options, int count, int used); -pointer xf86OptionListMerge(pointer head, pointer tail); -void xf86OptionListFree(pointer opt); -char *xf86OptionName(pointer opt); -char *xf86OptionValue(pointer opt); -void xf86OptionListReport(pointer parm); -pointer xf86FindOption(pointer options, const char *name); -char *xf86FindOptionValue(pointer options, const char *name); -void xf86MarkOptionUsed(pointer option); -void xf86MarkOptionUsedByName(pointer options, const char *name); -Bool xf86CheckIfOptionUsed(pointer option); -Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); -void xf86ShowUnusedOptions(int scrnIndex, pointer options); -void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); -OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); -const char *xf86TokenToOptName(const OptionInfoRec *table, int token); -Bool xf86IsOptionSet(const OptionInfoRec *table, int token); -char *xf86GetOptValString(const OptionInfoRec *table, int token); -Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); -Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); -Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); -Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, +extern _X_EXPORT int xf86SetIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86SetRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86SetBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT int xf86CheckIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86CheckRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86CheckBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT pointer xf86AddNewOption(pointer head, const char *name, const char *val ); +extern _X_EXPORT pointer xf86NewOption(char *name, char *value ); +extern _X_EXPORT pointer xf86NextOption(pointer list ); +extern _X_EXPORT pointer xf86OptionListCreate(const char **options, int count, int used); +extern _X_EXPORT pointer xf86OptionListMerge(pointer head, pointer tail); +extern _X_EXPORT void xf86OptionListFree(pointer opt); +extern _X_EXPORT char *xf86OptionName(pointer opt); +extern _X_EXPORT char *xf86OptionValue(pointer opt); +extern _X_EXPORT void xf86OptionListReport(pointer parm); +extern _X_EXPORT pointer xf86FindOption(pointer options, const char *name); +extern _X_EXPORT char *xf86FindOptionValue(pointer options, const char *name); +extern _X_EXPORT void xf86MarkOptionUsed(pointer option); +extern _X_EXPORT void xf86MarkOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT Bool xf86CheckIfOptionUsed(pointer option); +extern _X_EXPORT Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT void xf86ShowUnusedOptions(int scrnIndex, pointer options); +extern _X_EXPORT void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); +extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); +extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec *table, int token); +extern _X_EXPORT char *xf86GetOptValString(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); +extern _X_EXPORT Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); +extern _X_EXPORT Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); +extern _X_EXPORT Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value); -Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); -Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); -int xf86NameCmp(const char *s1, const char *s2); -char *xf86NormalizeName(const char *s); -pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); -pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); -pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); -pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); +extern _X_EXPORT Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); +extern _X_EXPORT Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); +extern _X_EXPORT int xf86NameCmp(const char *s1, const char *s2); +extern _X_EXPORT char *xf86NormalizeName(const char *s); +extern _X_EXPORT pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); +extern _X_EXPORT pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); +extern _X_EXPORT pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); +extern _X_EXPORT pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); #endif diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c index f4d35fc0f..ad8d1c426 100644 --- a/hw/xfree86/common/xf86Option.c +++ b/hw/xfree86/common/xf86Option.c @@ -64,7 +64,7 @@ static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, * extraOpts, display, confScreen, monitor, device */ -_X_EXPORT void +void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) { XF86OptionPtr tmp; @@ -131,7 +131,7 @@ xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) * pInfo->conf_idev->commonOptions, defaultOpts */ -_X_EXPORT void +void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts) { @@ -224,28 +224,28 @@ LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed) /* These xf86Set* functions are intended for use by non-screen specific code */ -_X_EXPORT int +int xf86SetIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, TRUE); } -_X_EXPORT double +double xf86SetRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, TRUE); } -_X_EXPORT char * +char * xf86SetStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, TRUE); } -_X_EXPORT int +int xf86SetBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, TRUE); @@ -255,28 +255,28 @@ xf86SetBoolOption(pointer optlist, const char *name, int deflt) * These are like the Set*Option functions, but they don't mark the options * as used. */ -_X_EXPORT int +int xf86CheckIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, FALSE); } -_X_EXPORT double +double xf86CheckRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, FALSE); } -_X_EXPORT char * +char * xf86CheckStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, FALSE); } -_X_EXPORT int +int xf86CheckBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, FALSE); @@ -286,7 +286,7 @@ xf86CheckBoolOption(pointer optlist, const char *name, int deflt) * addNewOption() has the required property of replacing the option value * if the option is already present. */ -_X_EXPORT pointer +pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val) { char tmp[16]; @@ -294,7 +294,7 @@ xf86ReplaceIntOption(pointer optlist, const char *name, const int val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val) { char tmp[32]; @@ -302,19 +302,19 @@ xf86ReplaceRealOption(pointer optlist, const char *name, const double val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val) { return xf86AddNewOption(optlist,name,val?"True":"False"); } -_X_EXPORT pointer +pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val) { return xf86AddNewOption(optlist,name,val); } -_X_EXPORT pointer +pointer xf86AddNewOption(pointer head, const char *name, const char *val) { /* XXX These should actually be allocated in the parser library. */ @@ -325,50 +325,50 @@ xf86AddNewOption(pointer head, const char *name, const char *val) } -_X_EXPORT pointer +pointer xf86NewOption(char *name, char *value) { return xf86newOption(name, value); } -_X_EXPORT pointer +pointer xf86NextOption(pointer list) { return xf86nextOption(list); } -_X_EXPORT pointer +pointer xf86OptionListCreate(const char **options, int count, int used) { return xf86optionListCreate(options, count, used); } -_X_EXPORT pointer +pointer xf86OptionListMerge(pointer head, pointer tail) { return xf86optionListMerge(head, tail); } -_X_EXPORT void +void xf86OptionListFree(pointer opt) { xf86optionListFree(opt); } -_X_EXPORT char * +char * xf86OptionName(pointer opt) { return xf86optionName(opt); } -_X_EXPORT char * +char * xf86OptionValue(pointer opt) { return xf86optionValue(opt); } -_X_EXPORT void +void xf86OptionListReport(pointer parm) { XF86OptionPtr opts = parm; @@ -385,21 +385,21 @@ xf86OptionListReport(pointer parm) /* End of XInput-caused section */ -_X_EXPORT pointer +pointer xf86FindOption(pointer options, const char *name) { return xf86findOption(options, name); } -_X_EXPORT char * +char * xf86FindOptionValue(pointer options, const char *name) { return xf86findOptionValue(options, name); } -_X_EXPORT void +void xf86MarkOptionUsed(pointer option) { if (option != NULL) @@ -407,7 +407,7 @@ xf86MarkOptionUsed(pointer option) } -_X_EXPORT void +void xf86MarkOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -417,7 +417,7 @@ xf86MarkOptionUsedByName(pointer options, const char *name) opt->opt_used = TRUE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsed(pointer option) { if (option != NULL) @@ -426,7 +426,7 @@ xf86CheckIfOptionUsed(pointer option) return FALSE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -438,7 +438,7 @@ xf86CheckIfOptionUsedByName(pointer options, const char *name) return FALSE; } -_X_EXPORT void +void xf86ShowUnusedOptions(int scrnIndex, pointer options) { XF86OptionPtr opt = options; @@ -661,7 +661,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, } -_X_EXPORT void +void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) { OptionInfoPtr p; @@ -672,7 +672,7 @@ xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) } -_X_EXPORT OptionInfoPtr +OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token) { const OptionInfoRec *p, *match = NULL, *set = NULL; @@ -699,7 +699,7 @@ xf86TokenToOptinfo(const OptionInfoRec *table, int token) } -_X_EXPORT const char * +const char * xf86TokenToOptName(const OptionInfoRec *table, int token) { const OptionInfoRec *p; @@ -709,7 +709,7 @@ xf86TokenToOptName(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86IsOptionSet(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -719,7 +719,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token) } -_X_EXPORT char * +char * xf86GetOptValString(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -732,7 +732,7 @@ xf86GetOptValString(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) { OptionInfoPtr p; @@ -746,7 +746,7 @@ xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) } -_X_EXPORT Bool +Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) { OptionInfoPtr p; @@ -760,7 +760,7 @@ xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) } -_X_EXPORT Bool +Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) { OptionInfoPtr p; @@ -774,7 +774,7 @@ xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) } -_X_EXPORT Bool +Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value) { @@ -822,7 +822,7 @@ xf86GetOptValFreq(const OptionInfoRec *table, int token, } -_X_EXPORT Bool +Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) { OptionInfoPtr p; @@ -836,7 +836,7 @@ xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) } -_X_EXPORT Bool +Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) { OptionInfoPtr p; @@ -849,13 +849,13 @@ xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) } -_X_EXPORT int +int xf86NameCmp(const char *s1, const char *s2) { return xf86nameCompare(s1, s2); } -_X_EXPORT char * +char * xf86NormalizeName(const char *s) { char *ret, *q; diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index 87b9fa87b..7c8320dee 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -34,8 +34,8 @@ #include "xf86Priv.h" #include "xf86Xinput.h" -_X_EXPORT int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num) = NULL; -_X_EXPORT pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event) = NULL; +int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num) = NULL; +pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event) = NULL; static Bool suspended = FALSE; @@ -178,7 +178,7 @@ DoApmEvent(pmEvent event, Bool undo) #define MAX_NO_EVENTS 8 -_X_EXPORT void +void xf86HandlePMEvents(int fd, pointer data) { pmEvent events[MAX_NO_EVENTS]; diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index d2d806f4e..50f5f7cb7 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -41,60 +41,64 @@ #include "propertyst.h" #include "input.h" +#ifdef XF86VIDMODE +# include "vidmodeproc.h" +#endif + /* * Parameters set ONLY from the command line options * The global state of these things is held in xf86InfoRec (when appropriate). */ -extern const char *xf86ConfigFile; -extern Bool xf86AllowMouseOpenFail; +extern _X_EXPORT const char *xf86ConfigFile; +extern _X_EXPORT Bool xf86AllowMouseOpenFail; #ifdef XF86VIDMODE -extern Bool xf86VidModeDisabled; -extern Bool xf86VidModeAllowNonLocal; +extern _X_EXPORT Bool xf86VidModeDisabled; +extern _X_EXPORT Bool xf86VidModeAllowNonLocal; #endif -extern Bool xf86fpFlag; -extern Bool xf86sFlag; -extern Bool xf86bsEnableFlag; -extern Bool xf86bsDisableFlag; -extern Bool xf86silkenMouseDisableFlag; -extern Bool xf86acpiDisableFlag; -extern char *xf86LayoutName; -extern char *xf86ScreenName; -extern char *xf86PointerName; -extern char *xf86KeyboardName; -extern int xf86FbBpp; -extern int xf86Depth; -extern Pix24Flags xf86Pix24; -extern rgb xf86Weight; -extern Bool xf86FlipPixels; -extern Gamma xf86Gamma; -extern char *xf86ServerName; -extern struct pci_slot_match xf86IsolateDevice; +extern _X_EXPORT Bool xf86fpFlag; +extern _X_EXPORT Bool xf86sFlag; +extern _X_EXPORT Bool xf86bsEnableFlag; +extern _X_EXPORT Bool xf86bsDisableFlag; +extern _X_EXPORT Bool xf86silkenMouseDisableFlag; +extern _X_EXPORT Bool xf86acpiDisableFlag; +extern _X_EXPORT char *xf86LayoutName; +extern _X_EXPORT char *xf86ScreenName; +extern _X_EXPORT char *xf86PointerName; +extern _X_EXPORT char *xf86KeyboardName; +extern _X_EXPORT int xf86FbBpp; +extern _X_EXPORT int xf86Depth; +extern _X_EXPORT Pix24Flags xf86Pix24; +extern _X_EXPORT rgb xf86Weight; +extern _X_EXPORT Bool xf86FlipPixels; +extern _X_EXPORT Gamma xf86Gamma; +extern _X_EXPORT char *xf86ServerName; +extern _X_EXPORT struct pci_slot_match xf86IsolateDevice; /* Other parameters */ -extern xf86InfoRec xf86Info; -extern const char *xf86InputDeviceList; -extern const char *xf86ModulePath; -extern MessageType xf86ModPathFrom; -extern const char *xf86LogFile; -extern MessageType xf86LogFileFrom; -extern Bool xf86LogFileWasOpened; -extern serverLayoutRec xf86ConfigLayout; - -extern DriverPtr *xf86DriverList; -extern int xf86NumDrivers; -extern Bool xf86Resetting; -extern Bool xf86Initialising; -extern int xf86NumScreens; -extern xf86CurrentAccessRec xf86CurrentAccess; -extern const char *xf86VisualNames[]; -extern int xf86Verbose; /* verbosity level */ -extern int xf86LogVerbose; /* log file verbosity level */ -extern Bool xf86ProbeOnly; -extern Bool xf86DoProbe; -extern Bool xorgHWAccess; - -extern RootWinPropPtr *xf86RegisteredPropertiesTable; +extern _X_EXPORT xf86InfoRec xf86Info; +extern _X_EXPORT const char *xf86InputDeviceList; +extern _X_EXPORT const char *xf86ModulePath; +extern _X_EXPORT MessageType xf86ModPathFrom; +extern _X_EXPORT const char *xf86LogFile; +extern _X_EXPORT MessageType xf86LogFileFrom; +extern _X_EXPORT Bool xf86LogFileWasOpened; +extern _X_EXPORT serverLayoutRec xf86ConfigLayout; + +extern _X_EXPORT DriverPtr *xf86DriverList; +extern _X_EXPORT int xf86NumDrivers; +extern _X_EXPORT Bool xf86Resetting; +extern _X_EXPORT Bool xf86Initialising; +extern _X_EXPORT int xf86NumScreens; +extern _X_EXPORT xf86CurrentAccessRec xf86CurrentAccess; +extern _X_EXPORT const char *xf86VisualNames[]; +extern _X_EXPORT int xf86Verbose; /* verbosity level */ +extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ +extern _X_EXPORT Bool xf86ProbeOnly; +extern _X_EXPORT Bool xf86DoProbe; +extern _X_EXPORT Bool xorgHWAccess; + +extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable; #ifndef DEFAULT_VERBOSE #define DEFAULT_VERBOSE 0 @@ -114,57 +118,57 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable; /* xf86Bus.c */ -void xf86BusProbe(void); -void xf86AccessInit(void); -void xf86AccessEnter(void); -void xf86AccessLeave(void); -void xf86EntityInit(void); -void xf86AccessLeaveState(void); +extern _X_EXPORT void xf86BusProbe(void); +extern _X_EXPORT void xf86AccessInit(void); +extern _X_EXPORT void xf86AccessEnter(void); +extern _X_EXPORT void xf86AccessLeave(void); +extern _X_EXPORT void xf86EntityInit(void); +extern _X_EXPORT void xf86AccessLeaveState(void); -void xf86FindPrimaryDevice(void); +extern _X_EXPORT void xf86FindPrimaryDevice(void); /* new RAC */ -void xf86ResourceBrokerInit(void); -void xf86PostProbe(void); -void xf86ClearEntityListForScreen(int scrnIndex); -void xf86AddDevToEntity(int entityIndex, GDevPtr dev); -extern void xf86PostPreInit(void); -extern void xf86PostScreenInit(void); +extern _X_EXPORT void xf86ResourceBrokerInit(void); +extern _X_EXPORT void xf86PostProbe(void); +extern _X_EXPORT void xf86ClearEntityListForScreen(int scrnIndex); +extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); +extern _X_EXPORT void xf86PostPreInit(void); +extern _X_EXPORT void xf86PostScreenInit(void); /* xf86Config.c */ -Bool xf86PathIsSafe(const char *path); +extern _X_EXPORT Bool xf86PathIsSafe(const char *path); /* xf86DefaultModes */ -extern const DisplayModeRec xf86DefaultModes[]; -extern const int xf86NumDefaultModes; +extern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; +extern _X_EXPORT const int xf86NumDefaultModes; /* xf86Configure.c */ -void DoConfigure(void); +extern _X_EXPORT void DoConfigure(void); /* xf86ShowOpts.c */ -void DoShowOptions(void); +extern _X_EXPORT void DoShowOptions(void); /* xf86Events.c */ -void xf86Wakeup(pointer blockData, int err, pointer pReadmask); -void xf86SigHandler(int signo); -void xf86HandlePMEvents(int fd, pointer data); -extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); -extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); +extern _X_EXPORT void xf86Wakeup(pointer blockData, int err, pointer pReadmask); +extern _X_EXPORT void xf86SigHandler(int signo); +extern _X_EXPORT void xf86HandlePMEvents(int fd, pointer data); +extern _X_EXPORT int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); +extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); /* xf86Helper.c */ -void xf86LogInit(void); -void xf86CloseLog(void); +extern _X_EXPORT void xf86LogInit(void); +extern _X_EXPORT void xf86CloseLog(void); /* xf86Init.c */ -Bool xf86LoadModules(char **list, pointer *optlist); -int xf86SetVerbosity(int verb); -int xf86SetLogVerbosity(int verb); -Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); +extern _X_EXPORT Bool xf86LoadModules(char **list, pointer *optlist); +extern _X_EXPORT int xf86SetVerbosity(int verb); +extern _X_EXPORT int xf86SetLogVerbosity(int verb); +extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); /* xf86Xinput.c */ -extern EventList *xf86Events; +extern _X_EXPORT EventList *xf86Events; #endif /* _NO_XF86_PROTOTYPES */ diff --git a/hw/xfree86/common/xf86RAC.c b/hw/xfree86/common/xf86RAC.c index 1ee5e5705..2eed8c7f5 100644 --- a/hw/xfree86/common/xf86RAC.c +++ b/hw/xfree86/common/xf86RAC.c @@ -262,7 +262,7 @@ static int RACGCKeyIndex; static DevPrivateKey RACGCKey = &RACGCKeyIndex; -_X_EXPORT Bool +Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag) { ScrnInfoPtr pScrn; diff --git a/hw/xfree86/common/xf86RAC.h b/hw/xfree86/common/xf86RAC.h index 366c21485..881d0042f 100644 --- a/hw/xfree86/common/xf86RAC.h +++ b/hw/xfree86/common/xf86RAC.h @@ -6,7 +6,7 @@ #include "misc.h" #include "xf86.h" -Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag); +extern _X_EXPORT Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag); /* flags */ #define RAC_FB 0x01 diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 2d1ec5d85..0e06de661 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -364,7 +364,7 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) return (*pScreen->CloseScreen) (index, pScreen); } -_X_EXPORT Rotation +Rotation xf86GetRotation(ScreenPtr pScreen) { if (xf86RandRKey == NULL) @@ -374,7 +374,7 @@ xf86GetRotation(ScreenPtr pScreen) } /* Function to change RandR's idea of the virtual screen size */ -_X_EXPORT Bool +Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode) @@ -411,7 +411,7 @@ xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, return TRUE; } -_X_EXPORT Bool +Bool xf86RandRInit (ScreenPtr pScreen) { rrScrPrivPtr rp; diff --git a/hw/xfree86/common/xf86Resources.h b/hw/xfree86/common/xf86Resources.h index 15bd32c69..012fa699e 100644 --- a/hw/xfree86/common/xf86Resources.h +++ b/hw/xfree86/common/xf86Resources.h @@ -106,16 +106,16 @@ {ResShrIoSparse | ResBios | ResBus, 0x02E8, 0x03F8} /* Predefined resources */ -extern resRange resVgaExclusive[]; -extern resRange resVgaShared[]; -extern resRange resVgaIoShared[]; -extern resRange resVgaMemShared[]; -extern resRange resVgaUnusedExclusive[]; -extern resRange resVgaUnusedShared[]; -extern resRange resVgaSparseExclusive[]; -extern resRange resVgaSparseShared[]; -extern resRange res8514Exclusive[]; -extern resRange res8514Shared[]; +extern _X_EXPORT resRange resVgaExclusive[]; +extern _X_EXPORT resRange resVgaShared[]; +extern _X_EXPORT resRange resVgaIoShared[]; +extern _X_EXPORT resRange resVgaMemShared[]; +extern _X_EXPORT resRange resVgaUnusedExclusive[]; +extern _X_EXPORT resRange resVgaUnusedShared[]; +extern _X_EXPORT resRange resVgaSparseExclusive[]; +extern _X_EXPORT resRange resVgaSparseShared[]; +extern _X_EXPORT resRange res8514Exclusive[]; +extern _X_EXPORT resRange res8514Shared[]; /* Less misleading aliases for xf86SetOperatingState() */ #define resVgaMem resVgaMemShared diff --git a/hw/xfree86/common/xf86ShowOpts.c b/hw/xfree86/common/xf86ShowOpts.c index 077d93604..b8efa73c2 100644 --- a/hw/xfree86/common/xf86ShowOpts.c +++ b/hw/xfree86/common/xf86ShowOpts.c @@ -76,7 +76,7 @@ optionTypeToSting(OptionValueType type) } } -_X_EXPORT void DoShowOptions (void) { +void DoShowOptions (void) { int i = 0; char **vlist = 0; char *pSymbol = 0; diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 24fccd31b..d855bd1a8 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -62,7 +62,7 @@ static Bool VidModeClose(int i, ScreenPtr pScreen); # define DEBUG_P(x) /**/ #endif -_X_EXPORT Bool +Bool VidModeExtensionInit(ScreenPtr pScreen) { #ifdef XF86VIDMODE @@ -142,7 +142,7 @@ VidModeAvailable(int scrnIndex) } } -_X_EXPORT Bool +Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -161,7 +161,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT int +int VidModeGetDotClock(int scrnIndex, int Clock) { ScrnInfoPtr pScrn; @@ -176,7 +176,7 @@ VidModeGetDotClock(int scrnIndex, int Clock) return pScrn->clock[Clock]; } -_X_EXPORT int +int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) { ScrnInfoPtr pScrn; @@ -194,7 +194,7 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) } } -_X_EXPORT Bool +Bool VidModeGetClocks(int scrnIndex, int *Clocks) { ScrnInfoPtr pScrn; @@ -215,7 +215,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks) } -_X_EXPORT Bool +Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -238,7 +238,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) return VidModeGetNextModeline(scrnIndex, mode, dotClock); } -_X_EXPORT Bool +Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -263,7 +263,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT Bool +Bool VidModeDeleteModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -276,7 +276,7 @@ VidModeDeleteModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT Bool +Bool VidModeZoomViewport(int scrnIndex, int zoom) { ScrnInfoPtr pScrn; @@ -289,7 +289,7 @@ VidModeZoomViewport(int scrnIndex, int zoom) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetViewPort(int scrnIndex, int x, int y) { ScrnInfoPtr pScrn; @@ -310,7 +310,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetViewPort(int scrnIndex, int *x, int *y) { ScrnInfoPtr pScrn; @@ -324,7 +324,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y) return TRUE; } -_X_EXPORT Bool +Bool VidModeSwitchMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -346,7 +346,7 @@ VidModeSwitchMode(int scrnIndex, pointer mode) return retval; } -_X_EXPORT Bool +Bool VidModeLockZoom(int scrnIndex, Bool lock) { ScrnInfoPtr pScrn; @@ -363,7 +363,7 @@ VidModeLockZoom(int scrnIndex, Bool lock) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetMonitor(int scrnIndex, pointer *monitor) { ScrnInfoPtr pScrn; @@ -377,7 +377,7 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor) return TRUE; } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -390,7 +390,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode) return xf86CheckModeForMonitor((DisplayModePtr)mode, pScrn->monitor); } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -403,7 +403,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode) return xf86CheckModeForDriver(pScrn, (DisplayModePtr)mode, 0); } -_X_EXPORT void +void VidModeSetCrtcForMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -422,7 +422,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode) return; } -_X_EXPORT Bool +Bool VidModeAddModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -443,7 +443,7 @@ VidModeAddModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT int +int VidModeGetNumOfModes(int scrnIndex) { pointer mode = NULL; @@ -459,7 +459,7 @@ VidModeGetNumOfModes(int scrnIndex) } while (TRUE); } -_X_EXPORT Bool +Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue) { ScrnInfoPtr pScrn; @@ -478,7 +478,7 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) { ScrnInfoPtr pScrn; @@ -493,7 +493,7 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -506,7 +506,7 @@ VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -519,7 +519,7 @@ VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT int +int VidModeGetGammaRampSize(int scrnIndex) { if (!VidModeAvailable(scrnIndex)) @@ -528,7 +528,7 @@ VidModeGetGammaRampSize(int scrnIndex) return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen); } -_X_EXPORT pointer +pointer VidModeCreateMode(void) { DisplayModePtr mode; @@ -544,14 +544,14 @@ VidModeCreateMode(void) return mode; } -_X_EXPORT void +void VidModeCopyMode(pointer modefrom, pointer modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } -_X_EXPORT int +int VidModeGetModeValue(pointer mode, int valtyp) { int ret = 0; @@ -594,7 +594,7 @@ VidModeGetModeValue(pointer mode, int valtyp) return ret; } -_X_EXPORT void +void VidModeSetModeValue(pointer mode, int valtyp, int val) { switch (valtyp) { @@ -635,7 +635,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val) return; } -_X_EXPORT vidMonitorValue +vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx) { vidMonitorValue ret; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 89a27c7b5..38fd1ecbf 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -96,7 +96,7 @@ #include "os.h" -_X_EXPORT EventListPtr xf86Events = NULL; +EventListPtr xf86Events = NULL; /** * Eval config and modify DeviceVelocityRec accordingly @@ -255,7 +255,7 @@ xf86SendDragEvents(DeviceIntPtr device) * *********************************************************************** */ -_X_EXPORT void +void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { @@ -293,7 +293,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ -_X_EXPORT int +int xf86ActivateDevice(LocalDevicePtr local) { DeviceIntPtr dev; @@ -368,7 +368,7 @@ xf86ActivateDevice(LocalDevicePtr local) *********************************************************************** */ -_X_EXPORT void +void OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status) @@ -379,7 +379,7 @@ OpenInputDevice(DeviceIntPtr dev, *status = Success; } -_X_EXPORT void +void CloseInputDevice(DeviceIntPtr dev, ClientPtr client) { @@ -398,7 +398,7 @@ CloseInputDevice(DeviceIntPtr dev, *********************************************************************** */ -_X_EXPORT int +int SetDeviceMode (ClientPtr client, DeviceIntPtr dev, int mode) { LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate; @@ -424,7 +424,7 @@ SetDeviceMode (ClientPtr client, DeviceIntPtr dev, int mode) *********************************************************************** */ -_X_EXPORT int +int SetDeviceValuators (ClientPtr client, DeviceIntPtr dev, int *valuators, int first_valuator, int num_valuators) { @@ -447,7 +447,7 @@ SetDeviceValuators (ClientPtr client, DeviceIntPtr dev, int *valuators, *********************************************************************** */ -_X_EXPORT int +int ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control) { LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate; @@ -470,7 +470,7 @@ ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control) } } -_X_EXPORT void +void AddOtherInputDevices() { } @@ -562,7 +562,7 @@ unwind: return rval; } -_X_EXPORT int +int NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) { IDevRec *idev = NULL; @@ -646,7 +646,7 @@ unwind: return rval; } -_X_EXPORT void +void DeleteInputDeviceRequest(DeviceIntPtr pDev) { LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate; @@ -691,7 +691,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ -_X_EXPORT void +void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -716,7 +716,7 @@ xf86PostMotionEvent(DeviceIntPtr device, xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators); } -_X_EXPORT void +void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -781,7 +781,7 @@ xf86PostMotionEventP(DeviceIntPtr device, } } -_X_EXPORT void +void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, @@ -813,7 +813,7 @@ xf86PostProximityEvent(DeviceIntPtr device, } -_X_EXPORT void +void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, @@ -856,7 +856,7 @@ xf86PostButtonEvent(DeviceIntPtr device, } -_X_EXPORT void +void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, @@ -902,7 +902,7 @@ xf86PostKeyEvent(DeviceIntPtr device, mieqEnqueue(device, (xf86Events + i)->event); } -_X_EXPORT void +void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) @@ -931,7 +931,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, mieqEnqueue(device, (xf86Events + i)->event); } -_X_EXPORT LocalDevicePtr +LocalDevicePtr xf86FirstLocalDevice() { return xf86InputDevs; @@ -950,7 +950,7 @@ xf86FirstLocalDevice() * different orgins on the touch screen vs X. */ -_X_EXPORT int +int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, @@ -984,7 +984,7 @@ xf86ScaleAxis(int Cx, * ReadInput function before any events are posted, if the device is screen * specific like a touch screen. */ -_X_EXPORT void +void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, @@ -997,7 +997,7 @@ xf86XInputSetScreen(LocalDevicePtr local, } -_X_EXPORT void +void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { @@ -1012,7 +1012,7 @@ xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, * Set the valuator values to be in synch with dix/event.c * DefineInitialRootWindow(). */ -_X_EXPORT void +void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { @@ -1038,7 +1038,7 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) * * @param panic True if device is unrecoverable and needs to be removed. */ -_X_EXPORT void +void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { devicePresenceNotify ev; @@ -1066,7 +1066,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) * out that the read error wasn't quite that bad after all. * Device will be re-activated, and an event sent to the client. */ -_X_EXPORT void +void xf86EnableDevice(DeviceIntPtr dev) { EnableDevice(dev); diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index bfd7f895c..8afda95e1 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -152,51 +152,53 @@ typedef struct _DeviceAssocRec } DeviceAssocRec, *DeviceAssocPtr; /* xf86Globals.c */ -extern InputInfoPtr xf86InputDevs; +extern _X_EXPORT InputInfoPtr xf86InputDevs; /* xf86Xinput.c */ -void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, int *valuators); -void xf86PostProximityEvent(DeviceIntPtr device, int is_in, +extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, ...); -void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, +extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, ...); -void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, +extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, +extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); -int xf86ActivateDevice(LocalDevicePtr local); -LocalDevicePtr xf86FirstLocalDevice(void); -int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); -void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); -void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); -void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, +extern _X_EXPORT int xf86ActivateDevice(LocalDevicePtr local); +extern _X_EXPORT LocalDevicePtr xf86FirstLocalDevice(void); +extern _X_EXPORT int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); +extern _X_EXPORT void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); +extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); +extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res); -void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); -void xf86AddEnabledDevice(InputInfoPtr pInfo); -void xf86RemoveEnabledDevice(InputInfoPtr pInfo); -void xf86DisableDevice(DeviceIntPtr dev, Bool panic); -void xf86EnableDevice(DeviceIntPtr dev); +extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); +extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); +extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev); +/* not exported */ +int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto); /* xf86Helper.c */ -void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); -void xf86DeleteInputDriver(int drvIndex); -InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); -InputDriverPtr xf86LookupInputDriver(const char *name); -InputInfoPtr xf86LookupInput(const char *name); -void xf86DeleteInput(InputInfoPtr pInp, int flags); -void xf86MotionHistoryAllocate(LocalDevicePtr local); -int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, +extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex); +extern _X_EXPORT InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); +extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name); +extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name); +extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags); +extern _X_EXPORT void xf86MotionHistoryAllocate(LocalDevicePtr local); +extern _X_EXPORT int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, unsigned long start, unsigned long stop, ScreenPtr pScreen, BOOL core); /* xf86Option.c */ -void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, +extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts); diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index 3944d7873..bb1aff1d9 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -126,7 +126,7 @@ static void CMapUnwrapScreen(ScreenPtr pScreen); -_X_EXPORT Bool xf86HandleColormaps( +Bool xf86HandleColormaps( ScreenPtr pScreen, int maxColors, int sigRGBbits, @@ -972,7 +972,7 @@ ComputeGammaRamp ( } } -_X_EXPORT int +int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -1040,7 +1040,7 @@ xf86ChangeGammaRamp( return Success; } -_X_EXPORT int +int xf86GetGammaRampSize(ScreenPtr pScreen) { CMapScreenPtr pScreenPriv; @@ -1054,7 +1054,7 @@ xf86GetGammaRampSize(ScreenPtr pScreen) return pScreenPriv->gammaElements; } -_X_EXPORT int +int xf86GetGammaRamp( ScreenPtr pScreen, int size, @@ -1098,7 +1098,7 @@ xf86GetGammaRamp( return Success; } -_X_EXPORT int +int xf86ChangeGamma( ScreenPtr pScreen, Gamma gamma diff --git a/hw/xfree86/common/xf86cmap.h b/hw/xfree86/common/xf86cmap.h index b98bd3bfd..f15844e59 100644 --- a/hw/xfree86/common/xf86cmap.h +++ b/hw/xfree86/common/xf86cmap.h @@ -36,7 +36,7 @@ #define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002 #define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004 -Bool xf86HandleColormaps( +extern _X_EXPORT Bool xf86HandleColormaps( ScreenPtr pScreen, int maxCol, int sigRGBbits, @@ -45,13 +45,13 @@ Bool xf86HandleColormaps( unsigned int flags ); -int +extern _X_EXPORT int xf86ChangeGamma( ScreenPtr pScreen, Gamma newGamma ); -int +extern _X_EXPORT int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -60,9 +60,9 @@ xf86ChangeGammaRamp( unsigned short *blue ); -int xf86GetGammaRampSize(ScreenPtr pScreen); +extern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen); -int +extern _X_EXPORT int xf86GetGammaRamp( ScreenPtr pScreen, int size, diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c index bd7d935e5..552b9f8b1 100644 --- a/hw/xfree86/common/xf86fbBus.c +++ b/hw/xfree86/common/xf86fbBus.c @@ -51,9 +51,9 @@ #include "xf86RAC.h" -_X_EXPORT Bool fbSlotClaimed = FALSE; +Bool fbSlotClaimed = FALSE; -_X_EXPORT int +int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; @@ -79,7 +79,7 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) /* * Get the list of FB "slots" claimed by a screen */ -_X_EXPORT int +int xf86GetFbInfoForScreen(int scrnIndex) { int num = 0; diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index 5471c58f0..510c3d8c4 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -45,7 +45,7 @@ static int xf86FBManagerKeyIndex; static DevPrivateKey xf86FBManagerKey; -_X_EXPORT Bool xf86RegisterOffscreenManager( +Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ @@ -57,7 +57,7 @@ _X_EXPORT Bool xf86RegisterOffscreenManager( } -_X_EXPORT Bool +Bool xf86FBManagerRunning(ScreenPtr pScreen) { if(xf86FBManagerKey == NULL) @@ -68,7 +68,7 @@ xf86FBManagerRunning(ScreenPtr pScreen) return TRUE; } -_X_EXPORT Bool +Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, @@ -86,7 +86,7 @@ xf86RegisterFreeBoxCallback( } -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateOffscreenArea( ScreenPtr pScreen, int w, int h, @@ -108,7 +108,7 @@ xf86AllocateOffscreenArea( } -_X_EXPORT FBLinearPtr +FBLinearPtr xf86AllocateOffscreenLinear( ScreenPtr pScreen, int length, @@ -130,7 +130,7 @@ xf86AllocateOffscreenLinear( } -_X_EXPORT void +void xf86FreeOffscreenArea(FBAreaPtr area) { FBManagerFuncsPtr funcs; @@ -149,7 +149,7 @@ xf86FreeOffscreenArea(FBAreaPtr area) } -_X_EXPORT void +void xf86FreeOffscreenLinear(FBLinearPtr linear) { FBManagerFuncsPtr funcs; @@ -168,7 +168,7 @@ xf86FreeOffscreenLinear(FBLinearPtr linear) } -_X_EXPORT Bool +Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h @@ -186,7 +186,7 @@ xf86ResizeOffscreenArea( return (*funcs->ResizeOffscreenArea)(resize, w, h); } -_X_EXPORT Bool +Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size @@ -205,7 +205,7 @@ xf86ResizeOffscreenLinear( } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *w, int *h, @@ -228,7 +228,7 @@ xf86QueryLargestOffscreenArea( pScreen, w, h, gran, preferences, severity); } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, @@ -250,7 +250,7 @@ xf86QueryLargestOffscreenLinear( } -_X_EXPORT Bool +Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerFuncsPtr funcs; @@ -1196,7 +1196,7 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox @@ -1233,7 +1233,7 @@ xf86InitFBManager( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixelArea, @@ -1325,7 +1325,7 @@ xf86InitFBManagerArea( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr FullRegion @@ -1363,7 +1363,7 @@ xf86InitFBManagerRegion( return TRUE; } -_X_EXPORT Bool +Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, @@ -1407,7 +1407,7 @@ xf86InitFBManagerLinear( disappear after the next release. People should use the real linear functions instead */ -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, diff --git a/hw/xfree86/common/xf86fbman.h b/hw/xfree86/common/xf86fbman.h index 4f2eac5e6..1b3c31635 100644 --- a/hw/xfree86/common/xf86fbman.h +++ b/hw/xfree86/common/xf86fbman.h @@ -110,43 +110,43 @@ typedef struct { } FBManagerFuncs, *FBManagerFuncsPtr; -Bool xf86RegisterOffscreenManager( +extern _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr ScreenRegion ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixalArea, int Verbosity ); -Bool +extern _X_EXPORT Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, int size ); -Bool +extern _X_EXPORT Bool xf86FBManagerRunning( ScreenPtr pScreen ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateOffscreenArea ( ScreenPtr pScreen, int w, int h, @@ -156,7 +156,7 @@ xf86AllocateOffscreenArea ( pointer privData ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, @@ -166,7 +166,7 @@ xf86AllocateLinearOffscreenArea ( pointer privData ); -FBLinearPtr +extern _X_EXPORT FBLinearPtr xf86AllocateOffscreenLinear ( ScreenPtr pScreen, int length, @@ -176,36 +176,36 @@ xf86AllocateOffscreenLinear ( pointer privData ); -void xf86FreeOffscreenArea(FBAreaPtr area); -void xf86FreeOffscreenLinear(FBLinearPtr area); +extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area); +extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h ); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size ); -Bool +extern _X_EXPORT Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, pointer devPriv ); -Bool +extern _X_EXPORT Bool xf86PurgeUnlockedOffscreenAreas( ScreenPtr pScreen ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *width, int *height, @@ -214,7 +214,7 @@ xf86QueryLargestOffscreenArea( int priority ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c index 0e3e3cc6b..d72674855 100644 --- a/hw/xfree86/common/xf86noBus.c +++ b/hw/xfree86/common/xf86noBus.c @@ -51,7 +51,7 @@ #include "xf86RAC.h" -_X_EXPORT int +int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index ba2f8f73d..786a2b92e 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -53,7 +53,7 @@ #include "xf86RAC.h" /* Bus-specific globals */ -_X_EXPORT Bool pciSlotClaimed = FALSE; +Bool pciSlotClaimed = FALSE; static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw */ @@ -97,7 +97,7 @@ static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw * || IS_VGA(c) ) -_X_EXPORT void +void xf86FormatPciBusNumber(int busnum, char *buffer) { /* 'buffer' should be at least 8 characters long */ @@ -701,7 +701,7 @@ DisablePciBusAccess(void) * Otherwise, claim the slot for the screen requesting it. */ -_X_EXPORT int +int xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { @@ -759,7 +759,7 @@ xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, * in the correct format for a PCI bus id. */ -_X_EXPORT Bool +Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) { /* @@ -833,7 +833,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) * Compare a BUS ID string with a PCI bus id. Return TRUE if they match. */ -_X_EXPORT Bool +Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func) { int ibus, idevice, ifunc; @@ -850,7 +850,7 @@ xf86ComparePciBusString(const char *busID, int bus, int device, int func) * is PCI and bus, dev and func numbers match. */ -_X_EXPORT Bool +Bool xf86IsPrimaryPci(struct pci_device *pPci) { return ((primaryBus.type == BUS_PCI) && (pPci == primaryBus.id.pci)); @@ -859,7 +859,7 @@ xf86IsPrimaryPci(struct pci_device *pPci) /* * xf86GetPciInfoForEntity() -- Get the pciVideoRec of entity. */ -_X_EXPORT struct pci_device * +struct pci_device * xf86GetPciInfoForEntity(int entityIndex) { EntityPtr p; @@ -875,7 +875,7 @@ xf86GetPciInfoForEntity(int entityIndex) * xf86CheckPciMemBase() checks that the memory base value matches one of the * PCI base address register values for the given PCI device. */ -_X_EXPORT Bool +Bool xf86CheckPciMemBase( struct pci_device * pPci, memType base ) { int i; @@ -890,7 +890,7 @@ xf86CheckPciMemBase( struct pci_device * pPci, memType base ) * Check if the slot requested is free. If it is already in use, return FALSE. */ -_X_EXPORT Bool +Bool xf86CheckPciSlot(const struct pci_device *d) { int i; diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index 78e5d7cb7..a4caef3eb 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -41,7 +41,7 @@ #include "xf86sbusBus.h" #include "xf86Sbus.h" -_X_EXPORT Bool sbusSlotClaimed = FALSE; +Bool sbusSlotClaimed = FALSE; static int xf86nSbusInfo; @@ -79,7 +79,7 @@ CheckSbusDevice(const char *device, int fbNum) psdp->fd = -1; } -_X_EXPORT void +void xf86SbusProbe(void) { int i, useProm = 0; @@ -360,7 +360,7 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp, return -1; } -_X_EXPORT int +int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities) @@ -536,7 +536,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, /* * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity. */ -_X_EXPORT sbusDevicePtr +sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex) { sbusDevicePtr *psdpp; @@ -552,7 +552,7 @@ xf86GetSbusInfoForEntity(int entityIndex) return NULL; } -_X_EXPORT int +int xf86GetEntityForSbusInfo(sbusDevicePtr psdp) { int i; @@ -567,7 +567,7 @@ xf86GetEntityForSbusInfo(sbusDevicePtr psdp) return -1; } -_X_EXPORT void +void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) { DisplayModePtr mode; @@ -667,7 +667,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) { sbusCmapPtr cmap; diff --git a/hw/xfree86/common/xf86sbusBus.h b/hw/xfree86/common/xf86sbusBus.h index 6161a08e2..1e7e03350 100644 --- a/hw/xfree86/common/xf86sbusBus.h +++ b/hw/xfree86/common/xf86sbusBus.h @@ -64,36 +64,36 @@ extern struct sbus_devtable { char *descr; } sbusDeviceTable[]; -void xf86SbusProbe(void); -extern sbusDevicePtr *xf86SbusInfo; +extern _X_EXPORT void xf86SbusProbe(void); +extern _X_EXPORT sbusDevicePtr *xf86SbusInfo; -int xf86MatchSbusInstances(const char *driverName, int sbusDevId, +extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); -int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); -void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); -pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, +extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); +extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); +extern _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size); -void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); -void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); -void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); -Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); +extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); +extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); +extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); -extern int promRootNode; +extern _X_EXPORT int promRootNode; -int promGetSibling(int node); -int promGetChild(int node); -char * promGetProperty(const char *prop, int *lenp); -int promGetBool(const char *prop); +extern _X_EXPORT int promGetSibling(int node); +extern _X_EXPORT int promGetChild(int node); +extern _X_EXPORT char * promGetProperty(const char *prop, int *lenp); +extern _X_EXPORT int promGetBool(const char *prop); -int sparcPromInit(void); -void sparcPromClose(void); -char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); -int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); -void sparcPromAssignNodes(void); -char * sparcPromNode2Pathname(sbusPromNodePtr pnode); -int sparcPromPathname2Node(const char *pathName); -char *sparcDriverName(void); +extern _X_EXPORT int sparcPromInit(void); +extern _X_EXPORT void sparcPromClose(void); +extern _X_EXPORT char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); +extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); +extern _X_EXPORT void sparcPromAssignNodes(void); +extern _X_EXPORT char * sparcPromNode2Pathname(sbusPromNodePtr pnode); +extern _X_EXPORT int sparcPromPathname2Node(const char *pathName); +extern _X_EXPORT char *sparcDriverName(void); #endif /* _XF86_SBUSBUS_H */ diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index cc8452528..85b13d371 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -113,12 +113,12 @@ static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int); static int XF86XVWindowKeyIndex; static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKeyIndex; static int XF86XvScreenKeyIndex; -_X_EXPORT DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex; +DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex; static unsigned long PortResource = 0; -_X_EXPORT DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; -_X_EXPORT unsigned long (*XvGetRTPortProc)(void) = NULL; -_X_EXPORT int (*XvScreenInitProc)(ScreenPtr) = NULL; +DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; +unsigned long (*XvGetRTPortProc)(void) = NULL; +int (*XvScreenInitProc)(ScreenPtr) = NULL; #define GET_XV_SCREEN(pScreen) \ ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey)) @@ -132,7 +132,7 @@ _X_EXPORT int (*XvScreenInitProc)(ScreenPtr) = NULL; static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; -_X_EXPORT int +int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ){ @@ -149,7 +149,7 @@ xf86XVRegisterGenericAdaptorDriver( return 1; } -_X_EXPORT int +int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **adaptors @@ -188,7 +188,7 @@ typedef struct { static OffscreenImageRec OffscreenImages[MAXSCREENS]; -_X_EXPORT Bool +Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, @@ -200,7 +200,7 @@ xf86XVRegisterOffscreenImages( return TRUE; } -_X_EXPORT XF86OffscreenImagePtr +XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num @@ -210,20 +210,20 @@ xf86XVQueryOffscreenImages( } -_X_EXPORT XF86VideoAdaptorPtr +XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { return xcalloc(1, sizeof(XF86VideoAdaptorRec)); } -_X_EXPORT void +void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { xfree(ptr); } -_X_EXPORT Bool +Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *adaptors, @@ -1814,7 +1814,7 @@ xf86XVQueryImageAttributes( } -_X_EXPORT void +void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) { ScreenPtr pScreen = pDraw->pScreen; @@ -1864,7 +1864,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) xfree(rects); } -_X_EXPORT void +void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) { DrawablePtr root = &WindowTable[pScreen->myNum]->drawable; @@ -1909,7 +1909,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) #define DummyScreen screenInfo.screens[0] -_X_EXPORT Bool +Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -1991,7 +1991,7 @@ xf86XVClipVideoHelper( return TRUE; } -_X_EXPORT void +void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -2049,7 +2049,7 @@ xf86XVCopyYUV12ToPacked( } } -_X_EXPORT void +void xf86XVCopyPacked( const void *src, void *dst, diff --git a/hw/xfree86/common/xf86xv.h b/hw/xfree86/common/xf86xv.h index 817e2b994..e98c4234a 100644 --- a/hw/xfree86/common/xf86xv.h +++ b/hw/xfree86/common/xf86xv.h @@ -191,7 +191,7 @@ typedef struct { XF86AttributePtr attributes; } XF86OffscreenImageRec, *XF86OffscreenImagePtr; -Bool +extern _X_EXPORT Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *Adaptors, @@ -201,41 +201,41 @@ xf86XVScreenInit( typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors); -int +extern _X_EXPORT int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ); -int +extern _X_EXPORT int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors ); -Bool +extern _X_EXPORT Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, int num ); -XF86OffscreenImagePtr +extern _X_EXPORT XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num ); -XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); +extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); -void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); +extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); -void +extern _X_EXPORT void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); -void +extern _X_EXPORT void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); -Bool +extern _X_EXPORT Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -247,7 +247,7 @@ xf86XVClipVideoHelper( INT32 height ); -void +extern _X_EXPORT void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -260,7 +260,7 @@ xf86XVCopyYUV12ToPacked( int w ); -void +extern _X_EXPORT void xf86XVCopyPacked( const void *src, void *dst, @@ -270,4 +270,8 @@ xf86XVCopyPacked( int w ); +extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc)(void); +extern _X_EXPORT unsigned long (*XvGetRTPortProc)(void); +extern _X_EXPORT int (*XvScreenInitProc)(ScreenPtr); + #endif /* _XF86XV_H_ */ diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c index 41ef0a0ca..39d33da08 100644 --- a/hw/xfree86/common/xf86xvmc.c +++ b/hw/xfree86/common/xf86xvmc.c @@ -45,8 +45,7 @@ #include "xf86xvpriv.h" #include "xf86xvmc.h" -typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); -_X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; +XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; typedef struct { @@ -156,7 +155,7 @@ xf86XvMCCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen)(i, pScreen); } -_X_EXPORT Bool xf86XvMCScreenInit( +Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors @@ -219,12 +218,12 @@ _X_EXPORT Bool xf86XvMCScreenInit( return TRUE; } -_X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) +XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) { return xcalloc(1, sizeof(XF86MCAdaptorRec)); } -_X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) +void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { xfree(adaptor); } diff --git a/hw/xfree86/common/xf86xvmc.h b/hw/xfree86/common/xf86xvmc.h index bc7a98c6a..902b4f8fc 100644 --- a/hw/xfree86/common/xf86xvmc.h +++ b/hw/xfree86/common/xf86xvmc.h @@ -151,13 +151,16 @@ typedef struct { an array of structures. */ -Bool xf86XvMCScreenInit( +extern _X_EXPORT Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors ); -XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); -void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); +extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); +extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); + +typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); +extern _X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc; #endif /* _XF86XVMC_H */ diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h index 4200dac80..761fc3adf 100644 --- a/hw/xfree86/common/xf86xvpriv.h +++ b/hw/xfree86/common/xf86xvpriv.h @@ -34,7 +34,7 @@ /*** These are DDX layer privates ***/ -extern DevPrivateKey XF86XvScreenKey; +extern _X_EXPORT DevPrivateKey XF86XvScreenKey; typedef struct { DestroyWindowProcPtr DestroyWindow; diff --git a/hw/xfree86/common/xisb.c b/hw/xfree86/common/xisb.c index 6314094a0..1cb9e4854 100644 --- a/hw/xfree86/common/xisb.c +++ b/hw/xfree86/common/xisb.c @@ -62,7 +62,7 @@ * Function Definitions ****************************************************************************/ -_X_EXPORT XISBuffer * +XISBuffer * XisbNew (int fd, ssize_t size) { XISBuffer *b; @@ -86,14 +86,14 @@ XisbNew (int fd, ssize_t size) return (b); } -_X_EXPORT void +void XisbFree (XISBuffer *b) { xfree (b->buf); xfree (b); } -_X_EXPORT int +int XisbRead (XISBuffer *b) { int ret; @@ -136,7 +136,7 @@ XisbRead (XISBuffer *b) } /* the only purpose of this function is to provide output tracing */ -_X_EXPORT ssize_t +ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) { if (b->trace) @@ -149,7 +149,7 @@ XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) } /* turn tracing of this buffer on (1) or off (0) */ -_X_EXPORT void +void XisbTrace (XISBuffer *b, int trace) { b->trace = trace; @@ -167,7 +167,7 @@ XisbTrace (XISBuffer *b, int trace) * give duration in usecs. */ -_X_EXPORT void +void XisbBlockDuration (XISBuffer *b, int block_duration) { b->block_duration = block_duration; diff --git a/hw/xfree86/common/xisb.h b/hw/xfree86/common/xisb.h index b7bdd5682..bacfde166 100644 --- a/hw/xfree86/common/xisb.h +++ b/hw/xfree86/common/xisb.h @@ -52,12 +52,12 @@ typedef struct _XISBuffer * of globals. * put locals in the .c file. *****************************************************************************/ -XISBuffer * XisbNew (int fd, ssize_t size); -void XisbFree (XISBuffer *b); -int XisbRead (XISBuffer *b); -ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); -void XisbTrace (XISBuffer *b, int trace); -void XisbBlockDuration (XISBuffer *b, int block_duration); +extern _X_EXPORT XISBuffer * XisbNew (int fd, ssize_t size); +extern _X_EXPORT void XisbFree (XISBuffer *b); +extern _X_EXPORT int XisbRead (XISBuffer *b); +extern _X_EXPORT ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); +extern _X_EXPORT void XisbTrace (XISBuffer *b, int trace); +extern _X_EXPORT void XisbBlockDuration (XISBuffer *b, int block_duration); /* * DO NOT PUT ANYTHING AFTER THIS ENDIF diff --git a/hw/xfree86/common/xorgHelper.c b/hw/xfree86/common/xorgHelper.c index 00fe7cab3..7f9dd507a 100644 --- a/hw/xfree86/common/xorgHelper.c +++ b/hw/xfree86/common/xorgHelper.c @@ -16,7 +16,7 @@ #include "xorgVersion.h" -_X_EXPORT CARD32 +CARD32 xorgGetVersion() { return XORG_VERSION_CURRENT; |