par_term/app/
render_cache.rs1use crate::cell_renderer::Cell;
2use crate::selection::Selection;
3
4pub struct RenderCache {
6 pub cells: Option<Vec<Cell>>, pub generation: u64, pub scroll_offset: usize, pub cursor_pos: Option<(usize, usize)>, pub selection: Option<Selection>, pub applied_opacity: f32, pub terminal_title: String, pub scrollback_len: usize, }
15
16impl RenderCache {
17 pub fn new(initial_opacity: f32) -> Self {
18 Self {
19 cells: None,
20 generation: 0,
21 scroll_offset: 0,
22 cursor_pos: None,
23 selection: None,
24 applied_opacity: initial_opacity,
25 terminal_title: String::new(),
26 scrollback_len: 0,
27 }
28 }
29}