#[cfg(feature = "tauri")]
extern crate tauri;
#[cfg(feature = "tauri")]
mod structs;
#[cfg(feature = "tauri")]
mod with_progress;
use std::path::Path;
#[cfg(feature = "tauri")]
pub fn parse_game_raws_with_tauri_emit<P: AsRef<Path>>(
df_game_path: &P,
window: tauri::Window,
) -> String {
let mut progress_helper = structs::ProgressHelper::with_tauri_window(window);
progress_helper.update_current_task("Parsing all raws in dwarf fortress directory.");
let result = with_progress::parse_game_raws(df_game_path, &mut progress_helper);
progress_helper.send_final("Parsing completed.");
result
}
#[cfg(feature = "tauri")]
pub fn parse_location_with_tauri_emit<P: AsRef<Path>>(
raw_module_location: &P,
window: tauri::Window,
) -> String {
let mut progress_helper = structs::ProgressHelper::with_tauri_window(window);
progress_helper.update_current_task("Parsing all raws in a single location.");
let result = with_progress::parse_location(raw_module_location, &mut progress_helper);
progress_helper.send_final("Parsing completed.");
result
}