1 /** 2 * @file lv_rlottie.h 3 * 4 */ 5 6 #ifndef LV_RLOTTIE_H 7 #define LV_RLOTTIE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../../lv_conf_internal.h" 17 #if LV_USE_RLOTTIE 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 typedef enum { 27 LV_RLOTTIE_CTRL_FORWARD = 0, 28 LV_RLOTTIE_CTRL_BACKWARD = 1, 29 LV_RLOTTIE_CTRL_PAUSE = 2, 30 LV_RLOTTIE_CTRL_PLAY = 0, /* Yes, play = 0 is the default mode */ 31 LV_RLOTTIE_CTRL_LOOP = 8, 32 } lv_rlottie_ctrl_t; 33 34 LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_rlottie_class; 35 36 /********************** 37 * GLOBAL PROTOTYPES 38 **********************/ 39 40 lv_obj_t * lv_rlottie_create_from_file(lv_obj_t * parent, int32_t width, int32_t height, const char * path); 41 42 lv_obj_t * lv_rlottie_create_from_raw(lv_obj_t * parent, int32_t width, int32_t height, 43 const char * rlottie_desc); 44 45 void lv_rlottie_set_play_mode(lv_obj_t * rlottie, const lv_rlottie_ctrl_t ctrl); 46 void lv_rlottie_set_current_frame(lv_obj_t * rlottie, const size_t goto_frame); 47 48 /********************** 49 * MACROS 50 **********************/ 51 52 #endif /*LV_USE_RLOTTIE*/ 53 54 #ifdef __cplusplus 55 } /* extern "C" */ 56 #endif 57 58 #endif /*LV_RLOTTIE_H*/ 59