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, or NULL for a parentless dialog.
Returns
An absolute filesystem path, or NULL on cancellation or a recoverable failure. Free a non-NULL result with uiFreeText().
Note
Windows and macOS return UTF-8. Unix returns the filesystem filename encoding, which may not be UTF-8. Path separators are OS-specific. Items without a filesystem path cannot be selected.

◆ uiOpenFolder()

char * uiOpenFolder ( uiWindow *  parent)

Folder chooser dialog window to select a single folder.

Parameters
parentParent window, or NULL for a parentless dialog.
Returns
An absolute filesystem path, or NULL on cancellation or a recoverable failure. Free a non-NULL result with uiFreeText().
Note
Windows and macOS return UTF-8. Unix returns the filesystem filename encoding, which may not be UTF-8. Path separators are OS-specific. Items without a filesystem path cannot be selected.

◆ 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, or NULL for a parentless dialog.
Returns
An absolute filesystem path, or NULL on cancellation or a recoverable failure. Free a non-NULL result with uiFreeText().
Note
Windows and macOS return UTF-8. Unix returns the filesystem filename encoding, which may not be UTF-8. Path separators are OS-specific. Items without a filesystem path cannot be selected.