Skip to content

release: v0.23.0 — InputEvent sealed interface (ADR-058) - #23

Merged
kolkov merged 2 commits into
mainfrom
feat/input-event
Jul 30, 2026
Merged

release: v0.23.0 — InputEvent sealed interface (ADR-058)#23
kolkov merged 2 commits into
mainfrom
feat/input-event

Conversation

@kolkov

@kolkov kolkov commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[0.23.0] - 2026-07-30

Added

  • InputEvent sealed interface (ADR-058) — unified event type for SDL-style event queue. Sealed via unexported inputEventTag() marker. Enables exhaustive type switch handling.
  • KeyEvent struct — keyboard key state change (Key, Modifiers, Pressed)
  • CharEvent struct — committed text input (Char rune)
  • FocusEvent struct — window focus state change (Focused bool)
  • ResizeEvent struct — window content area size change (Width, Height in logical DIP)
  • PointerEvent and ScrollEvent now implement InputEvent interface
  • 8 test cases covering interface satisfaction, type switch, field access

Enterprise research: Qt6, SDL3, winit, Flutter, Bevy, Gio, Ebiten — 7 frameworks analyzed.

kolkov added 2 commits July 30, 2026 09:46
…ResizeEvent (ADR-058)

Sealed InputEvent interface with inputEventTag() marker — only gpucontext
types implement it. Enables exhaustive handling via linters.

New types: KeyEvent (Key + Mods + Pressed), CharEvent (Char rune),
FocusEvent (Focused bool), ResizeEvent (Width, Height int).

Existing types PointerEvent and ScrollEvent gain inputEventTag() method.

Total: 6 event types for SDL-style PollInputEvent queue (ADR-058).
8 test cases covering interface satisfaction, type switch, field access.
@kolkov
kolkov merged commit 8b27d11 into main Jul 30, 2026
9 checks passed
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
input_event.go 0.00% 4 Missing ⚠️
pointer.go 0.00% 1 Missing ⚠️
scroll.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant