Important: The information in this document is obsolete and should not be used for new development.
Graphics Devices
The Color Manager, like Color QuickDraw, accesses a particular graphics device through a data structure known as aGDevice
data structure. EachGDevice
data structure stores information about a particular graphics device; after this data structure is initialized, the device itself is known to the Color Manager and QuickDraw through thatGDevice
data structure.A graphics device, represented by a
GDevice
data structure, is a logical device that the software treats identically whether it is a video card, a display device, or an offscreen graphics world. The Color Manager uses fields of theGDevice
data structure to track application-defined functions and to manage the device CLUT. (See the chapter "Graphics Devices" in Inside Macintosh: Imaging With QuickDraw for additional information about theGDevice
data structure.)The Color Manager uses three fields of a
GDevice
data structure to track application-defined custom search and complement functions. ThegdSearchProc
field contains a handle to a list of search functions, and thegdCompProc
field contains a handle to a list of color complement functions. In each list the Color Manager's default function is at the end of the list, to be used if there are no others, or if they fail. ThegdId
field contains an identifier to connect a particular custom function with the application that created it.Two fields of the
GDevice
data structure contain handles to tables that the Color Manager uses to specify and look up the colors in a device's CLUT. ThegdPMap
field contains a handle to the pixel map for the device. The pixel map in turn contains a handle to theColorTable
data structure that contains the colors currently loaded in the CLUT. ThegdITable
field contains a handle to an inverse table that the Color Manager creates and maintains as a means of quickly finding colors in the color table.