A cross platform wrapper for OS dialogs like file save, open, message boxes, inputs, color picking, etc. for V.
Currently tested MacOS, Windows.
Original С-osdialog is released into the public domain (CC0) by AndrewBelt.
V-wrapper is released under Apache License 2.0.
fn file(action Actions, path string, filename string, filters string) string
fn message(level Levels, buttons Buttons, message string) bool
fn prompt(level Levels, message string, text string) string
enum Actions {
open_file = C.OSDIALOG_OPEN
open_dir = C.OSDIALOG_OPEN_DIR
save = C.OSDIALOG_SAVE
}
enum Buttons {
ok = C.OSDIALOG_OK
ok_cancel = C.OSDIALOG_OK_CANCEL
yes_no = C.OSDIALOG_YES_NO
}
enum Levels {
info = C.OSDIALOG_INFO
warning = C.OSDIALOG_WARNING
error = C.OSDIALOG_ERROR
}