1mod cells;
4pub mod clipboard;
5mod detect;
6mod notify;
7mod pixels;
8mod probe;
9
10pub use cells::CellBackend;
11pub use detect::{background, detect};
12pub use notify::{Notice, sequence as notification, terminal_names};
13pub use pixels::{Bleed, DEFAULT_QUOTA, PixelBackend, Placement, Smooth, row_key};
14pub use probe::{Env, Multiplexer, Tier, select_tier};
15
16use std::io::{self, Write};
17use std::time::{Duration, Instant};
18
19use cellix_render::{Grid, Rect};
20
21pub trait Backend {
23 fn present(&mut self, grid: &Grid, out: &mut dyn Write) -> io::Result<()>;
24
25 fn scroll(
30 &mut self,
31 _from: &Grid,
32 _to: &Grid,
33 _area: Rect,
34 _rows: i32,
35 _out: &mut dyn Write,
36 ) -> io::Result<()> {
37 Ok(())
38 }
39
40 fn gliding(&self) -> Option<Duration> {
42 None
43 }
44
45 fn glide(&mut self, _now: Instant, _out: &mut dyn Write) -> io::Result<()> {
47 Ok(())
48 }
49
50 fn settle(&mut self) {}
52
53 fn invalidate(&mut self);
55}