#[macro_use]
extern crate lazy_static;
pub mod event;
pub mod prelude;
pub mod window_adapter;
pub use orbtk_utils::prelude as utils;
pub mod orbclient;
#[cfg(not(target_arch = "wasm32"))]
pub mod native;
pub use orbtk_tinyskia::prelude as render;
use std::{collections::HashMap, sync::mpsc};
#[derive(Clone, Debug, PartialEq)]
pub enum WindowRequest {
ChangeTitle(String),
Close,
Redraw,
}
pub enum ShellRequest<W>
where
W: window_adapter::WindowAdapter,
{
CreateWindow(W, WindowSettings, mpsc::Receiver<WindowRequest>),
None,
}
impl<W> Default for ShellRequest<W>
where
W: window_adapter::WindowAdapter,
{
fn default() -> Self {
ShellRequest::None
}
}
#[derive(Clone, Debug, Default)]
pub struct WindowSettings {
pub always_on_top: bool,
pub borderless: bool,
pub fonts: HashMap<String, &'static [u8]>,
pub position: (f64, f64),
pub resizeable: bool,
pub size: (f64, f64),
pub title: String,
}