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 <core/gp_compiler.h>
18#include <input/gp_types.h>
19#include <widgets/gp_widget.h>
21
27struct gp_dialog {
31 int (*input_event)(gp_dialog *self, gp_event *ev);
33 long retval;
34
35 char payload[] GP_ALIGNED;
36};
37
44gp_dialog *gp_dialog_new(size_t payload);
45
54
68gp_widget *gp_dialog_layout_load(const char *dialog_name,
69 const gp_widget_json_callbacks *const callbacks,
70 const char *fallback_json, gp_htable **uids);
71
72#endif /* GP_DIALOG_H */
A compiler dependent macros.
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 widget implementation base.
Common widget types.
A dialog.
Definition gp_dialog.h:27
gp_widget * layout
Definition gp_dialog.h:29
int(* input_event)(gp_dialog *self, gp_event *ev)
Definition gp_dialog.h:31
long retval
Definition gp_dialog.h:33
An input event.
Definition gp_event.h:225
A hash table.
Definition gp_htable.h:40
Structure to pass callbacks to the JSON loader.
A widget base.
Definition gp_widget.h:29