use {
super::layer::{OverlayConstraints, WindowPlacement, ZOrder},
crate::{Rect, WindowId},
};
#[derive(Debug, Clone)]
pub struct OverlayWindow {
pub id: WindowId,
pub constraints: OverlayConstraints,
pub computed_bounds: Rect,
pub z_order: ZOrder,
}
pub trait OverlayLayer: Send + Sync {
fn arrange(&self, screen: Rect, window_placements: &[WindowPlacement]) -> Vec<WindowPlacement>;
fn show(&mut self, id: WindowId, constraints: OverlayConstraints);
fn hide(&mut self, id: WindowId) -> bool;
fn update_size(&mut self, id: WindowId, width: u16, height: u16);
fn is_visible(&self, id: WindowId) -> bool;
fn visible_overlays(&self) -> Vec<WindowId>;
fn hide_all(&mut self);
}
#[cfg(test)]
#[path = "overlay_tests.rs"]
mod tests;