mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
arch: use a flatter directory structure
This commit is contained in:
parent
d6e5200013
commit
c79501bdce
71
lvgl.h
71
lvgl.h
@ -43,30 +43,69 @@ extern "C" {
|
||||
#include "src/font/lv_font_loader.h"
|
||||
#include "src/font/lv_font_fmt_txt.h"
|
||||
|
||||
#include "src/widgets/lv_arc.h"
|
||||
#include "src/widgets/lv_btn.h"
|
||||
#include "src/widgets/lv_img.h"
|
||||
#include "src/widgets/lv_label.h"
|
||||
#include "src/widgets/lv_line.h"
|
||||
#include "src/widgets/lv_table.h"
|
||||
#include "src/widgets/lv_checkbox.h"
|
||||
#include "src/widgets/lv_bar.h"
|
||||
#include "src/widgets/lv_slider.h"
|
||||
#include "src/widgets/lv_btnmatrix.h"
|
||||
#include "src/widgets/lv_dropdown.h"
|
||||
#include "src/widgets/lv_roller.h"
|
||||
#include "src/widgets/lv_textarea.h"
|
||||
#include "src/widgets/lv_canvas.h"
|
||||
#include "src/widgets/lv_switch.h"
|
||||
#include "src/widgets/animimg/lv_animimg.h"
|
||||
#include "src/widgets/arc/lv_arc.h"
|
||||
#include "src/widgets/bar/lv_bar.h"
|
||||
#include "src/widgets/btn/lv_btn.h"
|
||||
#include "src/widgets/btnmatrix/lv_btnmatrix.h"
|
||||
#include "src/widgets/calendar/lv_calendar.h"
|
||||
#include "src/widgets/canvas/lv_canvas.h"
|
||||
#include "src/widgets/chart/lv_chart.h"
|
||||
#include "src/widgets/checkbox/lv_checkbox.h"
|
||||
#include "src/widgets/colorwheel/lv_colorwheel.h"
|
||||
#include "src/widgets/dropdown/lv_dropdown.h"
|
||||
#include "src/widgets/img/lv_img.h"
|
||||
#include "src/widgets/imgbtn/lv_imgbtn.h"
|
||||
#include "src/widgets/keyboard/lv_keyboard.h"
|
||||
#include "src/widgets/label/lv_label.h"
|
||||
#include "src/widgets/led/lv_led.h"
|
||||
#include "src/widgets/line/lv_line.h"
|
||||
#include "src/widgets/list/lv_list.h"
|
||||
#include "src/widgets/menu/lv_menu.h"
|
||||
#include "src/widgets/meter/lv_meter.h"
|
||||
#include "src/widgets/msgbox/lv_msgbox.h"
|
||||
#include "src/widgets/roller/lv_roller.h"
|
||||
#include "src/widgets/slider/lv_slider.h"
|
||||
#include "src/widgets/span/lv_span.h"
|
||||
#include "src/widgets/spinbox/lv_spinbox.h"
|
||||
#include "src/widgets/spinner/lv_spinner.h"
|
||||
#include "src/widgets/switch/lv_switch.h"
|
||||
#include "src/widgets/table/lv_table.h"
|
||||
#include "src/widgets/tabview/lv_tabview.h"
|
||||
#include "src/widgets/textarea/lv_textarea.h"
|
||||
#include "src/widgets/tileview/lv_tileview.h"
|
||||
#include "src/widgets/win/lv_win.h"
|
||||
|
||||
#include "src/others/snapshot/lv_snapshot.h"
|
||||
#include "src/others/monkey/lv_monkey.h"
|
||||
#include "src/others/gridnav/lv_gridnav.h"
|
||||
#include "src/others/fragment/lv_fragment.h"
|
||||
#include "src/others/imgfont/lv_imgfont.h"
|
||||
#include "src/others/msg/lv_msg.h"
|
||||
#include "src/others/ime/lv_ime_pinyin.h"
|
||||
|
||||
#include "src/libs/bmp/lv_bmp.h"
|
||||
#include "src/libs/fsdrv/lv_fsdrv.h"
|
||||
#include "src/libs/png/lv_png.h"
|
||||
#include "src/libs/gif/lv_gif.h"
|
||||
#include "src/libs/qrcode/lv_qrcode.h"
|
||||
#include "src/libs/sjpg/lv_sjpg.h"
|
||||
#include "src/libs/freetype/lv_freetype.h"
|
||||
#include "src/libs/rlottie/lv_rlottie.h"
|
||||
#include "src/libs/ffmpeg/lv_ffmpeg.h"
|
||||
|
||||
#include "src/layouts/flex/lv_flex.h"
|
||||
#include "src/layouts/grid/lv_grid.h"
|
||||
|
||||
#include "src/draw/lv_draw.h"
|
||||
|
||||
#include "src/themes/lv_themes.h"
|
||||
|
||||
#include "src/lv_api_map.h"
|
||||
|
||||
/*-----------------
|
||||
* EXTRAS
|
||||
*----------------*/
|
||||
#include "src/extra/lv_extra.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
13
lvgl.mk
13
lvgl.mk
@ -1,9 +1,4 @@
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/demos/lv_demos.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples/lv_examples.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/lv_extra.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font/lv_font.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal/lv_hal.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc/lv_misc.mk
|
||||
include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets/lv_widgets.mk
|
||||
CSRCS += $(shell find $(LVGL_DIR_NAME)/src -type f -name '*.c')
|
||||
CSRCS += $(shell find $(LVGL_DIR_NAME)/demos -type f -name '*.c')
|
||||
CSRCS += $(shell find $(LVGL_DIR_NAME)/examples -type f -name '*.c')
|
||||
CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)"
|
||||
|
@ -21,11 +21,20 @@
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../misc/lv_log.h"
|
||||
#include "../libs/bmp/lv_bmp.h"
|
||||
#include "../libs/ffmpeg/lv_ffmpeg.h"
|
||||
#include "../libs/freetype/lv_freetype.h"
|
||||
#include "../libs/fsdrv/lv_fsdrv.h"
|
||||
#include "../libs/gif/lv_gif.h"
|
||||
#include "../libs/png/lv_png.h"
|
||||
#include "../libs/sjpg/lv_sjpg.h"
|
||||
#include "../layouts/flex/lv_flex.h"
|
||||
#include "../layouts/grid/lv_grid.h"
|
||||
|
||||
#if LV_USE_BUILTIN_MALLOC
|
||||
#include "../misc/lv_mem_builtin.h"
|
||||
#endif
|
||||
#include "../hal/lv_hal.h"
|
||||
#include "../extra/lv_extra.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -180,7 +189,59 @@ void lv_init(void)
|
||||
LV_LOG_WARN("Log level is set to 'Trace' which makes LVGL much slower");
|
||||
#endif
|
||||
|
||||
lv_extra_init();
|
||||
|
||||
#if LV_USE_FLEX
|
||||
lv_flex_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_GRID
|
||||
lv_grid_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSG
|
||||
lv_msg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_FATFS != '\0'
|
||||
lv_fs_fatfs_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_STDIO != '\0'
|
||||
lv_fs_stdio_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_POSIX != '\0'
|
||||
lv_fs_posix_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_WIN32 != '\0'
|
||||
lv_fs_win32_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FFMPEG
|
||||
lv_ffmpeg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_PNG
|
||||
lv_png_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_SJPG
|
||||
lv_split_jpeg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_BMP
|
||||
lv_bmp_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
/*Init freetype library*/
|
||||
# if LV_FREETYPE_CACHE_SIZE >= 0
|
||||
lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE);
|
||||
# else
|
||||
lv_freetype_init(0, 0, 0);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
lv_initialized = true;
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../font/lv_font_fmt_txt.h"
|
||||
#include "../extra/others/snapshot/lv_snapshot.h"
|
||||
#include "../others/snapshot/lv_snapshot.h"
|
||||
|
||||
#if LV_USE_PERF_MONITOR || LV_USE_MEM_MONITOR
|
||||
#include "../widgets/lv_label.h"
|
||||
#include "../widgets/label/lv_label.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Extra components
|
||||
|
||||
This directory contains extra (optional) components to lvgl.
|
||||
It's a good place for contributions as there are less strict expectations about the completeness and flexibility of the components here.
|
||||
|
||||
In other words, if you have created a complex widget from other widgets, or modified an existing widget with special events, styles or animations, or have a new feature that could work as a plugin to lvgl feel free to the share it here.
|
||||
|
||||
## How to contribute
|
||||
- Create a [Pull request](https://docs.lvgl.io/8.0/CONTRIBUTING.html#pull-request) with your new content
|
||||
- Please and follow the [Coding style](https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md) of LVGL
|
||||
- Add setter/getter functions in pair
|
||||
- Update [lv_conf_template.h](https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h)
|
||||
- Add description in the [docs](https://github.com/lvgl/lvgl/tree/master/docs)
|
||||
- Add [examples](https://github.com/lvgl/lvgl/tree/master/examples)
|
||||
- Update the [changelog](https://github.com/lvgl/lvgl/tree/master/docs/CHANGELOG.md)
|
||||
- Add yourself to the [Contributors](#contributors) section below.
|
||||
|
||||
## Ideas
|
||||
Here some ideas as inspiration feel free to contribute with ideas too.
|
||||
- New [Calendar headers](https://github.com/lvgl/lvgl/tree/master/src/extra/widgets/calendar)
|
||||
- Color picker with RGB and or HSV bars
|
||||
- Ruler, horizontal or vertical with major and minor ticks and labels
|
||||
- New [List items types](https://github.com/lvgl/lvgl/tree/master/src/extra/widgets/list)
|
||||
- [Preloaders](https://www.google.com/search?q=preloader&sxsrf=ALeKk01ddA4YB0WEgLLN1bZNSm8YER7pkg:1623080551559&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiwoN6d7oXxAhVuw4sKHVedBB4Q_AUoAXoECAEQAw&biw=952&bih=940)
|
||||
- Drop-down list with a container to which content can be added
|
||||
- 9 patch button: Similar to [lv_imgbtn](https://docs.lvgl.io/8.0/widgets/extra/imgbtn.html) but 9 images for 4 corner, 4 sides and the center
|
||||
|
||||
## Contributors
|
||||
- lv_animimg: @ZhaoQiang-b45475
|
||||
- lv_span: @guoweilkd
|
||||
- lv_menu: @HX2003
|
@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file lv_layouts.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_LAYOUTS_H
|
||||
#define LV_LAYOUTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "flex/lv_flex.h"
|
||||
#include "grid/lv_grid.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
#if LV_USE_LOG && LV_LOG_TRACE_LAYOUT
|
||||
# define LV_TRACE_LAYOUT(...) LV_LOG_TRACE(__VA_ARGS__)
|
||||
#else
|
||||
# define LV_TRACE_LAYOUT(...)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_LAYOUTS_H*/
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @file lv_libs.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_LIBS_H
|
||||
#define LV_LIBS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "bmp/lv_bmp.h"
|
||||
#include "fsdrv/lv_fsdrv.h"
|
||||
#include "png/lv_png.h"
|
||||
#include "gif/lv_gif.h"
|
||||
#include "qrcode/lv_qrcode.h"
|
||||
#include "sjpg/lv_sjpg.h"
|
||||
#include "freetype/lv_freetype.h"
|
||||
#include "rlottie/lv_rlottie.h"
|
||||
#include "ffmpeg/lv_ffmpeg.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_LIBS_H*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,93 +0,0 @@
|
||||
/*----------------------------------------------------------------------------/
|
||||
/ TJpgDec - Tiny JPEG Decompressor R0.03 include file (C)ChaN, 2021
|
||||
/----------------------------------------------------------------------------*/
|
||||
#ifndef DEF_TJPGDEC
|
||||
#define DEF_TJPGDEC
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#if LV_USE_SJPG
|
||||
|
||||
#include "tjpgdcnf.h"
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if JD_FASTDECODE >= 1
|
||||
typedef int16_t jd_yuv_t;
|
||||
#else
|
||||
typedef uint8_t jd_yuv_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* Error code */
|
||||
typedef enum {
|
||||
JDR_OK = 0, /* 0: Succeeded */
|
||||
JDR_INTR, /* 1: Interrupted by output function */
|
||||
JDR_INP, /* 2: Device error or wrong termination of input stream */
|
||||
JDR_MEM1, /* 3: Insufficient memory pool for the image */
|
||||
JDR_MEM2, /* 4: Insufficient stream input buffer */
|
||||
JDR_PAR, /* 5: Parameter error */
|
||||
JDR_FMT1, /* 6: Data format error (may be broken data) */
|
||||
JDR_FMT2, /* 7: Right format but not supported */
|
||||
JDR_FMT3 /* 8: Not supported JPEG standard */
|
||||
} JRESULT;
|
||||
|
||||
/* Rectangular region in the output image */
|
||||
typedef struct {
|
||||
uint16_t left; /* Left end */
|
||||
uint16_t right; /* Right end */
|
||||
uint16_t top; /* Top end */
|
||||
uint16_t bottom; /* Bottom end */
|
||||
} JRECT;
|
||||
|
||||
/* Decompressor object structure */
|
||||
typedef struct JDEC JDEC;
|
||||
struct JDEC {
|
||||
size_t dctr; /* Number of bytes available in the input buffer */
|
||||
uint8_t* dptr; /* Current data read ptr */
|
||||
uint8_t* inbuf; /* Bit stream input buffer */
|
||||
uint8_t dbit; /* Number of bits availavble in wreg or reading bit mask */
|
||||
uint8_t scale; /* Output scaling ratio */
|
||||
uint8_t msx, msy; /* MCU size in unit of block (width, height) */
|
||||
uint8_t qtid[3]; /* Quantization table ID of each component, Y, Cb, Cr */
|
||||
uint8_t ncomp; /* Number of color components 1:grayscale, 3:color */
|
||||
int16_t dcv[3]; /* Previous DC element of each component */
|
||||
uint16_t nrst; /* Restart inverval */
|
||||
uint16_t width, height; /* Size of the input image (pixel) */
|
||||
uint8_t* huffbits[2][2]; /* Huffman bit distribution tables [id][dcac] */
|
||||
uint16_t* huffcode[2][2]; /* Huffman code word tables [id][dcac] */
|
||||
uint8_t* huffdata[2][2]; /* Huffman decoded data tables [id][dcac] */
|
||||
int32_t* qttbl[4]; /* Dequantizer tables [id] */
|
||||
#if JD_FASTDECODE >= 1
|
||||
uint32_t wreg; /* Working shift register */
|
||||
uint8_t marker; /* Detected marker (0:None) */
|
||||
#if JD_FASTDECODE == 2
|
||||
uint8_t longofs[2][2]; /* Table offset of long code [id][dcac] */
|
||||
uint16_t* hufflut_ac[2]; /* Fast huffman decode tables for AC short code [id] */
|
||||
uint8_t* hufflut_dc[2]; /* Fast huffman decode tables for DC short code [id] */
|
||||
#endif
|
||||
#endif
|
||||
void* workbuf; /* Working buffer for IDCT and RGB output */
|
||||
jd_yuv_t* mcubuf; /* Working buffer for the MCU */
|
||||
void* pool; /* Pointer to available memory pool */
|
||||
size_t sz_pool; /* Size of momory pool (bytes available) */
|
||||
size_t (*infunc)(JDEC*, uint8_t*, size_t); /* Pointer to jpeg stream input function */
|
||||
void* device; /* Pointer to I/O device identifiler for the session */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* TJpgDec API functions */
|
||||
JRESULT jd_prepare (JDEC* jd, size_t (*infunc)(JDEC*,uint8_t*,size_t), void* pool, size_t sz_pool, void* dev);
|
||||
JRESULT jd_decomp (JDEC* jd, int (*outfunc)(JDEC*,void*,JRECT*), uint8_t scale);
|
||||
|
||||
#endif /*LV_USE_SJPG*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TJPGDEC */
|
@ -1,93 +0,0 @@
|
||||
/**
|
||||
* @file lv_extra.c
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lvgl.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
void lv_extra_init(void)
|
||||
{
|
||||
#if LV_USE_FLEX
|
||||
lv_flex_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_GRID
|
||||
lv_grid_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSG
|
||||
lv_msg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_FATFS != '\0'
|
||||
lv_fs_fatfs_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_STDIO != '\0'
|
||||
lv_fs_stdio_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_POSIX != '\0'
|
||||
lv_fs_posix_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_WIN32 != '\0'
|
||||
lv_fs_win32_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FFMPEG
|
||||
lv_ffmpeg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_PNG
|
||||
lv_png_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_SJPG
|
||||
lv_split_jpeg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_BMP
|
||||
lv_bmp_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
/*Init freetype library*/
|
||||
# if LV_FREETYPE_CACHE_SIZE >= 0
|
||||
lv_freetype_init(LV_FREETYPE_CACHE_FT_FACES, LV_FREETYPE_CACHE_FT_SIZES, LV_FREETYPE_CACHE_SIZE);
|
||||
# else
|
||||
lv_freetype_init(0, 0, 0);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
* @file lv_extra.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_EXTRA_H
|
||||
#define LV_EXTRA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "layouts/lv_layouts.h"
|
||||
#include "libs/lv_libs.h"
|
||||
#include "others/lv_others.h"
|
||||
#include "themes/lv_themes.h"
|
||||
#include "widgets/lv_widgets.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Initialize the extra components
|
||||
*/
|
||||
void lv_extra_init(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_EXTRA_H*/
|
@ -1 +0,0 @@
|
||||
CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra -name \*.c)
|
@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @file lv_others.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_OTHERS_H
|
||||
#define LV_OTHERS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "snapshot/lv_snapshot.h"
|
||||
#include "monkey/lv_monkey.h"
|
||||
#include "gridnav/lv_gridnav.h"
|
||||
#include "fragment/lv_fragment.h"
|
||||
#include "imgfont/lv_imgfont.h"
|
||||
#include "msg/lv_msg.h"
|
||||
#include "ime/lv_ime_pinyin.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_OTHERS_H*/
|
@ -1,56 +0,0 @@
|
||||
/**
|
||||
* @file lv_widgets.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_WIDGETS_H
|
||||
#define LV_WIDGETS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "animimg/lv_animimg.h"
|
||||
#include "calendar/lv_calendar.h"
|
||||
#include "calendar/lv_calendar_header_arrow.h"
|
||||
#include "calendar/lv_calendar_header_dropdown.h"
|
||||
#include "chart/lv_chart.h"
|
||||
#include "keyboard/lv_keyboard.h"
|
||||
#include "list/lv_list.h"
|
||||
#include "menu/lv_menu.h"
|
||||
#include "msgbox/lv_msgbox.h"
|
||||
#include "meter/lv_meter.h"
|
||||
#include "spinbox/lv_spinbox.h"
|
||||
#include "spinner/lv_spinner.h"
|
||||
#include "tabview/lv_tabview.h"
|
||||
#include "tileview/lv_tileview.h"
|
||||
#include "win/lv_win.h"
|
||||
#include "colorwheel/lv_colorwheel.h"
|
||||
#include "led/lv_led.h"
|
||||
#include "imgbtn/lv_imgbtn.h"
|
||||
#include "span/lv_span.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_WIDGETS_H*/
|
@ -28,7 +28,7 @@
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
#include "../extra/themes/default/lv_theme_default.h"
|
||||
#include "../themes/default/lv_theme_default.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
|
@ -6,7 +6,7 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_layouts.h"
|
||||
#include "lv_flex.h"
|
||||
|
||||
#if LV_USE_FLEX
|
||||
|
||||
@ -72,7 +72,6 @@ lv_style_prop_t LV_STYLE_FLEX_CROSS_PLACE;
|
||||
lv_style_prop_t LV_STYLE_FLEX_TRACK_PLACE;
|
||||
lv_style_prop_t LV_STYLE_FLEX_GROW;
|
||||
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
@ -80,6 +79,11 @@ lv_style_prop_t LV_STYLE_FLEX_GROW;
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
#if LV_USE_LOG && LV_LOG_TRACE_LAYOUT
|
||||
#define LV_TRACE_LAYOUT(...) LV_LOG_TRACE(__VA_ARGS__)
|
||||
#else
|
||||
#define LV_TRACE_LAYOUT(...)
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#if LV_USE_FLEX
|
||||
|
||||
/*********************
|
@ -6,7 +6,7 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_layouts.h"
|
||||
#include "lv_grid.h"
|
||||
|
||||
#if LV_USE_GRID
|
||||
|
||||
@ -40,7 +40,6 @@ typedef struct {
|
||||
lv_coord_t grid_h;
|
||||
} _lv_grid_calc_t;
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
@ -121,6 +120,11 @@ lv_style_prop_t LV_STYLE_GRID_CELL_Y_ALIGN;
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
#if LV_USE_LOG && LV_LOG_TRACE_LAYOUT
|
||||
#define LV_TRACE_LAYOUT(...) LV_LOG_TRACE(__VA_ARGS__)
|
||||
#else
|
||||
#define LV_TRACE_LAYOUT(...)
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#if LV_USE_GRID
|
||||
|
||||
/*********************
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
#if LV_USE_BMP
|
||||
|
||||
/*********************
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -1,7 +1,7 @@
|
||||
#include "gifdec.h"
|
||||
#include "../../../misc/lv_log.h"
|
||||
#include "../../../misc/lv_mem.h"
|
||||
#include "../../../misc/lv_color.h"
|
||||
#include "../../misc/lv_log.h"
|
||||
#include "../../misc/lv_mem.h"
|
||||
#include "../../misc/lv_color.h"
|
||||
#if LV_USE_GIF
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -20,10 +20,10 @@ typedef struct Entry {
|
||||
typedef struct Table {
|
||||
int bulk;
|
||||
int nentries;
|
||||
Entry *entries;
|
||||
Entry * entries;
|
||||
} Table;
|
||||
|
||||
static gd_GIF * gif_open(gd_GIF * gif);
|
||||
static gd_GIF * gif_open(gd_GIF * gif);
|
||||
static bool f_gif_open(gd_GIF * gif, const void * path, bool is_file);
|
||||
static void f_gif_read(gd_GIF * gif, void * buf, size_t len);
|
||||
static int f_gif_seek(gd_GIF * gif, size_t pos, int k);
|
||||
@ -41,7 +41,7 @@ read_num(gd_GIF * gif)
|
||||
|
||||
|
||||
gd_GIF *
|
||||
gd_open_gif_file(const char *fname)
|
||||
gd_open_gif_file(const char * fname)
|
||||
{
|
||||
gd_GIF gif_base;
|
||||
memset(&gif_base, 0, sizeof(gif_base));
|
||||
@ -54,7 +54,7 @@ gd_open_gif_file(const char *fname)
|
||||
|
||||
|
||||
gd_GIF *
|
||||
gd_open_gif_data(const void *data)
|
||||
gd_open_gif_data(const void * data)
|
||||
{
|
||||
gd_GIF gif_base;
|
||||
memset(&gif_base, 0, sizeof(gif_base));
|
||||
@ -71,19 +71,19 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
|
||||
uint16_t width, height, depth;
|
||||
uint8_t fdsz, bgidx, aspect;
|
||||
int i;
|
||||
uint8_t *bgcolor;
|
||||
uint8_t * bgcolor;
|
||||
int gct_sz;
|
||||
gd_GIF *gif = NULL;
|
||||
gd_GIF * gif = NULL;
|
||||
|
||||
/* Header */
|
||||
f_gif_read(gif_base, sigver, 3);
|
||||
if (memcmp(sigver, "GIF", 3) != 0) {
|
||||
if(memcmp(sigver, "GIF", 3) != 0) {
|
||||
LV_LOG_WARN("invalid signature\n");
|
||||
goto fail;
|
||||
}
|
||||
/* Version */
|
||||
f_gif_read(gif_base, sigver, 3);
|
||||
if (memcmp(sigver, "89a", 3) != 0) {
|
||||
if(memcmp(sigver, "89a", 3) != 0) {
|
||||
LV_LOG_WARN("invalid version\n");
|
||||
goto fail;
|
||||
}
|
||||
@ -93,7 +93,7 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
|
||||
/* FDSZ */
|
||||
f_gif_read(gif_base, &fdsz, 1);
|
||||
/* Presence of GCT */
|
||||
if (!(fdsz & 0x80)) {
|
||||
if(!(fdsz & 0x80)) {
|
||||
LV_LOG_WARN("no global color table\n");
|
||||
goto fail;
|
||||
}
|
||||
@ -115,7 +115,7 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
|
||||
gif = lv_malloc(sizeof(gd_GIF) + 3 * width * height);
|
||||
#endif
|
||||
|
||||
if (!gif) goto fail;
|
||||
if(!gif) goto fail;
|
||||
memcpy(gif, gif_base, sizeof(gd_GIF));
|
||||
gif->width = width;
|
||||
gif->height = height;
|
||||
@ -133,30 +133,30 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
|
||||
#elif LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
|
||||
gif->frame = &gif->canvas[2 * width * height];
|
||||
#endif
|
||||
if (gif->bgindex) {
|
||||
if(gif->bgindex) {
|
||||
memset(gif->frame, gif->bgindex, gif->width * gif->height);
|
||||
}
|
||||
bgcolor = &gif->palette->colors[gif->bgindex*3];
|
||||
bgcolor = &gif->palette->colors[gif->bgindex * 3];
|
||||
|
||||
for (i = 0; i < gif->width * gif->height; i++) {
|
||||
for(i = 0; i < gif->width * gif->height; i++) {
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
gif->canvas[i*4 + 0] = *(bgcolor + 2);
|
||||
gif->canvas[i*4 + 1] = *(bgcolor + 1);
|
||||
gif->canvas[i*4 + 2] = *(bgcolor + 0);
|
||||
gif->canvas[i*4 + 3] = 0xff;
|
||||
gif->canvas[i * 4 + 0] = *(bgcolor + 2);
|
||||
gif->canvas[i * 4 + 1] = *(bgcolor + 1);
|
||||
gif->canvas[i * 4 + 2] = *(bgcolor + 0);
|
||||
gif->canvas[i * 4 + 3] = 0xff;
|
||||
#elif LV_COLOR_DEPTH == 16
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[i*3 + 0] = c.full & 0xff;
|
||||
gif->canvas[i*3 + 1] = (c.full >> 8) & 0xff;
|
||||
gif->canvas[i*3 + 2] = 0xff;
|
||||
gif->canvas[i * 3 + 0] = c.full & 0xff;
|
||||
gif->canvas[i * 3 + 1] = (c.full >> 8) & 0xff;
|
||||
gif->canvas[i * 3 + 2] = 0xff;
|
||||
#elif LV_COLOR_DEPTH == 8
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[i*2 + 0] = c.full;
|
||||
gif->canvas[i*2 + 1] = 0xff;
|
||||
gif->canvas[i * 2 + 0] = c.full;
|
||||
gif->canvas[i * 2 + 1] = 0xff;
|
||||
#elif LV_COLOR_DEPTH == 1
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[i*2 + 0] = c.ch.red > 128 ? 1 : 0;
|
||||
gif->canvas[i*2 + 1] = 0xff;
|
||||
gif->canvas[i * 2 + 0] = c.ch.red > 128 ? 1 : 0;
|
||||
gif->canvas[i * 2 + 1] = 0xff;
|
||||
#endif
|
||||
}
|
||||
gif->anim_start = f_gif_seek(gif, 0, LV_FS_SEEK_CUR);
|
||||
@ -168,20 +168,20 @@ ok:
|
||||
}
|
||||
|
||||
static void
|
||||
discard_sub_blocks(gd_GIF *gif)
|
||||
discard_sub_blocks(gd_GIF * gif)
|
||||
{
|
||||
uint8_t size;
|
||||
|
||||
do {
|
||||
f_gif_read(gif, &size, 1);
|
||||
f_gif_seek(gif, size, LV_FS_SEEK_CUR);
|
||||
} while (size);
|
||||
} while(size);
|
||||
}
|
||||
|
||||
static void
|
||||
read_plain_text_ext(gd_GIF *gif)
|
||||
read_plain_text_ext(gd_GIF * gif)
|
||||
{
|
||||
if (gif->plain_text) {
|
||||
if(gif->plain_text) {
|
||||
uint16_t tx, ty, tw, th;
|
||||
uint8_t cw, ch, fg, bg;
|
||||
size_t sub_block;
|
||||
@ -197,7 +197,8 @@ read_plain_text_ext(gd_GIF *gif)
|
||||
sub_block = f_gif_seek(gif, 0, LV_FS_SEEK_CUR);
|
||||
gif->plain_text(gif, tx, ty, tw, th, cw, ch, fg, bg);
|
||||
f_gif_seek(gif, sub_block, LV_FS_SEEK_SET);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
/* Discard plain text metadata. */
|
||||
f_gif_seek(gif, 13, LV_FS_SEEK_CUR);
|
||||
}
|
||||
@ -206,7 +207,7 @@ read_plain_text_ext(gd_GIF *gif)
|
||||
}
|
||||
|
||||
static void
|
||||
read_graphic_control_ext(gd_GIF *gif)
|
||||
read_graphic_control_ext(gd_GIF * gif)
|
||||
{
|
||||
uint8_t rdit;
|
||||
|
||||
@ -223,9 +224,9 @@ read_graphic_control_ext(gd_GIF *gif)
|
||||
}
|
||||
|
||||
static void
|
||||
read_comment_ext(gd_GIF *gif)
|
||||
read_comment_ext(gd_GIF * gif)
|
||||
{
|
||||
if (gif->comment) {
|
||||
if(gif->comment) {
|
||||
size_t sub_block = f_gif_seek(gif, 0, LV_FS_SEEK_CUR);
|
||||
gif->comment(gif);
|
||||
f_gif_seek(gif, sub_block, LV_FS_SEEK_SET);
|
||||
@ -235,7 +236,7 @@ read_comment_ext(gd_GIF *gif)
|
||||
}
|
||||
|
||||
static void
|
||||
read_application_ext(gd_GIF *gif)
|
||||
read_application_ext(gd_GIF * gif)
|
||||
{
|
||||
char app_id[8];
|
||||
char app_auth_code[3];
|
||||
@ -246,43 +247,45 @@ read_application_ext(gd_GIF *gif)
|
||||
f_gif_read(gif, app_id, 8);
|
||||
/* Application Authentication Code. */
|
||||
f_gif_read(gif, app_auth_code, 3);
|
||||
if (!strncmp(app_id, "NETSCAPE", sizeof(app_id))) {
|
||||
if(!strncmp(app_id, "NETSCAPE", sizeof(app_id))) {
|
||||
/* Discard block size (0x03) and constant byte (0x01). */
|
||||
f_gif_seek(gif, 2, LV_FS_SEEK_CUR);
|
||||
gif->loop_count = read_num(gif);
|
||||
/* Skip block terminator. */
|
||||
f_gif_seek(gif, 1, LV_FS_SEEK_CUR);
|
||||
} else if (gif->application) {
|
||||
}
|
||||
else if(gif->application) {
|
||||
size_t sub_block = f_gif_seek(gif, 0, LV_FS_SEEK_CUR);
|
||||
gif->application(gif, app_id, app_auth_code);
|
||||
f_gif_seek(gif, sub_block, LV_FS_SEEK_SET);
|
||||
discard_sub_blocks(gif);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
discard_sub_blocks(gif);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
read_ext(gd_GIF *gif)
|
||||
read_ext(gd_GIF * gif)
|
||||
{
|
||||
uint8_t label;
|
||||
|
||||
f_gif_read(gif, &label, 1);
|
||||
switch (label) {
|
||||
case 0x01:
|
||||
read_plain_text_ext(gif);
|
||||
break;
|
||||
case 0xF9:
|
||||
read_graphic_control_ext(gif);
|
||||
break;
|
||||
case 0xFE:
|
||||
read_comment_ext(gif);
|
||||
break;
|
||||
case 0xFF:
|
||||
read_application_ext(gif);
|
||||
break;
|
||||
default:
|
||||
LV_LOG_WARN("unknown extension: %02X\n", label);
|
||||
switch(label) {
|
||||
case 0x01:
|
||||
read_plain_text_ext(gif);
|
||||
break;
|
||||
case 0xF9:
|
||||
read_graphic_control_ext(gif);
|
||||
break;
|
||||
case 0xFE:
|
||||
read_comment_ext(gif);
|
||||
break;
|
||||
case 0xFF:
|
||||
read_application_ext(gif);
|
||||
break;
|
||||
default:
|
||||
LV_LOG_WARN("unknown extension: %02X\n", label);
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,13 +294,15 @@ new_table(int key_size)
|
||||
{
|
||||
int key;
|
||||
int init_bulk = MAX(1 << (key_size + 1), 0x100);
|
||||
Table *table = lv_malloc(sizeof(*table) + sizeof(Entry) * init_bulk);
|
||||
if (table) {
|
||||
Table * table = lv_malloc(sizeof(*table) + sizeof(Entry) * init_bulk);
|
||||
if(table) {
|
||||
table->bulk = init_bulk;
|
||||
table->nentries = (1 << key_size) + 2;
|
||||
table->entries = (Entry *) &table[1];
|
||||
for (key = 0; key < (1 << key_size); key++)
|
||||
table->entries[key] = (Entry) {1, 0xFFF, key};
|
||||
for(key = 0; key < (1 << key_size); key++)
|
||||
table->entries[key] = (Entry) {
|
||||
1, 0xFFF, key
|
||||
};
|
||||
}
|
||||
return table;
|
||||
}
|
||||
@ -307,25 +312,27 @@ new_table(int key_size)
|
||||
* +1 if key size must be incremented after this addition
|
||||
* -1 if could not realloc table */
|
||||
static int
|
||||
add_entry(Table **tablep, uint16_t length, uint16_t prefix, uint8_t suffix)
|
||||
add_entry(Table ** tablep, uint16_t length, uint16_t prefix, uint8_t suffix)
|
||||
{
|
||||
Table *table = *tablep;
|
||||
if (table->nentries == table->bulk) {
|
||||
Table * table = *tablep;
|
||||
if(table->nentries == table->bulk) {
|
||||
table->bulk *= 2;
|
||||
table = lv_realloc(table, sizeof(*table) + sizeof(Entry) * table->bulk);
|
||||
if (!table) return -1;
|
||||
if(!table) return -1;
|
||||
table->entries = (Entry *) &table[1];
|
||||
*tablep = table;
|
||||
}
|
||||
table->entries[table->nentries] = (Entry) {length, prefix, suffix};
|
||||
table->entries[table->nentries] = (Entry) {
|
||||
length, prefix, suffix
|
||||
};
|
||||
table->nentries++;
|
||||
if ((table->nentries & (table->nentries - 1)) == 0)
|
||||
if((table->nentries & (table->nentries - 1)) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint16_t
|
||||
get_key(gd_GIF *gif, int key_size, uint8_t *sub_len, uint8_t *shift, uint8_t *byte)
|
||||
get_key(gd_GIF * gif, int key_size, uint8_t * sub_len, uint8_t * shift, uint8_t * byte)
|
||||
{
|
||||
int bits_read;
|
||||
int rpad;
|
||||
@ -333,19 +340,19 @@ get_key(gd_GIF *gif, int key_size, uint8_t *sub_len, uint8_t *shift, uint8_t *by
|
||||
uint16_t key;
|
||||
|
||||
key = 0;
|
||||
for (bits_read = 0; bits_read < key_size; bits_read += frag_size) {
|
||||
for(bits_read = 0; bits_read < key_size; bits_read += frag_size) {
|
||||
rpad = (*shift + bits_read) % 8;
|
||||
if (rpad == 0) {
|
||||
if(rpad == 0) {
|
||||
/* Update byte. */
|
||||
if (*sub_len == 0) {
|
||||
if(*sub_len == 0) {
|
||||
f_gif_read(gif, sub_len, 1); /* Must be nonzero! */
|
||||
if (*sub_len == 0) return 0x1000;
|
||||
if(*sub_len == 0) return 0x1000;
|
||||
}
|
||||
f_gif_read(gif, byte, 1);
|
||||
(*sub_len)--;
|
||||
}
|
||||
frag_size = MIN(key_size - bits_read, 8 - rpad);
|
||||
key |= ((uint16_t) ((*byte) >> rpad)) << bits_read;
|
||||
key |= ((uint16_t)((*byte) >> rpad)) << bits_read;
|
||||
}
|
||||
/* Clear extra bits to the left. */
|
||||
key &= (1 << key_size) - 1;
|
||||
@ -360,15 +367,15 @@ interlaced_line_index(int h, int y)
|
||||
int p; /* number of lines in current pass */
|
||||
|
||||
p = (h - 1) / 8 + 1;
|
||||
if (y < p) /* pass 1 */
|
||||
if(y < p) /* pass 1 */
|
||||
return y * 8;
|
||||
y -= p;
|
||||
p = (h - 5) / 8 + 1;
|
||||
if (y < p) /* pass 2 */
|
||||
if(y < p) /* pass 2 */
|
||||
return y * 8 + 4;
|
||||
y -= p;
|
||||
p = (h - 3) / 4 + 1;
|
||||
if (y < p) /* pass 3 */
|
||||
if(y < p) /* pass 3 */
|
||||
return y * 4 + 2;
|
||||
y -= p;
|
||||
/* pass 4 */
|
||||
@ -378,14 +385,14 @@ interlaced_line_index(int h, int y)
|
||||
/* Decompress image pixels.
|
||||
* Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table). */
|
||||
static int
|
||||
read_image_data(gd_GIF *gif, int interlace)
|
||||
read_image_data(gd_GIF * gif, int interlace)
|
||||
{
|
||||
uint8_t sub_len, shift, byte;
|
||||
int init_key_size, key_size, table_is_full=0;
|
||||
int frm_off, frm_size, str_len=0, i, p, x, y;
|
||||
int init_key_size, key_size, table_is_full = 0;
|
||||
int frm_off, frm_size, str_len = 0, i, p, x, y;
|
||||
uint16_t key, clear, stop;
|
||||
int ret;
|
||||
Table *table;
|
||||
Table * table;
|
||||
Entry entry = {0};
|
||||
size_t start, end;
|
||||
|
||||
@ -404,47 +411,48 @@ read_image_data(gd_GIF *gif, int interlace)
|
||||
key = get_key(gif, key_size, &sub_len, &shift, &byte); /* clear code */
|
||||
frm_off = 0;
|
||||
ret = 0;
|
||||
frm_size = gif->fw*gif->fh;
|
||||
while (frm_off < frm_size) {
|
||||
if (key == clear) {
|
||||
frm_size = gif->fw * gif->fh;
|
||||
while(frm_off < frm_size) {
|
||||
if(key == clear) {
|
||||
key_size = init_key_size;
|
||||
table->nentries = (1 << (key_size - 1)) + 2;
|
||||
table_is_full = 0;
|
||||
} else if (!table_is_full) {
|
||||
}
|
||||
else if(!table_is_full) {
|
||||
ret = add_entry(&table, str_len + 1, key, entry.suffix);
|
||||
if (ret == -1) {
|
||||
if(ret == -1) {
|
||||
lv_free(table);
|
||||
return -1;
|
||||
}
|
||||
if (table->nentries == 0x1000) {
|
||||
if(table->nentries == 0x1000) {
|
||||
ret = 0;
|
||||
table_is_full = 1;
|
||||
}
|
||||
}
|
||||
key = get_key(gif, key_size, &sub_len, &shift, &byte);
|
||||
if (key == clear) continue;
|
||||
if (key == stop || key == 0x1000) break;
|
||||
if (ret == 1) key_size++;
|
||||
if(key == clear) continue;
|
||||
if(key == stop || key == 0x1000) break;
|
||||
if(ret == 1) key_size++;
|
||||
entry = table->entries[key];
|
||||
str_len = entry.length;
|
||||
for (i = 0; i < str_len; i++) {
|
||||
for(i = 0; i < str_len; i++) {
|
||||
p = frm_off + entry.length - 1;
|
||||
x = p % gif->fw;
|
||||
y = p / gif->fw;
|
||||
if (interlace)
|
||||
if(interlace)
|
||||
y = interlaced_line_index((int) gif->fh, y);
|
||||
gif->frame[(gif->fy + y) * gif->width + gif->fx + x] = entry.suffix;
|
||||
if (entry.prefix == 0xFFF)
|
||||
if(entry.prefix == 0xFFF)
|
||||
break;
|
||||
else
|
||||
entry = table->entries[entry.prefix];
|
||||
}
|
||||
frm_off += str_len;
|
||||
if (key < table->nentries - 1 && !table_is_full)
|
||||
if(key < table->nentries - 1 && !table_is_full)
|
||||
table->entries[table->nentries - 1].suffix = entry.suffix;
|
||||
}
|
||||
lv_free(table);
|
||||
if (key == stop) f_gif_read(gif, &sub_len, 1); /* Must be zero! */
|
||||
if(key == stop) f_gif_read(gif, &sub_len, 1); /* Must be zero! */
|
||||
f_gif_seek(gif, end, LV_FS_SEEK_SET);
|
||||
return 0;
|
||||
}
|
||||
@ -452,7 +460,7 @@ read_image_data(gd_GIF *gif, int interlace)
|
||||
/* Read image.
|
||||
* Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table). */
|
||||
static int
|
||||
read_image(gd_GIF *gif)
|
||||
read_image(gd_GIF * gif)
|
||||
{
|
||||
uint8_t fisrz;
|
||||
int interlace;
|
||||
@ -466,46 +474,47 @@ read_image(gd_GIF *gif)
|
||||
interlace = fisrz & 0x40;
|
||||
/* Ignore Sort Flag. */
|
||||
/* Local Color Table? */
|
||||
if (fisrz & 0x80) {
|
||||
if(fisrz & 0x80) {
|
||||
/* Read LCT */
|
||||
gif->lct.size = 1 << ((fisrz & 0x07) + 1);
|
||||
f_gif_read(gif, gif->lct.colors, 3 * gif->lct.size);
|
||||
gif->palette = &gif->lct;
|
||||
} else
|
||||
}
|
||||
else
|
||||
gif->palette = &gif->gct;
|
||||
/* Image Data. */
|
||||
return read_image_data(gif, interlace);
|
||||
}
|
||||
|
||||
static void
|
||||
render_frame_rect(gd_GIF *gif, uint8_t *buffer)
|
||||
render_frame_rect(gd_GIF * gif, uint8_t * buffer)
|
||||
{
|
||||
int i, j, k;
|
||||
uint8_t index, *color;
|
||||
i = gif->fy * gif->width + gif->fx;
|
||||
for (j = 0; j < gif->fh; j++) {
|
||||
for (k = 0; k < gif->fw; k++) {
|
||||
for(j = 0; j < gif->fh; j++) {
|
||||
for(k = 0; k < gif->fw; k++) {
|
||||
index = gif->frame[(gif->fy + j) * gif->width + gif->fx + k];
|
||||
color = &gif->palette->colors[index*3];
|
||||
if (!gif->gce.transparency || index != gif->gce.tindex) {
|
||||
color = &gif->palette->colors[index * 3];
|
||||
if(!gif->gce.transparency || index != gif->gce.tindex) {
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
buffer[(i+k)*4 + 0] = *(color + 2);
|
||||
buffer[(i+k)*4 + 1] = *(color + 1);
|
||||
buffer[(i+k)*4 + 2] = *(color + 0);
|
||||
buffer[(i+k)*4 + 3] = 0xFF;
|
||||
buffer[(i + k) * 4 + 0] = *(color + 2);
|
||||
buffer[(i + k) * 4 + 1] = *(color + 1);
|
||||
buffer[(i + k) * 4 + 2] = *(color + 0);
|
||||
buffer[(i + k) * 4 + 3] = 0xFF;
|
||||
#elif LV_COLOR_DEPTH == 16
|
||||
lv_color_t c = lv_color_make(*(color + 0), *(color + 1), *(color + 2));
|
||||
buffer[(i+k)*3 + 0] = c.full & 0xff;
|
||||
buffer[(i+k)*3 + 1] = (c.full >> 8) & 0xff;
|
||||
buffer[(i+k)*3 + 2] = 0xff;
|
||||
buffer[(i + k) * 3 + 0] = c.full & 0xff;
|
||||
buffer[(i + k) * 3 + 1] = (c.full >> 8) & 0xff;
|
||||
buffer[(i + k) * 3 + 2] = 0xff;
|
||||
#elif LV_COLOR_DEPTH == 8
|
||||
lv_color_t c = lv_color_make(*(color + 0), *(color + 1), *(color + 2));
|
||||
buffer[(i+k)*2 + 0] = c.full;
|
||||
buffer[(i+k)*2 + 1] = 0xff;
|
||||
buffer[(i + k) * 2 + 0] = c.full;
|
||||
buffer[(i + k) * 2 + 1] = 0xff;
|
||||
#elif LV_COLOR_DEPTH == 1
|
||||
uint8_t b = (*(color + 0)) | (*(color + 1)) | (*(color + 2));
|
||||
buffer[(i+k)*2 + 0] = b > 128 ? 1 : 0;
|
||||
buffer[(i+k)*2 + 1] = 0xff;
|
||||
buffer[(i + k) * 2 + 0] = b > 128 ? 1 : 0;
|
||||
buffer[(i + k) * 2 + 1] = 0xff;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -514,95 +523,95 @@ render_frame_rect(gd_GIF *gif, uint8_t *buffer)
|
||||
}
|
||||
|
||||
static void
|
||||
dispose(gd_GIF *gif)
|
||||
dispose(gd_GIF * gif)
|
||||
{
|
||||
int i, j, k;
|
||||
uint8_t *bgcolor;
|
||||
switch (gif->gce.disposal) {
|
||||
case 2: /* Restore to background color. */
|
||||
bgcolor = &gif->palette->colors[gif->bgindex*3];
|
||||
uint8_t * bgcolor;
|
||||
switch(gif->gce.disposal) {
|
||||
case 2: /* Restore to background color. */
|
||||
bgcolor = &gif->palette->colors[gif->bgindex * 3];
|
||||
|
||||
uint8_t opa = 0xff;
|
||||
if(gif->gce.transparency) opa = 0x00;
|
||||
uint8_t opa = 0xff;
|
||||
if(gif->gce.transparency) opa = 0x00;
|
||||
|
||||
i = gif->fy * gif->width + gif->fx;
|
||||
for (j = 0; j < gif->fh; j++) {
|
||||
for (k = 0; k < gif->fw; k++) {
|
||||
i = gif->fy * gif->width + gif->fx;
|
||||
for(j = 0; j < gif->fh; j++) {
|
||||
for(k = 0; k < gif->fw; k++) {
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
gif->canvas[(i+k)*4 + 0] = *(bgcolor + 2);
|
||||
gif->canvas[(i+k)*4 + 1] = *(bgcolor + 1);
|
||||
gif->canvas[(i+k)*4 + 2] = *(bgcolor + 0);
|
||||
gif->canvas[(i+k)*4 + 3] = opa;
|
||||
gif->canvas[(i + k) * 4 + 0] = *(bgcolor + 2);
|
||||
gif->canvas[(i + k) * 4 + 1] = *(bgcolor + 1);
|
||||
gif->canvas[(i + k) * 4 + 2] = *(bgcolor + 0);
|
||||
gif->canvas[(i + k) * 4 + 3] = opa;
|
||||
#elif LV_COLOR_DEPTH == 16
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[(i+k)*3 + 0] = c.full & 0xff;
|
||||
gif->canvas[(i+k)*3 + 1] = (c.full >> 8) & 0xff;
|
||||
gif->canvas[(i+k)*3 + 2] = opa;
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[(i + k) * 3 + 0] = c.full & 0xff;
|
||||
gif->canvas[(i + k) * 3 + 1] = (c.full >> 8) & 0xff;
|
||||
gif->canvas[(i + k) * 3 + 2] = opa;
|
||||
#elif LV_COLOR_DEPTH == 8
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[(i+k)*2 + 0] = c.full;
|
||||
gif->canvas[(i+k)*2 + 1] = opa;
|
||||
lv_color_t c = lv_color_make(*(bgcolor + 0), *(bgcolor + 1), *(bgcolor + 2));
|
||||
gif->canvas[(i + k) * 2 + 0] = c.full;
|
||||
gif->canvas[(i + k) * 2 + 1] = opa;
|
||||
#elif LV_COLOR_DEPTH == 1
|
||||
uint8_t b = (*(bgcolor + 0)) | (*(bgcolor + 1)) | (*(bgcolor + 2));
|
||||
gif->canvas[(i+k)*2 + 0] = b > 128 ? 1 : 0;
|
||||
gif->canvas[(i+k)*2 + 1] = opa;
|
||||
uint8_t b = (*(bgcolor + 0)) | (*(bgcolor + 1)) | (*(bgcolor + 2));
|
||||
gif->canvas[(i + k) * 2 + 0] = b > 128 ? 1 : 0;
|
||||
gif->canvas[(i + k) * 2 + 1] = opa;
|
||||
#endif
|
||||
}
|
||||
i += gif->width;
|
||||
}
|
||||
i += gif->width;
|
||||
}
|
||||
break;
|
||||
case 3: /* Restore to previous, i.e., don't update canvas.*/
|
||||
break;
|
||||
default:
|
||||
/* Add frame non-transparent pixels to canvas. */
|
||||
render_frame_rect(gif, gif->canvas);
|
||||
break;
|
||||
case 3: /* Restore to previous, i.e., don't update canvas.*/
|
||||
break;
|
||||
default:
|
||||
/* Add frame non-transparent pixels to canvas. */
|
||||
render_frame_rect(gif, gif->canvas);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return 1 if got a frame; 0 if got GIF trailer; -1 if error. */
|
||||
int
|
||||
gd_get_frame(gd_GIF *gif)
|
||||
gd_get_frame(gd_GIF * gif)
|
||||
{
|
||||
char sep;
|
||||
|
||||
dispose(gif);
|
||||
f_gif_read(gif, &sep, 1);
|
||||
while (sep != ',') {
|
||||
if (sep == ';')
|
||||
while(sep != ',') {
|
||||
if(sep == ';')
|
||||
return 0;
|
||||
if (sep == '!')
|
||||
if(sep == '!')
|
||||
read_ext(gif);
|
||||
else return -1;
|
||||
f_gif_read(gif, &sep, 1);
|
||||
}
|
||||
if (read_image(gif) == -1)
|
||||
if(read_image(gif) == -1)
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
gd_render_frame(gd_GIF *gif, uint8_t *buffer)
|
||||
gd_render_frame(gd_GIF * gif, uint8_t * buffer)
|
||||
{
|
||||
// uint32_t i;
|
||||
// uint32_t j;
|
||||
// for(i = 0, j = 0; i < gif->width * gif->height * 3; i+= 3, j+=4) {
|
||||
// buffer[j + 0] = gif->canvas[i + 2];
|
||||
// buffer[j + 1] = gif->canvas[i + 1];
|
||||
// buffer[j + 2] = gif->canvas[i + 0];
|
||||
// buffer[j + 3] = 0xFF;
|
||||
// }
|
||||
// memcpy(buffer, gif->canvas, gif->width * gif->height * 3);
|
||||
// uint32_t i;
|
||||
// uint32_t j;
|
||||
// for(i = 0, j = 0; i < gif->width * gif->height * 3; i+= 3, j+=4) {
|
||||
// buffer[j + 0] = gif->canvas[i + 2];
|
||||
// buffer[j + 1] = gif->canvas[i + 1];
|
||||
// buffer[j + 2] = gif->canvas[i + 0];
|
||||
// buffer[j + 3] = 0xFF;
|
||||
// }
|
||||
// memcpy(buffer, gif->canvas, gif->width * gif->height * 3);
|
||||
render_frame_rect(gif, buffer);
|
||||
}
|
||||
|
||||
void
|
||||
gd_rewind(gd_GIF *gif)
|
||||
gd_rewind(gd_GIF * gif)
|
||||
{
|
||||
f_gif_seek(gif, gif->anim_start, LV_FS_SEEK_SET);
|
||||
}
|
||||
|
||||
void
|
||||
gd_close_gif(gd_GIF *gif)
|
||||
gd_close_gif(gd_GIF * gif)
|
||||
{
|
||||
f_gif_close(gif);
|
||||
lv_free(gif);
|
||||
@ -618,7 +627,8 @@ static bool f_gif_open(gd_GIF * gif, const void * path, bool is_file)
|
||||
lv_fs_res_t res = lv_fs_open(&gif->fd, path, LV_FS_MODE_RD);
|
||||
if(res != LV_FS_RES_OK) return false;
|
||||
else return true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
gif->data = path;
|
||||
return true;
|
||||
}
|
||||
@ -628,8 +638,8 @@ static void f_gif_read(gd_GIF * gif, void * buf, size_t len)
|
||||
{
|
||||
if(gif->is_file) {
|
||||
lv_fs_read(&gif->fd, buf, len, NULL);
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
memcpy(buf, &gif->data[gif->f_rw_p], len);
|
||||
gif->f_rw_p += len;
|
||||
}
|
||||
@ -642,7 +652,8 @@ static int f_gif_seek(gd_GIF * gif, size_t pos, int k)
|
||||
uint32_t x;
|
||||
lv_fs_tell(&gif->fd, &x);
|
||||
return x;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if(k == LV_FS_SEEK_CUR) gif->f_rw_p += pos;
|
||||
else if(k == LV_FS_SEEK_SET) gif->f_rw_p = pos;
|
||||
return gif->f_rw_p;
|
@ -2,7 +2,7 @@
|
||||
#define GIFDEC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../../../misc/lv_fs.h"
|
||||
#include "../../misc/lv_fs.h"
|
||||
|
||||
#if LV_USE_GIF
|
||||
|
||||
@ -31,29 +31,29 @@ typedef struct gd_GIF {
|
||||
uint16_t depth;
|
||||
uint16_t loop_count;
|
||||
gd_GCE gce;
|
||||
gd_Palette *palette;
|
||||
gd_Palette * palette;
|
||||
gd_Palette lct, gct;
|
||||
void (*plain_text)(
|
||||
struct gd_GIF *gif, uint16_t tx, uint16_t ty,
|
||||
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]);
|
||||
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;
|
||||
uint8_t * canvas, *frame;
|
||||
} gd_GIF;
|
||||
|
||||
gd_GIF * gd_open_gif_file(const char *fname);
|
||||
gd_GIF * gd_open_gif_file(const char * fname);
|
||||
|
||||
gd_GIF * gd_open_gif_data(const void *data);
|
||||
gd_GIF * gd_open_gif_data(const void * data);
|
||||
|
||||
void gd_render_frame(gd_GIF *gif, uint8_t *buffer);
|
||||
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);
|
||||
int gd_get_frame(gd_GIF * gif);
|
||||
void gd_rewind(gd_GIF * gif);
|
||||
void gd_close_gif(gd_GIF * gif);
|
||||
|
||||
#endif /*LV_USE_GIF*/
|
||||
|
7040
src/libs/png/lodepng.c
Normal file
7040
src/libs/png/lodepng.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
#if LV_USE_PNG
|
||||
|
||||
/*********************
|
1113
src/libs/qrcode/qrcodegen.c
Normal file
1113
src/libs/qrcode/qrcodegen.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -55,12 +55,12 @@ extern "C" {
|
||||
* The error correction level in a QR Code symbol.
|
||||
*/
|
||||
enum qrcodegen_Ecc {
|
||||
// Must be declared in ascending order of error protection
|
||||
// so that an internal qrcodegen function works properly
|
||||
qrcodegen_Ecc_LOW = 0 , // The QR Code can tolerate about 7% erroneous codewords
|
||||
qrcodegen_Ecc_MEDIUM , // The QR Code can tolerate about 15% erroneous codewords
|
||||
qrcodegen_Ecc_QUARTILE, // The QR Code can tolerate about 25% erroneous codewords
|
||||
qrcodegen_Ecc_HIGH , // The QR Code can tolerate about 30% erroneous codewords
|
||||
// Must be declared in ascending order of error protection
|
||||
// so that an internal qrcodegen function works properly
|
||||
qrcodegen_Ecc_LOW = 0, // The QR Code can tolerate about 7% erroneous codewords
|
||||
qrcodegen_Ecc_MEDIUM, // The QR Code can tolerate about 15% erroneous codewords
|
||||
qrcodegen_Ecc_QUARTILE, // The QR Code can tolerate about 25% erroneous codewords
|
||||
qrcodegen_Ecc_HIGH, // The QR Code can tolerate about 30% erroneous codewords
|
||||
};
|
||||
|
||||
|
||||
@ -68,18 +68,18 @@ enum qrcodegen_Ecc {
|
||||
* The mask pattern used in a QR Code symbol.
|
||||
*/
|
||||
enum qrcodegen_Mask {
|
||||
// A special value to tell the QR Code encoder to
|
||||
// automatically select an appropriate mask pattern
|
||||
qrcodegen_Mask_AUTO = -1,
|
||||
// The eight actual mask patterns
|
||||
qrcodegen_Mask_0 = 0,
|
||||
qrcodegen_Mask_1,
|
||||
qrcodegen_Mask_2,
|
||||
qrcodegen_Mask_3,
|
||||
qrcodegen_Mask_4,
|
||||
qrcodegen_Mask_5,
|
||||
qrcodegen_Mask_6,
|
||||
qrcodegen_Mask_7,
|
||||
// A special value to tell the QR Code encoder to
|
||||
// automatically select an appropriate mask pattern
|
||||
qrcodegen_Mask_AUTO = -1,
|
||||
// The eight actual mask patterns
|
||||
qrcodegen_Mask_0 = 0,
|
||||
qrcodegen_Mask_1,
|
||||
qrcodegen_Mask_2,
|
||||
qrcodegen_Mask_3,
|
||||
qrcodegen_Mask_4,
|
||||
qrcodegen_Mask_5,
|
||||
qrcodegen_Mask_6,
|
||||
qrcodegen_Mask_7,
|
||||
};
|
||||
|
||||
|
||||
@ -87,11 +87,11 @@ enum qrcodegen_Mask {
|
||||
* Describes how a segment's data bits are interpreted.
|
||||
*/
|
||||
enum qrcodegen_Mode {
|
||||
qrcodegen_Mode_NUMERIC = 0x1,
|
||||
qrcodegen_Mode_ALPHANUMERIC = 0x2,
|
||||
qrcodegen_Mode_BYTE = 0x4,
|
||||
qrcodegen_Mode_KANJI = 0x8,
|
||||
qrcodegen_Mode_ECI = 0x7,
|
||||
qrcodegen_Mode_NUMERIC = 0x1,
|
||||
qrcodegen_Mode_ALPHANUMERIC = 0x2,
|
||||
qrcodegen_Mode_BYTE = 0x4,
|
||||
qrcodegen_Mode_KANJI = 0x8,
|
||||
qrcodegen_Mode_ECI = 0x7,
|
||||
};
|
||||
|
||||
|
||||
@ -107,22 +107,22 @@ enum qrcodegen_Mode {
|
||||
* the largest QR Code (version 40) has 31329 modules.
|
||||
*/
|
||||
struct qrcodegen_Segment {
|
||||
// The mode indicator of this segment.
|
||||
enum qrcodegen_Mode mode;
|
||||
|
||||
// The length of this segment's unencoded data. Measured in characters for
|
||||
// numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
|
||||
// Always zero or positive. Not the same as the data's bit length.
|
||||
int numChars;
|
||||
|
||||
// The data bits of this segment, packed in bitwise big endian.
|
||||
// Can be null if the bit length is zero.
|
||||
uint8_t *data;
|
||||
|
||||
// The number of valid data bits used in the buffer. Requires
|
||||
// 0 <= bitLength <= 32767, and bitLength <= (capacity of data array) * 8.
|
||||
// The character count (numChars) must agree with the mode and the bit buffer length.
|
||||
int bitLength;
|
||||
// The mode indicator of this segment.
|
||||
enum qrcodegen_Mode mode;
|
||||
|
||||
// The length of this segment's unencoded data. Measured in characters for
|
||||
// numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
|
||||
// Always zero or positive. Not the same as the data's bit length.
|
||||
int numChars;
|
||||
|
||||
// The data bits of this segment, packed in bitwise big endian.
|
||||
// Can be null if the bit length is zero.
|
||||
uint8_t * data;
|
||||
|
||||
// The number of valid data bits used in the buffer. Requires
|
||||
// 0 <= bitLength <= 32767, and bitLength <= (capacity of data array) * 8.
|
||||
// The character count (numChars) must agree with the mode and the bit buffer length.
|
||||
int bitLength;
|
||||
};
|
||||
|
||||
|
||||
@ -166,8 +166,8 @@ struct qrcodegen_Segment {
|
||||
* - Please consult the QR Code specification for information on
|
||||
* data capacities per version, ECC level, and text encoding mode.
|
||||
*/
|
||||
bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode[],
|
||||
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl);
|
||||
bool qrcodegen_encodeText(const char * text, uint8_t tempBuffer[], uint8_t qrcode[],
|
||||
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl);
|
||||
|
||||
|
||||
/*
|
||||
@ -189,7 +189,7 @@ bool qrcodegen_encodeText(const char *text, uint8_t tempBuffer[], uint8_t qrcode
|
||||
* data capacities per version, ECC level, and text encoding mode.
|
||||
*/
|
||||
bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[],
|
||||
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl);
|
||||
enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl);
|
||||
|
||||
|
||||
/*---- Functions (low level) to generate QR Codes ----*/
|
||||
@ -207,7 +207,7 @@ bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcod
|
||||
* But the qrcode array must not overlap tempBuffer or any segment's data buffer.
|
||||
*/
|
||||
bool qrcodegen_encodeSegments(const struct qrcodegen_Segment segs[], size_t len,
|
||||
enum qrcodegen_Ecc ecl, uint8_t tempBuffer[], uint8_t qrcode[]);
|
||||
enum qrcodegen_Ecc ecl, uint8_t tempBuffer[], uint8_t qrcode[]);
|
||||
|
||||
|
||||
/*
|
||||
@ -226,7 +226,7 @@ bool qrcodegen_encodeSegments(const struct qrcodegen_Segment segs[], size_t len,
|
||||
* But the qrcode array must not overlap tempBuffer or any segment's data buffer.
|
||||
*/
|
||||
bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl,
|
||||
int minVersion, int maxVersion, int mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]);
|
||||
int minVersion, int maxVersion, int mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]);
|
||||
|
||||
|
||||
/*
|
||||
@ -234,14 +234,14 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz
|
||||
* A string is encodable iff each character is in the following set: 0 to 9, A to Z
|
||||
* (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
||||
*/
|
||||
bool qrcodegen_isAlphanumeric(const char *text);
|
||||
bool qrcodegen_isAlphanumeric(const char * text);
|
||||
|
||||
|
||||
/*
|
||||
* Tests whether the given string can be encoded as a segment in numeric mode.
|
||||
* A string is encodable iff each character is in the range 0 to 9.
|
||||
*/
|
||||
bool qrcodegen_isNumeric(const char *text);
|
||||
bool qrcodegen_isNumeric(const char * text);
|
||||
|
||||
|
||||
/*
|
||||
@ -269,7 +269,7 @@ struct qrcodegen_Segment qrcodegen_makeBytes(const uint8_t data[], size_t len, u
|
||||
/*
|
||||
* Returns a segment representing the given string of decimal digits encoded in numeric mode.
|
||||
*/
|
||||
struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]);
|
||||
struct qrcodegen_Segment qrcodegen_makeNumeric(const char * digits, uint8_t buf[]);
|
||||
|
||||
|
||||
/*
|
||||
@ -277,7 +277,7 @@ struct qrcodegen_Segment qrcodegen_makeNumeric(const char *digits, uint8_t buf[]
|
||||
* The characters allowed are: 0 to 9, A to Z (uppercase only), space,
|
||||
* dollar, percent, asterisk, plus, hyphen, period, slash, colon.
|
||||
*/
|
||||
struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char *text, uint8_t buf[]);
|
||||
struct qrcodegen_Segment qrcodegen_makeAlphanumeric(const char * text, uint8_t buf[]);
|
||||
|
||||
|
||||
/*
|
@ -50,7 +50,7 @@
|
||||
|
||||
#include "tjpgd.h"
|
||||
#include "lv_sjpg.h"
|
||||
#include "../../../misc/lv_fs.h"
|
||||
#include "../../misc/lv_fs.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
1209
src/libs/sjpg/tjpgd.c
Normal file
1209
src/libs/sjpg/tjpgd.c
Normal file
File diff suppressed because it is too large
Load Diff
93
src/libs/sjpg/tjpgd.h
Normal file
93
src/libs/sjpg/tjpgd.h
Normal file
@ -0,0 +1,93 @@
|
||||
/*----------------------------------------------------------------------------/
|
||||
/ TJpgDec - Tiny JPEG Decompressor R0.03 include file (C)ChaN, 2021
|
||||
/----------------------------------------------------------------------------*/
|
||||
#ifndef DEF_TJPGDEC
|
||||
#define DEF_TJPGDEC
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "../../lv_conf_internal.h"
|
||||
#if LV_USE_SJPG
|
||||
|
||||
#include "tjpgdcnf.h"
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if JD_FASTDECODE >= 1
|
||||
typedef int16_t jd_yuv_t;
|
||||
#else
|
||||
typedef uint8_t jd_yuv_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* Error code */
|
||||
typedef enum {
|
||||
JDR_OK = 0, /* 0: Succeeded */
|
||||
JDR_INTR, /* 1: Interrupted by output function */
|
||||
JDR_INP, /* 2: Device error or wrong termination of input stream */
|
||||
JDR_MEM1, /* 3: Insufficient memory pool for the image */
|
||||
JDR_MEM2, /* 4: Insufficient stream input buffer */
|
||||
JDR_PAR, /* 5: Parameter error */
|
||||
JDR_FMT1, /* 6: Data format error (may be broken data) */
|
||||
JDR_FMT2, /* 7: Right format but not supported */
|
||||
JDR_FMT3 /* 8: Not supported JPEG standard */
|
||||
} JRESULT;
|
||||
|
||||
/* Rectangular region in the output image */
|
||||
typedef struct {
|
||||
uint16_t left; /* Left end */
|
||||
uint16_t right; /* Right end */
|
||||
uint16_t top; /* Top end */
|
||||
uint16_t bottom; /* Bottom end */
|
||||
} JRECT;
|
||||
|
||||
/* Decompressor object structure */
|
||||
typedef struct JDEC JDEC;
|
||||
struct JDEC {
|
||||
size_t dctr; /* Number of bytes available in the input buffer */
|
||||
uint8_t * dptr; /* Current data read ptr */
|
||||
uint8_t * inbuf; /* Bit stream input buffer */
|
||||
uint8_t dbit; /* Number of bits availavble in wreg or reading bit mask */
|
||||
uint8_t scale; /* Output scaling ratio */
|
||||
uint8_t msx, msy; /* MCU size in unit of block (width, height) */
|
||||
uint8_t qtid[3]; /* Quantization table ID of each component, Y, Cb, Cr */
|
||||
uint8_t ncomp; /* Number of color components 1:grayscale, 3:color */
|
||||
int16_t dcv[3]; /* Previous DC element of each component */
|
||||
uint16_t nrst; /* Restart inverval */
|
||||
uint16_t width, height; /* Size of the input image (pixel) */
|
||||
uint8_t * huffbits[2][2]; /* Huffman bit distribution tables [id][dcac] */
|
||||
uint16_t * huffcode[2][2]; /* Huffman code word tables [id][dcac] */
|
||||
uint8_t * huffdata[2][2]; /* Huffman decoded data tables [id][dcac] */
|
||||
int32_t * qttbl[4]; /* Dequantizer tables [id] */
|
||||
#if JD_FASTDECODE >= 1
|
||||
uint32_t wreg; /* Working shift register */
|
||||
uint8_t marker; /* Detected marker (0:None) */
|
||||
#if JD_FASTDECODE == 2
|
||||
uint8_t longofs[2][2]; /* Table offset of long code [id][dcac] */
|
||||
uint16_t * hufflut_ac[2]; /* Fast huffman decode tables for AC short code [id] */
|
||||
uint8_t * hufflut_dc[2]; /* Fast huffman decode tables for DC short code [id] */
|
||||
#endif
|
||||
#endif
|
||||
void * workbuf; /* Working buffer for IDCT and RGB output */
|
||||
jd_yuv_t * mcubuf; /* Working buffer for the MCU */
|
||||
void * pool; /* Pointer to available memory pool */
|
||||
size_t sz_pool; /* Size of momory pool (bytes available) */
|
||||
size_t (*infunc)(JDEC *, uint8_t *, size_t); /* Pointer to jpeg stream input function */
|
||||
void * device; /* Pointer to I/O device identifiler for the session */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* TJpgDec API functions */
|
||||
JRESULT jd_prepare(JDEC * jd, size_t (*infunc)(JDEC *, uint8_t *, size_t), void * pool, size_t sz_pool, void * dev);
|
||||
JRESULT jd_decomp(JDEC * jd, int (*outfunc)(JDEC *, void *, JRECT *), uint8_t scale);
|
||||
|
||||
#endif /*LV_USE_SJPG*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _TJPGDEC */
|
@ -2,29 +2,29 @@
|
||||
/* TJpgDec System Configurations R0.03 */
|
||||
/*----------------------------------------------*/
|
||||
|
||||
#define JD_SZBUF 512
|
||||
#define JD_SZBUF 512
|
||||
/* Specifies size of stream input buffer */
|
||||
|
||||
#define JD_FORMAT 0
|
||||
#define JD_FORMAT 0
|
||||
/* Specifies output pixel format.
|
||||
/ 0: RGB888 (24-bit/pix)
|
||||
/ 1: RGB565 (16-bit/pix)
|
||||
/ 2: Grayscale (8-bit/pix)
|
||||
*/
|
||||
|
||||
#define JD_USE_SCALE 1
|
||||
#define JD_USE_SCALE 1
|
||||
/* Switches output descaling feature.
|
||||
/ 0: Disable
|
||||
/ 1: Enable
|
||||
*/
|
||||
|
||||
#define JD_TBLCLIP 1
|
||||
#define JD_TBLCLIP 1
|
||||
/* Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size.
|
||||
/ 0: Disable
|
||||
/ 1: Enable
|
||||
*/
|
||||
|
||||
#define JD_FASTDECODE 0
|
||||
#define JD_FASTDECODE 0
|
||||
/* Optimization level
|
||||
/ 0: Basic optimization. Suitable for 8/16-bit MCUs.
|
||||
/ 1: + 32-bit barrel shifter. Suitable for 32-bit MCUs.
|
@ -13,11 +13,10 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
#if LV_USE_FRAGMENT
|
||||
|
||||
#include "../../../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -11,7 +11,7 @@
|
||||
|
||||
#if LV_USE_FRAGMENT
|
||||
|
||||
#include "../../../misc/lv_ll.h"
|
||||
#include "../../misc/lv_ll.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -9,9 +9,9 @@
|
||||
#include "lv_gridnav.h"
|
||||
#if LV_USE_GRIDNAV
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../../misc/lv_math.h"
|
||||
#include "../../../core/lv_indev.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../core/lv_indev.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -53,7 +53,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
#if LV_USE_GRIDNAV
|
||||
|
@ -9,8 +9,8 @@
|
||||
#include "lv_msg.h"
|
||||
#if LV_USE_MSG
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../../misc/lv_ll.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_ll.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#if LV_USE_MSG
|
||||
|
||||
/*********************
|
@ -16,8 +16,7 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "../../../lv_conf_internal.h"
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -11,7 +11,7 @@
|
||||
#if LV_USE_THEME_BASIC
|
||||
|
||||
#include "lv_theme_basic.h"
|
||||
#include "../../../misc/lv_gc.h"
|
||||
#include "../../misc/lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,8 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../core/lv_theme.h"
|
||||
|
||||
#if LV_USE_THEME_BASIC
|
||||
|
@ -11,7 +11,7 @@
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
|
||||
#include "lv_theme_default.h"
|
||||
#include "../../../misc/lv_gc.h"
|
||||
#include "../../misc/lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,8 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../core/lv_theme.h"
|
||||
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
|
@ -11,7 +11,7 @@
|
||||
#if LV_USE_THEME_MONO
|
||||
|
||||
#include "lv_theme_mono.h"
|
||||
#include "../../../misc/lv_gc.h"
|
||||
#include "../../misc/lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
#if LV_USE_THEME_MONO
|
||||
|
@ -14,13 +14,13 @@
|
||||
#error "lv_animimg: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) "
|
||||
#endif
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../../draw/lv_img_decoder.h"
|
||||
#include "../../../misc/lv_fs.h"
|
||||
#include "../../../misc/lv_txt.h"
|
||||
#include "../../../misc/lv_math.h"
|
||||
#include "../../../misc/lv_log.h"
|
||||
#include "../../../misc/lv_anim.h"
|
||||
#include "../../draw/lv_img_decoder.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_fs.h"
|
||||
#include "../../misc/lv_txt.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../misc/lv_log.h"
|
||||
#include "../../misc/lv_anim.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lvgl.h"
|
||||
#include "../img/lv_img.h"
|
||||
|
||||
#if LV_USE_ANIMIMG != 0
|
||||
|
@ -9,11 +9,11 @@
|
||||
#include "lv_arc.h"
|
||||
#if LV_USE_ARC != 0
|
||||
|
||||
#include "../core/lv_group.h"
|
||||
#include "../core/lv_indev.h"
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../draw/lv_draw_arc.h"
|
||||
#include "../../core/lv_group.h"
|
||||
#include "../../core/lv_indev.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../draw/lv_draw_arc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,11 +13,11 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
#if LV_USE_ARC != 0
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -9,10 +9,10 @@
|
||||
#include "lv_bar.h"
|
||||
#if LV_USE_BAR != 0
|
||||
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../misc/lv_anim.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../../draw/lv_draw.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_anim.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,14 +13,13 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
#if LV_USE_BAR != 0
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../misc/lv_anim.h"
|
||||
#include "lv_btn.h"
|
||||
#include "lv_label.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../misc/lv_anim.h"
|
||||
#include "../label/lv_label.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -10,8 +10,6 @@
|
||||
#include "lv_btn.h"
|
||||
#if LV_USE_BTN != 0
|
||||
|
||||
#include "../extra/layouts/flex/lv_flex.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
@ -13,10 +13,10 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
#if LV_USE_BTN != 0
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -9,13 +9,13 @@
|
||||
#include "lv_btnmatrix.h"
|
||||
#if LV_USE_BTNMATRIX != 0
|
||||
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../core/lv_indev.h"
|
||||
#include "../core/lv_group.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../core/lv_refr.h"
|
||||
#include "../misc/lv_txt.h"
|
||||
#include "../misc/lv_txt_ap.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../core/lv_indev.h"
|
||||
#include "../../core/lv_group.h"
|
||||
#include "../../draw/lv_draw.h"
|
||||
#include "../../core/lv_refr.h"
|
||||
#include "../../misc/lv_txt.h"
|
||||
#include "../../misc/lv_txt_ap.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,11 +13,11 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
#if LV_USE_BTNMATRIX != 0
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -10,7 +10,7 @@
|
||||
#include "../../../lvgl.h"
|
||||
#if LV_USE_CALENDAR
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../widgets/lv_btnmatrix.h"
|
||||
#include "../btnmatrix/lv_btnmatrix.h"
|
||||
|
||||
#if LV_USE_CALENDAR
|
||||
|
||||
@ -155,6 +155,9 @@ lv_res_t lv_calendar_get_pressed_date(const lv_obj_t * calendar, lv_calendar_dat
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#include "lv_calendar_header_arrow.h"
|
||||
#include "lv_calendar_header_dropdown.h"
|
||||
|
||||
#endif /*LV_USE_CALENDAR*/
|
||||
|
||||
#ifdef __cplusplus
|
@ -10,8 +10,8 @@
|
||||
#if LV_USE_CALENDAR_HEADER_ARROW
|
||||
|
||||
#include "lv_calendar.h"
|
||||
#include "../../../widgets/lv_btn.h"
|
||||
#include "../../../widgets/lv_label.h"
|
||||
#include "../btn/lv_btn.h"
|
||||
#include "../label/lv_label.h"
|
||||
#include "../../layouts/flex/lv_flex.h"
|
||||
|
||||
/*********************
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#if LV_USE_CALENDAR_HEADER_ARROW
|
||||
|
||||
/*********************
|
@ -10,7 +10,7 @@
|
||||
#if LV_USE_CALENDAR_HEADER_DROPDOWN
|
||||
|
||||
#include "lv_calendar.h"
|
||||
#include "../../../widgets/lv_dropdown.h"
|
||||
#include "../dropdown/lv_dropdown.h"
|
||||
#include "../../layouts/flex/lv_flex.h"
|
||||
|
||||
/*********************
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#if LV_USE_CALENDAR_HEADER_DROPDOWN
|
||||
|
||||
/*********************
|
@ -8,12 +8,12 @@
|
||||
*********************/
|
||||
#include "lv_canvas.h"
|
||||
#if LV_USE_CANVAS != 0
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../core/lv_refr.h"
|
||||
#include "../core/lv_disp.h"
|
||||
#include "../draw/sw/lv_draw_sw.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../draw/lv_draw.h"
|
||||
#include "../../core/lv_refr.h"
|
||||
#include "../../core/lv_disp.h"
|
||||
#include "../../draw/sw/lv_draw_sw.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,13 +13,12 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
|
||||
#if LV_USE_CANVAS != 0
|
||||
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../widgets/lv_img.h"
|
||||
#include "../draw/lv_draw_img.h"
|
||||
#include "../img/lv_img.h"
|
||||
#include "../../draw/lv_draw_img.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -9,7 +9,7 @@
|
||||
#include "lv_chart.h"
|
||||
#if LV_USE_CHART != 0
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lvgl.h"
|
||||
#include "../../lvgl.h"
|
||||
|
||||
#if LV_USE_CHART != 0
|
||||
|
@ -9,10 +9,10 @@
|
||||
#include "lv_checkbox.h"
|
||||
#if LV_USE_CHECKBOX != 0
|
||||
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../misc/lv_txt_ap.h"
|
||||
#include "../core/lv_group.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_txt_ap.h"
|
||||
#include "../../core/lv_group.h"
|
||||
#include "../../draw/lv_draw.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,8 +13,8 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
#if LV_USE_CHECKBOX != 0
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "lv_colorwheel.h"
|
||||
#if LV_USE_COLORWHEEL
|
||||
|
||||
#include "../../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
@ -13,7 +13,7 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../../lvgl.h"
|
||||
#include "../../lvgl.h"
|
||||
|
||||
#if LV_USE_COLORWHEEL
|
||||
|
@ -6,19 +6,19 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "lv_dropdown.h"
|
||||
#if LV_USE_DROPDOWN != 0
|
||||
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../core/lv_group.h"
|
||||
#include "../core/lv_indev.h"
|
||||
#include "../core/lv_disp.h"
|
||||
#include "../font/lv_symbol_def.h"
|
||||
#include "../misc/lv_anim.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../misc/lv_txt_ap.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../draw/lv_draw.h"
|
||||
#include "../../core/lv_group.h"
|
||||
#include "../../core/lv_indev.h"
|
||||
#include "../../core/lv_disp.h"
|
||||
#include "../../font/lv_symbol_def.h"
|
||||
#include "../../misc/lv_anim.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../misc/lv_txt_ap.h"
|
||||
#include <string.h>
|
||||
|
||||
/*********************
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user