[−][src]Crate blinds
blinds
covers up the details of your windowing for you, by providing an async API.
A quick example of some code that prints all incoming events:
use blinds::{run, Event, EventStream, Key, Settings, Window}; run(Settings::default(), app); async fn app(_window: Window, mut events: EventStream) { loop { while let Some(ev) = events.next_event().await { println!("{:?}", ev); } } }
The core of blinds is run
, which executes your app and provides your Window
and
EventStream
instances.
Structs
EventStream | The source of events for a |
GamepadId | A unique ID for a gamepad that persists after the device is unplugged |
Modifiers | The active keyboard modifiers (shift, ctrl, etc.) when an event was dispatched |
Pointer | A unique ID for multiple mouse pointers |
Settings | The various options to pass to the Window and/or GL context |
Window | The Window for your blinds application |
Enums
CursorIcon | The options for the cursor icon |
ElementState | A button or key's state, either Pressed or Released |
Event | An indicator something has changed or input has been dispatched |
GamepadAxis | The stick axes of a gamepad |
GamepadButton | A button on a standard (d-pad, 2-stick, 4-button, 4-trigger) gamepad |
GamepadEvent | An event generated by a gamepad |
Key | A key location on a keyboard |
MouseButton | A button on a standard 3-button mouse |
MouseScrollDelta | A measure of how much was scrolled in an event |
Functions
run | The entry point for a blinds-based application |