euv_core/render/terminal/enum.rs
1use super::*;
2
3/// Output mode controlling whether `TerminalRenderer` emits ANSI TUI diffs or plain UTF-8 CLI text.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum TerminalRenderMode {
6 /// Interactive terminal user interface mode emitting ANSI cursor and style cell-diffs.
7 #[default]
8 InteractiveTui,
9 /// Static CLI plain-text mode emitting clean UTF-8 lines with zero ANSI escape sequences.
10 StaticPlainText,
11}
12
13/// High-level navigation outcome returned by `TerminalRenderer::handle_key`.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
15pub enum TerminalNavAction {
16 /// Keyboard event did not trigger a terminal navigation change.
17 #[default]
18 Ignored,
19 /// Keyboard focus moved to a new focusable scene node.
20 FocusMoved(NodeId),
21 /// Active scroll container offset changed via arrow navigation.
22 Scrolled(i16),
23 /// Currently focused interactive control was activated via Enter.
24 Activated(NodeId),
25 /// User requested graceful exit via Escape or Ctrl+C.
26 ExitRequested,
27}
28
29/// Write outcome returned by batched TUI writer flushes and piped static CLI output helpers.
30#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
31pub enum CliWriteStatus {
32 /// Output payload was written and flushed completely.
33 #[default]
34 Written,
35 /// Downstream pipe closed cleanly (`BrokenPipe`); caller should exit gracefully without panicking.
36 BrokenPipe,
37 /// Another I/O write or flush error occurred; double-buffer swap was withheld and next frame will full-sync.
38 IoError,
39}