Update LVGL to 9.2.2
This commit is contained in:

committed by
Johannes Marbach

parent
a711b61e11
commit
8b1ca6e4cf
@@ -1,15 +1,10 @@
|
||||
#ifdef __has_include
|
||||
#if __has_include("lvgl.h")
|
||||
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#define LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||
#include "lvgl.h"
|
||||
#include "lvgl.h"
|
||||
#elif defined(LV_BUILD_TEST)
|
||||
#include "../lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,99 +12,43 @@
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC
|
||||
#define LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC
|
||||
#ifndef LV_ATTRIBUTE_CURSOR
|
||||
#define LV_ATTRIBUTE_CURSOR
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC uint8_t bbx_cursor_img_dsc_map[] = {
|
||||
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||
/*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
|
||||
0xff, 0xf7, 0xff, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xf7, 0xdb, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x49, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x24, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00,
|
||||
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xf8, 0xff, 0x53,
|
||||
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
|
||||
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0xdb, 0xff, 0x92, 0xff, 0x49, 0xff, 0xb6, 0xff, 0xdb, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x49, 0xff, 0xdb, 0xff, 0xff, 0xef, 0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0xff, 0xfa, 0x6d, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xdb, 0xff, 0xff, 0xe1, 0x00, 0x00, 0xff, 0xeb, 0x6e, 0xff, 0x49, 0xff, 0xdb, 0xff, 0xff, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x9d, 0xdb, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xe6, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfa, 0x6d, 0xff, 0x49, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xb2, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
#endif
|
||||
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
|
||||
/*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit*/
|
||||
0xff, 0xff, 0xf7, 0xdb, 0xde, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xbe, 0xf7, 0xf7, 0x59, 0xce, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x8a, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x04, 0x21, 0xff, 0x8a, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x04, 0x21, 0xff, 0x04, 0x21, 0xff, 0xaa, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x25, 0x29, 0xff, 0x25, 0x29, 0xff, 0x25, 0x29, 0xff, 0xcb, 0x5a, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0xcb, 0x5a, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0xec, 0x62, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x0c, 0x63, 0xff, 0x9e, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0x0c, 0x63, 0xff, 0xbe, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0x2d, 0x6b, 0xff, 0xbe, 0xf7, 0xf8, 0x9a, 0xd6, 0x53,
|
||||
0xff, 0xff, 0xff, 0xe7, 0x39, 0xff, 0xe7, 0x39, 0xff, 0xe8, 0x41, 0xff, 0x08, 0x42, 0xff, 0xe7, 0x39, 0xff, 0x1c, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
|
||||
0xff, 0xff, 0xff, 0xe8, 0x41, 0xff, 0x08, 0x42, 0xff, 0xd7, 0xbd, 0xff, 0x71, 0x8c, 0xff, 0xe8, 0x41, 0xff, 0xb2, 0x94, 0xff, 0x7a, 0xd6, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x28, 0x42, 0xff, 0xd7, 0xbd, 0xff, 0x3d, 0xef, 0xef, 0xfc, 0xe6, 0xff, 0x08, 0x42, 0xff, 0x6a, 0x52, 0xff, 0xbf, 0xff, 0xfa, 0x0c, 0x63, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xf7, 0xbd, 0xff, 0xfb, 0xde, 0xe1, 0x00, 0x00, 0x00, 0x7d, 0xef, 0xeb, 0x8e, 0x73, 0xff, 0x29, 0x4a, 0xff, 0xd7, 0xbd, 0xff, 0xfb, 0xde, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xfb, 0xde, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0xbd, 0x9d, 0xf8, 0xc5, 0xff, 0x49, 0x4a, 0xff, 0x6d, 0x6b, 0xff, 0xdf, 0xff, 0xe6, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7e, 0xf7, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xfa, 0xeb, 0x5a, 0xff, 0x69, 0x4a, 0xff, 0x9e, 0xf7, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xce, 0xb2, 0xdb, 0xde, 0xff, 0x79, 0xce, 0xff, 0x7d, 0xef, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
#endif
|
||||
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
|
||||
/*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 color bytes are swapped*/
|
||||
0xff, 0xff, 0xf7, 0xde, 0xdb, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xf7, 0xbe, 0xf7, 0xce, 0x59, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x52, 0x8a, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x21, 0x04, 0xff, 0x52, 0x8a, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x21, 0x04, 0xff, 0x21, 0x04, 0xff, 0x52, 0xaa, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x29, 0x25, 0xff, 0x29, 0x25, 0xff, 0x29, 0x25, 0xff, 0x5a, 0xcb, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x5a, 0xcb, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x62, 0xec, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x63, 0x0c, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x63, 0x0c, 0xff, 0xf7, 0xbe, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x6b, 0x2d, 0xff, 0xf7, 0xbe, 0xf8, 0xd6, 0x9a, 0x53,
|
||||
0xff, 0xff, 0xff, 0x39, 0xe7, 0xff, 0x39, 0xe7, 0xff, 0x41, 0xe8, 0xff, 0x42, 0x08, 0xff, 0x39, 0xe7, 0xff, 0xe7, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
|
||||
0xff, 0xff, 0xff, 0x41, 0xe8, 0xff, 0x42, 0x08, 0xff, 0xbd, 0xd7, 0xff, 0x8c, 0x71, 0xff, 0x41, 0xe8, 0xff, 0x94, 0xb2, 0xff, 0xd6, 0x7a, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0x42, 0x28, 0xff, 0xbd, 0xd7, 0xff, 0xef, 0x3d, 0xef, 0xe6, 0xfc, 0xff, 0x42, 0x08, 0xff, 0x52, 0x6a, 0xff, 0xff, 0xbf, 0xfa, 0x63, 0x0c, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xbd, 0xf7, 0xff, 0xde, 0xfb, 0xe1, 0x00, 0x00, 0x00, 0xef, 0x7d, 0xeb, 0x73, 0x8e, 0xff, 0x4a, 0x29, 0xff, 0xbd, 0xd7, 0xff, 0xde, 0xfb, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xde, 0xfb, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0xd7, 0x9d, 0xc5, 0xf8, 0xff, 0x4a, 0x49, 0xff, 0x6b, 0x6d, 0xff, 0xff, 0xdf, 0xe6, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf7, 0x7e, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xbf, 0xfa, 0x5a, 0xeb, 0xff, 0x4a, 0x69, 0xff, 0xf7, 0x9e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x39, 0xb2, 0xde, 0xdb, 0xff, 0xce, 0x79, 0xff, 0xef, 0x7d, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
#endif
|
||||
#if LV_COLOR_DEPTH == 32
|
||||
0xfd, 0xfd, 0xfd, 0xf7, 0xd6, 0xd6, 0xd6, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xf2, 0xf2, 0xf2, 0xf7, 0xc9, 0xc9, 0xc9, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x4e, 0x4e, 0x4e, 0xff, 0xf0, 0xf0, 0xf0, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x1e, 0x1e, 0x1e, 0xff, 0x51, 0x51, 0x51, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x21, 0x21, 0x21, 0xff, 0x21, 0x21, 0x21, 0xff, 0x53, 0x53, 0x53, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x25, 0x25, 0x25, 0xff, 0x25, 0x25, 0x25, 0xff, 0x25, 0x25, 0x25, 0xff, 0x57, 0x57, 0x57, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x59, 0x59, 0x59, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x5c, 0x5c, 0x5c, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x5e, 0x5e, 0x5e, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x61, 0x61, 0x61, 0xff, 0xf2, 0xf2, 0xf2, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x64, 0x64, 0x64, 0xff, 0xf2, 0xf2, 0xf2, 0xf8, 0xd0, 0xd0, 0xd0, 0x53,
|
||||
0xff, 0xff, 0xff, 0xff, 0x3a, 0x3a, 0x3a, 0xff, 0x3a, 0x3a, 0x3a, 0xff, 0x3c, 0x3c, 0x3c, 0xff, 0x3f, 0x3f, 0x3f, 0xff, 0x3b, 0x3b, 0x3b, 0xff, 0xe1, 0xe1, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfd, 0xfd, 0xf7,
|
||||
0xff, 0xff, 0xff, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x3f, 0x3f, 0x3f, 0xff, 0xb7, 0xb7, 0xb7, 0xff, 0x8b, 0x8b, 0x8b, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x92, 0x92, 0x92, 0xff, 0xcd, 0xcd, 0xcd, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0xe5, 0xe5, 0xe5, 0xef, 0xdc, 0xdc, 0xdc, 0xff, 0x41, 0x41, 0x41, 0xff, 0x4d, 0x4d, 0x4d, 0xff, 0xf4, 0xf4, 0xf4, 0xfa, 0x5f, 0x5f, 0x5f, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xba, 0xba, 0xba, 0xff, 0xda, 0xda, 0xda, 0xe1, 0x00, 0x00, 0x00, 0x00, 0xea, 0xea, 0xea, 0xeb, 0x6f, 0x6f, 0x6f, 0xff, 0x44, 0x44, 0x44, 0xff, 0xb6, 0xb6, 0xb6, 0xff, 0xda, 0xda, 0xda, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xda, 0xda, 0xda, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0xb7, 0xb7, 0x9d, 0xbd, 0xbd, 0xbd, 0xff, 0x48, 0x48, 0x48, 0xff, 0x6a, 0x6a, 0x6a, 0xff, 0xf7, 0xf7, 0xf7, 0xe6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xec, 0xec, 0xec, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf4, 0xf4, 0xfa, 0x5b, 0x5b, 0x5b, 0xff, 0x4b, 0x4b, 0x4b, 0xff, 0xf1, 0xf1, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0xc4, 0xc4, 0xb2, 0xd9, 0xd9, 0xd9, 0xff, 0xcb, 0xcb, 0xcb, 0xff, 0xea, 0xea, 0xea, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
#endif
|
||||
static const
|
||||
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_CURSOR
|
||||
uint8_t cursor_map[] = {
|
||||
|
||||
0xfe,0xfe,0xfe,0xf7,0xd6,0xd6,0xd6,0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xf3,0xf3,0xf3,0xf7,0xca,0xca,0xca,0x56,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x4e,0x4e,0x4e,0xff,0xf1,0xf1,0xf1,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x1e,0x1e,0x1e,0xff,0x51,0x51,0x51,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x21,0x21,0x21,0xff,0x21,0x21,0x21,0xff,0x53,0x53,0x53,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x25,0x25,0x25,0xff,0x25,0x25,0x25,0xff,0x25,0x25,0x25,0xff,0x57,0x57,0x57,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x59,0x59,0x59,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x5c,0x5c,0x5c,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x5e,0x5e,0x5e,0xff,0xf2,0xf2,0xf2,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x61,0x61,0x61,0xff,0xf3,0xf3,0xf3,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x64,0x64,0x64,0xff,0xf3,0xf3,0xf3,0xf8,0xd1,0xd1,0xd1,0x53,
|
||||
0xff,0xff,0xff,0xff,0x3a,0x3a,0x3a,0xff,0x3a,0x3a,0x3a,0xff,0x3c,0x3c,0x3c,0xff,0x3f,0x3f,0x3f,0xff,0x3b,0x3b,0x3b,0xff,0xe1,0xe1,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xf7,
|
||||
0xff,0xff,0xff,0xff,0x3d,0x3d,0x3d,0xff,0x3f,0x3f,0x3f,0xff,0xb7,0xb7,0xb7,0xff,0x8b,0x8b,0x8b,0xff,0x3d,0x3d,0x3d,0xff,0x92,0x92,0x92,0xff,0xcd,0xcd,0xcd,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0x42,0x42,0x42,0xff,0xb8,0xb8,0xb8,0xff,0xe5,0xe5,0xe5,0xef,0xdc,0xdc,0xdc,0xff,0x41,0x41,0x41,0xff,0x4d,0x4d,0x4d,0xff,0xf5,0xf5,0xf5,0xfa,0x5f,0x5f,0x5f,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xba,0xba,0xba,0xff,0xdb,0xdb,0xdb,0xe1,0x00,0x00,0x00,0x00,0xea,0xea,0xea,0xeb,0x6f,0x6f,0x6f,0xff,0x44,0x44,0x44,0xff,0xb6,0xb6,0xb6,0xff,0xdb,0xdb,0xdb,0x8d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xdb,0xdb,0xdb,0xda,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0xb8,0xb8,0x9d,0xbd,0xbd,0xbd,0xff,0x48,0x48,0x48,0xff,0x6a,0x6a,0x6a,0xff,0xf7,0xf7,0xf7,0xe6,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xec,0xec,0xec,0xca,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0xf5,0xf5,0xfa,0x5b,0x5b,0x5b,0xff,0x4b,0x4b,0x4b,0xff,0xf1,0xf1,0xf1,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xc4,0xc4,0xb2,0xd9,0xd9,0xd9,0xff,0xcb,0xcb,0xcb,0xff,0xea,0xea,0xea,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
||||
};
|
||||
|
||||
const lv_img_dsc_t bbx_cursor_img_dsc = {
|
||||
.header.cf = LV_COLOR_FORMAT_NATIVE_WITH_ALPHA,
|
||||
const lv_image_dsc_t cursor = {
|
||||
.header.magic = LV_IMAGE_HEADER_MAGIC,
|
||||
.header.cf = LV_COLOR_FORMAT_ARGB8888,
|
||||
.header.flags = 0,
|
||||
.header.w = 12,
|
||||
.header.h = 18,
|
||||
.data = bbx_cursor_img_dsc_map,
|
||||
.header.stride = 48,
|
||||
.data_size = sizeof(cursor_map),
|
||||
.data = cursor_map,
|
||||
};
|
||||
|
||||
|
@@ -10,6 +10,6 @@
|
||||
#include "lvgl/lvgl.h"
|
||||
|
||||
/* Image description of the mouse cursor */
|
||||
extern const lv_img_dsc_t bbx_cursor_img_dsc;
|
||||
extern const lv_image_dsc_t cursor;
|
||||
|
||||
#endif /* BBX_CURSOR_H */
|
||||
|
1548
shared/cursor/package-lock.json
generated
1548
shared/cursor/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
||||
|
||||
{
|
||||
"dependencies": {
|
||||
"@swc/core": "^1.3.40",
|
||||
"lv_img_conv": "^0.4.0"
|
||||
}
|
||||
}
|
@@ -3,20 +3,15 @@
|
||||
# Copyright 2023 Johannes Marbach
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Dependencies:
|
||||
# python-pypng
|
||||
# python-lz4
|
||||
|
||||
npm i
|
||||
root=$(git rev-parse --show-toplevel)
|
||||
|
||||
./node_modules/lv_img_conv/lv_img_conv.js -f \
|
||||
-i bbx_cursor_img_dsc \
|
||||
-c CF_TRUE_COLOR_ALPHA \
|
||||
-o cursor.c \
|
||||
cursor.png
|
||||
|
||||
# We need to manually replace the old constants because the image converter hasn't
|
||||
# yet been updated to https://github.com/lvgl/lvgl/issues/4011
|
||||
sed 's/LV_IMG_CF_TRUE_COLOR_ALPHA/LV_COLOR_FORMAT_NATIVE_WITH_ALPHA/g' cursor.c \
|
||||
| sed '/.*LV_IMG_PX_SIZE_ALPHA_BYTE.*/d' \
|
||||
| sed '/.*header.always_zero.*/d' \
|
||||
| sed '/.*header.reserved.*/d'\
|
||||
> cursor.c.tmp
|
||||
mv cursor.c.tmp cursor.c
|
||||
"$root/lvgl/scripts/LVGLImage.py" \
|
||||
--ofmt C \
|
||||
--cf "ARGB8888" \
|
||||
--output "$root/shared/cursor" \
|
||||
--verbose \
|
||||
"$root/shared/cursor/cursor.png"
|
||||
|
@@ -9,8 +9,6 @@
|
||||
#include "cursor/cursor.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "lvgl/src/indev/lv_indev_private.h"
|
||||
|
||||
#include <libinput.h>
|
||||
#include <libudev.h>
|
||||
#include <limits.h>
|
||||
@@ -353,8 +351,8 @@ static void set_mouse_cursor(struct input_device *device) {
|
||||
|
||||
/* Initialise cursor image if needed */
|
||||
if (!cursor_obj) {
|
||||
cursor_obj = lv_img_create(lv_scr_act());
|
||||
lv_img_set_src(cursor_obj, &bbx_cursor_img_dsc);
|
||||
cursor_obj = lv_image_create(lv_screen_active());
|
||||
lv_image_set_src(cursor_obj, &cursor);
|
||||
}
|
||||
|
||||
/* Apply the cursor image */
|
||||
|
@@ -9,9 +9,6 @@
|
||||
#include "log.h"
|
||||
#include "../squeek2lvgl/sq2lv.h"
|
||||
|
||||
#include "lvgl/lvgl.h"
|
||||
|
||||
|
||||
/**
|
||||
* Static variables
|
||||
*/
|
||||
@@ -38,8 +35,6 @@ static struct {
|
||||
lv_style_t msgbox;
|
||||
lv_style_t msgbox_label;
|
||||
lv_style_t msgbox_background;
|
||||
lv_style_t bar;
|
||||
lv_style_t bar_indicator;
|
||||
} styles;
|
||||
|
||||
static bool are_styles_initialised = false;
|
||||
@@ -90,8 +85,6 @@ static void init_styles(const bbx_theme *theme) {
|
||||
reset_style(&(styles.window));
|
||||
lv_style_set_bg_opa(&(styles.window), LV_OPA_COVER);
|
||||
lv_style_set_bg_color(&(styles.window), lv_color_hex(theme->window.bg_color));
|
||||
lv_style_set_layout(&(styles.window), LV_LAYOUT_FLEX);
|
||||
lv_style_set_flex_flow(&(styles.window), LV_FLEX_FLOW_COLUMN);
|
||||
|
||||
reset_style(&(styles.header));
|
||||
lv_style_set_bg_opa(&(styles.header), LV_OPA_COVER);
|
||||
@@ -149,7 +142,7 @@ static void init_styles(const bbx_theme *theme) {
|
||||
lv_style_set_border_side(&(styles.textarea_cursor), LV_BORDER_SIDE_LEFT);
|
||||
lv_style_set_border_width(&(styles.textarea_cursor), lv_dpx(theme->textarea.cursor.width));
|
||||
lv_style_set_border_color(&(styles.textarea_cursor), lv_color_hex(theme->textarea.cursor.color));
|
||||
lv_style_set_anim_time(&(styles.textarea_cursor), theme->textarea.cursor.period);
|
||||
lv_style_set_anim_duration(&(styles.textarea_cursor), theme->textarea.cursor.period);
|
||||
|
||||
reset_style(&(styles.dropdown));
|
||||
lv_style_set_text_color(&(styles.dropdown), lv_color_hex(theme->dropdown.button.normal.fg_color));
|
||||
@@ -202,16 +195,6 @@ static void init_styles(const bbx_theme *theme) {
|
||||
lv_style_set_bg_color(&(styles.msgbox_background), lv_color_hex(theme->msgbox.dimming.color));
|
||||
lv_style_set_bg_opa(&(styles.msgbox_background), theme->msgbox.dimming.opacity);
|
||||
|
||||
reset_style(&(styles.bar));
|
||||
lv_style_set_border_side(&(styles.bar), LV_BORDER_SIDE_FULL);
|
||||
lv_style_set_border_width(&(styles.bar), lv_dpx(theme->bar.border_width));
|
||||
lv_style_set_border_color(&(styles.bar), lv_color_hex(theme->bar.border_color));
|
||||
lv_style_set_radius(&(styles.bar), lv_dpx(theme->bar.corner_radius));
|
||||
|
||||
reset_style(&(styles.bar_indicator));
|
||||
lv_style_set_bg_opa(&(styles.bar_indicator), LV_OPA_COVER);
|
||||
lv_style_set_bg_color(&(styles.bar_indicator), lv_color_hex(theme->bar.indicator.bg_color));
|
||||
|
||||
are_styles_initialised = true;
|
||||
}
|
||||
|
||||
@@ -307,16 +290,10 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv_obj_check_type(obj, &lv_label_class) || lv_obj_check_type(obj, &lv_spangroup_class)) {
|
||||
if (lv_obj_check_type(obj, &lv_label_class)) {
|
||||
lv_obj_add_style(obj, &(styles.label), 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv_obj_check_type(obj, &lv_bar_class)) {
|
||||
lv_obj_add_style(obj, &(styles.bar), 0);
|
||||
lv_obj_add_style(obj, &(styles.bar_indicator), LV_PART_INDICATOR);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void keyboard_draw_task_added_cb(lv_event_t *event) {
|
||||
@@ -341,7 +318,7 @@ static void keyboard_draw_task_added_cb(lv_event_t *event) {
|
||||
key = &(current_theme.keyboard.keys.key_char);
|
||||
}
|
||||
|
||||
bool pressed = lv_btnmatrix_get_selected_btn(obj) == dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED);
|
||||
bool pressed = lv_buttonmatrix_get_selected_button(obj) == dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED);
|
||||
|
||||
lv_draw_label_dsc_t *label_dsc = lv_draw_task_get_label_dsc(draw_task);
|
||||
if (label_dsc) {
|
||||
@@ -384,7 +361,6 @@ void bbx_theme_apply(const bbx_theme *theme) {
|
||||
current_theme = *theme;
|
||||
init_styles(theme);
|
||||
|
||||
lv_obj_report_style_change(NULL);
|
||||
lv_disp_set_theme(NULL, &lv_theme);
|
||||
lv_theme_apply(lv_scr_act());
|
||||
lv_obj_report_style_change(NULL); /* Update existing objects */
|
||||
lv_display_set_theme(NULL, &lv_theme); /* Set a theme for future objects */
|
||||
}
|
||||
|
@@ -26,10 +26,10 @@ typedef struct {
|
||||
/* Header theme */
|
||||
typedef struct {
|
||||
uint32_t bg_color;
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t pad;
|
||||
lv_coord_t gap;
|
||||
int32_t pad;
|
||||
int32_t gap;
|
||||
} bbx_theme_header;
|
||||
|
||||
/* Key theme for one specific key type and state */
|
||||
@@ -47,8 +47,8 @@ typedef struct {
|
||||
|
||||
/* Key theme */
|
||||
typedef struct {
|
||||
lv_coord_t border_width;
|
||||
lv_coord_t corner_radius;
|
||||
int32_t border_width;
|
||||
int32_t corner_radius;
|
||||
bbx_theme_key key_char;
|
||||
bbx_theme_key key_non_char;
|
||||
bbx_theme_key key_mod_act;
|
||||
@@ -58,10 +58,10 @@ typedef struct {
|
||||
/* Keyboard theme */
|
||||
typedef struct {
|
||||
uint32_t bg_color;
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t pad;
|
||||
lv_coord_t gap;
|
||||
int32_t pad;
|
||||
int32_t gap;
|
||||
bbx_theme_keys keys;
|
||||
} bbx_theme_keyboard;
|
||||
|
||||
@@ -74,16 +74,16 @@ typedef struct {
|
||||
|
||||
/* Button theme */
|
||||
typedef struct {
|
||||
lv_coord_t border_width;
|
||||
lv_coord_t corner_radius;
|
||||
lv_coord_t pad;
|
||||
int32_t border_width;
|
||||
int32_t corner_radius;
|
||||
int32_t pad;
|
||||
bbx_theme_button_state normal;
|
||||
bbx_theme_button_state pressed;
|
||||
} bbx_theme_button;
|
||||
|
||||
/* Text area cursor theme */
|
||||
typedef struct {
|
||||
lv_coord_t width;
|
||||
int32_t width;
|
||||
uint32_t color;
|
||||
int period;
|
||||
} bbx_theme_textarea_cursor;
|
||||
@@ -92,10 +92,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint32_t fg_color;
|
||||
uint32_t bg_color;
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t corner_radius;
|
||||
lv_coord_t pad;
|
||||
int32_t corner_radius;
|
||||
int32_t pad;
|
||||
uint32_t placeholder_color;
|
||||
bbx_theme_textarea_cursor cursor;
|
||||
} bbx_theme_textarea;
|
||||
@@ -106,10 +106,10 @@ typedef struct {
|
||||
uint32_t bg_color;
|
||||
uint32_t selection_fg_color;
|
||||
uint32_t selection_bg_color;
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t corner_radius;
|
||||
lv_coord_t pad;
|
||||
int32_t corner_radius;
|
||||
int32_t pad;
|
||||
} bbx_theme_dropdown_list;
|
||||
|
||||
/* Dropdown theme */
|
||||
@@ -133,11 +133,11 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint32_t fg_color;
|
||||
uint32_t bg_color;
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t corner_radius;
|
||||
lv_coord_t pad;
|
||||
lv_coord_t gap;
|
||||
int32_t corner_radius;
|
||||
int32_t pad;
|
||||
int32_t gap;
|
||||
bbx_theme_msgbox_dimming dimming;
|
||||
} bbx_theme_msgbox;
|
||||
|
||||
@@ -148,9 +148,9 @@ typedef struct {
|
||||
|
||||
/* Progress bar theme */
|
||||
typedef struct {
|
||||
lv_coord_t border_width;
|
||||
int32_t border_width;
|
||||
uint32_t border_color;
|
||||
lv_coord_t corner_radius;
|
||||
int32_t corner_radius;
|
||||
bbx_theme_bar_indicator indicator;
|
||||
} bbx_theme_bar;
|
||||
|
||||
|
Reference in New Issue
Block a user