<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow"
  },
  "title" : "NSWindow"
}
-->

# NSWindow

A window that an app displays on the screen.

```
@MainActor class NSWindow
```

## Overview

A single [`NSWindow`](/documentation/AppKit/NSWindow) object corresponds to, at most, one on-screen window. Windows perform two principal functions:

- To place views in a provided area
- To accept and distribute mouse and keyboard events the user generates to the appropriate views

> Note:
> Although the ``doc://com.apple.appkit/documentation/AppKit/NSWindow`` class inherits the <doc://com.apple.documentation/documentation/Foundation/NSCoding> protocol from ``doc://com.apple.appkit/documentation/AppKit/NSResponder``, the class doesn’t support coding. Legacy support for archivers exists, but its use is deprecated and may not work. Any attempt to archive or unarchive a window object using a keyed coding object raises an <doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException> exception. For details about window restoration, see ``doc://com.apple.appkit/documentation/AppKit/NSWindow/restorationClass``.

## Topics

### Creating a Window

[`+  windowWithContentViewController:`](/documentation/AppKit/NSWindow/init(contentViewController:))

Creates a titled window that contains the specified content view controller.

[`-  initWithContentRect:styleMask:backing:defer:`](/documentation/AppKit/NSWindow/init(contentRect:styleMask:backing:defer:))

Initializes the window with the specified values.

[`-  initWithContentRect:styleMask:backing:defer:screen:`](/documentation/AppKit/NSWindow/init(contentRect:styleMask:backing:defer:screen:))

Initializes an allocated window with the specified values.

### Managing the Window’s Behavior

[`delegate`](/documentation/AppKit/NSWindow/delegate)

The window’s delegate.

[`NSWindowDelegate`](/documentation/AppKit/NSWindowDelegate)

A set of optional methods that a window’s delegate can implement to respond to events, such as window resizing, moving, exposing, and minimizing.

### Configuring the Window’s Content

[`contentViewController`](/documentation/AppKit/NSWindow/contentViewController)

The main content view controller for the window.

[`contentView`](/documentation/AppKit/NSWindow/contentView)

The window’s content view, the highest accessible view object in the window’s view hierarchy.

### Configuring the Window’s Appearance

[`styleMask`](/documentation/AppKit/NSWindow/styleMask-swift.property)

Flags that describe the window’s current style, such as if it’s resizable or in full-screen mode.

[`StyleMask`](/documentation/AppKit/NSWindow/StyleMask-swift.struct)

Constants that specify the style of a window, and that you can combine with the C bitwise OR operator.

[`-  toggleFullScreen:`](/documentation/AppKit/NSWindow/toggleFullScreen(_:))

Takes the window into or out of fullscreen mode,

[`worksWhenModal`](/documentation/AppKit/NSWindow/worksWhenModal)

A Boolean value that indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.

[`alphaValue`](/documentation/AppKit/NSWindow/alphaValue)

The window’s alpha value.

[`backgroundColor`](/documentation/AppKit/NSWindow/backgroundColor)

The color of the window’s background.

[`colorSpace`](/documentation/AppKit/NSWindow/colorSpace)

The window’s color space.

[`-  setDynamicDepthLimit:`](/documentation/AppKit/NSWindow/setDynamicDepthLimit(_:))

Sets a Boolean value that indicates whether the window’s depth limit can change to match the depth of the screen it’s on.

[`canHide`](/documentation/AppKit/NSWindow/canHide)

A Boolean value that indicates whether the window can hide when its application becomes hidden.

[`onActiveSpace`](/documentation/AppKit/NSWindow/isOnActiveSpace)

A Boolean value that indicates whether the window is on the currently active space.

[`hidesOnDeactivate`](/documentation/AppKit/NSWindow/hidesOnDeactivate)

A Boolean value that indicates whether the window is removed from the screen when its application becomes inactive.

[`collectionBehavior`](/documentation/AppKit/NSWindow/collectionBehavior-swift.property)

A value that identifies the window’s behavior in window collections.

[`opaque`](/documentation/AppKit/NSWindow/isOpaque)

A Boolean value that indicates whether the window is opaque.

[`hasShadow`](/documentation/AppKit/NSWindow/hasShadow)

A Boolean value that indicates whether the window has a shadow.

[`-  invalidateShadow`](/documentation/AppKit/NSWindow/invalidateShadow())

Invalidates the window shadow so that it is recomputed based on the current window shape.

[`-  autorecalculatesContentBorderThicknessForEdge:`](/documentation/AppKit/NSWindow/autorecalculatesContentBorderThickness(for:))

Indicates whether the window calculates the thickness of a given border automatically.

[`-  setAutorecalculatesContentBorderThickness:forEdge:`](/documentation/AppKit/NSWindow/setAutorecalculatesContentBorderThickness(_:for:))

Specifies whether the window calculates the thickness of a given border automatically.

[`-  contentBorderThicknessForEdge:`](/documentation/AppKit/NSWindow/contentBorderThickness(for:))

Indicates the thickness of a given border of the window.

[`-  setContentBorderThickness:forEdge:`](/documentation/AppKit/NSWindow/setContentBorderThickness(_:for:))

Specifies the thickness of a given border of the window.

[`preventsApplicationTerminationWhenModal`](/documentation/AppKit/NSWindow/preventsApplicationTerminationWhenModal)

A Boolean value that indicates whether the window prevents application termination when modal.

[`appearanceSource`](/documentation/AppKit/NSWindow/appearanceSource)

An object that the window inherits its appearance from.

### Accessing Window Information

[`depthLimit`](/documentation/AppKit/NSWindow/depthLimit)

The depth limit of the window.

[`hasDynamicDepthLimit`](/documentation/AppKit/NSWindow/hasDynamicDepthLimit)

A Boolean value that indicates whether the window’s depth limit can change to match the depth of the screen it’s on.

[`defaultDepthLimit`](/documentation/AppKit/NSWindow/defaultDepthLimit)

Returns the default depth limit for instances of `NSWindow`.

[`windowNumber`](/documentation/AppKit/NSWindow/windowNumber)

The window number of the window’s window device.

[`+  windowNumbersWithOptions:`](/documentation/AppKit/NSWindow/windowNumbers(options:))

Returns the window numbers for all visible windows satisfying the specified options.

[`deviceDescription`](/documentation/AppKit/NSWindow/deviceDescription)

A dictionary containing information about the window’s resolution, such as color, depth, and so on.

[`NSDeviceDescriptionKey`](/documentation/AppKit/NSDeviceDescriptionKey)

These constants are the keys for device description dictionaries.

[`canBecomeVisibleWithoutLogin`](/documentation/AppKit/NSWindow/canBecomeVisibleWithoutLogin)

A Boolean value that indicates whether the window can be displayed at the login window.

[`sharingType`](/documentation/AppKit/NSWindow/sharingType-swift.property)

A Boolean value that indicates the level of access other processes have to the window’s content.

[`backingType`](/documentation/AppKit/NSWindow/backingType)

The window’s backing store type.

[`-  displayLinkWithTarget:selector:`](/documentation/AppKit/NSWindow/displayLink(target:selector:))

Returns a new display link whose callback will be invoked in-sync with the display the window is on.

### Getting Layout Information

[`+  contentRectForFrameRect:styleMask:`](/documentation/AppKit/NSWindow/contentRect(forFrameRect:styleMask:))

Returns the content rectangle used by a window with a given frame rectangle and window style.

[`+  frameRectForContentRect:styleMask:`](/documentation/AppKit/NSWindow/frameRect(forContentRect:styleMask:))

Returns the frame rectangle used by a window with a given content rectangle and window style.

[`+  minFrameWidthWithTitle:styleMask:`](/documentation/AppKit/NSWindow/minFrameWidth(withTitle:styleMask:))

Returns the minimum width a window’s frame rectangle must have for it to display a title, with a given window style.

[`-  contentRectForFrameRect:`](/documentation/AppKit/NSWindow/contentRect(forFrameRect:))

Returns the window’s content rectangle with a given frame rectangle.

[`-  frameRectForContentRect:`](/documentation/AppKit/NSWindow/frameRect(forContentRect:))

Returns the window’s frame rectangle with a given content rectangle.

### Managing Windows

[`windowController`](/documentation/AppKit/NSWindow/windowController)

The window’s window controller.

### Managing Sheets

[`attachedSheet`](/documentation/AppKit/NSWindow/attachedSheet)

The sheet attached to the window.

[`sheet`](/documentation/AppKit/NSWindow/isSheet)

A Boolean value that indicates whether the window has ever run as a modal sheet.

[`-  beginSheet:completionHandler:`](/documentation/AppKit/NSWindow/beginSheet(_:completionHandler:))

Starts a document-modal session and presents—or queues for presentation—a sheet.

[`-  beginCriticalSheet:completionHandler:`](/documentation/AppKit/NSWindow/beginCriticalSheet(_:completionHandler:))

Starts a document-modal session and presents the specified critical sheet.

[`-  endSheet:`](/documentation/AppKit/NSWindow/endSheet(_:)-4dmmq)

Ends a document-modal session and dismisses the specified sheet.

[`-  endSheet:returnCode:`](/documentation/AppKit/NSWindow/endSheet(_:returnCode:))

Ends a document-modal session and dismisses the specified sheet.

[`sheetParent`](/documentation/AppKit/NSWindow/sheetParent)

The window to which the sheet is attached.

[`sheets`](/documentation/AppKit/NSWindow/sheets)

An array of the sheets currently attached to the window.

### Sizing Windows

[`frame`](/documentation/AppKit/NSWindow/frame)

The window’s frame rectangle in screen coordinates, including the title bar.

[`-  setFrameOrigin:`](/documentation/AppKit/NSWindow/setFrameOrigin(_:))

Positions the bottom-left corner of the window’s frame rectangle at a given point in screen coordinates.

[`-  setFrameTopLeftPoint:`](/documentation/AppKit/NSWindow/setFrameTopLeftPoint(_:))

Positions the top-left corner of the window’s frame rectangle at a given point in screen coordinates.

[`-  constrainFrameRect:toScreen:`](/documentation/AppKit/NSWindow/constrainFrameRect(_:to:))

Modifies and returns a frame rectangle so that its top edge lies on a specific screen.

[`-  cascadeTopLeftFromPoint:`](/documentation/AppKit/NSWindow/cascadeTopLeft(from:))

Positions the window’s top-left to a given point.

[`-  setFrame:display:`](/documentation/AppKit/NSWindow/setFrame(_:display:))

Sets the origin and size of the window’s frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen.

[`-  setFrame:display:animate:`](/documentation/AppKit/NSWindow/setFrame(_:display:animate:))

Sets the origin and size of the window’s frame rectangle, with optional animation, according to a given frame rectangle, thereby setting its position and size onscreen.

[`-  animationResizeTime:`](/documentation/AppKit/NSWindow/animationResizeTime(_:))

Specifies the duration of a smooth frame-size change.

[`aspectRatio`](/documentation/AppKit/NSWindow/aspectRatio)

The window’s aspect ratio, which constrains the size of its frame rectangle to integral multiples of this ratio when the user resizes it.

[`minSize`](/documentation/AppKit/NSWindow/minSize)

The minimum size to which the window’s frame (including its title bar) can be sized.

[`maxSize`](/documentation/AppKit/NSWindow/maxSize)

The maximum size to which the window’s frame (including its title bar) can be sized.

[`zoomed`](/documentation/AppKit/NSWindow/isZoomed)

A Boolean value that indicates whether the window is in a zoomed state.

[`-  performZoom:`](/documentation/AppKit/NSWindow/performZoom(_:))

This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.

[`-  zoom:`](/documentation/AppKit/NSWindow/zoom(_:))

Toggles the size and location of the window between its standard state (which the application provides as the best size to display the window’s data) and its user state (a new size and location the user may have set by moving or resizing the window).

[`resizeFlags`](/documentation/AppKit/NSWindow/resizeFlags)

The flags field of the event record for the mouse-down event that initiated the resizing session.

[`resizeIncrements`](/documentation/AppKit/NSWindow/resizeIncrements)

The window’s resizing increments.

[`preservesContentDuringLiveResize`](/documentation/AppKit/NSWindow/preservesContentDuringLiveResize)

A Boolean value that indicates whether the window tries to optimize user-initiated resize operations by preserving the content of views that have not changed.

[`inLiveResize`](/documentation/AppKit/NSWindow/inLiveResize)

A Boolean value that indicates whether the window is being resized by the user.

### Sizing Content

[`contentAspectRatio`](/documentation/AppKit/NSWindow/contentAspectRatio)

The window’s content aspect ratio.

[`contentMinSize`](/documentation/AppKit/NSWindow/contentMinSize)

The minimum size of the window’s content view in the window’s base coordinate system.

[`-  setContentSize:`](/documentation/AppKit/NSWindow/setContentSize(_:))

Sets the size of the window’s content view to a given size, which is expressed in the window’s base coordinate system.

[`contentMaxSize`](/documentation/AppKit/NSWindow/contentMaxSize)

The maximum size of the window’s content view in the window’s base coordinate system.

