MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_open_file_dialog

Function bloom_open_file_dialog

native/macos/src/lib.rs:2310–2321  ·  view source on GitHub ↗
(filter_ptr: *const u8, title_ptr: *const u8)

Source from the content-addressed store, hash-verified

2308// E5b: Native file dialogs (via rfd crate)
2309#[no_mangle]
2310pub extern "C" fn bloom_open_file_dialog(filter_ptr: *const u8, title_ptr: *const u8) -> *const u8 {
2311 let filter = str_from_header(filter_ptr);
2312 let title = str_from_header(title_ptr);
2313 let mut dialog = rfd::FileDialog::new().set_title(title);
2314 if !filter.is_empty() {
2315 dialog = dialog.add_filter("Files", &[filter]);
2316 }
2317 match dialog.pick_file() {
2318 Some(path) => alloc_perry_string(&path.to_string_lossy()),
2319 None => alloc_perry_string(""),
2320 }
2321}
2322
2323#[no_mangle]
2324pub extern "C" fn bloom_save_file_dialog(default_name_ptr: *const u8, title_ptr: *const u8) -> *const u8 {

Callers

nothing calls this directly

Calls 2

str_from_headerFunction · 0.85
alloc_perry_stringFunction · 0.50

Tested by

no test coverage detected