libui-ng
A portable GUI library for C
Dialog windows

Functions

char * uiOpenFile (uiWindow *parent)
 File chooser dialog window to select a single file. More...
 
char * uiOpenFolder (uiWindow *parent)
 Folder chooser dialog window to select a single folder. More...
 
char * uiSaveFile (uiWindow *parent)
 Save file dialog window. More...
 
void uiMsgBox (uiWindow *parent, const char *title, const char *description)
 Message box dialog window. More...
 
void uiMsgBoxError (uiWindow *parent, const char *title, const char *description)
 Error message box dialog window. More...
 

Detailed Description

Function Documentation

◆ uiMsgBox()

void uiMsgBox ( uiWindow parent,
const char *  title,
const char *  description 
)

Message box dialog window.

A message box displayed in a new window indicating a common message.

Parameters
parentParent window.
titleDialog window title text.
A valid, NUL terminated UTF-8 string.
Data is copied internally. Ownership is not transferred.
descriptionDialog message text.
A valid, NUL terminated UTF-8 string.
Data is copied internally. Ownership is not transferred.

◆ uiMsgBoxError()

void uiMsgBoxError ( uiWindow parent,
const char *  title,
const char *  description 
)

Error message box dialog window.

A message box displayed in a new window indicating an error. On some systems this may invoke an accompanying sound.

Parameters
parentParent window.
titleDialog window title text.
A valid, NUL terminated UTF-8 string.
Data is copied internally. Ownership is not transferred.
descriptionDialog message text.
A valid, NUL terminated UTF-8 string.
Data is copied internally. Ownership is not transferred.

◆ uiOpenFile()

char * uiOpenFile ( uiWindow parent)

File chooser dialog window to select a single file.

Parameters
parentParent window.
Returns
File path, NULL on cancel.
If path is not NULL:
TODO: clarify string encoding. Caller is responsible for freeing the data with uiFreeText().
Note
File paths are separated by the underlying OS file path separator.

◆ uiOpenFolder()

char * uiOpenFolder ( uiWindow parent)

Folder chooser dialog window to select a single folder.

Parameters
parentParent window.
Returns
Folder path, NULL on cancel.
If path is not NULL:
TODO: clarify string encoding. Caller is responsible for freeing the data with uiFreeText().
Note
File paths are separated by the underlying OS file path separator.

◆ uiSaveFile()

char * uiSaveFile ( uiWindow parent)

Save file dialog window.

The user is asked to confirm overwriting existing files, should the chosen file path already exist on the system.

Parameters
parentParent window.
Returns
File path, NULL on cancel.
If path is not NULL:
TODO: clarify string encoding. Caller is responsible for freeing the data with uiFreeText().
Note
File paths are separated by the underlying OS file path separator.