Files
terminarandClaude Opus 5.5 5d141c7cef 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>
2026-11-27 23:41:23 +01:00

24 lines
1002 B
C

#ifndef YETANO_WINDOW_DARWIN_H
#define YETANO_WINDOW_DARWIN_H
#include <stdint.h>
void *yt_create(uintptr_t goHandle, const char *title, int width, int height, int debug, const char *scheme,
int hasFrame, int fx, int fy, int fw, int fh, int zoomed);
void yt_add_script(void *h, const char *js);
void yt_navigate(void *h, const char *url);
void yt_eval(void *h, const char *js);
void yt_dispatch(uintptr_t fn);
void yt_run(void);
void yt_stop(void);
void yt_destroy(void *h);
void yt_task_respond(void *h, long tid, int status, const char *headersJSON, const char *url);
void yt_task_data(void *h, long tid, const void *data, int n);
void yt_task_finish(void *h, long tid, const char *err);
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