PATHMac OS 8 Developer Documentation > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Determining If the ColorSync Manager Is Available

To determine whether version 2.5 of the ColorSync Manager is available on a 68K-based or a PowerPC-based Macintosh system, you use the Gestalt function with the gestaltColorMatchingVersion selector. The function shown in Listing 3-1 returns a Boolean value of true if version 2.5 or later of the ColorSync Manager is installed and false if not.

Listing 3-1 Determining if ColorSync 2.5 is available

Boolean ColorSync25Available (void)
{
    Boolean haveColorSync25 = false;
    long    version;

    if (Gestalt(gestaltColorMatchingVersion, &version) == noErr)
    {
        if (version >= gestaltColorSync25)
        {
            haveColorSync25 = true;
        }
    }
    return haveColorSync25;
}

If your application does not depend on features added for version 2.5 of the ColorSync Manager, use the ColorSync Gestalt selector for the ColorSync version you require. For example, you might substitute gestaltColorSync20 for gestaltColorSync25 in the previous function (and rename the function appropriately). To identify other versions of ColorSync, use any of the ColorSync Gestalt selector constants described in Gestalt Selector Codes for the ColorSync Manager . For related version information, see ColorSync Version Information .


© 1988-1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)