mikroSDK Reference Manual
lv_msgbox.h
1
6#ifndef LV_MSGBOX_H
7#define LV_MSGBOX_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include "../../../lvgl.h"
17
18#if LV_USE_MSGBOX
19
20/*Testing of dependencies*/
21#if LV_USE_BTNMATRIX == 0
22#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNMATRIX 1) "
23#endif
24
25#if LV_USE_LABEL == 0
26#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
27#endif
28
29/*********************
30 * DEFINES
31 *********************/
32
33/**********************
34 * TYPEDEFS
35 **********************/
36
37typedef struct {
38 lv_obj_t obj;
39 lv_obj_t * title;
40 lv_obj_t * close_btn;
41 lv_obj_t * content;
42 lv_obj_t * text;
43 lv_obj_t * btns;
44} lv_msgbox_t;
45
46extern const lv_obj_class_t lv_msgbox_class;
47extern const lv_obj_class_t lv_msgbox_content_class;
48extern const lv_obj_class_t lv_msgbox_backdrop_class;
49
50/**********************
51 * GLOBAL PROTOTYPES
52 **********************/
53
63lv_obj_t * lv_msgbox_create(lv_obj_t * parent, const char * title, const char * txt, const char * btn_txts[],
64 bool add_close_btn);
65
66lv_obj_t * lv_msgbox_get_title(lv_obj_t * obj);
67
68lv_obj_t * lv_msgbox_get_close_btn(lv_obj_t * obj);
69
70lv_obj_t * lv_msgbox_get_text(lv_obj_t * obj);
71
72lv_obj_t * lv_msgbox_get_content(lv_obj_t * obj);
73
74lv_obj_t * lv_msgbox_get_btns(lv_obj_t * obj);
75
81uint16_t lv_msgbox_get_active_btn(lv_obj_t * mbox);
82
83const char * lv_msgbox_get_active_btn_text(lv_obj_t * mbox);
84
85void lv_msgbox_close(lv_obj_t * mbox);
86
87void lv_msgbox_close_async(lv_obj_t * mbox);
88
89/**********************
90 * MACROS
91 **********************/
92
93#endif /*LV_USE_MSGBOX*/
94
95#ifdef __cplusplus
96} /*extern "C"*/
97#endif
98
99#endif /*LV_MSGBOX_H*/
Definition lv_obj_class.h:49
Definition lv_obj.h:174