Carbon


CMConcatInit

Header: CMMComponent.h Carbon status: Unsupported

Handles the kCMMConcatInit request by initializing any private data the CMM will need for a color session involving the specified set of profiles.

CMConcatInit ();
DISCUSSION

A CMM should respond to the kCMMConcatInit request code, but it is not required to do so. The ColorSync Manager sends this request code to your CMM on behalf of an application or device driver that called the CWConcatColorWorld function. The ColorSync Manager dispatches this request to the Component Manager, which calls your CMM to service the request. A CMM typically responds to the kCMMConcatInit request code by calling a CMM-defined function (for example, CMConcatInit) to handle the request.

Using the private storage pointed to by the CMSession handle, your CMConcatInit function 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.

A color-matching or color-checking session for a set of profiles entails various color transformations among devices in a sequence for which your CMM is responsible. Your function must obtain required information from the profiles and initialize private data for subsequent color-matching or color-checking sessions with these values. After your function returns to the Component Manager, it no longer has access to the profiles.

This request gives you the opportunity to examine the profile contents before storing them. If you do not support some aspect of the profile, then you should return an unimplemented error in response to this request. For example, if your CMM does not implement multichannel color support, you should return an unimplemented error at this point.

When your CMM uses a device link profile or a set of concatenated profiles, you must adhere to the following guidelines and rules:

The Component Manager calls your CMM with a standard open request to open the CMM when a ColorSync-supportive application or device driver requests that the Component Manager open a connection to your component. At this time, your component should allocate any memory it needs to maintain a connection for the requesting application or driver. You should attempt to allocate memory from the current heap zone. If that attempt fails, you should allocate memory from the system heap or the temporary heap. You can use the SetComponentInstanceStorage function to associate the allocated memory with the component instance. Whenever the calling application or driver requests services from your component, the Component Manager supplies you with the handle to this memory in the session parameter.

The Component Manager may call your CMM with the kCMMConcatInit request code multiple times after it calls your CMM with a request to open the CMM. For example, it may call your CMM with an initialization request once with one pair of profiles and then again with another pair of profiles. For each call, you need to reinitialize the storage based on the content of the current profiles.

Your CMM should support all seven classes of profiles defined by the ICC.

CARBON NOTES

CMConcatInit is an API to CMMs. Application developers should avoid calling CMMs directly, since they may or may not support a given API. To establish a color world using a set of profiles, use CWConcatColorWorld.


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