mikroSDK Reference Manual
lv_animimg.h
Go to the documentation of this file.
1
6#ifndef LV_ANIM_IMG_H
7#define LV_ANIM_IMG_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include "../../../lvgl.h"
17
18#if LV_USE_ANIMIMG != 0
19
20/*Testing of dependencies*/
21#if LV_USE_IMG == 0
22#error "lv_animimg: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1)"
23#endif
24
25/*********************
26 * DEFINES
27 *********************/
28
29/**********************
30 * TYPEDEFS
31 **********************/
32
33extern const lv_obj_class_t lv_animimg_class;
34
35/*Data of image*/
36typedef struct {
37 lv_img_t img;
38 lv_anim_t anim;
39 /*picture sequence */
40 const void ** dsc;
41 int8_t pic_count;
42} lv_animimg_t;
43
44
45/*Image parts*/
46enum {
47 LV_ANIM_IMG_PART_MAIN,
48};
49typedef uint8_t lv_animimg_part_t;
50
51/**********************
52 * GLOBAL PROTOTYPES
53 **********************/
54
60lv_obj_t * lv_animimg_create(lv_obj_t * parent);
61
62/*=====================
63 * Setter functions
64 *====================*/
65
72void lv_animimg_set_src(lv_obj_t * img, const void * dsc[], uint8_t num);
73
78void lv_animimg_start(lv_obj_t * obj);
79
84void lv_animimg_set_duration(lv_obj_t * img, uint32_t duration);
85
91void lv_animimg_set_repeat_count(lv_obj_t * img, uint16_t count);
92
93/*=====================
94 * Getter functions
95 *====================*/
96
97#endif /*LV_USE_ANIMIMG*/
98
99#ifdef __cplusplus
100} /* extern "C" */
101#endif
102
103#endif /*LV_ANIM_IMG_H*/
Definition lv_anim.h:73
Definition lv_obj_class.h:49
Definition lv_obj.h:174