Repository

module v_osdialog

A cross platform wrapper for OS dialogs like file save, open, message boxes, inputs, color picking, etc. for V .

Currently tested MacOS, Windows.

license

Original ะก-osdialog is released into the public domain (CC0) by AndrewBelt .

V -wrapper is released under Apache License 2.0 .

Contents

file

fn file(action Actions, path string, filename string, filters string) string

[Return to contents]

message

fn message(level Levels, buttons Buttons, message string) bool

[Return to contents]

prompt

fn prompt(level Levels, message string, text string) string

[Return to contents]

Actions

enum Actions {
    open_file = C.OSDIALOG_OPEN
    open_dir = C.OSDIALOG_OPEN_DIR
    save = C.OSDIALOG_SAVE
}

[Return to contents]

Buttons

enum Buttons {
    ok = C.OSDIALOG_OK
    ok_cancel = C.OSDIALOG_OK_CANCEL
    yes_no = C.OSDIALOG_YES_NO
}

[Return to contents]

Levels

enum Levels {
    info = C.OSDIALOG_INFO
    warning = C.OSDIALOG_WARNING
    error = C.OSDIALOG_ERROR
}

[Return to contents]

Powered by vdoc. Generated on: 24 Apr 2021 19:12:45

About

0
62
1 year ago

Author

Derad6709