Carbon


CMSearchRecord

Header: CMApplication.h

struct CMSearchRecord {
    OSType CMMType; 
    OSType profileClass; 
    OSType dataColorSpace; 
    OSType profileConnectionSpace; 
    UInt32 deviceManufacturer; 
    UInt32 deviceModel; 
    UInt32 deviceAttributes[2]; 
    UInt32 profileFlags; 
    UInt32 searchMask; 
    CMProfileFilterUPP filter; 
    BytePtr cdbPtr; 
    UInt8 cdbBytes[16];
};

Field descriptions

CMMType

The signature of a CMM. The signature of the 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 Class”.

dataColorSpace

A data color space. For a list of the color space signatures, see “Color Space Signatures”.

profileConnectionSpace

A profile connection color space. The signatures for the two profile connection spaces supported by ColorSync, cmXYZData and cmLabData, are described in “Color Space Signatures”.

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. Here are the defined bitmask values:

cmMatchAnyProfile 0x00000000cmMatchProfileCMMType 0x00000001cmMatchProfileClass 0x00000002cmMatchDataColorSpace 0x00000004cmMatchProfileConnectionSpace 0x00000008cmMatchManufacturer 0x00000010cmMatchModel 0x00000020cmMatchAttributes 0x00000040cmMatchProfileFlags 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 function CMProfileFilterProcPtr.

Your application supplies a search record of type CMSearchRecord as the searchSpec parameter to the function CMNewProfileSearch. 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.

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 to release the memory. This allows your application to call the CMUpdateProfileSearch function to update the search result if the ColorSync Profiles folder contents change without needing to provide the search specification again.

VERSION NOTES

This type is not recommended for use in ColorSync 2.5.

You cannot use the ColorSync Manager search functions to search for ColorSync 1.0 profiles.

This type does not take advantage of the profile cache added in ColorSync version 2.5. It is used with the searching described in “Searching for Profiles Prior to ColorSync 2.5”. See CMProfileIterateData for information on data structures used with searching in version 2.5.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)