Module appkit

Source
Expand description

Construct and manage a graphical, event-driven user interface for your macOS app.

Structs§

Action
The action handler
ActionHandler
A handler that contains the class for callback storage and invocation on
NSApplication
An object that manages an app’s main event loop and resources used by all of that app’s objects.
NSButton
A control that defines an area on the screen that a user clicks to trigger an action.
NSColor
An object that stores color data and sometimes opacity (alpha value).
NSColorSpace
An object that represents a custom color space.
NSControl
A specialized view, such as a button or text field, that notifies your app of relevant events using the target-action design pattern.
NSDockTile
The visual representation of your app’s miniaturized windows and app icon as they appear in the Dock.
NSImage
A high-level interface for manipulating image data.
NSLayoutAnchor
A factory class for creating layout constraint objects using a fluent API.
NSLayoutConstraint
The relationship between two user interface objects that must be satisfied by the constraint-based layout system.
NSLayoutXAxisAnchor
A factory class for creating horizontal layout constraint objects using a fluent API.
NSLayoutYAxisAnchor
A factory class for creating vertical layout constraint objects using a fluent API.
NSMenu
An object that manages an app’s menus.
NSMenuItem
A command item in an app menu.
NSNib
An object that manages an app’s menus.
NSPasteboard
An object that transfers data to and from the pasteboard server.
NSPasteboardItem
NSPopover
A means to display additional content related to existing content on the screen.
NSResponder
An abstract class that forms the basis of event and command processing in AppKit.
NSRunningApplication
An object that can manipulate and provide information for a single instance of an app.
NSScreen
An object that describes the attributes of a computer’s monitor or screen.
NSStatusBar
An individual element displayed in the system menu bar.
NSStatusBarButton
The appearance and behavior of an item in the systemwide menu bar.
NSStatusItem
An individual element displayed in the system menu bar.
NSStoryboard
An encapsulation of the design-time view controller and window controller graph represented in an Interface Builder storyboard resource file.
NSTextField
Text the user can select or edit to send an action message to a target when the user presses the Return key.
NSToolbar
An object that manages the space above your app’s custom content and either below or integrated with the window’s title bar.
NSView
The infrastructure for drawing, printing, and handling events in an app.
NSViewController
A controller that manages a view, typically loaded from a nib file.
NSViewControllerTransitionOptions
NSWindow
A Window represents your way of interacting with an NSWindow. It wraps the various moving pieces to enable you to focus on reacting to lifecycle methods and doing your thing.
WindowConfig
A config for a window.

Enums§

NSApplicationActivationOptions
The following flags are for activateWithOptions
NSApplicationActivationPolicy
Activation policies (used by activationPolicy) that control whether and how an app may be activated.
NSApplicationDelegateReply
Constants that indicate whether a copy or print operation was successful, was canceled, or failed.
NSApplicationTerminateReply
Constants that determine whether an app should terminate.
NSBackingStoreType
Constants that specify how the window device buffers the drawing done in a window.
NSDisplayGamut
NSEventMask
Constants that you use to filter out specific event types from the stream of incoming events.
NSEventType
Constants for the types of events that responder objects can handle.
NSPasteboardContentsOptions
Options for preparing the pasteboard.
NSPasteboardReadingOptions
Options that specify how to interpret data on the pasteboard when initializing pasteboard data.
NSPopoverBehavior
The appearance and disappearance behavior of a popover.
NSStatusItemBehavior
A set of optional status item behaviors.
NSTitlebarSeparatorStyle
Styles that determine the type of separator displayed between the title bar and content of a window.
NSUserInterfaceLayoutDirection
Specifies the directional flow of the user interface.
NSWindowButton
Constants that provide a way to access standard title bar buttons.
NSWindowCollectionBehavior
Window collection behaviors related to Exposé and Spaces.
NSWindowDepth
A type that represents the depth, or amount of memory, for a single pixel in a window or screen.
NSWindowNumberListOptions
Options to use when retrieving window numbers from the system.
NSWindowOcclusionState
Specifies whether the window is occluded.
NSWindowOrderingMode
Constants that let you specify how a window is ordered relative to another window.
NSWindowSharingType
Constants that represent the access levels other processes can have to a window’s content.
NSWindowStyleMask
Constants that specify the style of a window, and that you can combine with the C bitwise OR operator.
NSWindowTitleVisibility
Specifies the appearance of the window’s title bar area.
NSWindowToolbarStyle
Styles that determine the appearance and location of the toolbar in relation to the title bar.

