Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: endoli/ui-events

v0.2.0

28 Oct 04:19
b0a9b31

Choose a tag to compare

Crate Crates.io Docs
ui-events Crates.io Docs
ui-events-winit Crates.io Docs
ui-input-state Crates.io Docs

This release has an MSRV of 1.82.


Overview

ui-events v0.2.0 is a major overhaul to the ergonomics of event handling (particularly handling scale).
It also debuts the new ui-input-state crate, providing reusable keyboard and pointer state tracking.

This release includes contributions from five developers, with three newcomers @nicoburns, @arthur-fontaine, and @jrmoulton.
Thank you for your help!


Highlights

  • New crate: ui-input-state — initial release, providing KeyboardState, PrimaryPointerState, which provide useful stateful information about inputs.
  • Pointer gestures: Added pinch and rotate gesture support via PointerGesture and PointerGestureEvent.
  • Scale factor support: PointerState now carries the scale factor, for easy translation.
  • Performance improvements: Reduced allocations and simplified event data structures.
  • Better consistency and ergonomics: Pointer event variants refactored for clarity and flexibility.
  • Platform improvements: ui-events-winit now does scale-aware tap/click counting.

Crate-by-Crate Details

ui-events 0.2.0

Added

  • is_primary_pointer method to PointerId, PointerInfo, PointerUpdate, and PointerEvent. (#54)
  • PointerGesture and PointerGestureEvent types, with new Gesture event variant. (#80)
  • scale_factor field to EventState for logical/device pixel conversion. (#82)
    • Optional kurbo integration via Cargo feature for kurbo::Point conversion helpers.

Changed

  • Refactored PointerEvent struct variants (Down, Up, Scroll) into distinct structs for clarity. (#63)

ui-events-winit 0.2.0

Added

  • PointerGesture and PointerGestureEvent integration for winit-based platforms. (#80)
  • scale_factor parameter in WindowEventReducer::reduce, improving tap/click counting across display scales. (#78)

Changed

  • Converted PointerEvent struct variants into separate structs. (#63)
  • Reduced allocations in TapCounter for better performance. (#61)

ui-input-state 0.2.0

Initial release

  • KeyboardState for key tracking.
    • key_str_down variants for Key::Character matching without allocation. (#84)
  • PrimaryPointerState for tracking button state, and positions/motion (#83).

Contributors


Links

Full Changelog: v0.1.0 → v0.2.0