GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Implements dialog windows. More...
Go to the source code of this file.
Data Structures | |
struct | gp_dialog |
A dialog. More... | |
Functions | |
gp_dialog * | gp_dialog_new (size_t payload) |
Allocates and initializes new dialog. | |
void | gp_dialog_free (gp_dialog *self) |
Frees a dialog. | |
gp_widget * | gp_dialog_layout_load (const char *dialog_name, const gp_widget_json_callbacks *const callbacks, const char *fallback_json, gp_htable **uids) |
Loads a dialog layout given a dialog name. | |
Implements dialog windows.
Definition in file gp_dialog.h.
void gp_dialog_free | ( | gp_dialog * | self | ) |
Frees a dialog.
If not NULL the the dialog layout is freed with the gp_widget_free() recursivelly.
self | A dialog. |
gp_widget * gp_dialog_layout_load | ( | const char * | dialog_name, |
const gp_widget_json_callbacks *const | callbacks, | ||
const char * | fallback_json, | ||
gp_htable ** | uids | ||
) |
Loads a dialog layout given a dialog name.
Looks for the layout in $HOME/.config/ and /etc/ if not found attempts to parse layout from fallback JSON string.
dialog_name | Dialog name. |
callbacks | Structure with NULL terminated array of dialog callbacks. |
fallback_json | Fallback dialog JSON layout. |
uids | An pointer to store the has table UIDs to. Must be initialized to NULL. |
gp_dialog * gp_dialog_new | ( | size_t | payload | ) |
Allocates and initializes new dialog.
payload | Payload size. |