[`contentResizeIncrements`](/documentation/AppKit/NSWindow/contentResizeIncrements)

The window’s content-view resizing increments.

[`contentLayoutGuide`](/documentation/AppKit/NSWindow/contentLayoutGuide)

A value used by Auto Layout constraints to automatically bind to the value of [`contentLayoutRect`](/documentation/AppKit/NSWindow/contentLayoutRect).

[`contentLayoutRect`](/documentation/AppKit/NSWindow/contentLayoutRect)

The area inside the window that is for non-obscured content, in window coordinates.

[`maxFullScreenContentSize`](/documentation/AppKit/NSWindow/maxFullScreenContentSize)

A maximum size that is used to determine if a window can fit when it is in full screen in a tile.

[`minFullScreenContentSize`](/documentation/AppKit/NSWindow/minFullScreenContentSize)

A minimum size that is used to determine if a window can fit when it is in full screen in a tile.

### Managing Window Layers

[`-  orderOut:`](/documentation/AppKit/NSWindow/orderOut(_:))

Removes the window from the screen list, which hides the window.

[`-  orderBack:`](/documentation/AppKit/NSWindow/orderBack(_:))

Moves the window to the back of its level in the screen list, without changing either the key window or the main window.

[`-  orderFront:`](/documentation/AppKit/NSWindow/orderFront(_:))

Moves the window to the front of its level in the screen list, without changing either the key window or the main window.

[`-  orderFrontRegardless`](/documentation/AppKit/NSWindow/orderFrontRegardless())

Moves the window to the front of its level, even if its application isn’t active, without changing either the key window or the main window.

[`-  orderWindow:relativeTo:`](/documentation/AppKit/NSWindow/order(_:relativeTo:))

Repositions the window’s window device in the window server’s screen list.

[`level`](/documentation/AppKit/NSWindow/level-swift.property)

The window level of the window.

[`Level`](/documentation/AppKit/NSWindow/Level-swift.struct)

The standard window levels in macOS.

### Managing Window Visibility and Occlusion State

[`visible`](/documentation/AppKit/NSWindow/isVisible)

A Boolean value that indicates whether the window is visible onscreen (even when it’s obscured by other windows).

[`occlusionState`](/documentation/AppKit/NSWindow/occlusionState-swift.property)

The occlusion state of the window.

### Managing Window Frames in User Defaults

[`+  removeFrameUsingName:`](/documentation/AppKit/NSWindow/removeFrame(usingName:))

Removes the frame data stored under a given name from the application’s user defaults.

[`-  setFrameUsingName:`](/documentation/AppKit/NSWindow/setFrameUsingName(_:))

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system.

[`-  setFrameUsingName:force:`](/documentation/AppKit/NSWindow/setFrameUsingName(_:force:))

Sets the window’s frame rectangle by reading the rectangle data stored under a given name from the defaults system. Can operate on non-resizable windows.

[`-  saveFrameUsingName:`](/documentation/AppKit/NSWindow/saveFrame(usingName:))

Saves the window’s frame rectangle in the user defaults system under a given name.

[`-  setFrameAutosaveName:`](/documentation/AppKit/NSWindow/setFrameAutosaveName(_:))

Sets the name AppKit uses to automatically save the window’s frame rectangle data in the defaults system.

[`frameAutosaveName`](/documentation/AppKit/NSWindow/frameAutosaveName-swift.property)

The name used to automatically save the window’s frame rectangle data in the defaults system.

[`FrameAutosaveName`](/documentation/AppKit/NSWindow/FrameAutosaveName-swift.typealias)

The type of a window’s frame autosave name.

[`stringWithSavedFrame`](/documentation/AppKit/NSWindow/frameDescriptor)

A string representation of the window’s frame rectangle.

[`-  setFrameFromString:`](/documentation/AppKit/NSWindow/setFrame(from:))

Sets the window’s frame rectangle from a given string representation.

[`PersistableFrameDescriptor`](/documentation/AppKit/NSWindow/PersistableFrameDescriptor)

The type of a window’s frame descriptor.

### Managing Key Status

[`keyWindow`](/documentation/AppKit/NSWindow/isKeyWindow)

A Boolean value that indicates whether the window is the key window for the application.

[`canBecomeKeyWindow`](/documentation/AppKit/NSWindow/canBecomeKey)

A Boolean value that indicates whether the window can become the key window.

[`-  makeKeyWindow`](/documentation/AppKit/NSWindow/makeKey())

Makes the window the key window.

[`-  makeKeyAndOrderFront:`](/documentation/AppKit/NSWindow/makeKeyAndOrderFront(_:))

Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.

[`-  becomeKeyWindow`](/documentation/AppKit/NSWindow/becomeKey())

Informs the window that it has become the key window.

[`-  resignKeyWindow`](/documentation/AppKit/NSWindow/resignKey())

Resigns the window’s key window status.

### Managing Main Status

[`mainWindow`](/documentation/AppKit/NSWindow/isMainWindow)

A Boolean value that indicates whether the window is the application’s main window.

[`canBecomeMainWindow`](/documentation/AppKit/NSWindow/canBecomeMain)

A Boolean value that indicates whether the window can become the application’s main window.

[`-  makeMainWindow`](/documentation/AppKit/NSWindow/makeMain())

Makes the window the main window.

[`-  becomeMainWindow`](/documentation/AppKit/NSWindow/becomeMain())

Informs the window that it has become the main window.

[`-  resignMainWindow`](/documentation/AppKit/NSWindow/resignMain())

Resigns the window’s main window status.

### Managing Toolbars

[`toolbar`](/documentation/AppKit/NSWindow/toolbar)

The window’s toolbar.

[`-  toggleToolbarShown:`](/documentation/AppKit/NSWindow/toggleToolbarShown(_:))

Toggles the visibility of the window’s toolbar.

[`-  runToolbarCustomizationPalette:`](/documentation/AppKit/NSWindow/runToolbarCustomizationPalette(_:))

Presents the toolbar customization user interface.

### Managing Attached Windows

[`childWindows`](/documentation/AppKit/NSWindow/childWindows)

An array of the window’s attached child windows.

[`-  addChildWindow:ordered:`](/documentation/AppKit/NSWindow/addChildWindow(_:ordered:))

Adds a given window as a child window of the window.

[`-  removeChildWindow:`](/documentation/AppKit/NSWindow/removeChildWindow(_:))

Detaches a given child window from the window.

[`parentWindow`](/documentation/AppKit/NSWindow/parent)

The parent window to which the window is attached as a child.

### Managing Default Buttons

[`defaultButtonCell`](/documentation/AppKit/NSWindow/defaultButtonCell)

