appkit
only.Expand description
This module implements the core components necessary for making a well-formed macOS application. These components are ones that are uniquely macOS-specific, and don’t have a true equivalent on iOS and tvOS as the interaction patterns are significantly different.
The coverage here is not exhaustive, but should be sufficient enough for relatively complex
applications. For examples, check the examples
folder in the repository.
Modules
Module hoisting.
Implements types used for printing (both configuring print jobs, as well as the act of printing itself).
Implements an NSToolbar, which is one of those macOS niceties that makes it feel… “proper”.
Wraps NSWindow
on macOS and UIWindow
on iOS.
Structs
Represents an NSAlert
. Has no information other than the retained pointer to the Objective C
side, so… don’t bother inspecting this.
A very, very basic wrapper around NSAnimationContext. 100% subject to change.
A wrapper for NSApplication
in AppKit/Cocoa, and UIApplication
in UIKit/Cocoa Touch.
A wrapper around NSCursor.
A wrapper over an NSEvent
.
A wrapper over an NSEvent
.
Enums
Used for responding to open/print/copy requests.
You only really need this for calling App::reply_to_open_or_print()
.
The name is unfortunate, but it covers a variety of things, and by keeping it closer to the
NSApplication
documentation it may help some poor soul who needs to find information about
it.
Represents a type of cursor that you can associate with mouse movement. @TODO: Loading?
An EventMask describes the type of event.
Used to set whether and/or how a view or cell draws a focus ring.
Used (typically) when handling full-screening an application or window. Use these to instruct how the full screen should work. Note that some may conflict!
Used for determining how an application should handle quitting/terminating.
You return this in your AppController
should_terminate
method.
Traits
AppDelegate
is more or less NSApplicationDelegate
from the Objective-C/Swift side, just named
differently to fit in with the general naming scheme found within this framework. You can
implement methods from this trait in order to respond to lifecycle events that the system will
fire off.