Skip to main content

oa/viewer/
type.gen.rs

1// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
2// schema=viewer_types.json schema_version=1 generator_version=64
3// schema_sha256=7b66a5ca49a2ff27bb49beb310d9c0bd0860c479355149347004ce3e676c1452
4use super::config::{ViewerAudioView, ViewerCanvasBackground, ViewerMode};
5use crate::input::{Key, MotionSpeed};
6use crate::ui::UiStyle;
7#[derive(Clone, Debug)]
8pub struct ViewerConfig {
9	pub mode: ViewerMode,
10	pub path: String,
11	pub title: String,
12	pub width: u32,
13	pub height: u32,
14	pub style: UiStyle,
15	pub motion_speed: MotionSpeed,
16	pub show_help: bool,
17	pub show_stats: bool,
18	pub show_timeline: bool,
19	pub vsync: bool,
20	pub loop_media: bool,
21	pub start_playing: bool,
22	pub auto_hide_controls: bool,
23	pub controls_hide_delay_ms: u32,
24	pub canvas_background: ViewerCanvasBackground,
25	pub show_canvas_grid: bool,
26	pub audio_view: ViewerAudioView,
27	pub audio_waveform_bins: u32,
28	pub audio_analysis_frames: u32,
29	pub audio_fft_size: u32,
30	pub audio_hop_size: u32,
31	pub audio_mel_bins: u32,
32	pub audio_ring_ms: u32,
33	pub key_quit: Key,
34	pub key_quit_q: Key,
35	pub key_red: Key,
36	pub key_green: Key,
37	pub key_blue: Key,
38	pub key_alpha: Key,
39	pub key_rgb: Key,
40	pub key_zoom_in: Key,
41	pub key_zoom_out: Key,
42	pub key_zoom_fit: Key,
43	pub key_zoom_100: Key,
44	pub key_canvas_background: Key,
45	pub key_canvas_grid: Key,
46}
47
48#[derive(Clone, Copy, Debug, Default)]
49pub struct ViewerLiveCapabilities {
50	/// Source requests raw platform events before Viewer focus/popup ownership.
51	pub receives_events: bool,
52	/// Source publishes a GPU-dependency event for its rendered resources.
53	pub publishes_render_dependency: bool,
54	/// Source wants the exact Viewer submission event after each present.
55	pub retains_consumer_completion: bool,
56}
57
58#[derive(Clone, Debug)]
59pub struct TrainingViewerConfig {
60	/// Window title shown in the header card.
61	pub title: String,
62	/// Samples retained per metric series (minimum 2).
63	pub history_capacity: u32,
64	/// Maximum distinct metric cards (clamped to 1..=12).
65	pub max_metric_plots: u32,
66	/// Append per-step GPU milliseconds to the series list.
67	pub show_gpu_timing: bool,
68	/// Append per-step wall-clock milliseconds to the series list.
69	pub show_wall_timing: bool,
70	/// Show the published preview texture panel.
71	pub show_preview: bool,
72}