Statics§

ACTION_CALLBACK_PTR
The pointer for ActionHandler
NSAPPLICATION_PTR
NSDeviceBitsPerSample
The corresponding value is an NSNumber object containing an integer that gives the bit depth of the window’s raster image (2-bit, 8-bit, and so forth).
NSDeviceColorSpaceName
The corresponding value is an NSString object giving the name of the window’s color space.
NSDeviceIsPrinter
If there is a corresponding value, this indicates that the display device is a printer.
NSDeviceIsScreen
If there is a corresponding value, this indicates that the display device is a screen.
NSDeviceResolution
The corresponding value is an NSValue object containing a value of type NSSize that describes the window’s raster resolution in dots per inch (dpi).
NSDeviceSize
The corresponding value is an NSValue object containing a value of type NSSize that gives the size of the window’s frame rectangle.
NSDockWindowLevelDeprecated
The level for the dock.
NSFileContentsPboardType
A representation of a file’s contents.
NSFindPanelCaseInsensitiveSearch
A Boolean value indicating whether the search is case-insensitive.
NSFindPanelSearchOptionsPboardType
Type for the find panel metadata property list.
NSFindPanelSubstringMatch
A number object containing the match type to use in the find panel.
NSFloatingWindowLevel
Useful for floating palettes.
NSMainMenuWindowLevel
Reserved for the application’s main menu.
NSModalPanelWindowLevel
The level for a modal panel.
NSNSPasteboardNameGeneral
The pasteboard you use to perform ordinary cut, copy, and paste operations.
NSNibOwnerDeprecated
The external object that is responsible for the instantiated nib.
NSNibTopLevelObjectsDeprecated
An NSMutableArray object that, if present, is populated with the top-level objects of the newly instantiated nib.
NSNormalWindowLevel
The default level for NSWindow objects.
NSPasteboardNameDrag
The pasteboard that stores data to move as the result of a drag operation.
NSPasteboardNameFind
The pasteboard that holds information about the current state of the active application’s find panel.
NSPasteboardNameFont
The pasteboard that holds font and character information and supports Copy Font and Paste Font commands that the text editor may implement.
NSPasteboardNameRuler
The pasteboard that holds information about paragraph formats and supports the Copy Ruler and Paste Ruler commands that the text editor may implement.
NSPasteboardTypeColor
Color data.
NSPasteboardTypeFileURL
A file URL.
NSPasteboardTypeFont
Font and character information.
NSPasteboardTypeHTML
Type for HTML content.
NSPasteboardTypeMultipleTextSelection
Multiple text selection.
NSPasteboardTypePDF
PDF data.
NSPasteboardTypePNG
PNG image data.
NSPasteboardTypeRTF
Rich Text Format (RTF) data.
NSPasteboardTypeRTFD
RTFD formatted file contents.
NSPasteboardTypeRuler
Paragraph formatting information.
NSPasteboardTypeSound
Sound data.
NSPasteboardTypeString
String data.
NSPasteboardTypeTIFF
Tag Image File Format (TIFF) data.
NSPasteboardTypeTabularText
Tab-separated fields of text.
NSPasteboardTypeTextFinderOptions
Type for the Find panel metadata property list.
NSPasteboardTypeURL
URL data for one file or resource.
NSPasteboardURLReadingContentsConformToTypesKey
Option for reading URLs to restrict the results to URLs with contents that conform to any of the provided UTI types.
NSPopUpMenuWindowLevel
The level for a pop-up menu.
NSPopoverCloseReasonDetachToWindow
Specifies that the popover has been closed because it is being detached to a window.
NSPopoverCloseReasonKey
The userInfo key containing the reason for the NSPopoverWillCloseNotification.
NSPopoverCloseReasonStandard
Specifies that the popover has been closed in a standard way.
NSPopoverDidCloseNotification
Sent after the popover has finished animating offscreen.
NSPopoverDidShowNotification
Sent after the popover has finished animating onscreen.
NSPopoverWillCloseNotification
Sent before the popover is closed.
NSPopoverWillShowNotification
NSPopoverWillShowNotification
NSSTATUS_BAR_BUTTON_HANDLER
This is an action handler for NSStatusBarButton
NSScreenColorSpaceDidChangeNotification
NSScreenSaverWindowLevel
The level for a screen saver.
NSStatusWindowLevel
The level for a status window.
NSSubmenuWindowLevel
Reserved for submenus. Synonymous with NSTornOffMenuWindowLevel, which is preferred.
NSTextFinderCaseInsensitiveKey
A Boolean value indicating whether the search is case insensitive.
NSTextFinderMatchingTypeKey
A number object containing the match type to use.
NSTornOffMenuWindowLevel
The level for a torn-off menu. Synonymous with NSSubmenuWindowLevel.
staticNSPasteboardURLReadingFileURLsOnlyKey

