<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/nswindow-deprecated-symbols",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Deprecated symbols"
}
-->

# Deprecated symbols

Review symbols that are no longer in active development, and their recommended replacements.

## Overview

Although these symbols are available for use, Apple is no longer actively developing them, and may remove them in a future release. Apple recommends moving away from these symbols and using their indicated replacements instead. Check the individual symbol pages for the recommended replacements.

## Topics

### Deprecated methods

[`func gState() -> Int`](/documentation/AppKit/NSWindow/gState())

Returns the window’s graphics state object.

[`func canStoreColor() -> Bool`](/documentation/AppKit/NSWindow/canStoreColor())

Indicates whether the window has a depth limit that allows it to store color values.

[`func enableFlushing()`](/documentation/AppKit/NSWindow/enableFlushing())

Reenables the [`flush()`](/documentation/AppKit/NSWindow/flush()) method for the window after it was disabled through a previous [`disableFlushing()`](/documentation/AppKit/NSWindow/disableFlushing()) message.

[`func disableFlushing()`](/documentation/AppKit/NSWindow/disableFlushing())

Disables the [`flush()`](/documentation/AppKit/NSWindow/flush()) method for the window.

[`func flush()`](/documentation/AppKit/NSWindow/flush())

Flushes the window’s offscreen buffer to the screen if the window is buffered and flushing is enabled.

[`func flushIfNeeded()`](/documentation/AppKit/NSWindow/flushIfNeeded())

Flushes the window’s offscreen buffer to the screen if flushing is enabled and if the last [`flush()`](/documentation/AppKit/NSWindow/flush()) message had no effect because flushing was disabled.

[`class func menuChanged(NSMenu)`](/documentation/AppKit/NSWindow/menuChanged(_:))

This method does nothing; it is here for backward compatibility.

[`func cacheImage(in: NSRect)`](/documentation/AppKit/NSWindow/cacheImage(in:))

Stores the window’s raster image from a given rectangle expressed in the window’s base coordinate system.

[`func restoreCachedImage()`](/documentation/AppKit/NSWindow/restoreCachedImage())

Splices the window’s cached image rectangles, if any, back into its raster image (and buffer if it has one), undoing the effect of any drawing performed within those areas since they were established using [`cacheImage(in:)`](/documentation/AppKit/NSWindow/cacheImage(in:)).

[`func discardCachedImage()`](/documentation/AppKit/NSWindow/discardCachedImage())

Discards all of the window’s cached image rectangles.

[`func useOptimizedDrawing(Bool)`](/documentation/AppKit/NSWindow/useOptimizedDrawing(_:))

Specifies whether the window is to optimize focusing and drawing when displaying its views.

[`- (NSPoint) convertBaseToScreen:(NSPoint) point;`](/documentation/AppKit/NSWindow/convertBaseToScreen:)

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

[`- (NSPoint) convertScreenToBase:(NSPoint) point;`](/documentation/AppKit/NSWindow/convertScreenToBase:)

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

[`- (CGFloat) userSpaceScaleFactor;`](/documentation/AppKit/NSWindow/userSpaceScaleFactor)

Returns the scale factor applied to the window.

[`convenience init?(windowRef: UnsafeMutableRawPointer)`](/documentation/AppKit/NSWindow/init(windowRef:))

Returns a Cocoa window created from a Carbon window.

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

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

[`func drag(NSImage, at: NSPoint, offset: NSSize, event: NSEvent, pasteboard: NSPasteboard, source: Any, slideBack: Bool)`](/documentation/AppKit/NSWindow/drag(_:at:offset:event:pasteboard:source:slideBack:))

Begins a dragging session.

### Deprecated properties

[`var backingLocation: NSWindow.BackingLocation`](/documentation/AppKit/NSWindow/backingLocation-swift.property)

The location of the window’s backing store.

[`var preferredBackingLocation: NSWindow.BackingLocation`](/documentation/AppKit/NSWindow/preferredBackingLocation)

A Boolean value that indicates the preferred location for the window’s backing store.

[`var isOneShot: Bool`](/documentation/AppKit/NSWindow/isOneShot)

A Boolean value that indicates whether the window device the window manages is freed when it’s removed from the screen list.

[`var drawers: [NSDrawer]?`](/documentation/AppKit/NSWindow/drawers)

The collection of drawers associated with the window.

[`var showsResizeIndicator: Bool`](/documentation/AppKit/NSWindow/showsResizeIndicator)

A Boolean value that indicates whether the window’s resize indicator is visible.

[`var isFlushWindowDisabled: Bool`](/documentation/AppKit/NSWindow/isFlushWindowDisabled)

A Boolean value that indicates whether the window’s flushing ability is disabled.

[`var isAutodisplay: Bool`](/documentation/AppKit/NSWindow/isAutodisplay)

A Boolean value that indicates whether the window automatically displays views that need to be displayed.

[`var graphicsContext: NSGraphicsContext?`](/documentation/AppKit/NSWindow/graphicsContext)

The graphics context associated with the window for the current thread.

[`var windowRef: UnsafeMutableRawPointer`](/documentation/AppKit/NSWindow/windowRef)

The Carbon window reference associated with the window, creating one if necessary.

[`var showsToolbarButton: Bool`](/documentation/AppKit/NSWindow/showsToolbarButton)

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

### Deprecated constants

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

The following constants and the related data type represent a window’s possible backing locations.



---

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)