Important: The information in this document is obsolete and should not be used for new development.
MyCMMGetNamedColorValue
Handles thekCMMGetNamedColorValue
request by returning device and PCS color values from a named color space profile for a specific color name.A CMM may respond to the
kCMMGetNamedColorValue
request 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 CMMGetNamedColorValue function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM that handles thekCMMGetNamedColorValue
request code typically responds by calling a CMM-defined function (for example, MyCMMGetNamedColorValue).The MyCMMGetNamedColorValue function is a color management module-defined subroutine.
pascal CMError MyCMMGetNamedColorValue( ComponentInstance CMSession, CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
CMSession
- A handle to your CMM's storage for the instance of your component associated with the calling application or device driver.
prof
- A profile reference (page 3-61) that identifies the named color space profile to extract named color information from.
name
- A pointer to a Pascal color name string that identifies the named color to return color values for.
deviceColor
- A pointer to a device color. On output, a device color value in CMColor union format. If the profile does not contain device values,
deviceColor
is undefined.PCSColor
- A pointer to a profile connection space color. On output, an interchange color value in CMColor union format.
- function result
- A result code of type CMError. See "Result Codes" (page 3-172) for a list of ColorSync-specific result codes.
DISCUSSION
Based on the passed color name, the MyCMMGetNamedColorValue function does a lookup into the named color tag in the profile whose reference is passed in theprof
parameter and, if the name is found in the tag, returns device and PCS color values. Otherwise, MyCMMGetNamedColorValue returns an error code.