Carbon


Request Codes

Header: CMMComponent.h

enum {
    kNCMMInit = 6,
    kCMMMatchColors = 1,
    kCMMCheckColors = 2,
    kCMMValidateProfile = 8,
    kCMMMatchBitmap = 9,
    kCMMCheckBitmap = 10,
    kCMMMatchPixMap = 3,
    kCMMCheckPixMap = 4,
    kCMMConcatenateProfiles = 5,
    kCMMConcatInit = 7,
    kCMMNewLinkProfile = 16,
    kNCMMConcatInit = 18,
    kNCMMNewLinkProfile = 19,
    kCMMGetPS2ColorSpace = 11,
    kCMMGetPS2ColorRenderingIntent = 12,
    kCMMGetPS2ColorRendering = 13,
    kCMMGetPS2ColorRenderingVMSize = 17,
    kCMMFlattenProfile = 14,
    kCMMUnflattenProfile = 15,
    kCMMInit = 0,
    kCMMGetNamedColorInfo = 70,
    kCMMGetNamedColorValue = 71,
    kCMMGetIndNamedColorValue = 72,
    kCMMGetNamedColorIndex = 73,
    kCMMGetNamedColorName = 74
};

Constant descriptions

kNCMMInit

In response to this request code, your CMM should initialize any private data it will need for the color session and for subsequent requests from the calling application or driver. For more information about how your CMM should respond to this request code, see the function NCMInit.

kCMMMatchColors

In response to this request code, your CMM should match the colors in the myColors parameter to the color gamut of the destination profile and replace the color-list color values with the matched colors. For more information about how your CMM should respond to this request code, see the function CMMatchColors.

kCMMCheckColors

In response to this request code, your CMM should test the given list of colors in the myColors parameter against the gamut specified by the destination profile and report if the colors fall within a destination device’s color gamut. For more information about how your CMM should respond to this request code, see the function CMCheckColors.

kCMMValidateProfile

In response to this request code, your CMM should test the profile whose reference is passed in the prof parameter to determine if the profile contains the minimum set of elements required for a profile of its type. For more information about how your CMM should respond to this request code, see the function CMMValidateProfile.

kCMMMatchBitmap

In response to this request code, your CMM must match the colors of the source image bitmap pointed to by the bitmap parameter to the gamut of the destination device using the profiles specified by a previous kNCMMInit, kCMMInit, or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMMatchBitmap.

kCMMCheckBitmap

In response to this request code, your CMM must check the colors of the source image bitmap pointed to by the bitmap parameter against the gamut of the destination device using the profiles specified by a previous kNCMMInit, kCMMInit, or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMCheckBitmap.

kCMMMatchPixMap

In response to this request code, your CMM must match the colors of the pixel map image pointed to by the myPixMap parameter to the gamut of the destination device, replacing the original pixel colors with their corresponding colors as specified in the data color space of the destination device’s color gamut. To perform the matching, you use the profiles specified by a previous kNCMMInit, kCMMInit, or kCMMConcatInit request to your CMM. For more information about how your CMM should respond to this request code, see the function CMMatchPixMap.

kCMMCheckPixMap

In response to this request code, your CMM must check the colors of the pixel map image pointed to by the myPixMap parameter against the gamut of the destination device to determine if the pixel colors are within the gamut of the destination device and report the results. To perform the check, you use the profiles specified by a previous kNCMMInit, kCMMInit, or kCMMConcatInit CMCheckPixMap request to your CMM. For more information about how your CMM should respond to this request code, see the function .

kCMMConcatenateProfiles

This request code is for backward compatibility with ColorSync 1.0.

kCMMConcatInit

In response to this request code, your CMM should initialize any private data your CMM will need for a color session involving the set of profiles specified by the profile array pointed to by the profileSet parameter. Your function should also initialize any additional private data needed in handling subsequent calls pertaining to this component instance. For more information about how your CMM should respond to this request code, see the function CMConcatInit.

kCMMNewLinkProfile

