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 1 - Palette Manager Reference /
Palette Manager Functions / Manipulating Palettes and Color Tables


RestoreDeviceClut

Sets the color table of a graphics device to its default state.

pascal void RestoreDeviceClut(GDHandle gdh);
gdh
A handle to the GDevice structure (described in the chapter "Graphics Devices" of Inside Macintosh: Imaging With QuickDraw) to be restored.
DISCUSSION
The RestoreDeviceClut function changes the color table of the device specified by the gdh parameter to its default state. If this process changes any entries, the Palette Manager posts color updates to windows intersecting the device. Pass nil in the gdh parameter to restore all screens.

You don't need to use this function to restore the Finder's desktop colors, because its colors are automatically restored upon switching from applications that use the Palette Manager. Likewise, you needn't worry when switching to another application that uses the Palette Manager. Although colors are not automatically restored in this case, if that application needs a certain set of colors, the Palette Manager provides them the moment that application comes to the front.

The reason to use RestoreDeviceClut is that you may be switching to an application that does not use the Palette Manager, in which case that application inherits your palette unless you restore the default color lookup tables for all the available display devices.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996