mod cells;
pub mod clipboard;
mod detect;
mod files;
mod notify;
mod pixels;
mod probe;
pub mod replies;
pub use cells::{CURSOR_DEFAULT, CellBackend, cursor_styled};
pub use detect::{background, background_in, cell_size, detect};
pub use files::TileFiles;
pub use notify::{Notice, sequence as notification, terminal_names};
pub use pixels::{Bleed, DEFAULT_QUOTA, OwnRows, PixelBackend, Placement, Smooth, row_key};
pub use probe::{Env, Multiplexer, Tier, select_tier};
pub use replies::{Replies, owed};
use std::io::{self, Write};
use std::time::{Duration, Instant};
use cellix_render::{Grid, Rect};
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub struct Work {
pub tiles: u64,
pub rows: u64,
}
pub trait Backend {
fn present(&mut self, grid: &Grid, out: &mut dyn Write) -> io::Result<()>;
fn scroll(
&mut self,
_from: &Grid,
_to: &Grid,
_area: Rect,
_rows: i32,
_out: &mut dyn Write,
) -> io::Result<()> {
Ok(())
}
fn gliding(&self) -> Option<Duration> {
None
}
fn glide(&mut self, _now: Instant, _out: &mut dyn Write) -> io::Result<()> {
Ok(())
}
fn settle(&mut self) {}
fn invalidate(&mut self);
fn set_lines(&mut self, _lines: u16) {}
fn foot_drops(&self, _rows: u16, _foot: u16) -> Vec<usize> {
Vec::new()
}
fn take_work(&mut self) -> Work {
Work::default()
}
}