Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / Constants and Data Types


Constants for Profile Location Type

Your application specifies the location for a profile using a profile location structure of type CMProfileLocation (page 3-40). A ColorSync profile that you open or create is typically stored in one of the following locations:

Additionally, your application can create a new or duplicate temporary profile. For example, you can use a temporary profile for a color-matching session, and the profile is not saved after the session. In this case, the ColorSync Manager allows you to specify the profile location as having no specific location.

You use a pointer to a data structure of type CMProfileLocation to identify a profile's location when your application calls

Your application identifies the type of data the CMProfileLocation u field holds--a file specification, a handle, and so on--in the CMProfileLocation structure's locType field. You use the constants defined by the following enumeration to identify the location type.

enum {
   cmNoProfileBase   = 0, /* profile is temporary */
   cmFileBasedProfile= 1, /* profile is disk-based */
   cmHandleBasedProfile= 2, /* profile in relocatable memory */
   cmPtrBasedProfile = 3, /* profile in nonrelocatable memory */
   cmProcedureBasedProfile= 4  /* profile is accessed by procedure */
};
Enumerator descriptions

cmNoProfileBase
The profile is temporary. It will not persist in memory after its use for a color session. You can specify this type of profile location with the CMNewProfile and the CMCopyProfile functions.
cmFileBasedProfile
The profile is stored in a disk file and the CMProfLoc union (page 3-39) holds a structure of type CMFileLocation (page 3-40) identifying the profile file. You can specify this type of profile location with the CMOpenProfile, CMNewProfile, CMCopyProfile, and CMNewLinkProfile functions.
cmHandleBasedProfile
The profile is stored in relocatable memory and the CMProfLoc union (page 3-39) holds a handle to the profile in a structure of type CMHandleLocation (page 3-41). You can specify this type of profile location with the CMOpenProfile, CMNewProfile, and CMCopyProfile functions.
cmPtrBasedProfile
The profile is stored in nonrelocatable memory and the CMProfLoc union (page 3-39) holds a pointer to the profile in a structure of type CMPtrLocation (page 3-41). You can specify this type of profile location with the CMOpenProfile function only.
cmProcedureBasedProfile
The profile is in an arbitrary location, accessed through a procedure supplied by you. The CMProfLoc union (page 3-39) holds a universal procedure pointer to your profile access procedure in a structure of type CMProcedureLocation (page 3-42). You can specify this type of profile location with the CMOpenProfile, CMNewProfile, CMCopyProfile, and CMNewLinkProfile functions. For a description of an application-supplied profile access procedure, see MyCMProfileAccessProc (page 3-172). For sample code demonstrating procedure-based profile access, see "Accessing a Resource-Based Profile With a Procedure" (page 4-56) in Advanced Color Imaging on the Mac OS.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996