mikroSDK Reference Manual
lv_rlottie.h
Go to the documentation of this file.
1
6#ifndef LV_RLOTTIE_H
7#define LV_RLOTTIE_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include "../../../lvgl.h"
17#if LV_USE_RLOTTIE
18
19/*********************
20 * DEFINES
21 *********************/
22
23/**********************
24 * TYPEDEFS
25 **********************/
26typedef 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
35struct Lottie_Animation_S;
36typedef struct {
37 lv_img_t img_ext;
38 struct Lottie_Animation_S * animation;
39 lv_timer_t * task;
40 lv_img_dsc_t imgdsc;
41 size_t total_frames;
42 size_t current_frame;
43 size_t framerate;
44 uint32_t * allocated_buf;
45 size_t allocated_buffer_size;
46 size_t scanline_width;
47 lv_rlottie_ctrl_t play_ctrl;
48 size_t dest_frame;
49} lv_rlottie_t;
50
51extern const lv_obj_class_t lv_rlottie_class;
52
53/**********************
54 * GLOBAL PROTOTYPES
55 **********************/
56
57lv_obj_t * lv_rlottie_create_from_file(lv_obj_t * parent, lv_coord_t width, lv_coord_t height, const char * path);
58
59lv_obj_t * lv_rlottie_create_from_raw(lv_obj_t * parent, lv_coord_t width, lv_coord_t height,
60 const char * rlottie_desc);
61
62void lv_rlottie_set_play_mode(lv_obj_t * rlottie, const lv_rlottie_ctrl_t ctrl);
63void lv_rlottie_set_current_frame(lv_obj_t * rlottie, const size_t goto_frame);
64
65/**********************
66 * MACROS
67 **********************/
68
69#endif /*LV_USE_RLOTTIE*/
70
71#ifdef __cplusplus
72} /* extern "C" */
73#endif
74
75#endif /*LV_RLOTTIE_H*/
Definition lv_obj_class.h:49
Definition lv_obj.h:174
Definition lv_timer.h:44
Definition lv_img_buf.h:141