![]() |
CMProfileIterateProcPtr |
||||
Header: | CMApplication.h | Carbon status: | Supported | |
Defines a pointer to a profile iteration callback function. Your profile iteration callback is called once for each found profile file as it iterates over the available profiles. For example, you might use this callback to obtain a list of profiles to display in a pop-up menu.
typedef OSErr(* CMProfileIterateProcPtr) ( CMProfileIterateData *iterateData, void *refCon );
You would declare your function like this if you were to name it MyCMProfileIterateCallback:
OSErr MyCMProfileIterateCallback ( CMProfileIterateData *iterateData, void *refCon );
A pointer to a structure of type CMProfileIterateData. When the function CMIterateColorSyncFolder calls MyProfileIterateCallback, as it does once for each found profile, the structure contains key information about the profile.
An untyped pointer to arbitrary data your application previously passed to the function CMIterateColorSyncFolder.
A result code. If MyCMProfileIterateCallback returns an error, CMIterateColorSyncFolder stops iterating and returns the error value to its caller (presumably your code).
When your application needs information about the profiles currently available in the profiles folder, it calls the function CMIterateColorSyncFolder, which, depending on certain conditions, calls your callback routine once for each profile. See the description of CMIterateColorSyncFolder for information on when it calls the MyCMProfileIterateCallback function.
Your MyCMProfileIterateCallback function examines the structure pointed to by the iterateData parameter to obtain information about the profile it describes. The function determines whether to do anything with that profile, such as list its name in a pop-up menu of available profiles.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)