If a function set uses new device-dependent XcmsColorSpace structures, they will be transparently processed into the color management system. Function sets can share an XcmsColorSpace structure for a device-dependent color space. In addition, multiple XcmsColorSpace structures are allowed for a device-dependent color space; however, a function set can reference only one of them. These XcmsColorSpace structures will differ in the functions to convert to and from CIE XYZ, thus tailored for the specific function set.
typedef struct _XcmsFunctionSet {
XcmsColorSpace **DDColorSpaces;
XcmsScreenInitProc screenInitProc;
XcmsScreenFreeProc screenFreeProc;
} XcmsFunctionSet;
The DDColorSpaces member is a pointer to a NULL terminated list of pointers to XcmsColorSpace structures for the device-dependent color spaces that are supported by the function set. The screenInitProc member is set to the callback procedure (see the following interface specification) that initializes the XcmsPerScrnInfo structure for a particular screen.
The screen initialization callback must adhere to the following software
interface specification:
typedef Status (*XcmsScreenInitProc)(display, screen_number, screen_info)
Display *display;
int screen_number;
XcmsPerScrnInfo *screen_info;
display | Specifies the connection to the X server. |
screen_number | Specifies the appropriate screen number on the host server. |
screen_info | Specifies the XcmsPerScrnInfo structure, which contains the per screen information. |
If unsuccessful, the procedure sets the state member to XcmsInitFailure and returns .PN XcmsFailure .
The
XcmsPerScrnInfo
structure contains:
typedef struct _XcmsPerScrnInfo {
XcmsColor screenWhitePoint;
XPointer functionSet;
XPointer screenData;
unsigned char state;
char pad[3];
} XcmsPerScrnInfo;
The screenWhitePoint member specifies the white point inherent to the screen. The functionSet member specifies the appropriate function set. The screenData member specifies the device profile. The state member is set to one of the following:
The screen free callback must adhere to the following software
interface specification:
typedef void (*XcmsScreenFreeProc)(screenData)
XPointer screenData;
screenData | Specifies the data to be freed. |