Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The Display Manager is deprecated as of Mac OS X v10.4. You should use Quartz Display Services instead (as described in Quartz Display Services Programming Topics).

Using the Display Manager

The previous chapter explains how the Display Manager automatically repositions windows if necessary to ensure that windows are accessible when the user changes the display environment. If the Display Manager moves windows in a manner inappropriate for your application, your application should reposition them instead. Applications that use only the standard window definition functions provided by the Window Manager generally do not need to use the Display Manager.

However, you may need or want your application to perform its own window positioning under various circumstances, such as when

When necessary, the Display Manager automatically repositions windows of type dBoxProc (that is, alert boxes and modal dialog boxes) so that the lower-left corners of the windows appear onscreen. This gives users access to the area with the OK and Cancel buttons.

In addition, your application should respond to Display Manager changes if your application relies on display information that it stores internally. For example, if your application caches display positions, GDevice structures for displays other than the main screen, or the value in the screenBits.bounds field of the screenBits global variable, this information may become invalid after the user changes the display configuration. Therefore, your application should update its internal values accordingly after a display configuration change.

To determine whether the Display Manager is available, use the Gestalt function with the gestaltDisplayMgrAttr selector. Test the bit field indicated by the gestaltDisplayMgrPresent constant in the response parameter. If the bit is set, then the Display Manager is present.

Presence of the Display Manager does not guarantee that a computer also supports video mirroring. To determine whether QuickDraw supports video mirroring on the user’s computer system, use the DMQDIsMirroringCapable function.

Contents:

Handling Events in Response to Display Manager Changes
Handling the Display Notice Event as a High-Level Event
Handling the Display Notice Event Outside of an Event Loop
Managing Windows In Response to the Display Notice Event
Determining the Characteristics of the Video Devices
Setting Configurations and Display Modes for Video Devices




< Previous PageNext Page > Hide TOC


Last updated: 2007-05-03




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice