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: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / About the Window Manager


Window Records

Each window has a number of descriptive characteristics such as a title, control list, and visibility status. The Window Manager stores this information in a window record, which is a data structure of type WindowRecord.

The window record includes

The window record is described in detail in "The Color Window Record" beginning on page 4-65.

The first field in the window record is the window's graphics port. The WindowPtr data type is therefore defined as a pointer to a graphics port.

TYPE  WindowPtr   =  GrafPtr;
You draw into a window by drawing into its graphics port, passing a window pointer to the QuickDraw drawing routines. You also pass window pointers to most Window Manager routines.

You don't usually need to access or directly modify fields in a window record. When you do, however, you can refer to them through the WindowPeek data type, which is a pointer to a window record.

TYPE  WindowPeek  =  ^WindowRecord;
The close box, drag region, zoom box, and size box are not included in the window record because they don't necessarily have the formal data structure for regions
as defined in QuickDraw. The window definition function determines where these regions are.

Your application seldom accesses a window record directly; the Window Manager automatically updates the window record when you make any changes to the window, such as changing its title. The Window Manager also supplies routines for changing and reading some parts of the window record.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996