In response to this request code, your CMM must create a single device link profile of type DeviceLink that includes the profiles passed to you in the array pointed to by the profileSet parameter. For more information about how your CMM should respond to this request code, see the function CMNewLinkProfile.

kNCMMConcatInit
kNCMMNewLinkProfile
kCMMGetPS2ColorSpace

In response to this request code, your CMM must obtain or derive the color space element data from the source profile whose reference is passed to your function in the srcProf parameter and pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorSpace.

kCMMGetPS2ColorRenderingIntent

In response to this request code, your CMM must obtain the color-rendering intent from the header of the source profile whose reference is passed to your function in the srcProf parameter and then pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorRenderingIntent.

kCMMGetPS2ColorRendering

In response to this request code, your CMM must obtain the rendering intent from the source profile’s header and generate the color rendering dictionary (CRD) data from the destination profile, and then pass the data to a low-level data-transfer function supplied by the calling application or device driver. For more information about how your CMM should respond to this request code, see the function CMMGetPS2ColorRendering.

kCMMGetPS2ColorRenderingVMSize

In response to this request code, your CMM must obtain or assess the maximum virtual memory (VM) size of the color rendering dictionary (CRD) specified by the destination profile. You must return the size of the CRD for the rendering intent specified by the source profile. See the function CMMGetPS2ColorRenderingVMSize for more information about how your CMM should respond to this request code.

kCMMFlattenProfile

In response to this request code, your CMM must extract the profile data from the profile to flatten, identified by the prof parameter, and pass the profile data to the function specified in the proc parameter. For more information about how your CMM should respond to this request code, see the function CMMFlattenProfile.

Changed in ColorSync 2.5: Starting with ColorSync version 2.5, the ColorSync Manager calls the function provided by the calling program directly, without going through the preferred, or any, CMM. Your CMM only needs to handle this request code for versions of ColorSync prior to version 2.5.

kCMMUnflattenProfile

In response to this request code, your CMM must create a temporary file in which to store the profile data you receive from the low-level data-transfer function supplied by the calling application or driver. Your function must return the file specification. For more information about how your CMM should respond to this request code, see the function CMMUnflattenProfile.

Changed in ColorSync 2.5: Starting with ColorSync version 2.5, the ColorSync Manager calls the function provided by the calling program directly, without going through the preferred, or any, CMM. Your CMM only needs to handle this request code for versions of ColorSync prior to version 2.5.

kCMMInit

This request code is provided for backward compatibility with ColorSync 1.0. A CMM that supports ColorSync 1.0 profiles should respond to this request code by initializing any private data required for the color-matching or gamut-checking session to be held as indicated by subsequent request codes. If your CMM supports only ColorSync 1.0 profiles or both ColorSync 1.0 profiles and ColorSync Manager version 2.x profiles, you must support this request code. If you support only ColorSync Manager version 2.x profiles, you should return an unimplemented error in response to this request code.

kCMMGetNamedColorInfo

In response to this request code, your CMM extracts named color data from the profile whose reference is passed in the srcProf parameter. For more information, see the function CMMGetNamedColorInfo.

kCMMGetNamedColorValue

In response to this request code, your CMM extracts device and profile connection space (PCS) color values for a specific color name from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorValue.

kCMMGetIndNamedColorValue

In response to this request code, your CMM extracts device and PCS color values for a specific named color index from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetIndNamedColorValue.

kCMMGetNamedColorIndex

In response to this request code, your CMM extracts a named color index for a specific color name from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorIndex.

kCMMGetNamedColorName

In response to this request code, your CMM extracts a named color name for a specific named color index from the profile whose reference is passed in the prof parameter. For more information, see the function CMMGetNamedColorName.

Your CMM must respond to the ColorSync Manager required request codes. When a CMM receives a required request code from the ColorSync Manager, the CMM must determine the nature of the request, perform the appropriate processing, set an error code if necessary, and return an appropriate function result to the Component Manager. The required request codes are:

Your CMM should respond to the rest of the ColorSync Manager request codes defined by this enumeration, but it is not required to do so.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)