Important: The information in this document is obsolete and should not be used for new development.
Determining if the ColorSync Manager Is Available
To determine whether version 2.x of the ColorSync Manager is available on a 68K-based or a PowerPC-based Macintosh system, you use theGestalt
function with thegestaltColorMatchingVersion
selector. The function shown in Listing 4-1 returns a Boolean value oftrue
if version 2.0 or later of the ColorSync Manager is installed andfalse
if not.Listing 4-1 Determining if ColorSync 2.x is available
Boolean ColorSync2xAvailable (void) { Boolean haveColorSync2x = false; long version; if (Gestalt(gestaltColorMatchingVersion, &version) == noErr) { if (version >= gestaltColorSync20) { haveColorSync2x = true; } } return haveColorSync2x; }If your application depends on features added for version 2.1 of the ColorSync Manager, substitute gestaltColorSync21 for gestaltColorSync20 in the previous function. If you need to identify earlier versions of ColorSync, use any of the ColorSync Gestalt selector constants described in "Constants for ColorSync Manager Gestalt Selectors and Responses" (page 3-7) in Advanced Color Imaging Reference.