euv_core/scene/kind/struct.rs
1use super::*;
2
3/// Decoded RGBA8 image buffer rendered uniformly by software and hardware backends.
4#[derive(Clone, Debug, Default, Getter)]
5pub struct ImageBuffer {
6 /// Monotonic unique identifier assigned on construction for O(1) texture caching.
7 #[get(type(copy))]
8 pub(crate) id: u64,
9 /// Image width in pixels.
10 #[get(type(copy))]
11 pub(crate) width: u32,
12 /// Image height in pixels.
13 #[get(type(copy))]
14 pub(crate) height: u32,
15 /// Shared zero-copy packed RGBA8 pixel bytes (`width * height * 4`).
16 #[get(skip)]
17 pub(crate) pixels: Arc<[u8]>,
18}
19
20/// Interactive text input state stored on `NodeKind::Input`.
21#[derive(Clone, Data, Debug, Default, Eq, New, PartialEq)]
22pub struct InputNodeState {
23 /// Current UTF-8 value entered by the user.
24 pub(crate) value: String,
25 /// Placeholder text displayed when `value` is empty.
26 pub(crate) placeholder: String,
27 /// Byte offset of the caret inside `value`.
28 #[get(type(copy))]
29 pub(crate) caret: usize,
30 /// Whether characters should be masked as a password field.
31 #[get(type(copy))]
32 pub(crate) password: bool,
33 /// Whether multi-line input is enabled.
34 #[get(type(copy))]
35 pub(crate) multiline: bool,
36 /// Whether input is disabled.
37 #[get(type(copy))]
38 pub(crate) disabled: bool,
39}