GUI: Popup view module API. More...
#include <gui/view.h>
Go to the source code of this file.
Typedefs | |
typedef struct Popup | Popup |
Popup anonymous structure. | |
typedef void(* | PopupCallback) (void *context) |
Popup result callback type. | |
Functions | |
Popup * | popup_alloc (void) |
Allocate and initialize popup. | |
void | popup_free (Popup *popup) |
Deinitialize and free popup. | |
View * | popup_get_view (Popup *popup) |
Get popup view. | |
void | popup_set_callback (Popup *popup, PopupCallback callback) |
Set popup header text. | |
void | popup_set_context (Popup *popup, void *context) |
Set popup context. | |
void | popup_set_header (Popup *popup, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical) |
Set popup header text. | |
void | popup_set_text (Popup *popup, const char *text, uint8_t x, uint8_t y, Align horizontal, Align vertical) |
Set popup text. | |
void | popup_set_icon (Popup *popup, uint8_t x, uint8_t y, const Icon *icon) |
Set popup icon. | |
void | popup_set_timeout (Popup *popup, uint32_t timeout_in_ms) |
Set popup timeout. | |
void | popup_enable_timeout (Popup *popup) |
Enable popup timeout. | |
void | popup_disable_timeout (Popup *popup) |
Disable popup timeout. | |
void | popup_reset (Popup *popup) |
Reset popup instance state. | |
GUI: Popup view module API.
typedef void(* PopupCallback) (void *context) |
Popup result callback type.
Popup * popup_alloc | ( | void | ) |
Allocate and initialize popup.
This popup used to ask simple questions like Yes/
void popup_disable_timeout | ( | Popup * | popup | ) |
Disable popup timeout.
popup | Popup instance |
void popup_enable_timeout | ( | Popup * | popup | ) |
Enable popup timeout.
popup | Popup instance |
void popup_free | ( | Popup * | popup | ) |
Deinitialize and free popup.
popup | Popup instance |
Get popup view.
popup | Popup instance |
void popup_reset | ( | Popup * | popup | ) |
Reset popup instance state.
popup | Popup instance |
void popup_set_callback | ( | Popup * | popup, |
PopupCallback | callback ) |
Set popup header text.
popup | Popup instance |
callback | PopupCallback |
void popup_set_context | ( | Popup * | popup, |
void * | context ) |
Set popup context.
popup | Popup instance |
context | context pointer, will be passed to result callback |
void popup_set_header | ( | Popup * | popup, |
const char * | text, | ||
uint8_t | x, | ||
uint8_t | y, | ||
Align | horizontal, | ||
Align | vertical ) |
Set popup header text.
If text is null, popup header will not be rendered
popup | Popup instance |
text | text to be shown, can be multiline |
x | x position |
y | y position |
horizontal | horizontal alignment |
vertical | vertical alignment |
Set popup icon.
If icon position is negative, popup icon will not be rendered
popup | Popup instance |
x | x position |
y | y position |
icon | pointer to Icon data |
void popup_set_text | ( | Popup * | popup, |
const char * | text, | ||
uint8_t | x, | ||
uint8_t | y, | ||
Align | horizontal, | ||
Align | vertical ) |
Set popup text.
If text is null, popup text will not be rendered
popup | Popup instance |
text | text to be shown, can be multiline |
x | x position |
y | y position |
horizontal | horizontal alignment |
vertical | vertical alignment |
void popup_set_timeout | ( | Popup * | popup, |
uint32_t | timeout_in_ms ) |
Set popup timeout.
popup | Popup instance |
timeout_in_ms | popup timeout value in milliseconds |