1 /**
2  * @file lv_async.h
3  *
4  */
5 
6 #ifndef LV_ASYNC_H
7 #define LV_ASYNC_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "lv_task.h"
18 #include "lv_types.h"
19 
20 /*********************
21  *      DEFINES
22  *********************/
23 
24 /**********************
25  *      TYPEDEFS
26  **********************/
27 
28 /**
29  * Type for async callback.
30  */
31 typedef void (*lv_async_cb_t)(void *);
32 
33 typedef struct _lv_async_info_t {
34     lv_async_cb_t cb;
35     void *user_data;
36 } lv_async_info_t;
37 
38 struct _lv_obj_t;
39 
40 /**********************
41  * GLOBAL PROTOTYPES
42  **********************/
43 
44 /**
45  * Call an asynchronous function the next time lv_task_handler() is run. This function is likely to return
46  * **before** the call actually happens!
47  * @param task_xcb a callback which is the task itself.
48  *                 (the 'x' in the argument name indicates that its not a fully generic function because it not follows
49  *                  the `func_name(object, callback, ...)` convention)
50  * @param user_data custom parameter
51  */
52 lv_res_t lv_async_call(lv_async_cb_t async_xcb, void * user_data);
53 
54 /**********************
55  *      MACROS
56  **********************/
57 
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif
61 
62 #endif /*LV_TEMPL_H*/
63