Uploading the first files
This commit is contained in:
commit
eab3a5dd48
356 files changed
+78694
No files matched your search
@@ -0,0 +1,60 @@
|
||||
#ifndef GIFDEC_H
|
||||
#define GIFDEC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "liblvgl/misc/lv_fs.h"
|
||||
|
||||
#if LV_USE_GIF
|
||||
|
||||
typedef struct gd_Palette {
|
||||
int size;
|
||||
uint8_t colors[0x100 * 3];
|
||||
} gd_Palette;
|
||||
|
||||
typedef struct gd_GCE {
|
||||
uint16_t delay;
|
||||
uint8_t tindex;
|
||||
uint8_t disposal;
|
||||
int input;
|
||||
int transparency;
|
||||
} gd_GCE;
|
||||
|
||||
|
||||
|
||||
typedef struct gd_GIF {
|
||||
lv_fs_file_t fd;
|
||||
const char * data;
|
||||
uint8_t is_file;
|
||||
uint32_t f_rw_p;
|
||||
int32_t anim_start;
|
||||
uint16_t width, height;
|
||||
uint16_t depth;
|
||||
uint16_t loop_count;
|
||||
gd_GCE gce;
|
||||
gd_Palette *palette;
|
||||
gd_Palette lct, gct;
|
||||
void (*plain_text)(
|
||||
struct gd_GIF *gif, uint16_t tx, uint16_t ty,
|
||||
uint16_t tw, uint16_t th, uint8_t cw, uint8_t ch,
|
||||
uint8_t fg, uint8_t bg
|
||||
);
|
||||
void (*comment)(struct gd_GIF *gif);
|
||||
void (*application)(struct gd_GIF *gif, char id[8], char auth[3]);
|
||||
uint16_t fx, fy, fw, fh;
|
||||
uint8_t bgindex;
|
||||
uint8_t *canvas, *frame;
|
||||
} gd_GIF;
|
||||
|
||||
gd_GIF * gd_open_gif_file(const char *fname);
|
||||
|
||||
gd_GIF * gd_open_gif_data(const void *data);
|
||||
|
||||
void gd_render_frame(gd_GIF *gif, uint8_t *buffer);
|
||||
|
||||
int gd_get_frame(gd_GIF *gif);
|
||||
void gd_rewind(gd_GIF *gif);
|
||||
void gd_close_gif(gd_GIF *gif);
|
||||
|
||||
#endif /*LV_USE_GIF*/
|
||||
|
||||
#endif /* GIFDEC_H */
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @file lv_gif.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_GIF_H
|
||||
#define LV_GIF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "liblvgl/lvgl.h"
|
||||
#if LV_USE_GIF
|
||||
|
||||
#include "gifdec.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef struct {
|
||||
lv_img_t img;
|
||||
gd_GIF * gif;
|
||||
lv_timer_t * timer;
|
||||
lv_img_dsc_t imgdsc;
|
||||
uint32_t last_call;
|
||||
} lv_gif_t;
|
||||
|
||||
extern const lv_obj_class_t lv_gif_class;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
lv_obj_t * lv_gif_create(lv_obj_t * parent);
|
||||
void lv_gif_set_src(lv_obj_t * obj, const void * src);
|
||||
void lv_gif_restart(lv_obj_t * gif);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*LV_USE_GIF*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /*LV_GIF_H*/
|
||||
Reference in new issue
Block a user