GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_dialog.h
Go to the documentation of this file.
1//SPDX-License-Identifier: LGPL-2.0-or-later
2
3/*
4
5 Copyright (c) 2014-2022 Cyril Hrubis <metan@ucw.cz>
6
7 */
8
14#ifndef GP_DIALOG_H
15#define GP_DIALOG_H
16
17#include <input/gp_types.h>
18#include <widgets/gp_widget.h>
19#include <widgets/gp_widget_types.h>
20
26struct gp_dialog {
28 gp_widget *layout;
30 int (*input_event)(gp_dialog *self, gp_event *ev);
32 long retval;
33 char payload[];
34};
35
42gp_dialog *gp_dialog_new(size_t payload);
43
52
66gp_widget *gp_dialog_layout_load(const char *dialog_name,
67 const gp_widget_json_callbacks *const callbacks,
68 const char *fallback_json, gp_htable **uids);
69
70#endif /* GP_DIALOG_H */
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.
void gp_dialog_free(gp_dialog *self)
Frees a dialog.
gp_dialog * gp_dialog_new(size_t payload)
Allocates and initializes new dialog.
A dialog.
Definition gp_dialog.h:26
gp_widget * layout
Definition gp_dialog.h:28
int(* input_event)(gp_dialog *self, gp_event *ev)
Definition gp_dialog.h:30
long retval
Definition gp_dialog.h:32
A hash table.
Definition gp_htable.h:40
Structure to pass callbacks to the JSON loader.