Loading...
Searching...
No Matches
popup.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <gui/view.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
15typedef struct Popup Popup;
16
20typedef void (*PopupCallback)(void* context);
21
28Popup* popup_alloc(void);
29
34void popup_free(Popup* popup);
35
43
49void popup_set_callback(Popup* popup, PopupCallback callback);
50
56void popup_set_context(Popup* popup, void* context);
57
70 Popup* popup,
71 const char* text,
72 uint8_t x,
73 uint8_t y,
74 Align horizontal,
75 Align vertical);
76
89 Popup* popup,
90 const char* text,
91 uint8_t x,
92 uint8_t y,
93 Align horizontal,
94 Align vertical);
95
105void popup_set_icon(Popup* popup, uint8_t x, uint8_t y, const Icon* icon);
106
112void popup_set_timeout(Popup* popup, uint32_t timeout_in_ms);
113
118void popup_enable_timeout(Popup* popup);
119
124void popup_disable_timeout(Popup* popup);
125
130void popup_reset(Popup* popup);
131
132#ifdef __cplusplus
133}
134#endif
Align
Alignment enumeration.
Definition canvas.h:36
void popup_enable_timeout(Popup *popup)
Enable popup timeout.
Definition popup.c:235
Popup * popup_alloc(void)
Allocate and initialize popup.
Definition popup.c:111
void popup_disable_timeout(Popup *popup)
Disable popup timeout.
Definition popup.c:241
void popup_free(Popup *popup)
Deinitialize and free popup.
Definition popup.c:149
void popup_set_text(Popup *popup, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical)
Set popup text.
Definition popup.c:194
void(* PopupCallback)(void *context)
Popup result callback type.
Definition popup.h:20
void popup_set_context(Popup *popup, void *context)
Set popup context.
Definition popup.c:167
void popup_set_callback(Popup *popup, PopupCallback callback)
Set popup header text.
Definition popup.c:162
View * popup_get_view(Popup *popup)
Get popup view.
Definition popup.c:156
void popup_set_icon(Popup *popup, uint8_t x, uint8_t y, const Icon *icon)
Set popup icon.
Definition popup.c:216
void popup_set_timeout(Popup *popup, uint32_t timeout_in_ms)
Set popup timeout.
Definition popup.c:230
void popup_reset(Popup *popup)
Reset popup instance state.
Definition popup.c:247
void popup_set_header(Popup *popup, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical)
Set popup header text.
Definition popup.c:172
Definition icon_i.h:9
Definition popup.c:5
Definition view_i.h:16
GUI: View API.