Crate witas

source ·
Expand description

An asynchronous window library in Rust for Windows

Example

#[tokio::main]
async fn main() {
    let mut rx = witas::EventReceiver::new();
    let _window = witas::Window::builder()
        .title("witas hello")
        .inner_size(witas::LogicalSize::new(640, 480))
        .set_receiver(&rx)
        .await
        .unwrap();
    loop {
        let (event, _) = rx.recv().await;
        println!("{:?}", event);
        if let witas::Event::Closed = event {
            break;
        }
    }
}

Note

witas use WM_APP. Don’t post directly WM_APP to witas’s UI thread.

Modules

  • Provides file dialogs.
  • Event structures.
  • An IME composition string and a candidate list.
  • Provides raw input data.
  • Provides windows and event receivers.

Structs

Enums

Constants

  • The value is an unit in logical coordinates. The value is 96.

Traits

Functions

Type Aliases