GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
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
>
20
#include <
widgets/gp_widget_types.h
>
21
27
struct
gp_dialog
{
29
gp_widget
*
layout
;
31
int (*
input_event
)(
gp_dialog
*self,
gp_event
*ev);
33
long
retval
;
34
35
char
payload[] GP_ALIGNED;
36
};
37
44
gp_dialog
*
gp_dialog_new
(
size_t
payload);
45
53
void
gp_dialog_free
(
gp_dialog
*self);
54
68
gp_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 */
gp_compiler.h
A compiler dependent macros.
gp_dialog_layout_load
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.
gp_dialog_free
void gp_dialog_free(gp_dialog *self)
Frees a dialog.
gp_dialog_new
gp_dialog * gp_dialog_new(size_t payload)
Allocates and initializes new dialog.
gp_widget.h
A widget implementation base.
gp_widget_types.h
Common widget types.
gp_dialog
A dialog.
Definition
gp_dialog.h:27
gp_dialog::layout
gp_widget * layout
Definition
gp_dialog.h:29
gp_dialog::input_event
int(* input_event)(gp_dialog *self, gp_event *ev)
Definition
gp_dialog.h:31
gp_dialog::retval
long retval
Definition
gp_dialog.h:33
gp_event
An input event.
Definition
gp_event.h:225
gp_htable
A hash table.
Definition
gp_htable.h:40
gp_widget_json_callbacks
Structure to pass callbacks to the JSON loader.
Definition
gp_widget_json.h:59
gp_widget
A widget base.
Definition
gp_widget.h:29
Generated by
1.12.0