Traits§

INSApplication
An object that manages an app’s main event loop and resources used by all of that app’s objects.
INSButton
A trait containing all the methods for NSButton
INSControl
A trait containing all the methods for NSControl
INSImage
A trait containing all the methods for NSImage
INSLayoutAnchor
A trait containing all the methods for NSLayoutAnchor
INSLayoutConstraint
A trait containing all the methods for NSLayoutConstraint
INSLayoutXAxisAnchor
A trait containing all the methods for NSLayoutXAxisAnchor
INSLayoutYAxisAnchor
A trait containing all the methods for NSLayoutYAxisAnchor
INSMenu
A trait containing all the methods for NSMenu
INSMenuItem
A trait containing all the methods for NSMenuItem
INSNib
A trait containing all the methods for NSNib
INSPasteboard
A trait containing all the methods for NSPasteboard
INSPasteboardItem
A trait containing all the methods for NSPasteboardItem
INSPopover
A trait containing all the methods for NSPopover
INSResponder
A trait containing all the methods for NSResponder
INSRunningApplication
A trait containing all the methods for NSRunningApplication
INSScreen
A trait containing all the methods for NSScreen
INSStatusBar
A trait containing all the methods for NSStatusBar
INSStatusBarButton
A trait containing all the methods for NSStatusBarButton
INSStatusItem
A trait containing all the methods for NSStatusItem
INSStoryboard
An encapsulation of the design-time view controller and window controller graph represented in an Interface Builder storyboard resource file.
INSTextField
A trait containing all the methods for NSTextField
INSView
A trait containing all the methods for NSView
INSViewController
A trait containing all the methods for NSViewController
INSWindow
A window that an app displays on the screen.
PNSApplicationDelegate
A set of methods that manage your app’s life cycle and its interaction with common system services.

Functions§

NSApplicationMain
Called by the main function to create and run the application.
NSBitsPerPixelFromDepth
Returns the bits per pixel for the specified window depth.
NSBitsPerSampleFromDepth
Returns the bits per sample for the specified window depth.
NSColorSpaceFromDepth
Returns the name of the color space corresponding to the passed window depth.
NSNumberOfColorComponents
Returns the number of color components in the specified color space.
NSPlanarFromDepth
Returns whether the specified window depth is planar.
register_app_delegate_class
Registers an NSObject application delegate, and configures it for the various callbacks and pointers we need to have.

Type Aliases§

NSColorSpaceName
Constants that specify color space names.
NSDeviceDescriptionKey
These constants are the keys for device description dictionaries.
NSImageName
Named images, defined by the system or you, for use in your app.
NSModalResponse
A set of button return values for modal dialogs.
NSNibName
NSPasteboardName
Constants that represent the standard pasteboard names.
NSPasteboardReadingOptionKey
Options for reading pasteboard data.
NSPasteboardType
NSPasteboardTypeFindPanelSearchOptionKey
Search options for the find panel.
NSPasteboardTypeTextFinderOptionKey
Search options for text in Finder.
NSPopoverCloseReasonValue
Values that specify the reason for the NSPopoverWillCloseNotification notification.
NSStoryboardName
The name of the storyboard file.
NSWindowFrameAutosaveName
The type of a window’s frame autosave name.
NSWindowLevel
The standard window levels in macOS.
NSWindowPersistableFrameDescriptor
The type of a window’s frame descriptor.

Attribute Macros§

ns_application_main