lib-ui · crate
kinogaki-dialogs
Native file dialogs behind one API: open one file, open several, save, or choose a directory, with file type filters, a starting directory and a suggested name.
- Repository
- lib-ui (kinogaki/lib-ui)
- Folder
libs/lib-ui/crates/dialogs- Source
- 4 files, 736 lines
- Tests
- 0 files, 0 lines
What it is
Native file dialogs behind one API: open one file, open several, save, or choose a directory, with file type filters, a starting directory and a suggested name.
FileDialog::present never blocks the caller's frame loop: on macOS the panel is a sheet on the application's main window (or a modeless panel when FileDialog::detached), on Windows the dialog runs on its own thread, owned by the active window. The answer arrives once, through the done callback (on the main thread on macOS, on the dialog's thread on Windows); a caller stores it and wakes its UI. Linux answers Error::Unsupported until its portal backend is written.
Depends on
None.
Third-party
| Crate | Version | Licence | Frozen in | As | Also used by |
|---|---|---|---|---|---|
block2 | 0.6.2 | MIT | lib-ui/vendor | normal | kinogaki-spectre |
objc2 | 0.6.5 | MIT | lib-ui/vendor | normal | kinogaki-editor, kinogaki-spectre, kinogaki-ui-shell |
objc2-app-kit | 0.3.2 | Zlib OR Apache-2.0 OR MIT | lib-ui/vendor | normal | kinogaki-editor, kinogaki-ui-shell |
objc2-foundation | 0.3.2 | MIT | lib-ui/vendor | normal | kinogaki-shared, kinogaki-spectre, kinogaki-ui-shell |
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-editor | Core and the app | normal | Kinogaki Studio's editor: the document and everything the window shows of it, as parts one frame borrows one by one. |
Modules
macos(private)NSOpenPanel and NSSavePanel.86 linesunsupported(private)Platforms without a dialog backend yet (Linux: the XDG desktop portal's FileChooser is the planned backend).8 lineswindows(private)The Common Item Dialog (IFileOpenDialog / IFileSaveDialog) through COM.416 lines
Public types and traits
At the crate root
Structs FileDialogFilter
Enums ErrorKind
Type aliases Answer
