Important: The information in this document is obsolete and should not be used for new development.
Constants for Profile Location Type
Your application specifies the location for a profile using a profile location structure of typeCMProfileLocation
(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.
- In a disk file. The
u
field (a union) of the profile location data structure contains a file specification for a profile that is disk-file based. This is the most common way to store a ColorSync profile.- In relocatable memory. The
u
field of the profile location data structure contains a handle specification for a profile that is stored in a handle.- In nonrelocatable memory. The
u
field of the profile location data structure contains a pointer specification for a profile that is pointer based.- In an arbitrary location, accessed by a procedure you provide. The
u
field of the profile location data structure contains a universal procedure pointer to your access procedure, as well a pointer that may point to data associated with your procedure.
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
- the
CMOpenProfile
function to obtain a reference to a profile- the
CMNewProfile
,CWNewLinkProfile,
orCMCopyProfile
functions to create a new profile- the
CMGetProfileLocation
function to get the location of an existing profile
CMProfileLocation
u
field holds--a file specification, a handle, and so on--in theCMProfileLocation
structure'slocType
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 theCMCopyProfile
functions.cmFileBasedProfile
- The profile is stored in a disk file and the
CMProfLoc
union (page 3-39) holds a structure of typeCMFileLocation
(page 3-40) identifying the profile file. You can specify this type of profile location with theCMOpenProfile
,CMNewProfile
,CMCopyProfile
, andCMNewLinkProfile
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 typeCMHandleLocation
(page 3-41). You can specify this type of profile location with theCMOpenProfile
,CMNewProfile
, andCMCopyProfile
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 typeCMPtrLocation
(page 3-41). You can specify this type of profile location with theCMOpenProfile
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 theCMOpenProfile
,CMNewProfile
,CMCopyProfile
, andCMNewLinkProfile
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.