The Graphics family provides support for frame buffers and display devices (monitors).
Bundle identifier:
com.apple.iokit.IOGraphicsFamily
Headers in:
Kernel resident: Kernel.framework/Headers/IOKit/graphics/
Device interface: IOKit.framework/Headers/graphics
Class hierarchy:

Device interface:
The Graphics family exports several device interfaces since most access of graphics devices is from user space. However, the Quartz layer arbitrates access to frame buffers from user space through the windowing system or the CGDirectDisplay API. Other layers, such as Carbon Draw Sprockets, provide application access to graphics.
Graphics acceleration is supplied by modules loaded into user address space. A CFPlugIn interface, defined in IOGraphicsInterface.h, implements two-dimensional acceleration. Similarly, OpenGL defines a loadable-bundle interface for three-dimensional rendering. Because there is no standard way to implement this functionality, hardware-specific code can exist in both user-space code and in a kernel-loaded driver.
NDRV graphics drivers should function in OS X if they are correctly written. If they are not correctly written, the many differences in Mac OS X’s runtime environment could cause them to fail, be ignored, or even cause a crash. If you are writing an NDRV driver, follow these rules:
Access the card hardware using virtual addressing. Do not assume the card is mapped into its physically assigned address. In Mac OS 9, NDRV cards are mapped one-to-one, but in Mac OS X, this is not guaranteed. Obtain the virtual addresses for your card's hardware via the AAPL,address property as documented in “Designed Cards and Drivers for PCI Power Macintosh.”
Link only on the native driver libraries, which are NameRegistryLib, DriverServicesLib, and VideoServicesLib. If your card links on InterfaceLib or any other application-level library, it probably won’t work on Mac OS X.
Do not access low memory; doing so causes a crash (kernel panic) in Mac OS X.
Name registry calls are not supported from interrupt level in Mac OS 9 or Mac OS X. They return errors in Mac OS X.
Secondary interrupts are not supported in Mac OS X. There is no need to fake vertical blank interrupts if your card does not support them—simply do not create a VBL service. Mac OS 9 continues to require a VBL service to be installed to move the cursor on your device.
Stack size is limited to 16K on Mac OS X; any NDRV invocation should consume no more than 4K of stack.
If you want to make runtime conditional changes to your NDRV code, the property AAPL,iokit-ndrv is set in the PCI device properties before OS X uses your driver.
Mac OS X supports 32 bits-per-pixel, alpha-blended cursors in hardware. If your device supports an alpha-blended direct color cursor, it should call VSLPrepareCursorForHardwareCursor with these fields set in the HardwareCursorDescriptor record:
bitDepth = 32 maskBitDepth = 0 numColors = 0colorEncodings = NULL |
The hardwareCursorData buffer in the HardwareCursorInfo should point to a buffer of 32 bits per pixel, ARGB data. The data is not premultiplied by the alpha channel.
Last updated: 2007-05-17