The button cell that performs as if clicked when the window receives a Return (or Enter) key event.

[`-  enableKeyEquivalentForDefaultButtonCell`](/documentation/AppKit/NSWindow/enableKeyEquivalentForDefaultButtonCell())

Reenables the default button cell’s key equivalent, so it performs a click when the user presses Return (or Enter).

[`-  disableKeyEquivalentForDefaultButtonCell`](/documentation/AppKit/NSWindow/disableKeyEquivalentForDefaultButtonCell())

Disables the default button cell’s key equivalent, so it doesn’t perform a click when the user presses Return (or Enter).

### Managing Field Editors

[`-  fieldEditor:forObject:`](/documentation/AppKit/NSWindow/fieldEditor(_:for:))

Returns the window’s field editor, creating it if requested.

[`-  endEditingFor:`](/documentation/AppKit/NSWindow/endEditing(for:))

Forces the field editor to give up its first responder status and prepares it for its next assignment.

### Managing the Window Menu

[`excludedFromWindowsMenu`](/documentation/AppKit/NSWindow/isExcludedFromWindowsMenu)

A Boolean value that indicates whether the window is excluded from the application’s Windows menu.

### Managing Cursor Rectangles

[`areCursorRectsEnabled`](/documentation/AppKit/NSWindow/areCursorRectsEnabled)

A Boolean value that indicates whether the window’s cursor rectangles are enabled.

[`-  enableCursorRects`](/documentation/AppKit/NSWindow/enableCursorRects())

Reenables cursor rectangle management within the window after a [`disableCursorRects()`](/documentation/AppKit/NSWindow/disableCursorRects()) message.

[`-  disableCursorRects`](/documentation/AppKit/NSWindow/disableCursorRects())

Disables all cursor rectangle management within the window.

[`-  discardCursorRects`](/documentation/AppKit/NSWindow/discardCursorRects())

Invalidates all cursor rectangles in the window.

[`-  invalidateCursorRectsForView:`](/documentation/AppKit/NSWindow/invalidateCursorRects(for:))

Marks as invalid the cursor rectangles of a given view object in the window, so they’ll be set up again when the window becomes key.

[`-  resetCursorRects`](/documentation/AppKit/NSWindow/resetCursorRects())

Clears the window’s cursor rectangles and the cursor rectangles of the [`NSView`](/documentation/AppKit/NSView) objects in its view hierarchy.

### Managing Title Bars

[`+  standardWindowButton:forStyleMask:`](/documentation/AppKit/NSWindow/standardWindowButton(_:for:))

Returns a new instance of a given standard window button, sized appropriately for a given window style.

[`-  standardWindowButton:`](/documentation/AppKit/NSWindow/standardWindowButton(_:))

Returns the window button of a given window button kind in the window’s view hierarchy.

[`showsToolbarButton`](/documentation/AppKit/NSWindow/showsToolbarButton)

A Boolean value that indicates whether the toolbar control button is currently displayed.

[`titlebarAppearsTransparent`](/documentation/AppKit/NSWindow/titlebarAppearsTransparent)

A Boolean value that indicates whether the title bar draws its background.

[`toolbarStyle`](/documentation/AppKit/NSWindow/toolbarStyle-swift.property)

The style that determines the appearance and location of the toolbar in relation to the title bar.

[`ToolbarStyle`](/documentation/AppKit/NSWindow/ToolbarStyle-swift.enum)

Styles that determine the appearance and location of the toolbar in relation to the title bar.

[`titlebarSeparatorStyle`](/documentation/AppKit/NSWindow/titlebarSeparatorStyle)

The type of separator that the app displays between the title bar and content of a window.

[`NSTitlebarSeparatorStyle`](/documentation/AppKit/NSTitlebarSeparatorStyle)

Styles that determine the type of separator displayed between the title bar and content of a window.

[`windowTitlebarLayoutDirection`](/documentation/AppKit/NSWindow/windowTitlebarLayoutDirection)

The direction the window’s title bar lays text out, either left to right or right to left.

### Managing Title Bar Accessories

[`-  addTitlebarAccessoryViewController:`](/documentation/AppKit/NSWindow/addTitlebarAccessoryViewController(_:))

Adds the specified title bar accessory view controller to the window.

[`-  insertTitlebarAccessoryViewController:atIndex:`](/documentation/AppKit/NSWindow/insertTitlebarAccessoryViewController(_:at:))

Inserts the view controller into the window’s array of title bar accessory view controllers at the specified index.

[`-  removeTitlebarAccessoryViewControllerAtIndex:`](/documentation/AppKit/NSWindow/removeTitlebarAccessoryViewController(at:))

Removes the view controller at the specified index from the window’s array of title bar accessory view controllers.

[`titlebarAccessoryViewControllers`](/documentation/AppKit/NSWindow/titlebarAccessoryViewControllers)

An array of title bar accessory view controllers that are currently added to the window.

### Managing Window Tabs

[`allowsAutomaticWindowTabbing`](/documentation/AppKit/NSWindow/allowsAutomaticWindowTabbing)

A Boolean value that indicates whether the app can automatically organize windows into tabs.

[`userTabbingPreference`](/documentation/AppKit/NSWindow/userTabbingPreference-swift.type.property)

A value that indicates the user’s preference for window tabbing.

[`tab`](/documentation/AppKit/NSWindow/tab)

An object that represents information about a window when it displays as a tab.

[`tabbingIdentifier`](/documentation/AppKit/NSWindow/tabbingIdentifier-swift.property)

A value that allows a group of related windows.

[`TabbingIdentifier`](/documentation/AppKit/NSWindow/TabbingIdentifier-swift.typealias)

A value that allows a group of related windows.

[`-  addTabbedWindow:ordered:`](/documentation/AppKit/NSWindow/addTabbedWindow(_:ordered:))

Adds the provided window as a new tab in a tabbed window using the specified ordering instruction.

[`tabbingMode`](/documentation/AppKit/NSWindow/tabbingMode-swift.property)

A value that indicates when a window displays tabs.

[`tabbedWindows`](/documentation/AppKit/NSWindow/tabbedWindows)

An array of windows that display as tabs.

[`-  mergeAllWindows:`](/documentation/AppKit/NSWindow/mergeAllWindows(_:))

Merges all open windows into a single tabbed window.

[`-  selectNextTab:`](/documentation/AppKit/NSWindow/selectNextTab(_:))

Selects the next tab in the tab group in the trailing direction.

[`-  selectPreviousTab:`](/documentation/AppKit/NSWindow/selectPreviousTab(_:))

Selects the previous tab in the tab group in the leading direction.

