![]() |
Window Definition Feature Constants |
Header: MacWindows.h |
enum { kWindowSupportsDragHilite = 128, kWindowSupportsModifiedBit = 256, kWindowCanDrawInCurrentPort = 512, kWindowCanSetupProxyDragImage = 1024, kWindowCanMeasureTitle = 2048, kWindowWantsDisposeAtProcessDeath = 4096, kWindowSupportsSetGrowImageRegion = 8192, kWindowDefSupportsColorGrafPort = 1073741826 };
If the bit specified by this mask is set, the window supports the kWindowMsgDragHilite message.
If the bit specified by this mask is set, the window supports the kWindowMsgModified message.
If the bit specified by this mask is set, the window supports the kWindowMsgDrawInCurrentPort message.
If the bit specified by this mask is set, the window supports the kWindowMsgSetupProxyDragImage message.
If the bit specified by this mask is set, the window supports the kWindowMsgMeasureTitle message.
If the bit specified by this mask is set, the window definition function wants to receive a wDispose message for the window if it still exists when the application quits.
Previously, the Window Manager would send a wDispose message only if the application explicitly closed the window with calls to the CloseWindow or DisposeWindow functions. The Window Manager would delete a window that still existed when the application called ExitToShell without notifying the window definition function, as part of the destruction of the process.
Note that if a window has the kWindowWantsDisposeAtProcessDeath feature bit set, the Window Manager sends your window definition function a wDispose message for the window when the application exits for any cause, including if your application crashes.
A window might want to set this feature flag if it allocates data when it is initialized that lives outside of the application heap and that is not automatically disposed when the application quits. The wDispose message is sent very early in the termination process, so it is still safe for the window definition function to call the system back (for example, you may wish to do this in order to dispose of any auxiliary data). However, to ensure compatibility and to create the minimum performance impact, the window definition function should try to do as little as possible after receiving a wDispose message sent during the termination process.
With the Mac OS 8.5 Window Manager, your window definition function may report these new feature flags to reflect the features that your window supports. For descriptions of the messages that correspond to these feature flags, see
© 2000 Apple Computer, Inc. (Last Updated 4/14/2000)