kCMMGetNamedColorInforequest by returning information about a named color space from its profile reference.
A CMM may respond to the
kCMMGetNamedColorInforequest code, but it is not required to do so. Most CMMs can rely on the default Apple CMM to handle this request code adequately. The ColorSync Manager sends this request code to your CMM on behalf of an application or device driver that called the CMMGetNamedColorInfo function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM that handles the
kCMMGetNamedColorInforequest code typically responds by calling a CMM-defined function (for example, MyCMMGetNamedColorInfo).
The MyCMMGetNamedColorInfo function is a color management module-defined subroutine.
pascal CMError MyCMMGetNamedColorInfo( ComponentInstance CMSession, CMProfileRef srcProf, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
- A handle to your CMM's storage for the instance of your component associated with the calling application or device driver.
- A profile reference to a named color space profile to supply information about.
- A pointer to a count of device channels. On output, the number of device channels in the color space for the profile. It should agree with the "data color space" field in the profile header. For example, Pantone maps to CMYK, a 4-channel color space. A value of 0 indicates that no device channels were available.
- A pointer to a device color space. On output, specifies a device color space, such as CMYK, for the srcProf profile.
- A pointer to a profile connection space color space. On output, specifies an interchange color space, such as Lab, for the srcProf profile.
- A pointer to a named color count. On output, the number of named colors in the srcProf profile.
- A pointer to a Pascal string. On output, the string contains a prefix, such as "Pantone", for each color name. The prefix identifies the named color system described by the srcProf profile.
- A pointer to a Pascal string. On output, the string contains a suffix, such as "CVC", for each color name.
- function result
- A result code of type CMError. See "Result Codes" (page 3-172) for a list of ColorSync-specific result codes.
DISCUSSIONThe MyCMMGetNamedColorInfo function returns information about the named color space referred to by the passed profile reference.