1 /**
2  * @file lv_vg_lite_pending.h
3  *
4  */
5 
6 #ifndef LV_VG_LITE_PENDING_H
7 #define LV_VG_LITE_PENDING_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "../../lvgl.h"
18 
19 #if LV_USE_DRAW_VG_LITE
20 
21 /*********************
22  *      DEFINES
23  *********************/
24 
25 /**********************
26  *      TYPEDEFS
27  **********************/
28 
29 typedef struct _lv_vg_lite_pending_t lv_vg_lite_pending_t;
30 
31 typedef void (*lv_vg_lite_pending_free_cb_t)(void * obj, void * user_data);
32 
33 /**********************
34  * GLOBAL PROTOTYPES
35  **********************/
36 
37 /**
38  * Create a pending list
39  * @param obj_size the size of the objects in the list
40  * @param capacity_default the default capacity of the list
41  * @return a pointer to the pending list
42  */
43 lv_vg_lite_pending_t * lv_vg_lite_pending_create(size_t obj_size, uint32_t capacity_default);
44 
45 /**
46  * Destroy a pending list
47  * @param pending pointer to the pending list
48  */
49 void lv_vg_lite_pending_destroy(lv_vg_lite_pending_t * pending);
50 
51 /**
52  * Set a free callback for the pending list
53  * @param pending pointer to the pending list
54  * @param free_cb the free callback
55  * @param user_data user data to pass to the free callback
56  */
57 void lv_vg_lite_pending_set_free_cb(lv_vg_lite_pending_t * pending, lv_vg_lite_pending_free_cb_t free_cb,
58                                     void * user_data);
59 
60 /**
61  * Add an object to the pending list
62  * @param pending pointer to the pending list
63  * @param obj pointer to the object to add
64  */
65 void lv_vg_lite_pending_add(lv_vg_lite_pending_t * pending, void * obj);
66 
67 /**
68  * Remove all objects from the pending list
69  * @param pending pointer to the pending list
70  */
71 void lv_vg_lite_pending_remove_all(lv_vg_lite_pending_t * pending);
72 
73 /**********************
74  *      MACROS
75  **********************/
76 
77 #endif /*LV_USE_DRAW_VG_LITE*/
78 
79 #ifdef __cplusplus
80 } /*extern "C"*/
81 #endif
82 
83 #endif /*LV_VG_LITE_PENDING_H*/
84