XFree86 X server ``New Design'' (DRAFT) : Modules, Drivers, Include Files and Interface Issues
Previous: Config file ``Option'' entries
Next: Offscreen Memory Manager

11. Modules, Drivers, Include Files and Interface Issues

NOTE: this section is incomplete.

11.1. Include files

The following include files are typically required by video drivers:

All drivers should include these:

"xf86.h"
"xf86_OSproc.h"
"xf86_ansic.h"
"xf86Resources.h"
Wherever inb/outb (and related things) are used the following should be included:
"compiler.h"
Note: in drivers, this must be included after "xf86_ansic.h".

Drivers that need to access PCI vendor/device definitions need this:

"xf86PciInfo.h"

Drivers that need to access the PCI config space need this:

"xf86Pci.h"

Drivers that initialise a SW cursor need this:

"mipointer.h"

All drivers implementing backing store need this:

"mibstore.h"

All drivers using the mi colourmap code need this:

"micmap.h"

If a driver uses the vgahw module, it needs this:

"vgaHW.h"

Drivers supporting VGA or Hercules monochrome screens need:

"xf1bpp.h"

Drivers supporting VGA or EGC 16-colour screens need:

"xf4bpp.h"

Drivers using cfb need:

#define PSZ 8
#include "cfb.h"
#undef PSZ

Drivers supporting bpp 16, 24 or 32 with cfb need one or more of:

"cfb16.h"
"cfb24.h"
"cfb32.h"

If a driver uses XAA, it needs these:

"xaa.h"
"xaalocal.h"

If a driver uses the fb manager, it needs this:

"xf86fbman.h"

Non-driver modules should include "xf86_ansic.h" to get the correct wrapping of ANSI C/libc functions.

All modules must NOT include any system include files, or the following:

"xf86Priv.h"
"xf86Privstr.h"
"xf86_OSlib.h"
"Xos.h"

In addition, "xf86_libc.h" must not be included explicitly. It is included implicitly by "xf86_ansic.h".


XFree86 X server ``New Design'' (DRAFT) : Modules, Drivers, Include Files and Interface Issues
Previous: Config file ``Option'' entries
Next: Offscreen Memory Manager