[][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.

Re-exports

pub use self::event::Event;
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

EventStream

The source of events for a blinds application

GamepadId

A unique ID for a gamepad that persists after the device is unplugged

PointerId

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

GamepadAxis

The stick axes of a gamepad

GamepadButton

A button on a standard (d-pad, 2-stick, 4-button, 4-trigger) gamepad

Key

A key location on a keyboard

MouseButton

A button on a standard 3-button mouse

Functions

run

The entry point for a blinds-based application