wiard

Crates.iowiard
lib.rswiard
version0.3.1
sourcesrc
created_at2023-11-17 07:55:32.888273
updated_at2024-10-25 09:32:00.026615
descriptionWindow handling library for Windows in Rust
homepage
repositoryhttps://github.com/btanno/wiard
max_upload_size
id1038801
size165,684
(btanno)

documentation

README

wiard

Window handling library for Windows in Rust

Simple examples

sync version

fn main() {
    let mut event_rx = wiard::EventReceiver::new();
    let _window = wiard::Window::builder(&event_rx)
        .build()
        .unwrap();
    loop {
        let Some((event, _)) = event_rx.recv() else {
            break;
        };
        println!("{event:?}");
    }
}

async version

#[tokio::main]
async fn main() {
    let mut event_rx = wiard::AsyncEventReceiver::new();
    let _window = wiard::Window::builder(&event_rx)
        .await
        .unwrap();
    loop {
        let Some((event, _)) = event_rx.recv().await else {
            break;
        };
        println!("{event:?}");
    }
}

License

This library is licensed under the MIT license.

Commit count: 40

cargo fmt