FastWave2.0/shared/src/lib.rs

33 lines
672 B
Rust
Raw Normal View History

2024-06-06 20:04:57 +00:00
use moonlight::*;
2024-06-08 21:51:30 +00:00
mod var_format;
pub use var_format::VarFormat;
2024-06-09 22:27:01 +00:00
mod signal_to_timeline;
pub use signal_to_timeline::signal_to_timeline;
2024-06-01 17:39:19 +00:00
pub mod wellen_helpers;
2024-06-06 20:04:57 +00:00
2024-06-06 20:45:20 +00:00
#[derive(Serialize, Deserialize, Debug, Default)]
2024-06-06 20:04:57 +00:00
#[serde(crate = "serde")]
pub struct Timeline {
2024-06-06 23:44:09 +00:00
pub blocks: Vec<TimelineBlock>,
2024-06-06 20:04:57 +00:00
}
2024-06-06 20:45:20 +00:00
#[derive(Serialize, Deserialize, Debug, Default)]
2024-06-06 20:04:57 +00:00
#[serde(crate = "serde")]
pub struct TimelineBlock {
pub x: u32,
pub width: u32,
2024-06-06 20:45:20 +00:00
pub height: u32,
2024-06-06 20:04:57 +00:00
pub label: Option<TimeLineBlockLabel>,
}
2024-06-06 20:45:20 +00:00
#[derive(Serialize, Deserialize, Debug, Default)]
2024-06-06 20:04:57 +00:00
#[serde(crate = "serde")]
pub struct TimeLineBlockLabel {
pub text: String,
pub x: u32,
pub y: u32,
}