use {
super::layer::{WindowPlacement, ZOrder},
crate::{Rect, WindowId},
};
#[derive(Debug, Clone)]
pub struct FloatingWindow {
pub id: WindowId,
pub bounds: Rect,
pub z_order: ZOrder,
}
pub trait FloatingLayer: Send + Sync {
fn arrange(&self) -> Vec<WindowPlacement>;
fn create(&mut self, id: WindowId, bounds: Rect) -> WindowId;
fn close(&mut self, window: WindowId) -> bool;
fn move_to(&mut self, window: WindowId, x: u16, y: u16);
fn resize(&mut self, window: WindowId, width: u16, height: u16);
fn raise(&mut self, window: WindowId);
fn lower(&mut self, window: WindowId);
fn windows(&self) -> Vec<WindowId>;
fn contains(&self, window: WindowId) -> bool;
}
#[cfg(test)]
#[path = "floating_tests.rs"]
mod tests;