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