Handle basic macOS window events.
Required:
- Window close -> NSApplication terminate
- Window resize -> redraw (setNeedsDisplay: on content view)
- Key events: keyDown: override on NSView or NSWindow, log key to stdout
- Mouse events: mouseDown:, mouseMoved:, mouseUp: — log coordinates to stdout
Implementation:
- NSWindowDelegate protocol for windowShouldClose: / windowWillClose:
- Override acceptsFirstResponder, keyDown:, mouseDown: etc on custom NSView
Acceptance criteria:
- Closing window exits cleanly
- Resizing redraws the colored rectangle at new size
- Key presses and mouse clicks logged to terminal
Depends on: Core Graphics rendering surface