Skip to main content

windjammer_runtime/platform/native/
dialog.rs

1//! Native dialog implementation
2//!
3//! Uses the rfd crate for native file dialogs.
4
5// For now, provide stub implementations
6// TODO: Add rfd crate and implement properly
7
8pub fn open_file() -> Result<String, String> {
9    Err("Dialog not yet implemented for native platform".to_string())
10}
11
12pub fn open_directory() -> Result<String, String> {
13    Err("Dialog not yet implemented for native platform".to_string())
14}
15
16pub fn save_file() -> Result<String, String> {
17    Err("Dialog not yet implemented for native platform".to_string())
18}
19
20pub fn show_message(title: String, message: String) -> Result<(), String> {
21    println!("[{}] {}", title, message);
22    Ok(())
23}
24
25pub fn show_confirm(title: String, message: String) -> Result<bool, String> {
26    println!("[{}] {}", title, message);
27    println!("(Auto-confirmed for native platform)");
28    Ok(true)
29}