#[cfg(target_os = "windows")] mod windows; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "macos")] mod macos; use std::sync::mpsc::Sender; use crate::event::Event; use std::sync::Arc; pub trait Context { fn eventloop(&self); } // MAC IMPLEMENTATION #[cfg(target_os = "macos")] pub fn new(send_channel: Sender) -> Box { // TODO macos::MacUIManager::new() } // LINUX IMPLEMENTATION #[cfg(target_os = "linux")] pub fn new(send_channel: Sender) -> Box { // TODO let manager = linux::LinuxUIManager{}; manager.initialize(); manager } // WINDOWS IMPLEMENTATION #[cfg(target_os = "windows")] pub fn new(send_channel: Sender) -> Box { windows::WindowsContext::new(send_channel) }