Functions

Functions and function-like macros for use with multiple classes.

Topics

Graphics

func NSDrawButton(NSRect, NSRect)

Draws a gray-filled rectangle representing a user-interface button.

func NSDrawDarkBezel(NSRect, NSRect)

Draws a dark gray-filled rectangle with a bezel border.

func NSDrawGrayBezel(NSRect, NSRect)

Draws a gray-filled rectangle with a bezel border.

func NSDrawGroove(NSRect, NSRect)

Draws a gray-filled rectangle with a groove border.

func NSDrawLightBezel(NSRect, NSRect)

Draws a white-filled rectangle with a bezel border.

func NSDottedFrameRect(NSRect)

Draws a bordered rectangle.

func NSDrawWhiteBezel(NSRect, NSRect)

Draws a white-filled rectangle with a bezel border.

func NSDrawWindowBackground(NSRect)

Draws the window’s default background pattern into the specified rectangle of the currently focused view.

func NSEraseRect(NSRect)

Erases the specified rect by filling it with white.

func NSReadPixel(NSPoint)

Reads the color of the pixel at the specified location.

func set()

Specifies how a focus ring will be drawn.

Graphics-Window Depth

var bitsPerPixel: Int

Returns the bits per pixel for the specified window depth.

var bitsPerSample: Int

Returns the bits per sample for the specified window depth.

var colorSpaceName: NSColorSpaceName?

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

var numberOfColorComponents: Int

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

var isPlanar: Bool

Returns whether the specified window depth is planar.

Key Value Bindings

func NSIsControllerMarker(Any?)

Tests whether a given object is special marker object used for indicating the state of a selection in relation to a key.

Pasteboards

static func fileContentsType(forPathExtension: String)

Returns a pasteboard type based on the passed file type.

static func fileNameType(forPathExtension: String)

Returns a pasteboard type based on the passed file type.

var representedPathExtension: String?

Returns a file type based on the passed pasteboard type.

static func representedPathExtensions(from: [NSPasteboard.PasteboardType])

Returns an array of file types based on the passed pasteboard types.