use super::cell::Row;
use super::grid::{CursorShape, TerminalModes};
use super::style::{Style, StyleId};
pub trait TerminalEmulator {
fn process(&mut self, bytes: &[u8]);
fn resize(&mut self, cols: u16, rows: u16);
fn cols(&self) -> u16;
fn rows(&self) -> u16;
fn visible_rows(&self) -> Box<dyn Iterator<Item = &Row> + '_>;
fn scrollback_rows(&self) -> Box<dyn Iterator<Item = &Row> + '_>;
fn scrollback_len(&self) -> usize;
fn cursor_position(&self) -> (u16, u16);
fn cursor_visible(&self) -> bool;
fn resolve_style(&self, id: StyleId) -> Style;
fn in_alt_screen(&self) -> bool;
fn take_responses(&mut self) -> Vec<Vec<u8>>;
fn title(&self) -> &str;
fn cursor_shape(&self) -> CursorShape;
fn scroll_region(&self) -> (u16, u16);
fn modes(&self) -> &TerminalModes;
fn take_passthrough(&mut self) -> Vec<Vec<u8>>;
fn take_queued_notifications(&mut self) -> Vec<Vec<u8>>;
}
pub trait TerminalRenderer {
type Output;
fn render(&mut self, emulator: &dyn TerminalEmulator, full: bool) -> Self::Output;
}