module pkg::alloy::window::appkitsource
The window on macOS, through AppKit (PLAN.md, F7): the
frameworks open while running and every call is an Objective-C message
(objc.alloy). AppKit's own loop runs ([NSApp run], F7 question 2A)
and calls the program back through classes made here: AlloyView, the
window's content, takes the mouse, the keyboard, input methods (as an
NSTextInputClient), the Edit menu's commands, drops and the cursor, and
answers VoiceOver (nsaccessibility.alloy); AlloyWindowDelegate the
window's closing, resizing, scale and focus; AlloyApplicationDelegate
the application's quitting. Each method is a block reaching this
module's state through a cell in C's heap, so the classes, made once a
process, serve every window run after. Redraws are paced by a
CVDisplayLink, whose thread signals a run loop source on the main
thread, as a Waker does; frames from the CPU go into the view's layer
as a CGImage. The clipboard is the general NSPasteboard and file
dialogs are NSOpenPanel and NSSavePanel, run modal. macOS 11 or later.