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 / Constants and Data Types


Profile Search Record

Your application supplies a search record of type CMSearchRecord as the searchSpec parameter to the CMNewProfileSearch function (page 3-133). The search record structure provides the ColorSync Manager with search criteria to use in determining which version 2.x profiles to include in the result list and which to filter out.

Most of the fields in the CMSearchRecord structure are identical to corresponding fields in the CM2Header structure for version 2.x profiles. When you set a bit in the searchMask field of the CMSearchRecord structure, you cause the search criteria to include the data specified by that bit. For example, if you set the cmMatchProfileCMMType bit, the search result will not include a profile unless the data in the profile header's CMMType field matches the data you specify in the CMSearchRecord structure's CMMType field.

IMPORTANT
If you specify a bit in the searchMask field, you must supply information in the CMSearchRecord field that corresponds to that bit.
The ColorSync Manager preserves the search criteria internally along with the search result list until your application calls the CMDisposeProfileSearch function (page 3-136) to release the memory. As a result, your application doesn't need to provide the search specification again when it calls the CMUpdateProfileSearch function (page 3-135) to update the search result if the contents of the ColorSync(TM) Profiles folder have changed.

IMPORTANT
You cannot use the ColorSync Manager search functions to search for ColorSync 1.0 profiles.
A search record is defined by the CMSearchRecord type definition.

struct CMSearchRecord {
   OSType               CMMType;          /* CMM signature */
   OSType               profileClass;     /* profile signature */
   OSType               dataColorSpace;   /* data color space */
   OSType               profileConnectionSpace;/* profile connection
                                             color space */
   unsigned long        deviceManufacturer;/* device manufacturer */
   unsigned long        deviceModel;      /* device model */
   unsigned long        deviceAttributes[2];/* specifies attributes such as
                                             paper or ink type */
   unsigned long        profileFlags;     /* hints to CMM */
   unsigned long        searchMask;       /* bitmap specifying search
                                             mask fields to use */
   CMProfileFilterUPP   filter;           /* pointer to function that
                                             determines whether to
                                             exclude profile */
};
Field Description
CMMType
The signature of a CMM. The signature of Apple Computer's default CMM is specified by the kDefaultCMMSignature constant.
profileClass
The class signature identifying the type of profile to search for. For a list of profile class signatures, see "Profile Classes" (page 3-13).
dataColorSpace
A data color space. For a list of the color space signatures, see "Color Space Signatures" (page 3-20).
profileConnectionSpace
A profile connection color space. The signatures for the two profile connection spaces, cmXYZData and cmLabData, are described in "Color Space Signatures" (page 3-20).
deviceManufacturer
The signature of the manufacturer.
deviceModel
The model of a device.
deviceAttributes
Attributes for a particular device setup, such as media, paper, and ink types.
profileFlags
Flags that indicate hints for the preferred CMM, such as quality, speed, and memory options. In most cases, you will not want to search for profiles based on the flags settings.
searchMask
A bitmask that specifies the search record fields to use in the profile search. These are the defined bitmask values:
cmMatchAnyProfile 0x00000000
cmMatchProfileCMMType 0x00000001
cmMatchProfileClass 0x00000002
cmMatchDataColorSpace 0x00000004
cmMatchProfileConnectionSpace 0x00000008
cmMatchManufacturer 0x00000010
cmMatchModel 0x00000020
cmMatchAttributes 0x00000040
cmMatchProfileFlags
0x00000080
filter
A pointer to an application-supplied function that determines whether to exclude a profile from the profile search result list. For more information, see the MyCMProfileFilterProc function (page 3-171).

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996