xf86.h revision deb4998ba50060c48cce222fd18a8eed053918d7
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * copy of this software and associated documentation files (the "Software"),
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * to deal in the Software without restriction, including without limitation
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and/or sell copies of the Software, and to permit persons to whom the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Software is furnished to do so, subject to the following conditions:
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * The above copyright notice and this permission notice shall be included in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * all copies or substantial portions of the Software.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * OTHER DEALINGS IN THE SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Except as contained in this notice, the name of the copyright holder(s)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and author(s) shall not be used in advertising or otherwise to promote
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the sale, use or other dealings in this Software without prior written
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * authorization from the copyright holder(s) and author(s).
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * This file contains declarations for public XFree86 functions and variables,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and definitions of public macros.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * "public" means available to video drivers.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* General parameters */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int xf86ScreenIndex; /* Index into pScreen.devPrivates */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int xf86CreateRootWindowIndex; /* Index into pScreen.devPrivates */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define XF86SCRNINFO(p) ((ScrnInfoPtr)((p)->devPrivates[xf86ScreenIndex].ptr))
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pScreen->whitePixel = (pScreen->whitePixel) ? 0 : 1; \
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pScreen->blackPixel = (pScreen->blackPixel) ? 0 : 1; \
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* variables for debugging */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern char* xf86p8bit[];
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* Function Prototypes */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86CheckPciSlot(int bus, int device, int func);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86ClaimPciSlot(int bus, int device, int func, DriverPtr drvp,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86ParsePciBusString(const char *busID, int *bus, int *device,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86ComparePciBusString(const char *busID, int bus, int device, int func);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86FormatPciBusNumber(int busnum, char *buffer);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86ClaimIsaSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* new RAC */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86JoinResLists(resPtr rlist1, resPtr rlist2);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ClaimFixedResources(resList list, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncGDevPtr xf86GetDevFromEntity(int entityIndex, int instance);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpciVideoPtr xf86GetPciInfoForEntity(int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SetEntityFuncs(int entityIndex, EntityProc init,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86RegisterResources(int entityIndex, resList list,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long Access);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86CheckPciMemBase(pciVideoPtr pPci, memType base);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86FixPciResource(int entityIndex, int prt, memType alignment,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long type);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86SetOperatingState(resList list, int entityIndex, int mask);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresRange xf86GetBlock(unsigned long type, memType size,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresRange xf86GetSparse(unsigned long type, memType fixed_bits,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncmemType xf86ChkConflict(resRange *rgp, int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86IsPciDevPresent(int bus, int dev, int func);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86NoSharedResources(int screenIndex, resType res);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncresPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpciVideoPtr xf86FindPciDeviceVendor(CARD16 vendorID, CARD16 deviceID,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpciVideoPtr xf86FindPciClass(CARD8 intf, CARD8 subClass, CARD16 class,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86EnablePciBusMaster(pciVideoPtr pPci, Bool enable);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetLastScrnFlag(int entityIndex, int scrnIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncDevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncGDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncGDevPtr xf86AddDeviceToConfigure(const char *driver, pciVideoPtr pVideo,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetViewport(ScreenPtr pScreen, int x, int y);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncDisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86InterceptSigIll(void (*sigillhandler)(void));
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86CommonSpecialKey(int key, Bool down, int modifiers);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ProcessActionEvent(ActionEvent action, void *arg);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86AddDriver(DriverPtr driver, pointer module, int flags);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86EnableDisableFBAccess(int scrnIndex, Bool enable);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86MsgVerb(MessageType type, int verb, const char *format, ...)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ErrorF(const char *format, ...) _printf_attribute(1,2);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncconst char *xf86TokenToString(SymTabPtr table, int token);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86StringToToken(SymTabPtr table, const char *string);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86PrintChipsets(const char *drvname, const char *drvmsg,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86MatchDevice(const char *drivername, GDevPtr **driversectlist);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86MatchPciInstances(const char *driverName, int vendorID,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86MatchIsaInstances(const char *driverName, SymTabPtr chipsets,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncconst char *xf86GetServerName(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86LoadDrvSubModule(DriverPtr drv, const char *name);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86LoadOneModule(char *name, pointer optlist);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86LoaderReqSymLists(const char **, ...);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86LoaderReqSymbols(const char *, ...);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86LoaderRefSymLists(const char **, ...);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86LoaderRefSymbols(const char *, ...);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86NewSerialNumber(WindowPtr p, pointer unused);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncpointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86GetOS(const char **name, int *major, int *minor, int *teeny);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, int scrnFlag,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* Obsolete! don't use */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* Obsolete! don't use */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ConfigIsaEntityInactive(EntityInfoPtr pEnt, IsaChipsets *i_chip,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86AddModuleInfo(ModuleInfoPtr info, pointer module);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCARD8 xf86PeekMmio8(pointer Base, unsigned long Offset);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCARD16 xf86PeekMmio16(pointer Base, unsigned long Offset);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCARD32 xf86PeekMmio32(pointer Base, unsigned long Offset);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86PokeMmio8(pointer Base, unsigned long Offset, CARD8 v);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86PokeMmio16(pointer Base, unsigned long Offset, CARD16 v);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86PokeMmio32(pointer Base, unsigned long Offset, CARD32 v);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void xf86SPTimestamp(xf86TsPtr* timestamp, char* string);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncPixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncconst char *xf86ModeStatusToString(ModeStatus status);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ClockRangePtr clockRanges, LookupModeFlags strategy);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncCARD32 xf86GetBuiltinInterfaceVersion(BuiltinInterface iface, int flag);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncBool xf86RegisterBuiltinInterfaceVersion(BuiltinInterface iface,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif /* _NO_XF86_PROTOTYPES */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif /* _XF86_H */