| Framework | Carbon/Carbon.h |
| Declared in | HIToolboxDebugging.h HIWindowViews.h IOMacOSTypes.h MacWindows.h QuickdrawTypes.h |
Your application uses the Window Manager to create and manage windows. For example, your application uses the Window Manager to create and display a new window when the user creates a new document or opens an existing document. When the user clicks or holds down the mouse button while the cursor is in a window created by your application, you use the Window Manager to determine the location of the mouse action and to alter the window display as appropriate. When the user closes a window, you use the Window Manager to remove the window from the screen.
A Macintosh application uses windows for most communication with the user, from discrete interactions such as presenting and acknowledging alert boxes to open-ended interactions such as creating and editing documents. Users generally type words and formulas, draw pictures, or otherwise enter data in a window on the screen. Your application typically lets the user save this data in a file, open saved files, and view the saved data in a window.
A window can be any size or shape, and the user can display any number of windows, within the limits of available memory, on the screen at once.
The Window Manager defines a set of standard windows and provides a set of routines for managing them. The Window Manager helps your application display windows that are consistent with the Macintosh user interface.
Note: Historically, the Window Manager has offered different successive methods for creating and manipulating windows. Many of the older functions have been deprecated and, in most cases, this reference provides a recommended replacement. For the most up-to-date information about creating windows, see the document Handling Carbon Windows and Controls.
Carbon supports the Window Manager. Be aware, however, that if you use custom window definition procedures (also known as WDEFs), you must move them out of resources and compile them into your application. In addition:
Your application must use the functions defined by the Window Manager whenever it creates and disposes of Window Manager data structures. For example, instead of directly creating and disposing of window records, applications must call Window Manager functions such as CreateNewWindow and DisposeWindow.
You must revise your application so that it accesses Window Manager data structures only through accessor functions.
You are encouraged to adopt the standard Mac OS window definition procedures in your application. Applications that use the standard Mac OS window definition procedures inherit the Mac OS human interface appearance on Mac OS 9 and Mac OS X. Applications that use custom window definition procedures work correctly, but because custom definition procedures invoke their own drawing routines, the Mac OS can’t draw these applications with the current appearance (unless you specifically use Appearance Manager drawing primitives).
IsValidWindowPtr
GetWindowGreatestAreaDevice
HIWindowGetGreatestAreaDisplay
HIWindowCopyShape
HIWindowGetScaleMode
GetWindowList
GetWindowWidgetHilite
IsWindowModified
SetWindowModified
HIWindowGetCGWindowID
HIWindowFromCGWindowID
GetWindowRegion Deprecated in Mac OS X v10.5
IsWindowPathSelectEvent
WindowPathSelect
IsWindowPathSelectClick Deprecated in Mac OS X v10.5
GetWindowProperty
SetWindowProperty
GetWindowPropertySize
RemoveWindowProperty
ChangeWindowPropertyAttributes
GetWindowPropertyAttributes
CreateNewWindow
CreateCustomWindow
HIWindowCreate
DisposeWindow
CreateWindowFromCollection Deprecated in Mac OS X v10.5
CreateWindowFromResource Deprecated in Mac OS X v10.5
StoreWindowIntoCollection Deprecated in Mac OS X v10.5
ActivateWindow
IsWindowActive
HiliteWindow
SelectWindow
ShowWindow
HideWindow
ShowHide
BringToFront
SendBehind
HIWindowInvalidateShadow
BeginWindowProxyDrag
EndWindowProxyDrag
HiliteWindowFrameForDrag
TrackWindowProxyDrag
TrackWindowProxyFromExistingDrag
HIWindowTrackProxyDrag
GetWindowProxyAlias
SetWindowProxyAlias
GetWindowProxyIcon
SetWindowProxyIcon
RemoveWindowProxy
SetWindowProxyCreatorAndType
HIWindowGetProxyFSRef
HIWindowSetProxyFSRef
GetNextWindow
GetWindowKind
SetWindowKind
GetWindowPort
SetPortWindowPort
GetWindowPortBounds
GetWindowStandardState
SetWindowStandardState
GetWindowUserState
SetWindowUserState
IsWindowHilited
IsWindowLatentVisible
IsWindowVisible
GetWindowStructurePort
GetWindowStructureWidths
ActiveNonFloatingWindow
FrontNonFloatingWindow
FindWindow
FindWindowOfClass
HIWindowFindAtLocation
GetFrontWindowOfClass
GetNextWindowOfClass
GetPreviousWindow
FrontWindow Deprecated in Mac OS X v10.5
BeginUpdate
EndUpdate
InvalWindowRect
InvalWindowRgn
IsWindowUpdatePending
ValidWindowRect
ValidWindowRgn
HIWindowCreateCollapsedDockTileContext
HIWindowReleaseCollapsedDockTileContext
GetWindowDockTileMenu
SetWindowDockTileMenu
UpdateCollapsedWindowDockTile
CreateQDContextForCollapsedWindowDockTile Deprecated in Mac OS X v10.5
ReleaseQDContextForCollapsedWindowDockTile Deprecated in Mac OS X v10.5
GetWindowToolbar
SetWindowToolbar
ShowHideWindowToolbar
IsWindowToolbarVisible
HIWindowSetToolbarView
DisposeWindowDefUPP Deprecated in Mac OS X v10.5
DisposeWindowPaintUPP Deprecated in Mac OS X v10.5
InvokeWindowDefUPP Deprecated in Mac OS X v10.5
InvokeWindowPaintUPP Deprecated in Mac OS X v10.5
NewWindowDefUPP Deprecated in Mac OS X v10.5
NewWindowPaintUPP Deprecated in Mac OS X v10.5
GetWindowAttributes
GetAvailableWindowAttributes
ChangeWindowAttributes
HIWindowTestAttribute
HIWindowChangeAttributes
HIWindowIsAttributeAvailable
GetWindowClass
HIWindowChangeClass
IsValidWindowClass
SetWindowClass Deprecated in Mac OS X v10.5
ChangeWindowGroupAttributes
CopyWindowGroupName
CountWindowGroupContents
CreateWindowGroup
DebugPrintAllWindowGroups
DebugPrintWindowGroup
GetIndexedWindow
GetWindowGroup
GetWindowGroupAttributes
GetWindowGroupContents
GetWindowGroupLevel
GetWindowGroupLevelOfType
GetWindowGroupOfClass
GetWindowGroupOwner
GetWindowGroupParent
GetWindowGroupRetainCount
GetWindowGroupSibling
GetWindowIndex
IsWindowContainedInGroup
ReleaseWindowGroup
RetainWindowGroup
SendWindowGroupBehind
SetWindowGroup
SetWindowGroupLevel
SetWindowGroupLevelOfType
SetWindowGroupName
SetWindowGroupOwner
SetWindowGroupParent
CopyWindowAlternateTitle
SetWindowAlternateTitle
CopyWindowTitleAsCFString
SetWindowTitleWithCFString
HIWindowCopyDrawers
OpenDrawer
CloseDrawer
GetDrawerCurrentEdge
GetDrawerPreferredEdge
SetDrawerPreferredEdge
GetDrawerOffsets
SetDrawerOffsets
GetDrawerParent
SetDrawerParent
GetDrawerState
ToggleDrawer
GetWindowContentColor
GetWindowContentPattern
SetWindowContentColor
GetWRefCon
SetWindowContentPattern
SetWRefCon
GetWindowPic Deprecated in Mac OS X v10.5
SetWindowPic Deprecated in Mac OS X v10.5
CloneWindow Deprecated in Mac OS X v10.5
GetWindowOwnerCount Deprecated in Mac OS X v10.5
GetWindowRetainCount Deprecated in Mac OS X v10.5
ReleaseWindow Deprecated in Mac OS X v10.5
RetainWindow Deprecated in Mac OS X v10.5
GetWindowBounds
HIWindowGetBounds
SetWindowBounds
HIWindowSetBounds
MoveWindowStructure
RepositionWindow
ResizeWindow
GetAvailableWindowPositioningBounds
HIWindowGetAvailablePositioningBounds
GetAvailableWindowPositioningRegion
HIWindowCopyAvailablePositioningShape
ConstrainWindowToScreen
HIWindowConstrain
GetWindowResizeLimits
SetWindowResizeLimits
You can use these functions to add dialog-like button controls to normal windows.