witas 0.11.2

An asynchronous window library in Rust for Windows
Documentation
#[tokio::main]
async fn main() {
    let mut rx = witas::EventReceiver::new();
    let window = witas::Window::builder()
        .title("witas cursor")
        .inner_size(witas::LogicalSize::new(640, 480))
        .set_receiver(&rx)
        .await
        .unwrap();
    loop {
        let (event, _) = rx.recv().await;
        match event {
            witas::Event::CharInput(input) => {
                let cursor = match input.c {
                    'd' => witas::Cursor::Arrow,
                    'h' => witas::Cursor::Hand,
                    'i' => witas::Cursor::IBeam,
                    'w' => witas::Cursor::Wait,
                    _ => continue,
                };
                window.set_cursor(cursor);
            }
            witas::Event::Closed => break,
            _ => {}
        }
    }
}