<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/nsgraphicscontext-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

[`init(window: NSWindow)`](/documentation/AppKit/NSGraphicsContext/init(window:))

Creates a new graphics context for drawing into a window.

[`init(graphicsPort: UnsafeMutableRawPointer, flipped: Bool)`](/documentation/AppKit/NSGraphicsContext/init(graphicsPort:flipped:))

Creates a new graphics context from the specified graphics port.

[`class func setGraphicsState(Int)`](/documentation/AppKit/NSGraphicsContext/setGraphicsState(_:))

Makes the graphics context of the specified graphics state current, and resets graphics state.

[`- (id) focusStack;`](/documentation/AppKit/NSGraphicsContext/focusStack)

Returns the object used by the context to track the hierarchy of views with locked focus.

[`- (void) setFocusStack:(id) stack;`](/documentation/AppKit/NSGraphicsContext/setFocusStack:)

Sets the object used by the receiver to track the hierarchy of views with locked focus.

### Deprecated properties

[`var graphicsPort: UnsafeMutableRawPointer`](/documentation/AppKit/NSGraphicsContext/graphicsPort)

The low-level, platform-specific graphics context represented by the graphic port.



---

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)