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, Eq, Getter, New, PartialEq)]
5pub struct ImageBuffer {
6 /// Image width in pixels.
7 #[get(type(copy))]
8 pub(crate) width: u32,
9 /// Image height in pixels.
10 #[get(type(copy))]
11 pub(crate) height: u32,
12 /// Packed RGBA8 pixel bytes (`width * height * 4`).
13 pub(crate) pixels: Vec<u8>,
14}
15
16/// Interactive text input state stored on `NodeKind::Input`.
17#[derive(Clone, Data, Debug, Default, Eq, New, PartialEq)]
18pub struct InputNodeState {
19 /// Current UTF-8 value entered by the user.
20 pub(crate) value: String,
21 /// Placeholder text displayed when `value` is empty.
22 pub(crate) placeholder: String,
23 /// Byte offset of the caret inside `value`.
24 #[get(type(copy))]
25 pub(crate) caret: usize,
26 /// Whether characters should be masked as a password field.
27 #[get(type(copy))]
28 pub(crate) password: bool,
29 /// Whether multi-line input is enabled.
30 #[get(type(copy))]
31 pub(crate) multiline: bool,
32 /// Whether input is disabled.
33 #[get(type(copy))]
34 pub(crate) disabled: bool,
35}