gui/window: native open and save file dialogs

ShowFileDialog (UI thread) and ChooseFile (any goroutine, waits) show a
native dialog for the window -- NSOpenPanel/NSSavePanel as a sheet on
macOS, GetOpenFileNameW/GetSaveFileNameW on Windows -- with a title, a
start folder, a suggested name and allowed extensions. It only returns
the chosen path; one dialog at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-11-27 23:41:23 +01:00
1 parent e1495430c5
commit 5d141c7cef
7 files changed
+284 -2

No files matched your search

+1
View File
@@ -18,5 +18,6 @@ void yt_snapshot(void *h, const char *path);
void yt_set_appearance(void *h, int mode);
void yt_accent_color(char *buf, int n);
void yt_set_app_icon(const void *png, int n);
void yt_file_dialog(void *h, int save, const char *title, const char *dir, const char *name, const char *types);
#endif