sealed_surface/mode.rs
1//! Paint is shared; only the host projection changes.
2
3/// Whether the host may observe cell values as Unicode.
4///
5/// Pixels are glyph-rasterized in both modes so applications can toggle
6/// without swapping widgets.
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
8#[non_exhaustive]
9pub enum SurfaceMode {
10 /// Cell values must not appear in [`crate::HostProjection`] text or clipboard.
11 /// Tooltips are PNG only.
12 #[default]
13 Sealed,
14 /// Host may copy viewport TSV (admin ops). Paint path is unchanged.
15 Copyable,
16}
17
18impl SurfaceMode {
19 /// True when the host is forbidden from emitting cell Unicode.
20 #[must_use]
21 pub const fn is_sealed(self) -> bool {
22 matches!(self, Self::Sealed)
23 }
24}