[`-  moveTabToNewWindow:`](/documentation/AppKit/NSWindow/moveTabToNewWindow(_:))

Moves the tab to a new containing window.

[`-  toggleTabBar:`](/documentation/AppKit/NSWindow/toggleTabBar(_:))

Shows or hides the tab bar.

[`-  toggleTabOverview:`](/documentation/AppKit/NSWindow/toggleTabOverview(_:))

Shows or hides the tab overview.

[`tabGroup`](/documentation/AppKit/NSWindow/tabGroup)

A group of windows that display together as a tab group.

### Managing Tooltips

[`allowsToolTipsWhenApplicationIsInactive`](/documentation/AppKit/NSWindow/allowsToolTipsWhenApplicationIsInactive)

A Boolean value that indicates whether the window can display tooltips even when the application is in the background.

### Handling Events

[`currentEvent`](/documentation/AppKit/NSWindow/currentEvent)

The event currently being processed by the application.

[`-  nextEventMatchingMask:`](/documentation/AppKit/NSWindow/nextEvent(matching:))

Returns the next event matching a given mask.

[`-  nextEventMatchingMask:untilDate:inMode:dequeue:`](/documentation/AppKit/NSWindow/nextEvent(matching:until:inMode:dequeue:))

Forwards the message to the global application object.

[`-  discardEventsMatchingMask:beforeEvent:`](/documentation/AppKit/NSWindow/discardEvents(matching:before:))

Forwards the message to the global application object.

[`-  postEvent:atStart:`](/documentation/AppKit/NSWindow/postEvent(_:atStart:))

Forwards the message to the global application object.

[`-  sendEvent:`](/documentation/AppKit/NSWindow/sendEvent(_:))

This action method dispatches mouse and keyboard events the global application object sends to the window.

[`-  tryToPerform:with:`](/documentation/AppKit/NSWindow/tryToPerform(_:with:))

Dispatches action messages with a given argument.

### Managing Responders

[`initialFirstResponder`](/documentation/AppKit/NSWindow/initialFirstResponder)

The view that’s made first responder (also called the key view) the first time the window is placed onscreen.

[`firstResponder`](/documentation/AppKit/NSWindow/firstResponder)

The window’s first responder.

[`-  makeFirstResponder:`](/documentation/AppKit/NSWindow/makeFirstResponder(_:))

Attempts to make a given responder the first responder for the window.

### Managing the Key View Loop

[`-  selectKeyViewPrecedingView:`](/documentation/AppKit/NSWindow/selectKeyView(preceding:))

Gives key view status to the view that precedes the given view.

[`-  selectKeyViewFollowingView:`](/documentation/AppKit/NSWindow/selectKeyView(following:))

Gives key view status to the view that follows the given view.

[`-  selectPreviousKeyView:`](/documentation/AppKit/NSWindow/selectPreviousKeyView(_:))

Searches for a candidate previous key view and, if it finds one, tries to make it the first responder.

[`-  selectNextKeyView:`](/documentation/AppKit/NSWindow/selectNextKeyView(_:))

Searches for a candidate next key view and, if it finds one, tries to make it the first responder.

[`keyViewSelectionDirection`](/documentation/AppKit/NSWindow/keyViewSelectionDirection)

The direction the window is currently using to change the key view.

[`autorecalculatesKeyViewLoop`](/documentation/AppKit/NSWindow/autorecalculatesKeyViewLoop)

A Boolean value that indicates whether the window automatically recalculates the key view loop when views are added.

[`-  recalculateKeyViewLoop`](/documentation/AppKit/NSWindow/recalculateKeyViewLoop())

Marks the key view loop as “dirty” and in need of recalculation.

### Managing Window Sharing

[`-  transferWindowSharingToWindow:completionHandler:`](/documentation/AppKit/NSWindow/transferWindowSharing(to:completionHandler:))

Attempts to move window sharing (within a SharePlay session) from this window to another window.

[`hasActiveWindowSharingSession`](/documentation/AppKit/NSWindow/hasActiveWindowSharingSession)

Indicates whether the receiver is the subject of an active SharePlay sharing session.

### Handling Mouse Events

[`acceptsMouseMovedEvents`](/documentation/AppKit/NSWindow/acceptsMouseMovedEvents)

A Boolean value that indicates whether the window accepts mouse-moved events.

[`ignoresMouseEvents`](/documentation/AppKit/NSWindow/ignoresMouseEvents)

A Boolean value that indicates whether the window is transparent to mouse events.

[`mouseLocationOutsideOfEventStream`](/documentation/AppKit/NSWindow/mouseLocationOutsideOfEventStream)

The current location of the pointer reckoned in the window’s base coordinate system, regardless of the current event being handled or of any events pending.

[`+  windowNumberAtPoint:belowWindowWithWindowNumber:`](/documentation/AppKit/NSWindow/windowNumber(at:belowWindowWithWindowNumber:))

Returns the number of the frontmost window that would be hit by a mouse-down at the specified screen location.

[`-  trackEventsMatchingMask:timeout:mode:handler:`](/documentation/AppKit/NSWindow/trackEvents(matching:timeout:mode:handler:))

Tracks events that match the specified mask using the specified tracking handler until the tracking handler explicitly terminates tracking.

[`-  performWindowDragWithEvent:`](/documentation/AppKit/NSWindow/performDrag(with:))

Starts a window drag based on the specified mouse-down event.

[`NSEventDurationForever`](/documentation/AppKit/NSEvent/foreverDuration)

The longest time duration possible.

### Handling Window Restoration

[`restorable`](/documentation/AppKit/NSWindow/isRestorable)

A Boolean value indicating whether the window configuration is preserved between application launches.

[`restorationClass`](/documentation/AppKit/NSWindow/restorationClass)

The restoration class associated with the window.

[`-  disableSnapshotRestoration`](/documentation/AppKit/NSWindow/disableSnapshotRestoration())

Disables snapshot restoration.

[`-  enableSnapshotRestoration`](/documentation/AppKit/NSWindow/enableSnapshotRestoration())

Enables snapshot restoration.

### Drawing Windows

[`-  display`](/documentation/AppKit/NSWindow/display())

Passes a display message down the window’s view hierarchy, thus redrawing all views within the window.

[`-  displayIfNeeded`](/documentation/AppKit/NSWindow/displayIfNeeded())

Passes a display message down the window’s view hierarchy, thus redrawing all views that need displaying.

[`viewsNeedDisplay`](/documentation/AppKit/NSWindow/viewsNeedDisplay)

A Boolean value that indicates whether any of the window’s views need to be displayed.

[`allowsConcurrentViewDrawing`](/documentation/AppKit/NSWindow/allowsConcurrentViewDrawing)

