use std::{sync::mpsc::Receiver}; #[cfg_attr(unix, path = "linux/mod.rs")] #[cfg_attr(windows, path = "windows/mod.rs")] #[cfg_attr(mac, path = "windows/mod.rs")] pub mod platform_impl; #[derive(Debug, Clone, Copy)] pub struct Bounds { pub x: i32, pub y: i32, pub width: i32, pub height: i32, } #[derive(Debug, Clone, Copy)] pub enum UnderlayEvent { Attach { bounds: Bounds, has_access: bool, is_fullscreen: Option, }, Detach, MoveResize(Bounds), Focus, Blur, X11FullscreenEvent{ is_fullscreen: bool } } pub fn register>(window_title: T) -> Receiver { let (tx,rx) = std::sync::mpsc::channel(); platform_impl::init(window_title.into(), tx).expect("Catastrophe"); return rx; }