├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README-en.md ├── README.md ├── examples ├── CMakeLists.txt ├── helloworld │ ├── main.c │ └── page │ │ ├── page1 │ │ ├── page1.c │ │ └── page1.h │ │ └── page2 │ │ ├── page2.c │ │ └── page2.h ├── popup │ ├── main.c │ └── page │ │ ├── page1 │ │ ├── page1.c │ │ └── page1.h │ │ └── popup │ │ ├── CLOSE.c │ │ ├── popup.c │ │ └── popup.h └── target_self │ ├── main.c │ └── page │ ├── page1 │ ├── page1.c │ └── page1.h │ └── page2 │ ├── page2.c │ └── page2.h └── src ├── anima.c ├── anima.h ├── pm.c ├── pm.h ├── pm_utils.c └── pm_utils.h /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .DS_Store 3 | .vscode -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lvgl-simulator-x"] 2 | path = lvgl-simulator-x 3 | url = git@github.com:LanFly/lvgl-simulator-x.git 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | if(NOT ESP_PLATFORM) 4 | project(pm) 5 | endif() 6 | 7 | file(GLOB_RECURSE SOURCES src/*.c) 8 | 9 | if(ESP_PLATFORM) 10 | idf_component_register(SRCS ${SOURCES} 11 | INCLUDE_DIRS src 12 | REQUIRES lvgl) 13 | else() 14 | include_directories(src) 15 | 16 | add_library(pm STATIC ${SOURCES}) 17 | endif() 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 sudo (https://timor.tech) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README-en.md: -------------------------------------------------------------------------------- 1 | # LVGL-PM 2 | 3 | ![version v0.1.1](https://img.shields.io/badge/version-v0.1.1-brightgreen) 4 | ![license MIT](https://img.shields.io/badge/license-MIT-green) 5 | 6 | **[【中文文档】](./README.md)** 7 | 8 | A simple page manager for LVGL. 9 | 10 | ## Features 11 | 12 | simple and easy to use. 13 | 14 | - Page lifecycle management 15 | - Support transition animation 16 | 17 | ## Example 18 | 19 | ```c 20 | #include "pm.h" 21 | 22 | void main() 23 | { 24 | lv_pm_init(); 25 | 26 | lv_pm_page_t *home = lv_pm_create_page(0); 27 | page->onLoad = page_home_onLoad; // you should implement this function 28 | page->unLoad = page_home_unLoad; // you should implement this function 29 | 30 | lv_pm_open_page(0, NULL); 31 | } 32 | ``` 33 | 34 | ## Write a page 35 | 36 | ```c 37 | // home.c 38 | 39 | #include "home.h" 40 | 41 | void page_home_onLoad(lv_obj_t *page) 42 | { 43 | lv_obj_t *label = lv_label_create(page); 44 | lv_label_set_text(label, "hello home page"); 45 | } 46 | 47 | void page_home_unLoad(lv_obj_t *page) 48 | { 49 | // all children of page will be deleted automatically. 50 | } 51 | ``` 52 | 53 | ## API 54 | 55 | **uint8_t lv_pm_init()** 56 | 57 | This function muse be called before using LVGL-PM. 58 | 59 | return 0 is OK. 60 | 61 | **lv_pm_page_t \*lv_pm_create_page(uint8_t id)** 62 | 63 | Create a page and specify an ID. The ID is used for lv_pm_open_page API. 64 | 65 | There are 2 lifecycle that must be registered: 66 | 67 | 1. onLoad 68 | 2. unLoad 69 | 70 | **uint8_t lv_pm_open_page(uint8_t id, lv_pm_open_options_t \*behavior)** 71 | 72 | Open the page according to the specified ID. 73 | 74 | > Warning: A specified page ID can only be opened once at time. In the future version, we will support multi page instances. 75 | 76 | **uint8_t lv_pm_back()** 77 | 78 | Close the current page and display the previous page. Do nothing if there is only one page or nothing. 79 | 80 | ## Lifecycle 81 | 82 | 1. onLoad 83 | 2. willAppear 84 | 3. didAppear 85 | 4. willDisappear 86 | 5. didDisappear 87 | 6. unLoad 88 | 89 | ## buildin animation 90 | 91 | - LV_PM_ANIMA_NONE (support) 92 | - LV_PM_ANIMA_SLIDE (support) 93 | - LV_PM_ANIMA_SLIDE_SCALE (not yet) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LVGL-PM 2 | 3 | ![version v0.1.1](https://img.shields.io/badge/version-v0.1.1-brightgreen) 4 | ![license MIT](https://img.shields.io/badge/license-MIT-green) 5 | 6 | **[English Document](./README-en.md)** 7 | 8 | 一个为 LVGL 精心定制的 APP 页面管理器,简单易用,功能强大,支持多种酷炫动画 9 | 10 | ## 特性 11 | 12 | 简单、易用、强大 13 | 14 | - 支持页面全生命周期管理,参考手机 APP 生命周期 15 | - 支持多种酷炫动画,内置集成 16 | - 多个页面代码隔离,单文件开发体验 17 | 18 | ## 使用示例 19 | 20 | ```c 21 | #include "pm.h" 22 | 23 | void main() 24 | { 25 | lv_pm_init(); 26 | 27 | lv_pm_page_t *home = lv_pm_create_page(0); 28 | page->onLoad = page_home_onLoad; // 需要你实现的页面函数 29 | page->unLoad = page_home_unLoad; // 需要你实现的页面函数 30 | 31 | lv_pm_open_page(0, NULL); 32 | } 33 | ``` 34 | 35 | ## 编写页面 36 | 37 | ```c 38 | // home.c 39 | 40 | #include "home.h" 41 | 42 | void page_home_onLoad(lv_obj_t *page) 43 | { 44 | // 所有对象都挂载在 page 下面,页面管理器会自动帮你管理内存 45 | lv_obj_t *label = lv_label_create(page); 46 | lv_label_set_text(label, "hello home page"); 47 | } 48 | 49 | void page_home_unLoad(lv_obj_t *page) 50 | { 51 | // onLoad 和 unLoad 必须实现,所有挂载在 page 下的对象都会自动释放 52 | // 你只需要释放自己申请的内存 53 | } 54 | ``` 55 | 56 | ## 可运行的例程 57 | 58 | 在 examples 下自带了可运行的例程,你可以通过下面的命令编译并运行: 59 | 60 | 1. 确保 Git Submodule 都下载下来了,注意有2个,你需要在`根目录`和`lvgl-simulator-x`都执行一遍 `git submodule update --init` 61 | 2. 创建 `build` 文件夹并进入 62 | 3. 执行 `cmake ../examples` 63 | 4. 执行 `make` 64 | 5. 运行 `./lvgl-pm-demo` 65 | 66 | 默认运行的是 helloworld,你可以在 `examples/CMakeLists.txt` 文件开头设置不同的目录名来运行不同的例程 67 | 68 | ## API 69 | 70 | ### uint8_t lv_pm_init() 71 | -------------------------- 72 | 73 | 这个函数必须在使用任何页面管理器 API 之前调用 74 | 75 | 返回 0 表示 OK,其它值表示错误,你需要自己处理错误 76 | 77 | ### lv_pm_page_t \*lv_pm_create_page(uint8_t id) 78 | -------------------------- 79 | 80 | 创建一个路由并且指定路由标识 ID,这个 ID 在打开页面时会用到,必须唯一。 81 | 82 | 一般 ID 从下标 0 开始,你可以按照页面的顺序来分配 ID 83 | 84 | > 注意:默认路由表长度是 10,所以你不能使用超过长度的 ID 值,如果大于 10,你可以使用 `#define LV_PM_PAGE_NUM 20` 指定长度 85 | 86 | 创建好路由后,你可以注册页面的生命周期函数了,此时并不会真正的创建页面 87 | 88 | 下面 2 个生命周期是必须实现的: 89 | 90 | 1. onLoad 91 | 2. unLoad 92 | 93 | ### uint8_t lv_pm_open_page(uint8_t id, lv_pm_open_options_t \*behavior) 94 | -------------------------- 95 | 96 | 根据指定的路由 ID 打开页面,此时会调用 onLoad 真正创建页面 97 | 98 | 参数 `behavior`:指定打开页面的行为,过渡动画,打开方式,动画方向。默认为 `NULL` 99 | 100 | > 注意:为了页面代码简单,我们并没有实现多实例。所以一个路由 ID 同时只能被打开一次,打开 2 次以上的行为是未定义的,会产生不可预期的错误 101 | > 在未来的版本中,我们会支持页面多实例 102 | 103 | 示例: 104 | ```c 105 | #include "pm.h" 106 | 107 | lv_pm_open_options_t options = { 108 | .animation = LV_PM_ANIMA_SLIDE // 使用滑动动画打开页面 109 | }; 110 | 111 | lv_pm_open_page(0, &options); 112 | // 或者使用默认行为 lv_pm_open_page(0, NULL); 113 | ``` 114 | 115 | ### uint8_t lv_pm_back() 116 | -------------------------- 117 | 118 | 关闭当前页面并且显示上一个页面。如果当前只有一个页面或者没有打开页面,则此函数什么也不做 119 | 120 | ## 新页面的打开方式 121 | 122 | 1. [x] LV_PM_TARGET_NEW : 打开一个新的页面 123 | 2. [x] LV_PM_TARGET_SELF : 在当前页面中打开(先关闭当前页面,再打开新页面) 124 | 3. [ ] LV_PM_TARGET_RESET : 只打开一个当前页面(先关闭所有页面,再打开新页面) 125 | 126 | ## 完整的生命周期 127 | 128 | 1. onLoad : 页面创建,你可以在这里执行初始化 129 | 2. willAppear : 页面即将被展示 130 | 3. didAppear : 页面已经被完整展示 131 | 4. willDisappear : 页面即将被隐藏 132 | 5. didDisappear : 页面已经被隐藏不可见 133 | 6. unLoad : 页面被关闭,你需要在这里释放所有临时内存,否则可能存在泄漏 134 | 135 | ## 内置过渡动画 136 | 137 | - [x] LV_PM_ANIMA_NONE: 不使用过渡动画 138 | - [x] LV_PM_ANIMA_SLIDE: 滑动动画,页面从右往左出现,从左往右消失 139 | - [ ] LV_PM_ANIMA_SLIDE_SCALE: 滑动并缩放页面,页面从右往左先出现,再放大全屏 140 | - [ ] 更多动画开发中,欢迎贡献代码,开发过渡动画非常简单 -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(demo helloworld) 2 | set(lvgl_sim_x ../lvgl-simulator-x) 3 | 4 | cmake_minimum_required(VERSION 3.5) 5 | set(PROJECT_NAME lvgl-pm-demo) 6 | 7 | project(${PROJECT_NAME}) 8 | 9 | file(GLOB_RECURSE lvgl_SRCS ${demo}/*.c) 10 | aux_source_directory(../src pm_SRCS) 11 | 12 | include_directories(${lvgl_sim_x}) 13 | include_directories(../src) 14 | 15 | add_executable(${PROJECT_NAME} ${lvgl_SRCS} ${pm_SRCS}) 16 | 17 | target_include_directories(${PROJECT_NAME} PUBLIC ${demo}) 18 | 19 | add_subdirectory(${lvgl_sim_x} lvgl-sim-x) 20 | 21 | target_link_libraries(${PROJECT_NAME} lvgl-sim) 22 | -------------------------------------------------------------------------------- /examples/helloworld/main.c: -------------------------------------------------------------------------------- 1 | #include "pm.h" 2 | 3 | #include "page/page1/page1.h" 4 | #include "page/page2/page2.h" 5 | 6 | lv_pm_open_options_t options = { 7 | .animation = LV_PM_ANIMA_SLIDE 8 | }; 9 | 10 | bool open = false; 11 | void timer_cb(lv_timer_t *timer) 12 | { 13 | if (open) { 14 | lv_pm_back(); 15 | open = false; 16 | } else { 17 | lv_pm_open_page(1, &options); 18 | open = true; 19 | } 20 | } 21 | 22 | void app_start() 23 | { 24 | lv_pm_init(); 25 | 26 | lv_pm_page_t *page1 = lv_pm_create_page(0); 27 | page1->onLoad = page_page1_onLoad; 28 | page1->unLoad = page_page1_unLoad; 29 | 30 | lv_pm_page_t *page2 = lv_pm_create_page(1); 31 | page2->onLoad = page_page2_onLoad; 32 | page2->unLoad = page_page2_unLoad; 33 | 34 | lv_pm_open_page(0, &options); 35 | lv_timer_create(timer_cb, 1000, NULL); 36 | } 37 | -------------------------------------------------------------------------------- /examples/helloworld/page/page1/page1.c: -------------------------------------------------------------------------------- 1 | #include "page1.h" 2 | 3 | #include 4 | 5 | void page_page1_onLoad(lv_obj_t *page) 6 | { 7 | printf("lifecycle: page1 onLoad\n"); 8 | lv_obj_set_style_bg_color(page, lv_color_make(237, 175, 5), LV_STATE_DEFAULT); 9 | lv_obj_t *label = lv_label_create(page); 10 | lv_label_set_text(label, "hello page1"); 11 | lv_obj_center(label); 12 | } 13 | 14 | void page_page1_unLoad(lv_obj_t *page) 15 | { 16 | printf("lifecycle: page1 unLoad\n"); 17 | } -------------------------------------------------------------------------------- /examples/helloworld/page/page1/page1.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_page1_onLoad(lv_obj_t *page); 4 | void page_page1_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /examples/helloworld/page/page2/page2.c: -------------------------------------------------------------------------------- 1 | #include "page2.h" 2 | 3 | #include 4 | 5 | void page_page2_onLoad(lv_obj_t *page) 6 | { 7 | printf("lifecycle: page2 onLoad\n"); 8 | lv_obj_set_style_bg_color(page, lv_color_make(150, 199, 4), LV_STATE_DEFAULT); 9 | lv_obj_t *label = lv_label_create(page); 10 | lv_label_set_text(label, "hello page2"); 11 | lv_obj_center(label); 12 | } 13 | 14 | void page_page2_unLoad(lv_obj_t *page) 15 | { 16 | printf("lifecycle: page2 unLoad\n"); 17 | } -------------------------------------------------------------------------------- /examples/helloworld/page/page2/page2.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_page2_onLoad(lv_obj_t *page); 4 | void page_page2_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /examples/popup/main.c: -------------------------------------------------------------------------------- 1 | #include "pm.h" 2 | 3 | #include "page/page1/page1.h" 4 | #include "page/popup/popup.h" 5 | 6 | lv_pm_open_options_t options = { 7 | .animation = LV_PM_ANIMA_SLIDE 8 | }; 9 | 10 | lv_pm_open_options_t popupOptions = { 11 | .animation = LV_PM_ANIMA_POPUP 12 | }; 13 | 14 | bool open = false; 15 | void timer_cb(lv_timer_t *timer) 16 | { 17 | if (open) { 18 | lv_pm_back(); 19 | open = false; 20 | } else { 21 | lv_pm_open_page(1, &popupOptions); 22 | open = true; 23 | } 24 | } 25 | 26 | void app_start() 27 | { 28 | lv_pm_init(); 29 | 30 | lv_pm_page_t *page1 = lv_pm_create_page(0); 31 | page1->onLoad = page_page1_onLoad; 32 | page1->unLoad = page_page1_unLoad; 33 | 34 | lv_pm_page_t *popup = lv_pm_create_page(1); 35 | popup->onLoad = page_popup_onLoad; 36 | popup->unLoad = page_popup_unLoad; 37 | 38 | lv_pm_open_page(0, &options); 39 | lv_timer_create(timer_cb, 1000, NULL); 40 | } 41 | -------------------------------------------------------------------------------- /examples/popup/page/page1/page1.c: -------------------------------------------------------------------------------- 1 | #include "page1.h" 2 | 3 | #include 4 | 5 | void page_page1_onLoad(lv_obj_t *page) 6 | { 7 | printf("lifecycle: page1 onLoad\n"); 8 | lv_obj_set_style_bg_color(page, lv_color_make(237, 175, 5), LV_STATE_DEFAULT); 9 | lv_obj_t *label = lv_label_create(page); 10 | lv_label_set_text(label, "hello page1"); 11 | lv_obj_center(label); 12 | } 13 | 14 | void page_page1_unLoad(lv_obj_t *page) 15 | { 16 | printf("lifecycle: page1 unLoad\n"); 17 | } -------------------------------------------------------------------------------- /examples/popup/page/page1/page1.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_page1_onLoad(lv_obj_t *page); 4 | void page_page1_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /examples/popup/page/popup/CLOSE.c: -------------------------------------------------------------------------------- 1 | #if defined(LV_LVGL_H_INCLUDE_SIMPLE) 2 | #include "lvgl.h" 3 | #else 4 | #include "lvgl/lvgl.h" 5 | #endif 6 | 7 | 8 | #ifndef LV_ATTRIBUTE_MEM_ALIGN 9 | #define LV_ATTRIBUTE_MEM_ALIGN 10 | #endif 11 | 12 | #ifndef LV_ATTRIBUTE_IMG_CLOSE 13 | #define LV_ATTRIBUTE_IMG_CLOSE 14 | #endif 15 | 16 | const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CLOSE uint8_t CLOSE_map[] = { 17 | #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 18 | /*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/ 19 | 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, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0d, 0xff, 0x40, 0xff, 0x73, 0xff, 0xa6, 0xff, 0xa6, 0xff, 0x73, 0xff, 0x40, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x55, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 25 | 0x00, 0x00, 0xff, 0x0c, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0x0c, 0x00, 0x00, 26 | 0x00, 0x00, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 27 | 0x00, 0x00, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0xff, 0x87, 0xff, 0x87, 0x00, 0x00, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 28 | 0x00, 0x00, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 29 | 0x00, 0x00, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 30 | 0x00, 0x00, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0xff, 0x87, 0xff, 0x87, 0x00, 0x00, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 31 | 0x00, 0x00, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 32 | 0x00, 0x00, 0xff, 0x0c, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0x0c, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x55, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0d, 0xff, 0x40, 0xff, 0x73, 0xff, 0xa6, 0xff, 0xa6, 0xff, 0x73, 0xff, 0x40, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 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, 39 | #endif 40 | #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0 41 | /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit*/ 42 | 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, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xff, 0xff, 0x40, 0xff, 0xff, 0x73, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xa6, 0xff, 0xff, 0x73, 0xff, 0xff, 0x40, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xff, 0xff, 0x40, 0xff, 0xff, 0x73, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xa6, 0xff, 0xff, 0x73, 0xff, 0xff, 0x40, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 61 | 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, 62 | #endif 63 | #if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0 64 | /*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 color bytes are swapped*/ 65 | 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, 66 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xff, 0xff, 0x40, 0xff, 0xff, 0x73, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xa6, 0xff, 0xff, 0x73, 0xff, 0xff, 0x40, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 68 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 69 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 71 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 72 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 73 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 74 | 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 75 | 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 76 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 77 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 78 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 79 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 80 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 81 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 82 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 83 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xff, 0xff, 0x40, 0xff, 0xff, 0x73, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xa6, 0xff, 0xff, 0x73, 0xff, 0xff, 0x40, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 84 | 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, 85 | #endif 86 | #if LV_COLOR_DEPTH == 32 87 | 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0d, 0xff, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 93 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 94 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 0x00, 95 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 0x00, 96 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 0x00, 97 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x88, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x00, 0x00, 0x00, 0x00, 98 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x68, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x99, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x87, 0xff, 0xff, 0xff, 0x87, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x99, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x00, 0x00, 99 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x95, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x95, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3a, 0x00, 0x00, 0x00, 0x00, 100 | 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa7, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x76, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xb4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0d, 0xff, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xff, 0xa6, 0xff, 0xff, 0xff, 0x73, 0xff, 0xff, 0xff, 0x40, 0xff, 0xff, 0xff, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 106 | 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 | #endif 108 | }; 109 | 110 | const lv_img_dsc_t CLOSE = { 111 | .header.cf = LV_IMG_CF_TRUE_COLOR_ALPHA, 112 | .header.always_zero = 0, 113 | .header.reserved = 0, 114 | .header.w = 20, 115 | .header.h = 20, 116 | .data_size = 400 * LV_IMG_PX_SIZE_ALPHA_BYTE, 117 | .data = CLOSE_map, 118 | }; 119 | -------------------------------------------------------------------------------- /examples/popup/page/popup/popup.c: -------------------------------------------------------------------------------- 1 | #include "popup.h" 2 | 3 | #include 4 | 5 | #include "CLOSE.c" 6 | 7 | void page_popup_onLoad(lv_obj_t *page) 8 | { 9 | printf("lifecycle: popup onLoad\n"); 10 | lv_obj_set_style_bg_color(page, lv_color_make(150, 199, 4), LV_STATE_DEFAULT); 11 | lv_obj_t *label = lv_label_create(page); 12 | lv_label_set_text(label, "hello popup page"); 13 | lv_obj_center(label); 14 | lv_obj_t *close = lv_img_create(page); 15 | lv_img_set_src(close, &CLOSE); 16 | lv_obj_set_x(close, 216); 17 | lv_obj_set_y(close, 5); 18 | } 19 | 20 | void page_popup_unLoad(lv_obj_t *page) 21 | { 22 | printf("lifecycle: popup unLoad\n"); 23 | } -------------------------------------------------------------------------------- /examples/popup/page/popup/popup.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_popup_onLoad(lv_obj_t *page); 4 | void page_popup_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /examples/target_self/main.c: -------------------------------------------------------------------------------- 1 | #include "pm.h" 2 | #include 3 | 4 | #include "page/page1/page1.h" 5 | #include "page/page2/page2.h" 6 | 7 | lv_pm_open_options_t options = { 8 | .animation = LV_PM_ANIMA_SLIDE 9 | }; 10 | 11 | lv_pm_open_options_t options_self = { 12 | .animation = LV_PM_ANIMA_SLIDE, 13 | .target = LV_PM_TARGET_SELF 14 | }; 15 | 16 | uint8_t page_id = 1; 17 | void timer_cb(lv_timer_t *timer) 18 | { 19 | printf("open page: %d\n", page_id); 20 | lv_pm_open_page(page_id, &options_self); 21 | 22 | if (page_id == 1) { 23 | page_id = 0; 24 | } else { 25 | page_id = 1; 26 | } 27 | } 28 | 29 | void app_start() 30 | { 31 | lv_pm_init(); 32 | 33 | lv_pm_page_t *page1 = lv_pm_create_page(0); 34 | page1->onLoad = page_page1_onLoad; 35 | page1->unLoad = page_page1_unLoad; 36 | 37 | lv_pm_page_t *page2 = lv_pm_create_page(1); 38 | page2->onLoad = page_page2_onLoad; 39 | page2->unLoad = page_page2_unLoad; 40 | 41 | printf("start\n"); 42 | lv_pm_open_page(0, &options); 43 | lv_timer_create(timer_cb, 5000, NULL); 44 | } 45 | -------------------------------------------------------------------------------- /examples/target_self/page/page1/page1.c: -------------------------------------------------------------------------------- 1 | #include "page1.h" 2 | 3 | #include 4 | 5 | void page_page1_onLoad(lv_obj_t *page) 6 | { 7 | printf("lifecycle: page1 onLoad\n"); 8 | lv_obj_set_style_bg_color(page, lv_color_make(237, 175, 5), LV_STATE_DEFAULT); 9 | lv_obj_t *label = lv_label_create(page); 10 | lv_label_set_text(label, "hello page1"); 11 | lv_obj_center(label); 12 | } 13 | 14 | void page_page1_unLoad(lv_obj_t *page) 15 | { 16 | printf("lifecycle: page1 unLoad\n"); 17 | } -------------------------------------------------------------------------------- /examples/target_self/page/page1/page1.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_page1_onLoad(lv_obj_t *page); 4 | void page_page1_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /examples/target_self/page/page2/page2.c: -------------------------------------------------------------------------------- 1 | #include "page2.h" 2 | 3 | #include 4 | 5 | void page_page2_onLoad(lv_obj_t *page) 6 | { 7 | printf("lifecycle: page2 onLoad\n"); 8 | lv_obj_set_style_bg_color(page, lv_color_make(150, 199, 4), LV_STATE_DEFAULT); 9 | lv_obj_t *label = lv_label_create(page); 10 | lv_label_set_text(label, "hello page2"); 11 | lv_obj_center(label); 12 | } 13 | 14 | void page_page2_unLoad(lv_obj_t *page) 15 | { 16 | printf("lifecycle: page2 unLoad\n"); 17 | } -------------------------------------------------------------------------------- /examples/target_self/page/page2/page2.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | void page_page2_onLoad(lv_obj_t *page); 4 | void page_page2_unLoad(lv_obj_t *page); -------------------------------------------------------------------------------- /src/anima.c: -------------------------------------------------------------------------------- 1 | #include "anima.h" 2 | #include "pm.h" 3 | 4 | #include "lvgl.h" 5 | #include 6 | 7 | #define POPUP_TOP_HEIGHT 15 8 | 9 | 10 | lv_anim_t appear_anima; 11 | lv_anim_t disAppear_anima; 12 | 13 | typedef struct _lv_pm_anima_data { 14 | lv_pm_page_t *pm_page; 15 | lv_pm_anima_complete_cb cb; 16 | lv_pm_open_options_t options; 17 | } lv_pm_anima_data; 18 | 19 | static void translateX_anima_cb(void *var, int32_t v) 20 | { 21 | lv_obj_set_x(var, v); 22 | } 23 | 24 | static void translateY_anima_cb(void *var, int32_t v) 25 | { 26 | lv_obj_set_y(var, v); 27 | } 28 | 29 | static void anima_ready_cb(lv_anim_t *anim) 30 | { 31 | lv_pm_anima_data *cb_data = (lv_pm_anima_data *)anim->user_data; 32 | cb_data->cb(cb_data->pm_page, cb_data->options); 33 | free(anim->user_data); 34 | } 35 | 36 | /** 37 | ---------------------------------------------------------------------------------------------------------- 38 | slide animation 39 | ---------------------------------------------------------------------------------------------------------- 40 | */ 41 | 42 | static void _pm_slide_appear(lv_pm_anima_data *anima_data) 43 | { 44 | lv_coord_t width = lv_disp_get_hor_res(NULL); 45 | 46 | lv_anim_init(&appear_anima); 47 | lv_anim_set_user_data(&appear_anima, (void *)anima_data); 48 | lv_anim_set_var(&appear_anima, anima_data->pm_page->page); 49 | 50 | if (anima_data->pm_page->_back) { 51 | lv_anim_set_values(&appear_anima, -width, 0); 52 | } else { 53 | lv_anim_set_values(&appear_anima, width, 0); 54 | } 55 | 56 | lv_anim_set_path_cb(&appear_anima, lv_anim_path_ease_out); 57 | lv_anim_set_time(&appear_anima, 500); 58 | lv_anim_set_repeat_count(&appear_anima, 1); 59 | lv_anim_set_exec_cb(&appear_anima, translateX_anima_cb); 60 | lv_anim_set_ready_cb(&appear_anima, anima_ready_cb); 61 | lv_anim_start(&appear_anima); 62 | } 63 | 64 | static void _pm_slide_disAppear(lv_pm_anima_data *anima_data) 65 | { 66 | lv_coord_t width = lv_disp_get_hor_res(NULL); 67 | 68 | lv_anim_init(&disAppear_anima); 69 | lv_anim_set_user_data(&disAppear_anima, (void *)anima_data); 70 | lv_anim_set_var(&disAppear_anima, anima_data->pm_page->page); 71 | 72 | if (anima_data->pm_page->_back) { 73 | lv_anim_set_values(&disAppear_anima, 0, width); 74 | } else { 75 | lv_anim_set_values(&disAppear_anima, 0, -width); 76 | } 77 | 78 | lv_anim_set_time(&disAppear_anima, 500); 79 | lv_anim_set_repeat_count(&disAppear_anima, 1); 80 | lv_anim_set_exec_cb(&disAppear_anima, translateX_anima_cb); 81 | lv_anim_set_ready_cb(&disAppear_anima, anima_ready_cb); 82 | lv_anim_set_path_cb(&disAppear_anima, lv_anim_path_ease_out); 83 | lv_anim_start(&disAppear_anima); 84 | } 85 | 86 | /** ------------------------------------slide animation end-------------------------------------------- */ 87 | 88 | 89 | /** 90 | ---------------------------------------------------------------------------------------------------------- 91 | popup animation 92 | ---------------------------------------------------------------------------------------------------------- 93 | */ 94 | 95 | static void _pm_popup_appear(lv_pm_anima_data *anima_data) 96 | { 97 | lv_coord_t height = lv_disp_get_ver_res(NULL); 98 | 99 | lv_anim_init(&appear_anima); 100 | lv_anim_set_user_data(&appear_anima, (void *)anima_data); 101 | lv_anim_set_var(&appear_anima, anima_data->pm_page->page); 102 | 103 | if (anima_data->pm_page->_back) { 104 | lv_anim_set_values(&appear_anima, 5, 0); 105 | lv_obj_set_style_radius(anima_data->pm_page->page, 0, LV_STATE_DEFAULT); 106 | } else { 107 | lv_anim_set_values(&appear_anima, height, POPUP_TOP_HEIGHT); 108 | lv_obj_set_style_radius(anima_data->pm_page->page, 10, LV_STATE_DEFAULT); 109 | } 110 | 111 | lv_anim_set_path_cb(&appear_anima, lv_anim_path_ease_out); 112 | lv_anim_set_time(&appear_anima, 500); 113 | lv_anim_set_repeat_count(&appear_anima, 1); 114 | lv_anim_set_exec_cb(&appear_anima, translateY_anima_cb); 115 | lv_anim_set_ready_cb(&appear_anima, anima_ready_cb); 116 | lv_anim_start(&appear_anima); 117 | } 118 | 119 | static void _pm_popup_disAppear(lv_pm_anima_data *anima_data) 120 | { 121 | lv_coord_t height = lv_disp_get_ver_res(NULL); 122 | 123 | lv_anim_init(&disAppear_anima); 124 | lv_anim_set_user_data(&disAppear_anima, (void *)anima_data); 125 | lv_anim_set_var(&disAppear_anima, anima_data->pm_page->page); 126 | 127 | if (anima_data->pm_page->_back) { 128 | lv_anim_set_values(&disAppear_anima, POPUP_TOP_HEIGHT, height); 129 | lv_obj_set_style_radius(anima_data->pm_page->page, 0, LV_STATE_DEFAULT); 130 | } else { 131 | lv_anim_set_values(&disAppear_anima, 0, 5); 132 | lv_obj_set_style_radius(anima_data->pm_page->page, 10, LV_STATE_DEFAULT); 133 | } 134 | 135 | lv_anim_set_time(&disAppear_anima, 500); 136 | lv_anim_set_repeat_count(&disAppear_anima, 1); 137 | lv_anim_set_exec_cb(&disAppear_anima, translateY_anima_cb); 138 | lv_anim_set_ready_cb(&disAppear_anima, anima_ready_cb); 139 | lv_anim_set_path_cb(&disAppear_anima, lv_anim_path_ease_out); 140 | lv_anim_start(&disAppear_anima); 141 | } 142 | 143 | /** ------------------------------------popup animation end-------------------------------------------- */ 144 | 145 | void _pm_anima_appear(lv_pm_page_t *pm_page, lv_pm_open_options_t *behavior, lv_pm_anima_complete_cb cb) 146 | { 147 | if (behavior == NULL || behavior->animation == LV_PM_ANIMA_NONE) { 148 | cb(pm_page, *behavior); 149 | return; 150 | } 151 | 152 | lv_pm_anima_data *anima_data = (lv_pm_anima_data *)malloc(sizeof(lv_pm_anima_data)); 153 | if (anima_data == NULL) { 154 | cb(pm_page, *behavior); 155 | return; 156 | } 157 | 158 | anima_data->pm_page = pm_page; 159 | anima_data->cb = cb; 160 | anima_data->options = *behavior; 161 | 162 | switch (behavior->animation) 163 | { 164 | case LV_PM_ANIMA_SLIDE: 165 | _pm_slide_appear(anima_data); 166 | break; 167 | case LV_PM_ANIMA_POPUP: 168 | _pm_popup_appear(anima_data); 169 | break; 170 | default: 171 | cb(pm_page, *behavior); 172 | break; 173 | } 174 | } 175 | 176 | void _pm_anima_disAppear(lv_pm_page_t *pm_page, lv_pm_open_options_t *behavior, lv_pm_anima_complete_cb cb) 177 | { 178 | if (behavior == NULL || behavior->animation == LV_PM_ANIMA_NONE) { 179 | cb(pm_page, *behavior); 180 | return; 181 | } 182 | 183 | lv_pm_anima_data *anima_data = (lv_pm_anima_data *)malloc(sizeof(lv_pm_anima_data)); 184 | if (anima_data == NULL) { 185 | cb(pm_page, *behavior); 186 | return; 187 | } 188 | 189 | anima_data->pm_page = pm_page; 190 | anima_data->cb = cb; 191 | anima_data->options = *behavior; 192 | 193 | switch (behavior->animation) 194 | { 195 | case LV_PM_ANIMA_SLIDE: 196 | _pm_slide_disAppear(anima_data); 197 | break; 198 | case LV_PM_ANIMA_POPUP: 199 | _pm_popup_disAppear(anima_data); 200 | break; 201 | default: 202 | cb(pm_page, *behavior); 203 | break; 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /src/anima.h: -------------------------------------------------------------------------------- 1 | #ifndef PM_ANIMA_H 2 | #define PM_ANIMA_H 3 | 4 | #include "pm.h" 5 | 6 | typedef void (*lv_pm_anima_complete_cb)(lv_pm_page_t *pm_page, lv_pm_open_options_t options); 7 | 8 | void _pm_anima_appear(lv_pm_page_t *pm_page, lv_pm_open_options_t *behavior, lv_pm_anima_complete_cb cb); 9 | 10 | void _pm_anima_disAppear(lv_pm_page_t *pm_page, lv_pm_open_options_t *behavior, lv_pm_anima_complete_cb cb); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/pm.c: -------------------------------------------------------------------------------- 1 | #include "pm.h" 2 | #include "anima.h" 3 | #include "pm_utils.h" 4 | 5 | #include 6 | #include 7 | 8 | static void _appear_complete_cb(lv_pm_page_t *pm_page, lv_pm_open_options_t options) 9 | { 10 | if (pm_page->didAppear) { 11 | pm_page->didAppear(pm_page->page); 12 | } 13 | } 14 | 15 | static void _back_appear_complete_cb(lv_pm_page_t *pm_page, lv_pm_open_options_t options) 16 | { 17 | if (pm_page->didAppear) { 18 | pm_page->didAppear(pm_page->page); 19 | } 20 | } 21 | 22 | static void _disAppear_complete_cb(lv_pm_page_t *pm_page, lv_pm_open_options_t options) 23 | { 24 | if (options.animation != LV_PM_ANIMA_POPUP) { 25 | lv_obj_add_flag(pm_page->page, LV_OBJ_FLAG_HIDDEN); 26 | } 27 | if (pm_page->didDisappear) { 28 | pm_page->didDisappear(pm_page->page); 29 | } 30 | if (options.target == LV_PM_TARGET_SELF) { 31 | pm_page->unLoad(pm_page->page); 32 | lv_obj_clean(pm_page->page); 33 | } 34 | } 35 | 36 | static void _back_disAppear_complete_cb(lv_pm_page_t *pm_page, lv_pm_open_options_t options) 37 | { 38 | lv_obj_add_flag(pm_page->page, LV_OBJ_FLAG_HIDDEN); 39 | if (pm_page->didDisappear) { 40 | pm_page->didDisappear(pm_page->page); 41 | } 42 | pm_page->unLoad(pm_page->page); 43 | lv_obj_clean(pm_page->page); 44 | } 45 | 46 | uint8_t lv_pm_init() 47 | { 48 | lv_pm_history_len = 0; 49 | for (uint8_t i = 0; i < LV_PM_PAGE_NUM; i++) 50 | { 51 | lv_pm_router[i] = 0; 52 | } 53 | 54 | lv_obj_t *screen = lv_scr_act(); 55 | // turn off the scroll bar 56 | lv_obj_set_scrollbar_mode(screen, LV_SCROLLBAR_MODE_OFF); 57 | 58 | return 0; 59 | } 60 | 61 | lv_pm_page_t *lv_pm_create_page(uint8_t id) 62 | { 63 | lv_pm_page_t *pm_page = (lv_pm_page_t *)malloc(sizeof(lv_pm_page_t)); 64 | if (pm_page == NULL) { 65 | return NULL; 66 | } 67 | memset(pm_page, 0, sizeof(lv_pm_page_t)); 68 | 69 | lv_pm_router[id] = pm_page; 70 | lv_obj_t *page = lv_obj_create(lv_scr_act()); 71 | // reset style. border radius etc... 72 | pm_reset_style(page); 73 | lv_obj_add_flag(page, LV_OBJ_FLAG_HIDDEN); 74 | lv_coord_t width = lv_disp_get_hor_res(NULL); 75 | lv_coord_t height = lv_disp_get_ver_res(NULL); 76 | lv_obj_set_width(page, width); 77 | lv_obj_set_height(page, height); 78 | 79 | pm_page->page = page; 80 | return pm_page; 81 | } 82 | 83 | uint8_t lv_pm_open_page(uint8_t id, lv_pm_open_options_t *behavior) 84 | { 85 | if (lv_pm_router[id] == 0) { 86 | return 4; 87 | } 88 | if (lv_pm_history_len == LV_PM_PAGE_NUM) { 89 | return 5; 90 | } 91 | lv_pm_history[lv_pm_history_len] = id; 92 | lv_pm_page_t *pm_page = lv_pm_router[id]; 93 | lv_obj_t *page = pm_page->page; 94 | if (behavior) { 95 | pm_page->_options = *behavior; 96 | } 97 | pm_page->_back = false; 98 | 99 | if (lv_pm_history_len > 0) { 100 | uint8_t pid = lv_pm_history[lv_pm_history_len - 1]; 101 | lv_pm_page_t *prev_pm_page = lv_pm_router[pid]; 102 | lv_obj_t *prev_page = prev_pm_page->page; 103 | prev_pm_page->_back = false; 104 | if (prev_pm_page->willDisappear) { 105 | prev_pm_page->willDisappear(prev_page); 106 | } 107 | _pm_anima_disAppear(prev_pm_page, &pm_page->_options, _disAppear_complete_cb); 108 | } 109 | 110 | pm_page->onLoad(page); 111 | lv_obj_clear_flag(page, LV_OBJ_FLAG_HIDDEN); 112 | if (pm_page->willAppear) { 113 | pm_page->willAppear(page); 114 | } 115 | _pm_anima_appear(pm_page, &pm_page->_options, _appear_complete_cb); 116 | 117 | if (behavior && behavior->target == LV_PM_TARGET_SELF) { 118 | if (lv_pm_history_len == 0) { 119 | lv_pm_history_len++; 120 | } else { 121 | lv_pm_history[lv_pm_history_len - 1] = lv_pm_history[lv_pm_history_len]; 122 | } 123 | } else { 124 | lv_pm_history_len++; 125 | } 126 | 127 | return 0; 128 | } 129 | 130 | uint8_t lv_pm_back() 131 | { 132 | if (lv_pm_history_len < 2) { 133 | return 0; 134 | } 135 | uint8_t pid = lv_pm_history[lv_pm_history_len - 1]; 136 | lv_pm_page_t *pm_page = lv_pm_router[pid]; 137 | pm_page->_back = true; 138 | lv_obj_t *page = pm_page->page; 139 | 140 | if (pm_page->willDisappear) { 141 | pm_page->willDisappear(page); 142 | } 143 | _pm_anima_disAppear(pm_page, &pm_page->_options, _back_disAppear_complete_cb); 144 | 145 | lv_pm_history_len--; 146 | uint8_t prev_pid = lv_pm_history[lv_pm_history_len - 1]; 147 | lv_pm_page_t *prev_pm_page = lv_pm_router[prev_pid]; 148 | lv_obj_t *prev_page = prev_pm_page->page; 149 | prev_pm_page->_back = true; 150 | 151 | if (prev_pm_page->willAppear) { 152 | prev_pm_page->willAppear(prev_page); 153 | } 154 | lv_obj_clear_flag(prev_pm_page->page, LV_OBJ_FLAG_HIDDEN); 155 | _pm_anima_appear(prev_pm_page, &pm_page->_options, _back_appear_complete_cb); 156 | 157 | return 0; 158 | } 159 | -------------------------------------------------------------------------------- /src/pm.h: -------------------------------------------------------------------------------- 1 | #ifndef PM_H 2 | #define PM_H 3 | 4 | #include "lvgl.h" 5 | #include 6 | 7 | #define LV_PM_MAJOR 0 8 | #define LV_PM_MINOR 1 9 | #define LV_PM_PATCH 1 10 | 11 | typedef void (*lv_pm_lifecycle)(lv_obj_t *page); 12 | 13 | enum LV_PM_PAGE_ANIMA { 14 | LV_PM_ANIMA_NONE = 0, 15 | LV_PM_ANIMA_SLIDE = 1, 16 | LV_PM_ANIMA_SLIDE_SCALE = 2, 17 | LV_PM_ANIMA_POPUP = 3 18 | }; 19 | 20 | enum LV_PM_ANIMA_DIR { 21 | LV_PM_ANIMA_TOP = 0, 22 | LV_PM_ANIMA_RIGHT = 1, 23 | LV_PM_ANIMA_BOTTOM = 2, 24 | LV_PM_ANIMA_LEFT = 3 25 | }; 26 | 27 | enum LV_PM_OPEN_TARGET { 28 | // open in new page 29 | LV_PM_TARGET_NEW = 0, 30 | // replace current page 31 | LV_PM_TARGET_SELF = 1, 32 | // close all page and open in new page 33 | LV_PM_TARGET_RESET = 2 34 | }; 35 | 36 | typedef struct _lv_pm_open_options_t 37 | { 38 | enum LV_PM_PAGE_ANIMA animation; 39 | enum LV_PM_OPEN_TARGET target; 40 | enum LV_PM_ANIMA_DIR direction; 41 | } lv_pm_open_options_t; 42 | 43 | typedef struct _lv_pm_page_t 44 | { 45 | lv_obj_t *page; 46 | lv_pm_lifecycle onLoad; 47 | lv_pm_lifecycle willAppear; 48 | lv_pm_lifecycle didAppear; 49 | lv_pm_lifecycle willDisappear; 50 | lv_pm_lifecycle didDisappear; 51 | lv_pm_lifecycle unLoad; 52 | lv_pm_open_options_t _options; 53 | bool _back; 54 | } lv_pm_page_t; 55 | 56 | 57 | uint8_t lv_pm_history_len; 58 | 59 | #ifndef LV_PM_PAGE_NUM 60 | #define LV_PM_PAGE_NUM 10 61 | #endif 62 | 63 | lv_pm_page_t *lv_pm_router[LV_PM_PAGE_NUM]; 64 | uint8_t lv_pm_history[LV_PM_PAGE_NUM]; 65 | 66 | uint8_t lv_pm_init(); 67 | 68 | lv_pm_page_t *lv_pm_create_page(uint8_t id); 69 | 70 | uint8_t lv_pm_open_page(uint8_t id, lv_pm_open_options_t *behavior); 71 | 72 | uint8_t lv_pm_back(); 73 | 74 | #endif -------------------------------------------------------------------------------- /src/pm_utils.c: -------------------------------------------------------------------------------- 1 | #include "pm_utils.h" 2 | 3 | void pm_reset_style(lv_obj_t *obj) 4 | { 5 | lv_obj_set_style_border_width(obj, 0, LV_STATE_DEFAULT); 6 | lv_obj_set_style_radius(obj, 0, LV_STATE_DEFAULT); 7 | lv_obj_set_style_pad_all(obj, 0, LV_STATE_DEFAULT); 8 | } -------------------------------------------------------------------------------- /src/pm_utils.h: -------------------------------------------------------------------------------- 1 | #ifndef PM_UTILS_H 2 | #define PM_UTILS_H 3 | 4 | #include "lvgl.h" 5 | 6 | void pm_reset_style(lv_obj_t *obj); 7 | 8 | #endif --------------------------------------------------------------------------------