#[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, _ => {} } } }