1 /**
2  * @file lv_spinner.h
3  *
4  */
5 
6 #ifndef LV_SPINNER_H
7 #define LV_SPINNER_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../../lv_conf_internal.h"
17 
18 #if LV_USE_SPINNER
19 
20 /*Testing of dependencies*/
21 #if LV_USE_ARC == 0
22 #error "lv_spinner: lv_arc is required. Enable it in lv_conf.h (LV_USE_ARC  1) "
23 #endif
24 
25 /*********************
26  *      DEFINES
27  *********************/
28 
29 /**********************
30  *      TYPEDEFS
31  **********************/
32 LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_spinner_class;
33 
34 /**********************
35  * GLOBAL PROTOTYPES
36  **********************/
37 
38 /**
39  * Create a spinner widget
40  * @param parent    pointer to an object, it will be the parent of the new spinner.
41  * @return          the created spinner
42  */
43 lv_obj_t * lv_spinner_create(lv_obj_t * parent);
44 
45 /**
46  * Set the animation time and arc length of the spinner
47  * @param obj       pointer to a spinner
48  * @param t         the animation time in milliseconds
49  * @param angle     the angle of the arc in degrees
50  */
51 void lv_spinner_set_anim_params(lv_obj_t * obj, uint32_t t, uint32_t angle);
52 
53 /**********************
54  *      MACROS
55  **********************/
56 
57 #endif /*LV_USE_SPINNER*/
58 
59 #ifdef __cplusplus
60 } /*extern "C"*/
61 #endif
62 
63 #endif /*LV_SPINNER_H*/
64