Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Application-Defined Functions for the ColorSync Manager /


Application-defined function that examines the profile whose reference you specify and determines whether to include it in the profile search result list.

After a profile has been included in the profile search result based on criteria specified in the search record, your MyCMProfileFilterProc function can further examine the profile. For example, you may wish to include or exclude the profile based on criteria such as an element or elements not included in the CMSearchRecord search record. Your MyCMProfileFilterProc function can also perform searching using AND or OR logic.

This application-supplied function must conform to the following declaration, although the function name is arbitrary:

pascal Boolean MyCMProfileFilterProc (
CMProfileRef prof,
void *refCon);
A profile reference (page 3-63) to the profile to test.
A reference constant that holds data passed through from the CMNewProfileSearch function or the CMUpdateProfileSearch function.
function result
A result code of type Boolean. A return value of false indicates that the profile should be included. A return value of true indicates that the profile should be filtered out.
Your MyCMProfileFilterProc function is called after the CMNewProfileSearch function searches for profiles based on the search record's contents as specified by the search bitmask.

When your application calls CMNewProfileSearch, it passes a reference to a search specification record of type CMSearchRecord (page 3-51) that contains a filter field. If the filter field contains a pointer to your MyCMProfileFilterProc function, then your function is called to determine whether to exclude a profile from the search result list. Your function should return true for a given profile to exclude that profile from the search result list. If you do not want to filter profiles beyond the criteria in the search record, specify a NULL value for the search record's filter field.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996