This repository has been archived on 2025-05-11. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
FastWave2.0/shared/src/lib.rs
2024-11-25 22:13:55 +01:00

45 lines
979 B
Rust

use moonlight::*;
mod var_format;
pub use var_format::VarFormat;
mod signal_to_timeline;
pub use signal_to_timeline::signal_to_timeline;
pub mod wellen_helpers;
#[derive(Serialize, Deserialize, Debug, Default)]
#[serde(crate = "serde")]
pub struct Timeline {
pub blocks: Vec<TimelineBlock>,
}
#[derive(Serialize, Deserialize, Debug, Default)]
#[serde(crate = "serde")]
pub struct TimelineBlock {
pub x: i32,
pub width: u32,
pub height: u32,
pub label: Option<TimeLineBlockLabel>,
}
#[derive(Serialize, Deserialize, Debug, Default)]
#[serde(crate = "serde")]
pub struct TimeLineBlockLabel {
pub text: String,
pub x: u32,
pub y: u32,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(crate = "serde")]
pub enum DiagramConnectorMessage {
ListenForComponentTextChanges {
diagram_connector_name: String,
component_id: String,
},
SetComponentText {
component_id: String,
text: String,
},
}