web engine - experimental web browser

Basic event handling #6

open opened by pierrelf.com

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

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mfkgz7mn3v2q