Crates.io | event_types |
lib.rs | event_types |
version | 0.1.0 |
source | src |
created_at | 2022-07-21 11:20:31.886586 |
updated_at | 2022-07-21 11:20:31.886586 |
description | Types to help idiomatically represent user input events |
homepage | |
repository | https://gitlab.com/reinis-mazeiks/event_types |
max_upload_size | |
id | 629587 |
size | 46,763 |
A library with some types to help idiomatically represent user input events, such as pointer events, wheel events, and keyboard events.
Some conventions are taken from the W3C web specifications, but the data types are re-structured for a nicer Rust API.
The crate knows nothing about event handlers, default behaviors, bubbling, event batching, windows, the web, the DOM, or predictive events. Those are all nice things, but we want this crate to be usable in any GUI framework – so we can't make any assumptions about how you want to handle events, or how you represent your user interface. We merely offer a set of types to build your own event system with.
Does not include all web events. For example, we have no mouse events, since pointer events are more general in that they can work with any type of pointer, including the mouse. This is better in a world where software needs to support a wide range of devices.
euclid
for geometry primitives (such as pointer locations)keyboard-types
for keys & modifiersenumset
for bit sets of pointer buttonstyped-builder
as an ergonomic API for large struct construction