winit 0.30.13 (https://github.com/rust-windowing/winit) with the additions the Tilo SDK uses: synthetic key events, Wayland drag sources and swipe gestures, a macOS quit request. Tilo's fork; see TILO-FORK.md.
usestd::cell::RefCell;usestd::ops::Deref;usestd::task::Waker;#[derive(Debug)]pubstructAtomicWaker(RefCell<Option<Waker>>);implAtomicWaker{pubconstfnnew()->Self{Self(RefCell::new(None))}pubfnregister(&self, waker:&Waker){letmut this =self.0.borrow_mut();ifletSome(old_waker)= this.deref(){if old_waker.will_wake(waker){return;}}*this =Some(waker.clone());}pubfnwake(&self){ifletSome(waker)=self.0.borrow_mut().take(){
waker.wake();}}}// SAFETY: Wasm without the `atomics` target feature is single-threaded.
unsafeimplSend forAtomicWaker{}// SAFETY: Wasm without the `atomics` target feature is single-threaded.
unsafeimplSync forAtomicWaker{}