Skip to content

Conversation

@kolkov
Copy link
Contributor

@kolkov kolkov commented Jan 31, 2026

Summary

Add unified pointer and scroll events following W3C Pointer Events Level 3 specification.

This is part of the Event System Refactor for gogpu v0.14.0 (Issue gogpu/gogpu#58).

Changes

New Types

PointerEvent — Unified pointer event (mouse, touch, pen):

  • Full W3C Level 3 compliance
  • PointerID for multi-touch tracking
  • Pressure, tilt, twist for pen/touch
  • Button/Buttons state
  • Modifiers (Shift, Ctrl, Alt, Super)

ScrollEvent — Scroll/wheel events:

  • Pixel, line, and page delta modes
  • Horizontal and vertical scroll

New Interfaces

  • PointerEventSourceOnPointer(func(PointerEvent))
  • ScrollEventSourceOnScrollEvent(func(ScrollEvent))

Test Coverage

  • 36 new tests
  • 90.5% coverage (exceeds 70% target)

Checklist

  • Tests pass
  • Linter clean (0 issues)
  • go fmt applied
  • Documentation complete

- Add PointerEvent with full W3C Pointer Events Level 3 support
- Add ScrollEvent with delta modes (pixel, line, page)
- Add PointerEventSource and ScrollEventSource interfaces
- Add comprehensive tests (36 tests, 90.5% coverage)
- Update package documentation
- Add GitHub Actions CI workflow (build, test, lint, formatting, deps)
- Add golangci-lint v2 configuration
- Fix misspell: TouchCancelled → TouchCanceled (US English)
- Remove unused DeviceHandle alias
@codecov
Copy link

codecov bot commented Jan 31, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

push: only main branch (not feat/**)
pull_request: tests feature branches

This prevents double CI runs when pushing to PR branches.
@kolkov kolkov merged commit dc762fb into main Jan 31, 2026
9 checks passed
@kolkov kolkov deleted the feat/EVENT-003-pointer-events branch January 31, 2026 10:47
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.

2 participants