A Boolean value that indicates whether the window allows multithreaded view drawing.

### Window Animation

[`animationBehavior`](/documentation/AppKit/NSWindow/animationBehavior-swift.property)

The window’s automatic animation behavior.

### Updating Windows

[`-  disableScreenUpdatesUntilFlush`](/documentation/AppKit/NSWindow/disableScreenUpdatesUntilFlush())

Disables the window’s screen updates until the window is flushed.

[`-  update`](/documentation/AppKit/NSWindow/update())

Updates the window.

### Dragging Items

[`-  dragImage:at:offset:event:pasteboard:source:slideBack:`](/documentation/AppKit/NSWindow/drag(_:at:offset:event:pasteboard:source:slideBack:))

Begins a dragging session.

[`-  registerForDraggedTypes:`](/documentation/AppKit/NSWindow/registerForDraggedTypes(_:))

Registers a set of pasteboard types that the window accepts as the destination of an image-dragging session.

[`-  unregisterDraggedTypes`](/documentation/AppKit/NSWindow/unregisterDraggedTypes())

Unregisters the window as a possible destination for dragging operations.

### Accessing Edited Status

[`documentEdited`](/documentation/AppKit/NSWindow/isDocumentEdited)

A Boolean value that indicates whether the window’s document has been edited.

### Converting Coordinates

[`backingScaleFactor`](/documentation/AppKit/NSWindow/backingScaleFactor)

The backing scale factor.

[`-  backingAlignedRect:options:`](/documentation/AppKit/NSWindow/backingAlignedRect(_:options:))

Returns a backing store pixel-aligned rectangle in window coordinates.

[`-  convertRectFromBacking:`](/documentation/AppKit/NSWindow/convertFromBacking(_:))

Converts a rectangle from its pixel-aligned backing store coordinate system to the window’s coordinate system.

[`-  convertRectFromScreen:`](/documentation/AppKit/NSWindow/convertFromScreen(_:))

Converts a rectangle from the screen coordinate system to the window’s coordinate system.

[`-  convertPointFromBacking:`](/documentation/AppKit/NSWindow/convertPointFromBacking(_:))

Converts a point from its pixel-aligned backing store coordinate system to the window’s coordinate system.

[`-  convertPointFromScreen:`](/documentation/AppKit/NSWindow/convertPoint(fromScreen:))

Converts a point from the screen coordinate system to the window’s coordinate system.

[`-  convertRectToBacking:`](/documentation/AppKit/NSWindow/convertToBacking(_:))

Converts a rectangle from the window’s coordinate system to its pixel-aligned backing store coordinate system.

[`-  convertRectToScreen:`](/documentation/AppKit/NSWindow/convertToScreen(_:))

Converts a rectangle to the screen coordinate system from the window’s coordinate system.

[`-  convertPointToBacking:`](/documentation/AppKit/NSWindow/convertPointToBacking(_:))

Converts a point from the window’s coordinate system to its pixel-aligned backing store coordinate system.

[`-  convertPointToScreen:`](/documentation/AppKit/NSWindow/convertPoint(toScreen:))

Converts a point to the screen coordinate system from the window’s coordinate system.

### Managing Titles

[`title`](/documentation/AppKit/NSWindow/title)

The string that appears in the title bar of the window or the path to the represented file.

[`subtitle`](/documentation/AppKit/NSWindow/subtitle)

A secondary line of text that appears in the title bar of the window.

[`titleVisibility`](/documentation/AppKit/NSWindow/titleVisibility-swift.property)

A value that indicates the visibility of the window’s title and title bar buttons.

[`-  setTitleWithRepresentedFilename:`](/documentation/AppKit/NSWindow/setTitleWithRepresentedFilename(_:))

Sets a given path as the window’s title, formatting it as a file-system path, and records this path as the window’s associated file.

[`representedFilename`](/documentation/AppKit/NSWindow/representedFilename)

The path to the file of the window’s represented file.

[`representedURL`](/documentation/AppKit/NSWindow/representedURL)

The URL of the file the window represents.

### Accessing Screen Information

[`screen`](/documentation/AppKit/NSWindow/screen)

The screen the window is on.

[`deepestScreen`](/documentation/AppKit/NSWindow/deepestScreen)

The deepest screen the window is on (it may be split over several screens).

[`displaysWhenScreenProfileChanges`](/documentation/AppKit/NSWindow/displaysWhenScreenProfileChanges)

A Boolean value that indicates whether the window context should be updated when the screen profile changes or when the window moves to a different screen.

### Moving Windows

[`movableByWindowBackground`](/documentation/AppKit/NSWindow/isMovableByWindowBackground)

A Boolean value that indicates whether the window is movable by clicking and dragging anywhere in its background.

[`movable`](/documentation/AppKit/NSWindow/isMovable)

A Boolean value that indicates whether the window can be dragged by clicking in its title bar or background.

[`-  center`](/documentation/AppKit/NSWindow/center())

Sets the window’s location to the center of the screen.

### Closing Windows

[`-  performClose:`](/documentation/AppKit/NSWindow/performClose(_:))

Simulates the user clicking the close button by momentarily highlighting the button and then closing the window.

[`-  close`](/documentation/AppKit/NSWindow/close())

Removes the window from the screen.

[`releasedWhenClosed`](/documentation/AppKit/NSWindow/isReleasedWhenClosed)

A Boolean value that indicates whether the window is released when it receives the `close` message.

### Minimizing Windows

[`miniaturized`](/documentation/AppKit/NSWindow/isMiniaturized)

A Boolean value that indicates whether the window is minimized.

[`-  performMiniaturize:`](/documentation/AppKit/NSWindow/performMiniaturize(_:))

Simulates the user clicking the minimize button by momentarily highlighting the button, then minimizing the window.

[`-  miniaturize:`](/documentation/AppKit/NSWindow/miniaturize(_:))

Removes the window from the screen list and displays the minimized window in the Dock.

[`-  deminiaturize:`](/documentation/AppKit/NSWindow/deminiaturize(_:))

De-minimizes the window.

[`miniwindowImage`](/documentation/AppKit/NSWindow/miniwindowImage)

The custom miniaturized window image of the window.

[`miniwindowTitle`](/documentation/AppKit/NSWindow/miniwindowTitle)

The title displayed in the window’s minimized window.

### Getting the Dock Tile

[`dockTile`](/documentation/AppKit/NSWindow/dockTile)

The application’s Dock tile.

### Printing Windows

[`-  print:`](/documentation/AppKit/NSWindow/printWindow(_:))

Runs the Print panel, and if the user chooses an option other than canceling, prints the window (its frame view and all subviews).

[`-  dataWithEPSInsideRect:`](/documentation/AppKit/NSWindow/dataWithEPS(inside:))

Returns EPS data that draws the region of the window within a given rectangle.

[`-  dataWithPDFInsideRect:`](/documentation/AppKit/NSWindow/dataWithPDF(inside:))

Returns PDF data that draws the region of the window within a given rectangle.

### Providing Services

[`-  validRequestorForSendType:returnType:`](/documentation/AppKit/NSWindow/validRequestor(forSendType:returnType:))

Searches for an object that responds to a Services request.

### Triggering Constraint-Based Layout

[`-  updateConstraintsIfNeeded`](/documentation/AppKit/NSWindow/updateConstraintsIfNeeded())

Updates the constraints based on changes to views in the window since the last layout.

[`-  layoutIfNeeded`](/documentation/AppKit/NSWindow/layoutIfNeeded())

Updates the layout of views in the window based on the current views and constraints.

### Debugging Constraint-Based Layout

See [Cocoa Auto Layout Release Notes](https://developer.apple.com/library/archive/releasenotes/UserExperience/RNAutomaticLayout/index.html#//apple_ref/doc/uid/TP40010631) for more details on debugging constraint-based layout.

[`-  visualizeConstraints:`](/documentation/AppKit/NSWindow/visualizeConstraints(_:))

Displays a visual representation of the supplied constraints in the window.

### Constraint-Based Layouts

[`-  anchorAttributeForOrientation:`](/documentation/AppKit/NSWindow/anchorAttribute(for:))

Returns the part of the window that stays stationary during constraint-based layout.

[`-  setAnchorAttribute:forOrientation:`](/documentation/AppKit/NSWindow/setAnchorAttribute(_:for:))

Sets the part of the window that stays stationary during constraint-based layout.

### Working with Window Depths

[`NSAvailableWindowDepths`](/documentation/AppKit/NSAvailableWindowDepths)

Returns the available window depth values.

[`NSBestDepth`](/documentation/AppKit/NSBestDepth)

Attempts to return a window depth adequate for the specified parameters.

[`NSBitsPerPixelFromDepth`](/documentation/AppKit/NSWindow/Depth/bitsPerPixel)

Returns the bits per pixel for the specified window depth.

[`NSBitsPerSampleFromDepth`](/documentation/AppKit/NSWindow/Depth/bitsPerSample)

Returns the bits per sample for the specified window depth.

[`NSColorSpaceFromDepth`](/documentation/AppKit/NSWindow/Depth/colorSpaceName)

Returns the name of the color space corresponding to the passed window depth.

[`NSNumberOfColorComponents`](/documentation/AppKit/NSColorSpaceName/numberOfColorComponents)

Returns the number of color components in the specified color space.

[`NSPlanarFromDepth`](/documentation/AppKit/NSWindow/Depth/isPlanar)

Returns whether the specified window depth is planar.

[`-  canRepresentDisplayGamut:`](/documentation/AppKit/NSWindow/canRepresent(_:))

A Boolean value that indicates if the window and its screen use a color space that can represent the specified display gamut.

### Getting Information About Scripting Attributes

[`hasCloseBox`](/documentation/AppKit/NSWindow/hasCloseBox)

A Boolean value that indicates if the window has a close box.

[`hasTitleBar`](/documentation/AppKit/NSWindow/hasTitleBar)

A Boolean value that indicates if the window has a title bar.

[`modalPanel`](/documentation/AppKit/NSWindow/isModalPanel)

A Boolean value that indicates whether the window is a modal panel.

[`floatingPanel`](/documentation/AppKit/NSWindow/isFloatingPanel)

A Boolean value that indicates whether the window is a floating panel.

[`zoomable`](/documentation/AppKit/NSWindow/isZoomable)

A Boolean value that indicates whether the window allows zooming.

[`resizable`](/documentation/AppKit/NSWindow/isResizable)

A Boolean value that indicates if the user can resize the window.

[`miniaturizable`](/documentation/AppKit/NSWindow/isMiniaturizable)

A Boolean value that indicates whether the window can minimize.

[`orderedIndex`](/documentation/AppKit/NSWindow/orderedIndex)

The zero-based position of the window, based on its order from front to back among all visible application windows.

### Setting Scripting Attributes

[`-  setIsMiniaturized:`](/documentation/AppKit/NSWindow/setIsMiniaturized(_:))

Sets the window’s miniaturized state to the value you specify.

[`-  setIsVisible:`](/documentation/AppKit/NSWindow/setIsVisible(_:))

Sets the window’s visible state to the value you specify.

[`-  setIsZoomed:`](/documentation/AppKit/NSWindow/setIsZoomed(_:))

Sets the window’s zoomed state to the value you specify.

### Handling Script Commands

[`-  handleCloseScriptCommand:`](/documentation/AppKit/NSWindow/handleClose(_:))

Handles the AppleScript command to close the window (and its associated document, if any).

[`-  handlePrintScriptCommand:`](/documentation/AppKit/NSWindow/handlePrint(_:))

Handles the AppleScript command to print the contents of the window (or its associated document, if any).

[`-  handleSaveScriptCommand:`](/documentation/AppKit/NSWindow/handleSave(_:))

Handles the AppleScript command to save the window (and its associated document, if any).

### Constants

[`SelectionDirection`](/documentation/AppKit/NSWindow/SelectionDirection)

Constants that specify the direction a window is currently using to change the key view.

[`ButtonType`](/documentation/AppKit/NSWindow/ButtonType)

Constants that provide a way to access standard title bar buttons.

[NSRunLoop—Ordering Modes for NSWindow](/documentation/AppKit/nsrunloop-ordering-modes-for-nsw)

Constants that specify the priority for runloop messages.

[`Depth`](/documentation/AppKit/NSWindow/Depth)

A type that represents the depth, or amount of memory, for a single pixel in a window or screen.

[`BackingStoreType`](/documentation/AppKit/NSWindow/BackingStoreType)

Constants that specify how the window device buffers the drawing done in a window.

[`OrderingMode`](/documentation/AppKit/NSWindow/OrderingMode)

Constants that let you specify how a window is ordered relative to another window.

[`SharingType`](/documentation/AppKit/NSWindow/SharingType-swift.enum)

Constants that represent the access levels other processes can have to a window’s content.

[`NumberListOptions`](/documentation/AppKit/NSWindow/NumberListOptions)

Options to use when retrieving window numbers from the system.

[`AnimationBehavior`](/documentation/AppKit/NSWindow/AnimationBehavior-swift.enum)

Constants that control the automatic window animation behavior windows use when ordering to the front or out of view.

[`CollectionBehavior`](/documentation/AppKit/NSWindow/CollectionBehavior-swift.struct)

Window collection behaviors related to Mission Control, Spaces, and Stage Manager.

[`OcclusionState`](/documentation/AppKit/NSWindow/OcclusionState-swift.struct)

Specifies whether the window is occluded.

[`TitleVisibility`](/documentation/AppKit/NSWindow/TitleVisibility-swift.enum)

Specifies the appearance of the window’s title bar area.

[`UserTabbingPreference`](/documentation/AppKit/NSWindow/UserTabbingPreference-swift.enum)

A value that indicates the user’s preference for window tabbing.

[`TabbingMode`](/documentation/AppKit/NSWindow/TabbingMode-swift.enum)

The preferred tabbing behavior of a window.

[Application Kit Version for Deferred Window Display Support](/documentation/AppKit/application-kit-version-for-deferred-window-display-support)

The version of the AppKit.framework containing a specific bug fix or capability.

[Application Kit Version for Custom Sheet Position](/documentation/AppKit/application-kit-version-for-custom-sheet-position)

The version of the AppKit.framework containing a specific bug fix or capability.

[NSWindowDidChangeBackingPropertiesNotification User Info Properties](/documentation/AppKit/nswindowdidchangebackingpropertiesnotification-user-info-properties)

Constants that represent values in the user info dictionary of the `didChangeBackingPropertiesNotification` notification.

### Notifications

[`NSWindowDidBecomeKeyNotification`](/documentation/AppKit/NSWindow/didBecomeKeyNotification)

A notification that the window object became the key window.

[`NSWindowDidBecomeMainNotification`](/documentation/AppKit/NSWindow/didBecomeMainNotification)

A notification that the window object became the main window.

[`NSWindowDidChangeScreenNotification`](/documentation/AppKit/NSWindow/didChangeScreenNotification)

A notification that a portion of the window object’s frame moved onto or off of a screen.

[`NSWindowDidChangeScreenProfileNotification`](/documentation/AppKit/NSWindow/didChangeScreenProfileNotification)

A notification that the screen containing the window changed.

[`NSWindowDidDeminiaturizeNotification`](/documentation/AppKit/NSWindow/didDeminiaturizeNotification)

A notification that the window is no longer minimized.

[`NSWindowDidEndSheetNotification`](/documentation/AppKit/NSWindow/didEndSheetNotification)

A notification that the window object closed an attached sheet.

[`NSWindowDidEndLiveResizeNotification`](/documentation/AppKit/NSWindow/didEndLiveResizeNotification)

A notification that the user resized the window object.

[`NSWindowDidExposeNotification`](/documentation/AppKit/NSWindow/didExposeNotification)

A notification that a window exposed a portion of its nonretained content.

[`NSWindowDidMiniaturizeNotification`](/documentation/AppKit/NSWindow/didMiniaturizeNotification)

A notification that the window object minimized.

[`NSWindowDidMoveNotification`](/documentation/AppKit/NSWindow/didMoveNotification)

A notification that the window object moved.

[`NSWindowDidResignKeyNotification`](/documentation/AppKit/NSWindow/didResignKeyNotification)

A notification that the window object resigned its status as key window.

[`NSWindowDidResignMainNotification`](/documentation/AppKit/NSWindow/didResignMainNotification)

A notification that the window object resigned its status as main window.

[`NSWindowDidResizeNotification`](/documentation/AppKit/NSWindow/didResizeNotification)

A notification that the window object size changed.

[`NSWindowDidUpdateNotification`](/documentation/AppKit/NSWindow/didUpdateNotification)

A notification that the window object received an update message.

[`NSWindowWillBeginSheetNotification`](/documentation/AppKit/NSWindow/willBeginSheetNotification)

A notification that the window object is about to open a sheet.

[`NSWindowWillCloseNotification`](/documentation/AppKit/NSWindow/willCloseNotification)

A notification that the window object is about to close.

[`NSWindowWillMiniaturizeNotification`](/documentation/AppKit/NSWindow/willMiniaturizeNotification)

A notification that the window object is about to minimize.

[`NSWindowWillMoveNotification`](/documentation/AppKit/NSWindow/willMoveNotification)

A notification that the window object is about to move.

[`NSWindowWillStartLiveResizeNotification`](/documentation/AppKit/NSWindow/willStartLiveResizeNotification)

A notification that the user is about to resize the window.

[`NSWindowWillEnterFullScreenNotification`](/documentation/AppKit/NSWindow/willEnterFullScreenNotification)

A notification that the window will enter full-screen mode.

[`NSWindowDidEnterFullScreenNotification`](/documentation/AppKit/NSWindow/didEnterFullScreenNotification)

A notification that the window entered full-screen mode.

[`NSWindowWillExitFullScreenNotification`](/documentation/AppKit/NSWindow/willExitFullScreenNotification)

A notification that the window object will exit full-screen mode.

[`NSWindowDidExitFullScreenNotification`](/documentation/AppKit/NSWindow/didExitFullScreenNotification)

A notification that the window object exited full-screen mode.

[`NSWindowWillEnterVersionBrowserNotification`](/documentation/AppKit/NSWindow/willEnterVersionBrowserNotification)

A notification that the window object will enter version browser mode.

[`NSWindowDidEnterVersionBrowserNotification`](/documentation/AppKit/NSWindow/didEnterVersionBrowserNotification)

A notification that the window object entered version browser mode.

[`NSWindowWillExitVersionBrowserNotification`](/documentation/AppKit/NSWindow/willExitVersionBrowserNotification)

A notification that the window object will exit version browser mode.

[`NSWindowDidExitVersionBrowserNotification`](/documentation/AppKit/NSWindow/didExitVersionBrowserNotification)

A notification that the window object exited version browser mode.

[`NSWindowDidChangeBackingPropertiesNotification`](/documentation/AppKit/NSWindow/didChangeBackingPropertiesNotification)

A notification that the window object backing properties changed.

[`NSWindowDidChangeOcclusionStateNotification`](/documentation/AppKit/NSWindow/didChangeOcclusionStateNotification)

A notification that the window object’s occlusion state changed.

### Deprecated

[Deprecated Symbols](/documentation/AppKit/nswindow-deprecated-symbols)

Review unsupported symbols and their replacements.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`NSMenuItemValidation`](/documentation/AppKit/NSMenuItemValidation)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSUserInterfaceValidations`](/documentation/AppKit/NSUserInterfaceValidations)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherited By

[`NSPanel`](/documentation/AppKit/NSPanel)

### Inherits From

[`NSResponder`](/documentation/AppKit/NSResponder)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)