1 /**
2  * @file lv_layout.h
3  *
4  */
5 
6 #ifndef LV_LAYOUT_H
7 #define LV_LAYOUT_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../lv_conf_internal.h"
17 #include "../misc/lv_types.h"
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 
27 typedef void (*lv_layout_update_cb_t)(lv_obj_t *, void * user_data);
28 
29 typedef enum {
30     LV_LAYOUT_NONE = 0,
31 
32 #if LV_USE_FLEX
33     LV_LAYOUT_FLEX,
34 #endif
35 
36 #if LV_USE_GRID
37     LV_LAYOUT_GRID,
38 #endif
39 
40     LV_LAYOUT_LAST
41 } lv_layout_t;
42 
43 /**
44  * Register a new layout
45  * @param cb        the layout update callback
46  * @param user_data custom data that will be passed to `cb`
47  * @return          the ID of the new layout
48  */
49 uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data);
50 
51 /**********************
52  *      MACROS
53  **********************/
54 
55 #if LV_USE_FLEX
56 #include "flex/lv_flex.h"
57 #endif /* LV_USE_FLEX */
58 
59 #if LV_USE_GRID
60 #include "grid/lv_grid.h"
61 #endif /* LV_USE_GRID */
62 
63 #ifdef __cplusplus
64 } /*extern "C"*/
65 #endif
66 
67 #endif /*LV_LAYOUT_H*/
68