1 /**
2  * @file lv_win.h
3  *
4  */
5 
6 #ifndef LV_WIN_H
7 #define LV_WIN_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../../lv_conf_internal.h"
17 #include "../../core/lv_obj.h"
18 #if LV_USE_WIN
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_win_class;
24 
25 /**********************
26  * GLOBAL PROTOTYPES
27  **********************/
28 
29 /**
30  * Create a window widget
31  * @param parent    pointer to a parent widget
32  * @return          the created window
33  */
34 lv_obj_t * lv_win_create(lv_obj_t * parent);
35 
36 /**
37  * Add a title to the window
38  * @param obj       pointer to a window widget
39  * @param txt       the text of the title
40  * @return          the widget where the content of the title can be created
41  */
42 lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt);
43 
44 /**
45  * Add a button to the window
46  * @param obj       pointer to a window widget
47  * @param icon      an icon to be displayed on the button
48  * @param btn_w     width of the button
49  * @return          the widget where the content of the button can be created
50  */
51 lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, int32_t btn_w);
52 
53 /**
54  * Get the header of the window
55  * @param win       pointer to a window widget
56  * @return          the header of the window
57  */
58 lv_obj_t * lv_win_get_header(lv_obj_t * win);
59 
60 /**
61  * Get the content of the window
62  * @param win       pointer to a window widget
63  * @return          the content of the window
64  */
65 lv_obj_t * lv_win_get_content(lv_obj_t * win);
66 /**********************
67  *      MACROS
68  **********************/
69 #endif /*LV_USE_WIN*/
70 #ifdef __cplusplus
71 } /*extern "C"*/
72 #endif
73 
74 #endif /*LV_WIN_H*/
75