1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! What the renderer hands back, and when it is worth drawing at all.
use crate::*;
/// Mouse hit rects, written by the renderer and read only by `handle_mouse`.
///
/// Output only: nothing here is threaded frame-to-frame, and every rect is
/// (re)set or cleared on the frame that draws the thing it belongs to. The one
/// exception is `scroll_len`, which is written with `scroll` but not cleared
/// alongside it — reading it is only sound because `handle_mouse` checks
/// `scroll` is `Some` first.
pub
/// Everything the renderer writes, kept out of `App` so every render function
/// can take `&App`.
pub
/// What the album art box owes the next frame.
///
/// `ratatui-image` puts the whole image in one cell's symbol and marks the rest
/// of the box `Skip`, which the diff never touches again — so leftovers stay,
/// and a re-encode is byte-identical for sixel and iTerm2 and gets discarded.
/// Blanking the box for one frame is the only change the diff will emit, and it
/// makes the image that follows one too.
pub
/// Ceiling on the redraw rate: one frame per ~60Hz terminal refresh.
pub const MIN_FRAME: Duration = from_millis;
/// Redraw rate while the visualizer or a theme fade is running.
pub const ANIM_FRAME: Duration = from_millis;
/// Redraw rate when nothing changed — enough to keep the clock and progress bar
/// honest without repainting an identical frame 60 times a second.
pub const IDLE_REDRAW: Duration = from_millis;
/// How often the live queue is re-fetched and the session persisted.
pub const SYNC_EVERY: Duration = from_secs;
/// Whether this frame is worth drawing.
///
/// Input beats animation beats the idle clock. Smoothness of the recolour comes
/// from its duration, not from the frame rate: every present makes the terminal
/// recompose the viewport, and the inline cover shimmers if that happens 60
/// times a second.
pub