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 / ColorSync Manager Functions
Profile Searching / Searching External Profiles


CMNewProfileSearch

Searches the ColorSyncTM Profiles folder and returns a list of 2.x profiles that match the search specification.

pascal CMError CMNewProfileSearch (
CMSearchRecord *searchSpec,
void *refCon, 
unsigned long *count,
CMProfileSearchRef *searchResult);
searchSpec
A pointer to a search specification. For a description of the information you can provide in a search record of type CMSearchRecord to define the search, see "Profile Search Record" (page 3-51).
refCon
A reference constant for application data passed as a parameter to calls to the filter function. For a description of the filter function, see the MyCMProfileFilterProc function (page 3-171).
count
A pointer to a profile count. On output, a one-based count of profiles matching the search specification.
searchResult
A pointer to a search result reference. On output, a reference to the profile search result list (page 3-63).
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The CMNewProfileSearch function sets up and defines a new search identifying through the search record the elements that a profile must contain to qualify for inclusion in the search result list. The function searches the ColorSyncTM Profiles folder for version 2.x profiles that meet the criteria and returns a list of these profiles in an internal private data structure whose reference is returned to you in the searchResult parameter.

You must provide a search record of type CMSearchRecord identifying the search criteria. You specify which fields of the search record to use for any given search through a search bit mask whose value you set in the search record's searchMask field.

Among the information you can provide in the search record is a pointer to a filter function to use to eliminate profiles from the search based on additional criteria not defined by the search record. The search result reference is passed to the filter function after the search is performed. For a description of the filter function and its prototype, see the MyCMProfileFilterProc function (page 3-171).

Your application cannot directly access the search result list. Instead, you pass the returned search result list reference to other search-related functions that allow you to use the result list.

SEE ALSO
To obtain a reference to a profile corresponding to a specific index in the list, use the CMSearchGetIndProfile function (page 3-137). To obtain the file specification for a profile corresponding to a specific index in the list, use the CMSearchGetIndProfileFileSpec function (page 3-138). To update the search result list, use the CMUpdateProfileSearch function (page 3-135).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996