NvDialog 0.10.1
A cross-platform modal dialogs library for C/C++ that uses the native OS theme.
Loading...
Searching...
No Matches
NvDialog

Documentation

This manual documents the NvDialog library, a dialog box library written in C that uses the system API to display its dialogs, making it minimal, dependency-free, portable and easy to use. Instructions on how to build the library can be found in this page. There are also multiple examples to get you started - You can probably copy them in your source and continue with your project.

NvDialog is verified to work on Windows (XP through 11), macOS (Catalina), Debian (10-13), Arch Linux and FreeBSD. Most other Unix-like OSes also work, as long as Gtk3 is installed on the system.

To get started, you should read about NvdDialogBox, which is a simple dialog box with no special functionality in it apart from the very basics. NvDialog also provides the following (among many many others) features as part of its API:

Examples

If you want to check out some code before using this library in your project, this is a simple example: (Taken directly from the GitHub README).

#include <nvdialog/nvdialog.h>
int main(int argc, char** argv) {
NvdDialogBox *dialog = nvd_dialog_box_new("Dialog Title", "Dialog
Message", NVD_DIALOG_SIMPLE); if (!dialog) return -1;
nvd_show_dialog(dialog);
nvd_free_object(dialog);
return 0;
}
NVD_API void nvd_free_object(void *object)
Deletes an object creates by NvDialog.
NVD_API int nvd_init()
Initializes NvDialog.
struct _NvdDialogBox NvdDialogBox
A type to identify a single dialog box.
Definition nvdialog_dialog_box.h:49
NVD_API void nvd_show_dialog(NvdDialogBox *dialog)
Shows a dialog to the system shell.
NVD_API NvdDialogBox * nvd_dialog_box_new(const char *title, const char *message, NvdDialogType type)
Creates a new dialog object and returns it.
@ NVD_DIALOG_SIMPLE
Definition nvdialog_types.h:42

Other Resources