1 /**
2  * @file lv_group_private.h
3  *
4  */
5 
6 #ifndef LV_GROUP_PRIVATE_H
7 #define LV_GROUP_PRIVATE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "lv_group.h"
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 
27 /**
28  * Groups can be used to logically hold objects so that they can be individually focused.
29  * They are NOT for laying out objects on a screen (try layouts for that).
30  */
31 struct _lv_group_t {
32     lv_ll_t obj_ll;        /**< Linked list to store the objects in the group*/
33     lv_obj_t ** obj_focus; /**< The object in focus*/
34 
35     lv_group_focus_cb_t focus_cb;              /**< A function to call when a new object is focused (optional)*/
36     lv_group_edge_cb_t  edge_cb;               /**< A function to call when an edge is reached, no more focus
37                                                     targets are available in this direction (to allow edge feedback
38                                                     like a sound or a scroll bounce) */
39 
40     void * user_data;
41 
42     uint8_t frozen : 1;         /**< 1: can't focus to new object*/
43     uint8_t editing : 1;        /**< 1: Edit mode, 0: Navigate mode*/
44     uint8_t refocus_policy : 1; /**< 1: Focus prev if focused on deletion. 0: Focus next if focused on
45                                    deletion.*/
46     uint8_t wrap : 1;           /**< 1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end
47                                    of list.*/
48 };
49 
50 
51 /**********************
52  * GLOBAL PROTOTYPES
53  **********************/
54 
55 /**
56  * Init the group module
57  * @remarks Internal function, do not call directly.
58  */
59 void lv_group_init(void);
60 
61 /**
62  * Deinit the group module
63  * @remarks Internal function, do not call directly.
64  */
65 void lv_group_deinit(void);
66 
67 /**********************
68  *      MACROS
69  **********************/
70 
71 #ifdef __cplusplus
72 } /*extern "C"*/
73 #endif
74 
75 #endif /*LV_GROUP_PRIVATE_H*/
76