use crate::clipboard::Clipboard;
use crate::platform::application as platform;
pub trait AppHandler {
#[allow(unused_variables)]
fn command(&mut self, id: u32) {}
}
pub struct Application(platform::Application);
impl Application {
pub fn new(handler: Option<Box<dyn AppHandler>>) -> Application {
Application(platform::Application::new(handler))
}
pub fn run(&mut self) {
self.0.run()
}
pub fn quit() {
platform::Application::quit()
}
pub fn hide() {
#[cfg(all(target_os = "macos", not(feature = "use_gtk")))]
platform::Application::hide()
}
pub fn hide_others() {
#[cfg(all(target_os = "macos", not(feature = "use_gtk")))]
platform::Application::hide_others()
}
pub fn clipboard() -> Clipboard {
platform::Application::clipboard().into()
}
pub fn get_locale() -> String {
platform::Application::get_locale()
}
}