use super::*;
#[derive(Clone, Copy, Data, Debug, Eq, Hash, PartialEq)]
pub struct TerminalCell {
#[get(type(copy))]
pub(crate) ch: char,
#[get(type(copy))]
pub(crate) width: u8,
#[get(skip)]
pub(crate) fg: Option<Color>,
#[get(skip)]
pub(crate) bg: Option<Color>,
#[get(type(copy))]
pub(crate) bold: bool,
#[get(type(copy))]
pub(crate) reverse: bool,
#[get(type(copy))]
pub(crate) underline: bool,
}
#[derive(Clone, Data, Debug, Default, Eq, PartialEq)]
pub struct TerminalCellGrid {
#[get(type(copy))]
pub(crate) cols: u16,
#[get(type(copy))]
pub(crate) rows: u16,
pub(crate) cells: Vec<TerminalCell>,
}
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, PartialEq)]
pub struct TerminalDiffStats {
#[get(type(copy))]
pub(crate) total_cells: usize,
#[get(type(copy))]
pub(crate) changed_cells: usize,
#[get(type(copy))]
pub(crate) output_bytes: usize,
#[get(type(copy))]
pub(crate) is_idle: bool,
#[get(type(copy))]
pub(crate) full_sync: bool,
}
#[derive(CustomDebug, Data)]
pub struct TerminalSessionGuard {
#[get(type(copy))]
pub(crate) alt_screen: bool,
#[get(type(copy))]
pub(crate) cursor_hidden: bool,
#[get(type(copy))]
pub(crate) raw_mode: bool,
#[get(type(copy))]
pub(crate) restored: bool,
#[get(type(copy))]
pub(crate) write_to_stdout: bool,
#[debug(skip)]
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) sink: Option<Rc<RefCell<String>>>,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct TerminalRenderer {
#[get(skip)]
pub(crate) previous: Option<TerminalCellGrid>,
pub(crate) current: TerminalCellGrid,
#[get(type(copy))]
pub(crate) last_cols: u16,
#[get(type(copy))]
pub(crate) last_rows: u16,
#[get(type(copy))]
pub(crate) frames_rendered: u64,
#[get(type(copy))]
pub(crate) exit_requested: bool,
}
#[derive(Clone, Copy, Data, Debug, Default, Eq, New, PartialEq)]
pub(crate) struct TerminalRegion {
#[get(type(copy))]
pub(crate) x: u16,
#[get(type(copy))]
pub(crate) width: u16,
#[get(type(copy))]
pub(crate) max_y: u16,
#[get(type(copy))]
pub(crate) focused: Option<NodeId>,
}