Expand description
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.
Re-exports§
pub use self::event::Event;pub use self::event::GamepadAxis;pub use self::event::GamepadButton;pub use self::event::GamepadId;pub use self::event::Key;pub use self::event::MouseButton;pub use self::event::PointerId;pub use self::event_cache::CachedEventStream;pub use self::event_cache::EventCache;
Modules§
- event
- event_
cache - An optional module to store the current state of input devices
Structs§
- Event
Stream - The source of events for a
blindsapplication - Settings
- The various options to pass to the Window and/or GL context
- Window
- The Window for your blinds application
Enums§
- Cursor
Icon - The options for the cursor icon
Functions§
- run
- The entry point for a blinds-based application