![]() |
PATH![]() |
![]() ![]() |
The function
CMIterateColorSyncFolder
takes advantage of the profile cache available starting with ColorSync version 2.5 to provide optimized searching and quick access to profile information. The function iterates through the available profiles, calling a function you supply to process each profile you are interested in. For more information, see
Searching for Specific Profiles Prior to ColorSync 2.5
and
Searching for Profiles With ColorSync 2.5
.
The ColorSync Manager defines the following types for profile searching with the CMIterateColorSyncFolder function:
CMProfileIterateProcPtr
defines a callback routine you implement to process the profiles found during a search;
new in ColorSync 2.5
.CMProfileIterateData
stores information about a specific profile; passed to your callback routine during a search;
new in ColorSync 2.5
.
The function
CMIterateColorSyncFolder
has a parameter of type
CMProfileIterateUPP
. ColorSync defines the procedure pointer
CMProfileIterateProcPtr
to use for this parameter. For a description of the application-defined function itself, see
MyCMProfileFilterProc
.
CMProfileIterateProcPtr is defined as follows:
pascal OSErr (*CMProfileIterateProcPtr )
(CMProfileIterateData *iterateData,
void *refCon);
CMProfileIterateData
. When the
CMIterateColorSyncFolder
function calls your application-defined function, as it does once for each found profile, the structure contains key information about the profile.CMIterateColorSyncFolder
.
When you call
CMIterateColorSyncFolder
, you pass a universal procedure pointer of type
CMProfileIterateProcPtr
that points to a callback function you provide. For more information on the callback function, see
MyProfileIterateProc
.
The ColorSync Manager defines the
CMProfileIterateData
structure to provide your
CMProfileIterateProcPtr
callback routine with a description of a profile during an iteration through the available profiles that takes place when you call
CMIterateColorSyncFolder
.
struct CMProfileIterateData {
unsigned long dataVersion; /* cmProfileIterateDataVersion1 */
CM2Header header;
ScriptCode code;
Str255 name;
CMProfileLocation location;
};
typedef struct CMProfileIterateData CMProfileIterateData;
CM2Header
, containing information such as the profile size, type, version, and so on.