Carbon


IsThemeInColor

Header: Appearance.h Carbon status: Supported

Returns whether the current theme would draw in color in the given environment.

Boolean IsThemeInColor (
    SInt16 inDepth, 
    Boolean inIsColorDevice
);
Parameter descriptions
inDepth

A signed 16-bit integer. Pass a value specifying the bit depth (in bits per pixel) of the current graphics port.

inIsColorDevice

A value of type Boolean. Pass true to indicate that you are drawing on a color device, or false for a monochrome device.

function result

A value of type Boolean. IsThemeInColor returns true if, given the depth and color device information, the theme would draw in color; otherwise, false.

DISCUSSION

To be consistent with the current theme, your application can call the IsThemeInColor function to determine whether or not the Appearance Manager is drawing the theme in color or black and white. If the function returns true, you should draw in color; if it returns false, you should draw in black and white. Note that the Appearance Manager may draw a theme in black and white not only because of the current bit depth or device type, but also because the theme may have defined black-and-white elements, such as the “Black & White” accent color in the platinum appearance.

VERSION NOTES

This function is available with Appearance Manager 1.0.1 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


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