This commit is contained in:
Martin Kavík 2024-06-01 19:39:19 +02:00
parent 645e03ea86
commit ea38f61058
14 changed files with 123 additions and 19 deletions

33
frontend/src/platform.rs Normal file
View file

@ -0,0 +1,33 @@
#[cfg(feature = "platform_tauri")]
mod tauri;
#[cfg(feature = "platform_tauri")]
use tauri as platform;
#[cfg(feature = "platform_browser")]
mod browser;
#[cfg(feature = "platform_browser")]
use browser as platform;
pub async fn show_window() {
platform::show_window().await
}
pub async fn load_waveform(test_file_name: &'static str) {
platform::load_waveform(test_file_name).await
}
pub async fn get_hierarchy() -> wellen::Hierarchy {
platform::get_hierarchy().await
}
pub async fn get_time_table() -> wellen::TimeTable {
platform::get_time_table().await
}
pub async fn load_and_get_signal(signal_ref: wellen::SignalRef) -> wellen::Signal {
platform::load_and_get_signal(signal_ref).await
}
pub async fn unload_signal(signal_ref: wellen::SignalRef) {
platform::unload_signal(signal_ref).await
}