use std::sync::OnceLock;
pub type StateFlags = u16;
pub const SF_VISIBLE: StateFlags = 0x001;
pub const SF_CURSOR_VIS: StateFlags = 0x002;
pub const SF_CURSOR_INS: StateFlags = 0x004;
pub const SF_SHADOW: StateFlags = 0x008;
pub const SF_ACTIVE: StateFlags = 0x010;
pub const SF_SELECTED: StateFlags = 0x020;
pub const SF_FOCUSED: StateFlags = 0x040;
pub const SF_DRAGGING: StateFlags = 0x080;
pub const SF_DISABLED: StateFlags = 0x100;
pub const SF_MODAL: StateFlags = 0x200;
pub const SF_DEFAULT: StateFlags = 0x400;
pub const SF_EXPOSED: StateFlags = 0x800;
pub const SF_CLOSED: StateFlags = 0x1000; pub const SF_RESIZING: StateFlags = 0x2000;
pub const OF_SELECTABLE: u16 = 0x001;
pub const OF_TOP_SELECT: u16 = 0x002;
pub const OF_FIRST_CLICK: u16 = 0x004;
pub const OF_FRAMED: u16 = 0x008;
pub const OF_PRE_PROCESS: u16 = 0x010;
pub const OF_POST_PROCESS: u16 = 0x020;
pub const OF_BUFFERED: u16 = 0x040;
pub const OF_TILEABLE: u16 = 0x080;
pub const OF_CENTER_X: u16 = 0x100;
pub const OF_CENTER_Y: u16 = 0x200;
pub const OF_CENTERED: u16 = 0x300;
pub const OF_VALIDATE: u16 = 0x400;
static SHADOW_SIZE_CELL: OnceLock<(i16, i16)> = OnceLock::new();
#[inline]
pub fn shadow_size() -> (i16, i16) {
*SHADOW_SIZE_CELL.get_or_init(|| {
crate::terminal::Terminal::query_cell_aspect_ratio()
})
}
pub const SHADOW_SIZE: (i16, i16) = (2, 1);
pub const SHADOW_ATTR: u8 = 0x08;
pub const SHADOW_BOTTOM: char = '▄'; pub const SHADOW_SOLID: char = '█'; pub const SHADOW_TOP: char = '▀';