add all widgets and widget examples
This commit is contained in:
262
examples/assets/imgbtn_left.c
Normal file
262
examples/assets/imgbtn_left.c
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_LEFT
|
||||||
|
#define LV_ATTRIBUTE_IMG_IMGBTN_LEFT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_LEFT uint8_t imgbtn_left_map[] = {
|
||||||
|
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||||
|
/*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x68, 0x03, 0x68, 0x14, 0x68, 0x23,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x68, 0x40, 0x68, 0xb0, 0x64, 0xe0, 0x64, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x70, 0x68, 0xfc, 0x68, 0xff, 0xd6, 0xff, 0xff, 0xff,
|
||||||
|
0x68, 0x00, 0x00, 0x00, 0x68, 0x73, 0x68, 0xff, 0xb1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x68, 0x40, 0x68, 0xfc, 0xb2, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x03, 0x68, 0xb0, 0x68, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x14, 0x64, 0xe0, 0xd6, 0xff, 0xfa, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x24, 0x64, 0xff, 0xfa, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x64, 0xff, 0xf9, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x64, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x64, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xd1, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0xac, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x27, 0x68, 0xff, 0x8c, 0xff, 0xd1, 0xff, 0xf9, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x23, 0x68, 0xff, 0xac, 0xff, 0x8c, 0xff, 0xd1, 0xff, 0xf9, 0xff, 0xf9, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x17, 0x68, 0xe4, 0x8c, 0xff, 0xac, 0xff, 0x8c, 0xff, 0xac, 0xff, 0xd1, 0xff, 0xf5, 0xff,
|
||||||
|
0x68, 0x07, 0x68, 0xb8, 0x68, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0x8c, 0xff, 0x8c, 0xff,
|
||||||
|
0x00, 0x00, 0x44, 0x5f, 0x44, 0xff, 0x68, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x04, 0x44, 0xc8, 0x44, 0xff, 0x8c, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x0c, 0x00, 0x40, 0x44, 0xc4, 0x44, 0xff, 0x68, 0xff, 0x8c, 0xff, 0xac, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x08, 0x00, 0x34, 0x00, 0x54, 0x24, 0x9b, 0x44, 0xfc, 0x44, 0xff, 0x44, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x04, 0x00, 0x24, 0x00, 0x4f, 0x00, 0x54, 0x00, 0x5b, 0x24, 0x8b, 0x24, 0xb0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x3b, 0x00, 0x57, 0x00, 0x58, 0x00, 0x58, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x40, 0x00, 0x54, 0x00, 0x58, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x00, 0x34, 0x00, 0x48, 0x00, 0x50,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x1b, 0x00, 0x27,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
|
||||||
|
/*Pixel format: Blue: 5 bit, Green: 6 bit, Red: 5 bit, Alpha 8 bit*/
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x03, 0xc0, 0x61, 0x14, 0xc0, 0x61, 0x23,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x40, 0xc0, 0x61, 0xb0, 0x80, 0x59, 0xe0, 0x60, 0x59, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x70, 0xc0, 0x61, 0xfc, 0x01, 0x6a, 0xff, 0xf0, 0xb4, 0xff, 0x3b, 0xf7, 0xff,
|
||||||
|
0x80, 0x69, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x73, 0xc0, 0x61, 0xff, 0x2c, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xff, 0xff, 0x17, 0xff, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0xc0, 0x61, 0x40, 0xc0, 0x61, 0xfc, 0x2c, 0xa4, 0xff, 0xde, 0xff, 0xff, 0xcc, 0xed, 0xff, 0x47, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xa0, 0x61, 0x03, 0xc0, 0x61, 0xb0, 0x01, 0x6a, 0xff, 0x7b, 0xff, 0xff, 0x47, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x14, 0x80, 0x59, 0xe0, 0x10, 0xb5, 0xff, 0xec, 0xf5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x24, 0x60, 0x59, 0xff, 0x53, 0xe6, 0xff, 0x04, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0xab, 0xed, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x26, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x25, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x26, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x28, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0x80, 0x59, 0xff, 0x66, 0xc4, 0xff, 0x47, 0xed, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0xa0, 0x59, 0xff, 0x02, 0x93, 0xff, 0x89, 0xe5, 0xff, 0x26, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x27, 0xa0, 0x59, 0xff, 0xe2, 0x92, 0xff, 0x05, 0xb4, 0xff, 0x8a, 0xed, 0xff, 0x47, 0xe5, 0xff, 0x25, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0xc0, 0x61, 0x23, 0x80, 0x51, 0xff, 0x42, 0x9b, 0xff, 0xe1, 0x92, 0xff, 0x05, 0xb4, 0xff, 0x8a, 0xed, 0xff, 0xa9, 0xed, 0xff, 0x68, 0xed, 0xff,
|
||||||
|
0xc0, 0x61, 0x17, 0x80, 0x51, 0xe4, 0xe2, 0x8a, 0xff, 0x43, 0x9b, 0xff, 0xe2, 0x92, 0xff, 0x02, 0x93, 0xff, 0x66, 0xc4, 0xff, 0x49, 0xe5, 0xff,
|
||||||
|
0xa0, 0x61, 0x07, 0xa0, 0x59, 0xb8, 0xa0, 0x59, 0xff, 0x63, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x02, 0x93, 0xff, 0xe1, 0x92, 0xff, 0xc1, 0x8a, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x51, 0x5f, 0x40, 0x49, 0xff, 0x62, 0x72, 0xff, 0x63, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x41, 0xc8, 0x20, 0x41, 0xff, 0xc2, 0x82, 0xff, 0x43, 0x9b, 0xff, 0x63, 0x9b, 0xff, 0x43, 0x9b, 0xff,
|
||||||
|
0x40, 0x08, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x40, 0xe0, 0x30, 0xc4, 0x20, 0x41, 0xff, 0xe1, 0x59, 0xff, 0xc2, 0x82, 0xff, 0x43, 0x9b, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x34, 0x00, 0x00, 0x54, 0xc0, 0x28, 0x9b, 0x20, 0x41, 0xfc, 0x20, 0x41, 0xff, 0x20, 0x41, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x54, 0x00, 0x00, 0x5b, 0xa0, 0x20, 0x8b, 0xe0, 0x30, 0xb0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x57, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x40, 0x00, 0x00, 0x54, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x48, 0x00, 0x00, 0x50,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x27,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
|
||||||
|
/*Pixel format: Blue: 5 bit Green: 6 bit, Red: 5 bit, Alpha 8 bit BUT the 2 color bytes are swapped*/
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x03, 0x61, 0xc0, 0x14, 0x61, 0xc0, 0x23,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x40, 0x61, 0xc0, 0xb0, 0x59, 0x80, 0xe0, 0x59, 0x60, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x70, 0x61, 0xc0, 0xfc, 0x6a, 0x01, 0xff, 0xb4, 0xf0, 0xff, 0xf7, 0x3b, 0xff,
|
||||||
|
0x69, 0x80, 0x00, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x73, 0x61, 0xc0, 0xff, 0xa4, 0x2c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xff, 0xff, 0x17, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x61, 0xc0, 0x40, 0x61, 0xc0, 0xfc, 0xa4, 0x2c, 0xff, 0xff, 0xde, 0xff, 0xed, 0xcc, 0xff, 0xe5, 0x47, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xa0, 0x03, 0x61, 0xc0, 0xb0, 0x6a, 0x01, 0xff, 0xff, 0x7b, 0xff, 0xe5, 0x47, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x14, 0x59, 0x80, 0xe0, 0xb5, 0x10, 0xff, 0xf5, 0xec, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x24, 0x59, 0x60, 0xff, 0xe6, 0x53, 0xff, 0xe5, 0x04, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xed, 0xab, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x26, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x25, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x26, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xe5, 0x28, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0x80, 0xff, 0xc4, 0x66, 0xff, 0xed, 0x47, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0xa0, 0xff, 0x93, 0x02, 0xff, 0xe5, 0x89, 0xff, 0xe5, 0x26, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x27, 0x59, 0xa0, 0xff, 0x92, 0xe2, 0xff, 0xb4, 0x05, 0xff, 0xed, 0x8a, 0xff, 0xe5, 0x47, 0xff, 0xe5, 0x25, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0x61, 0xc0, 0x23, 0x51, 0x80, 0xff, 0x9b, 0x42, 0xff, 0x92, 0xe1, 0xff, 0xb4, 0x05, 0xff, 0xed, 0x8a, 0xff, 0xed, 0xa9, 0xff, 0xed, 0x68, 0xff,
|
||||||
|
0x61, 0xc0, 0x17, 0x51, 0x80, 0xe4, 0x8a, 0xe2, 0xff, 0x9b, 0x43, 0xff, 0x92, 0xe2, 0xff, 0x93, 0x02, 0xff, 0xc4, 0x66, 0xff, 0xe5, 0x49, 0xff,
|
||||||
|
0x61, 0xa0, 0x07, 0x59, 0xa0, 0xb8, 0x59, 0xa0, 0xff, 0x9b, 0x63, 0xff, 0x9b, 0x43, 0xff, 0x93, 0x02, 0xff, 0x92, 0xe1, 0xff, 0x8a, 0xc1, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x51, 0x80, 0x5f, 0x49, 0x40, 0xff, 0x72, 0x62, 0xff, 0x9b, 0x63, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x41, 0x20, 0xc8, 0x41, 0x20, 0xff, 0x82, 0xc2, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x63, 0xff, 0x9b, 0x43, 0xff,
|
||||||
|
0x08, 0x40, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x40, 0x30, 0xe0, 0xc4, 0x41, 0x20, 0xff, 0x59, 0xe1, 0xff, 0x82, 0xc2, 0xff, 0x9b, 0x43, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x34, 0x00, 0x00, 0x54, 0x28, 0xc0, 0x9b, 0x41, 0x20, 0xfc, 0x41, 0x20, 0xff, 0x41, 0x20, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x54, 0x00, 0x00, 0x5b, 0x20, 0xa0, 0x8b, 0x30, 0xe0, 0xb0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x57, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x40, 0x00, 0x00, 0x54, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x48, 0x00, 0x00, 0x50,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x27,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 32
|
||||||
|
/*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x61, 0x03, 0x00, 0x38, 0x5f, 0x14, 0x00, 0x38, 0x5f, 0x23,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x40, 0x00, 0x37, 0x5e, 0xb0, 0x00, 0x30, 0x58, 0xe0, 0x00, 0x2c, 0x55, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x70, 0x00, 0x38, 0x5f, 0xfc, 0x0a, 0x40, 0x66, 0xff, 0x7f, 0x9e, 0xb3, 0xff, 0xdc, 0xe6, 0xee, 0xff,
|
||||||
|
0x00, 0x32, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x73, 0x00, 0x38, 0x5f, 0xff, 0x60, 0x84, 0x9e, 0xff, 0xfb, 0xfc, 0xfc, 0xff, 0xe3, 0xf7, 0xff, 0xff, 0xba, 0xe1, 0xf6, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x40, 0x00, 0x38, 0x5f, 0xfc, 0x62, 0x85, 0x9e, 0xff, 0xf1, 0xf9, 0xfd, 0xff, 0x61, 0xba, 0xe9, 0xff, 0x35, 0xa7, 0xe3, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x36, 0x5d, 0x03, 0x00, 0x37, 0x5e, 0xb0, 0x0a, 0x40, 0x65, 0xff, 0xda, 0xed, 0xf8, 0xff, 0x3a, 0xa9, 0xe4, 0xff, 0x28, 0xa1, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x14, 0x00, 0x2f, 0x58, 0xe0, 0x84, 0xa0, 0xb4, 0xff, 0x63, 0xbe, 0xee, 0xff, 0x27, 0xa1, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x24, 0x00, 0x2e, 0x56, 0xff, 0x97, 0xc9, 0xe4, 0xff, 0x22, 0x9f, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x2f, 0x56, 0xff, 0x56, 0xb5, 0xe7, 0xff, 0x27, 0xa1, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2f, 0xa4, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x31, 0x56, 0xff, 0x2b, 0xa3, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x30, 0x56, 0xff, 0x34, 0xa6, 0xe2, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x30, 0x56, 0xff, 0x3d, 0xa6, 0xdd, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x32, 0x58, 0xff, 0x31, 0x8c, 0xbe, 0xff, 0x36, 0xaa, 0xe5, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5e, 0x27, 0x00, 0x35, 0x5b, 0xff, 0x0f, 0x61, 0x94, 0xff, 0x4a, 0xaf, 0xe4, 0xff, 0x2e, 0xa4, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x38, 0x5e, 0x27, 0x00, 0x34, 0x58, 0xff, 0x0d, 0x5d, 0x8f, 0xff, 0x27, 0x7f, 0xb2, 0xff, 0x4d, 0xb2, 0xe6, 0xff, 0x35, 0xa7, 0xe3, 0xff, 0x2c, 0xa3, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x00, 0x37, 0x5f, 0x23, 0x00, 0x31, 0x54, 0xff, 0x14, 0x69, 0x9b, 0xff, 0x0c, 0x5c, 0x8e, 0xff, 0x27, 0x7f, 0xb2, 0xff, 0x4f, 0xb1, 0xe5, 0xff, 0x4c, 0xb3, 0xe9, 0xff, 0x44, 0xad, 0xe5, 0xff,
|
||||||
|
0x00, 0x38, 0x5e, 0x17, 0x00, 0x31, 0x54, 0xe4, 0x12, 0x5c, 0x87, 0xff, 0x15, 0x67, 0x97, 0xff, 0x0d, 0x5d, 0x8f, 0xff, 0x0f, 0x61, 0x94, 0xff, 0x30, 0x8b, 0xbe, 0xff, 0x48, 0xaa, 0xde, 0xff,
|
||||||
|
0x00, 0x36, 0x60, 0x07, 0x00, 0x33, 0x57, 0xb8, 0x04, 0x36, 0x56, 0xff, 0x1a, 0x6d, 0x9c, 0xff, 0x16, 0x68, 0x97, 0xff, 0x11, 0x61, 0x92, 0xff, 0x0c, 0x5c, 0x8d, 0xff, 0x09, 0x58, 0x89, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x50, 0x5f, 0x00, 0x2a, 0x48, 0xff, 0x0d, 0x4b, 0x70, 0xff, 0x18, 0x6b, 0x99, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x17, 0x69, 0x97, 0xff, 0x17, 0x68, 0x97, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x26, 0x41, 0xc8, 0x01, 0x26, 0x41, 0xff, 0x11, 0x57, 0x7e, 0xff, 0x18, 0x6a, 0x97, 0xff, 0x18, 0x6b, 0x99, 0xff, 0x18, 0x6a, 0x98, 0xff,
|
||||||
|
0x00, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x02, 0x04, 0x40, 0x00, 0x1e, 0x34, 0xc4, 0x00, 0x24, 0x3f, 0xff, 0x08, 0x3c, 0x5c, 0xff, 0x11, 0x57, 0x7f, 0xff, 0x18, 0x69, 0x96, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x54, 0x00, 0x18, 0x29, 0x9b, 0x00, 0x23, 0x3e, 0xfc, 0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x54, 0x00, 0x01, 0x02, 0x5b, 0x00, 0x14, 0x22, 0x8b, 0x00, 0x1b, 0x2f, 0xb0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x50,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27,
|
||||||
|
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, 0x03,
|
||||||
|
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,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_img_dsc_t imgbtn_left = {
|
||||||
|
.header.always_zero = 0,
|
||||||
|
.header.w = 8,
|
||||||
|
.header.h = 50,
|
||||||
|
.data_size = 400 * LV_IMG_PX_SIZE_ALPHA_BYTE,
|
||||||
|
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||||
|
.data = imgbtn_left_map,
|
||||||
|
};
|
||||||
|
|
||||||
BIN
examples/assets/imgbtn_left.png
Normal file
BIN
examples/assets/imgbtn_left.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 699 B |
234
examples/assets/imgbtn_mid.c
Normal file
234
examples/assets/imgbtn_mid.c
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_MID
|
||||||
|
#define LV_ATTRIBUTE_IMG_IMGBTN_MID
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_MID uint8_t imgbtn_mid_map[] = {
|
||||||
|
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||||
|
/*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */
|
||||||
|
0x68, 0x27, 0x68, 0x27, 0x68, 0x27, 0x68, 0x27, 0x68, 0x27,
|
||||||
|
0x64, 0xff, 0x64, 0xff, 0x64, 0xff, 0x64, 0xff, 0x64, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff,
|
||||||
|
0xf9, 0xff, 0xf9, 0xff, 0xf9, 0xff, 0xf9, 0xff, 0xf9, 0xff,
|
||||||
|
0x8c, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x8c, 0xff,
|
||||||
|
0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff,
|
||||||
|
0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff,
|
||||||
|
0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff,
|
||||||
|
0x44, 0xff, 0x44, 0xff, 0x44, 0xff, 0x44, 0xff, 0x44, 0xff,
|
||||||
|
0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0, 0x44, 0xc0,
|
||||||
|
0x00, 0x57, 0x00, 0x57, 0x00, 0x57, 0x00, 0x57, 0x00, 0x57,
|
||||||
|
0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58,
|
||||||
|
0x00, 0x54, 0x00, 0x54, 0x00, 0x54, 0x00, 0x54, 0x00, 0x54,
|
||||||
|
0x00, 0x2c, 0x00, 0x2c, 0x00, 0x2c, 0x00, 0x2c, 0x00, 0x2c,
|
||||||
|
0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
|
||||||
|
/*Pixel format: Blue: 5 bit, Green: 6 bit, Red: 5 bit, Alpha 8 bit*/
|
||||||
|
0xc0, 0x61, 0x27, 0xc0, 0x61, 0x27, 0xc0, 0x61, 0x27, 0xc0, 0x61, 0x27, 0xc0, 0x61, 0x27,
|
||||||
|
0x40, 0x51, 0xff, 0x40, 0x51, 0xff, 0x40, 0x51, 0xff, 0x40, 0x51, 0xff, 0x40, 0x51, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff,
|
||||||
|
0x68, 0xe5, 0xff, 0x68, 0xe5, 0xff, 0x68, 0xe5, 0xff, 0x68, 0xe5, 0xff, 0x68, 0xe5, 0xff,
|
||||||
|
0x8a, 0xed, 0xff, 0x8a, 0xed, 0xff, 0x8a, 0xed, 0xff, 0x8a, 0xed, 0xff, 0x8a, 0xed, 0xff,
|
||||||
|
0xa1, 0x8a, 0xff, 0xa1, 0x8a, 0xff, 0xa1, 0x8a, 0xff, 0xa1, 0x8a, 0xff, 0xa1, 0x8a, 0xff,
|
||||||
|
0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff,
|
||||||
|
0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff,
|
||||||
|
0x83, 0xa3, 0xff, 0x83, 0xa3, 0xff, 0x83, 0xa3, 0xff, 0x83, 0xa3, 0xff, 0x83, 0xa3, 0xff,
|
||||||
|
0x20, 0x41, 0xff, 0x20, 0x41, 0xff, 0x20, 0x41, 0xff, 0x20, 0x41, 0xff, 0x20, 0x41, 0xff,
|
||||||
|
0xe0, 0x30, 0xc0, 0xe0, 0x30, 0xc0, 0xe0, 0x30, 0xc0, 0xe0, 0x30, 0xc0, 0xe0, 0x30, 0xc0,
|
||||||
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54,
|
||||||
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
|
||||||
|
/*Pixel format: Blue: 5 bit Green: 6 bit, Red: 5 bit, Alpha 8 bit BUT the 2 color bytes are swapped*/
|
||||||
|
0x61, 0xc0, 0x27, 0x61, 0xc0, 0x27, 0x61, 0xc0, 0x27, 0x61, 0xc0, 0x27, 0x61, 0xc0, 0x27,
|
||||||
|
0x51, 0x40, 0xff, 0x51, 0x40, 0xff, 0x51, 0x40, 0xff, 0x51, 0x40, 0xff, 0x51, 0x40, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff, 0xf6, 0xf6, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff,
|
||||||
|
0xe5, 0x68, 0xff, 0xe5, 0x68, 0xff, 0xe5, 0x68, 0xff, 0xe5, 0x68, 0xff, 0xe5, 0x68, 0xff,
|
||||||
|
0xed, 0x8a, 0xff, 0xed, 0x8a, 0xff, 0xed, 0x8a, 0xff, 0xed, 0x8a, 0xff, 0xed, 0x8a, 0xff,
|
||||||
|
0x8a, 0xa1, 0xff, 0x8a, 0xa1, 0xff, 0x8a, 0xa1, 0xff, 0x8a, 0xa1, 0xff, 0x8a, 0xa1, 0xff,
|
||||||
|
0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff,
|
||||||
|
0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff,
|
||||||
|
0xa3, 0x83, 0xff, 0xa3, 0x83, 0xff, 0xa3, 0x83, 0xff, 0xa3, 0x83, 0xff, 0xa3, 0x83, 0xff,
|
||||||
|
0x41, 0x20, 0xff, 0x41, 0x20, 0xff, 0x41, 0x20, 0xff, 0x41, 0x20, 0xff, 0x41, 0x20, 0xff,
|
||||||
|
0x30, 0xe0, 0xc0, 0x30, 0xe0, 0xc0, 0x30, 0xe0, 0xc0, 0x30, 0xe0, 0xc0, 0x30, 0xe0, 0xc0,
|
||||||
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54, 0x00, 0x00, 0x54,
|
||||||
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x2c,
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 32
|
||||||
|
/*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/
|
||||||
|
0x00, 0x38, 0x5f, 0x27, 0x00, 0x38, 0x5f, 0x27, 0x00, 0x38, 0x5f, 0x27, 0x00, 0x38, 0x5f, 0x27, 0x00, 0x38, 0x5f, 0x27,
|
||||||
|
0x00, 0x2a, 0x54, 0xff, 0x00, 0x2a, 0x54, 0xff, 0x00, 0x2a, 0x54, 0xff, 0x00, 0x2a, 0x54, 0xff, 0x00, 0x2a, 0x54, 0xff,
|
||||||
|
0xfd, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xaf, 0xdc, 0xf4, 0xff, 0xaf, 0xdc, 0xf4, 0xff, 0xaf, 0xdc, 0xf4, 0xff, 0xaf, 0xdc, 0xf4, 0xff, 0xaf, 0xdc, 0xf4, 0xff,
|
||||||
|
0x27, 0xa1, 0xe0, 0xff, 0x27, 0xa1, 0xe1, 0xff, 0x27, 0xa1, 0xe1, 0xff, 0x27, 0xa1, 0xe1, 0xff, 0x27, 0xa1, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff,
|
||||||
|
0x29, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff,
|
||||||
|
0x41, 0xac, 0xe4, 0xff, 0x41, 0xac, 0xe4, 0xff, 0x41, 0xac, 0xe4, 0xff, 0x41, 0xac, 0xe4, 0xff, 0x41, 0xac, 0xe4, 0xff,
|
||||||
|
0x4f, 0xb2, 0xe6, 0xff, 0x4f, 0xb2, 0xe6, 0xff, 0x4f, 0xb2, 0xe6, 0xff, 0x4f, 0xb2, 0xe6, 0xff, 0x4f, 0xb2, 0xe6, 0xff,
|
||||||
|
0x08, 0x56, 0x88, 0xff, 0x08, 0x56, 0x88, 0xff, 0x08, 0x56, 0x88, 0xff, 0x08, 0x56, 0x88, 0xff, 0x08, 0x56, 0x88, 0xff,
|
||||||
|
0x16, 0x68, 0x97, 0xff, 0x16, 0x68, 0x97, 0xff, 0x16, 0x68, 0x97, 0xff, 0x16, 0x68, 0x97, 0xff, 0x16, 0x68, 0x97, 0xff,
|
||||||
|
0x18, 0x6a, 0x98, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x18, 0x6a, 0x98, 0xff,
|
||||||
|
0x19, 0x6f, 0x9e, 0xff, 0x1a, 0x6f, 0x9f, 0xff, 0x1a, 0x6f, 0x9e, 0xff, 0x1a, 0x6f, 0x9e, 0xff, 0x1a, 0x6f, 0x9e, 0xff,
|
||||||
|
0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff,
|
||||||
|
0x00, 0x1e, 0x33, 0xc0, 0x00, 0x1e, 0x33, 0xc0, 0x00, 0x1e, 0x33, 0xc0, 0x00, 0x1e, 0x33, 0xc0, 0x00, 0x1e, 0x33, 0xc0,
|
||||||
|
0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x57,
|
||||||
|
0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58,
|
||||||
|
0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x54,
|
||||||
|
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x2c,
|
||||||
|
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_img_dsc_t imgbtn_mid = {
|
||||||
|
.header.always_zero = 0,
|
||||||
|
.header.w = 5,
|
||||||
|
.header.h = 49,
|
||||||
|
.data_size = 245 * LV_IMG_PX_SIZE_ALPHA_BYTE,
|
||||||
|
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||||
|
.data = imgbtn_mid_map,
|
||||||
|
};
|
||||||
BIN
examples/assets/imgbtn_mid.png
Normal file
BIN
examples/assets/imgbtn_mid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 B |
239
examples/assets/imgbtn_right.c
Normal file
239
examples/assets/imgbtn_right.c
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
|
||||||
|
#include "lvgl.h"
|
||||||
|
#else
|
||||||
|
#include "lvgl/lvgl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef LV_ATTRIBUTE_IMG_IMGBTN_RIGHT
|
||||||
|
#define LV_ATTRIBUTE_IMG_IMGBTN_RIGHT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMGBTN_RIGHT uint8_t imgbtn_right_map[] = {
|
||||||
|
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||||
|
/*Pixel format: Blue: 2 bit, Green: 3 bit, Red: 3 bit, Alpha 8 bit */
|
||||||
|
0x68, 0x23, 0x68, 0x14, 0x68, 0x04, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x64, 0xff, 0x64, 0xdf, 0x68, 0xb0, 0x68, 0x34, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xd6, 0xff, 0x68, 0xff, 0x68, 0xff, 0x68, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0xff, 0x68, 0xff, 0x68, 0x77, 0x00, 0x00, 0x68, 0x00,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xfa, 0xff, 0xff, 0xff, 0xb6, 0xff, 0x64, 0xfc, 0x68, 0x23, 0x00, 0x00,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xff, 0xff, 0x8d, 0xff, 0x68, 0xb4, 0x00, 0x00,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd6, 0xff, 0x68, 0xff, 0x68, 0x07,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd5, 0xff, 0x68, 0xff, 0x68, 0x47,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd5, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x57,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xd1, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xac, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf5, 0xff, 0xf5, 0xff, 0xf9, 0xff, 0xd1, 0xff, 0x8c, 0xff, 0x68, 0xff, 0x68, 0x54,
|
||||||
|
0xf5, 0xff, 0xf9, 0xff, 0xf9, 0xff, 0xd1, 0xff, 0x8c, 0xff, 0x8c, 0xff, 0x68, 0xff, 0x68, 0x44,
|
||||||
|
0xf5, 0xff, 0xd1, 0xff, 0xac, 0xff, 0x8c, 0xff, 0xac, 0xff, 0x8c, 0xff, 0x68, 0xff, 0x68, 0x0c,
|
||||||
|
0x8c, 0xff, 0x8c, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0x68, 0xff, 0x68, 0xcb, 0x00, 0x00,
|
||||||
|
0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0x8c, 0xff, 0x44, 0xff, 0x44, 0x40, 0x00, 0x00,
|
||||||
|
0xac, 0xff, 0xac, 0xff, 0xac, 0xff, 0x8c, 0xff, 0x44, 0xff, 0x44, 0xb0, 0x00, 0x10, 0x00, 0x00,
|
||||||
|
0xac, 0xff, 0x8c, 0xff, 0x68, 0xff, 0x44, 0xff, 0x44, 0xc7, 0x00, 0x44, 0x00, 0x0c, 0x00, 0x00,
|
||||||
|
0x44, 0xff, 0x44, 0xff, 0x44, 0xf8, 0x24, 0x93, 0x00, 0x57, 0x00, 0x34, 0x00, 0x08, 0x00, 0x00,
|
||||||
|
0x24, 0xb0, 0x24, 0x8c, 0x00, 0x5c, 0x00, 0x54, 0x00, 0x50, 0x00, 0x24, 0x00, 0x04, 0x00, 0x00,
|
||||||
|
0x00, 0x57, 0x00, 0x58, 0x00, 0x58, 0x00, 0x57, 0x00, 0x3c, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x58, 0x00, 0x58, 0x00, 0x54, 0x00, 0x40, 0x00, 0x1b, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x50, 0x00, 0x48, 0x00, 0x34, 0x00, 0x18, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x27, 0x00, 0x18, 0x00, 0x0b, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x03, 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,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
|
||||||
|
/*Pixel format: Blue: 5 bit, Green: 6 bit, Red: 5 bit, Alpha 8 bit*/
|
||||||
|
0xc0, 0x61, 0x23, 0xc0, 0x61, 0x14, 0xc0, 0x61, 0x04, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x60, 0x59, 0xff, 0x80, 0x59, 0xdf, 0xc0, 0x61, 0xb0, 0xc0, 0x61, 0x34, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x5c, 0xf7, 0xff, 0x10, 0xb5, 0xff, 0x01, 0x6a, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x17, 0xff, 0xff, 0xbc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0xa4, 0xff, 0x80, 0x59, 0xff, 0xc0, 0x61, 0x77, 0x00, 0x00, 0x00, 0xc0, 0x61, 0x00,
|
||||||
|
0x05, 0xe5, 0xff, 0x47, 0xe5, 0xff, 0xec, 0xed, 0xff, 0xff, 0xff, 0xff, 0xae, 0xac, 0xff, 0x80, 0x59, 0xfc, 0xc0, 0x61, 0x23, 0x00, 0x00, 0x00,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x47, 0xe5, 0xff, 0xbd, 0xff, 0xff, 0xa5, 0x7a, 0xff, 0xc0, 0x61, 0xb4, 0x00, 0x00, 0x00,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x89, 0xed, 0xff, 0xcf, 0xb4, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x07,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x25, 0xe5, 0xff, 0x0c, 0xcd, 0xff, 0xe1, 0x61, 0xff, 0xc0, 0x61, 0x47,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0xa7, 0xcc, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x57,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x44, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x44, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x64, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x65, 0xcc, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x25, 0xe5, 0xff, 0x65, 0xc4, 0xff, 0xe0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x26, 0xe5, 0xff, 0x05, 0xb4, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x05, 0xe5, 0xff, 0x26, 0xe5, 0xff, 0x89, 0xe5, 0xff, 0x23, 0x93, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x05, 0xe5, 0xff, 0x26, 0xe5, 0xff, 0x47, 0xe5, 0xff, 0x8a, 0xed, 0xff, 0x25, 0xbc, 0xff, 0x81, 0x82, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x54,
|
||||||
|
0x68, 0xed, 0xff, 0x89, 0xed, 0xff, 0x8a, 0xe5, 0xff, 0xe5, 0xb3, 0xff, 0xe1, 0x92, 0xff, 0xe2, 0x8a, 0xff, 0xc0, 0x61, 0xff, 0xc0, 0x61, 0x44,
|
||||||
|
0x49, 0xe5, 0xff, 0x66, 0xc4, 0xff, 0x02, 0x9b, 0xff, 0xe1, 0x92, 0xff, 0x22, 0x9b, 0xff, 0xc2, 0x82, 0xff, 0xa0, 0x59, 0xff, 0xe0, 0x69, 0x0c,
|
||||||
|
0xc1, 0x8a, 0xff, 0xe1, 0x92, 0xff, 0x02, 0x93, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0xe1, 0x61, 0xff, 0xa0, 0x59, 0xcb, 0x00, 0x00, 0x00,
|
||||||
|
0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0x63, 0x9b, 0xff, 0x82, 0x7a, 0xff, 0x40, 0x49, 0xff, 0x60, 0x49, 0x40, 0x00, 0x00, 0x00,
|
||||||
|
0x43, 0x9b, 0xff, 0x63, 0x9b, 0xff, 0x43, 0x9b, 0xff, 0xa2, 0x7a, 0xff, 0x00, 0x39, 0xff, 0x20, 0x41, 0xb0, 0x20, 0x08, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x43, 0x9b, 0xff, 0xc2, 0x82, 0xff, 0xe1, 0x59, 0xff, 0x20, 0x41, 0xff, 0x00, 0x39, 0xc7, 0x40, 0x08, 0x44, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||||
|
0x20, 0x41, 0xff, 0x20, 0x41, 0xff, 0x20, 0x41, 0xf8, 0xa0, 0x28, 0x93, 0x00, 0x00, 0x57, 0x00, 0x00, 0x34, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0xe0, 0x30, 0xb0, 0xa0, 0x20, 0x8c, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x54, 0x00, 0x00, 0x50, 0x00, 0x00, 0x24, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x57, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x54, 0x00, 0x00, 0x40, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x34, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x27, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
|
||||||
|
/*Pixel format: Blue: 5 bit Green: 6 bit, Red: 5 bit, Alpha 8 bit BUT the 2 color bytes are swapped*/
|
||||||
|
0x61, 0xc0, 0x23, 0x61, 0xc0, 0x14, 0x61, 0xc0, 0x04, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x59, 0x60, 0xff, 0x59, 0x80, 0xdf, 0x61, 0xc0, 0xb0, 0x61, 0xc0, 0x34, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xf7, 0x5c, 0xff, 0xb5, 0x10, 0xff, 0x6a, 0x01, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xff, 0x17, 0xff, 0xff, 0xbc, 0xff, 0xff, 0xff, 0xff, 0xa4, 0x2c, 0xff, 0x59, 0x80, 0xff, 0x61, 0xc0, 0x77, 0x00, 0x00, 0x00, 0x61, 0xc0, 0x00,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x47, 0xff, 0xed, 0xec, 0xff, 0xff, 0xff, 0xff, 0xac, 0xae, 0xff, 0x59, 0x80, 0xfc, 0x61, 0xc0, 0x23, 0x00, 0x00, 0x00,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x47, 0xff, 0xff, 0xbd, 0xff, 0x7a, 0xa5, 0xff, 0x61, 0xc0, 0xb4, 0x00, 0x00, 0x00,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xed, 0x89, 0xff, 0xb4, 0xcf, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x07,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x25, 0xff, 0xcd, 0x0c, 0xff, 0x61, 0xe1, 0xff, 0x61, 0xc0, 0x47,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xcc, 0xa7, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x57,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x44, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x44, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xc4, 0x64, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xcc, 0x65, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x25, 0xff, 0xc4, 0x65, 0xff, 0x61, 0xe0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x26, 0xff, 0xb4, 0x05, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x05, 0xff, 0xe5, 0x26, 0xff, 0xe5, 0x89, 0xff, 0x93, 0x23, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xe5, 0x05, 0xff, 0xe5, 0x26, 0xff, 0xe5, 0x47, 0xff, 0xed, 0x8a, 0xff, 0xbc, 0x25, 0xff, 0x82, 0x81, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x54,
|
||||||
|
0xed, 0x68, 0xff, 0xed, 0x89, 0xff, 0xe5, 0x8a, 0xff, 0xb3, 0xe5, 0xff, 0x92, 0xe1, 0xff, 0x8a, 0xe2, 0xff, 0x61, 0xc0, 0xff, 0x61, 0xc0, 0x44,
|
||||||
|
0xe5, 0x49, 0xff, 0xc4, 0x66, 0xff, 0x9b, 0x02, 0xff, 0x92, 0xe1, 0xff, 0x9b, 0x22, 0xff, 0x82, 0xc2, 0xff, 0x59, 0xa0, 0xff, 0x69, 0xe0, 0x0c,
|
||||||
|
0x8a, 0xc1, 0xff, 0x92, 0xe1, 0xff, 0x93, 0x02, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x61, 0xe1, 0xff, 0x59, 0xa0, 0xcb, 0x00, 0x00, 0x00,
|
||||||
|
0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x43, 0xff, 0x9b, 0x63, 0xff, 0x7a, 0x82, 0xff, 0x49, 0x40, 0xff, 0x49, 0x60, 0x40, 0x00, 0x00, 0x00,
|
||||||
|
0x9b, 0x43, 0xff, 0x9b, 0x63, 0xff, 0x9b, 0x43, 0xff, 0x7a, 0xa2, 0xff, 0x39, 0x00, 0xff, 0x41, 0x20, 0xb0, 0x08, 0x20, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x9b, 0x43, 0xff, 0x82, 0xc2, 0xff, 0x59, 0xe1, 0xff, 0x41, 0x20, 0xff, 0x39, 0x00, 0xc7, 0x08, 0x40, 0x44, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||||
|
0x41, 0x20, 0xff, 0x41, 0x20, 0xff, 0x41, 0x20, 0xf8, 0x28, 0xa0, 0x93, 0x00, 0x00, 0x57, 0x00, 0x00, 0x34, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x30, 0xe0, 0xb0, 0x20, 0xa0, 0x8c, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x54, 0x00, 0x00, 0x50, 0x00, 0x00, 0x24, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x57, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x58, 0x00, 0x00, 0x58, 0x00, 0x00, 0x54, 0x00, 0x00, 0x40, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x34, 0x00, 0x00, 0x18, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x27, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
#if LV_COLOR_DEPTH == 32
|
||||||
|
/*Pixel format: Blue: 8 bit, Green: 8 bit, Red: 8 bit, Alpha: 8 bit*/
|
||||||
|
0x00, 0x38, 0x5f, 0x23, 0x00, 0x38, 0x5f, 0x14, 0x00, 0x38, 0x5f, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x2c, 0x55, 0xff, 0x00, 0x2f, 0x58, 0xdf, 0x00, 0x37, 0x5e, 0xb0, 0x00, 0x38, 0x5f, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xdd, 0xe7, 0xed, 0xff, 0x81, 0x9f, 0xb4, 0xff, 0x0a, 0x41, 0x68, 0xff, 0x00, 0x37, 0x5e, 0xff, 0x00, 0x38, 0x5f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xba, 0xe2, 0xf6, 0xff, 0xe2, 0xf5, 0xff, 0xff, 0xf9, 0xfb, 0xfb, 0xff, 0x60, 0x84, 0x9d, 0xff, 0x00, 0x32, 0x5a, 0xff, 0x01, 0x39, 0x5f, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x5f, 0x00,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x37, 0xa8, 0xe3, 0xff, 0x63, 0xbb, 0xea, 0xff, 0xf5, 0xfc, 0xff, 0xff, 0x71, 0x93, 0xaa, 0xff, 0x00, 0x2f, 0x58, 0xfc, 0x00, 0x37, 0x5f, 0x23, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x26, 0xa0, 0xe0, 0xff, 0x3b, 0xa9, 0xe3, 0xff, 0xe9, 0xf3, 0xfa, 0xff, 0x26, 0x56, 0x78, 0xff, 0x00, 0x37, 0x5f, 0xb4, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x26, 0xa0, 0xe0, 0xff, 0x4a, 0xb0, 0xe6, 0xff, 0x78, 0x9a, 0xb1, 0xff, 0x00, 0x38, 0x5f, 0xff, 0x00, 0x38, 0x5f, 0x07,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2c, 0xa3, 0xe2, 0xff, 0x5e, 0xa0, 0xc6, 0xff, 0x06, 0x3c, 0x62, 0xff, 0x00, 0x38, 0x5f, 0x47,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x3a, 0x96, 0xc8, 0xff, 0x04, 0x3c, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x23, 0x8c, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x57,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8a, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x21, 0x8a, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x22, 0x8b, 0xc4, 0xff, 0x01, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x26, 0x8d, 0xc5, 0xff, 0x02, 0x3b, 0x63, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2b, 0xa3, 0xe1, 0xff, 0x2b, 0x8d, 0xc2, 0xff, 0x02, 0x3b, 0x62, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x31, 0xa5, 0xe2, 0xff, 0x2c, 0x81, 0xb2, 0xff, 0x01, 0x39, 0x61, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2a, 0xa2, 0xe1, 0xff, 0x29, 0xa2, 0xe1, 0xff, 0x2e, 0xa4, 0xe2, 0xff, 0x4b, 0xb0, 0xe4, 0xff, 0x15, 0x63, 0x93, 0xff, 0x00, 0x38, 0x5f, 0xff, 0x00, 0x38, 0x5f, 0x54,
|
||||||
|
0x2a, 0xa2, 0xe1, 0xff, 0x2d, 0xa3, 0xe1, 0xff, 0x36, 0xa7, 0xe3, 0xff, 0x4e, 0xb2, 0xe7, 0xff, 0x2c, 0x86, 0xba, 0xff, 0x08, 0x51, 0x80, 0xff, 0x00, 0x37, 0x5d, 0xff, 0x00, 0x38, 0x60, 0x54,
|
||||||
|
0x44, 0xae, 0xe5, 0xff, 0x4b, 0xb2, 0xe8, 0xff, 0x4e, 0xb1, 0xe4, 0xff, 0x27, 0x7e, 0xb2, 0xff, 0x0b, 0x5b, 0x8d, 0xff, 0x0e, 0x5b, 0x88, 0xff, 0x01, 0x37, 0x5d, 0xff, 0x00, 0x39, 0x5f, 0x44,
|
||||||
|
0x48, 0xa9, 0xde, 0xff, 0x30, 0x8b, 0xbf, 0xff, 0x10, 0x62, 0x95, 0xff, 0x0c, 0x5c, 0x8e, 0xff, 0x14, 0x66, 0x96, 0xff, 0x10, 0x57, 0x80, 0xff, 0x00, 0x36, 0x5b, 0xff, 0x00, 0x3b, 0x65, 0x0c,
|
||||||
|
0x09, 0x58, 0x89, 0xff, 0x0c, 0x5c, 0x8d, 0xff, 0x11, 0x61, 0x92, 0xff, 0x16, 0x68, 0x96, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x07, 0x3e, 0x61, 0xff, 0x00, 0x34, 0x58, 0xcb, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x17, 0x68, 0x97, 0xff, 0x17, 0x69, 0x97, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x19, 0x6d, 0x9c, 0xff, 0x10, 0x52, 0x79, 0xff, 0x00, 0x29, 0x46, 0xff, 0x00, 0x2c, 0x4a, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x6a, 0x98, 0xff, 0x18, 0x6b, 0x99, 0xff, 0x18, 0x6a, 0x98, 0xff, 0x11, 0x55, 0x7c, 0xff, 0x00, 0x22, 0x3b, 0xff, 0x00, 0x25, 0x3e, 0xb0, 0x00, 0x06, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x18, 0x68, 0x96, 0xff, 0x12, 0x57, 0x80, 0xff, 0x08, 0x3c, 0x5c, 0xff, 0x00, 0x25, 0x40, 0xff, 0x00, 0x1f, 0x35, 0xc7, 0x00, 0x07, 0x0b, 0x44, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3e, 0xff, 0x00, 0x24, 0x3d, 0xf8, 0x00, 0x16, 0x26, 0x93, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x1b, 0x2f, 0xb0, 0x00, 0x15, 0x23, 0x8c, 0x00, 0x02, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x03, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
const lv_img_dsc_t imgbtn_right = {
|
||||||
|
.header.always_zero = 0,
|
||||||
|
.header.w = 8,
|
||||||
|
.header.h = 50,
|
||||||
|
.data_size = 400 * LV_IMG_PX_SIZE_ALPHA_BYTE,
|
||||||
|
.header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA,
|
||||||
|
.data = imgbtn_right_map,
|
||||||
|
};
|
||||||
|
|
||||||
BIN
examples/assets/imgbtn_right.png
Normal file
BIN
examples/assets/imgbtn_right.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 734 B |
13
examples/widgets/imgbtn/index.rst
Normal file
13
examples/widgets/imgbtn/index.rst
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
C
|
||||||
|
^
|
||||||
|
|
||||||
|
Simple Image button
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
.. lv_example:: lv_ex_widgets/lv_ex_imgbtn/lv_ex_imgbtn_1
|
||||||
|
:language: c
|
||||||
|
|
||||||
|
MicroPython
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
No examples yet.
|
||||||
43
examples/widgets/imgbtn/lv_example_imgbtn_1.c
Normal file
43
examples/widgets/imgbtn/lv_example_imgbtn_1.c
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#include "../../../lvgl.h"
|
||||||
|
|
||||||
|
#if LV_USE_IMGBTN
|
||||||
|
|
||||||
|
void lv_example_imgbtn_1(void)
|
||||||
|
{
|
||||||
|
LV_IMG_DECLARE(imgbtn_left);
|
||||||
|
LV_IMG_DECLARE(imgbtn_right);
|
||||||
|
LV_IMG_DECLARE(imgbtn_mid);
|
||||||
|
|
||||||
|
|
||||||
|
/* Create a transition animation on width transformation.*/
|
||||||
|
static lv_style_prop_t tr_prop[] = {LV_STYLE_TRANSFORM_WIDTH, 0};
|
||||||
|
static lv_style_transition_dsc_t tr;
|
||||||
|
lv_style_transition_dsc_init(&tr, tr_prop, &lv_anim_path_def, 300, 0);
|
||||||
|
|
||||||
|
static lv_style_t style_def;
|
||||||
|
lv_style_init(&style_def);
|
||||||
|
lv_style_set_text_color(&style_def, LV_COLOR_WHITE);
|
||||||
|
lv_style_set_transition(&style_def, &tr);
|
||||||
|
|
||||||
|
/*Darken the button when pressed and make it wider*/
|
||||||
|
static lv_style_t style_pr;
|
||||||
|
lv_style_init(&style_pr);
|
||||||
|
lv_style_set_img_recolor_opa(&style_pr, LV_OPA_30);
|
||||||
|
lv_style_set_img_recolor(&style_pr, LV_COLOR_BLACK);
|
||||||
|
lv_style_set_transform_width(&style_pr, 20);
|
||||||
|
|
||||||
|
/*Create an image button*/
|
||||||
|
lv_obj_t * imgbtn1 = lv_imgbtn_create(lv_scr_act());
|
||||||
|
lv_imgbtn_set_src(imgbtn1, LV_IMGBTN_STATE_RELEASED, &imgbtn_left, &imgbtn_mid, &imgbtn_right);
|
||||||
|
lv_obj_add_style(imgbtn1, LV_PART_MAIN, LV_STATE_DEFAULT, &style_def);
|
||||||
|
lv_obj_add_style(imgbtn1, LV_PART_MAIN, LV_STATE_PRESSED, &style_pr);
|
||||||
|
|
||||||
|
lv_obj_align(imgbtn1, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||||
|
|
||||||
|
/*Create a label on the image button*/
|
||||||
|
lv_obj_t * label = lv_label_create(imgbtn1, NULL);
|
||||||
|
lv_label_set_text(label, "Button");
|
||||||
|
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, -4);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -5,7 +5,7 @@ void lv_example_tabview_1(void)
|
|||||||
{
|
{
|
||||||
/*Create a Tab view object*/
|
/*Create a Tab view object*/
|
||||||
lv_obj_t *tabview;
|
lv_obj_t *tabview;
|
||||||
tabview = lv_tabview_create(lv_scr_act(), LV_DIR_RIGHT, 50);
|
tabview = lv_tabview_create(lv_scr_act(), LV_DIR_TOP, 50);
|
||||||
|
|
||||||
/*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
|
/*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
|
||||||
lv_obj_t *tab1 = lv_tabview_add_tab(tabview, "Tab 1");
|
lv_obj_t *tab1 = lv_tabview_add_tab(tabview, "Tab 1");
|
||||||
|
|||||||
@@ -260,15 +260,15 @@ static int32_t find_track_end(lv_obj_t * cont, int32_t item_start_id, lv_coord_t
|
|||||||
|
|
||||||
lv_obj_t * item = lv_obj_get_child(cont, item_id);
|
lv_obj_t * item = lv_obj_get_child(cont, item_id);
|
||||||
while(item) {
|
while(item) {
|
||||||
if(lv_obj_has_flag(item, LV_OBJ_FLAG_LAYOUTABLE)) {
|
if(lv_obj_has_flag(item, LV_OBJ_FLAG_LAYOUTABLE) || !lv_obj_has_flag(item, LV_OBJ_FLAG_HIDDEN)) {
|
||||||
lv_coord_t main_size = (row ? item->w_set : item->h_set);
|
lv_coord_t main_size = (row ? item->w_set : item->h_set);
|
||||||
if(_LV_FLEX_GET_GROW(main_size)) {
|
if(_LV_FLEX_GET_GROW(main_size)) {
|
||||||
grow_sum += _LV_FLEX_GET_GROW(main_size);
|
grow_sum += _LV_FLEX_GET_GROW(main_size);
|
||||||
grow_item_cnt++;
|
grow_item_cnt++;
|
||||||
} else {
|
} else {
|
||||||
lv_coord_t item_size = get_main_size(item) + item_gap;
|
lv_coord_t item_size = get_main_size(item);
|
||||||
if(wrap && t->track_main_size + item_size > max_main_size + item_gap) break;
|
if(wrap && t->track_main_size + item_size > max_main_size) break;
|
||||||
t->track_main_size += item_size;
|
t->track_main_size += item_size + item_gap;
|
||||||
}
|
}
|
||||||
t->track_cross_size = LV_MAX(get_cross_size(item), t->track_cross_size);
|
t->track_cross_size = LV_MAX(get_cross_size(item), t->track_cross_size);
|
||||||
t->item_cnt++;
|
t->item_cnt++;
|
||||||
@@ -291,7 +291,8 @@ static int32_t find_track_end(lv_obj_t * cont, int32_t item_start_id, lv_coord_t
|
|||||||
|
|
||||||
/*Have at least one item in a row*/
|
/*Have at least one item in a row*/
|
||||||
if(item && item_id == item_start_id) {
|
if(item && item_id == item_start_id) {
|
||||||
item = get_next_item(cont, f->rev, &item_id);
|
item = cont->spec_attr->children[item_id];
|
||||||
|
get_next_item(cont, f->rev, &item_id);
|
||||||
if(item) {
|
if(item) {
|
||||||
t->track_cross_size = get_cross_size(item);
|
t->track_cross_size = get_cross_size(item);
|
||||||
t->track_main_size = get_main_size(item);
|
t->track_main_size = get_main_size(item);
|
||||||
@@ -327,7 +328,7 @@ static void children_repos(lv_obj_t * cont, int32_t item_first_id, int32_t item_
|
|||||||
lv_obj_t * item = lv_obj_get_child(cont, item_first_id);
|
lv_obj_t * item = lv_obj_get_child(cont, item_first_id);
|
||||||
/*Reposition the children*/
|
/*Reposition the children*/
|
||||||
while(item && item_first_id != item_last_id) {
|
while(item && item_first_id != item_last_id) {
|
||||||
if(lv_obj_has_flag(item, LV_OBJ_FLAG_LAYOUTABLE) == false) {
|
if(!lv_obj_has_flag(item, LV_OBJ_FLAG_LAYOUTABLE) || lv_obj_has_flag(item, LV_OBJ_FLAG_HIDDEN)) {
|
||||||
item = get_next_item(cont, f->rev, &item_first_id);
|
item = get_next_item(cont, f->rev, &item_first_id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -349,7 +350,9 @@ static void children_repos(lv_obj_t * cont, int32_t item_first_id, int32_t item_
|
|||||||
lv_coord_t cross_pos = 0;
|
lv_coord_t cross_pos = 0;
|
||||||
switch(f->item_cross_place) {
|
switch(f->item_cross_place) {
|
||||||
case LV_FLEX_PLACE_CENTER:
|
case LV_FLEX_PLACE_CENTER:
|
||||||
cross_pos = (t->track_cross_size - area_get_cross_size(&item->coords)) / 2;
|
/* Round the up the cross size to avoid rounding error when dividing by 2
|
||||||
|
* The issue comes up e,g, with column direction with center cross direction if an element's width changes*/
|
||||||
|
cross_pos = (((t->track_cross_size + 1) & (~1)) - area_get_cross_size(&item->coords)) / 2;
|
||||||
break;
|
break;
|
||||||
case LV_FLEX_PLACE_END:
|
case LV_FLEX_PLACE_END:
|
||||||
cross_pos = t->track_cross_size - area_get_cross_size(&item->coords);
|
cross_pos = t->track_cross_size - area_get_cross_size(&item->coords);
|
||||||
@@ -364,10 +367,12 @@ static void children_repos(lv_obj_t * cont, int32_t item_first_id, int32_t item_
|
|||||||
diff_y += row ? cross_pos : main_pos;
|
diff_y += row ? cross_pos : main_pos;
|
||||||
|
|
||||||
if(diff_x || diff_y) {
|
if(diff_x || diff_y) {
|
||||||
|
lv_obj_invalidate(item);
|
||||||
item->coords.x1 += diff_x;
|
item->coords.x1 += diff_x;
|
||||||
item->coords.x2 += diff_x;
|
item->coords.x2 += diff_x;
|
||||||
item->coords.y1 += diff_y;
|
item->coords.y1 += diff_y;
|
||||||
item->coords.y2 += diff_y;
|
item->coords.y2 += diff_y;
|
||||||
|
lv_obj_invalidate(item);
|
||||||
lv_obj_move_children_by(item, diff_x, diff_y);
|
lv_obj_move_children_by(item, diff_x, diff_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_CHECKBOX
|
#if LV_USE_CHECKBOX
|
||||||
lv_style_t cb_marker, cb_marker_checked;
|
lv_style_t cb_marker, cb_marker_checked, cb_bg_outline_pad;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_DROPDOWN
|
#if LV_USE_DROPDOWN
|
||||||
@@ -147,9 +147,17 @@ typedef struct {
|
|||||||
lv_style_t calendar_day;
|
lv_style_t calendar_day;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_MSGBOX
|
||||||
|
lv_style_t msgbox_btns_bg;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LV_USE_LIST
|
#if LV_USE_LIST
|
||||||
lv_style_t list_bg, list_btn, list_item_grow, list_label;
|
lv_style_t list_bg, list_btn, list_item_grow, list_label;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_LED
|
||||||
|
lv_style_t led;
|
||||||
|
#endif
|
||||||
} my_theme_styles_t;
|
} my_theme_styles_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -244,6 +252,7 @@ static void style_init(void)
|
|||||||
|
|
||||||
style_init_reset(&styles->edit_outline);
|
style_init_reset(&styles->edit_outline);
|
||||||
lv_style_set_outline_color(&styles->edit_outline, theme.color_secondary);
|
lv_style_set_outline_color(&styles->edit_outline, theme.color_secondary);
|
||||||
|
lv_style_set_outline_width(&styles->edit_outline, OUTLINE_WIDTH);
|
||||||
lv_style_set_outline_opa(&styles->edit_outline, LV_OPA_50);
|
lv_style_set_outline_opa(&styles->edit_outline, LV_OPA_50);
|
||||||
|
|
||||||
style_init_reset(&styles->btn);
|
style_init_reset(&styles->btn);
|
||||||
@@ -366,6 +375,9 @@ static void style_init(void)
|
|||||||
lv_style_set_content_text(&styles->cb_marker_checked, LV_SYMBOL_OK);
|
lv_style_set_content_text(&styles->cb_marker_checked, LV_SYMBOL_OK);
|
||||||
lv_style_set_content_color(&styles->cb_marker_checked, LV_COLOR_WHITE);
|
lv_style_set_content_color(&styles->cb_marker_checked, LV_COLOR_WHITE);
|
||||||
lv_style_set_content_font(&styles->cb_marker_checked, theme.font_small);
|
lv_style_set_content_font(&styles->cb_marker_checked, theme.font_small);
|
||||||
|
|
||||||
|
style_init_reset(&styles->cb_bg_outline_pad);
|
||||||
|
lv_style_set_outline_pad(&styles->cb_bg_outline_pad, LV_DPX(5));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LV_USE_CHART
|
#if LV_USE_CHART
|
||||||
@@ -425,6 +437,12 @@ static void style_init(void)
|
|||||||
lv_style_set_bg_opa(&styles->calendar_day, LV_OPA_COVER);
|
lv_style_set_bg_opa(&styles->calendar_day, LV_OPA_COVER);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_MSGBOX
|
||||||
|
/*To add space for the buttons outline*/
|
||||||
|
style_init_reset(&styles->msgbox_btns_bg);
|
||||||
|
lv_style_set_pad_all(&styles->msgbox_btns_bg, OUTLINE_WIDTH);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LV_USE_LIST
|
#if LV_USE_LIST
|
||||||
style_init_reset(&styles->list_bg);
|
style_init_reset(&styles->list_bg);
|
||||||
lv_style_set_pad_hor(&styles->list_bg, PAD_DEF);
|
lv_style_set_pad_hor(&styles->list_bg, PAD_DEF);
|
||||||
@@ -441,7 +459,18 @@ static void style_init(void)
|
|||||||
|
|
||||||
style_init_reset(&styles->list_item_grow);
|
style_init_reset(&styles->list_item_grow);
|
||||||
lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF);
|
lv_style_set_transform_width(&styles->list_item_grow, PAD_DEF);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if LV_USE_LED
|
||||||
|
lv_style_init(&styles->led);
|
||||||
|
lv_style_set_bg_opa(&styles->led, LV_OPA_COVER);
|
||||||
|
lv_style_set_bg_color(&styles->led, LV_COLOR_WHITE);
|
||||||
|
lv_style_set_bg_grad_color(&styles->led, LV_COLOR_GRAY);
|
||||||
|
lv_style_set_radius(&styles->led, LV_RADIUS_CIRCLE);
|
||||||
|
lv_style_set_shadow_width(&styles->led, LV_DPX(15));
|
||||||
|
lv_style_set_shadow_color(&styles->led, LV_COLOR_WHITE);
|
||||||
|
lv_style_set_shadow_spread(&styles->led, LV_DPX(5));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,9 +566,10 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_list_class)) {
|
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_list_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->list_btn);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->list_btn);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->bg_color_primary);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->list_item_grow);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->list_item_grow);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->list_item_grow);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->pressed);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->pressed);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_CHECKED, &styles->bg_color_primary);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -550,6 +580,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->transition_normal);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->transition_normal);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->grow);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->grow);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_CHECKED, &styles->bg_color_secondary);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_CHECKED, &styles->bg_color_secondary);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DISABLED, &styles->disabled);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -557,10 +588,13 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) {
|
else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) {
|
||||||
#if LV_USE_MSGBOX
|
#if LV_USE_MSGBOX
|
||||||
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) {
|
if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) {
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->msgbox_btns_bg);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_gap);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_gap);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->btn);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->btn);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_CHECKED, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_CHECKED, &styles->bg_color_primary);
|
||||||
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_CHECKED, &styles->bg_color_primary);
|
||||||
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_FOCUSED, &styles->focus_outline);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -584,6 +618,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
else if(lv_obj_check_type(obj, &lv_bar_class)) {
|
else if(lv_obj_check_type(obj, &lv_bar_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
||||||
}
|
}
|
||||||
@@ -595,6 +631,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->transition_delayed);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->transition_delayed);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->transition_normal);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->transition_normal);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
||||||
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->knob);
|
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->knob);
|
||||||
@@ -620,6 +658,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
#if LV_USE_CHECKBOX
|
#if LV_USE_CHECKBOX
|
||||||
else if(lv_obj_check_type(obj, &lv_checkbox_class)) {
|
else if(lv_obj_check_type(obj, &lv_checkbox_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_gap);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_gap);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->cb_bg_outline_pad);
|
||||||
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DISABLED, &styles->disabled);
|
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DISABLED, &styles->disabled);
|
||||||
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DEFAULT, &styles->cb_marker);
|
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DEFAULT, &styles->cb_marker);
|
||||||
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_CHECKED, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_CHECKED, &styles->bg_color_primary);
|
||||||
@@ -636,6 +676,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->circle);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DISABLED, &styles->disabled);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DISABLED, &styles->disabled);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DEFAULT, &styles->circle);
|
||||||
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DISABLED, &styles->disabled);
|
lv_obj_add_style(obj, LV_PART_INDICATOR, LV_STATE_DISABLED, &styles->disabled);
|
||||||
@@ -665,6 +706,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->anim);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->anim);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->line_space_large);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->line_space_large);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->text_align_center);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->text_align_center);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_SELECTED, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
lv_obj_add_style(obj, LV_PART_SELECTED, LV_STATE_DEFAULT, &styles->bg_color_primary);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -679,6 +722,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->grow);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_PRESSED, &styles->grow);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_CHECKED, &styles->ddlist_flip);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_CHECKED, &styles->ddlist_flip);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->transition_normal);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->transition_normal);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
}
|
}
|
||||||
else if(lv_obj_check_type(obj, &lv_dropdown_list_class)) {
|
else if(lv_obj_check_type(obj, &lv_dropdown_list_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
||||||
@@ -721,6 +766,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
#if LV_USE_TEXTAREA
|
#if LV_USE_TEXTAREA
|
||||||
else if(lv_obj_check_type(obj, &lv_textarea_class)) {
|
else if(lv_obj_check_type(obj, &lv_textarea_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_DEFAULT, &styles->scrollbar);
|
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_DEFAULT, &styles->scrollbar);
|
||||||
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_SCROLLED, &styles->scrollbar_scrolled);
|
lv_obj_add_style(obj, LV_PART_SCROLLBAR, LV_STATE_SCROLLED, &styles->scrollbar_scrolled);
|
||||||
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_FOCUSED, &styles->ta_cursor);
|
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_FOCUSED, &styles->ta_cursor);
|
||||||
@@ -732,9 +779,12 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
else if(lv_obj_check_type(obj, &lv_calendar_class)) {
|
else if(lv_obj_check_type(obj, &lv_calendar_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_small);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_small);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->calendar_day);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->calendar_day);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DISABLED, &styles->disabled);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DISABLED, &styles->disabled);
|
||||||
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_FOCUSED, &styles->focus_outline);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -742,10 +792,13 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
else if(lv_obj_check_type(obj, &lv_keyboard_class)) {
|
else if(lv_obj_check_type(obj, &lv_keyboard_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->scr);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->scr);
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_small);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->pad_small);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->btn);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->btn);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_PRESSED, &styles->pressed);
|
||||||
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_CHECKED, &styles->bg_color_gray);
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_CHECKED, &styles->bg_color_gray);
|
||||||
|
lv_obj_add_style(obj, LV_PART_ITEMS, LV_STATE_FOCUSED, &styles->focus_outline);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if LV_USE_LIST
|
#if LV_USE_LIST
|
||||||
@@ -766,6 +819,8 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
#if LV_USE_SPINBOX
|
#if LV_USE_SPINBOX
|
||||||
else if(lv_obj_check_type(obj, &lv_spinbox_class)) {
|
else if(lv_obj_check_type(obj, &lv_spinbox_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->card);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_FOCUS_KEY, &styles->focus_outline);
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_EDITED, &styles->edit_outline);
|
||||||
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
lv_obj_add_style(obj, LV_PART_MARKER, LV_STATE_DEFAULT, &styles->bg_color_gray);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -785,6 +840,14 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
|
|||||||
else if(lv_obj_check_type(obj, &lv_colorwheel_class)) {
|
else if(lv_obj_check_type(obj, &lv_colorwheel_class)) {
|
||||||
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->pad_normal);
|
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->pad_normal);
|
||||||
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
||||||
|
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->pad_normal);
|
||||||
|
lv_obj_add_style(obj, LV_PART_KNOB, LV_STATE_DEFAULT, &styles->bg_color_panel);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LV_USE_LED
|
||||||
|
else if(lv_obj_check_type(obj, &lv_led_class)) {
|
||||||
|
lv_obj_add_style(obj, LV_PART_MAIN, LV_STATE_DEFAULT, &styles->led);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const lv_obj_class_t lv_calendar_class = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static const char * day_names_def[7] = LV_CALENDAR_DEFAULT_MONTH_NAMES;
|
static const char * day_names_def[7] = LV_CALENDAR_DEFAULT_DAY_NAMES;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
|
|||||||
@@ -1,574 +1,384 @@
|
|||||||
///**
|
/**
|
||||||
// * @file lv_imgbtn.c
|
* @file lv_imgbtn.c
|
||||||
// *
|
*
|
||||||
// */
|
*/
|
||||||
//
|
|
||||||
///*********************
|
/*********************
|
||||||
// * INCLUDES
|
* INCLUDES
|
||||||
// *********************/
|
*********************/
|
||||||
//
|
|
||||||
//#include "../lv_misc/lv_assert.h"
|
#include "lv_imgbtn.h"
|
||||||
//#include "lv_imgbtn.h"
|
|
||||||
//#include "lv_label.h"
|
#if LV_USE_IMGBTN != 0
|
||||||
//
|
|
||||||
//#if LV_USE_IMGBTN != 0
|
/*********************
|
||||||
//
|
* DEFINES
|
||||||
///*********************
|
*********************/
|
||||||
// * DEFINES
|
#define MY_CLASS &lv_imgbtn_class
|
||||||
// *********************/
|
|
||||||
//#define MY_CLASS "lv_imgbtn"
|
/**********************
|
||||||
//
|
* TYPEDEFS
|
||||||
///**********************
|
**********************/
|
||||||
// * TYPEDEFS
|
|
||||||
// **********************/
|
/**********************
|
||||||
//
|
* STATIC PROTOTYPES
|
||||||
///**********************
|
**********************/
|
||||||
// * STATIC PROTOTYPES
|
static void lv_imgbtn_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
// **********************/
|
static lv_draw_res_t lv_imgbtn_draw(lv_obj_t * imgbtn, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
||||||
//static lv_draw_res_t lv_imgbtn_draw(lv_obj_t * imgbtn, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * param);
|
||||||
//static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * param);
|
static void refr_img(lv_obj_t * imgbtn);
|
||||||
//static void refr_img(lv_obj_t * imgbtn);
|
static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
|
||||||
//static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
|
lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn);
|
||||||
//lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn);
|
|
||||||
//
|
/**********************
|
||||||
///**********************
|
* STATIC VARIABLES
|
||||||
// * STATIC VARIABLES
|
**********************/
|
||||||
// **********************/
|
const lv_obj_class_t lv_imgbtn_class = {
|
||||||
//static lv_signal_cb_t ancestor_signal;
|
.base_class = &lv_obj_class,
|
||||||
//static lv_draw_cb_t ancestor_draw;
|
.instance_size = sizeof(lv_imgbtn_t),
|
||||||
//
|
.constructor_cb = lv_imgbtn_constructor,
|
||||||
///**********************
|
.signal_cb = lv_imgbtn_signal,
|
||||||
// * MACROS
|
.draw_cb = lv_imgbtn_draw,
|
||||||
// **********************/
|
};
|
||||||
//
|
|
||||||
///**********************
|
/**********************
|
||||||
// * GLOBAL FUNCTIONS
|
* MACROS
|
||||||
// **********************/
|
**********************/
|
||||||
//
|
|
||||||
///**
|
/**********************
|
||||||
// * Create a image button object
|
* GLOBAL FUNCTIONS
|
||||||
// * @param par pointer to an object, it will be the parent of the new image button
|
**********************/
|
||||||
// * @param copy pointer to a image button object, if not NULL then the new object will be copied from
|
|
||||||
// * it
|
/**
|
||||||
// * @return pointer to the created image button
|
* Create a image button object
|
||||||
// */
|
* @param par pointer to an object, it will be the parent of the new image button
|
||||||
//lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy)
|
* @param copy pointer to a image button object, if not NULL then the new object will be copied from
|
||||||
//{
|
* it
|
||||||
// LV_LOG_TRACE("image button create started");
|
* @return pointer to the created image button
|
||||||
//
|
*/
|
||||||
// /*Create the ancestor of image button*/
|
lv_obj_t * lv_imgbtn_create(lv_obj_t * parent)
|
||||||
// lv_obj_t * imgbtn = lv_btn_create(par, copy);
|
{
|
||||||
// LV_ASSERT_MALLOC(imgbtn);
|
return lv_obj_create_from_class(&lv_imgbtn_class, parent, NULL);
|
||||||
// if(imgbtn == NULL) return NULL;
|
}
|
||||||
//
|
|
||||||
// /*Allocate the image button type specific extended data*/
|
/*=====================
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_allocate_ext_attr(imgbtn, sizeof(lv_imgbtn_ext_t));
|
* Setter functions
|
||||||
// LV_ASSERT_MALLOC(ext);
|
*====================*/
|
||||||
// if(ext == NULL) {
|
|
||||||
// lv_obj_del(imgbtn);
|
/**
|
||||||
// return NULL;
|
* Set images for a state of the image button
|
||||||
// }
|
* @param imgbtn pointer to an image button object
|
||||||
//
|
* @param state for which state set the new image
|
||||||
// if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(imgbtn);
|
* @param src_left pointer to an image source for the left side of the button (a C array or path to
|
||||||
// if(ancestor_draw == NULL) ancestor_draw = lv_obj_get_draw_cb(imgbtn);
|
* a file)
|
||||||
//
|
* @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C
|
||||||
// /*Initialize the allocated 'ext' */
|
* array or path to a file)
|
||||||
// lv_memset_00((void *)ext->img_src_mid, sizeof(ext->img_src_mid));
|
* @param src_right pointer to an image source for the right side of the button (a C array or path
|
||||||
//#if LV_IMGBTN_TILED
|
* to a file)
|
||||||
// lv_memset_00(ext->img_src_left, sizeof(ext->img_src_left));
|
*/
|
||||||
// lv_memset_00(ext->img_src_right, sizeof(ext->img_src_right));
|
void lv_imgbtn_set_src(lv_obj_t * obj, lv_imgbtn_state_t state, const void * src_left, const void * src_mid,
|
||||||
//#endif
|
const void * src_right)
|
||||||
// ext->tiled = 0;
|
{
|
||||||
//
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
// ext->act_cf = LV_IMG_CF_UNKNOWN;
|
|
||||||
//
|
if(lv_img_src_get_type(src_left) == LV_IMG_SRC_SYMBOL ||
|
||||||
// /*The signal and draw functions are not copied so set them here*/
|
lv_img_src_get_type(src_mid) == LV_IMG_SRC_SYMBOL ||
|
||||||
// lv_obj_set_signal_cb(imgbtn, lv_imgbtn_signal);
|
lv_img_src_get_type(src_right) == LV_IMG_SRC_SYMBOL) {
|
||||||
// lv_obj_set_draw_cb(imgbtn, lv_imgbtn_draw);
|
LV_LOG_WARN("lv_imgbtn_set_src: symbols are not supported in tiled mode");
|
||||||
//
|
return;
|
||||||
// /*Init the new image button image button*/
|
}
|
||||||
// if(copy == NULL) {
|
|
||||||
// lv_theme_apply(imgbtn, LV_THEME_IMGBTN);
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// }
|
|
||||||
// /*Copy an existing image button*/
|
imgbtn->img_src_left[state] = src_left;
|
||||||
// else {
|
imgbtn->img_src_mid[state] = src_mid;
|
||||||
// lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);
|
imgbtn->img_src_right[state] = src_right;
|
||||||
// lv_memcpy((void *)ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid));
|
|
||||||
//#if LV_IMGBTN_TILED
|
refr_img(obj);
|
||||||
// lv_memcpy((void *)ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left));
|
}
|
||||||
// lv_memcpy((void *)ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right));
|
|
||||||
//#endif
|
/*=====================
|
||||||
// ext->tiled = copy_ext->tiled;
|
* Getter functions
|
||||||
// /*Refresh the style with new signal function*/
|
*====================*/
|
||||||
// lv_obj_refresh_style(imgbtn, LV_OBJ_PART_ALL, LV_STYLE_PROP_ALL);
|
|
||||||
// }
|
|
||||||
//
|
/**
|
||||||
// LV_LOG_INFO("image button created");
|
* Get the left image in a given state
|
||||||
//
|
* @param imgbtn pointer to an image button object
|
||||||
// return imgbtn;
|
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||||
//}
|
* @return pointer to the left image source (a C array or path to a file)
|
||||||
//
|
*/
|
||||||
///*=====================
|
const void * lv_imgbtn_get_src_left(lv_obj_t * obj, lv_imgbtn_state_t state)
|
||||||
// * Setter functions
|
{
|
||||||
// *====================*/
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
//
|
|
||||||
///**
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// * Set images for a state of the image button
|
|
||||||
// * @param imgbtn pointer to an image button object
|
return imgbtn->img_src_left[state];
|
||||||
// * @param state for which state set the new image
|
}
|
||||||
// * @param src pointer to an image source (a C array or path to a file)
|
|
||||||
// */
|
/**
|
||||||
//void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src)
|
* Get the middle image in a given state
|
||||||
//{
|
* @param imgbtn pointer to an image button object
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||||
//
|
* @return pointer to the middle image source (a C array or path to a file)
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
*/
|
||||||
//
|
const void * lv_imgbtn_get_src_middle(lv_obj_t * obj, lv_imgbtn_state_t state)
|
||||||
// ext->img_src_mid[state] = src;
|
{
|
||||||
//#if LV_IMGBTN_TILED
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
// ext->img_src_left[state] = NULL;
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// ext->img_src_right[state] = NULL;
|
|
||||||
//#endif
|
return imgbtn->img_src_mid[state];
|
||||||
// ext->tiled = 0;
|
}
|
||||||
// refr_img(imgbtn);
|
|
||||||
//}
|
/**
|
||||||
//
|
* Get the right image in a given state
|
||||||
//#if LV_IMGBTN_TILED
|
* @param imgbtn pointer to an image button object
|
||||||
///**
|
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
||||||
// * Set images for a state of the image button
|
* @return pointer to the left image source (a C array or path to a file)
|
||||||
// * @param imgbtn pointer to an image button object
|
*/
|
||||||
// * @param state for which state set the new image
|
const void * lv_imgbtn_get_src_right(lv_obj_t * obj, lv_imgbtn_state_t state)
|
||||||
// * @param src_left pointer to an image source for the left side of the button (a C array or path to
|
{
|
||||||
// * a file)
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
// * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// * array or path to a file)
|
|
||||||
// * @param src_right pointer to an image source for the right side of the button (a C array or path
|
return imgbtn->img_src_right[state];
|
||||||
// * to a file)
|
}
|
||||||
// */
|
|
||||||
//void lv_imgbtn_set_src_tiled(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const void * src_mid,
|
|
||||||
// const void * src_right)
|
/**********************
|
||||||
//{
|
* STATIC FUNCTIONS
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
**********************/
|
||||||
//
|
|
||||||
// if(lv_img_src_get_type(src_left) == LV_IMG_SRC_SYMBOL ||
|
static void lv_imgbtn_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy)
|
||||||
// lv_img_src_get_type(src_mid) == LV_IMG_SRC_SYMBOL ||
|
{
|
||||||
// lv_img_src_get_type(src_right) == LV_IMG_SRC_SYMBOL) {
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// LV_LOG_WARN("lv_imgbtn_set_src: symbols are not supported in tiled mode");
|
/*Initialize the allocated 'ext' */
|
||||||
// return;
|
lv_memset_00((void *)imgbtn->img_src_mid, sizeof(imgbtn->img_src_mid));
|
||||||
// }
|
lv_memset_00(imgbtn->img_src_left, sizeof(imgbtn->img_src_left));
|
||||||
//
|
lv_memset_00(imgbtn->img_src_right, sizeof(imgbtn->img_src_right));
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
|
||||||
//
|
imgbtn->act_cf = LV_IMG_CF_UNKNOWN;
|
||||||
// ext->img_src_left[state] = src_left;
|
}
|
||||||
// ext->img_src_mid[state] = src_mid;
|
|
||||||
// ext->img_src_right[state] = src_right;
|
|
||||||
//
|
static lv_draw_res_t lv_imgbtn_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
// ext->tiled = 1;
|
{
|
||||||
//
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// refr_img(imgbtn);
|
/*Return false if the object is not covers the mask_p area*/
|
||||||
//}
|
if(mode == LV_DRAW_MODE_COVER_CHECK) {
|
||||||
//
|
return LV_DRAW_RES_NOT_COVER;
|
||||||
//#endif
|
|
||||||
//
|
lv_draw_res_t cover = lv_obj_draw_base(&lv_imgbtn_class, obj, clip_area, mode);
|
||||||
///*=====================
|
if(cover != LV_DRAW_RES_COVER) return cover;
|
||||||
// * Getter functions
|
|
||||||
// *====================*/
|
if(imgbtn->act_cf == LV_IMG_CF_TRUE_COLOR || imgbtn->act_cf == LV_IMG_CF_RAW) {
|
||||||
//
|
cover = _lv_area_is_in(clip_area, &obj->coords, 0) ? LV_DRAW_RES_COVER : LV_DRAW_RES_NOT_COVER;
|
||||||
///**
|
} else {
|
||||||
// * Get the images in a given state
|
cover = LV_DRAW_RES_NOT_COVER;
|
||||||
// * @param imgbtn pointer to an image button object
|
}
|
||||||
// * @param state the state where to get the image (from `lv_btn_state_t`) `
|
|
||||||
// * @return pointer to an image source (a C array or path to a file)
|
return cover;
|
||||||
// */
|
}
|
||||||
//const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
|
/*Draw the object*/
|
||||||
//{
|
else if(mode == LV_DRAW_MODE_MAIN_DRAW) {
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
|
||||||
//
|
lv_obj_draw_base(&lv_imgbtn_class, obj, clip_area, mode);
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
|
||||||
//
|
/*Just draw an image*/
|
||||||
// return ext->img_src_mid[state];
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
//}
|
lv_imgbtn_state_t state = suggest_state(obj, get_state(obj));
|
||||||
//#if LV_IMGBTN_TILED
|
|
||||||
//
|
/*Simply draw the middle src if no tiled*/
|
||||||
///**
|
const void * src = imgbtn->img_src_left[state];
|
||||||
// * Get the left image in a given state
|
if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
|
||||||
// * @param imgbtn pointer to an image button object
|
LV_LOG_WARN("lv_imgbtn_draw: SYMBOLS are not supported in tiled mode")
|
||||||
// * @param state the state where to get the image (from `lv_btn_state_t`) `
|
return LV_DRAW_RES_OK;
|
||||||
// * @return pointer to the left image source (a C array or path to a file)
|
}
|
||||||
// */
|
|
||||||
//const void * lv_imgbtn_get_src_left(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
|
lv_coord_t tw = lv_obj_get_style_transform_width(obj, LV_PART_MAIN);
|
||||||
//{
|
lv_coord_t th = lv_obj_get_style_transform_height(obj, LV_PART_MAIN);
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
lv_area_t coords;
|
||||||
//
|
lv_area_copy(&coords, &obj->coords);
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
coords.x1 -= tw;
|
||||||
//
|
coords.x2 += tw;
|
||||||
// return ext->img_src_left[state];
|
coords.y1 -= th;
|
||||||
//}
|
coords.y2 += th;
|
||||||
//
|
|
||||||
///**
|
lv_draw_img_dsc_t img_dsc;
|
||||||
// * Get the middle image in a given state
|
lv_draw_img_dsc_init(&img_dsc);
|
||||||
// * @param imgbtn pointer to an image button object
|
lv_obj_init_draw_img_dsc(obj, LV_PART_MAIN, &img_dsc);
|
||||||
// * @param state the state where to get the image (from `lv_btn_state_t`) `
|
|
||||||
// * @return pointer to the middle image source (a C array or path to a file)
|
lv_img_header_t header;
|
||||||
// */
|
lv_area_t coords_part;
|
||||||
//const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
|
lv_coord_t left_w = 0;
|
||||||
//{
|
lv_coord_t right_w = 0;
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
|
||||||
//
|
if(src) {
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
lv_img_decoder_get_info(src, &header);
|
||||||
//
|
left_w = header.w;
|
||||||
// return ext->img_src_mid[state];
|
coords_part.x1 = coords.x1;
|
||||||
//}
|
coords_part.y1 = coords.y1;
|
||||||
//
|
coords_part.x2 = coords.x1 + header.w - 1;
|
||||||
///**
|
coords_part.y2 = coords.y1 + header.h - 1;
|
||||||
// * Get the right image in a given state
|
lv_draw_img(&coords_part, clip_area, src, &img_dsc);
|
||||||
// * @param imgbtn pointer to an image button object
|
}
|
||||||
// * @param state the state where to get the image (from `lv_btn_state_t`) `
|
|
||||||
// * @return pointer to the left image source (a C array or path to a file)
|
src = imgbtn->img_src_right[state];
|
||||||
// */
|
if(src) {
|
||||||
//const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
|
lv_img_decoder_get_info(src, &header);
|
||||||
//{
|
right_w = header.w;
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
coords_part.x1 = coords.x2 - header.w + 1;
|
||||||
//
|
coords_part.y1 = coords.y1;
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
coords_part.x2 = coords.x2;
|
||||||
//
|
coords_part.y2 = coords.y1 + header.h - 1;
|
||||||
// return ext->img_src_right[state];
|
lv_draw_img(&coords_part, clip_area, src, &img_dsc);
|
||||||
//}
|
}
|
||||||
//
|
|
||||||
//#endif
|
src = imgbtn->img_src_mid[state];
|
||||||
//
|
if(src) {
|
||||||
///*=====================
|
lv_area_t clip_center_area;
|
||||||
// * Other functions
|
clip_center_area.x1 = coords.x1 + left_w;
|
||||||
// *====================*/
|
clip_center_area.x2 = coords.x2 - right_w;
|
||||||
//
|
clip_center_area.y1 = coords.y1;
|
||||||
///*
|
clip_center_area.y2 = coords.y2;
|
||||||
// * New object specific "other" functions come here
|
|
||||||
// */
|
bool comm_res;
|
||||||
//
|
comm_res = _lv_area_intersect(&clip_center_area, &clip_center_area, clip_area);
|
||||||
///**********************
|
if(comm_res) {
|
||||||
// * STATIC FUNCTIONS
|
lv_coord_t i;
|
||||||
// **********************/
|
lv_img_decoder_get_info(src, &header);
|
||||||
//
|
|
||||||
///**
|
coords_part.x1 = coords.x1 + left_w;
|
||||||
// * Handle the drawing related tasks of the image buttons
|
coords_part.y1 = coords.y1;
|
||||||
// * @param imgbtn pointer to an object
|
coords_part.x2 = coords_part.x1 + header.w - 1;
|
||||||
// * @param clip_area the object will be drawn only in this area
|
coords_part.y2 = coords_part.y1 + header.h - 1;
|
||||||
// * @param mode LV_DRAW_COVER_CHK: only check if the object fully covers the 'mask_p' area
|
|
||||||
// * (return 'true' if yes)
|
for(i = 0; i < clip_center_area.x2 + header.w - 1; i += header.w) {
|
||||||
// * LV_DRAW_DRAW: draw the object (always return 'true')
|
|
||||||
// * LV_DRAW_DRAW_POST: drawing after every children are drawn
|
lv_draw_img(&coords_part, &clip_center_area, src, &img_dsc);
|
||||||
// * @param return an element of `lv_draw_res_t`
|
coords_part.x1 = coords_part.x2 + 1;
|
||||||
// */
|
coords_part.x2 += header.w;
|
||||||
//static lv_draw_res_t lv_imgbtn_draw(lv_obj_t * imgbtn, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
}
|
||||||
//{
|
}
|
||||||
// /*Return false if the object is not covers the mask_p area*/
|
}
|
||||||
// if(mode == LV_DRAW_COVER_CHK) {
|
}
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
/*Post draw when the children are drawn*/
|
||||||
// lv_draw_res_t cover = LV_DRAW_RES_NOT_COVER;
|
else if(mode == LV_DRAW_MODE_POST_DRAW) {
|
||||||
// if(ext->act_cf == LV_IMG_CF_TRUE_COLOR || ext->act_cf == LV_IMG_CF_RAW) {
|
lv_obj_draw_base(&lv_imgbtn_class, obj, clip_area, mode);
|
||||||
// cover = _lv_area_is_in(clip_area, &imgbtn->coords, 0) ? LV_DRAW_RES_COVER : LV_DRAW_RES_NOT_COVER;
|
}
|
||||||
// }
|
|
||||||
//
|
return LV_DRAW_RES_OK;
|
||||||
// return cover;
|
}
|
||||||
// }
|
|
||||||
// /*Draw the object*/
|
/**
|
||||||
// else if(mode == LV_DRAW_DRAW_MAIN) {
|
* Signal function of the image button
|
||||||
// lv_area_t img_coords;
|
* @param imgbtn pointer to a image button object
|
||||||
//
|
* @param sign a signal type from lv_signal_t enum
|
||||||
// lv_obj_get_coords(imgbtn, &img_coords);
|
* @param param pointer to a signal specific variable
|
||||||
//
|
* @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
|
||||||
// lv_draw_rect_dsc_t bg_dsc;
|
*/
|
||||||
// lv_draw_rect_dsc_init(&bg_dsc);
|
static lv_res_t lv_imgbtn_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
||||||
// lv_obj_init_draw_rect_dsc(imgbtn, LV_IMGBTN_PART_MAIN, &bg_dsc);
|
{
|
||||||
//
|
lv_res_t res = lv_obj_signal_base(&lv_imgbtn_class, obj, sign, param);
|
||||||
// /*If the border is drawn later disable loading its properties*/
|
if(res != LV_RES_OK) return res;
|
||||||
// if(lv_obj_get_style_border_post(imgbtn, LV_OBJ_PART_MAIN)) {
|
|
||||||
// bg_dsc.border_opa = LV_OPA_TRANSP;
|
if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
|
||||||
// }
|
refr_img(obj);
|
||||||
//
|
}
|
||||||
// lv_area_t bg_coords;
|
|
||||||
// lv_area_copy(&bg_coords, &img_coords);
|
return res;
|
||||||
// bg_coords.x1 -= lv_obj_get_style_pad_left(imgbtn, LV_IMGBTN_PART_MAIN);
|
}
|
||||||
// bg_coords.x2 += lv_obj_get_style_pad_right(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// bg_coords.y1 -= lv_obj_get_style_pad_top(imgbtn, LV_IMGBTN_PART_MAIN);
|
static void refr_img(lv_obj_t * obj)
|
||||||
// bg_coords.y2 += lv_obj_get_style_pad_bottom(imgbtn, LV_IMGBTN_PART_MAIN);
|
{
|
||||||
//
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
// lv_draw_rect(&bg_coords, clip_area, &bg_dsc);
|
lv_imgbtn_state_t state = suggest_state(obj, get_state(obj));
|
||||||
//
|
lv_img_header_t header;
|
||||||
// if(lv_obj_get_style_clip_corner(imgbtn, LV_OBJ_PART_MAIN)) {
|
|
||||||
// lv_draw_mask_radius_param_t * mp = lv_mem_buf_get(sizeof(lv_draw_mask_radius_param_t));
|
const void * src = imgbtn->img_src_mid[state];
|
||||||
//
|
if(src == NULL) return;
|
||||||
// lv_coord_t r = lv_obj_get_style_radius(imgbtn, LV_OBJ_PART_MAIN);
|
|
||||||
//
|
lv_res_t info_res = LV_RES_OK;
|
||||||
// lv_draw_mask_radius_init(mp, &bg_coords, r, false);
|
if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
|
||||||
// /*Add the mask and use `img+8` as custom id. Don't use `obj` directly because it might be used by the user*/
|
const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN);
|
||||||
// lv_draw_mask_add(mp, imgbtn + 8);
|
header.h = lv_font_get_line_height(font);
|
||||||
// }
|
header.w = _lv_txt_get_width(src, (uint16_t)strlen(src), font, 0, LV_TEXT_FLAG_NONE);
|
||||||
//
|
header.always_zero = 0;
|
||||||
// /*Just draw an image*/
|
header.cf = LV_IMG_CF_ALPHA_1BIT;
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
}
|
||||||
// lv_imgbtn_state_t state = suggest_state(imgbtn, get_state(imgbtn));
|
else {
|
||||||
//
|
info_res = lv_img_decoder_get_info(src, &header);
|
||||||
// /*Simply draw the middle src if no tiled*/
|
}
|
||||||
// if(!ext->tiled) {
|
|
||||||
// const void * src = ext->img_src_mid[state];
|
if(info_res == LV_RES_OK) {
|
||||||
// if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
|
imgbtn->act_cf = header.cf;
|
||||||
// lv_draw_label_dsc_t label_dsc;
|
lv_obj_set_height(obj, header.h); /*Keep the user defined width*/
|
||||||
// lv_draw_label_dsc_init(&label_dsc);
|
}
|
||||||
// lv_obj_init_draw_label_dsc(imgbtn, LV_IMGBTN_PART_MAIN, &label_dsc);
|
else {
|
||||||
// lv_draw_label(&imgbtn->coords, clip_area, &label_dsc, src, NULL);
|
imgbtn->act_cf = LV_IMG_CF_UNKNOWN;
|
||||||
// }
|
}
|
||||||
// else {
|
|
||||||
// lv_draw_img_dsc_t img_dsc;
|
lv_obj_invalidate(obj);
|
||||||
// lv_draw_img_dsc_init(&img_dsc);
|
}
|
||||||
// lv_obj_init_draw_img_dsc(imgbtn, LV_IMGBTN_PART_MAIN, &img_dsc);
|
|
||||||
// lv_draw_img(&imgbtn->coords, clip_area, src, &img_dsc);
|
/**
|
||||||
// }
|
* If `src` is not defined for the current state try to get a state which is related to the current but has `src`.
|
||||||
// }
|
* E.g. if the PRESSED src is not set but the RELEASED does, use the RELEASED.
|
||||||
// else {
|
* @param imgbtn pointer to an image button
|
||||||
//#if LV_IMGBTN_TILED
|
* @param state the state to convert
|
||||||
// const void * src = ext->img_src_left[state];
|
* @return the suggested state
|
||||||
// if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
|
*/
|
||||||
// LV_LOG_WARN("lv_imgbtn_draw: SYMBOLS are not supported in tiled mode")
|
static lv_imgbtn_state_t suggest_state(lv_obj_t * obj, lv_imgbtn_state_t state)
|
||||||
// return LV_DRAW_RES_OK;
|
{
|
||||||
// }
|
lv_imgbtn_t * imgbtn = (lv_imgbtn_t *) obj;
|
||||||
//
|
if(imgbtn->img_src_mid[state] == NULL) {
|
||||||
// lv_coord_t w = lv_obj_get_style_transform_width(imgbtn, LV_OBJ_PART_MAIN);
|
switch(state) {
|
||||||
// lv_coord_t h = lv_obj_get_style_transform_height(imgbtn, LV_OBJ_PART_MAIN);
|
case LV_IMGBTN_STATE_PRESSED:
|
||||||
// lv_area_t coords;
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
||||||
// lv_area_copy(&coords, &imgbtn->coords);
|
break;
|
||||||
// coords.x1 -= w;
|
case LV_IMGBTN_STATE_CHECKED_RELEASED:
|
||||||
// coords.x2 += w;
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
||||||
// coords.y1 -= h;
|
break;
|
||||||
// coords.y2 += h;
|
case LV_IMGBTN_STATE_CHECKED_PRESSED:
|
||||||
//
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_CHECKED_RELEASED]) return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
||||||
// lv_draw_img_dsc_t img_dsc;
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_PRESSED]) return LV_IMGBTN_STATE_PRESSED;
|
||||||
// lv_draw_img_dsc_init(&img_dsc);
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
||||||
// lv_obj_init_draw_img_dsc(imgbtn, LV_IMGBTN_PART_MAIN, &img_dsc);
|
break;
|
||||||
//
|
case LV_IMGBTN_STATE_DISABLED:
|
||||||
// lv_img_header_t header;
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
||||||
// lv_area_t coords_part;
|
break;
|
||||||
// lv_coord_t left_w = 0;
|
case LV_IMGBTN_STATE_CHECKED_DISABLED:
|
||||||
// lv_coord_t right_w = 0;
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_CHECKED_RELEASED]) return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
||||||
//
|
if(imgbtn->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
||||||
// if(src) {
|
break;
|
||||||
// lv_img_decoder_get_info(src, &header);
|
default:
|
||||||
// left_w = header.w;
|
break;
|
||||||
// coords_part.x1 = coords.x1;
|
}
|
||||||
// coords_part.y1 = coords.y1;
|
}
|
||||||
// coords_part.x2 = coords.x1 + header.w - 1;
|
|
||||||
// coords_part.y2 = coords.y1 + header.h - 1;
|
return state;
|
||||||
// lv_draw_img(&coords_part, clip_area, src, &img_dsc);
|
}
|
||||||
// }
|
|
||||||
//
|
lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn)
|
||||||
// src = ext->img_src_right[state];
|
{
|
||||||
// if(src) {
|
LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
||||||
// lv_img_decoder_get_info(src, &header);
|
|
||||||
// right_w = header.w;
|
lv_state_t obj_state = lv_obj_get_state(imgbtn);
|
||||||
// coords_part.x1 = coords.x2 - header.w + 1;
|
|
||||||
// coords_part.y1 = coords.y1;
|
if(obj_state & LV_STATE_DISABLED) {
|
||||||
// coords_part.x2 = coords.x2;
|
if(obj_state & LV_STATE_CHECKED) return LV_IMGBTN_STATE_CHECKED_DISABLED;
|
||||||
// coords_part.y2 = coords.y1 + header.h - 1;
|
else return LV_IMGBTN_STATE_DISABLED;
|
||||||
// lv_draw_img(&coords_part, clip_area, src, &img_dsc);
|
}
|
||||||
// }
|
|
||||||
//
|
if(obj_state & LV_STATE_CHECKED) {
|
||||||
// src = ext->img_src_mid[state];
|
if(obj_state & LV_STATE_PRESSED) return LV_IMGBTN_STATE_CHECKED_PRESSED;
|
||||||
// if(src) {
|
else return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
||||||
// lv_area_t clip_center_area;
|
}
|
||||||
// clip_center_area.x1 = coords.x1 + left_w;
|
else {
|
||||||
// clip_center_area.x2 = coords.x2 - right_w;
|
if(obj_state & LV_STATE_PRESSED) return LV_IMGBTN_STATE_PRESSED;
|
||||||
// clip_center_area.y1 = coords.y1;
|
else return LV_IMGBTN_STATE_RELEASED;
|
||||||
// clip_center_area.y2 = coords.y2;
|
}
|
||||||
//
|
}
|
||||||
// bool comm_res;
|
|
||||||
// comm_res = _lv_area_intersect(&clip_center_area, &clip_center_area, clip_area);
|
#endif
|
||||||
// if(comm_res) {
|
|
||||||
// lv_coord_t obj_w = lv_obj_get_width(imgbtn);
|
|
||||||
// lv_coord_t i;
|
|
||||||
// lv_img_decoder_get_info(src, &header);
|
|
||||||
//
|
|
||||||
// coords_part.x1 = coords.x1 + left_w;
|
|
||||||
// coords_part.y1 = coords.y1;
|
|
||||||
// coords_part.x2 = coords_part.x1 + header.w - 1;
|
|
||||||
// coords_part.y2 = coords_part.y1 + header.h - 1;
|
|
||||||
//
|
|
||||||
// for(i = 0; i < obj_w - right_w - left_w; i += header.w) {
|
|
||||||
//
|
|
||||||
// lv_draw_img(&coords_part, &clip_center_area, src, &img_dsc);
|
|
||||||
// coords_part.x1 = coords_part.x2 + 1;
|
|
||||||
// coords_part.x2 += header.w;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//#endif
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// /*Post draw when the children are drawn*/
|
|
||||||
// else if(mode == LV_DRAW_DRAW_POST) {
|
|
||||||
// if(lv_obj_get_style_clip_corner(imgbtn, LV_OBJ_PART_MAIN)) {
|
|
||||||
// lv_draw_mask_radius_param_t * param = lv_draw_mask_remove_custom(imgbtn + 8);
|
|
||||||
// lv_mem_buf_release(param);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// lv_draw_rect_dsc_t draw_dsc;
|
|
||||||
// lv_draw_rect_dsc_init(&draw_dsc);
|
|
||||||
//
|
|
||||||
// /*If the border is drawn later disable loading other properties*/
|
|
||||||
// if(lv_obj_get_style_border_post(imgbtn, LV_OBJ_PART_MAIN)) {
|
|
||||||
// draw_dsc.bg_opa = LV_OPA_TRANSP;
|
|
||||||
// draw_dsc.pattern_opa = LV_OPA_TRANSP;
|
|
||||||
// draw_dsc.shadow_opa = LV_OPA_TRANSP;
|
|
||||||
// lv_obj_init_draw_rect_dsc(imgbtn, LV_OBJ_PART_MAIN, &draw_dsc);
|
|
||||||
//
|
|
||||||
// lv_area_t bg_coords;
|
|
||||||
// lv_area_copy(&bg_coords, &imgbtn->coords);
|
|
||||||
// bg_coords.x1 -= lv_obj_get_style_pad_left(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// bg_coords.x2 += lv_obj_get_style_pad_right(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// bg_coords.y1 -= lv_obj_get_style_pad_top(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// bg_coords.y2 += lv_obj_get_style_pad_bottom(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
//
|
|
||||||
// lv_draw_rect(&bg_coords, clip_area, &draw_dsc);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return LV_DRAW_RES_OK;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * Signal function of the image button
|
|
||||||
// * @param imgbtn pointer to a image button object
|
|
||||||
// * @param sign a signal type from lv_signal_t enum
|
|
||||||
// * @param param pointer to a signal specific variable
|
|
||||||
// * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
|
|
||||||
// */
|
|
||||||
//static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * param)
|
|
||||||
//{
|
|
||||||
// lv_res_t res;
|
|
||||||
//
|
|
||||||
// /* Include the ancient signal function */
|
|
||||||
// res = ancestor_signal(imgbtn, sign, param);
|
|
||||||
// if(res != LV_RES_OK) return res;
|
|
||||||
// if(sign == LV_SIGNAL_GET_TYPE) {
|
|
||||||
// return _lv_obj_handle_get_type_signal(param, MY_CLASS);
|
|
||||||
// }
|
|
||||||
// else if(sign == LV_SIGNAL_STYLE_CHG) {
|
|
||||||
// /* If the style changed then the button was clicked, released etc. so probably the state was
|
|
||||||
// * changed as well Set the new image for the new state.*/
|
|
||||||
// refr_img(imgbtn);
|
|
||||||
// }
|
|
||||||
// else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
|
|
||||||
// /*Handle the padding of the background*/
|
|
||||||
// lv_coord_t left = lv_obj_get_style_pad_left(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// lv_coord_t right = lv_obj_get_style_pad_right(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// lv_coord_t top = lv_obj_get_style_pad_top(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// lv_coord_t bottom = lv_obj_get_style_pad_bottom(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
//
|
|
||||||
// lv_coord_t * s = param;
|
|
||||||
// *s = LV_MAX(*s, left);
|
|
||||||
// *s = LV_MAX(*s, right);
|
|
||||||
// *s = LV_MAX(*s, top);
|
|
||||||
// *s = LV_MAX(*s, bottom);
|
|
||||||
// }
|
|
||||||
// else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) {
|
|
||||||
// refr_img(imgbtn);
|
|
||||||
// }
|
|
||||||
// else if(sign == LV_SIGNAL_CLEANUP) {
|
|
||||||
// /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return res;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//static void refr_img(lv_obj_t * imgbtn)
|
|
||||||
//{
|
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
|
||||||
// lv_imgbtn_state_t state = suggest_state(imgbtn, get_state(imgbtn));
|
|
||||||
// lv_img_header_t header;
|
|
||||||
//
|
|
||||||
// const void * src = ext->img_src_mid[state];
|
|
||||||
// if(src == NULL) return;
|
|
||||||
//
|
|
||||||
// lv_res_t info_res = LV_RES_OK;
|
|
||||||
// if(lv_img_src_get_type(src) == LV_IMG_SRC_SYMBOL) {
|
|
||||||
// const lv_font_t * font = lv_obj_get_style_text_font(imgbtn, LV_IMGBTN_PART_MAIN);
|
|
||||||
// header.h = lv_font_get_line_height(font);
|
|
||||||
// header.w = _lv_txt_get_width(src, (uint16_t)strlen(src), font, 0, LV_TEXT_FLAG_NONE);
|
|
||||||
// header.always_zero = 0;
|
|
||||||
// header.cf = LV_IMG_CF_ALPHA_1BIT;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// info_res = lv_img_decoder_get_info(src, &header);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(info_res == LV_RES_OK) {
|
|
||||||
// ext->act_cf = header.cf;
|
|
||||||
// if(ext->tiled) lv_obj_set_height(imgbtn, header.h); /*Keep the sure defined width*/
|
|
||||||
// else lv_obj_set_size(imgbtn, header.w, header.h);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// ext->act_cf = LV_IMG_CF_UNKNOWN;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// lv_obj_invalidate(imgbtn);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
///**
|
|
||||||
// * If `src` is not defined for the current state try to get a state which is related to the current but has `src`.
|
|
||||||
// * E.g. if the PRESSED src is not set but the RELEASED does, use the RELEASED.
|
|
||||||
// * @param imgbtn pointer to an image button
|
|
||||||
// * @param state the state to convert
|
|
||||||
// * @return the suggested state
|
|
||||||
// */
|
|
||||||
//static lv_imgbtn_state_t suggest_state(lv_obj_t * imgbtn, lv_imgbtn_state_t state)
|
|
||||||
//{
|
|
||||||
// lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn);
|
|
||||||
// if(ext->img_src_mid[state] == NULL) {
|
|
||||||
// switch(state) {
|
|
||||||
// case LV_IMGBTN_STATE_PRESSED:
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// break;
|
|
||||||
// case LV_IMGBTN_STATE_CHECKED_RELEASED:
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// break;
|
|
||||||
// case LV_IMGBTN_STATE_CHECKED_PRESSED:
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_CHECKED_RELEASED]) return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_PRESSED]) return LV_IMGBTN_STATE_PRESSED;
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// break;
|
|
||||||
// case LV_IMGBTN_STATE_DISABLED:
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// break;
|
|
||||||
// case LV_IMGBTN_STATE_CHECKED_DISABLED:
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_CHECKED_RELEASED]) return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
|
||||||
// if(ext->img_src_mid[LV_IMGBTN_STATE_RELEASED]) return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return state;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//lv_imgbtn_state_t get_state(const lv_obj_t * imgbtn)
|
|
||||||
//{
|
|
||||||
// LV_ASSERT_OBJ(imgbtn, MY_CLASS);
|
|
||||||
//
|
|
||||||
// lv_state_t obj_state = lv_obj_get_state(imgbtn);
|
|
||||||
//
|
|
||||||
// if(obj_state & LV_STATE_DISABLED) {
|
|
||||||
// if(obj_state & LV_STATE_CHECKED) return LV_IMGBTN_STATE_CHECKED_DISABLED;
|
|
||||||
// else return LV_IMGBTN_STATE_DISABLED;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(obj_state & LV_STATE_CHECKED) {
|
|
||||||
// if(obj_state & LV_STATE_PRESSED) return LV_IMGBTN_STATE_CHECKED_PRESSED;
|
|
||||||
// else return LV_IMGBTN_STATE_CHECKED_RELEASED;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// if(obj_state & LV_STATE_PRESSED) return LV_IMGBTN_STATE_PRESSED;
|
|
||||||
// else return LV_IMGBTN_STATE_RELEASED;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//#endif
|
|
||||||
|
|||||||
@@ -13,14 +13,10 @@ extern "C" {
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include "../lv_conf_internal.h"
|
#include "../../../lvgl.h"
|
||||||
|
|
||||||
#if LV_USE_IMGBTN != 0
|
#if LV_USE_IMGBTN != 0
|
||||||
|
|
||||||
#include "../lv_core/lv_obj.h"
|
|
||||||
#include "lv_btn.h"
|
|
||||||
#include "../lv_draw/lv_draw_img.h"
|
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
@@ -39,21 +35,14 @@ typedef enum {
|
|||||||
**********************/
|
**********************/
|
||||||
/*Data of image button*/
|
/*Data of image button*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/*New data for this type */
|
lv_obj_t obj;
|
||||||
const void * img_src_mid[_LV_IMGBTN_STATE_NUM]; /*Store center images to each state*/
|
const void * img_src_mid[_LV_IMGBTN_STATE_NUM]; /*Store center images to each state*/
|
||||||
#if LV_IMGBTN_TILED
|
|
||||||
const void * img_src_left[_LV_IMGBTN_STATE_NUM]; /*Store left side images to each state*/
|
const void * img_src_left[_LV_IMGBTN_STATE_NUM]; /*Store left side images to each state*/
|
||||||
const void * img_src_right[_LV_IMGBTN_STATE_NUM]; /*Store right side images to each state*/
|
const void * img_src_right[_LV_IMGBTN_STATE_NUM]; /*Store right side images to each state*/
|
||||||
#endif
|
|
||||||
lv_img_cf_t act_cf; /*Color format of the currently active image*/
|
lv_img_cf_t act_cf; /*Color format of the currently active image*/
|
||||||
uint8_t tiled : 1; /*1: the middle src will be repeated to fill the user defined width*/
|
} lv_imgbtn_t;
|
||||||
} lv_imgbtn_ext_t;
|
|
||||||
|
|
||||||
/*Parts of the image button*/
|
extern const lv_obj_class_t lv_imgbtn_class;
|
||||||
enum {
|
|
||||||
LV_IMGBTN_PART_MAIN = LV_BTN_PART_MAIN,
|
|
||||||
};
|
|
||||||
typedef uint8_t lv_imgbtn_part_t;
|
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
@@ -66,7 +55,7 @@ typedef uint8_t lv_imgbtn_part_t;
|
|||||||
* it
|
* it
|
||||||
* @return pointer to the created image button
|
* @return pointer to the created image button
|
||||||
*/
|
*/
|
||||||
lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy);
|
lv_obj_t * lv_imgbtn_create(lv_obj_t * parent);
|
||||||
|
|
||||||
/*======================
|
/*======================
|
||||||
* Add/remove functions
|
* Add/remove functions
|
||||||
@@ -76,15 +65,6 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy);
|
|||||||
* Setter functions
|
* Setter functions
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Set images for a state of the image button
|
|
||||||
* @param imgbtn pointer to an image button object
|
|
||||||
* @param state for which state set the new image
|
|
||||||
* @param src pointer to an image source (a C array or path to a file)
|
|
||||||
*/
|
|
||||||
void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src);
|
|
||||||
|
|
||||||
#if LV_IMGBTN_TILED
|
|
||||||
/**
|
/**
|
||||||
* Set images for a state of the image button
|
* Set images for a state of the image button
|
||||||
* @param imgbtn pointer to an image button object
|
* @param imgbtn pointer to an image button object
|
||||||
@@ -96,26 +76,14 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void *
|
|||||||
* @param src_right pointer to an image source for the right side of the button (a C array or path
|
* @param src_right pointer to an image source for the right side of the button (a C array or path
|
||||||
* to a file)
|
* to a file)
|
||||||
*/
|
*/
|
||||||
void lv_imgbtn_set_src_tiled(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const void * src_mid,
|
void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state, const void * src_left, const void * src_mid,
|
||||||
const void * src_right);
|
const void * src_right);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Getter functions
|
* Getter functions
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|
||||||
#if LV_IMGBTN_TILED == 0
|
|
||||||
/**
|
|
||||||
* Get the images in a given state
|
|
||||||
* @param imgbtn pointer to an image button object
|
|
||||||
* @param state the state where to get the image (from `lv_btn_state_t`) `
|
|
||||||
* @return pointer to an image source (a C array or path to a file)
|
|
||||||
*/
|
|
||||||
const void * lv_imgbtn_get_src(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the left image in a given state
|
* Get the left image in a given state
|
||||||
* @param imgbtn pointer to an image button object
|
* @param imgbtn pointer to an image button object
|
||||||
@@ -140,8 +108,6 @@ const void * lv_imgbtn_get_src_middle(lv_obj_t * imgbtn, lv_imgbtn_state_t state
|
|||||||
*/
|
*/
|
||||||
const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
|
const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_imgbtn_state_t state);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Other functions
|
* Other functions
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ lv_obj_t * lv_keyboard_create(lv_obj_t * parent)
|
|||||||
void lv_keyboard_set_textarea(lv_obj_t * obj, lv_obj_t * ta)
|
void lv_keyboard_set_textarea(lv_obj_t * obj, lv_obj_t * ta)
|
||||||
{
|
{
|
||||||
if(ta) {
|
if(ta) {
|
||||||
LV_ASSERT_OBJ(ta, "lv_textarea");
|
LV_ASSERT_OBJ(ta, &lv_textarea_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_keyboard_t * keyboard = (lv_keyboard_t *) obj;
|
lv_keyboard_t * keyboard = (lv_keyboard_t *) obj;
|
||||||
@@ -259,7 +259,6 @@ void lv_keyboard_def_event_cb(lv_obj_t * obj, lv_event_t event)
|
|||||||
if(res != LV_RES_OK) return;
|
if(res != LV_RES_OK) return;
|
||||||
}
|
}
|
||||||
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
||||||
lv_obj_del(obj);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(strcmp(txt, LV_SYMBOL_OK) == 0) {
|
else if(strcmp(txt, LV_SYMBOL_OK) == 0) {
|
||||||
@@ -272,7 +271,6 @@ void lv_keyboard_def_event_cb(lv_obj_t * obj, lv_event_t event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
lv_keyboard_set_textarea(obj, NULL); /*De-assign the text area to hide it cursor if needed*/
|
||||||
lv_obj_del(obj);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
* DEFINES
|
* DEFINES
|
||||||
*********************/
|
*********************/
|
||||||
|
|
||||||
#define LV_LED_WIDTH_DEF (LV_DPI / 3)
|
#define LV_LED_WIDTH_DEF (LV_DPI_DEF / 5)
|
||||||
#define LV_LED_HEIGHT_DEF (LV_DPI / 3)
|
#define LV_LED_HEIGHT_DEF (LV_DPI_DEF / 5)
|
||||||
|
|
||||||
#ifndef LV_LED_BRIGHT_MIN
|
#ifndef LV_LED_BRIGHT_MIN
|
||||||
# define LV_LED_BRIGHT_MIN 80
|
# define LV_LED_BRIGHT_MIN 80
|
||||||
@@ -31,13 +31,18 @@
|
|||||||
/**********************
|
/**********************
|
||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
static void lv_led_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
static lv_draw_res_t lv_led_draw(lv_obj_t * led, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
static lv_draw_res_t lv_led_draw(lv_obj_t * led, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC VARIABLES
|
* STATIC VARIABLES
|
||||||
**********************/
|
**********************/
|
||||||
static bool inited;
|
const lv_obj_class_t lv_led_class = {
|
||||||
static lv_draw_cb_t ancestor_draw;
|
.base_class = &lv_obj_class,
|
||||||
|
.constructor_cb = lv_led_constructor,
|
||||||
|
.draw_cb = lv_led_draw,
|
||||||
|
.instance_size = sizeof(lv_led_t),
|
||||||
|
};
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
@@ -55,67 +60,40 @@ static lv_draw_cb_t ancestor_draw;
|
|||||||
*/
|
*/
|
||||||
lv_obj_t * lv_led_create(lv_obj_t * parent)
|
lv_obj_t * lv_led_create(lv_obj_t * parent)
|
||||||
{
|
{
|
||||||
static lv_style_t style_main;
|
return lv_obj_create_from_class(&lv_led_class, parent, NULL);
|
||||||
if(!inited) {
|
|
||||||
lv_style_init(&style_main);
|
|
||||||
lv_style_set_bg_opa(&style_main, LV_STATE_DEFAULT, LV_OPA_COVER);
|
|
||||||
lv_style_set_bg_color(&style_main, LV_STATE_DEFAULT, lv_theme_get_color_primary());
|
|
||||||
lv_style_set_border_width(&style_main, LV_STATE_DEFAULT, 0);
|
|
||||||
lv_style_set_radius(&style_main, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
|
|
||||||
#if LV_USE_SHADOW
|
|
||||||
lv_style_set_shadow_width(&style_main, LV_STATE_DEFAULT, LV_DPX(15));
|
|
||||||
lv_style_set_shadow_color(&style_main, LV_STATE_DEFAULT, lv_theme_get_color_primary());
|
|
||||||
lv_style_set_shadow_spread(&style_main, LV_STATE_DEFAULT, LV_DPX(5));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Create the ancestor basic object*/
|
|
||||||
lv_obj_t * led = lv_obj_create(parent, NULL);
|
|
||||||
LV_ASSERT_MALLOC(led);
|
|
||||||
if(led == NULL) return NULL;
|
|
||||||
|
|
||||||
if(ancestor_draw == NULL) ancestor_draw = lv_obj_get_draw_cb(led);
|
|
||||||
|
|
||||||
/*Allocate the object type specific extended data*/
|
|
||||||
lv_led_ext_t * ext = lv_obj_allocate_ext_attr(led, sizeof(lv_led_ext_t));
|
|
||||||
LV_ASSERT_MALLOC(ext);
|
|
||||||
if(ext == NULL) {
|
|
||||||
lv_obj_del(led);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ext->bright = LV_LED_BRIGHT_MAX;
|
|
||||||
|
|
||||||
lv_obj_set_draw_cb(led, lv_led_draw);
|
|
||||||
lv_obj_set_size(led, LV_LED_WIDTH_DEF, LV_LED_HEIGHT_DEF);
|
|
||||||
lv_obj_add_style(led, LV_OBJ_PART_MAIN, &style_main);
|
|
||||||
LV_LOG_INFO("led created");
|
|
||||||
|
|
||||||
return led;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
* Setter functions
|
* Setter functions
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the color of the LED
|
||||||
|
* @param led pointer to a LED object
|
||||||
|
* @param color the color of the the LED
|
||||||
|
*/
|
||||||
|
void lv_led_set_color(lv_obj_t * led, lv_color_t color)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Set the brightness of a LED object
|
* Set the brightness of a LED object
|
||||||
* @param led pointer to a LED object
|
* @param led pointer to a LED object
|
||||||
* @param bright LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light)
|
* @param bright LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light)
|
||||||
*/
|
*/
|
||||||
void lv_led_set_bright(lv_obj_t * led, uint8_t bright)
|
void lv_led_set_bright(lv_obj_t * obj, uint8_t bright)
|
||||||
{
|
{
|
||||||
/*Set the brightness*/
|
/*Set the brightness*/
|
||||||
lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
|
lv_led_t * led = (lv_led_t *) obj;
|
||||||
if(ext->bright == bright) return;
|
if(led->bright == bright) return;
|
||||||
|
|
||||||
if(bright <= LV_LED_BRIGHT_MIN) bright = LV_LED_BRIGHT_MIN;
|
if(bright <= LV_LED_BRIGHT_MIN) bright = LV_LED_BRIGHT_MIN;
|
||||||
if(bright >= LV_LED_BRIGHT_MAX) bright = LV_LED_BRIGHT_MAX;
|
if(bright >= LV_LED_BRIGHT_MAX) bright = LV_LED_BRIGHT_MAX;
|
||||||
|
|
||||||
ext->bright = bright;
|
led->bright = bright;
|
||||||
|
|
||||||
/*Invalidate the object there fore it will be redrawn*/
|
/*Invalidate the object there fore it will be redrawn*/
|
||||||
lv_obj_invalidate(led);
|
lv_obj_invalidate(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,13 +118,13 @@ void lv_led_off(lv_obj_t * led)
|
|||||||
* Toggle the state of a LED
|
* Toggle the state of a LED
|
||||||
* @param led pointer to a LED object
|
* @param led pointer to a LED object
|
||||||
*/
|
*/
|
||||||
void lv_led_toggle(lv_obj_t * led)
|
void lv_led_toggle(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
uint8_t bright = lv_led_get_bright(led);
|
uint8_t bright = lv_led_get_brightness(obj);
|
||||||
if(bright > (LV_LED_BRIGHT_MIN + LV_LED_BRIGHT_MAX) >> 1)
|
if(bright > (LV_LED_BRIGHT_MIN + LV_LED_BRIGHT_MAX) >> 1)
|
||||||
lv_led_off(led);
|
lv_led_off(obj);
|
||||||
else
|
else
|
||||||
lv_led_on(led);
|
lv_led_on(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
@@ -158,54 +136,64 @@ void lv_led_toggle(lv_obj_t * led)
|
|||||||
* @param led pointer to LED object
|
* @param led pointer to LED object
|
||||||
* @return bright 0 (max. dark) ... 255 (max. light)
|
* @return bright 0 (max. dark) ... 255 (max. light)
|
||||||
*/
|
*/
|
||||||
uint8_t lv_led_get_bright(const lv_obj_t * led)
|
uint8_t lv_led_get_brightness(const lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
|
lv_led_t * led = (lv_led_t *) obj;
|
||||||
return ext->bright;
|
return led->bright;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
/**
|
static void lv_led_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy)
|
||||||
* Handle the drawing related tasks of the leds
|
|
||||||
* @param led pointer to an object
|
|
||||||
* @param clip_area the object will be drawn only in this area
|
|
||||||
* @param mode LV_DRAW_COVER_CHK: only check if the object fully covers the 'mask_p' area
|
|
||||||
* (return 'true' if yes)
|
|
||||||
* LV_DRAW_DRAW: draw the object (always return 'true')
|
|
||||||
* LV_DRAW_DRAW_POST: drawing after every children are drawn
|
|
||||||
* @param return an element of `lv_draw_res_t`
|
|
||||||
*/
|
|
||||||
static lv_draw_res_t lv_led_draw(lv_obj_t * led, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
|
||||||
{
|
{
|
||||||
if(mode == LV_DRAW_COVER_CHK) {
|
|
||||||
/*Return false if the object is not covers the clip_area area*/
|
lv_led_t * led = (lv_led_t *) obj;
|
||||||
return ancestor_draw(led, clip_area, mode);
|
led->color = lv_theme_get_color_primary();
|
||||||
|
led->bright = LV_LED_BRIGHT_MAX;
|
||||||
|
led->bright = LV_LED_BRIGHT_MAX;
|
||||||
|
|
||||||
|
lv_obj_set_size(obj, LV_LED_WIDTH_DEF, LV_LED_HEIGHT_DEF);
|
||||||
}
|
}
|
||||||
else if(mode == LV_DRAW_DRAW_MAIN) {
|
|
||||||
|
|
||||||
|
static lv_draw_res_t lv_led_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
{
|
||||||
|
if(mode == LV_DRAW_MODE_COVER_CHECK) {
|
||||||
|
/*Return false if the object is not covers the clip_area area*/
|
||||||
|
return lv_obj_draw_base(&lv_led_class, obj, clip_area, mode);
|
||||||
|
}
|
||||||
|
else if(mode == LV_DRAW_MODE_MAIN_DRAW) {
|
||||||
/*Make darker colors in a temporary style according to the brightness*/
|
/*Make darker colors in a temporary style according to the brightness*/
|
||||||
lv_led_ext_t * ext = lv_obj_get_ext_attr(led);
|
lv_led_t * led = (lv_led_t *) obj;
|
||||||
|
|
||||||
lv_draw_rect_dsc_t rect_dsc;
|
lv_draw_rect_dsc_t rect_dsc;
|
||||||
lv_draw_rect_dsc_init(&rect_dsc);
|
lv_draw_rect_dsc_init(&rect_dsc);
|
||||||
lv_obj_init_draw_rect_dsc(led, LV_OBJ_PART_MAIN, &rect_dsc);
|
lv_obj_init_draw_rect_dsc(obj, LV_PART_MAIN, &rect_dsc);
|
||||||
|
|
||||||
|
/*Use the original colors brightness to modify color->led*/
|
||||||
|
rect_dsc.bg_color = lv_color_mix(led->color, LV_COLOR_BLACK, lv_color_brightness(rect_dsc.bg_color));
|
||||||
|
rect_dsc.bg_grad_color = lv_color_mix(led->color, LV_COLOR_BLACK, lv_color_brightness(rect_dsc.bg_grad_color));
|
||||||
|
rect_dsc.shadow_color = lv_color_mix(led->color, LV_COLOR_BLACK, lv_color_brightness(rect_dsc.shadow_color));
|
||||||
|
rect_dsc.border_color = lv_color_mix(led->color, LV_COLOR_BLACK, lv_color_brightness(rect_dsc.border_color));
|
||||||
|
rect_dsc.outline_color = lv_color_mix(led->color, LV_COLOR_BLACK, lv_color_brightness(rect_dsc.outline_color));
|
||||||
|
|
||||||
/*Mix. the color with black proportionally with brightness*/
|
/*Mix. the color with black proportionally with brightness*/
|
||||||
rect_dsc.bg_color = lv_color_mix(rect_dsc.bg_color, LV_COLOR_BLACK, ext->bright);
|
rect_dsc.bg_color = lv_color_mix(rect_dsc.bg_color, LV_COLOR_BLACK, led->bright);
|
||||||
rect_dsc.bg_grad_color = lv_color_mix(rect_dsc.bg_grad_color, LV_COLOR_BLACK, ext->bright);
|
rect_dsc.bg_grad_color = lv_color_mix(rect_dsc.bg_grad_color, LV_COLOR_BLACK, led->bright);
|
||||||
rect_dsc.border_color = lv_color_mix(rect_dsc.border_color, LV_COLOR_BLACK, ext->bright);
|
rect_dsc.border_color = lv_color_mix(rect_dsc.border_color, LV_COLOR_BLACK, led->bright);
|
||||||
rect_dsc.shadow_color = lv_color_mix(rect_dsc.shadow_color, LV_COLOR_BLACK, ext->bright);
|
rect_dsc.shadow_color = lv_color_mix(rect_dsc.shadow_color, LV_COLOR_BLACK, led->bright);
|
||||||
|
rect_dsc.outline_color = lv_color_mix(rect_dsc.outline_color, LV_COLOR_BLACK, led->bright);
|
||||||
|
|
||||||
/*Set the current shadow width according to brightness proportionally between LV_LED_BRIGHT_OFF
|
/*Set the current shadow width according to brightness proportionally between LV_LED_BRIGHT_OFF
|
||||||
* and LV_LED_BRIGHT_ON*/
|
* and LV_LED_BRIGHT_ON*/
|
||||||
rect_dsc.shadow_width = ((ext->bright - LV_LED_BRIGHT_MIN) * rect_dsc.shadow_width) /
|
rect_dsc.shadow_width = ((led->bright - LV_LED_BRIGHT_MIN) * rect_dsc.shadow_width) /
|
||||||
(LV_LED_BRIGHT_MAX - LV_LED_BRIGHT_MIN);
|
(LV_LED_BRIGHT_MAX - LV_LED_BRIGHT_MIN);
|
||||||
rect_dsc.shadow_spread = ((ext->bright - LV_LED_BRIGHT_MIN) * rect_dsc.shadow_spread) /
|
rect_dsc.shadow_spread = ((led->bright - LV_LED_BRIGHT_MIN) * rect_dsc.shadow_spread) /
|
||||||
(LV_LED_BRIGHT_MAX - LV_LED_BRIGHT_MIN);
|
(LV_LED_BRIGHT_MAX - LV_LED_BRIGHT_MIN);
|
||||||
|
|
||||||
lv_draw_rect(&led->coords, clip_area, &rect_dsc);
|
lv_draw_rect(&obj->coords, clip_area, &rect_dsc);
|
||||||
}
|
}
|
||||||
return LV_DRAW_RES_OK;
|
return LV_DRAW_RES_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ extern "C" {
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
#include "../../../lv_core/lv_obj.h"
|
#include "../../../lvgl.h"
|
||||||
|
|
||||||
#if LV_USE_LED
|
#if LV_USE_LED
|
||||||
|
|
||||||
@@ -28,10 +28,12 @@ extern "C" {
|
|||||||
|
|
||||||
/*Data of led*/
|
/*Data of led*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/*No inherited ext.*/
|
lv_obj_t obj;
|
||||||
/*New data for this type */
|
lv_color_t color;
|
||||||
uint8_t bright; /*Current brightness of the LED (0..255)*/
|
uint8_t bright; /**< Current brightness of the LED (0..255)*/
|
||||||
} lv_led_ext_t;
|
} lv_led_t;
|
||||||
|
|
||||||
|
extern const lv_obj_class_t lv_led_class;
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL PROTOTYPES
|
* GLOBAL PROTOTYPES
|
||||||
@@ -45,12 +47,19 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
lv_obj_t * lv_led_create(lv_obj_t * parent);
|
lv_obj_t * lv_led_create(lv_obj_t * parent);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the color of the LED
|
||||||
|
* @param led pointer to a LED object
|
||||||
|
* @param color the color of the the LED
|
||||||
|
*/
|
||||||
|
void lv_led_set_color(lv_obj_t * led, lv_color_t color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the brightness of a LED object
|
* Set the brightness of a LED object
|
||||||
* @param led pointer to a LED object
|
* @param led pointer to a LED object
|
||||||
* @param bright LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light)
|
* @param bright LV_LED_BRIGHT_MIN (max. dark) ... LV_LED_BRIGHT_MAX (max. light)
|
||||||
*/
|
*/
|
||||||
void lv_led_set_bright(lv_obj_t * led, uint8_t bright);
|
void lv_led_set_brightness(lv_obj_t * led, uint8_t bright);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Light on a LED
|
* Light on a LED
|
||||||
@@ -75,7 +84,7 @@ void lv_led_toggle(lv_obj_t * led);
|
|||||||
* @param led pointer to LED object
|
* @param led pointer to LED object
|
||||||
* @return bright 0 (max. dark) ... 255 (max. light)
|
* @return bright 0 (max. dark) ... 255 (max. light)
|
||||||
*/
|
*/
|
||||||
uint8_t lv_led_get_bright(const lv_obj_t * led);
|
uint8_t lv_led_get_brightness(const lv_obj_t * obj);
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ extern "C" {
|
|||||||
#include "tileview/lv_tileview.h"
|
#include "tileview/lv_tileview.h"
|
||||||
#include "win/lv_win.h"
|
#include "win/lv_win.h"
|
||||||
#include "colorwheel/lv_colorwheel.h"
|
#include "colorwheel/lv_colorwheel.h"
|
||||||
|
#include "led/lv_led.h"
|
||||||
|
#include "imgbtn/lv_imgbtn.h"
|
||||||
|
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ lv_obj_t * lv_msgbox_create(const char * title, const char * txt, const char * b
|
|||||||
{
|
{
|
||||||
lv_obj_t * parent = lv_obj_create(lv_layer_top(), NULL);
|
lv_obj_t * parent = lv_obj_create(lv_layer_top(), NULL);
|
||||||
lv_obj_set_size(parent, LV_COORD_PCT(100), LV_COORD_PCT(100));
|
lv_obj_set_size(parent, LV_COORD_PCT(100), LV_COORD_PCT(100));
|
||||||
|
|
||||||
lv_obj_remove_style(parent, LV_PART_ANY, LV_STATE_ANY, NULL);
|
lv_obj_remove_style(parent, LV_PART_ANY, LV_STATE_ANY, NULL);
|
||||||
|
lv_obj_set_style_bg_color(parent, LV_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_GRAY);
|
||||||
|
lv_obj_set_style_bg_opa(parent, LV_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_50);
|
||||||
|
|
||||||
lv_obj_t * mbox = lv_obj_create_from_class(&lv_msgbox_class, parent, NULL);
|
lv_obj_t * mbox = lv_obj_create_from_class(&lv_msgbox_class, parent, NULL);
|
||||||
LV_ASSERT_MALLOC(mbox);
|
LV_ASSERT_MALLOC(mbox);
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const lv_obj_class_t lv_spinbox_class = {
|
|||||||
.destructor_cb = lv_spinbox_destructor,
|
.destructor_cb = lv_spinbox_destructor,
|
||||||
.signal_cb = lv_spinbox_signal,
|
.signal_cb = lv_spinbox_signal,
|
||||||
.instance_size = sizeof(lv_spinbox_t),
|
.instance_size = sizeof(lv_spinbox_t),
|
||||||
|
.editable = LV_OBJ_CLASS_EDITABLE_TRUE,
|
||||||
.base_class = &lv_textarea_class
|
.base_class = &lv_textarea_class
|
||||||
};
|
};
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
static void lv_tabview_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
static void lv_tabview_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
|
static void lv_tabview_destructor(lv_obj_t * obj);
|
||||||
static void btns_event_cb(lv_obj_t * btns, lv_event_t e);
|
static void btns_event_cb(lv_obj_t * btns, lv_event_t e);
|
||||||
static void cont_event_cb(lv_obj_t * cont, lv_event_t e);
|
static void cont_event_cb(lv_obj_t * cont, lv_event_t e);
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ static void cont_event_cb(lv_obj_t * cont, lv_event_t e);
|
|||||||
**********************/
|
**********************/
|
||||||
const lv_obj_class_t lv_tabview_class = {
|
const lv_obj_class_t lv_tabview_class = {
|
||||||
.constructor_cb = lv_tabview_constructor,
|
.constructor_cb = lv_tabview_constructor,
|
||||||
|
.destructor_cb = lv_tabview_destructor,
|
||||||
.base_class = &lv_obj_class,
|
.base_class = &lv_obj_class,
|
||||||
.instance_size = sizeof(lv_tabview_t)};
|
.instance_size = sizeof(lv_tabview_t)};
|
||||||
|
|
||||||
@@ -63,8 +65,8 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
|
|||||||
|
|
||||||
lv_obj_t * btns = lv_tabview_get_tab_btns(obj);
|
lv_obj_t * btns = lv_tabview_get_tab_btns(obj);
|
||||||
|
|
||||||
const char ** old_map = lv_btnmatrix_get_map(btns);
|
char ** old_map = tabview->map;
|
||||||
const char ** new_map;
|
char ** new_map;
|
||||||
|
|
||||||
/*top or bottom dir*/
|
/*top or bottom dir*/
|
||||||
if(tabview->tab_pos & LV_DIR_VER) {
|
if(tabview->tab_pos & LV_DIR_VER) {
|
||||||
@@ -89,7 +91,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
|
|||||||
strcpy((char *)new_map[(tab_id * 2) - 2], name);
|
strcpy((char *)new_map[(tab_id * 2) - 2], name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tabview->map = new_map;
|
||||||
lv_btnmatrix_set_map(btns, new_map);
|
lv_btnmatrix_set_map(btns, new_map);
|
||||||
lv_mem_free(old_map);
|
lv_mem_free(old_map);
|
||||||
|
|
||||||
@@ -97,7 +99,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
|
|||||||
|
|
||||||
tabview->tab_cnt++;
|
tabview->tab_cnt++;
|
||||||
if(tabview->tab_cnt == 1) {
|
if(tabview->tab_cnt == 1) {
|
||||||
lv_tabview_set_act(obj, 0);
|
lv_tabview_set_act(obj, 0, LV_ANIM_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_btnmatrix_set_btn_ctrl(btns, tabview->tab_cur, LV_BTNMATRIX_CTRL_CHECKED);
|
lv_btnmatrix_set_btn_ctrl(btns, tabview->tab_cur, LV_BTNMATRIX_CTRL_CHECKED);
|
||||||
@@ -105,7 +107,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * obj, const char * name)
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_tabview_set_act(lv_obj_t * obj, uint32_t id)
|
void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en)
|
||||||
{
|
{
|
||||||
lv_tabview_t * tabview = (lv_tabview_t *) obj;
|
lv_tabview_t * tabview = (lv_tabview_t *) obj;
|
||||||
|
|
||||||
@@ -116,7 +118,7 @@ void lv_tabview_set_act(lv_obj_t * obj, uint32_t id)
|
|||||||
lv_obj_t * cont = lv_tabview_get_content(obj);
|
lv_obj_t * cont = lv_tabview_get_content(obj);
|
||||||
lv_obj_t * tab = lv_obj_get_child(cont, 0);
|
lv_obj_t * tab = lv_obj_get_child(cont, 0);
|
||||||
lv_coord_t gap = lv_obj_get_style_pad_column(cont, LV_PART_MAIN);
|
lv_coord_t gap = lv_obj_get_style_pad_column(cont, LV_PART_MAIN);
|
||||||
lv_obj_scroll_to_x(cont, id * (gap + lv_obj_get_width(tab)), LV_ANIM_ON);
|
lv_obj_scroll_to_x(cont, id * (gap + lv_obj_get_width(tab)), anim_en);
|
||||||
|
|
||||||
lv_obj_t * btns = lv_tabview_get_tab_btns(obj);
|
lv_obj_t * btns = lv_tabview_get_tab_btns(obj);
|
||||||
lv_btnmatrix_set_btn_ctrl(btns, id, LV_BTNMATRIX_CTRL_CHECKED);
|
lv_btnmatrix_set_btn_ctrl(btns, id, LV_BTNMATRIX_CTRL_CHECKED);
|
||||||
@@ -175,9 +177,9 @@ static void lv_tabview_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_o
|
|||||||
cont = lv_obj_create(obj, NULL);
|
cont = lv_obj_create(obj, NULL);
|
||||||
|
|
||||||
lv_btnmatrix_set_one_checked(btnm, true);
|
lv_btnmatrix_set_one_checked(btnm, true);
|
||||||
const char ** map = lv_mem_alloc(sizeof(const char *));
|
tabview->map = lv_mem_alloc(sizeof(const char *));
|
||||||
map[0] = "";
|
tabview->map[0] = "";
|
||||||
lv_btnmatrix_set_map(btnm, map);
|
lv_btnmatrix_set_map(btnm, tabview->map);
|
||||||
lv_obj_add_event_cb(btnm, btns_event_cb, NULL);
|
lv_obj_add_event_cb(btnm, btns_event_cb, NULL);
|
||||||
lv_obj_add_flag(btnm, LV_OBJ_FLAG_EVENT_BUBBLE);
|
lv_obj_add_flag(btnm, LV_OBJ_FLAG_EVENT_BUBBLE);
|
||||||
|
|
||||||
@@ -205,12 +207,29 @@ static void lv_tabview_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_o
|
|||||||
lv_obj_clear_flag(cont, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
lv_obj_clear_flag(cont, LV_OBJ_FLAG_SCROLL_ON_FOCUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void lv_tabview_destructor(lv_obj_t * obj)
|
||||||
|
{
|
||||||
|
lv_tabview_t * tabview = (lv_tabview_t *) obj;
|
||||||
|
|
||||||
|
uint32_t i;
|
||||||
|
if(tabview->tab_pos & LV_DIR_VER) {
|
||||||
|
for(i = 0; i < tabview->tab_cnt; i++) {
|
||||||
|
lv_mem_free(tabview->map[i]);
|
||||||
|
tabview->map[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
lv_mem_free(tabview->map);
|
||||||
|
tabview->map = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void btns_event_cb(lv_obj_t * btns, lv_event_t e)
|
static void btns_event_cb(lv_obj_t * btns, lv_event_t e)
|
||||||
{
|
{
|
||||||
if(e == LV_EVENT_VALUE_CHANGED) {
|
if(e == LV_EVENT_VALUE_CHANGED) {
|
||||||
lv_obj_t * tv = lv_obj_get_parent(btns);
|
lv_obj_t * tv = lv_obj_get_parent(btns);
|
||||||
uint32_t id = lv_btnmatrix_get_active_btn(btns);
|
uint32_t id = lv_btnmatrix_get_active_btn(btns);
|
||||||
lv_tabview_set_act(tv, id);
|
lv_tabview_set_act(tv, id, LV_ANIM_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void cont_event_cb(lv_obj_t * cont, lv_event_t e)
|
static void cont_event_cb(lv_obj_t * cont, lv_event_t e)
|
||||||
@@ -224,7 +243,7 @@ static void cont_event_cb(lv_obj_t * cont, lv_event_t e)
|
|||||||
lv_coord_t w = lv_obj_get_width_fit(cont);
|
lv_coord_t w = lv_obj_get_width_fit(cont);
|
||||||
lv_coord_t t = (p.x + w/ 2) / w;
|
lv_coord_t t = (p.x + w/ 2) / w;
|
||||||
if(t < 0) t = 0;
|
if(t < 0) t = 0;
|
||||||
lv_tabview_set_act(tv, t);
|
lv_tabview_set_act(tv, t, LV_ANIM_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /*LV_USE_TABVIEW*/
|
#endif /*LV_USE_TABVIEW*/
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ extern "C" {
|
|||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
lv_obj_t obj;
|
lv_obj_t obj;
|
||||||
|
char ** map;
|
||||||
lv_flex_t flex;
|
lv_flex_t flex;
|
||||||
uint16_t tab_cnt;
|
uint16_t tab_cnt;
|
||||||
uint16_t tab_cur;
|
uint16_t tab_cur;
|
||||||
@@ -48,7 +49,7 @@ lv_obj_t * lv_tabview_get_content(lv_obj_t * tv);
|
|||||||
|
|
||||||
lv_obj_t * lv_tabview_get_tab_btns(lv_obj_t * tv);
|
lv_obj_t * lv_tabview_get_tab_btns(lv_obj_t * tv);
|
||||||
|
|
||||||
void lv_tabview_set_act(lv_obj_t * tv, uint32_t id);
|
void lv_tabview_set_act(lv_obj_t * obj, uint32_t id, lv_anim_enable_t anim_en);
|
||||||
|
|
||||||
uint16_t lv_tabview_get_tab_act(lv_obj_t * tv);
|
uint16_t lv_tabview_get_tab_act(lv_obj_t * tv);
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ lv_obj_t * lv_tileview_create(lv_obj_t * parent);
|
|||||||
|
|
||||||
lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t row_id, uint8_t col_id, lv_dir_t dir);
|
lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t row_id, uint8_t col_id, lv_dir_t dir);
|
||||||
|
|
||||||
|
void lv_obj_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en);
|
||||||
|
void lv_obj_set_tile_id(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en);
|
||||||
|
|
||||||
|
|
||||||
/*=====================
|
/*=====================
|
||||||
|
|||||||
@@ -498,8 +498,10 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *)
|
|||||||
|
|
||||||
group->obj_focus = obj_next;
|
group->obj_focus = obj_next;
|
||||||
|
|
||||||
lv_signal_send(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
|
lv_res_t res;
|
||||||
lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
|
res = lv_signal_send(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
|
||||||
|
if(res != LV_RES_OK) return;
|
||||||
|
res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL);
|
||||||
if(res != LV_RES_OK) return;
|
if(res != LV_RES_OK) return;
|
||||||
|
|
||||||
lv_obj_invalidate(*group->obj_focus);
|
lv_obj_invalidate(*group->obj_focus);
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
/*Send the ENTER as a normal KEY*/
|
/*Send the ENTER as a normal KEY*/
|
||||||
lv_group_send_data(g, LV_KEY_ENTER);
|
lv_group_send_data(g, LV_KEY_ENTER);
|
||||||
|
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -411,7 +411,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) {
|
else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) {
|
||||||
|
|
||||||
if(data->key == LV_KEY_ENTER) {
|
if(data->key == LV_KEY_ENTER) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_PRESSING, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_PRESSING, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_PRESSING, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_PRESSING, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -422,7 +422,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
i->proc.long_pr_sent = 1;
|
i->proc.long_pr_sent = 1;
|
||||||
if(data->key == LV_KEY_ENTER) {
|
if(data->key == LV_KEY_ENTER) {
|
||||||
i->proc.longpr_rep_timestamp = lv_tick_get();
|
i->proc.longpr_rep_timestamp = lv_tick_get();
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -436,7 +436,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
|
|
||||||
/*Send LONG_PRESS_REP on ENTER*/
|
/*Send LONG_PRESS_REP on ENTER*/
|
||||||
if(data->key == LV_KEY_ENTER) {
|
if(data->key == LV_KEY_ENTER) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -466,7 +466,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
data->key = prev_key;
|
data->key = prev_key;
|
||||||
if(data->key == LV_KEY_ENTER) {
|
if(data->key == LV_KEY_ENTER) {
|
||||||
|
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
|
|
||||||
if(i->proc.long_pr_sent == 0) {
|
if(i->proc.long_pr_sent == 0) {
|
||||||
@@ -532,7 +532,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
bool editable = lv_obj_is_editable(indev_obj_act);
|
bool editable = lv_obj_is_editable(indev_obj_act);
|
||||||
|
|
||||||
if(lv_group_get_editing(g) == true || editable == false) {
|
if(lv_group_get_editing(g) == true || editable == false) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_PRESSED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
|
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL);
|
||||||
@@ -579,7 +579,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
}
|
}
|
||||||
/*If not editable then just send a long press signal*/
|
/*If not editable then just send a long press signal*/
|
||||||
else {
|
else {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -594,7 +594,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
i->proc.longpr_rep_timestamp = lv_tick_get();
|
i->proc.longpr_rep_timestamp = lv_tick_get();
|
||||||
|
|
||||||
if(data->key == LV_KEY_ENTER) {
|
if(data->key == LV_KEY_ENTER) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
@@ -623,7 +623,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
|
|
||||||
/*The button was released on a non-editable object. Just send enter*/
|
/*The button was released on a non-editable object. Just send enter*/
|
||||||
if(editable == false) {
|
if(editable == false) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
|
|
||||||
if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
|
if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
|
||||||
@@ -639,7 +639,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
|
|||||||
else if(g->editing) {
|
else if(g->editing) {
|
||||||
/*Ignore long pressed enter release because it comes from mode switch*/
|
/*Ignore long pressed enter release because it comes from mode switch*/
|
||||||
if(!i->proc.long_pr_sent || _lv_ll_get_len(&g->obj_ll) <= 1) {
|
if(!i->proc.long_pr_sent || _lv_ll_get_len(&g->obj_ll) <= 1) {
|
||||||
indev_obj_act->class_p->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
lv_signal_send(indev_obj_act, LV_SIGNAL_RELEASED, NULL);
|
||||||
if(indev_reset_check(&i->proc)) return;
|
if(indev_reset_check(&i->proc)) return;
|
||||||
|
|
||||||
lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
|
lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL);
|
||||||
|
|||||||
@@ -207,6 +207,8 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, void * param)
|
|||||||
}
|
}
|
||||||
event_temp_data_head = &event_temp_data;
|
event_temp_data_head = &event_temp_data;
|
||||||
|
|
||||||
|
/* There could be nested event sending with different param.
|
||||||
|
* It needs to be saved for the current event context because `lv_event_get_data` returns a global param. */
|
||||||
void * event_act_param_save = event_act_param;
|
void * event_act_param_save = event_act_param;
|
||||||
event_act_param = param;
|
event_act_param = param;
|
||||||
|
|
||||||
@@ -232,11 +234,6 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, void * param)
|
|||||||
res = LV_RES_INV;
|
res = LV_RES_INV;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_EVENT_BUBBLE) && obj->parent) {
|
|
||||||
lv_res_t res = lv_event_send(obj->parent, event, param);
|
|
||||||
if(res != LV_RES_OK) return LV_RES_INV;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
@@ -249,6 +246,13 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, void * param)
|
|||||||
/*Remove this element from the list*/
|
/*Remove this element from the list*/
|
||||||
event_temp_data_head = event_temp_data_head->prev;
|
event_temp_data_head = event_temp_data_head->prev;
|
||||||
|
|
||||||
|
if(res == LV_RES_OK) {
|
||||||
|
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_EVENT_BUBBLE) && obj->parent) {
|
||||||
|
lv_res_t res = lv_event_send(obj->parent, event, param);
|
||||||
|
if(res != LV_RES_OK) return LV_RES_INV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,9 +297,7 @@ lv_res_t lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param)
|
|||||||
|
|
||||||
if(class_p == NULL) return LV_RES_OK;
|
if(class_p == NULL) return LV_RES_OK;
|
||||||
|
|
||||||
|
|
||||||
lv_res_t res = LV_RES_OK;
|
lv_res_t res = LV_RES_OK;
|
||||||
|
|
||||||
if(class_p->signal_cb) res = class_p->signal_cb(obj, signal, param);
|
if(class_p->signal_cb) res = class_p->signal_cb(obj, signal, param);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@@ -341,12 +343,8 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
|||||||
obj->state = new_state;
|
obj->state = new_state;
|
||||||
|
|
||||||
_lv_style_state_cmp_t cmp_res = lv_obj_style_state_compare(obj, prev_state, new_state);
|
_lv_style_state_cmp_t cmp_res = lv_obj_style_state_compare(obj, prev_state, new_state);
|
||||||
|
|
||||||
/*If there is no difference in styles there is nothing else to do*/
|
/*If there is no difference in styles there is nothing else to do*/
|
||||||
if(cmp_res == _LV_STYLE_STATE_CMP_SAME) {
|
if(cmp_res == _LV_STYLE_STATE_CMP_SAME) return;
|
||||||
lv_obj_invalidate(obj);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
trans_set_t * ts = lv_mem_buf_get(sizeof(trans_set_t) * STYLE_TRANSITION_MAX);
|
trans_set_t * ts = lv_mem_buf_get(sizeof(trans_set_t) * STYLE_TRANSITION_MAX);
|
||||||
lv_memset_00(ts, sizeof(sizeof(trans_set_t) * 64));
|
lv_memset_00(ts, sizeof(sizeof(trans_set_t) * 64));
|
||||||
@@ -388,9 +386,10 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
|
|||||||
|
|
||||||
lv_mem_buf_release(ts);
|
lv_mem_buf_release(ts);
|
||||||
|
|
||||||
|
lv_obj_invalidate(obj);
|
||||||
|
|
||||||
if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_LAYOUT) lv_obj_refresh_style(obj, LV_STYLE_PROP_ALL);
|
if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_LAYOUT) lv_obj_refresh_style(obj, LV_STYLE_PROP_ALL);
|
||||||
else if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD) lv_obj_refresh_ext_draw_size(obj);
|
else if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD) lv_obj_refresh_ext_draw_size(obj);
|
||||||
else if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_REDRAW) lv_obj_invalidate(obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
|
void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
|
||||||
@@ -557,7 +556,7 @@ bool lv_obj_check_type(const lv_obj_t * obj, const lv_obj_class_t * class_p)
|
|||||||
|
|
||||||
bool lv_obj_has_class(const lv_obj_t * obj, const lv_obj_class_t * class_p)
|
bool lv_obj_has_class(const lv_obj_t * obj, const lv_obj_class_t * class_p)
|
||||||
{
|
{
|
||||||
lv_obj_class_t * obj_class = obj->class_p;
|
const lv_obj_class_t * obj_class = obj->class_p;
|
||||||
while(obj_class) {
|
while(obj_class) {
|
||||||
if(obj_class == class_p) return true;
|
if(obj_class == class_p) return true;
|
||||||
obj_class = obj_class->base_class;
|
obj_class = obj_class->base_class;
|
||||||
@@ -623,7 +622,7 @@ static void lv_obj_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(parent->spec_attr->children == NULL) {
|
if(parent->spec_attr->children == NULL) {
|
||||||
parent->spec_attr->children = lv_mem_alloc(sizeof(lv_obj_t *) * 2);
|
parent->spec_attr->children = lv_mem_alloc(sizeof(lv_obj_t *));
|
||||||
parent->spec_attr->children[0] = obj;
|
parent->spec_attr->children[0] = obj;
|
||||||
parent->spec_attr->child_cnt = 1;
|
parent->spec_attr->child_cnt = 1;
|
||||||
} else {
|
} else {
|
||||||
@@ -634,15 +633,18 @@ static void lv_obj_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t
|
|||||||
|
|
||||||
obj->parent = parent;
|
obj->parent = parent;
|
||||||
|
|
||||||
obj->coords.y1 = parent->coords.y1;
|
lv_coord_t sl = lv_obj_get_scroll_left(parent);
|
||||||
obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT;
|
lv_coord_t st = lv_obj_get_scroll_top(parent);
|
||||||
|
|
||||||
|
obj->coords.y1 = parent->coords.y1 + lv_obj_get_style_pad_top(parent, LV_PART_MAIN) - st;
|
||||||
|
obj->coords.y2 = obj->coords.y1 + LV_OBJ_DEF_HEIGHT;
|
||||||
if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL) {
|
if(lv_obj_get_base_dir(obj) == LV_BIDI_DIR_RTL) {
|
||||||
obj->coords.x2 = parent->coords.x2;
|
obj->coords.x2 = parent->coords.x2 - lv_obj_get_style_pad_right(parent, LV_PART_MAIN) - sl;
|
||||||
obj->coords.x1 = parent->coords.x2 - LV_OBJ_DEF_WIDTH;
|
obj->coords.x1 = obj->coords.x2 - LV_OBJ_DEF_WIDTH;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
obj->coords.x1 = parent->coords.x1;
|
obj->coords.x1 = parent->coords.x1 + lv_obj_get_style_pad_left(parent, LV_PART_MAIN) - sl;
|
||||||
obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH;
|
obj->coords.x2 = obj->coords.x1 + LV_OBJ_DEF_WIDTH;
|
||||||
}
|
}
|
||||||
obj->w_set = lv_area_get_width(&obj->coords);
|
obj->w_set = lv_area_get_width(&obj->coords);
|
||||||
obj->h_set = lv_area_get_height(&obj->coords);
|
obj->h_set = lv_area_get_height(&obj->coords);
|
||||||
@@ -685,17 +687,6 @@ static void lv_obj_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t
|
|||||||
lv_obj_set_size(obj, lv_obj_get_width(copy), lv_obj_get_height(copy));
|
lv_obj_set_size(obj, lv_obj_get_width(copy), lv_obj_get_height(copy));
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
lv_obj_set_pos(obj, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(parent) {
|
|
||||||
/* Send a signal to the parent to notify it about the new child.
|
|
||||||
* Also triggers layout update*/
|
|
||||||
lv_signal_send(parent, LV_SIGNAL_CHILD_CHG, obj);
|
|
||||||
|
|
||||||
/*Invalidate the area if not screen created*/
|
|
||||||
lv_obj_invalidate(obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_LOG_INFO("Object create ready");
|
LV_LOG_INFO("Object create ready");
|
||||||
@@ -704,8 +695,19 @@ static void lv_obj_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t
|
|||||||
static void lv_obj_destructor(lv_obj_t * p)
|
static void lv_obj_destructor(lv_obj_t * p)
|
||||||
{
|
{
|
||||||
lv_obj_t * obj = p;
|
lv_obj_t * obj = p;
|
||||||
// lv_obj_remove_all_styles(obj);
|
if(obj->spec_attr) {
|
||||||
if(obj->spec_attr) lv_mem_free(obj->spec_attr);
|
if(obj->spec_attr->children) {
|
||||||
|
lv_mem_free(obj->spec_attr->children);
|
||||||
|
obj->spec_attr->children = NULL;
|
||||||
|
}
|
||||||
|
if(obj->spec_attr->event_dsc) {
|
||||||
|
lv_mem_free(obj->spec_attr->event_dsc);
|
||||||
|
obj->spec_attr->event_dsc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
lv_mem_free(obj->spec_attr);
|
||||||
|
obj->spec_attr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -868,8 +870,8 @@ static void draw_scrollbar(lv_obj_t * obj, const lv_area_t * clip_area)
|
|||||||
area.x1 = area.x2 - tickness;
|
area.x1 = area.x2 - tickness;
|
||||||
|
|
||||||
/*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
|
/*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
|
||||||
if(ver_draw && _lv_area_is_on(&area, clip_area)) {
|
|
||||||
lv_coord_t content_h = obj_h + st + sb;
|
lv_coord_t content_h = obj_h + st + sb;
|
||||||
|
if(ver_draw && content_h && _lv_area_is_on(&area, clip_area)) {
|
||||||
lv_coord_t sb_h = ((obj_h - end_space * 2 - hor_req_space) * obj_h) / content_h;
|
lv_coord_t sb_h = ((obj_h - end_space * 2 - hor_req_space) * obj_h) / content_h;
|
||||||
sb_h = LV_MAX(sb_h, SCROLLBAR_MIN_SIZE);
|
sb_h = LV_MAX(sb_h, SCROLLBAR_MIN_SIZE);
|
||||||
rem = (obj_h - end_space * 2 - hor_req_space) - sb_h; /*Remaining size from the scrollbar track that is not the scrollbar itself*/
|
rem = (obj_h - end_space * 2 - hor_req_space) - sb_h; /*Remaining size from the scrollbar track that is not the scrollbar itself*/
|
||||||
@@ -904,8 +906,8 @@ static void draw_scrollbar(lv_obj_t * obj, const lv_area_t * clip_area)
|
|||||||
area.x1 = obj->coords.x1;
|
area.x1 = obj->coords.x1;
|
||||||
area.x2 = obj->coords.x2;
|
area.x2 = obj->coords.x2;
|
||||||
/*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
|
/*Draw horizontal scrollbar if the mode is ON or can be scrolled in this direction*/
|
||||||
if(hor_draw && _lv_area_is_on(&area, clip_area)) {
|
|
||||||
lv_coord_t content_w = obj_w + sl + sr;
|
lv_coord_t content_w = obj_w + sl + sr;
|
||||||
|
if(hor_draw && content_w && _lv_area_is_on(&area, clip_area)) {
|
||||||
lv_coord_t sb_w = ((obj_w - end_space * 2 - ver_reg_space) * obj_w) / content_w;
|
lv_coord_t sb_w = ((obj_w - end_space * 2 - ver_reg_space) * obj_w) / content_w;
|
||||||
sb_w = LV_MAX(sb_w, SCROLLBAR_MIN_SIZE);
|
sb_w = LV_MAX(sb_w, SCROLLBAR_MIN_SIZE);
|
||||||
rem = (obj_w - end_space * 2 - ver_reg_space) - sb_w; /*Remaining size from the scrollbar track that is not the scrollbar itself*/
|
rem = (obj_w - end_space * 2 - ver_reg_space) - sb_w; /*Remaining size from the scrollbar track that is not the scrollbar itself*/
|
||||||
@@ -1027,9 +1029,10 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
|||||||
bool editing = false;
|
bool editing = false;
|
||||||
editing = lv_group_get_editing(lv_obj_get_group(obj));
|
editing = lv_group_get_editing(lv_obj_get_group(obj));
|
||||||
lv_state_t state = LV_STATE_FOCUSED;
|
lv_state_t state = LV_STATE_FOCUSED;
|
||||||
|
lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act());
|
||||||
|
if(indev_type == LV_INDEV_TYPE_KEYPAD || indev_type == LV_INDEV_TYPE_ENCODER) state |= LV_STATE_FOCUS_KEY;
|
||||||
if(editing) {
|
if(editing) {
|
||||||
state |= LV_STATE_EDITED;
|
state |= LV_STATE_EDITED;
|
||||||
if(lv_obj_get_group(obj)) state |= LV_STATE_FOCUS_GROUP;
|
|
||||||
|
|
||||||
/*if using focus mode, change target to parent*/
|
/*if using focus mode, change target to parent*/
|
||||||
obj = lv_obj_get_focused_obj(obj);
|
obj = lv_obj_get_focused_obj(obj);
|
||||||
@@ -1054,7 +1057,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
|||||||
/*if using focus mode, change target to parent*/
|
/*if using focus mode, change target to parent*/
|
||||||
obj = lv_obj_get_focused_obj(obj);
|
obj = lv_obj_get_focused_obj(obj);
|
||||||
|
|
||||||
lv_obj_clear_state(obj, LV_STATE_FOCUSED | LV_STATE_EDITED);
|
lv_obj_clear_state(obj, LV_STATE_FOCUSED | LV_STATE_EDITED | LV_STATE_FOCUS_KEY);
|
||||||
}
|
}
|
||||||
else if(sign == LV_SIGNAL_COORD_CHG) {
|
else if(sign == LV_SIGNAL_COORD_CHG) {
|
||||||
bool w_new = true;
|
bool w_new = true;
|
||||||
@@ -1139,18 +1142,22 @@ static void base_dir_refr_children(lv_obj_t * obj)
|
|||||||
|
|
||||||
static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find)
|
static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*Check all children of `parent`*/
|
/*Check all children of `parent`*/
|
||||||
uint32_t child_cnt = 0;
|
uint32_t child_cnt = 0;
|
||||||
if(parent->spec_attr) child_cnt = parent->spec_attr->child_cnt;
|
if(parent->spec_attr) child_cnt = parent->spec_attr->child_cnt;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for(i = 0; i < child_cnt; i++) {
|
for(i = 0; i < child_cnt; i++) {
|
||||||
lv_obj_t * child = parent->spec_attr->children[i];
|
lv_obj_t * child = parent->spec_attr->children[i];
|
||||||
if(child == obj_to_find) return true;
|
if(child == obj_to_find) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*Check the children*/
|
/*Check the children*/
|
||||||
bool found = obj_valid_child(child, obj_to_find);
|
bool found = obj_valid_child(child, obj_to_find);
|
||||||
if(found) return true;
|
if(found) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ enum {
|
|||||||
LV_STATE_DEFAULT = 0x00,
|
LV_STATE_DEFAULT = 0x00,
|
||||||
LV_STATE_CHECKED = 0x01,
|
LV_STATE_CHECKED = 0x01,
|
||||||
LV_STATE_FOCUSED = 0x02,
|
LV_STATE_FOCUSED = 0x02,
|
||||||
LV_STATE_FOCUS_GROUP = 0x04,
|
LV_STATE_FOCUS_KEY = 0x04,
|
||||||
LV_STATE_EDITED = 0x08,
|
LV_STATE_EDITED = 0x08,
|
||||||
LV_STATE_HOVERED = 0x10,
|
LV_STATE_HOVERED = 0x10,
|
||||||
LV_STATE_PRESSED = 0x20,
|
LV_STATE_PRESSED = 0x20,
|
||||||
|
|||||||
@@ -52,6 +52,18 @@ lv_obj_t * lv_obj_create_from_class(const lv_obj_class_t * class_p, lv_obj_t * p
|
|||||||
|
|
||||||
// class_start->constructor_cb(obj, parent, copy);
|
// class_start->constructor_cb(obj, parent, copy);
|
||||||
lv_obj_construct(obj, parent, copy);
|
lv_obj_construct(obj, parent, copy);
|
||||||
|
|
||||||
|
// lv_obj_set_pos(obj, 0, 0);
|
||||||
|
|
||||||
|
if(parent) {
|
||||||
|
/* Send a signal to the parent to notify it about the new child.
|
||||||
|
* Also triggers layout update*/
|
||||||
|
lv_signal_send(parent, LV_SIGNAL_CHILD_CHG, obj);
|
||||||
|
|
||||||
|
/*Invalidate the area if not screen created*/
|
||||||
|
lv_obj_invalidate(obj);
|
||||||
|
}
|
||||||
|
|
||||||
if(!copy) lv_theme_apply(obj);
|
if(!copy) lv_theme_apply(obj);
|
||||||
// else lv_style_list_copy(&checkbox->style_indic, &checkbox_copy->style_indic);
|
// else lv_style_list_copy(&checkbox->style_indic, &checkbox_copy->style_indic);
|
||||||
|
|
||||||
@@ -105,12 +117,11 @@ bool lv_obj_is_editable(struct _lv_obj_t * obj)
|
|||||||
const lv_obj_class_t * class_p = obj->class_p;
|
const lv_obj_class_t * class_p = obj->class_p;
|
||||||
|
|
||||||
/*Find a base in which editable is set*/
|
/*Find a base in which editable is set*/
|
||||||
const lv_obj_class_t * base = class_p->base_class;
|
while(class_p && class_p->editable == LV_OBJ_CLASS_EDITABLE_INHERIT) class_p = class_p->base_class;
|
||||||
while(base && base->editable != LV_OBJ_CLASS_EDITABLE_INHERIT) base = base->base_class;
|
|
||||||
|
|
||||||
if(base == NULL) return false;
|
if(class_p == NULL) return false;
|
||||||
|
|
||||||
return base->editable == LV_OBJ_CLASS_EDITABLE_TRUE ? true : false;
|
return class_p->editable == LV_OBJ_CLASS_EDITABLE_TRUE ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
|
|||||||
@@ -369,6 +369,10 @@ void lv_obj_scroll_to_view(lv_obj_t * obj, lv_anim_enable_t anim_en)
|
|||||||
else x_scroll = -right_diff;
|
else x_scroll = -right_diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove any pending scroll animations.*/
|
||||||
|
lv_anim_del(parent, (lv_anim_exec_xcb_t)scroll_anim_x_cb);
|
||||||
|
lv_anim_del(parent, (lv_anim_exec_xcb_t)scroll_anim_y_cb);
|
||||||
|
|
||||||
lv_obj_scroll_by(parent, x_scroll, y_scroll, anim_en);
|
lv_obj_scroll_by(parent, x_scroll, y_scroll, anim_en);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -762,7 +762,7 @@ static cache_t read_cache(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t
|
|||||||
break;
|
break;
|
||||||
case LV_STYLE_IMG_OPA:
|
case LV_STYLE_IMG_OPA:
|
||||||
if(list->cache_img_opa_cover) return CACHE_255;
|
if(list->cache_img_opa_cover) return CACHE_255;
|
||||||
else return CACHE_ZERO;
|
else return CACHE_NEED_CHECK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return CACHE_NEED_CHECK;
|
return CACHE_NEED_CHECK;
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ void lv_obj_del(lv_obj_t * obj)
|
|||||||
|
|
||||||
/*Send a signal to the parent to notify it about the child delete*/
|
/*Send a signal to the parent to notify it about the child delete*/
|
||||||
if(par) {
|
if(par) {
|
||||||
|
/*Just to remove scroll animations if any*/
|
||||||
|
lv_obj_scroll_to(par, 0, 0, LV_ANIM_OFF);
|
||||||
|
if(par->spec_attr) {
|
||||||
|
par->spec_attr->scroll.x = 0;
|
||||||
|
par->spec_attr->scroll.y = 0;
|
||||||
|
}
|
||||||
lv_signal_send(par, LV_SIGNAL_CHILD_CHG, NULL);
|
lv_signal_send(par, LV_SIGNAL_CHILD_CHG, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,10 +86,20 @@ void lv_obj_clean(lv_obj_t * obj)
|
|||||||
{
|
{
|
||||||
LV_ASSERT_OBJ(obj, MY_CLASS);
|
LV_ASSERT_OBJ(obj, MY_CLASS);
|
||||||
|
|
||||||
while(1) {
|
lv_obj_invalidate(obj);
|
||||||
|
|
||||||
lv_obj_t * child = lv_obj_get_child(obj, 0);
|
lv_obj_t * child = lv_obj_get_child(obj, 0);
|
||||||
|
while(child) {
|
||||||
obj_del_core(child);
|
obj_del_core(child);
|
||||||
|
child = lv_obj_get_child(obj, 0);
|
||||||
}
|
}
|
||||||
|
/*Just to remove scroll animations if any*/
|
||||||
|
lv_obj_scroll_to(obj, 0, 0, LV_ANIM_OFF);
|
||||||
|
if(obj->spec_attr) {
|
||||||
|
obj->spec_attr->scroll.x = 0;
|
||||||
|
obj->spec_attr->scroll.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_obj_del_anim_ready_cb(lv_anim_t * a)
|
void lv_obj_del_anim_ready_cb(lv_anim_t * a)
|
||||||
@@ -318,7 +334,9 @@ static void obj_del_core(lv_obj_t * obj)
|
|||||||
lv_event_mark_deleted(obj);
|
lv_event_mark_deleted(obj);
|
||||||
|
|
||||||
/*Remove all style*/
|
/*Remove all style*/
|
||||||
|
lv_obj_enable_style_refresh(false); /*No need to refresh the style because the object will be deleted*/
|
||||||
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
|
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
|
||||||
|
lv_obj_enable_style_refresh(true);
|
||||||
|
|
||||||
/* Reset all input devices if the object to delete is used*/
|
/* Reset all input devices if the object to delete is used*/
|
||||||
lv_indev_t * indev = lv_indev_get_next(NULL);
|
lv_indev_t * indev = lv_indev_get_next(NULL);
|
||||||
@@ -346,7 +364,7 @@ static void obj_del_core(lv_obj_t * obj)
|
|||||||
obj->parent->spec_attr->children[i] = obj->parent->spec_attr->children[i + 1];
|
obj->parent->spec_attr->children[i] = obj->parent->spec_attr->children[i + 1];
|
||||||
}
|
}
|
||||||
obj->parent->spec_attr->child_cnt--;
|
obj->parent->spec_attr->child_cnt--;
|
||||||
lv_mem_realloc(obj->parent->spec_attr->children, obj->parent->spec_attr->child_cnt * sizeof(lv_obj_t *));
|
obj->parent->spec_attr->children = lv_mem_realloc(obj->parent->spec_attr->children, obj->parent->spec_attr->child_cnt * sizeof(lv_obj_t *));
|
||||||
|
|
||||||
/*Free the object itself*/
|
/*Free the object itself*/
|
||||||
lv_mem_free(obj);
|
lv_mem_free(obj);
|
||||||
|
|||||||
@@ -591,11 +591,9 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
|
|||||||
lv_draw_res_t draw_res = call_draw_cb(obj, area_p, LV_DRAW_MODE_COVER_CHECK);
|
lv_draw_res_t draw_res = call_draw_cb(obj, area_p, LV_DRAW_MODE_COVER_CHECK);
|
||||||
if(draw_res == LV_DRAW_RES_MASKED) return NULL;
|
if(draw_res == LV_DRAW_RES_MASKED) return NULL;
|
||||||
|
|
||||||
#if LV_USE_OPA_SCALE
|
|
||||||
if(draw_res == LV_DRAW_RES_COVER && lv_obj_get_style_opa(obj, LV_PART_MAIN) != LV_OPA_COVER) {
|
if(draw_res == LV_DRAW_RES_COVER && lv_obj_get_style_opa(obj, LV_PART_MAIN) != LV_OPA_COVER) {
|
||||||
draw_res = LV_DRAW_RES_NOT_COVER;
|
draw_res = LV_DRAW_RES_NOT_COVER;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
|
for(i = 0; i < lv_obj_get_child_cnt(obj); i++) {
|
||||||
|
|||||||
@@ -60,11 +60,13 @@ lv_theme_t * lv_theme_get_act(void)
|
|||||||
*/
|
*/
|
||||||
void lv_theme_apply(lv_obj_t * obj)
|
void lv_theme_apply(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
|
lv_obj_enable_style_refresh(false);
|
||||||
|
|
||||||
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
|
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
|
||||||
|
|
||||||
/*Apply the theme including the base theme(s)*/
|
apply_theme(act_theme, obj); /*Apply the theme including the base theme(s)*/
|
||||||
apply_theme(act_theme, obj);
|
|
||||||
|
|
||||||
|
lv_obj_enable_style_refresh(true);
|
||||||
lv_obj_refresh_style(obj, LV_STYLE_PROP_ALL);
|
lv_obj_refresh_style(obj, LV_STYLE_PROP_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,11 +220,7 @@ LV_ATTRIBUTE_FAST_MEM void _lv_blend_map(const lv_area_t * clip_area, const lv_a
|
|||||||
draw_area.y2 -= disp_area->y1;
|
draw_area.y2 -= disp_area->y1;
|
||||||
|
|
||||||
/*Round the values in the mask if anti-aliasing is disabled*/
|
/*Round the values in the mask if anti-aliasing is disabled*/
|
||||||
#if LV_ANTIALIAS
|
|
||||||
if(mask && disp->driver.antialiasing == 0)
|
if(mask && disp->driver.antialiasing == 0)
|
||||||
#else
|
|
||||||
if(mask)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int32_t mask_w = lv_area_get_width(&draw_area);
|
int32_t mask_w = lv_area_get_width(&draw_area);
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vert
|
|||||||
param->dsc.cb = (lv_draw_mask_xcb_t)lv_draw_mask_angle;
|
param->dsc.cb = (lv_draw_mask_xcb_t)lv_draw_mask_angle;
|
||||||
param->dsc.type = LV_DRAW_MASK_TYPE_ANGLE;
|
param->dsc.type = LV_DRAW_MASK_TYPE_ANGLE;
|
||||||
|
|
||||||
LV_ASSERT_MSG(start_angle < 0 && start_angle >= 360, "Unexpected start angle");
|
LV_ASSERT_MSG(start_angle >= 0 && start_angle <= 360, "Unexpected start angle");
|
||||||
|
|
||||||
if(start_angle >= 0 && start_angle < 180) {
|
if(start_angle >= 0 && start_angle < 180) {
|
||||||
start_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
start_side = LV_DRAW_MASK_LINE_SIDE_LEFT;
|
||||||
@@ -340,7 +340,7 @@ void lv_draw_mask_angle_init(lv_draw_mask_angle_param_t * param, lv_coord_t vert
|
|||||||
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
start_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
LV_ASSERT_MSG(end_angle < 0 && start_angle >= 360, "Unexpected end angle");
|
LV_ASSERT_MSG(end_angle >= 0 && start_angle <= 360, "Unexpected end angle");
|
||||||
|
|
||||||
if(end_angle >= 0 && end_angle < 180) {
|
if(end_angle >= 0 && end_angle < 180) {
|
||||||
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
end_side = LV_DRAW_MASK_LINE_SIDE_RIGHT;
|
||||||
|
|||||||
@@ -343,6 +343,11 @@ LV_ATTRIBUTE_FAST_MEM static void draw_bg_img(const lv_area_t * coords, const lv
|
|||||||
if(dsc->bg_img_src == NULL) return;
|
if(dsc->bg_img_src == NULL) return;
|
||||||
if(dsc->bg_img_opa <= LV_OPA_MIN) return;
|
if(dsc->bg_img_opa <= LV_OPA_MIN) return;
|
||||||
|
|
||||||
|
lv_img_src_t src_type = lv_img_src_get_type(dsc->bg_img_src);
|
||||||
|
if(src_type != LV_IMG_SRC_VARIABLE && src_type != LV_IMG_SRC_FILE) {
|
||||||
|
LV_LOG_WARN("bg_img_src must be variable or path");
|
||||||
|
return;
|
||||||
|
}
|
||||||
lv_img_header_t header;
|
lv_img_header_t header;
|
||||||
lv_res_t res = lv_img_decoder_get_info(dsc->bg_img_src, &header);
|
lv_res_t res = lv_img_decoder_get_info(dsc->bg_img_src, &header);
|
||||||
if(res != LV_RES_OK) {
|
if(res != LV_RES_OK) {
|
||||||
|
|||||||
@@ -153,6 +153,8 @@ void lv_mem_deinit(void)
|
|||||||
*/
|
*/
|
||||||
void * lv_mem_alloc(size_t size)
|
void * lv_mem_alloc(size_t size)
|
||||||
{
|
{
|
||||||
|
// printf("alloc: %d\n", size);
|
||||||
|
|
||||||
if(size == 0) return &zero_mem;
|
if(size == 0) return &zero_mem;
|
||||||
|
|
||||||
/*Round the size up to ALIGN_MASK*/
|
/*Round the size up to ALIGN_MASK*/
|
||||||
@@ -215,6 +217,7 @@ void * lv_mem_alloc(size_t size)
|
|||||||
*/
|
*/
|
||||||
void lv_mem_free(const void * data)
|
void lv_mem_free(const void * data)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(data == &zero_mem) return;
|
if(data == &zero_mem) return;
|
||||||
if(data == NULL) return;
|
if(data == NULL) return;
|
||||||
|
|
||||||
@@ -226,6 +229,7 @@ void lv_mem_free(const void * data)
|
|||||||
lv_memset((void *)data, 0xbb, lv_mem_get_size(data));
|
lv_memset((void *)data, 0xbb, lv_mem_get_size(data));
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
// printf("free: %d\n", lv_mem_get_size(data));
|
||||||
|
|
||||||
#if LV_MEM_CUSTOM == 0
|
#if LV_MEM_CUSTOM == 0
|
||||||
e->header.s.used = 0;
|
e->header.s.used = 0;
|
||||||
@@ -273,6 +277,10 @@ void * lv_mem_realloc(void * data_p, size_t new_size)
|
|||||||
if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/
|
if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/
|
||||||
|
|
||||||
#if LV_MEM_CUSTOM == 0
|
#if LV_MEM_CUSTOM == 0
|
||||||
|
if(new_size == 0) {
|
||||||
|
lv_mem_free(data_p);
|
||||||
|
return &zero_mem;
|
||||||
|
}
|
||||||
/* Truncate the memory if the new size is smaller. */
|
/* Truncate the memory if the new size is smaller. */
|
||||||
if(new_size < old_size) {
|
if(new_size < old_size) {
|
||||||
lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
|
lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t));
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ void lv_style_reset(lv_style_t * style)
|
|||||||
LV_ASSERT_STYLE(style);
|
LV_ASSERT_STYLE(style);
|
||||||
|
|
||||||
if(style->allocated) lv_mem_free(style->values_and_props);
|
if(style->allocated) lv_mem_free(style->values_and_props);
|
||||||
lv_style_init(style);
|
lv_memset_00(style, sizeof(lv_style_t));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_style_prop_t lv_style_register_prop(void)
|
lv_style_prop_t lv_style_register_prop(void)
|
||||||
|
|||||||
@@ -154,59 +154,59 @@ typedef enum {
|
|||||||
LV_STYLE_BG_IMG_RECOLOR_OPA = 41,
|
LV_STYLE_BG_IMG_RECOLOR_OPA = 41,
|
||||||
LV_STYLE_BG_IMG_TILED = 42,
|
LV_STYLE_BG_IMG_TILED = 42,
|
||||||
|
|
||||||
LV_STYLE_BORDER_COLOR = 43,
|
|
||||||
LV_STYLE_BORDER_COLOR_FILTERED = 43 | LV_STYLE_PROP_FILTER,
|
|
||||||
LV_STYLE_BORDER_OPA = 44,
|
|
||||||
LV_STYLE_BORDER_WIDTH = 45,
|
|
||||||
LV_STYLE_BORDER_SIDE = 46,
|
|
||||||
LV_STYLE_BORDER_POST = 47,
|
|
||||||
|
|
||||||
/*Group 3*/
|
/*Group 3*/
|
||||||
|
LV_STYLE_BORDER_COLOR = 48,
|
||||||
|
LV_STYLE_BORDER_COLOR_FILTERED = 48 | LV_STYLE_PROP_FILTER,
|
||||||
|
LV_STYLE_BORDER_OPA = 49,
|
||||||
|
LV_STYLE_BORDER_WIDTH = 50,
|
||||||
|
LV_STYLE_BORDER_SIDE = 51,
|
||||||
|
LV_STYLE_BORDER_POST = 52,
|
||||||
|
|
||||||
LV_STYLE_OUTLINE_WIDTH = 48 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_OUTLINE_WIDTH = 48 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_OUTLINE_COLOR = 49,
|
LV_STYLE_OUTLINE_COLOR = 49,
|
||||||
LV_STYLE_OUTLINE_COLOR_FILTERED = 49 | LV_STYLE_PROP_FILTER,
|
LV_STYLE_OUTLINE_COLOR_FILTERED = 49 | LV_STYLE_PROP_FILTER,
|
||||||
LV_STYLE_OUTLINE_OPA = 50 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_OUTLINE_OPA = 50 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_OUTLINE_PAD = 51 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_OUTLINE_PAD = 51 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
|
|
||||||
LV_STYLE_SHADOW_WIDTH = 55 | LV_STYLE_PROP_EXT_DRAW,
|
|
||||||
LV_STYLE_SHADOW_OFS_X = 56 | LV_STYLE_PROP_EXT_DRAW,
|
|
||||||
LV_STYLE_SHADOW_OFS_Y = 57 | LV_STYLE_PROP_EXT_DRAW,
|
|
||||||
LV_STYLE_SHADOW_SPREAD = 58 | LV_STYLE_PROP_EXT_DRAW,
|
|
||||||
LV_STYLE_SHADOW_COLOR = 59,
|
|
||||||
LV_STYLE_SHADOW_COLOR_FILTERED = 59 | LV_STYLE_PROP_FILTER,
|
|
||||||
LV_STYLE_SHADOW_OPA = 60 | LV_STYLE_PROP_EXT_DRAW,
|
|
||||||
|
|
||||||
|
|
||||||
/*Group 4*/
|
/*Group 4*/
|
||||||
LV_STYLE_IMG_OPA = 64,
|
LV_STYLE_SHADOW_WIDTH = 64 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_IMG_RECOLOR = 65,
|
LV_STYLE_SHADOW_OFS_X = 65 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_IMG_RECOLOR_FILTERED = 65 | LV_STYLE_PROP_FILTER,
|
LV_STYLE_SHADOW_OFS_Y = 66 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_IMG_RECOLOR_OPA = 66,
|
LV_STYLE_SHADOW_SPREAD = 67 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
|
LV_STYLE_SHADOW_COLOR = 68,
|
||||||
|
LV_STYLE_SHADOW_COLOR_FILTERED = 68 | LV_STYLE_PROP_FILTER,
|
||||||
|
LV_STYLE_SHADOW_OPA = 69 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
|
|
||||||
LV_STYLE_LINE_WIDTH = 68 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_IMG_OPA = 70,
|
||||||
LV_STYLE_LINE_DASH_WIDTH = 69,
|
LV_STYLE_IMG_RECOLOR = 71,
|
||||||
LV_STYLE_LINE_DASH_GAP = 70,
|
LV_STYLE_IMG_RECOLOR_FILTERED = 71 | LV_STYLE_PROP_FILTER,
|
||||||
LV_STYLE_LINE_ROUNDED = 71,
|
LV_STYLE_IMG_RECOLOR_OPA = 72,
|
||||||
LV_STYLE_LINE_COLOR = 72,
|
|
||||||
LV_STYLE_LINE_COLOR_FILTERED = 72 | LV_STYLE_PROP_FILTER,
|
|
||||||
LV_STYLE_LINE_OPA = 73,
|
|
||||||
|
|
||||||
LV_STYLE_ARC_WIDTH = 75 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_LINE_WIDTH = 73 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_ARC_ROUNDED = 76,
|
LV_STYLE_LINE_DASH_WIDTH = 74,
|
||||||
LV_STYLE_ARC_COLOR = 77,
|
LV_STYLE_LINE_DASH_GAP = 75,
|
||||||
LV_STYLE_ARC_COLOR_FILTERED = 77 | LV_STYLE_PROP_FILTER,
|
LV_STYLE_LINE_ROUNDED = 76,
|
||||||
LV_STYLE_ARC_OPA = 78,
|
LV_STYLE_LINE_COLOR = 77,
|
||||||
LV_STYLE_ARC_IMG_SRC = 79,
|
LV_STYLE_LINE_COLOR_FILTERED = 77 | LV_STYLE_PROP_FILTER,
|
||||||
|
LV_STYLE_LINE_OPA = 78,
|
||||||
|
|
||||||
/*Group 5*/
|
/*Group 5*/
|
||||||
LV_STYLE_TEXT_COLOR = 80 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_ARC_WIDTH = 80 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
LV_STYLE_TEXT_COLOR_FILTERED = 80 | LV_STYLE_PROP_INHERIT | LV_STYLE_PROP_FILTER,
|
LV_STYLE_ARC_ROUNDED = 81,
|
||||||
LV_STYLE_TEXT_OPA = 81 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_ARC_COLOR = 82,
|
||||||
LV_STYLE_TEXT_FONT = 82 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_ARC_COLOR_FILTERED = 82 | LV_STYLE_PROP_FILTER,
|
||||||
LV_STYLE_TEXT_LETTER_SPACE = 83 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_ARC_OPA = 83,
|
||||||
LV_STYLE_TEXT_LINE_SPACE = 84 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_ARC_IMG_SRC = 84,
|
||||||
LV_STYLE_TEXT_DECOR = 85 | LV_STYLE_PROP_INHERIT,
|
|
||||||
LV_STYLE_TEXT_ALIGN = 86 | LV_STYLE_PROP_INHERIT,
|
LV_STYLE_TEXT_COLOR = 87 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_COLOR_FILTERED = 87 | LV_STYLE_PROP_INHERIT | LV_STYLE_PROP_FILTER,
|
||||||
|
LV_STYLE_TEXT_OPA = 88 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_FONT = 89 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_LETTER_SPACE = 90 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_LINE_SPACE = 91 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_DECOR = 92 | LV_STYLE_PROP_INHERIT,
|
||||||
|
LV_STYLE_TEXT_ALIGN = 93 | LV_STYLE_PROP_INHERIT,
|
||||||
|
|
||||||
/*Group 6*/
|
/*Group 6*/
|
||||||
LV_STYLE_CONTENT_TEXT = 96 | LV_STYLE_PROP_EXT_DRAW,
|
LV_STYLE_CONTENT_TEXT = 96 | LV_STYLE_PROP_EXT_DRAW,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
*********************/
|
*********************/
|
||||||
#define MY_CLASS &lv_btnmatrix_class
|
#define MY_CLASS &lv_btnmatrix_class
|
||||||
|
|
||||||
#define BTN_EXTRA_CLICK_AREA_MAX (LV_DPI_DEF / 4)
|
#define BTN_EXTRA_CLICK_AREA_MAX (LV_DPI_DEF / 10)
|
||||||
#define LV_BTNMATRIX_WIDTH_MASK 0x0007
|
#define LV_BTNMATRIX_WIDTH_MASK 0x0007
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
@@ -34,7 +34,6 @@
|
|||||||
**********************/
|
**********************/
|
||||||
static void lv_btnmatrix_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
static void lv_btnmatrix_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
static void lv_btnmatrix_destructor(lv_obj_t * obj);
|
static void lv_btnmatrix_destructor(lv_obj_t * obj);
|
||||||
|
|
||||||
static lv_res_t lv_btnmatrix_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
|
static lv_res_t lv_btnmatrix_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
|
||||||
static lv_draw_res_t lv_btnmatrix_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
static lv_draw_res_t lv_btnmatrix_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ static void lv_checkbox_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
LV_LOG_TRACE("lv_checkbox create started");
|
LV_LOG_TRACE("lv_checkbox create started");
|
||||||
|
|
||||||
lv_checkbox_t * cb = (lv_checkbox_t *) obj;
|
lv_checkbox_t * cb = (lv_checkbox_t *) obj;
|
||||||
/*Create the ancestor basic object*/
|
|
||||||
|
|
||||||
/*Init the new checkbox object*/
|
/*Init the new checkbox object*/
|
||||||
if(copy == NULL) {
|
if(copy == NULL) {
|
||||||
@@ -131,15 +130,11 @@ static void lv_checkbox_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
|
|
||||||
static void lv_checkbox_destructor(lv_obj_t * obj)
|
static void lv_checkbox_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
// lv_checkbox_t * bar = obj;
|
lv_checkbox_t * cb = (lv_checkbox_t *) obj;
|
||||||
//
|
if(!cb->static_txt) {
|
||||||
// _lv_obj_reset_style_list_no_refr(obj, LV_PART_INDICATOR);
|
lv_mem_free(cb->txt);
|
||||||
//#if LV_USE_ANIMATION
|
cb->txt = NULL;
|
||||||
// lv_anim_del(&bar->cur_value_anim, NULL);
|
}
|
||||||
// lv_anim_del(&bar->start_value_anim, NULL);
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
// bar->class_p->base_p->destructor(obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_checkbox_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_checkbox_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
@@ -35,12 +35,14 @@
|
|||||||
/**********************
|
/**********************
|
||||||
* STATIC PROTOTYPES
|
* STATIC PROTOTYPES
|
||||||
**********************/
|
**********************/
|
||||||
|
static lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
static void lv_dropdown_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
static void lv_dropdown_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
static void lv_dropdown_destructor(lv_obj_t * obj);
|
static void lv_dropdown_destructor(lv_obj_t * obj);
|
||||||
static lv_draw_res_t lv_dropdown_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
static lv_draw_res_t lv_dropdown_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
||||||
static lv_res_t lv_dropdown_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
|
static lv_res_t lv_dropdown_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
|
||||||
|
|
||||||
static void lv_dropdown_list_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
static void lv_dropdown_list_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t * copy);
|
||||||
|
static void lv_dropdown_list_destructor(lv_obj_t * list_obj);
|
||||||
static lv_draw_res_t lv_dropdown_list_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
static lv_draw_res_t lv_dropdown_list_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode);
|
||||||
static lv_res_t lv_dropdown_list_signal(lv_obj_t * list, lv_signal_t sign, void * param);
|
static lv_res_t lv_dropdown_list_signal(lv_obj_t * list, lv_signal_t sign, void * param);
|
||||||
|
|
||||||
@@ -67,6 +69,7 @@ const lv_obj_class_t lv_dropdown_class = {
|
|||||||
|
|
||||||
const lv_obj_class_t lv_dropdown_list_class = {
|
const lv_obj_class_t lv_dropdown_list_class = {
|
||||||
.constructor_cb = lv_dropdown_list_constructor,
|
.constructor_cb = lv_dropdown_list_constructor,
|
||||||
|
.destructor_cb = lv_dropdown_list_destructor,
|
||||||
.signal_cb = lv_dropdown_list_signal,
|
.signal_cb = lv_dropdown_list_signal,
|
||||||
.draw_cb = lv_dropdown_list_draw,
|
.draw_cb = lv_dropdown_list_draw,
|
||||||
.instance_size = sizeof(lv_dropdown_list_t),
|
.instance_size = sizeof(lv_dropdown_list_t),
|
||||||
@@ -411,9 +414,13 @@ void lv_dropdown_open(lv_obj_t * dropdown_obj)
|
|||||||
|
|
||||||
lv_obj_add_state(dropdown_obj, LV_STATE_CHECKED);
|
lv_obj_add_state(dropdown_obj, LV_STATE_CHECKED);
|
||||||
|
|
||||||
lv_obj_clear_flag(dropdown->list, LV_OBJ_FLAG_HIDDEN);
|
if(dropdown->list == NULL) {
|
||||||
|
lv_obj_t * list_obj = lv_dropdown_list_create(lv_obj_get_screen(dropdown_obj), NULL);
|
||||||
|
((lv_dropdown_list_t*) list_obj)->dropdown = dropdown_obj;
|
||||||
|
dropdown->list = list_obj;
|
||||||
lv_obj_clear_flag(dropdown->list, LV_OBJ_FLAG_CLICK_FOCUSABLE);
|
lv_obj_clear_flag(dropdown->list, LV_OBJ_FLAG_CLICK_FOCUSABLE);
|
||||||
lv_obj_set_parent(dropdown->list, lv_obj_get_screen(dropdown_obj));
|
}
|
||||||
|
|
||||||
/*Set smaller width to the width of the button*/
|
/*Set smaller width to the width of the button*/
|
||||||
if(lv_obj_get_width(dropdown->list) <= lv_obj_get_width(dropdown_obj) &&
|
if(lv_obj_get_width(dropdown->list) <= lv_obj_get_width(dropdown_obj) &&
|
||||||
(dropdown->dir == LV_DIR_TOP || dropdown->dir == LV_DIR_BOTTOM)) {
|
(dropdown->dir == LV_DIR_TOP || dropdown->dir == LV_DIR_BOTTOM)) {
|
||||||
@@ -501,21 +508,14 @@ void lv_dropdown_close(lv_obj_t * obj)
|
|||||||
lv_dropdown_t * dropdown = (lv_dropdown_t *) obj;
|
lv_dropdown_t * dropdown = (lv_dropdown_t *) obj;
|
||||||
|
|
||||||
dropdown->pr_opt_id = LV_DROPDOWN_PR_NONE;
|
dropdown->pr_opt_id = LV_DROPDOWN_PR_NONE;
|
||||||
lv_obj_add_flag(dropdown->list, LV_OBJ_FLAG_HIDDEN);
|
if(dropdown->list) lv_obj_del(dropdown->list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* STATIC FUNCTIONS
|
* STATIC FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
/**
|
static lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent, const lv_obj_t * copy)
|
||||||
* Create a switch objects
|
|
||||||
* @param parent pointer to an object, it will be the parent of the new switch
|
|
||||||
* @param copy DEPRECATED, will be removed in v9.
|
|
||||||
* Pointer to an other switch to copy.
|
|
||||||
* @return pointer to the created switch
|
|
||||||
*/
|
|
||||||
lv_obj_t * lv_dropdown_list_create(lv_obj_t * parent, const lv_obj_t * copy)
|
|
||||||
{
|
{
|
||||||
return lv_obj_create_from_class(&lv_dropdown_list_class, parent, copy);
|
return lv_obj_create_from_class(&lv_dropdown_list_class, parent, copy);
|
||||||
}
|
}
|
||||||
@@ -539,10 +539,6 @@ static void lv_dropdown_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
dropdown->dir = LV_DIR_BOTTOM;
|
dropdown->dir = LV_DIR_BOTTOM;
|
||||||
dropdown->max_height = (3 * lv_disp_get_ver_res(NULL)) / 4;
|
dropdown->max_height = (3 * lv_disp_get_ver_res(NULL)) / 4;
|
||||||
|
|
||||||
lv_obj_t * list_obj = lv_dropdown_list_create(parent, copy);
|
|
||||||
((lv_dropdown_list_t*)list_obj)->dropdown = (lv_obj_t *) dropdown;
|
|
||||||
dropdown->list = list_obj;
|
|
||||||
lv_obj_add_flag(dropdown->list, LV_OBJ_FLAG_HIDDEN);
|
|
||||||
|
|
||||||
if(copy == NULL) {
|
if(copy == NULL) {
|
||||||
lv_obj_set_width(obj, LV_DPX(150));
|
lv_obj_set_width(obj, LV_DPX(150));
|
||||||
@@ -569,24 +565,19 @@ static void lv_dropdown_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
|
|
||||||
static void lv_dropdown_destructor(lv_obj_t * obj)
|
static void lv_dropdown_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
// lv_bar_t * bar = obj;
|
lv_dropdown_t * dropdown = (lv_dropdown_t *) obj;
|
||||||
//
|
|
||||||
// _lv_obj_reset_style_list_no_refr(obj, LV_BAR_PART_INDIC);
|
if(dropdown->list) {
|
||||||
// _lv_obj_reset_style_list_no_refr(sw, LV_PART_KNOB);
|
lv_obj_del(dropdown->list);
|
||||||
//
|
dropdown->list = NULL;
|
||||||
// bar->class_p->base_p->destructor(obj);
|
}
|
||||||
|
|
||||||
|
if(!dropdown->static_txt) {
|
||||||
|
lv_mem_free(dropdown->options);
|
||||||
|
dropdown->options = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the drawing related tasks of the drop down list
|
|
||||||
* @param ddlist pointer to an object
|
|
||||||
* @param clip_area the object will be drawn only in this area
|
|
||||||
* @param mode LV_DRAW_COVER_CHK: only check if the object fully covers the 'mask_p' area
|
|
||||||
* (return 'true' if yes)
|
|
||||||
* LV_DRAW_DRAW: draw the object (always return 'true')
|
|
||||||
* LV_DRAW_DRAW_POST: drawing after every children are drawn
|
|
||||||
* @param return an element of `lv_draw_res_t`
|
|
||||||
*/
|
|
||||||
static lv_draw_res_t lv_dropdown_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_dropdown_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
{
|
{
|
||||||
/*Return false if the object is not covers the mask_p area*/
|
/*Return false if the object is not covers the mask_p area*/
|
||||||
@@ -775,13 +766,14 @@ static void lv_dropdown_list_constructor(lv_obj_t * obj, lv_obj_t * parent, cons
|
|||||||
lv_label_create(obj, NULL);
|
lv_label_create(obj, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void lv_dropdown_list_destructor(lv_obj_t * list_obj)
|
||||||
* Signal function of the drop down list
|
{
|
||||||
* @param ddlist pointer to a drop down list object
|
lv_dropdown_list_t * list = (lv_dropdown_list_t *)list_obj;
|
||||||
* @param sign a signal type from lv_signal_t enum
|
lv_obj_t * dropdown_obj = list->dropdown;
|
||||||
* @param param pointer to a signal specific variable
|
lv_dropdown_t * dropdown = (lv_dropdown_t *) dropdown_obj;
|
||||||
* @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted
|
dropdown->list = NULL;
|
||||||
*/
|
}
|
||||||
|
|
||||||
static lv_res_t lv_dropdown_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
static lv_res_t lv_dropdown_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
||||||
{
|
{
|
||||||
lv_res_t res;
|
lv_res_t res;
|
||||||
@@ -812,7 +804,7 @@ static lv_res_t lv_dropdown_signal(lv_obj_t * obj, lv_signal_t sign, void * para
|
|||||||
else if(sign == LV_SIGNAL_RELEASED) {
|
else if(sign == LV_SIGNAL_RELEASED) {
|
||||||
lv_indev_t * indev = lv_indev_get_act();
|
lv_indev_t * indev = lv_indev_get_act();
|
||||||
if(lv_indev_get_scroll_obj(indev) == NULL) {
|
if(lv_indev_get_scroll_obj(indev) == NULL) {
|
||||||
if(!lv_obj_has_flag(dropdown->list, LV_OBJ_FLAG_HIDDEN)) {
|
if(dropdown->list) {
|
||||||
lv_dropdown_close(obj);
|
lv_dropdown_close(obj);
|
||||||
if(dropdown->sel_opt_id_orig != dropdown->sel_opt_id) {
|
if(dropdown->sel_opt_id_orig != dropdown->sel_opt_id) {
|
||||||
dropdown->sel_opt_id_orig = dropdown->sel_opt_id;
|
dropdown->sel_opt_id_orig = dropdown->sel_opt_id;
|
||||||
|
|||||||
@@ -401,11 +401,12 @@ static void lv_img_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj_t
|
|||||||
|
|
||||||
static void lv_img_destructor(lv_obj_t * obj)
|
static void lv_img_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
// if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
lv_img_t * img = (lv_img_t *)obj;
|
||||||
// lv_mem_free(img->src);
|
if(img->src_type == LV_IMG_SRC_FILE || img->src_type == LV_IMG_SRC_SYMBOL) {
|
||||||
// img->src = NULL;
|
lv_mem_free(img->src);
|
||||||
// img->src_type = LV_IMG_SRC_UNKNOWN;
|
img->src = NULL;
|
||||||
// }
|
img->src_type = LV_IMG_SRC_UNKNOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_img_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_img_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
@@ -234,18 +234,23 @@ static void lv_meter_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_obj
|
|||||||
|
|
||||||
static void lv_meter_destructor(lv_obj_t * obj)
|
static void lv_meter_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
|
lv_meter_t * meter = (lv_meter_t *)obj;
|
||||||
|
lv_meter_scale_t * scale;
|
||||||
|
scale = _lv_ll_get_head(&meter->scale_ll);
|
||||||
|
while(scale) {
|
||||||
|
lv_meter_indicator_t * indicator = _lv_ll_get_head(&scale->indicator_ll);
|
||||||
|
while(indicator) {
|
||||||
|
_lv_ll_remove(&scale->indicator_ll, indicator);
|
||||||
|
lv_mem_free(indicator);
|
||||||
|
indicator = _lv_ll_get_head(&scale->indicator_ll);
|
||||||
|
}
|
||||||
|
_lv_ll_remove(&meter->scale_ll, scale);
|
||||||
|
lv_mem_free(scale);
|
||||||
|
scale = _lv_ll_get_head(&meter->scale_ll);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Handle the drawing related tasks of the line meters
|
|
||||||
* @param lmeter pointer to an object
|
|
||||||
* @param clip_area the object will be drawn only in this area
|
|
||||||
* @param mode LV_DRAW_COVER_CHK: only check if the object fully covers the 'mask_p' area
|
|
||||||
* (return 'true' if yes)
|
|
||||||
* LV_DRAW_DRAW: draw the object (always return 'true')
|
|
||||||
* LV_DRAW_DRAW_POST: drawing after every children are drawn
|
|
||||||
* @param return an element of `lv_draw_res_t`
|
|
||||||
*/
|
|
||||||
static lv_draw_res_t lv_meter_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_meter_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
{
|
{
|
||||||
/*Return false if the object is not covers the mask_p area*/
|
/*Return false if the object is not covers the mask_p area*/
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ const lv_obj_class_t lv_roller_class = {
|
|||||||
.signal_cb = lv_roller_signal,
|
.signal_cb = lv_roller_signal,
|
||||||
.draw_cb = lv_roller_draw,
|
.draw_cb = lv_roller_draw,
|
||||||
.instance_size = sizeof(lv_roller_t),
|
.instance_size = sizeof(lv_roller_t),
|
||||||
|
.editable = LV_OBJ_CLASS_EDITABLE_TRUE,
|
||||||
.base_class = &lv_obj_class
|
.base_class = &lv_obj_class
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ const lv_obj_class_t lv_roller_label_class = {
|
|||||||
.draw_cb = lv_roller_label_draw,
|
.draw_cb = lv_roller_label_draw,
|
||||||
.instance_size = sizeof(lv_label_t),
|
.instance_size = sizeof(lv_label_t),
|
||||||
.base_class = &lv_label_class
|
.base_class = &lv_label_class
|
||||||
};;
|
};
|
||||||
|
|
||||||
/**********************
|
/**********************
|
||||||
* MACROS
|
* MACROS
|
||||||
@@ -299,7 +300,7 @@ static void lv_roller_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_ob
|
|||||||
|
|
||||||
lv_obj_create_from_class(&lv_roller_label_class, obj, NULL);
|
lv_obj_create_from_class(&lv_roller_label_class, obj, NULL);
|
||||||
lv_roller_set_options(obj, "Option 1\nOption 2\nOption 3\nOption 4\nOption 5", LV_ROLLER_MODE_NORMAL);
|
lv_roller_set_options(obj, "Option 1\nOption 2\nOption 3\nOption 4\nOption 5", LV_ROLLER_MODE_NORMAL);
|
||||||
lv_roller_set_visible_row_count(obj, 3);
|
lv_obj_set_height(obj, LV_DPI_DEF);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lv_obj_create_from_class(&lv_roller_label_class, obj, NULL);
|
lv_obj_create_from_class(&lv_roller_label_class, obj, NULL);
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ static lv_res_t lv_switch_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
|||||||
if(res != LV_RES_OK) return res;
|
if(res != LV_RES_OK) return res;
|
||||||
|
|
||||||
|
|
||||||
else if(sign == LV_SIGNAL_REFR_EXT_DRAW_SIZE) {
|
if(sign == LV_SIGNAL_REFR_EXT_DRAW_SIZE) {
|
||||||
lv_coord_t knob_left = lv_obj_get_style_pad_left(obj, LV_PART_KNOB);
|
lv_coord_t knob_left = lv_obj_get_style_pad_left(obj, LV_PART_KNOB);
|
||||||
lv_coord_t knob_right = lv_obj_get_style_pad_right(obj, LV_PART_KNOB);
|
lv_coord_t knob_right = lv_obj_get_style_pad_right(obj, LV_PART_KNOB);
|
||||||
lv_coord_t knob_top = lv_obj_get_style_pad_top(obj, LV_PART_KNOB);
|
lv_coord_t knob_top = lv_obj_get_style_pad_top(obj, LV_PART_KNOB);
|
||||||
@@ -199,6 +199,8 @@ static lv_res_t lv_switch_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
|||||||
|
|
||||||
knob_size += lv_obj_calculate_ext_draw_size(obj, LV_PART_KNOB);
|
knob_size += lv_obj_calculate_ext_draw_size(obj, LV_PART_KNOB);
|
||||||
|
|
||||||
|
knob_size = (knob_size - lv_obj_get_height(obj)) / 2;
|
||||||
|
|
||||||
lv_coord_t * s = param;
|
lv_coord_t * s = param;
|
||||||
*s = LV_MAX(*s, knob_size);
|
*s = LV_MAX(*s, knob_size);
|
||||||
*s = LV_MAX(*s, lv_obj_calculate_ext_draw_size(obj, LV_PART_INDICATOR));
|
*s = LV_MAX(*s, lv_obj_calculate_ext_draw_size(obj, LV_PART_INDICATOR));
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ const lv_obj_class_t lv_textarea_class = {
|
|||||||
.destructor_cb = lv_textarea_destructor,
|
.destructor_cb = lv_textarea_destructor,
|
||||||
.signal_cb = lv_textarea_signal,
|
.signal_cb = lv_textarea_signal,
|
||||||
.draw_cb = lv_textarea_draw,
|
.draw_cb = lv_textarea_draw,
|
||||||
.editable = LV_OBJ_CLASS_EDITABLE_TRUE,
|
|
||||||
.instance_size = sizeof(lv_textarea_t),
|
.instance_size = sizeof(lv_textarea_t),
|
||||||
.base_class = &lv_obj_class
|
.base_class = &lv_obj_class
|
||||||
};
|
};
|
||||||
@@ -992,7 +991,7 @@ static void lv_textarea_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(copy_ta->pwd_tmp) {
|
if(copy_ta->pwd_tmp) {
|
||||||
uint32_t len = lv_mem_get_size(copy_ta->pwd_tmp);
|
uint32_t len = strlen(copy_ta->pwd_tmp) + 1;
|
||||||
ta->pwd_tmp = lv_mem_alloc(len);
|
ta->pwd_tmp = lv_mem_alloc(len);
|
||||||
LV_ASSERT_MALLOC(ta->pwd_tmp);
|
LV_ASSERT_MALLOC(ta->pwd_tmp);
|
||||||
if(ta->pwd_tmp == NULL) return;
|
if(ta->pwd_tmp == NULL) return;
|
||||||
@@ -1010,17 +1009,16 @@ static void lv_textarea_constructor(lv_obj_t * obj, lv_obj_t * parent, const lv_
|
|||||||
|
|
||||||
static void lv_textarea_destructor(lv_obj_t * obj)
|
static void lv_textarea_destructor(lv_obj_t * obj)
|
||||||
{
|
{
|
||||||
// else if(sign == LV_SIGNAL_CLEANUP) {
|
|
||||||
// if(ta->pwd_tmp != NULL) lv_mem_free(ta->pwd_tmp);
|
lv_textarea_t * ta = (lv_textarea_t *) obj;
|
||||||
// if(ta->placeholder_txt != NULL) lv_mem_free(ta->placeholder_txt);
|
if(ta->pwd_tmp != NULL) {
|
||||||
//
|
lv_mem_free(ta->pwd_tmp);
|
||||||
// ta->pwd_tmp = NULL;
|
ta->pwd_tmp = NULL;
|
||||||
// ta->placeholder_txt = NULL;
|
}
|
||||||
//
|
if(ta->placeholder_txt != NULL) {
|
||||||
// _lv_obj_reset_style_list_no_refr(obj, LV_PART_MARKER);
|
lv_mem_free(ta->placeholder_txt);
|
||||||
// _lv_obj_reset_style_list_no_refr(obj, LV_TEXTAREA_PART_PLACEHOLDER);
|
ta->placeholder_txt = NULL;
|
||||||
//
|
}
|
||||||
// /* (The created label will be deleted automatically) */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static lv_draw_res_t lv_textarea_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
static lv_draw_res_t lv_textarea_draw(lv_obj_t * obj, const lv_area_t * clip_area, lv_draw_mode_t mode)
|
||||||
|
|||||||
Reference in New Issue
Block a user