plat/apple_disp.rs (Apple)#
Source: lib/plat/apple_disp.rs
apple_disp -- what macOS and iOS share of the window-level API (home, drives, printing, the file
dialog, opening URLs and folders, starting this program again), and what iOS's host path leaves
to the platform (docs/APPLE.md AP5: the windows are web_windows.rs's in the canvas of
apple_ios.rs; wait() for programs without the host, the clipboard until AP5b, the theme).
macOS's windows: apple_mac.rs.
fn home() -> Option<String>$HOME (or "/") [plat_home]fn drives() -> Vec<String>the root "/" [plat_drives]fn print(job: &mut crate::PrintJob<'_>) -> i32printing as linux_print.rs checks it: the manifest, a job without pixels (ERR_DIMS), the test variant jfgui_PRINT_TO=FILE (the PDF into a file); macOS: the system's print dialog (apple_mac_app.rs print_dialog); iOS: ERR_UNSUPPORTED before AP5fn open_folder(path: &str) -> i32show a folder / a file in the Finder -> 0 / -1 [plat_open_folder]. A plain folder opens; a file or a package (a folder with an extension: Name.app, .bundle ...) is only shown, selected in its folder (open -R):openalone would start an app or a .command scriptfn open_url(url: &str) -> i32a web page in the default application (iOS: UIApplication openURL) -> 0 / -1 [plat_open_url]fn spawn_self(args: &[&str]) -> i32start this program again, on its own (process.rs launch: a session of its own, standard handles on /dev/null), with the arguments (at most 31) -> 0 / -1 [plat_spawn_self]; iOS: -1fn restart_self(args: &[&str]) -> i32like spawn_self: the program file now at this process's path (an update replaced it) -> 0 / -1