mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
feat(multi-instance): collect all the global variables into a struct to allow running multiple instances of LVGL
Closes #4358
This commit is contained in:
parent
1f807ae714
commit
0b83a82a07
2
.github/workflows/build_micropython.yml
vendored
2
.github/workflows/build_micropython.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
- name: Clone lv_micropython
|
||||
run: |
|
||||
git clone https://github.com/lvgl/lv_micropython.git .
|
||||
git checkout feat/parallel-rendering
|
||||
git checkout feat/multi-instance
|
||||
- name: Initialize lv_bindings submodule
|
||||
run: git submodule update --init --recursive lib/lv_bindings
|
||||
- name: Update ${{ matrix.port }} port submodules
|
||||
|
20
Kconfig
20
Kconfig
@ -135,14 +135,6 @@ menu "LVGL configuration"
|
||||
endmenu
|
||||
|
||||
menu "HAL Settings"
|
||||
config LV_TICK_CUSTOM
|
||||
bool "Use a custom tick source"
|
||||
|
||||
config LV_TICK_CUSTOM_INCLUDE
|
||||
string "Header for the system time function"
|
||||
default "Arduino.h"
|
||||
depends on LV_TICK_CUSTOM
|
||||
|
||||
config LV_DPI_DEF
|
||||
int "Default Dots Per Inch (in px)."
|
||||
default 130
|
||||
@ -524,13 +516,13 @@ menu "LVGL configuration"
|
||||
bool "Enable float in built-in (v)snprintf functions"
|
||||
depends on LV_USE_BUILTIN_SNPRINTF
|
||||
|
||||
config LV_ENABLE_GC
|
||||
bool "Enable garbage collector"
|
||||
config LV_ENABLE_GLOBAL_CUSTOM
|
||||
bool "Enable 'lv_global' customization"
|
||||
|
||||
config LV_GC_INCLUDE
|
||||
string "Header to include for the garbage collector related things"
|
||||
depends on LV_ENABLE_GC
|
||||
default "gc.h"
|
||||
config LV_GLOBAL_CUSTOM_INCLUDE
|
||||
string "Header to include for the custom 'lv_global' function"
|
||||
depends on LV_ENABLE_GLOBAL_CUSTOM
|
||||
default "lv_global.h"
|
||||
endmenu
|
||||
|
||||
menu "Compiler settings"
|
||||
|
@ -5,13 +5,13 @@
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifndef FONT_MULTILANG_LARGE
|
||||
#define FONT_MULTILANG_LARGE 1
|
||||
#define FONT_MULTILANG_LARGE 1
|
||||
#endif
|
||||
|
||||
#if FONT_MULTILANG_LARGE
|
||||
@ -1445,7 +1445,8 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
|
||||
|
||||
|
||||
/*Collect the unicode lists and glyph_id offsets*/
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
||||
{
|
||||
{
|
||||
.range_start = 32, .range_length = 95, .glyph_id_start = 1,
|
||||
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
|
||||
@ -1458,7 +1459,8 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
|
||||
/*Map glyph_ids to kern left classes*/
|
||||
static const uint8_t kern_left_class_mapping[] = {
|
||||
static const uint8_t kern_left_class_mapping[] =
|
||||
{
|
||||
0, 0, 1, 2, 0, 3, 4, 5,
|
||||
2, 6, 7, 8, 9, 10, 9, 10,
|
||||
11, 12, 0, 13, 14, 15, 16, 17,
|
||||
@ -1474,7 +1476,8 @@ static const uint8_t kern_left_class_mapping[] = {
|
||||
};
|
||||
|
||||
/*Map glyph_ids to kern right classes*/
|
||||
static const uint8_t kern_right_class_mapping[] = {
|
||||
static const uint8_t kern_right_class_mapping[] =
|
||||
{
|
||||
0, 0, 1, 2, 0, 3, 4, 5,
|
||||
2, 6, 7, 8, 9, 10, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 12,
|
||||
@ -1490,7 +1493,8 @@ static const uint8_t kern_right_class_mapping[] = {
|
||||
};
|
||||
|
||||
/*Kern values between classes*/
|
||||
static const int8_t kern_class_values[] = {
|
||||
static const int8_t kern_class_values[] =
|
||||
{
|
||||
0, 1, 0, 0, 0, 0, 0, 3,
|
||||
0, 1, 0, 0, 4, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0,
|
||||
@ -1870,7 +1874,8 @@ static const int8_t kern_class_values[] = {
|
||||
|
||||
|
||||
/*Collect the kern class' data in one place*/
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes =
|
||||
{
|
||||
.class_pair_values = kern_class_values,
|
||||
.left_class_mapping = kern_left_class_mapping,
|
||||
.right_class_mapping = kern_right_class_mapping,
|
||||
|
@ -5,13 +5,13 @@
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
#ifndef FONT_MULTILANG_SMALL
|
||||
#define FONT_MULTILANG_SMALL 1
|
||||
#define FONT_MULTILANG_SMALL 1
|
||||
#endif
|
||||
|
||||
#if FONT_MULTILANG_SMALL
|
||||
@ -5240,7 +5240,8 @@ static const uint16_t unicode_list_6[] = {
|
||||
};
|
||||
|
||||
/*Collect the unicode lists and glyph_id offsets*/
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
static const lv_font_fmt_txt_cmap_t cmaps[] =
|
||||
{
|
||||
{
|
||||
.range_start = 32, .range_length = 95, .glyph_id_start = 1,
|
||||
.unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY
|
||||
@ -5277,7 +5278,8 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
|
||||
/*Map glyph_ids to kern left classes*/
|
||||
static const uint8_t kern_left_class_mapping[] = {
|
||||
static const uint8_t kern_left_class_mapping[] =
|
||||
{
|
||||
0, 0, 1, 2, 0, 3, 4, 5,
|
||||
2, 6, 7, 8, 9, 10, 9, 10,
|
||||
11, 12, 0, 13, 14, 15, 16, 17,
|
||||
@ -5346,7 +5348,8 @@ static const uint8_t kern_left_class_mapping[] = {
|
||||
};
|
||||
|
||||
/*Map glyph_ids to kern right classes*/
|
||||
static const uint8_t kern_right_class_mapping[] = {
|
||||
static const uint8_t kern_right_class_mapping[] =
|
||||
{
|
||||
0, 0, 1, 2, 0, 3, 4, 5,
|
||||
2, 6, 7, 8, 9, 10, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 12,
|
||||
@ -5415,7 +5418,8 @@ static const uint8_t kern_right_class_mapping[] = {
|
||||
};
|
||||
|
||||
/*Kern values between classes*/
|
||||
static const int8_t kern_class_values[] = {
|
||||
static const int8_t kern_class_values[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 2,
|
||||
0, 0, 0, 0, 2, 0, 0, 0,
|
||||
0, 1, 0, 0, 0, 0, 0, 0,
|
||||
@ -6290,7 +6294,8 @@ static const int8_t kern_class_values[] = {
|
||||
|
||||
|
||||
/*Collect the kern class' data in one place*/
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
static const lv_font_fmt_txt_kern_classes_t kern_classes =
|
||||
{
|
||||
.class_pair_values = kern_class_values,
|
||||
.left_class_mapping = kern_left_class_mapping,
|
||||
.right_class_mapping = kern_right_class_mapping,
|
||||
|
@ -172,7 +172,7 @@ static void obj_test_task_cb(lv_timer_t * tmr)
|
||||
break;
|
||||
|
||||
case 8:
|
||||
obj = lv_win_create(lv_scr_act(), 50);
|
||||
obj = lv_win_create(lv_scr_act());
|
||||
lv_obj_set_size(obj, LV_HOR_RES / 2, LV_VER_RES / 2);
|
||||
lv_obj_align(obj, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
|
||||
lv_win_add_title(obj, "Window title");
|
||||
|
@ -50,8 +50,7 @@ Architecture
|
||||
- |check| More color formats: 24 bit, ARGB1555, ARGB4444 etc
|
||||
- |uncheck| Add more feature to key presses (long press, release, etc).
|
||||
(see `here <https://forum.lvgl.io/t/keypad-input-device-why-lv-event-long-pressed-only-on-enter/10263>`__)
|
||||
- |uncheck| Variable binding. I.e create properties which can be bound to
|
||||
objects and those objects are notified on value change. Maybe based on `lv_msg`?
|
||||
- |uncheck| Variable binding. I.e create properties which can be bound to objects and those objects are notified on value change. Maybe based on `lv_msg`?
|
||||
- |uncheck| Add GPU abstraction for display rotation
|
||||
- |uncheck| Replace the `read_line_cb` of the image decoders with `get_area_cb`
|
||||
- |uncheck| Limit the image caching size in bytes instead of image count
|
||||
|
@ -34,8 +34,8 @@ If you would rather try LVGL on your own project follow these steps:
|
||||
- Include ``lvgl/lvgl.h`` in files where you need to use LVGL related functions.
|
||||
- Call :cpp:expr:`lv_tick_inc(x)` every ``x`` milliseconds in a Timer or Task
|
||||
(``x`` should be between 1 and 10). It is required for the internal
|
||||
timing of LVGL. Alternatively, configure :c:macro:`LV_TICK_CUSTOM` (see
|
||||
``lv_conf.h``) so that LVGL can retrieve the current time directly.
|
||||
timing of LVGL. Alternatively, register a ``tick_get_cb`` with
|
||||
:cpp:func:`lv_tick_set_cb` so that LVGL can retrieve the current time directly.
|
||||
- Call :cpp:func:`lv_init`
|
||||
- Create a draw buffer: LVGL will render the graphics here first, and
|
||||
send the rendered image to the display. The buffer size can be set
|
||||
|
@ -836,3 +836,144 @@ Set the base direction of the object. The possible values are `LV_BIDI_DIR_LTR/R
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
## Flex
|
||||
Flex layout properties.
|
||||
|
||||
### flex_flow
|
||||
Defines in which direct the flex layout should arrange the children
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_FLEX_FLOW_NONE`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### flex_main_place
|
||||
Defines how to align the children in the direction of flex flow
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_FLEX_ALIGN_NONE`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### flex_cross_place
|
||||
Defines how to align the children perpendicular to the direction of flex flow
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_FLEX_ALIGN_NONE`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### flex_track_place
|
||||
Defines how to align the tracks of the flow
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_FLEX_ALIGN_NONE`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### flex_grow
|
||||
Defines how mayn space to take proprtionally the free space of the object's trach
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_FLEX_ALIGN_ROW`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
## Grid
|
||||
Grid layout properties.
|
||||
|
||||
### grid_column_dsc_array
|
||||
An array to describe the columns of the grid. Should be LV_GRID_TEMPLATE_LAST terminated
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `NULL`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_column_align
|
||||
Defines how to ditribute the columns
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_row_dsc_array
|
||||
An array to describe the rows of the grid. Should be LV_GRID_TEMPLATE_LAST terminated
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `NULL`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_row_align
|
||||
Defines how to ditribute the rows.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_column_pos
|
||||
Set the column in which the object should be placed
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_x_align
|
||||
Set how to align the object horizontally.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_column_span
|
||||
Set how many columns the object should span. Needs to be >= 1
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_row_pos
|
||||
Set the row in which the object should be placed
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_y_align
|
||||
Set how to align the object vertically.
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
||||
### grid_cell_row_span
|
||||
Set how many rows the object should span. Needs to be >= 1
|
||||
<ul>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Default</strong> `LV_GRID_ALIGN_START`</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Inherited</strong> No</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Layout</strong> Yes</li>
|
||||
<li style='display:inline; margin-right: 20px; margin-left: 0px'><strong>Ext. draw</strong> No</li>
|
||||
</ul>
|
||||
|
@ -104,6 +104,21 @@ from ``lv_conf.h`` or build settings (``-D...``) overwrite the values
|
||||
set in Kconfig. To ignore the configs from ``lv_conf.h`` simply remove
|
||||
its content, or define :c:macro:`LV_CONF_SKIP`.
|
||||
|
||||
To enable multi-instance feature, set :c:macro:`LV_GLOBAL_CUSTOM` in
|
||||
``lv_conf.h`` and provide a custom function to
|
||||
:cpp:func:`lv_global_default` using ``__thread`` or ``pthread_key_t``.
|
||||
|
||||
For example:
|
||||
|
||||
.. code:: c
|
||||
|
||||
lv_global_t * lv_global_default(void)
|
||||
{
|
||||
static __thread lv_global_t lv_global;
|
||||
return &lv_global;
|
||||
}
|
||||
|
||||
|
||||
Initialization
|
||||
--------------
|
||||
|
||||
|
@ -7,6 +7,16 @@ Tick interface
|
||||
LVGL needs a system tick to know elapsed time for animations and other
|
||||
tasks.
|
||||
|
||||
If you want to use a custom function to :cpp:func:`lv_tick_get`, you can
|
||||
register a "tick_get_cb" with :cpp:func:`lv_tick_set_cb`.
|
||||
|
||||
For example:
|
||||
|
||||
.. code:: c
|
||||
|
||||
lv_tick_set_cb(SDL_GetTicks);
|
||||
|
||||
|
||||
You need to call the :cpp:expr:`lv_tick_inc(tick_period)` function periodically
|
||||
and provide the call period in milliseconds. For example,
|
||||
:cpp:expr:`lv_tick_inc(1)` when calling every millisecond.
|
||||
|
@ -12,35 +12,35 @@
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_STAR uint8_t img_star_map[] = {
|
||||
/*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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xd2, 0xff, 0x54, 0x43, 0xd9, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xce, 0xff, 0xc7, 0x4c, 0xdb, 0xff, 0xac, 0x31, 0xd6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0xff, 0x50, 0x08, 0xce, 0xff, 0xec, 0x4f, 0xdc, 0xff, 0xff, 0x50, 0xdb, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0xaf, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x54, 0xdc, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x4b, 0x00, 0xcc, 0xff, 0xe8, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x51, 0xdb, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x4e, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x08, 0x00, 0xcc, 0xff, 0x9c, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x3f, 0x00, 0xcc, 0xff, 0xe8, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xf0, 0x51, 0xdd, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x0b, 0x00, 0xcc, 0xff, 0x8f, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xff, 0x2c, 0x00, 0xcc, 0xff, 0xef, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xe4, 0x51, 0xdd, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x07, 0x80, 0xe6, 0xff, 0x2f, 0x7b, 0xe5, 0xff, 0x5b, 0x36, 0xd7, 0xff, 0xb0, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xc4, 0x87, 0xe8, 0xff, 0x5b, 0x80, 0xe6, 0xff, 0x34, 0x80, 0xe6, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00,
|
||||
0x33, 0xd7, 0xff, 0x08, 0x6c, 0xe2, 0xff, 0x18, 0x81, 0xe6, 0xff, 0x3f, 0x81, 0xe6, 0xff, 0x68, 0x80, 0xe6, 0xff, 0x93, 0x80, 0xe6, 0xff, 0xbc, 0x80, 0xe6, 0xff, 0xe7, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x71, 0xe3, 0xff, 0xff, 0x1e, 0xd2, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x5b, 0xde, 0xff, 0xff, 0x78, 0xe5, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xeb, 0x80, 0xe6, 0xff, 0xc3, 0x80, 0xe6, 0xff, 0x98, 0x81, 0xe6, 0xff, 0x6f, 0x81, 0xe6, 0xff, 0x44, 0x71, 0xe3, 0xff, 0x1c, 0x35, 0xd7, 0xff, 0x07,
|
||||
0x31, 0xd6, 0xff, 0x87, 0x50, 0xdc, 0xff, 0xff, 0x6e, 0xe3, 0xff, 0xff, 0x77, 0xe4, 0xff, 0xff, 0x7e, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xff, 0x0a, 0xce, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x6e, 0xe2, 0xff, 0xff, 0x83, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x7f, 0xe6, 0xff, 0xff, 0x78, 0xe4, 0xff, 0xff, 0x6e, 0xe2, 0xff, 0xff, 0x52, 0xdd, 0xff, 0xff, 0x38, 0xd8, 0xff, 0x83,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xff, 0x93, 0x01, 0xcc, 0xff, 0xfb, 0x24, 0xd4, 0xff, 0xff, 0x4b, 0xdc, 0xff, 0xff, 0x65, 0xe1, 0xff, 0xff, 0x72, 0xe3, 0xff, 0xff, 0x7f, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x82, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x43, 0xda, 0xff, 0xff, 0x01, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x66, 0xe1, 0xff, 0xff, 0x82, 0xe7, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x74, 0xe4, 0xff, 0xff, 0x67, 0xe1, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x27, 0xd4, 0xff, 0xff, 0x04, 0xcd, 0xff, 0xfb, 0x00, 0xc9, 0xff, 0x8f, 0x00, 0xc1, 0xff, 0x0c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x8b, 0x00, 0xcb, 0xff, 0xfb, 0x00, 0xcb, 0xff, 0xff, 0x06, 0xcd, 0xff, 0xff, 0x25, 0xd3, 0xff, 0xff, 0x45, 0xda, 0xff, 0xff, 0x5d, 0xdf, 0xff, 0xff, 0x70, 0xe3, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x87, 0xe7, 0xff, 0xff, 0x7a, 0xe5, 0xff, 0xff, 0x27, 0xd4, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xff, 0x80, 0xe7, 0xff, 0xff, 0x84, 0xe7, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x75, 0xe4, 0xff, 0xff, 0x61, 0xe0, 0xff, 0xff, 0x4a, 0xdb, 0xff, 0xff, 0x2a, 0xd5, 0xff, 0xff, 0x09, 0xce, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xfc, 0x00, 0xcc, 0xff, 0x8c, 0x02, 0xcd, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x08, 0x00, 0xcc, 0xff, 0x87, 0x00, 0xcc, 0xff, 0xf8, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x08, 0xce, 0xff, 0xff, 0x22, 0xd3, 0xff, 0xff, 0x3c, 0xd8, 0xff, 0xff, 0x55, 0xde, 0xff, 0xff, 0x75, 0xe4, 0xff, 0xff, 0x6b, 0xe2, 0xff, 0xff, 0x1c, 0xd2, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x78, 0xe4, 0xff, 0xff, 0x5d, 0xdf, 0xff, 0xff, 0x42, 0xda, 0xff, 0xff, 0x28, 0xd4, 0xff, 0xff, 0x0c, 0xcf, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x88, 0x00, 0xcc, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00,
|
||||
0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x0b, 0x00, 0xcc, 0xff, 0x84, 0x00, 0xcc, 0xff, 0xfb, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x09, 0xce, 0xff, 0xff, 0x1b, 0xd2, 0xff, 0xff, 0x34, 0xd7, 0xff, 0xff, 0x2e, 0xd5, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x37, 0xd7, 0xff, 0xff, 0x1f, 0xd2, 0xff, 0xff, 0x0e, 0xcf, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x7f, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x07, 0x00, 0xcc, 0xff, 0x84, 0x00, 0xcc, 0xff, 0xfc, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcd, 0xff, 0xff, 0x0d, 0xcf, 0xff, 0xff, 0x19, 0xd1, 0xff, 0xff, 0x39, 0xd8, 0xff, 0xff, 0x34, 0xd6, 0xff, 0xff, 0x3c, 0xd9, 0xff, 0xff, 0x1d, 0xd2, 0xff, 0xff, 0x07, 0xce, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x73, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x83, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcc, 0xff, 0xff, 0x10, 0xd0, 0xff, 0xff, 0x1d, 0xd2, 0xff, 0xff, 0x26, 0xd3, 0xff, 0xff, 0x26, 0xd3, 0xff, 0xff, 0x38, 0xd6, 0xff, 0xff, 0x4a, 0xdb, 0xff, 0xff, 0x08, 0xcd, 0xff, 0xff, 0x46, 0xda, 0xff, 0xff, 0x52, 0xdc, 0xff, 0xff, 0x4b, 0xdb, 0xff, 0xff, 0x3d, 0xd8, 0xff, 0xff, 0x20, 0xd3, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x6c, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xd1, 0xff, 0xb4, 0x28, 0xd4, 0xff, 0xff, 0x29, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x29, 0xd4, 0xff, 0xff, 0x2f, 0xd5, 0xff, 0xff, 0x4c, 0xdb, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x0c, 0xcf, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x39, 0xd8, 0xff, 0x8b, 0x1c, 0xd2, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xc8, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x42, 0xd9, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x1e, 0xd2, 0xff, 0xff, 0x59, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0x97, 0x55, 0xdd, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xef, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x39, 0xd7, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcc, 0xff, 0xff, 0x35, 0xd6, 0xff, 0xff, 0x57, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xc0, 0x55, 0xdd, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x20, 0x2a, 0xd4, 0xff, 0xf4, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x31, 0xd6, 0xff, 0xff, 0x4d, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x0a, 0xcf, 0xff, 0xff, 0x46, 0xda, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xe8, 0x55, 0xdd, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x4b, 0x2a, 0xd4, 0xff, 0xf7, 0x2a, 0xd4, 0xff, 0xff, 0x2c, 0xd5, 0xff, 0xff, 0x45, 0xda, 0xff, 0xff, 0x58, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x19, 0xd1, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0x1f, 0x4a, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x77, 0x2a, 0xd4, 0xff, 0xfb, 0x29, 0xd4, 0xff, 0xff, 0x3d, 0xd8, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xef, 0x05, 0xcd, 0xff, 0xf8, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x01, 0xcc, 0xff, 0xff, 0x2c, 0xd5, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0x47, 0x52, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xa3, 0x29, 0xd4, 0xff, 0xfc, 0x34, 0xd6, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xfc, 0x55, 0xdd, 0xff, 0xb3, 0x53, 0xdd, 0xff, 0x58, 0x04, 0xcd, 0xff, 0x5c, 0x00, 0xcc, 0xff, 0xb0, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x08, 0xce, 0xff, 0xff, 0x3e, 0xd8, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0x74, 0x54, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xcb, 0x2d, 0xd5, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdc, 0xff, 0xc0, 0x53, 0xdd, 0xff, 0x5b, 0x53, 0xdd, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x1b, 0x00, 0xcc, 0xff, 0x58, 0x00, 0xcc, 0xff, 0xbf, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x12, 0xd0, 0xff, 0xff, 0x4d, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xa4, 0x54, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd3, 0xff, 0x0b, 0x27, 0xd4, 0xff, 0xdc, 0x47, 0xda, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x51, 0xdc, 0xff, 0xdb, 0x4e, 0xdc, 0xff, 0x5c, 0x52, 0xdc, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xd4, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x1b, 0x00, 0xcc, 0xff, 0x5c, 0x00, 0xcc, 0xff, 0xd7, 0x00, 0xcc, 0xff, 0xff, 0x24, 0xd3, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xd3, 0x5d, 0xdf, 0xff, 0x00, 0x39, 0xd7, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xd1, 0xff, 0x30, 0x41, 0xd9, 0xff, 0xef, 0x4f, 0xdc, 0xff, 0xf0, 0x48, 0xdb, 0xff, 0x6b, 0x4a, 0xdb, 0xff, 0x10, 0x3f, 0xda, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x14, 0x00, 0xcc, 0xff, 0x6f, 0x00, 0xcc, 0xff, 0xef, 0x37, 0xd7, 0xff, 0xff, 0x49, 0xda, 0xff, 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, 0x37, 0xd7, 0xff, 0x4b, 0x40, 0xd9, 0xff, 0x70, 0x3a, 0xd8, 0xff, 0x10, 0x43, 0xda, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcc, 0xff, 0x00, 0x00, 0xca, 0xff, 0x10, 0x0c, 0xce, 0xff, 0x90, 0x20, 0xd3, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xd2, 0xff, 0x54, 0x43, 0xd9, 0xff, 0x23, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xce, 0xff, 0xc7, 0x4c, 0xdb, 0xff, 0xac, 0x31, 0xd6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0xff, 0x50, 0x08, 0xce, 0xff, 0xec, 0x4f, 0xdc, 0xff, 0xff, 0x50, 0xdb, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x4d, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0xaf, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x54, 0xdc, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x4b, 0x00, 0xcc, 0xff, 0xe8, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x51, 0xdb, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x4e, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x08, 0x00, 0xcc, 0xff, 0x9c, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x3f, 0x00, 0xcc, 0xff, 0xe8, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xf0, 0x51, 0xdd, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x0b, 0x00, 0xcc, 0xff, 0x8f, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xff, 0x2c, 0x00, 0xcc, 0xff, 0xef, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xe4, 0x51, 0xdd, 0xff, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x07, 0x80, 0xe6, 0xff, 0x2f, 0x7b, 0xe5, 0xff, 0x5b, 0x36, 0xd7, 0xff, 0xb0, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xc4, 0x87, 0xe8, 0xff, 0x5b, 0x80, 0xe6, 0xff, 0x34, 0x80, 0xe6, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe6, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x33, 0xd7, 0xff, 0x08, 0x6c, 0xe2, 0xff, 0x18, 0x81, 0xe6, 0xff, 0x3f, 0x81, 0xe6, 0xff, 0x68, 0x80, 0xe6, 0xff, 0x93, 0x80, 0xe6, 0xff, 0xbc, 0x80, 0xe6, 0xff, 0xe7, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x71, 0xe3, 0xff, 0xff, 0x1e, 0xd2, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x5b, 0xde, 0xff, 0xff, 0x78, 0xe5, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xeb, 0x80, 0xe6, 0xff, 0xc3, 0x80, 0xe6, 0xff, 0x98, 0x81, 0xe6, 0xff, 0x6f, 0x81, 0xe6, 0xff, 0x44, 0x71, 0xe3, 0xff, 0x1c, 0x35, 0xd7, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x31, 0xd6, 0xff, 0x87, 0x50, 0xdc, 0xff, 0xff, 0x6e, 0xe3, 0xff, 0xff, 0x77, 0xe4, 0xff, 0xff, 0x7e, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xff, 0x0a, 0xce, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x6e, 0xe2, 0xff, 0xff, 0x83, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x7f, 0xe6, 0xff, 0xff, 0x78, 0xe4, 0xff, 0xff, 0x6e, 0xe2, 0xff, 0xff, 0x52, 0xdd, 0xff, 0xff, 0x38, 0xd8, 0xff, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xff, 0x93, 0x01, 0xcc, 0xff, 0xfb, 0x24, 0xd4, 0xff, 0xff, 0x4b, 0xdc, 0xff, 0xff, 0x65, 0xe1, 0xff, 0xff, 0x72, 0xe3, 0xff, 0xff, 0x7f, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x82, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x43, 0xda, 0xff, 0xff, 0x01, 0xcc, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x66, 0xe1, 0xff, 0xff, 0x82, 0xe7, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x74, 0xe4, 0xff, 0xff, 0x67, 0xe1, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x27, 0xd4, 0xff, 0xff, 0x04, 0xcd, 0xff, 0xfb, 0x00, 0xc9, 0xff, 0x8f, 0x00, 0xc1, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x8b, 0x00, 0xcb, 0xff, 0xfb, 0x00, 0xcb, 0xff, 0xff, 0x06, 0xcd, 0xff, 0xff, 0x25, 0xd3, 0xff, 0xff, 0x45, 0xda, 0xff, 0xff, 0x5d, 0xdf, 0xff, 0xff, 0x70, 0xe3, 0xff, 0xff, 0x81, 0xe6, 0xff, 0xff, 0x87, 0xe7, 0xff, 0xff, 0x7a, 0xe5, 0xff, 0xff, 0x27, 0xd4, 0xff, 0xff, 0x07, 0xcd, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x5e, 0xdf, 0xff, 0xff, 0x80, 0xe7, 0xff, 0xff, 0x84, 0xe7, 0xff, 0xff, 0x83, 0xe7, 0xff, 0xff, 0x75, 0xe4, 0xff, 0xff, 0x61, 0xe0, 0xff, 0xff, 0x4a, 0xdb, 0xff, 0xff, 0x2a, 0xd5, 0xff, 0xff, 0x09, 0xce, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xfc, 0x00, 0xcc, 0xff, 0x8c, 0x02, 0xcd, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x08, 0x00, 0xcc, 0xff, 0x87, 0x00, 0xcc, 0xff, 0xf8, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x08, 0xce, 0xff, 0xff, 0x22, 0xd3, 0xff, 0xff, 0x3c, 0xd8, 0xff, 0xff, 0x55, 0xde, 0xff, 0xff, 0x75, 0xe4, 0xff, 0xff, 0x6b, 0xe2, 0xff, 0xff, 0x1c, 0xd2, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x80, 0xe6, 0xff, 0xff, 0x78, 0xe4, 0xff, 0xff, 0x5d, 0xdf, 0xff, 0xff, 0x42, 0xda, 0xff, 0xff, 0x28, 0xd4, 0xff, 0xff, 0x0c, 0xcf, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x88, 0x00, 0xcc, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x0b, 0x00, 0xcc, 0xff, 0x84, 0x00, 0xcc, 0xff, 0xfb, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x09, 0xce, 0xff, 0xff, 0x1b, 0xd2, 0xff, 0xff, 0x34, 0xd7, 0xff, 0xff, 0x2e, 0xd5, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x37, 0xd7, 0xff, 0xff, 0x1f, 0xd2, 0xff, 0xff, 0x0e, 0xcf, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x7f, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x07, 0x00, 0xcc, 0xff, 0x84, 0x00, 0xcc, 0xff, 0xfc, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcd, 0xff, 0xff, 0x0d, 0xcf, 0xff, 0xff, 0x19, 0xd1, 0xff, 0xff, 0x39, 0xd8, 0xff, 0xff, 0x34, 0xd6, 0xff, 0xff, 0x3c, 0xd9, 0xff, 0xff, 0x1d, 0xd2, 0xff, 0xff, 0x07, 0xce, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x73, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x83, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcc, 0xff, 0xff, 0x10, 0xd0, 0xff, 0xff, 0x1d, 0xd2, 0xff, 0xff, 0x26, 0xd3, 0xff, 0xff, 0x26, 0xd3, 0xff, 0xff, 0x38, 0xd6, 0xff, 0xff, 0x4a, 0xdb, 0xff, 0xff, 0x08, 0xcd, 0xff, 0xff, 0x46, 0xda, 0xff, 0xff, 0x52, 0xdc, 0xff, 0xff, 0x4b, 0xdb, 0xff, 0xff, 0x3d, 0xd8, 0xff, 0xff, 0x20, 0xd3, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x6c, 0x00, 0xcc, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0xd1, 0xff, 0xb4, 0x28, 0xd4, 0xff, 0xff, 0x29, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x29, 0xd4, 0xff, 0xff, 0x2f, 0xd5, 0xff, 0xff, 0x4c, 0xdb, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x0c, 0xcf, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x39, 0xd8, 0xff, 0x8b, 0x1c, 0xd2, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xc8, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x42, 0xd9, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x4f, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x1e, 0xd2, 0xff, 0xff, 0x59, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0x97, 0x55, 0xdd, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xef, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x39, 0xd7, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x02, 0xcc, 0xff, 0xff, 0x35, 0xd6, 0xff, 0xff, 0x57, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xc0, 0x55, 0xdd, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x20, 0x2a, 0xd4, 0xff, 0xf4, 0x2a, 0xd4, 0xff, 0xff, 0x2a, 0xd4, 0xff, 0xff, 0x31, 0xd6, 0xff, 0xff, 0x4d, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x0a, 0xcf, 0xff, 0xff, 0x46, 0xda, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xe8, 0x55, 0xdd, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x4b, 0x2a, 0xd4, 0xff, 0xf7, 0x2a, 0xd4, 0xff, 0xff, 0x2c, 0xd5, 0xff, 0xff, 0x45, 0xda, 0xff, 0xff, 0x58, 0xde, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x05, 0xcd, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x19, 0xd1, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0x1f, 0x4a, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x77, 0x2a, 0xd4, 0xff, 0xfb, 0x29, 0xd4, 0xff, 0xff, 0x3d, 0xd8, 0xff, 0xff, 0x57, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x50, 0xdc, 0xff, 0xef, 0x05, 0xcd, 0xff, 0xf8, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x01, 0xcc, 0xff, 0xff, 0x2c, 0xd5, 0xff, 0xff, 0x54, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdd, 0xff, 0x47, 0x52, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xa3, 0x29, 0xd4, 0xff, 0xfc, 0x34, 0xd6, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xfc, 0x55, 0xdd, 0xff, 0xb3, 0x53, 0xdd, 0xff, 0x58, 0x04, 0xcd, 0xff, 0x5c, 0x00, 0xcc, 0xff, 0xb0, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x08, 0xce, 0xff, 0xff, 0x3e, 0xd8, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x54, 0xdd, 0xff, 0x74, 0x54, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd4, 0xff, 0xcb, 0x2d, 0xd5, 0xff, 0xff, 0x4e, 0xdc, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xff, 0x53, 0xdc, 0xff, 0xc0, 0x53, 0xdd, 0xff, 0x5b, 0x53, 0xdd, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x1b, 0x00, 0xcc, 0xff, 0x58, 0x00, 0xcc, 0xff, 0xbf, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x12, 0xd0, 0xff, 0xff, 0x4d, 0xdc, 0xff, 0xff, 0x55, 0xdd, 0xff, 0xa4, 0x54, 0xdd, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0xd3, 0xff, 0x0b, 0x27, 0xd4, 0xff, 0xdc, 0x47, 0xda, 0xff, 0xff, 0x56, 0xdd, 0xff, 0xff, 0x51, 0xdc, 0xff, 0xdb, 0x4e, 0xdc, 0xff, 0x5c, 0x52, 0xdc, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0xd4, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x1b, 0x00, 0xcc, 0xff, 0x5c, 0x00, 0xcc, 0xff, 0xd7, 0x00, 0xcc, 0xff, 0xff, 0x24, 0xd3, 0xff, 0xff, 0x53, 0xdd, 0xff, 0xd3, 0x5d, 0xdf, 0xff, 0x00, 0x39, 0xd7, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xd1, 0xff, 0x30, 0x41, 0xd9, 0xff, 0xef, 0x4f, 0xdc, 0xff, 0xf0, 0x48, 0xdb, 0xff, 0x6b, 0x4a, 0xdb, 0xff, 0x10, 0x3f, 0xda, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x03, 0x00, 0xcc, 0xff, 0x14, 0x00, 0xcc, 0xff, 0x6f, 0x00, 0xcc, 0xff, 0xef, 0x37, 0xd7, 0xff, 0xff, 0x49, 0xda, 0xff, 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, 0x37, 0xd7, 0xff, 0x4b, 0x40, 0xd9, 0xff, 0x70, 0x3a, 0xd8, 0xff, 0x10, 0x43, 0xda, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0xdb, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0xcc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xcc, 0xff, 0x00, 0x00, 0xca, 0xff, 0x10, 0x0c, 0xce, 0xff, 0x90, 0x20, 0xd3, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_img_dsc_t img_star = {
|
||||
|
@ -5,7 +5,7 @@ style = lv.style_t()
|
||||
style.init()
|
||||
style.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP)
|
||||
style.set_flex_main_place(lv.FLEX_ALIGN.SPACE_EVENLY)
|
||||
style.set_layout(lv.LAYOUT_FLEX.value)
|
||||
style.set_layout(lv.LAYOUT.FLEX)
|
||||
|
||||
cont = lv.obj(lv.scr_act())
|
||||
cont.set_size(300, 220)
|
||||
|
@ -11,7 +11,7 @@ cont.set_style_grid_column_dsc_array(col_dsc, 0)
|
||||
cont.set_style_grid_row_dsc_array(row_dsc, 0)
|
||||
cont.set_size(300, 220)
|
||||
cont.center()
|
||||
cont.set_layout(lv.LAYOUT_GRID.value)
|
||||
cont.set_layout(lv.LAYOUT.GRID)
|
||||
|
||||
for i in range(9):
|
||||
col = i % 3
|
||||
|
@ -1,17 +1,2 @@
|
||||
#!/opt/bin/lv_micropython-ffmpeg -i
|
||||
import sys
|
||||
import lvgl as lv
|
||||
import display_driver
|
||||
|
||||
#
|
||||
# Open a video from a file
|
||||
#
|
||||
|
||||
# birds.mp4 is downloaded from http://www.videezy.com (Free Stock Footage by Videezy!)
|
||||
# https://www.videezy.com/abstract/44864-silhouettes-of-birds-over-the-sunset
|
||||
player = lv.ffmpeg_player(lv.scr_act())
|
||||
player.player_set_src("birds.mp4")
|
||||
player.player_set_auto_restart(True)
|
||||
player.player_set_cmd(lv.ffmpeg_player.PLAYER_CMD.START)
|
||||
# player.player_set_cmd(0)
|
||||
player.center()
|
||||
#TODO
|
||||
pass
|
||||
|
@ -1,40 +1,3 @@
|
||||
import fs_driver
|
||||
import sys
|
||||
#TODO
|
||||
pass
|
||||
|
||||
# set LV_USE_FFMPEG to True if it is enabled in lv_conf.h
|
||||
LV_USE_FFMPEG = True
|
||||
LV_FONT_DEFAULT = lv.font_montserrat_14
|
||||
|
||||
fs_drv = lv.fs_drv_t()
|
||||
fs_driver.fs_register(fs_drv, 'A')
|
||||
|
||||
# get the directory in which the script is running
|
||||
try:
|
||||
script_path = __file__[:__file__.rfind('/')] if __file__.find('/') >= 0 else '.'
|
||||
except NameError:
|
||||
script_path = ''
|
||||
|
||||
def get_imgfont_path(font, unicode, unicode_next, offset_y, user_data) :
|
||||
if unicode < 0xf000: None
|
||||
if unicode == 0xF600:
|
||||
if LV_USE_FFMPEG:
|
||||
return bytes(script_path + "/../../assets/emoji/{:04X}.png".format(unicode) + "\0","ascii")
|
||||
else:
|
||||
return bytes("A:"+ script_path + "/../../assets/emoji/{:04X}.png".format(unicode) + "\0","ascii")
|
||||
|
||||
return None
|
||||
|
||||
#
|
||||
# draw img in label or span obj
|
||||
#
|
||||
imgfont = lv.imgfont_create(80, get_imgfont_path, None)
|
||||
if imgfont == None:
|
||||
print("imgfont init error")
|
||||
sys.exit(1)
|
||||
|
||||
imgfont.fallback = LV_FONT_DEFAULT
|
||||
|
||||
label1 = lv.label(lv.scr_act())
|
||||
label1.set_text("12\uF600\uF617AB")
|
||||
label1.set_style_text_font(imgfont, lv.PART.MAIN)
|
||||
label1.center()
|
||||
|
@ -54,7 +54,7 @@ class LV_Example_Msg_2:
|
||||
# Slider
|
||||
slider = lv.slider(panel)
|
||||
slider.set_flex_grow(1)
|
||||
slider.add_flag(lv.OBJ_FLAG_FLEX_IN_NEW_TRACK)
|
||||
slider.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK)
|
||||
slider.add_event(self.slider_event_cb, lv.EVENT.ALL, None)
|
||||
lv.msg_subscribe_obj(MSG_UPDATE, slider, None)
|
||||
|
||||
|
@ -18,7 +18,7 @@ def create_text(parent, icon, txt, builder_variant):
|
||||
label.set_flex_grow(1)
|
||||
|
||||
if builder_variant == LV_MENU_ITEM_BUILDER_VARIANT_2 and icon and txt :
|
||||
img.add_flag(lv.OBJ_FLAG_FLEX_IN_NEW_TRACK)
|
||||
img.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK)
|
||||
img.swap(label)
|
||||
|
||||
return obj
|
||||
@ -34,7 +34,7 @@ def create_slider(parent, icon, txt, min, max, val) :
|
||||
slider.set_value(val, lv.ANIM.OFF)
|
||||
|
||||
if icon == None :
|
||||
slider.add_flag(lv.obj.FLAG_FLEX.IN_NEW_TRACK)
|
||||
slider.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK)
|
||||
|
||||
return obj
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
void lv_example_spinner_1(void)
|
||||
{
|
||||
/*Create a spinner*/
|
||||
lv_obj_t * spinner = lv_spinner_create(lv_scr_act(), 1000, 200);
|
||||
lv_obj_t * spinner = lv_spinner_create(lv_scr_act());
|
||||
lv_obj_set_size(spinner, 100, 100);
|
||||
lv_obj_center(spinner);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Create a spinner
|
||||
spinner = lv.spinner(lv.scr_act(), 1000, 60)
|
||||
spinner = lv.spinner(lv.scr_act())
|
||||
spinner.set_size(100, 100)
|
||||
spinner.center()
|
||||
|
||||
|
@ -11,7 +11,7 @@ static void event_handler(lv_event_t * e)
|
||||
|
||||
void lv_example_win_1(void)
|
||||
{
|
||||
lv_obj_t * win = lv_win_create(lv_scr_act(), 40);
|
||||
lv_obj_t * win = lv_win_create(lv_scr_act());
|
||||
lv_obj_t * btn;
|
||||
btn = lv_win_add_btn(win, LV_SYMBOL_LEFT, 40);
|
||||
lv_obj_add_event(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
@ -5,7 +5,7 @@ def event_handler(e):
|
||||
print("Button {:d} clicked".format(obj.get_child_id()))
|
||||
|
||||
|
||||
win = lv.win(lv.scr_act(), 60)
|
||||
win = lv.win(lv.scr_act())
|
||||
btn1 = win.add_btn(lv.SYMBOL.LEFT, 40)
|
||||
btn1.add_event(event_handler, lv.EVENT.ALL, None)
|
||||
win.add_title("A title")
|
||||
|
@ -68,17 +68,6 @@
|
||||
/*Default display refresh, input device read and animation step period.*/
|
||||
#define LV_DEF_REFR_PERIOD 33 /*[ms]*/
|
||||
|
||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||
#define LV_TICK_CUSTOM 0
|
||||
#if LV_TICK_CUSTOM
|
||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||
/*If using lvgl as ESP32 component*/
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
|
||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||
*(Not so important, you can adjust it to modify default sizes and spaces)*/
|
||||
#define LV_DPI_DEF 130 /*[px/inch]*/
|
||||
@ -99,6 +88,12 @@
|
||||
#define LV_DRAW_BUF_ALIGN 4
|
||||
#endif
|
||||
|
||||
/*Align the stride of all layers and images to this bytes*/
|
||||
#define LV_DRAW_BUF_STRIDE_ALIGN 1
|
||||
|
||||
/*Align the start address of draw_buf addresses to this bytes*/
|
||||
#define LV_DRAW_BUF_ALIGN 4
|
||||
|
||||
/* Max. memory to be used for layers */
|
||||
#define LV_LAYER_MAX_MEMORY_USAGE 150 /*[kB]*/
|
||||
|
||||
@ -150,7 +145,6 @@
|
||||
#define LV_OS_CUSTOM_INCLUDE <stdint.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*=======================
|
||||
* FEATURE CONFIGURATION
|
||||
*=======================*/
|
||||
@ -254,12 +248,11 @@
|
||||
*Only used if software rotation is enabled in the display driver.*/
|
||||
#define LV_DISP_ROT_MAX_BUF (10*1024)
|
||||
|
||||
/*Garbage Collector settings
|
||||
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
||||
#define LV_ENABLE_GC 0
|
||||
#if LV_ENABLE_GC != 0
|
||||
#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
||||
#endif /*LV_ENABLE_GC*/
|
||||
#define LV_ENABLE_GLOBAL_CUSTOM 0
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM
|
||||
/*Header to include for the custom 'lv_global' function"*/
|
||||
#define LV_GLOBAL_CUSTOM_INCLUDE <stdint.h>
|
||||
#endif
|
||||
|
||||
/*Default image cache size. Image caching keeps some images opened.
|
||||
*If only the built-in image formats are used there is no real advantage of caching.
|
||||
|
5
lvgl.h
5
lvgl.h
@ -100,7 +100,7 @@ extern "C" {
|
||||
#include "src/libs/ffmpeg/lv_ffmpeg.h"
|
||||
#include "src/libs/tiny_ttf/lv_tiny_ttf.h"
|
||||
|
||||
#include "src/layouts/lv_layouts.h"
|
||||
#include "src/layouts/lv_layout.h"
|
||||
|
||||
#include "src/draw/lv_draw.h"
|
||||
|
||||
@ -119,6 +119,7 @@ extern "C" {
|
||||
|
||||
#include "src/dev/input/touchscreen/lv_nuttx_touchscreen.h"
|
||||
|
||||
#include "src/core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -180,7 +181,7 @@ static inline int lv_version_patch(void)
|
||||
return LVGL_VERSION_PATCH;
|
||||
}
|
||||
|
||||
static inline const char *lv_version_info(void)
|
||||
static inline const char * lv_version_info(void)
|
||||
{
|
||||
return LVGL_VERSION_INFO;
|
||||
}
|
||||
|
@ -372,6 +372,80 @@ props = [
|
||||
{'name': 'BASE_DIR',
|
||||
'style_type': 'num', 'var_type': 'lv_base_dir_t', 'default':'`LV_BASE_DIR_AUTO`', 'inherited': 1, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set the base direction of the object. The possible values are `LV_BIDI_DIR_LTR/RTL/AUTO`."},
|
||||
|
||||
|
||||
|
||||
{'section': 'Flex', 'dsc':'Flex layout properties.' },
|
||||
|
||||
|
||||
{'name': 'FLEX_FLOW',
|
||||
'style_type': 'num', 'var_type': 'lv_flex_flow_t', 'default':'`LV_FLEX_FLOW_NONE`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines in which direct the flex layout should arrange the children"},
|
||||
|
||||
|
||||
{'name': 'FLEX_MAIN_PLACE',
|
||||
'style_type': 'num', 'var_type': 'lv_flex_align_t', 'default':'`LV_FLEX_ALIGN_NONE`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how to align the children in the direction of flex flow"},
|
||||
|
||||
|
||||
{'name': 'FLEX_CROSS_PLACE',
|
||||
'style_type': 'num', 'var_type': 'lv_flex_align_t', 'default':'`LV_FLEX_ALIGN_NONE`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how to align the children perpendicular to the direction of flex flow"},
|
||||
|
||||
|
||||
{'name': 'FLEX_TRACK_PLACE',
|
||||
'style_type': 'num', 'var_type': 'lv_flex_align_t', 'default':'`LV_FLEX_ALIGN_NONE`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how to align the tracks of the flow"},
|
||||
|
||||
{'name': 'FLEX_GROW',
|
||||
'style_type': 'num', 'var_type': 'uint8_t', 'default':'`LV_FLEX_ALIGN_ROW`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how mayn space to take proprtionally the free space of the object's trach"},
|
||||
|
||||
|
||||
|
||||
{'section': 'Grid', 'dsc':'Grid layout properties.' },
|
||||
|
||||
|
||||
{'name': 'GRID_COLUMN_DSC_ARRAY',
|
||||
'style_type': 'ptr', 'var_type': 'const lv_coord_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "An array to describe the columns of the grid. Should be LV_GRID_TEMPLATE_LAST terminated"},
|
||||
|
||||
{'name': 'GRID_COLUMN_ALIGN',
|
||||
'style_type': 'num', 'var_type': 'lv_grid_align_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how to ditribute the columns"},
|
||||
|
||||
|
||||
{'name': 'GRID_ROW_DSC_ARRAY',
|
||||
'style_type': 'ptr', 'var_type': 'const lv_coord_t *', 'default':'`NULL`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "An array to describe the rows of the grid. Should be LV_GRID_TEMPLATE_LAST terminated"},
|
||||
|
||||
{'name': 'GRID_ROW_ALIGN',
|
||||
'style_type': 'num', 'var_type': 'lv_grid_align_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Defines how to ditribute the rows."},
|
||||
|
||||
{'name': 'GRID_CELL_COLUMN_POS',
|
||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set the column in which the object should be placed"},
|
||||
|
||||
{'name': 'GRID_CELL_X_ALIGN',
|
||||
'style_type': 'num', 'var_type': 'lv_grid_align_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set how to align the object horizontally."},
|
||||
|
||||
{'name': 'GRID_CELL_COLUMN_SPAN',
|
||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set how many columns the object should span. Needs to be >= 1"},
|
||||
|
||||
{'name': 'GRID_CELL_ROW_POS',
|
||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set the row in which the object should be placed"},
|
||||
|
||||
{'name': 'GRID_CELL_Y_ALIGN',
|
||||
'style_type': 'num', 'var_type': 'lv_grid_align_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set how to align the object vertically."},
|
||||
|
||||
{'name': 'GRID_CELL_ROW_SPAN',
|
||||
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':'`LV_GRID_ALIGN_START`', 'inherited': 0, 'layout': 1, 'ext_draw': 0,
|
||||
'dsc': "Set how many rows the object should span. Needs to be >= 1"},
|
||||
]
|
||||
|
||||
|
||||
|
221
src/core/lv_global.h
Normal file
221
src/core/lv_global.h
Normal file
@ -0,0 +1,221 @@
|
||||
/**
|
||||
* @file lv_global.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_GLOBAL_H
|
||||
#define LV_GLOBAL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "../draw/lv_img_cache.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#if LV_USE_DRAW_SW
|
||||
#include "../draw/sw/lv_draw_sw.h"
|
||||
#endif
|
||||
#include "../misc/lv_anim.h"
|
||||
#include "../misc/lv_area.h"
|
||||
#include "../misc/lv_color_op.h"
|
||||
#include "../misc/lv_ll.h"
|
||||
#include "../misc/lv_log.h"
|
||||
#include "../misc/lv_profiler_builtin.h"
|
||||
#include "../misc/lv_style.h"
|
||||
#include "../misc/lv_timer.h"
|
||||
#include "../stdlib/builtin/lv_tlsf.h"
|
||||
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
#include "../font/lv_font_fmt_txt.h"
|
||||
#endif
|
||||
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "../layouts/lv_layout.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define ZERO_MEM_SENTINEL 0xa1b2c3d4
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
struct _lv_disp_t;
|
||||
struct _lv_group_t;
|
||||
struct _my_theme_t;
|
||||
struct _lv_indev_t;
|
||||
struct _lv_event_t;
|
||||
struct _lv_obj_t;
|
||||
|
||||
#if LV_USE_SPAN != 0
|
||||
struct _snippet_stack;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
struct _lv_freetype_context_t;
|
||||
#endif
|
||||
|
||||
typedef struct _lv_global_t {
|
||||
bool inited;
|
||||
|
||||
lv_ll_t disp_ll;
|
||||
struct _lv_disp_t * disp_refresh;
|
||||
struct _lv_disp_t * disp_default;
|
||||
|
||||
lv_ll_t style_trans_ll;
|
||||
bool style_refresh;
|
||||
uint32_t style_custom_table_size;
|
||||
uint16_t style_last_custom_prop_id;
|
||||
uint8_t * style_custom_prop_flag_lookup_table;
|
||||
|
||||
lv_ll_t group_ll;
|
||||
struct _lv_group_t * group_default;
|
||||
|
||||
lv_ll_t indev_ll;
|
||||
struct _lv_indev_t * indev_active;
|
||||
struct _lv_obj_t * indev_obj_active;
|
||||
|
||||
uint32_t layout_count;
|
||||
lv_layout_dsc_t * layout_list;
|
||||
bool layout_update_mutex;
|
||||
|
||||
uint32_t memory_zero;
|
||||
uint32_t math_rand_seed;
|
||||
lv_area_transform_cache_t area_trans_cache;
|
||||
|
||||
struct _lv_event_t * event_header;
|
||||
uint32_t event_last_register_id;
|
||||
|
||||
lv_timer_state_t timer_state;
|
||||
lv_anim_state_t anim_state;
|
||||
lv_tick_state_t tick_state;
|
||||
|
||||
lv_ll_t img_decoder_ll;
|
||||
lv_img_cache_manager_t img_cache_mgr;
|
||||
#if LV_IMG_CACHE_DEF_SIZE
|
||||
uint16_t img_cache_entry_cnt;
|
||||
_lv_img_cache_entry_t * img_cache_array;
|
||||
#else
|
||||
_lv_img_cache_entry_t img_cache_single;
|
||||
#endif
|
||||
|
||||
lv_draw_cache_t draw_cache;
|
||||
#if defined(LV_DRAW_SW_SHADOW_CACHE_SIZE) && LV_DRAW_SW_SHADOW_CACHE_SIZE > 0
|
||||
lv_draw_sw_shadow_cache_t sw_shadow_cache;
|
||||
#endif
|
||||
#if LV_DRAW_SW_COMPLEX
|
||||
_lv_draw_sw_mask_radius_circle_dsc_arr_t sw_circle_cache;
|
||||
#endif
|
||||
|
||||
lv_log_print_g_cb_t custom_log_print_cb;
|
||||
#if LV_LOG_USE_TIMESTAMP
|
||||
uint32_t log_last_log_time;
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_BASIC
|
||||
struct _my_theme_t * theme_basic;
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
struct _my_theme_t * theme_default;
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_MONO
|
||||
struct _my_theme_t * theme_mono;
|
||||
#endif
|
||||
|
||||
#if LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||||
lv_tlsf_state_t tlsf_state;
|
||||
#endif
|
||||
|
||||
lv_ll_t fsdrv_ll;
|
||||
#if LV_USE_FS_STDIO != '\0'
|
||||
lv_fs_drv_t stdio_fs_drv;
|
||||
#endif
|
||||
#if LV_USE_FS_POSIX
|
||||
lv_fs_drv_t posix_fs_drv;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_FATFS
|
||||
lv_fs_drv_t fatfs_fs_drv;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_WIN32 != '\0'
|
||||
lv_fs_drv_t win32_fs_drv;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
struct _lv_freetype_context_t * ft_context;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
lv_font_fmt_rle_t font_fmt_rle;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SPAN != 0
|
||||
struct _snippet_stack * span_snippet_stack;
|
||||
#endif
|
||||
|
||||
#if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN
|
||||
lv_profiler_builtin_ctx_t profiler_context;
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSG
|
||||
bool msg_restart_notify;
|
||||
unsigned int msg_recursion_counter;
|
||||
lv_ll_t msg_subs_ll;
|
||||
#endif
|
||||
|
||||
#if LV_USE_FILE_EXPLORER != 0
|
||||
lv_style_t fe_list_btn_style;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SYSMON && LV_USE_PERF_MONITOR
|
||||
void * sysmon_perf_info;
|
||||
#endif
|
||||
|
||||
#if LV_USE_IME_PINYIN != 0
|
||||
uint16_t ime_cand_len;
|
||||
#endif
|
||||
} lv_global_t;
|
||||
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM
|
||||
#include LV_GLOBAL_CUSTOM_INCLUDE
|
||||
|
||||
#ifndef LV_GLOBAL_CUSTOM
|
||||
#define LV_GLOBAL_CUSTOM() lv_global_default()
|
||||
#endif
|
||||
#define LV_GLOBAL_DEFAULT() LV_GLOBAL_CUSTOM()
|
||||
#else
|
||||
extern lv_global_t lv_global;
|
||||
#define LV_GLOBAL_DEFAULT() (&lv_global)
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM
|
||||
/**
|
||||
* Get the default global object for current thread
|
||||
* @return pointer to the default global object
|
||||
*/
|
||||
lv_global_t * lv_global_default(void);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_GLOBAL_H*/
|
@ -9,13 +9,15 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "lv_group.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../indev/lv_indev.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define default_group LV_GLOBAL_DEFAULT()->group_default
|
||||
#define group_ll_p &(LV_GLOBAL_DEFAULT()->group_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -32,7 +34,6 @@ static lv_indev_t * get_indev(const lv_group_t * g);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_group_t * default_group;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -44,12 +45,12 @@ static lv_group_t * default_group;
|
||||
|
||||
void _lv_group_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_group_ll), sizeof(lv_group_t));
|
||||
_lv_ll_init(group_ll_p, sizeof(lv_group_t));
|
||||
}
|
||||
|
||||
lv_group_t * lv_group_create(void)
|
||||
{
|
||||
lv_group_t * group = _lv_ll_ins_head(&LV_GC_ROOT(_lv_group_ll));
|
||||
lv_group_t * group = _lv_ll_ins_head(group_ll_p);
|
||||
LV_ASSERT_MALLOC(group);
|
||||
if(group == NULL) return NULL;
|
||||
_lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *));
|
||||
@ -93,7 +94,7 @@ void lv_group_del(lv_group_t * group)
|
||||
if(group == lv_group_get_default()) lv_group_set_default(NULL);
|
||||
|
||||
_lv_ll_clear(&(group->obj_ll));
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_group_ll), group);
|
||||
_lv_ll_remove(group_ll_p, group);
|
||||
lv_free(group);
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,9 @@ typedef enum {
|
||||
LV_OBJ_FLAG_IGNORE_LAYOUT = (1L << 17), /**< Make the object position-able by the layouts*/
|
||||
LV_OBJ_FLAG_FLOATING = (1L << 18), /**< Do not scroll the object when the parent scrolls and ignore layout*/
|
||||
LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS = (1L << 19), /**< Send `LV_EVENT_DRAW_TASK_ADDED` events*/
|
||||
#if LV_USE_FLEX
|
||||
LV_OBJ_FLAG_FLEX_IN_NEW_TRACK = (1L << 20), /**< Start a new flex track on this item*/
|
||||
#endif
|
||||
|
||||
LV_OBJ_FLAG_LAYOUT_1 = (1L << 23), /**< Custom flag, free to use by layouts*/
|
||||
LV_OBJ_FLAG_LAYOUT_2 = (1L << 24), /**< Custom flag, free to use by layouts*/
|
||||
|
@ -10,12 +10,13 @@
|
||||
#include "../disp/lv_disp.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "lv_refr.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define MY_CLASS &lv_obj_class
|
||||
#define update_layout_mutex LV_GLOBAL_DEFAULT()->layout_update_mutex
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -32,7 +33,6 @@ static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static uint32_t layout_cnt;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -288,12 +288,11 @@ void lv_obj_mark_layout_as_dirty(lv_obj_t * obj)
|
||||
|
||||
void lv_obj_update_layout(const lv_obj_t * obj)
|
||||
{
|
||||
static bool mutex = false;
|
||||
if(mutex) {
|
||||
if(update_layout_mutex) {
|
||||
LV_LOG_TRACE("Already running, returning");
|
||||
return;
|
||||
}
|
||||
mutex = true;
|
||||
update_layout_mutex = true;
|
||||
|
||||
lv_obj_t * scr = lv_obj_get_screen(obj);
|
||||
/*Repeat until there are no more layout invalidations*/
|
||||
@ -304,18 +303,7 @@ void lv_obj_update_layout(const lv_obj_t * obj)
|
||||
LV_LOG_TRACE("Layout update end");
|
||||
}
|
||||
|
||||
mutex = false;
|
||||
}
|
||||
|
||||
uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data)
|
||||
{
|
||||
layout_cnt++;
|
||||
LV_GC_ROOT(_lv_layout_list) = lv_realloc(LV_GC_ROOT(_lv_layout_list), layout_cnt * sizeof(lv_layout_dsc_t));
|
||||
LV_ASSERT_MALLOC(LV_GC_ROOT(_lv_layout_list));
|
||||
|
||||
LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].cb = cb;
|
||||
LV_GC_ROOT(_lv_layout_list)[layout_cnt - 1].user_data = user_data;
|
||||
return layout_cnt; /*No -1 to skip 0th index*/
|
||||
update_layout_mutex = false;
|
||||
}
|
||||
|
||||
void lv_obj_set_align(lv_obj_t * obj, lv_align_t align)
|
||||
@ -1120,11 +1108,7 @@ static void layout_update_core(lv_obj_t * obj)
|
||||
lv_obj_refr_pos(obj);
|
||||
|
||||
if(child_cnt > 0) {
|
||||
uint32_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);
|
||||
if(layout_id > 0 && layout_id <= layout_cnt) {
|
||||
void * user_data = LV_GC_ROOT(_lv_layout_list)[layout_id - 1].user_data;
|
||||
LV_GC_ROOT(_lv_layout_list)[layout_id - 1].cb(obj, user_data);
|
||||
}
|
||||
_lv_layout_apply(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,13 +22,6 @@ extern "C" {
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
struct _lv_obj_t;
|
||||
|
||||
typedef void (*lv_layout_update_cb_t)(struct _lv_obj_t *, void * user_data);
|
||||
typedef struct {
|
||||
lv_layout_update_cb_t cb;
|
||||
void * user_data;
|
||||
} lv_layout_dsc_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
@ -152,14 +145,6 @@ void lv_obj_mark_layout_as_dirty(struct _lv_obj_t * obj);
|
||||
*/
|
||||
void lv_obj_update_layout(const struct _lv_obj_t * obj);
|
||||
|
||||
/**
|
||||
* Register a new layout
|
||||
* @param cb the layout update callback
|
||||
* @param user_data custom data that will be passed to `cb`
|
||||
* @return the ID of the new layout
|
||||
*/
|
||||
uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data);
|
||||
|
||||
/**
|
||||
* Change the alignment of an object.
|
||||
* @param obj pointer to an object to align
|
||||
|
@ -9,14 +9,16 @@
|
||||
#include "lv_obj.h"
|
||||
#include "../disp/lv_disp.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_color.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
|
||||
#include "../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define MY_CLASS &lv_obj_class
|
||||
#define style_refr LV_GLOBAL_DEFAULT()->style_refresh
|
||||
#define style_trans_ll_p &(LV_GLOBAL_DEFAULT()->style_trans_ll)
|
||||
#define style_custom_prop_flag_lookup_table LV_GLOBAL_DEFAULT()->style_custom_prop_flag_lookup_table
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -63,7 +65,6 @@ static bool style_has_flag(const lv_style_t * style, uint32_t flag);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static bool style_refr = true;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -75,7 +76,7 @@ static bool style_refr = true;
|
||||
|
||||
void _lv_obj_style_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_obj_style_trans_ll), sizeof(trans_t));
|
||||
_lv_ll_init(style_trans_ll_p, sizeof(trans_t));
|
||||
}
|
||||
|
||||
void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector)
|
||||
@ -398,7 +399,7 @@ lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_
|
||||
inheritable = _lv_style_builtin_prop_flag_lookup_table[prop] & LV_STYLE_PROP_FLAG_INHERITABLE;
|
||||
}
|
||||
else {
|
||||
inheritable = LV_GC_ROOT(_lv_style_custom_prop_flag_lookup_table)[prop - _LV_STYLE_NUM_BUILT_IN_PROPS] &
|
||||
inheritable = style_custom_prop_flag_lookup_table[prop - _LV_STYLE_NUM_BUILT_IN_PROPS] &
|
||||
LV_STYLE_PROP_FLAG_INHERITABLE;
|
||||
}
|
||||
|
||||
@ -535,7 +536,7 @@ void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t
|
||||
}
|
||||
}
|
||||
|
||||
tr = _lv_ll_ins_head(&LV_GC_ROOT(_lv_obj_style_trans_ll));
|
||||
tr = _lv_ll_ins_head(style_trans_ll_p);
|
||||
LV_ASSERT_MALLOC(tr);
|
||||
if(tr == NULL) return;
|
||||
tr->start_value = v1;
|
||||
@ -885,12 +886,12 @@ static bool trans_del(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, tran
|
||||
trans_t * tr;
|
||||
trans_t * tr_prev;
|
||||
bool removed = false;
|
||||
tr = _lv_ll_get_tail(&LV_GC_ROOT(_lv_obj_style_trans_ll));
|
||||
tr = _lv_ll_get_tail(style_trans_ll_p);
|
||||
while(tr != NULL) {
|
||||
if(tr == tr_limit) break;
|
||||
|
||||
/*'tr' might be deleted, so get the next object while 'tr' is valid*/
|
||||
tr_prev = _lv_ll_get_prev(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
|
||||
tr_prev = _lv_ll_get_prev(style_trans_ll_p, tr);
|
||||
|
||||
if(tr->obj == obj && (part == tr->selector || part == LV_PART_ANY) && (prop == tr->prop || prop == LV_STYLE_PROP_ANY)) {
|
||||
/*Remove any transitioned properties from the trans. style
|
||||
@ -904,7 +905,7 @@ static bool trans_del(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop, tran
|
||||
|
||||
/*Free the transition descriptor too*/
|
||||
lv_anim_del(tr, NULL);
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
|
||||
_lv_ll_remove(style_trans_ll_p, tr);
|
||||
lv_free(tr);
|
||||
removed = true;
|
||||
|
||||
@ -1011,7 +1012,7 @@ static void trans_anim_ready_cb(lv_anim_t * a)
|
||||
*It allows changing it by normal styles*/
|
||||
bool running = false;
|
||||
trans_t * tr_i;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr_i) {
|
||||
_LV_LL_READ(style_trans_ll_p, tr_i) {
|
||||
if(tr_i != tr && tr_i->obj == tr->obj && tr_i->selector == tr->selector && tr_i->prop == tr->prop) {
|
||||
running = true;
|
||||
break;
|
||||
@ -1022,7 +1023,7 @@ static void trans_anim_ready_cb(lv_anim_t * a)
|
||||
uint32_t i;
|
||||
for(i = 0; i < obj->style_cnt; i++) {
|
||||
if(obj->styles[i].is_trans && obj->styles[i].selector == tr->selector) {
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_obj_style_trans_ll), tr);
|
||||
_lv_ll_remove(style_trans_ll_p, tr);
|
||||
lv_free(tr);
|
||||
|
||||
_lv_obj_style_t * obj_style = &obj->styles[i];
|
||||
|
@ -690,7 +690,8 @@ void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_styl
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector)
|
||||
void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value,
|
||||
lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
@ -721,3 +722,124 @@ void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_s
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_flow(struct _lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_FLOW, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_main_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_MAIN_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_cross_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_CROSS_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_track_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_TRACK_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_grow(struct _lv_obj_t * obj, uint8_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_GROW, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value,
|
||||
lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_DSC_ARRAY, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_column_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_row_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_ROW_DSC_ARRAY, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_row_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_ROW_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_column_pos(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_COLUMN_POS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_x_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_X_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_column_span(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_COLUMN_SPAN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_row_pos(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_ROW_POS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_y_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_Y_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_row_span(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_ROW_SPAN, v, selector);
|
||||
}
|
||||
|
@ -615,6 +615,96 @@ static inline lv_base_dir_t lv_obj_get_style_base_dir(const struct _lv_obj_t * o
|
||||
return (lv_base_dir_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW);
|
||||
return (lv_flex_flow_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_main_place(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_MAIN_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_cross_place(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_CROSS_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_track_place(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_TRACK_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint8_t lv_obj_get_style_flex_grow(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_GROW);
|
||||
return (uint8_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_coord_t * lv_obj_get_style_grid_column_dsc_array(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY);
|
||||
return (const lv_coord_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_column_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline const lv_coord_t * lv_obj_get_style_grid_row_dsc_array(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_DSC_ARRAY);
|
||||
return (const lv_coord_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_row_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_column_pos(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_POS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_X_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_column_span(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_SPAN);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_row_pos(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_POS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_Y_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_row_span(const struct _lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_SPAN);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
void lv_obj_set_style_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_min_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_max_width(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
@ -708,5 +798,22 @@ void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transiti
|
||||
void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_flow(struct _lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_main_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_cross_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_track_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_grow(struct _lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value,
|
||||
lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_column_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_row_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value,
|
||||
lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_row_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_column_pos(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_x_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_column_span(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_row_pos(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_y_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_row_span(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
|
||||
#endif /* LV_OBJ_STYLE_GEN_H */
|
||||
|
@ -14,13 +14,14 @@
|
||||
#include "../disp/lv_disp.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "../misc/lv_anim.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_async.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define MY_CLASS &lv_obj_class
|
||||
#define disp_ll_p &(LV_GLOBAL_DEFAULT()->disp_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -288,7 +289,8 @@ lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj)
|
||||
else scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/
|
||||
|
||||
lv_disp_t * d;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_disp_ll), d) {
|
||||
lv_ll_t * disp_head = disp_ll_p;
|
||||
_LV_LL_READ(disp_head, d) {
|
||||
uint32_t i;
|
||||
for(i = 0; i < d->screen_cnt; i++) {
|
||||
if(d->screens[i] == scr) return d;
|
||||
|
@ -13,15 +13,19 @@
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "../misc/lv_timer.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_profiler.h"
|
||||
#include "../draw/lv_draw.h"
|
||||
#include "../font/lv_font_fmt_txt.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/*Display being refreshed*/
|
||||
#define disp_refr LV_GLOBAL_DEFAULT()->disp_refresh
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -44,8 +48,6 @@ static void call_flush_cb(lv_disp_t * disp, const lv_area_t * area, uint8_t * px
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
static lv_disp_t * disp_refr; /*Display being refreshed*/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
@ -53,9 +53,6 @@ void _lv_sdl_mousewheel_handler(SDL_Event * event);
|
||||
void _lv_sdl_keyboard_handler(SDL_Event * event);
|
||||
static void res_chg_event_cb(lv_event_t * e);
|
||||
|
||||
#if !LV_TICK_CUSTOM
|
||||
static int tick_thread(void * ptr);
|
||||
#endif
|
||||
static bool inited = false;
|
||||
|
||||
/**********************
|
||||
@ -77,9 +74,7 @@ lv_disp_t * lv_sdl_window_create(lv_coord_t hor_res, lv_coord_t ver_res)
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
SDL_StartTextInput();
|
||||
event_handler_timer = lv_timer_create(sdl_event_handler, 5, NULL);
|
||||
#if !LV_TICK_CUSTOM
|
||||
SDL_CreateThread(tick_thread, "LVGL thread", NULL);
|
||||
#endif
|
||||
lv_tick_set_cb(SDL_GetTicks);
|
||||
inited = true;
|
||||
}
|
||||
|
||||
@ -352,23 +347,6 @@ static void res_chg_event_cb(lv_event_t * e)
|
||||
texture_resize(disp);
|
||||
}
|
||||
|
||||
#if !LV_TICK_CUSTOM
|
||||
static int tick_thread(void * ptr)
|
||||
{
|
||||
LV_UNUSED(ptr);
|
||||
static uint32_t tick_prev = 0;
|
||||
|
||||
while(1) {
|
||||
uint32_t tick_now = SDL_GetTicks();
|
||||
lv_tick_inc(tick_now - tick_prev);
|
||||
tick_prev = tick_now;
|
||||
SDL_Delay(5);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void release_disp_cb(lv_event_t * e)
|
||||
{
|
||||
lv_disp_t * disp = (lv_disp_t *) lv_event_get_user_data(e);
|
||||
|
@ -10,9 +10,9 @@
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../core/lv_refr.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "../themes/lv_theme.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
#if LV_USE_DRAW_SW
|
||||
#include "../draw/sw/lv_draw_sw.h"
|
||||
@ -22,6 +22,8 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define disp_def LV_GLOBAL_DEFAULT()->disp_default
|
||||
#define disp_ll_p &(LV_GLOBAL_DEFAULT()->disp_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -44,7 +46,6 @@ static void disp_event_cb(lv_event_t * e);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_disp_t * disp_def;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -56,7 +57,7 @@ static lv_disp_t * disp_def;
|
||||
|
||||
lv_disp_t * lv_disp_create(lv_coord_t hor_res, lv_coord_t ver_res)
|
||||
{
|
||||
lv_disp_t * disp = _lv_ll_ins_head(&LV_GC_ROOT(_lv_disp_ll));
|
||||
lv_disp_t * disp = _lv_ll_ins_head(disp_ll_p);
|
||||
LV_ASSERT_MALLOC(disp);
|
||||
if(!disp) return NULL;
|
||||
|
||||
@ -167,11 +168,11 @@ void lv_disp_remove(lv_disp_t * disp)
|
||||
lv_obj_del(disp->screens[0]);
|
||||
}
|
||||
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_disp_ll), disp);
|
||||
_lv_ll_remove(disp_ll_p, disp);
|
||||
if(disp->refr_timer) lv_timer_del(disp->refr_timer);
|
||||
lv_free(disp);
|
||||
|
||||
if(was_default) lv_disp_set_default(_lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)));
|
||||
if(was_default) lv_disp_set_default(_lv_ll_get_head(disp_ll_p));
|
||||
}
|
||||
|
||||
void lv_disp_set_default(lv_disp_t * disp)
|
||||
@ -187,9 +188,9 @@ lv_disp_t * lv_disp_get_default(void)
|
||||
lv_disp_t * lv_disp_get_next(lv_disp_t * disp)
|
||||
{
|
||||
if(disp == NULL)
|
||||
return _lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll));
|
||||
return _lv_ll_get_head(disp_ll_p);
|
||||
else
|
||||
return _lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp);
|
||||
return _lv_ll_get_next(disp_ll_p, disp);
|
||||
}
|
||||
|
||||
/*---------------------
|
||||
|
@ -9,13 +9,14 @@
|
||||
#include "lv_draw.h"
|
||||
#include "sw/lv_draw_sw.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../core/lv_refr.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define _draw_cache LV_GLOBAL_DEFAULT()->draw_cache
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -29,13 +30,6 @@ static bool is_independent(lv_layer_t * layer, lv_draw_task_t * t_check);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if LV_USE_OS
|
||||
static lv_thread_sync_t sync;
|
||||
#else
|
||||
static int dispatch_req = 0;
|
||||
#endif
|
||||
|
||||
static uint32_t used_memory_for_layers_kb = 0;
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@ -52,7 +46,7 @@ static uint32_t used_memory_for_layers_kb = 0;
|
||||
void lv_draw_init(void)
|
||||
{
|
||||
#if LV_USE_OS
|
||||
lv_thread_sync_init(&sync);
|
||||
lv_thread_sync_init(&_draw_cache.sync);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -61,8 +55,8 @@ void * lv_draw_create_unit(size_t size)
|
||||
lv_draw_unit_t * new_unit = lv_malloc(size);
|
||||
lv_memzero(new_unit, size);
|
||||
|
||||
new_unit->next = LV_GC_ROOT(_lv_draw_unit_head);
|
||||
LV_GC_ROOT(_lv_draw_unit_head) = new_unit;
|
||||
new_unit->next = _draw_cache.unit_head;
|
||||
_draw_cache.unit_head = new_unit;
|
||||
|
||||
return new_unit;
|
||||
}
|
||||
@ -102,14 +96,15 @@ void lv_draw_finalize_task_creation(lv_layer_t * layer, lv_draw_task_t * t)
|
||||
*and not on the draw tasks added in the event.
|
||||
*Sending LV_EVENT_DRAW_TASK_ADDED events might cause recursive event sends
|
||||
*Dispatching might remove the "main" draw task while it's still being used in the event*/
|
||||
static bool running = false;
|
||||
if(running == false) {
|
||||
running = true;
|
||||
lv_draw_cache_t * cache = &_draw_cache;
|
||||
|
||||
if(cache->task_running == false) {
|
||||
cache->task_running = true;
|
||||
if(base_dsc->obj && lv_obj_has_flag(base_dsc->obj, LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS)) {
|
||||
lv_obj_send_event(base_dsc->obj, LV_EVENT_DRAW_TASK_ADDED, t);
|
||||
}
|
||||
lv_draw_dispatch();
|
||||
running = false;
|
||||
cache->task_running = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,8 +149,8 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer)
|
||||
uint32_t layer_size_byte = layer_drawn->draw_buf.height * lv_draw_buf_width_to_stride(layer_drawn->draw_buf.width,
|
||||
layer_drawn->draw_buf.color_format);
|
||||
|
||||
used_memory_for_layers_kb -= layer_size_byte < 1024 ? 1 : layer_size_byte >> 10;
|
||||
LV_LOG_INFO("Layer memory used: %d kB\n", used_memory_for_layers_kb);
|
||||
_draw_cache.used_memory_for_layers_kb -= layer_size_byte < 1024 ? 1 : layer_size_byte >> 10;
|
||||
LV_LOG_INFO("Layer memory used: %d kB\n", _draw_cache.used_memory_for_layers_kb);
|
||||
lv_draw_buf_free(&layer_drawn->draw_buf);
|
||||
}
|
||||
|
||||
@ -216,7 +211,7 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer)
|
||||
uint32_t layer_size_byte = layer->draw_buf.height * lv_draw_buf_width_to_stride(layer->draw_buf.width,
|
||||
layer->draw_buf.color_format);
|
||||
uint32_t kb = layer_size_byte < 1024 ? 1 : layer_size_byte >> 10;
|
||||
if(used_memory_for_layers_kb + kb > LV_LAYER_MAX_MEMORY_USAGE) {
|
||||
if(_draw_cache.used_memory_for_layers_kb + kb > LV_LAYER_MAX_MEMORY_USAGE) {
|
||||
layer_ok = false;
|
||||
}
|
||||
}
|
||||
@ -224,7 +219,7 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer)
|
||||
if(layer_ok) {
|
||||
/*Find a draw unit which is not busy and can take at least one task*/
|
||||
/*Let all draw units to pick draw tasks*/
|
||||
lv_draw_unit_t * u = LV_GC_ROOT(_lv_draw_unit_head);
|
||||
lv_draw_unit_t * u = _draw_cache.unit_head;
|
||||
while(u) {
|
||||
int32_t taken_cnt = u->dispatch(u, layer);
|
||||
if(taken_cnt < 0) {
|
||||
@ -243,19 +238,19 @@ bool lv_draw_dispatch_layer(struct _lv_disp_t * disp, lv_layer_t * layer)
|
||||
void lv_draw_dispatch_wait_for_request(void)
|
||||
{
|
||||
#if LV_USE_OS
|
||||
lv_thread_sync_wait(&sync);
|
||||
lv_thread_sync_wait(&_draw_cache.sync);
|
||||
#else
|
||||
while(!dispatch_req);
|
||||
dispatch_req = 0;
|
||||
while(!_draw_cache.dispatch_req);
|
||||
_draw_cache.dispatch_req = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void lv_draw_dispatch_request(void)
|
||||
{
|
||||
#if LV_USE_OS
|
||||
lv_thread_sync_signal(&sync);
|
||||
lv_thread_sync_signal(&_draw_cache.sync);
|
||||
#else
|
||||
dispatch_req = 1;
|
||||
_draw_cache.dispatch_req = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -326,12 +321,11 @@ void lv_draw_layer_get_area(lv_layer_t * layer, lv_area_t * area)
|
||||
|
||||
void lv_draw_add_used_layer_size(uint32_t kb)
|
||||
{
|
||||
used_memory_for_layers_kb += kb;
|
||||
LV_LOG_INFO("Layer memory used: %d kB\n", used_memory_for_layers_kb);
|
||||
_draw_cache.used_memory_for_layers_kb += kb;
|
||||
LV_LOG_INFO("Layer memory used: %d kB\n", _draw_cache.used_memory_for_layers_kb);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
@ -20,6 +20,7 @@ extern "C" {
|
||||
#include "../misc/lv_profiler.h"
|
||||
#include "lv_img_decoder.h"
|
||||
#include "lv_img_cache.h"
|
||||
#include "../osal/lv_os.h"
|
||||
#include "draw_buf/lv_draw_buf.h"
|
||||
|
||||
/*********************
|
||||
@ -141,6 +142,18 @@ typedef struct {
|
||||
lv_layer_t * layer;
|
||||
} lv_draw_dsc_base_t;
|
||||
|
||||
typedef struct {
|
||||
lv_draw_unit_t * unit_head;
|
||||
uint32_t used_memory_for_layers_kb;
|
||||
#if LV_USE_OS
|
||||
lv_thread_sync_t sync;
|
||||
lv_mutex_t circle_cache_mutex;
|
||||
#else
|
||||
int dispatch_req;
|
||||
#endif
|
||||
bool task_running;
|
||||
} lv_draw_cache_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
@ -8,10 +8,12 @@
|
||||
*********************/
|
||||
#include "lv_img_cache.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define img_cache_manager LV_GLOBAL_DEFAULT()->img_cache_mgr
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -25,8 +27,6 @@
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
static lv_img_cache_manager_t img_cache_manager = { 0 };
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
@ -12,11 +12,19 @@
|
||||
#include "lv_draw_img.h"
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#if LV_IMG_CACHE_DEF_SIZE
|
||||
#define entry_cnt LV_GLOBAL_DEFAULT()->img_cache_entry_cnt
|
||||
#define _img_cache_array LV_GLOBAL_DEFAULT()->img_cache_array
|
||||
#else
|
||||
#define _img_cache_single LV_GLOBAL_DEFAULT()->img_cache_single
|
||||
#endif
|
||||
|
||||
|
||||
/** Count the cache entries's life. Add `time_to_open` to `life` when the entry is used.
|
||||
* Decrement all lifes by one every in every ::lv_img_cache_open.
|
||||
@ -53,9 +61,6 @@ static void lv_img_cache_invalidate_src_builtin(const void * src);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if LV_IMG_CACHE_DEF_SIZE
|
||||
static uint16_t entry_cnt;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -102,7 +107,7 @@ static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);
|
||||
_lv_img_cache_entry_t * cache = _img_cache_array;
|
||||
|
||||
/*Decrement all lifes. Make the entries older*/
|
||||
uint16_t i;
|
||||
@ -149,7 +154,7 @@ static _lv_img_cache_entry_t * _lv_img_cache_open_builtin(const void * src, lv_c
|
||||
LV_LOG_INFO("image draw: cache miss, cached to an empty entry");
|
||||
}
|
||||
#else
|
||||
cached_src = &LV_GC_ROOT(_lv_img_cache_single);
|
||||
cached_src = &(_img_cache_single);
|
||||
#endif
|
||||
/*Open the image and measure the time to open*/
|
||||
uint32_t t_start = lv_tick_get();
|
||||
@ -185,23 +190,23 @@ static void lv_img_cache_set_size_builtin(uint16_t new_entry_cnt)
|
||||
LV_UNUSED(new_entry_cnt);
|
||||
LV_LOG_WARN("Can't change cache size because it's disabled by LV_IMG_CACHE_DEF_SIZE = 0");
|
||||
#else
|
||||
if(LV_GC_ROOT(_lv_img_cache_array) != NULL) {
|
||||
if(_img_cache_array != NULL) {
|
||||
/*Clean the cache before free it*/
|
||||
lv_img_cache_invalidate_src_builtin(NULL);
|
||||
lv_free(LV_GC_ROOT(_lv_img_cache_array));
|
||||
lv_free(_img_cache_array);
|
||||
}
|
||||
|
||||
/*Reallocate the cache*/
|
||||
LV_GC_ROOT(_lv_img_cache_array) = lv_malloc(sizeof(_lv_img_cache_entry_t) * new_entry_cnt);
|
||||
LV_ASSERT_MALLOC(LV_GC_ROOT(_lv_img_cache_array));
|
||||
if(LV_GC_ROOT(_lv_img_cache_array) == NULL) {
|
||||
_img_cache_array = lv_malloc(sizeof(_lv_img_cache_entry_t) * new_entry_cnt);
|
||||
LV_ASSERT_MALLOC(_img_cache_array);
|
||||
if(_img_cache_array == NULL) {
|
||||
entry_cnt = 0;
|
||||
return;
|
||||
}
|
||||
entry_cnt = new_entry_cnt;
|
||||
|
||||
/*Clean the cache*/
|
||||
lv_memzero(LV_GC_ROOT(_lv_img_cache_array), entry_cnt * sizeof(_lv_img_cache_entry_t));
|
||||
lv_memzero(_img_cache_array, entry_cnt * sizeof(_lv_img_cache_entry_t));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -214,7 +219,7 @@ static void lv_img_cache_invalidate_src_builtin(const void * src)
|
||||
{
|
||||
LV_UNUSED(src);
|
||||
#if LV_IMG_CACHE_DEF_SIZE
|
||||
_lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);
|
||||
_lv_img_cache_entry_t * cache = _img_cache_array;
|
||||
|
||||
uint16_t i;
|
||||
for(i = 0; i < entry_cnt; i++) {
|
||||
|
@ -10,12 +10,13 @@
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../draw/lv_draw_img.h"
|
||||
#include "../misc/lv_ll.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define img_decoder_ll_p &(LV_GLOBAL_DEFAULT()->img_decoder_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -50,7 +51,7 @@ static lv_res_t decode_indexed_line(lv_color_format_t color_format, const lv_col
|
||||
*/
|
||||
void _lv_img_decoder_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_img_decoder_ll), sizeof(lv_img_decoder_t));
|
||||
_lv_ll_init(img_decoder_ll_p, sizeof(lv_img_decoder_t));
|
||||
|
||||
lv_img_decoder_t * decoder;
|
||||
|
||||
@ -88,7 +89,7 @@ lv_res_t lv_img_decoder_get_info(const void * src, lv_img_header_t * header)
|
||||
|
||||
lv_res_t res = LV_RES_INV;
|
||||
lv_img_decoder_t * d;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_img_decoder_ll), d) {
|
||||
_LV_LL_READ(img_decoder_ll_p, d) {
|
||||
if(d->info_cb) {
|
||||
res = d->info_cb(d, src, header);
|
||||
if(res == LV_RES_OK) break;
|
||||
@ -130,7 +131,7 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, lv_co
|
||||
lv_res_t res = LV_RES_INV;
|
||||
|
||||
lv_img_decoder_t * decoder;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_img_decoder_ll), decoder) {
|
||||
_LV_LL_READ(img_decoder_ll_p, decoder) {
|
||||
/*Info and Open callbacks are required*/
|
||||
if(decoder->info_cb == NULL || decoder->open_cb == NULL) continue;
|
||||
|
||||
@ -198,7 +199,7 @@ void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
|
||||
lv_img_decoder_t * lv_img_decoder_create(void)
|
||||
{
|
||||
lv_img_decoder_t * decoder;
|
||||
decoder = _lv_ll_ins_head(&LV_GC_ROOT(_lv_img_decoder_ll));
|
||||
decoder = _lv_ll_ins_head(img_decoder_ll_p);
|
||||
LV_ASSERT_MALLOC(decoder);
|
||||
if(decoder == NULL) return NULL;
|
||||
|
||||
@ -213,7 +214,7 @@ lv_img_decoder_t * lv_img_decoder_create(void)
|
||||
*/
|
||||
void lv_img_decoder_delete(lv_img_decoder_t * decoder)
|
||||
{
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_img_decoder_ll), decoder);
|
||||
_lv_ll_remove(img_decoder_ll_p, decoder);
|
||||
lv_free(decoder);
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,14 @@ typedef struct {
|
||||
uint32_t idx;
|
||||
} lv_draw_sw_unit_t;
|
||||
|
||||
#if LV_DRAW_SW_SHADOW_CACHE_SIZE
|
||||
typedef struct {
|
||||
uint8_t cache[LV_DRAW_SW_SHADOW_CACHE_SIZE * LV_DRAW_SW_SHADOW_CACHE_SIZE];
|
||||
int32_t cache_size;
|
||||
int32_t cache_r;
|
||||
} lv_draw_sw_shadow_cache_t;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
@ -10,6 +10,7 @@
|
||||
#if LV_USE_DRAW_SW
|
||||
|
||||
#include "blend/lv_draw_sw_blend.h"
|
||||
#include "../../core/lv_global.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../core/lv_refr.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
@ -22,6 +23,10 @@
|
||||
#define SHADOW_UPSCALE_SHIFT 6
|
||||
#define SHADOW_ENHANCE 1
|
||||
|
||||
#if defined(LV_DRAW_SW_SHADOW_CACHE_SIZE) && LV_DRAW_SW_SHADOW_CACHE_SIZE > 0
|
||||
#define shadow_cache LV_GLOBAL_DEFAULT()->sw_shadow_cache
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -39,11 +44,6 @@ LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if defined(LV_DRAW_SW_SHADOW_CACHE_SIZE) && LV_DRAW_SW_SHADOW_CACHE_SIZE > 0
|
||||
static uint8_t sh_cache[LV_DRAW_SW_SHADOW_CACHE_SIZE * LV_DRAW_SW_SHADOW_CACHE_SIZE];
|
||||
static int32_t sh_cache_size = -1;
|
||||
static int32_t sh_cache_r = -1;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -99,10 +99,11 @@ void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_
|
||||
lv_opa_t * sh_buf;
|
||||
|
||||
#if LV_DRAW_SW_SHADOW_CACHE_SIZE
|
||||
if(sh_cache_size == corner_size && sh_cache_r == r_sh) {
|
||||
lv_draw_sw_shadow_cache_t * cache = &shadow_cache;
|
||||
if(cache->cache_size == corner_size && cache->cache_r == r_sh) {
|
||||
/*Use the cache if available*/
|
||||
sh_buf = lv_malloc(corner_size * corner_size);
|
||||
lv_memcpy(sh_buf, sh_cache, corner_size * corner_size);
|
||||
lv_memcpy(sh_buf, cache->cache, corner_size * corner_size);
|
||||
}
|
||||
else {
|
||||
/*A larger buffer is required for calculation*/
|
||||
@ -110,10 +111,10 @@ void lv_draw_sw_box_shadow(lv_draw_unit_t * draw_unit, const lv_draw_box_shadow_
|
||||
shadow_draw_corner_buf(&core_area, (uint16_t *)sh_buf, dsc->width, r_sh);
|
||||
|
||||
/*Cache the corner if it fits into the cache size*/
|
||||
if((uint32_t)corner_size * corner_size < sizeof(sh_cache)) {
|
||||
lv_memcpy(sh_cache, sh_buf, corner_size * corner_size);
|
||||
sh_cache_size = corner_size;
|
||||
sh_cache_r = r_sh;
|
||||
if((uint32_t)corner_size * corner_size < sizeof(cache->cache)) {
|
||||
lv_memcpy(cache->cache, sh_buf, corner_size * corner_size);
|
||||
cache->cache_size = corner_size;
|
||||
cache->cache_r = r_sh;
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "lv_draw_sw_gradient.h"
|
||||
#if LV_USE_DRAW_SW
|
||||
|
||||
#include "../../misc/lv_gc.h"
|
||||
#include "../../misc/lv_types.h"
|
||||
#include "../../osal/lv_os.h"
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
|
||||
#if LV_DRAW_SW_COMPLEX
|
||||
#include "lv_draw_sw_mask.h"
|
||||
#include "../../core/lv_global.h"
|
||||
#include "../../misc/lv_math.h"
|
||||
#include "../../misc/lv_log.h"
|
||||
#include "../../misc/lv_assert.h"
|
||||
#include "../../misc/lv_gc.h"
|
||||
#include "../../osal/lv_os.h"
|
||||
#include "../../stdlib/lv_string.h"
|
||||
|
||||
@ -22,6 +22,10 @@
|
||||
*********************/
|
||||
#define CIRCLE_CACHE_LIFE_MAX 1000
|
||||
#define CIRCLE_CACHE_AGING(life, r) life = LV_MIN(life + (r < 16 ? 1 : (r >> 4)), 1000)
|
||||
#if LV_USE_OS
|
||||
#define circle_cache_mutex LV_GLOBAL_DEFAULT()->draw_cache.circle_cache_mutex
|
||||
#endif
|
||||
#define _circle_cache LV_GLOBAL_DEFAULT()->sw_circle_cache
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -66,9 +70,6 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if LV_USE_OS
|
||||
static lv_mutex_t circle_cache_mutex;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -141,10 +142,10 @@ void _lv_draw_sw_mask_cleanup(void)
|
||||
{
|
||||
uint8_t i;
|
||||
for(i = 0; i < LV_DRAW_SW_CIRCLE_CACHE_SIZE; i++) {
|
||||
if(LV_GC_ROOT(_lv_circle_cache[i]).buf) {
|
||||
lv_free(LV_GC_ROOT(_lv_circle_cache[i]).buf);
|
||||
if(_circle_cache[i].buf) {
|
||||
lv_free(_circle_cache[i].buf);
|
||||
}
|
||||
lv_memzero(&LV_GC_ROOT(_lv_circle_cache[i]), sizeof(LV_GC_ROOT(_lv_circle_cache[i])));
|
||||
lv_memzero(&(_circle_cache[i]), sizeof(_circle_cache[i]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -369,10 +370,10 @@ void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t * param, const l
|
||||
|
||||
/*Try to reuse a circle cache entry*/
|
||||
for(i = 0; i < LV_DRAW_SW_CIRCLE_CACHE_SIZE; i++) {
|
||||
if(LV_GC_ROOT(_lv_circle_cache[i]).radius == radius) {
|
||||
LV_GC_ROOT(_lv_circle_cache[i]).used_cnt++;
|
||||
CIRCLE_CACHE_AGING(LV_GC_ROOT(_lv_circle_cache[i]).life, radius);
|
||||
param->circle = &LV_GC_ROOT(_lv_circle_cache[i]);
|
||||
if(_circle_cache[i].radius == radius) {
|
||||
_circle_cache[i].used_cnt++;
|
||||
CIRCLE_CACHE_AGING(_circle_cache[i].life, radius);
|
||||
param->circle = &(_circle_cache[i]);
|
||||
#if LV_USE_OS
|
||||
lv_mutex_unlock(&circle_cache_mutex);
|
||||
#endif
|
||||
@ -383,9 +384,9 @@ void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t * param, const l
|
||||
/*If not cached use the free entry with lowest life*/
|
||||
_lv_draw_sw_mask_radius_circle_dsc_t * entry = NULL;
|
||||
for(i = 0; i < LV_DRAW_SW_CIRCLE_CACHE_SIZE; i++) {
|
||||
if(LV_GC_ROOT(_lv_circle_cache[i]).used_cnt == 0) {
|
||||
if(!entry) entry = &LV_GC_ROOT(_lv_circle_cache[i]);
|
||||
else if(LV_GC_ROOT(_lv_circle_cache[i]).life < entry->life) entry = &LV_GC_ROOT(_lv_circle_cache[i]);
|
||||
if(_circle_cache[i].used_cnt == 0) {
|
||||
if(!entry) entry = &(_circle_cache[i]);
|
||||
else if(_circle_cache[i].life < entry->life) entry = &(_circle_cache[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6564,7 +6564,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -6578,9 +6578,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 0,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
||||
*********************/
|
||||
#include "lv_font.h"
|
||||
#include "lv_font_fmt_txt.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../misc/lv_types.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_log.h"
|
||||
#include "../misc/lv_utils.h"
|
||||
#include "../stdlib/lv_mem.h"
|
||||
@ -18,15 +18,13 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
#define font_rle LV_GLOBAL_DEFAULT()->font_fmt_rle
|
||||
#endif /*LV_USE_FONT_COMPRESSED*/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum {
|
||||
RLE_STATE_SINGLE = 0,
|
||||
RLE_STATE_REPEATE,
|
||||
RLE_STATE_COUNTER,
|
||||
} rle_state_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
@ -48,14 +46,6 @@ static int32_t kern_pair_16_compare(const void * ref, const void * element);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
static uint32_t rle_rdp;
|
||||
static const uint8_t * rle_in;
|
||||
static uint8_t rle_bpp;
|
||||
static uint8_t rle_prev_v;
|
||||
static uint8_t rle_cnt;
|
||||
static rle_state_t rle_state;
|
||||
#endif /*LV_USE_FONT_COMPRESSED*/
|
||||
|
||||
static const uint8_t opa4_table[16] = {0, 17, 34, 51,
|
||||
68, 85, 102, 119,
|
||||
@ -480,65 +470,67 @@ static inline uint8_t get_bits(const uint8_t * in, uint32_t bit_pos, uint8_t len
|
||||
|
||||
static inline void rle_init(const uint8_t * in, uint8_t bpp)
|
||||
{
|
||||
rle_in = in;
|
||||
rle_bpp = bpp;
|
||||
rle_state = RLE_STATE_SINGLE;
|
||||
rle_rdp = 0;
|
||||
rle_prev_v = 0;
|
||||
rle_cnt = 0;
|
||||
lv_font_fmt_rle_t * rle = &font_rle;
|
||||
rle->in = in;
|
||||
rle->bpp = bpp;
|
||||
rle->state = RLE_STATE_SINGLE;
|
||||
rle->rdp = 0;
|
||||
rle->prev_v = 0;
|
||||
rle->count = 0;
|
||||
}
|
||||
|
||||
static inline uint8_t rle_next(void)
|
||||
{
|
||||
uint8_t v = 0;
|
||||
uint8_t ret = 0;
|
||||
lv_font_fmt_rle_t * rle = &font_rle;
|
||||
|
||||
if(rle_state == RLE_STATE_SINGLE) {
|
||||
ret = get_bits(rle_in, rle_rdp, rle_bpp);
|
||||
if(rle_rdp != 0 && rle_prev_v == ret) {
|
||||
rle_cnt = 0;
|
||||
rle_state = RLE_STATE_REPEATE;
|
||||
if(rle->state == RLE_STATE_SINGLE) {
|
||||
ret = get_bits(rle->in, rle->rdp, rle->bpp);
|
||||
if(rle->rdp != 0 && rle->prev_v == ret) {
|
||||
rle->count = 0;
|
||||
rle->state = RLE_STATE_REPEATE;
|
||||
}
|
||||
|
||||
rle_prev_v = ret;
|
||||
rle_rdp += rle_bpp;
|
||||
rle->prev_v = ret;
|
||||
rle->rdp += rle->bpp;
|
||||
}
|
||||
else if(rle_state == RLE_STATE_REPEATE) {
|
||||
v = get_bits(rle_in, rle_rdp, 1);
|
||||
rle_cnt++;
|
||||
rle_rdp += 1;
|
||||
else if(rle->state == RLE_STATE_REPEATE) {
|
||||
v = get_bits(rle->in, rle->rdp, 1);
|
||||
rle->count++;
|
||||
rle->rdp += 1;
|
||||
if(v == 1) {
|
||||
ret = rle_prev_v;
|
||||
if(rle_cnt == 11) {
|
||||
rle_cnt = get_bits(rle_in, rle_rdp, 6);
|
||||
rle_rdp += 6;
|
||||
if(rle_cnt != 0) {
|
||||
rle_state = RLE_STATE_COUNTER;
|
||||
ret = rle->prev_v;
|
||||
if(rle->count == 11) {
|
||||
rle->count = get_bits(rle->in, rle->rdp, 6);
|
||||
rle->rdp += 6;
|
||||
if(rle->count != 0) {
|
||||
rle->state = RLE_STATE_COUNTER;
|
||||
}
|
||||
else {
|
||||
ret = get_bits(rle_in, rle_rdp, rle_bpp);
|
||||
rle_prev_v = ret;
|
||||
rle_rdp += rle_bpp;
|
||||
rle_state = RLE_STATE_SINGLE;
|
||||
ret = get_bits(rle->in, rle->rdp, rle->bpp);
|
||||
rle->prev_v = ret;
|
||||
rle->rdp += rle->bpp;
|
||||
rle->state = RLE_STATE_SINGLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = get_bits(rle_in, rle_rdp, rle_bpp);
|
||||
rle_prev_v = ret;
|
||||
rle_rdp += rle_bpp;
|
||||
rle_state = RLE_STATE_SINGLE;
|
||||
ret = get_bits(rle->in, rle->rdp, rle->bpp);
|
||||
rle->prev_v = ret;
|
||||
rle->rdp += rle->bpp;
|
||||
rle->state = RLE_STATE_SINGLE;
|
||||
}
|
||||
|
||||
}
|
||||
else if(rle_state == RLE_STATE_COUNTER) {
|
||||
ret = rle_prev_v;
|
||||
rle_cnt--;
|
||||
if(rle_cnt == 0) {
|
||||
ret = get_bits(rle_in, rle_rdp, rle_bpp);
|
||||
rle_prev_v = ret;
|
||||
rle_rdp += rle_bpp;
|
||||
rle_state = RLE_STATE_SINGLE;
|
||||
else if(rle->state == RLE_STATE_COUNTER) {
|
||||
ret = rle->prev_v;
|
||||
rle->count--;
|
||||
if(rle->count == 0) {
|
||||
ret = get_bits(rle->in, rle->rdp, rle->bpp);
|
||||
rle->prev_v = ret;
|
||||
rle->rdp += rle->bpp;
|
||||
rle->state = RLE_STATE_SINGLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,11 +156,6 @@ typedef enum {
|
||||
LV_FONT_FMT_TXT_COMPRESSED_NO_PREFILTER = 1,
|
||||
} lv_font_fmt_txt_bitmap_format_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t last_letter;
|
||||
uint32_t last_glyph_id;
|
||||
} lv_font_fmt_txt_glyph_cache_t;
|
||||
|
||||
/*Describe store additional data for fonts*/
|
||||
typedef struct {
|
||||
/*The bitmaps of all glyphs*/
|
||||
@ -197,10 +192,25 @@ typedef struct {
|
||||
* from `lv_font_fmt_txt_bitmap_format_t`
|
||||
*/
|
||||
uint16_t bitmap_format : 2;
|
||||
|
||||
lv_font_fmt_txt_glyph_cache_t * cache;
|
||||
} lv_font_fmt_txt_dsc_t;
|
||||
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
typedef enum {
|
||||
RLE_STATE_SINGLE = 0,
|
||||
RLE_STATE_REPEATE,
|
||||
RLE_STATE_COUNTER,
|
||||
} lv_font_fmt_rle_state_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t rdp;
|
||||
const uint8_t * in;
|
||||
uint8_t bpp;
|
||||
uint8_t prev_v;
|
||||
uint8_t count;
|
||||
lv_font_fmt_rle_state_t state;
|
||||
} lv_font_fmt_rle_t;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
@ -1613,7 +1613,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -1627,9 +1627,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1874,7 +1874,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -1888,9 +1888,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -2150,7 +2150,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -2164,9 +2164,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -2419,7 +2419,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -2433,9 +2433,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -2819,7 +2819,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -2833,9 +2833,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -3176,7 +3176,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -3190,9 +3190,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -3605,7 +3605,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -3619,9 +3619,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -4016,7 +4016,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -4030,9 +4030,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -4551,7 +4551,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -4565,9 +4565,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -5100,7 +5100,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -5114,9 +5114,6 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -3230,7 +3230,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -3244,9 +3244,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 1,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -5682,7 +5682,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -5696,9 +5696,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -6171,7 +6171,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -6185,9 +6185,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -6970,7 +6970,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -6984,9 +6984,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -7614,7 +7614,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -7628,9 +7628,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -8359,7 +8359,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -8373,9 +8373,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -9207,7 +9207,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -9221,9 +9221,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -10049,7 +10049,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -10063,9 +10063,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -10875,7 +10875,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -10889,9 +10889,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -11827,7 +11827,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -11841,9 +11841,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -12528,7 +12528,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -12542,9 +12542,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -1399,7 +1399,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -1413,9 +1413,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 1,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -23731,7 +23731,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -23745,9 +23745,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 4,
|
||||
.kern_classes = 0,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -602,7 +602,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -616,9 +616,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 1,
|
||||
.kern_classes = 0,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -438,7 +438,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = {
|
||||
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
/*Store all the custom data of the font*/
|
||||
static lv_font_fmt_txt_glyph_cache_t cache;
|
||||
|
||||
static const lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
#else
|
||||
static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
@ -452,9 +452,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
|
||||
.bpp = 1,
|
||||
.kern_classes = 0,
|
||||
.bitmap_format = 0,
|
||||
#if LVGL_VERSION_MAJOR >= 8
|
||||
.cache = &cache
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "lv_indev_private.h"
|
||||
#include "lv_indev_scroll.h"
|
||||
#include "../disp/lv_disp_private.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../core/lv_obj.h"
|
||||
#include "../core/lv_group.h"
|
||||
#include "../core/lv_refr.h"
|
||||
@ -16,8 +17,8 @@
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "../misc/lv_timer.h"
|
||||
#include "../misc/lv_math.h"
|
||||
#include "../misc/lv_gc.h"
|
||||
#include "../misc/lv_profiler.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
@ -47,6 +48,10 @@
|
||||
#warning "LV_INDEV_DRAG_THROW must be greater than 0"
|
||||
#endif
|
||||
|
||||
#define indev_act LV_GLOBAL_DEFAULT()->indev_active
|
||||
#define indev_obj_act LV_GLOBAL_DEFAULT()->indev_obj_active
|
||||
#define indev_ll_head &(LV_GLOBAL_DEFAULT()->indev_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -69,8 +74,6 @@ static bool indev_reset_check(lv_indev_t * indev);
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_indev_t * indev_act;
|
||||
static lv_obj_t * indev_obj_act = NULL;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -92,7 +95,7 @@ lv_indev_t * lv_indev_create(void)
|
||||
LV_LOG_WARN("no display was created so far");
|
||||
}
|
||||
|
||||
lv_indev_t * indev = _lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll));
|
||||
lv_indev_t * indev = _lv_ll_ins_head(indev_ll_head);
|
||||
LV_ASSERT_MALLOC(indev);
|
||||
if(!indev) {
|
||||
return NULL;
|
||||
@ -120,7 +123,7 @@ void lv_indev_delete(lv_indev_t * indev)
|
||||
/*Clean up the read timer first*/
|
||||
lv_timer_del(indev->read_timer);
|
||||
/*Remove the input device from the list*/
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_indev_ll), indev);
|
||||
_lv_ll_remove(indev_ll_head, indev);
|
||||
/*Free the memory of the input device*/
|
||||
lv_free(indev);
|
||||
}
|
||||
@ -128,9 +131,9 @@ void lv_indev_delete(lv_indev_t * indev)
|
||||
lv_indev_t * lv_indev_get_next(lv_indev_t * indev)
|
||||
{
|
||||
if(indev == NULL)
|
||||
return _lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll));
|
||||
return _lv_ll_get_head(indev_ll_head);
|
||||
else
|
||||
return _lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev);
|
||||
return _lv_ll_get_next(indev_ll_head, indev);
|
||||
}
|
||||
|
||||
void _lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
|
||||
@ -169,53 +172,53 @@ void lv_indev_read_timer_cb(lv_timer_t * timer)
|
||||
|
||||
lv_indev_data_t data;
|
||||
|
||||
indev_act = timer->user_data;
|
||||
lv_indev_t * indev_p = indev_act = timer->user_data;
|
||||
|
||||
/*Read and process all indevs*/
|
||||
if(indev_act->disp == NULL) return; /*Not assigned to any displays*/
|
||||
if(indev_p->disp == NULL) return; /*Not assigned to any displays*/
|
||||
|
||||
/*Handle reset query before processing the point*/
|
||||
indev_proc_reset_query_handler(indev_act);
|
||||
indev_proc_reset_query_handler(indev_p);
|
||||
|
||||
if(indev_act->disabled ||
|
||||
indev_act->disp->prev_scr != NULL) return; /*Input disabled or screen animation active*/
|
||||
if(indev_p->disabled ||
|
||||
indev_p->disp->prev_scr != NULL) return; /*Input disabled or screen animation active*/
|
||||
|
||||
LV_PROFILER_BEGIN;
|
||||
|
||||
bool continue_reading;
|
||||
do {
|
||||
/*Read the data*/
|
||||
_lv_indev_read(indev_act, &data);
|
||||
_lv_indev_read(indev_p, &data);
|
||||
continue_reading = data.continue_reading;
|
||||
|
||||
/*The active object might be deleted even in the read function*/
|
||||
indev_proc_reset_query_handler(indev_act);
|
||||
indev_proc_reset_query_handler(indev_p);
|
||||
indev_obj_act = NULL;
|
||||
|
||||
indev_act->state = data.state;
|
||||
indev_p->state = data.state;
|
||||
|
||||
/*Save the last activity time*/
|
||||
if(indev_act->state == LV_INDEV_STATE_PRESSED) {
|
||||
indev_act->disp->last_activity_time = lv_tick_get();
|
||||
if(indev_p->state == LV_INDEV_STATE_PRESSED) {
|
||||
indev_p->disp->last_activity_time = lv_tick_get();
|
||||
}
|
||||
else if(indev_act->type == LV_INDEV_TYPE_ENCODER && data.enc_diff) {
|
||||
indev_act->disp->last_activity_time = lv_tick_get();
|
||||
else if(indev_p->type == LV_INDEV_TYPE_ENCODER && data.enc_diff) {
|
||||
indev_p->disp->last_activity_time = lv_tick_get();
|
||||
}
|
||||
|
||||
if(indev_act->type == LV_INDEV_TYPE_POINTER) {
|
||||
indev_pointer_proc(indev_act, &data);
|
||||
if(indev_p->type == LV_INDEV_TYPE_POINTER) {
|
||||
indev_pointer_proc(indev_p, &data);
|
||||
}
|
||||
else if(indev_act->type == LV_INDEV_TYPE_KEYPAD) {
|
||||
indev_keypad_proc(indev_act, &data);
|
||||
else if(indev_p->type == LV_INDEV_TYPE_KEYPAD) {
|
||||
indev_keypad_proc(indev_p, &data);
|
||||
}
|
||||
else if(indev_act->type == LV_INDEV_TYPE_ENCODER) {
|
||||
indev_encoder_proc(indev_act, &data);
|
||||
else if(indev_p->type == LV_INDEV_TYPE_ENCODER) {
|
||||
indev_encoder_proc(indev_p, &data);
|
||||
}
|
||||
else if(indev_act->type == LV_INDEV_TYPE_BUTTON) {
|
||||
indev_button_proc(indev_act, &data);
|
||||
else if(indev_p->type == LV_INDEV_TYPE_BUTTON) {
|
||||
indev_button_proc(indev_p, &data);
|
||||
}
|
||||
/*Handle reset query if it happened in during processing*/
|
||||
indev_proc_reset_query_handler(indev_act);
|
||||
indev_proc_reset_query_handler(indev_p);
|
||||
} while(continue_reading);
|
||||
|
||||
/*End of indev processing, so no act indev*/
|
||||
@ -951,8 +954,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
|
||||
lv_coord_t x = i->btn_points[data->btn_id].x;
|
||||
lv_coord_t y = i->btn_points[data->btn_id].y;
|
||||
|
||||
static lv_indev_state_t prev_state = LV_INDEV_STATE_RELEASED;
|
||||
if(prev_state != data->state) {
|
||||
if(LV_INDEV_STATE_RELEASED != data->state) {
|
||||
if(data->state == LV_INDEV_STATE_PRESSED) {
|
||||
LV_LOG_INFO("button %" LV_PRIu32 " is pressed (x:%d y:%d)", data->btn_id, (int)x, (int)y);
|
||||
}
|
||||
|
@ -7,12 +7,16 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_flex.h"
|
||||
#include "../lv_layout.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
|
||||
#if LV_USE_FLEX
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define layout_list_def LV_GLOBAL_DEFAULT()->layout_list
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -67,12 +71,6 @@ static lv_coord_t lv_obj_get_height_with_margin(const lv_obj_t * obj);
|
||||
/**********************
|
||||
* GLOBAL VARIABLES
|
||||
**********************/
|
||||
uint16_t LV_LAYOUT_FLEX;
|
||||
lv_style_prop_t LV_STYLE_FLEX_FLOW;
|
||||
lv_style_prop_t LV_STYLE_FLEX_MAIN_PLACE;
|
||||
lv_style_prop_t LV_STYLE_FLEX_CROSS_PLACE;
|
||||
lv_style_prop_t LV_STYLE_FLEX_TRACK_PLACE;
|
||||
lv_style_prop_t LV_STYLE_FLEX_GROW;
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@ -97,13 +95,9 @@ lv_style_prop_t LV_STYLE_FLEX_GROW;
|
||||
|
||||
void lv_flex_init(void)
|
||||
{
|
||||
LV_LAYOUT_FLEX = lv_layout_register(flex_update, NULL);
|
||||
layout_list_def[LV_LAYOUT_FLEX].cb = flex_update;
|
||||
layout_list_def[LV_LAYOUT_FLEX].user_data = NULL;
|
||||
|
||||
LV_STYLE_FLEX_FLOW = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_FLEX_MAIN_PLACE = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_FLEX_CROSS_PLACE = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_FLEX_TRACK_PLACE = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_FLEX_GROW = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
}
|
||||
|
||||
void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow)
|
||||
@ -127,88 +121,6 @@ void lv_obj_set_flex_grow(lv_obj_t * obj, uint8_t grow)
|
||||
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
|
||||
}
|
||||
|
||||
|
||||
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_FLEX_FLOW, v);
|
||||
}
|
||||
|
||||
void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_FLEX_MAIN_PLACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_FLEX_CROSS_PLACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_FLEX_TRACK_PLACE, v);
|
||||
}
|
||||
|
||||
void lv_style_set_flex_grow(lv_style_t * style, uint8_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_FLEX_GROW, v);
|
||||
}
|
||||
|
||||
|
||||
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_FLOW, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_MAIN_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_CROSS_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_TRACK_PLACE, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_GROW, v, selector);
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
@ -13,16 +13,15 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
#include "../../misc/lv_area.h"
|
||||
|
||||
#if LV_USE_FLEX
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
#define LV_OBJ_FLAG_FLEX_IN_NEW_TRACK LV_OBJ_FLAG_LAYOUT_1
|
||||
LV_EXPORT_CONST_INT(LV_OBJ_FLAG_FLEX_IN_NEW_TRACK);
|
||||
|
||||
#define _LV_FLEX_COLUMN (1 << 0)
|
||||
#define _LV_FLEX_WRAP (1 << 2)
|
||||
#define _LV_FLEX_REVERSE (1 << 3)
|
||||
@ -57,12 +56,6 @@ typedef enum {
|
||||
/**********************
|
||||
* GLOBAL VARIABLES
|
||||
**********************/
|
||||
extern uint16_t LV_LAYOUT_FLEX;
|
||||
extern lv_style_prop_t LV_STYLE_FLEX_FLOW;
|
||||
extern lv_style_prop_t LV_STYLE_FLEX_MAIN_PLACE;
|
||||
extern lv_style_prop_t LV_STYLE_FLEX_CROSS_PLACE;
|
||||
extern lv_style_prop_t LV_STYLE_FLEX_TRACK_PLACE;
|
||||
extern lv_style_prop_t LV_STYLE_FLEX_GROW;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
@ -79,7 +72,7 @@ void lv_flex_init(void);
|
||||
* @param obj pointer to an object. The parent must have flex layout else nothing will happen.
|
||||
* @param flow an element of `lv_flex_flow_t`.
|
||||
*/
|
||||
void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow);
|
||||
void lv_obj_set_flex_flow(struct _lv_obj_t * obj, lv_flex_flow_t flow);
|
||||
|
||||
/**
|
||||
* Set how to place (where to align) the items and tracks
|
||||
@ -88,7 +81,7 @@ void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow);
|
||||
* @param cross_place where to place the item in their track on the cross axis. `LV_FLEX_ALIGN_START/END/CENTER`
|
||||
* @param track_cross_place where to place the tracks in the cross direction. Any value of `lv_flex_align_t`.
|
||||
*/
|
||||
void lv_obj_set_flex_align(lv_obj_t * obj, lv_flex_align_t main_place, lv_flex_align_t cross_place,
|
||||
void lv_obj_set_flex_align(struct _lv_obj_t * obj, lv_flex_align_t main_place, lv_flex_align_t cross_place,
|
||||
lv_flex_align_t track_cross_place);
|
||||
|
||||
/**
|
||||
@ -96,73 +89,12 @@ void lv_obj_set_flex_align(lv_obj_t * obj, lv_flex_align_t main_place, lv_flex_a
|
||||
* @param obj pointer to an object. The parent must have flex layout else nothing will happen.
|
||||
* @param grow a value to set how much free space to take proportionally to other growing items.
|
||||
*/
|
||||
void lv_obj_set_flex_grow(lv_obj_t * obj, uint8_t grow);
|
||||
|
||||
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value);
|
||||
void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value);
|
||||
void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value);
|
||||
void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value);
|
||||
void lv_style_set_flex_grow(lv_style_t * style, uint8_t value);
|
||||
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
|
||||
|
||||
static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW);
|
||||
return (lv_flex_flow_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_MAIN_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_CROSS_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_flex_align_t lv_obj_get_style_flex_track_place(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_TRACK_PLACE);
|
||||
return (lv_flex_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_GROW);
|
||||
return (uint8_t)v.num;
|
||||
}
|
||||
void lv_obj_set_flex_grow(struct _lv_obj_t * obj, uint8_t grow);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#define LV_STYLE_CONST_FLEX_FLOW(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_FLEX_FLOW, .value = { .num = (lv_flex_flow_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_FLEX_MAIN_PLACE(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_FLEX_MAIN_PLACE, .value = { .num = (lv_flex_flow_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_FLEX_TRACK_PLACE(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_FLEX_TRACK_PLACE, .value = { .num = (lv_flex_flow_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_FLEX_CROSS_PLACE(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_FLEX_CROSS_PLACE, .value = { .num = (lv_flex_flow_t)val } \
|
||||
}
|
||||
|
||||
|
||||
#endif /*LV_USE_FLEX*/
|
||||
|
||||
|
@ -11,10 +11,14 @@
|
||||
#if LV_USE_GRID
|
||||
|
||||
#include "../../stdlib/lv_string.h"
|
||||
|
||||
#include "../lv_layout.h"
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define layout_list_def LV_GLOBAL_DEFAULT()->layout_list
|
||||
|
||||
/**
|
||||
* Some helper defines
|
||||
*/
|
||||
@ -114,17 +118,6 @@ static inline lv_coord_t get_margin_ver(lv_obj_t * obj)
|
||||
/**********************
|
||||
* GLOBAL VARIABLES
|
||||
**********************/
|
||||
uint16_t LV_LAYOUT_GRID;
|
||||
lv_style_prop_t LV_STYLE_GRID_COLUMN_DSC_ARRAY;
|
||||
lv_style_prop_t LV_STYLE_GRID_COLUMN_ALIGN;
|
||||
lv_style_prop_t LV_STYLE_GRID_ROW_DSC_ARRAY;
|
||||
lv_style_prop_t LV_STYLE_GRID_ROW_ALIGN;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_COLUMN_POS;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_COLUMN_SPAN;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_X_ALIGN;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_ROW_POS;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_ROW_SPAN;
|
||||
lv_style_prop_t LV_STYLE_GRID_CELL_Y_ALIGN;
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@ -146,19 +139,8 @@ lv_style_prop_t LV_STYLE_GRID_CELL_Y_ALIGN;
|
||||
|
||||
void lv_grid_init(void)
|
||||
{
|
||||
LV_LAYOUT_GRID = lv_layout_register(grid_update, NULL);
|
||||
|
||||
LV_STYLE_GRID_COLUMN_DSC_ARRAY = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_ROW_DSC_ARRAY = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_COLUMN_ALIGN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_ROW_ALIGN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
|
||||
LV_STYLE_GRID_CELL_ROW_SPAN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_CELL_ROW_POS = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_CELL_COLUMN_SPAN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_CELL_COLUMN_POS = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_CELL_X_ALIGN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
LV_STYLE_GRID_CELL_Y_ALIGN = lv_style_register_prop(LV_STYLE_PROP_FLAG_LAYOUT_UPDATE);
|
||||
layout_list_def[LV_LAYOUT_GRID].cb = grid_update;
|
||||
layout_list_def[LV_LAYOUT_GRID].user_data = NULL;
|
||||
}
|
||||
|
||||
void lv_obj_set_grid_dsc_array(lv_obj_t * obj, const lv_coord_t col_dsc[], const lv_coord_t row_dsc[])
|
||||
@ -189,171 +171,6 @@ void lv_obj_set_grid_cell(lv_obj_t * obj, lv_grid_align_t x_align, lv_coord_t co
|
||||
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
|
||||
}
|
||||
|
||||
|
||||
void lv_style_set_grid_row_dsc_array(lv_style_t * style, const lv_coord_t value[])
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = (const void *)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_ROW_DSC_ARRAY, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_column_dsc_array(lv_style_t * style, const lv_coord_t value[])
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = (const void *)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_COLUMN_DSC_ARRAY, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (lv_grid_align_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_ROW_ALIGN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (lv_grid_align_t)value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_COLUMN_ALIGN, v);
|
||||
}
|
||||
|
||||
|
||||
void lv_style_set_grid_cell_column_pos(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_COLUMN_POS, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_cell_column_span(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_COLUMN_SPAN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_cell_row_pos(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_ROW_POS, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_cell_row_span(lv_style_t * style, lv_coord_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_ROW_SPAN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_X_ALIGN, v);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_style_set_prop(style, LV_STYLE_GRID_CELL_Y_ALIGN, v);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const lv_coord_t value[], lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = (const void *)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_ROW_DSC_ARRAY, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const lv_coord_t value[], lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.ptr = (const void *)value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_DSC_ARRAY, v, selector);
|
||||
}
|
||||
|
||||
|
||||
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_ROW_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = (int32_t) value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_COLUMN_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
|
||||
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_COLUMN_POS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_COLUMN_SPAN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_ROW_POS, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_ROW_SPAN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_X_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector)
|
||||
{
|
||||
lv_style_value_t v = {
|
||||
.num = value
|
||||
};
|
||||
lv_obj_set_local_style_prop(obj, LV_STYLE_GRID_CELL_Y_ALIGN, v, selector);
|
||||
}
|
||||
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
@ -13,7 +13,9 @@ extern "C" {
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../../core/lv_obj.h"
|
||||
#include "../../lv_conf_internal.h"
|
||||
#include "../../misc/lv_area.h"
|
||||
|
||||
#if LV_USE_GRID
|
||||
|
||||
/*********************
|
||||
@ -53,27 +55,15 @@ typedef enum {
|
||||
* GLOBAL VARIABLES
|
||||
**********************/
|
||||
|
||||
extern uint16_t LV_LAYOUT_GRID;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_COLUMN_DSC_ARRAY;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_COLUMN_ALIGN;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_ROW_DSC_ARRAY;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_ROW_ALIGN;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_COLUMN_POS;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_COLUMN_SPAN;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_X_ALIGN;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_ROW_POS;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_ROW_SPAN;
|
||||
extern lv_style_prop_t LV_STYLE_GRID_CELL_Y_ALIGN;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void lv_grid_init(void);
|
||||
|
||||
void lv_obj_set_grid_dsc_array(lv_obj_t * obj, const lv_coord_t col_dsc[], const lv_coord_t row_dsc[]);
|
||||
void lv_obj_set_grid_dsc_array(struct _lv_obj_t * obj, const lv_coord_t col_dsc[], const lv_coord_t row_dsc[]);
|
||||
|
||||
void lv_obj_set_grid_align(lv_obj_t * obj, lv_grid_align_t column_align, lv_grid_align_t row_align);
|
||||
void lv_obj_set_grid_align(struct _lv_obj_t * obj, lv_grid_align_t column_align, lv_grid_align_t row_align);
|
||||
|
||||
/**
|
||||
* Set the cell of an object. The object's parent needs to have grid layout, else nothing will happen
|
||||
@ -85,7 +75,7 @@ void lv_obj_set_grid_align(lv_obj_t * obj, lv_grid_align_t column_align, lv_grid
|
||||
* @param row_pos row ID
|
||||
* @param row_span number of rows to take (>= 1)
|
||||
*/
|
||||
void lv_obj_set_grid_cell(lv_obj_t * obj, lv_grid_align_t column_align, lv_coord_t col_pos, lv_coord_t col_span,
|
||||
void lv_obj_set_grid_cell(struct _lv_obj_t * obj, lv_grid_align_t column_align, lv_coord_t col_pos, lv_coord_t col_span,
|
||||
lv_grid_align_t row_align, lv_coord_t row_pos, lv_coord_t row_span);
|
||||
|
||||
/**
|
||||
@ -96,88 +86,6 @@ static inline lv_coord_t lv_grid_fr(uint8_t x)
|
||||
return LV_GRID_FR(x);
|
||||
}
|
||||
|
||||
void lv_style_set_grid_row_dsc_array(lv_style_t * style, const lv_coord_t value[]);
|
||||
void lv_style_set_grid_column_dsc_array(lv_style_t * style, const lv_coord_t value[]);
|
||||
void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value);
|
||||
void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value);
|
||||
void lv_style_set_grid_cell_column_pos(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_grid_cell_column_span(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_grid_cell_row_pos(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_grid_cell_row_span(lv_style_t * style, lv_coord_t value);
|
||||
void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value);
|
||||
void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value);
|
||||
|
||||
void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const lv_coord_t value[], lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const lv_coord_t value[], lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
|
||||
|
||||
static inline const lv_coord_t * lv_obj_get_style_grid_row_dsc_array(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_DSC_ARRAY);
|
||||
return (const lv_coord_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline const lv_coord_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY);
|
||||
return (const lv_coord_t *)v.ptr;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_row_align(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_column_pos(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_POS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_column_span(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_SPAN);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_row_pos(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_POS);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_coord_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_SPAN);
|
||||
return (lv_coord_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_X_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
static inline lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t * obj, uint32_t part)
|
||||
{
|
||||
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_Y_ALIGN);
|
||||
return (lv_grid_align_t)v.num;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* GLOBAL VARIABLES
|
||||
**********************/
|
||||
@ -186,58 +94,6 @@ static inline lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
|
||||
|
||||
#define LV_STYLE_CONST_GRID_COLUMN_DSC_ARRAY(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_COLUMN_DSC_ARRAY, .value = { .ptr = (void*)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_COLUMN_ALIGN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_COLUMN_ALIGN, .value = { .num = (lv_grid_align_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_ROW_DSC_ARRAY(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_ROW_DSC_ARRAY, .value = { .ptr = (void*)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_ROW_ALIGN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_ROW_ALIGN, .value = { .num = (lv_grid_align_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_CELL_COLUMN_POS(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_CELL_COLUMN_POS, .value = { .num = (lv_coord_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_CELL_COLUMN_SPAN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_CELL_COLUMN_SPAN, .value = { .num = (lv_coord_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_X_ALIGN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_X_ALIGN, .value = { .num = (lv_grid_align_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_CELL_ROW_POS(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_CELL_ROW_POS, .value = { .num = (lv_coord_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_CELL_ROW_SPAN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_CELL_ROWSPAN, .value = { .num = (lv_coord_t)val } \
|
||||
}
|
||||
|
||||
#define LV_STYLE_CONST_GRID_Y_ALIGN(val) \
|
||||
{ \
|
||||
.prop_ptr = &LV_STYLE_GRID_Y_ALIGN, .value = { .num = (lv_grid_align_t)val } \
|
||||
}
|
||||
|
||||
#endif /*LV_USE_GRID*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
75
src/layouts/lv_layout.c
Normal file
75
src/layouts/lv_layout.c
Normal file
@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @file lv_layout.c
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_layout.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../core/lv_obj.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define layout_cnt LV_GLOBAL_DEFAULT()->layout_count
|
||||
#define layout_list_def LV_GLOBAL_DEFAULT()->layout_list
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
void _lv_layout_init(void)
|
||||
{
|
||||
/*Malloc a list for the built in layouts*/
|
||||
layout_list_def = lv_malloc(layout_cnt * sizeof(lv_layout_dsc_t));
|
||||
|
||||
#if LV_USE_FLEX
|
||||
lv_flex_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_GRID
|
||||
lv_grid_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data)
|
||||
{
|
||||
layout_cnt++;
|
||||
layout_list_def = lv_realloc(layout_list_def, layout_cnt * sizeof(lv_layout_dsc_t));
|
||||
LV_ASSERT_MALLOC(layout_list_def);
|
||||
|
||||
layout_list_def[layout_cnt - 1].cb = cb;
|
||||
layout_list_def[layout_cnt - 1].user_data = user_data;
|
||||
return layout_cnt; /*No -1 to skip 0th index*/
|
||||
}
|
||||
|
||||
void _lv_layout_apply(lv_obj_t * obj)
|
||||
{
|
||||
lv_layout_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);
|
||||
if(layout_id > 0 && layout_id <= layout_cnt) {
|
||||
void * user_data = layout_list_def[layout_id].user_data;
|
||||
layout_list_def[layout_id].cb(obj, user_data);
|
||||
}
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
88
src/layouts/lv_layout.h
Normal file
88
src/layouts/lv_layout.h
Normal file
@ -0,0 +1,88 @@
|
||||
/**
|
||||
* @file lv_layouts.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_LAYOUTS_H
|
||||
#define LV_LAYOUTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
struct _lv_obj_t;
|
||||
|
||||
typedef void (*lv_layout_update_cb_t)(struct _lv_obj_t *, void * user_data);
|
||||
typedef struct {
|
||||
lv_layout_update_cb_t cb;
|
||||
void * user_data;
|
||||
} lv_layout_dsc_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
LV_LAYOUT_NONE = 0,
|
||||
|
||||
#if LV_USE_FLEX
|
||||
LV_LAYOUT_FLEX,
|
||||
#endif
|
||||
|
||||
#if LV_USE_GRID
|
||||
LV_LAYOUT_GRID,
|
||||
#endif
|
||||
|
||||
_LV_LAYOUT_LAST
|
||||
} lv_layout_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void _lv_layout_init(void);
|
||||
|
||||
/**
|
||||
* Register a new layout
|
||||
* @param cb the layout update callback
|
||||
* @param user_data custom data that will be passed to `cb`
|
||||
* @return the ID of the new layout
|
||||
*/
|
||||
uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data);
|
||||
|
||||
|
||||
/**
|
||||
* Update the layout of a widget
|
||||
* @param obj pointer to a widget
|
||||
*/
|
||||
void _lv_layout_apply(struct _lv_obj_t * obj);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#if LV_USE_FLEX
|
||||
#include "flex/lv_flex.h"
|
||||
#endif /* LV_USE_FLEX */
|
||||
|
||||
#if LV_USE_GRID
|
||||
#include "grid/lv_grid.h"
|
||||
#endif /* LV_USE_GRID */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_LAYOUTS_H*/
|
@ -1,43 +0,0 @@
|
||||
/**
|
||||
* @file lv_layouts.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_LAYOUTS_H
|
||||
#define LV_LAYOUTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#if LV_USE_FLEX
|
||||
#include "flex/lv_flex.h"
|
||||
#endif /* LV_USE_FLEX */
|
||||
#if LV_USE_GRID
|
||||
#include "grid/lv_grid.h"
|
||||
#endif /* LV_USE_GRID */
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_LAYOUTS_H*/
|
@ -17,6 +17,7 @@
|
||||
#include FT_IMAGE_H
|
||||
#include FT_OUTLINE_H
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -32,6 +33,8 @@
|
||||
#error "LV_FREETYPE_CACHE_SIZE must > 0"
|
||||
#endif
|
||||
|
||||
#define ft_ctx LV_GLOBAL_DEFAULT()->ft_context
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -80,8 +83,6 @@ static const uint8_t * freetype_get_glyph_bitmap_cb(const lv_font_t * font,
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
static lv_freetype_context_t ft_ctx;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
@ -93,40 +94,46 @@ static lv_freetype_context_t ft_ctx;
|
||||
lv_res_t lv_freetype_init(uint16_t max_faces, uint16_t max_sizes, uint32_t max_bytes)
|
||||
{
|
||||
FT_Error error;
|
||||
lv_freetype_context_t * context = ft_ctx = lv_malloc(sizeof(lv_freetype_context_t));
|
||||
LV_ASSERT_MALLOC(context);
|
||||
if(!context) {
|
||||
LV_LOG_ERROR("malloc failed for lv_freetype_context_t");
|
||||
return LV_RES_INV;
|
||||
}
|
||||
|
||||
error = FT_Init_FreeType(&ft_ctx.library);
|
||||
error = FT_Init_FreeType(&context->library);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FT_Init_FreeType", error);
|
||||
return LV_RES_INV;
|
||||
}
|
||||
|
||||
error = FTC_Manager_New(ft_ctx.library,
|
||||
error = FTC_Manager_New(context->library,
|
||||
max_faces,
|
||||
max_sizes,
|
||||
max_bytes,
|
||||
freetpye_face_requester,
|
||||
NULL,
|
||||
&ft_ctx.cache_manager);
|
||||
&context->cache_manager);
|
||||
if(error) {
|
||||
FT_Done_FreeType(ft_ctx.library);
|
||||
FT_Done_FreeType(context->library);
|
||||
FT_ERROR_MSG("FTC_Manager_New", error);
|
||||
return LV_RES_INV;
|
||||
}
|
||||
|
||||
error = FTC_CMapCache_New(ft_ctx.cache_manager, &ft_ctx.cmap_cache);
|
||||
error = FTC_CMapCache_New(context->cache_manager, &context->cmap_cache);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FTC_CMapCache_New", error);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
#if LV_FREETYPE_SBIT_CACHE
|
||||
error = FTC_SBitCache_New(ft_ctx.cache_manager, &ft_ctx.sbit_cache);
|
||||
error = FTC_SBitCache_New(context->cache_manager, &context->sbit_cache);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FTC_SBitCache_New", error);
|
||||
goto failed;
|
||||
}
|
||||
#else
|
||||
error = FTC_ImageCache_New(ft_ctx.cache_manager, &ft_ctx.image_cache);
|
||||
error = FTC_ImageCache_New(context->cache_manager, &context->image_cache);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FTC_ImageCache_New", error);
|
||||
goto failed;
|
||||
@ -135,15 +142,22 @@ lv_res_t lv_freetype_init(uint16_t max_faces, uint16_t max_sizes, uint32_t max_b
|
||||
|
||||
return LV_RES_OK;
|
||||
failed:
|
||||
FTC_Manager_Done(ft_ctx.cache_manager);
|
||||
FT_Done_FreeType(ft_ctx.library);
|
||||
FTC_Manager_Done(context->cache_manager);
|
||||
FT_Done_FreeType(context->library);
|
||||
return LV_RES_INV;
|
||||
}
|
||||
|
||||
void lv_freetype_uninit(void)
|
||||
{
|
||||
FTC_Manager_Done(ft_ctx.cache_manager);
|
||||
FT_Done_FreeType(ft_ctx.library);
|
||||
lv_freetype_context_t * context = ft_ctx;
|
||||
if(!context) {
|
||||
return;
|
||||
}
|
||||
|
||||
FTC_Manager_Done(context->cache_manager);
|
||||
FT_Done_FreeType(context->library);
|
||||
lv_free(context);
|
||||
ft_ctx = NULL;
|
||||
}
|
||||
|
||||
lv_font_t * lv_freetype_font_create(const char * pathname, uint16_t size, uint16_t style)
|
||||
@ -187,7 +201,7 @@ lv_font_t * lv_freetype_font_create(const char * pathname, uint16_t size, uint16
|
||||
scaler.width = size;
|
||||
scaler.height = size;
|
||||
scaler.pixel = 1;
|
||||
FT_Error error = FTC_Manager_LookupSize(ft_ctx.cache_manager,
|
||||
FT_Error error = FTC_Manager_LookupSize(ft_ctx->cache_manager,
|
||||
&scaler,
|
||||
&face_size);
|
||||
if(error) {
|
||||
@ -218,7 +232,7 @@ void lv_freetype_font_del(lv_font_t * font)
|
||||
LV_ASSERT_NULL(font);
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
||||
LV_ASSERT_NULL(dsc);
|
||||
FTC_Manager_RemoveFaceID(ft_ctx.cache_manager, (FTC_FaceID)dsc);
|
||||
FTC_Manager_RemoveFaceID(ft_ctx->cache_manager, (FTC_FaceID)dsc);
|
||||
lv_free(dsc->pathname);
|
||||
lv_free(dsc);
|
||||
}
|
||||
@ -238,7 +252,7 @@ static FT_Error freetpye_face_requester(FTC_FaceID face_id,
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)face_id;
|
||||
FT_Error error;
|
||||
|
||||
error = FT_New_Face(ft_ctx.library, dsc->pathname, 0, aface);
|
||||
error = FT_New_Face(ft_ctx->library, dsc->pathname, 0, aface);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FT_New_Face", error);
|
||||
}
|
||||
@ -301,6 +315,7 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
return true;
|
||||
}
|
||||
|
||||
lv_freetype_context_t * context = ft_ctx;
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)(font->dsc);
|
||||
|
||||
FTC_FaceID face_id = (FTC_FaceID)dsc;
|
||||
@ -311,7 +326,7 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
scaler.width = dsc->size;
|
||||
scaler.height = dsc->size;
|
||||
scaler.pixel = 1;
|
||||
error = FTC_Manager_LookupSize(ft_ctx.cache_manager, &scaler, &face_size);
|
||||
error = FTC_Manager_LookupSize(context->cache_manager, &scaler, &face_size);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FTC_Manager_LookupSize", error);
|
||||
return false;
|
||||
@ -319,7 +334,7 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
|
||||
FT_Face face = face_size->face;
|
||||
FT_UInt charmap_index = FT_Get_Charmap_Index(face->charmap);
|
||||
FT_UInt glyph_index = FTC_CMapCache_Lookup(ft_ctx.cmap_cache, face_id, charmap_index, unicode_letter);
|
||||
FT_UInt glyph_index = FTC_CMapCache_Lookup(context->cmap_cache, face_id, charmap_index, unicode_letter);
|
||||
dsc_out->is_placeholder = glyph_index == 0;
|
||||
|
||||
if(dsc->style & LV_FREETYPE_FONT_STYLE_ITALIC) {
|
||||
@ -332,10 +347,10 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
}
|
||||
|
||||
if(dsc->style & LV_FREETYPE_FONT_STYLE_BOLD) {
|
||||
ft_ctx.current_face = face;
|
||||
context->current_face = face;
|
||||
error = freetype_get_bold_glyph(font, face, glyph_index, dsc_out);
|
||||
if(error) {
|
||||
ft_ctx.current_face = NULL;
|
||||
context->current_face = NULL;
|
||||
return false;
|
||||
}
|
||||
goto end;
|
||||
@ -348,17 +363,17 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
desc_type.width = dsc->size;
|
||||
|
||||
#if LV_FREETYPE_SBIT_CACHE
|
||||
error = FTC_SBitCache_Lookup(ft_ctx.sbit_cache,
|
||||
error = FTC_SBitCache_Lookup(context->sbit_cache,
|
||||
&desc_type,
|
||||
glyph_index,
|
||||
&ft_ctx.sbit,
|
||||
&context->sbit,
|
||||
NULL);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("FTC_SBitCache_Lookup", error);
|
||||
return false;
|
||||
}
|
||||
|
||||
FTC_SBit sbit = ft_ctx.sbit;
|
||||
FTC_SBit sbit = context->sbit;
|
||||
dsc_out->adv_w = sbit->xadvance;
|
||||
dsc_out->box_h = sbit->height; /*Height of the bitmap in [px]*/
|
||||
dsc_out->box_w = sbit->width; /*Width of the bitmap in [px]*/
|
||||
@ -366,21 +381,21 @@ static bool freetype_get_glyph_dsc_cb(const lv_font_t * font,
|
||||
dsc_out->ofs_y = sbit->top - sbit->height; /*Y offset of the bitmap measured from the as line*/
|
||||
dsc_out->bpp = 8; /*Bit per pixel: 1/2/4/8*/
|
||||
#else
|
||||
error = FTC_ImageCache_Lookup(ft_ctx.image_cache,
|
||||
error = FTC_ImageCache_Lookup(context->image_cache,
|
||||
&desc_type,
|
||||
glyph_index,
|
||||
&ft_ctx.image_glyph,
|
||||
&context->image_glyph,
|
||||
NULL);
|
||||
if(error) {
|
||||
FT_ERROR_MSG("ImageCache_Lookup", error);
|
||||
return false;
|
||||
}
|
||||
if(ft_ctx.image_glyph->format != FT_GLYPH_FORMAT_BITMAP) {
|
||||
if(context->image_glyph->format != FT_GLYPH_FORMAT_BITMAP) {
|
||||
LV_LOG_ERROR("image_glyph->format != FT_GLYPH_FORMAT_BITMAP");
|
||||
return false;
|
||||
}
|
||||
|
||||
FT_BitmapGlyph glyph_bitmap = (FT_BitmapGlyph)ft_ctx.image_glyph;
|
||||
FT_BitmapGlyph glyph_bitmap = (FT_BitmapGlyph)context->image_glyph;
|
||||
dsc_out->adv_w = (glyph_bitmap->root.advance.x >> 16);
|
||||
dsc_out->box_h = glyph_bitmap->bitmap.rows; /*Height of the bitmap in [px]*/
|
||||
dsc_out->box_w = glyph_bitmap->bitmap.width; /*Width of the bitmap in [px]*/
|
||||
@ -404,17 +419,19 @@ static const uint8_t * freetype_get_glyph_bitmap_cb(const lv_font_t * font, uint
|
||||
LV_UNUSED(buf_out);
|
||||
|
||||
lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)font->dsc;
|
||||
lv_freetype_context_t * context = ft_ctx;
|
||||
|
||||
if(dsc->style & LV_FREETYPE_FONT_STYLE_BOLD) {
|
||||
if(ft_ctx.current_face && ft_ctx.current_face->glyph->format == FT_GLYPH_FORMAT_BITMAP) {
|
||||
return (const uint8_t *)(ft_ctx.current_face->glyph->bitmap.buffer);
|
||||
if(context->current_face && context->current_face->glyph->format == FT_GLYPH_FORMAT_BITMAP) {
|
||||
return (const uint8_t *)(context->current_face->glyph->bitmap.buffer);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if LV_FREETYPE_SBIT_CACHE
|
||||
return (const uint8_t *)ft_ctx.sbit->buffer;
|
||||
return (const uint8_t *)context->sbit->buffer;
|
||||
#else
|
||||
FT_BitmapGlyph glyph_bitmap = (FT_BitmapGlyph)ft_ctx.image_glyph;
|
||||
FT_BitmapGlyph glyph_bitmap = (FT_BitmapGlyph)context->image_glyph;
|
||||
return (const uint8_t *)glyph_bitmap->bitmap.buffer;
|
||||
#endif
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#if LV_USE_FS_FATFS
|
||||
#include "ff.h"
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -62,25 +63,25 @@ void lv_fs_fatfs_init(void)
|
||||
*--------------------------------------------------*/
|
||||
|
||||
/*Add a simple drive to open images*/
|
||||
static lv_fs_drv_t fs_drv; /*A driver descriptor*/
|
||||
lv_fs_drv_init(&fs_drv);
|
||||
lv_fs_drv_t * fs_drv_p = &(LV_GLOBAL_DEFAULT()->fatfs_fs_drv);
|
||||
lv_fs_drv_init(fs_drv_p);
|
||||
|
||||
/*Set up fields...*/
|
||||
fs_drv.letter = LV_FS_FATFS_LETTER;
|
||||
fs_drv.cache_size = LV_FS_FATFS_CACHE_SIZE;
|
||||
fs_drv_p->letter = LV_FS_FATFS_LETTER;
|
||||
fs_drv_p->cache_size = LV_FS_FATFS_CACHE_SIZE;
|
||||
|
||||
fs_drv.open_cb = fs_open;
|
||||
fs_drv.close_cb = fs_close;
|
||||
fs_drv.read_cb = fs_read;
|
||||
fs_drv.write_cb = fs_write;
|
||||
fs_drv.seek_cb = fs_seek;
|
||||
fs_drv.tell_cb = fs_tell;
|
||||
fs_drv_p->open_cb = fs_open;
|
||||
fs_drv_p->close_cb = fs_close;
|
||||
fs_drv_p->read_cb = fs_read;
|
||||
fs_drv_p->write_cb = fs_write;
|
||||
fs_drv_p->seek_cb = fs_seek;
|
||||
fs_drv_p->tell_cb = fs_tell;
|
||||
|
||||
fs_drv.dir_close_cb = fs_dir_close;
|
||||
fs_drv.dir_open_cb = fs_dir_open;
|
||||
fs_drv.dir_read_cb = fs_dir_read;
|
||||
fs_drv_p->dir_close_cb = fs_dir_close;
|
||||
fs_drv_p->dir_open_cb = fs_dir_open;
|
||||
fs_drv_p->dir_read_cb = fs_dir_read;
|
||||
|
||||
lv_fs_drv_register(&fs_drv);
|
||||
lv_fs_drv_register(fs_drv_p);
|
||||
}
|
||||
|
||||
/**********************
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -68,25 +69,25 @@ void lv_fs_posix_init(void)
|
||||
*--------------------------------------------------*/
|
||||
|
||||
/*Add a simple drive to open images*/
|
||||
static lv_fs_drv_t fs_drv; /*A driver descriptor*/
|
||||
lv_fs_drv_init(&fs_drv);
|
||||
lv_fs_drv_t * fs_drv_p = &(LV_GLOBAL_DEFAULT()->posix_fs_drv);
|
||||
lv_fs_drv_init(fs_drv_p);
|
||||
|
||||
/*Set up fields...*/
|
||||
fs_drv.letter = LV_FS_POSIX_LETTER;
|
||||
fs_drv.cache_size = LV_FS_POSIX_CACHE_SIZE;
|
||||
fs_drv_p->letter = LV_FS_POSIX_LETTER;
|
||||
fs_drv_p->cache_size = LV_FS_POSIX_CACHE_SIZE;
|
||||
|
||||
fs_drv.open_cb = fs_open;
|
||||
fs_drv.close_cb = fs_close;
|
||||
fs_drv.read_cb = fs_read;
|
||||
fs_drv.write_cb = fs_write;
|
||||
fs_drv.seek_cb = fs_seek;
|
||||
fs_drv.tell_cb = fs_tell;
|
||||
fs_drv_p->open_cb = fs_open;
|
||||
fs_drv_p->close_cb = fs_close;
|
||||
fs_drv_p->read_cb = fs_read;
|
||||
fs_drv_p->write_cb = fs_write;
|
||||
fs_drv_p->seek_cb = fs_seek;
|
||||
fs_drv_p->tell_cb = fs_tell;
|
||||
|
||||
fs_drv.dir_close_cb = fs_dir_close;
|
||||
fs_drv.dir_open_cb = fs_dir_open;
|
||||
fs_drv.dir_read_cb = fs_dir_read;
|
||||
fs_drv_p->dir_close_cb = fs_dir_close;
|
||||
fs_drv_p->dir_open_cb = fs_dir_open;
|
||||
fs_drv_p->dir_read_cb = fs_dir_read;
|
||||
|
||||
lv_fs_drv_register(&fs_drv);
|
||||
lv_fs_drv_register(fs_drv_p);
|
||||
}
|
||||
|
||||
/**********************
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -70,25 +71,25 @@ void lv_fs_stdio_init(void)
|
||||
*--------------------------------------------------*/
|
||||
|
||||
/*Add a simple drive to open images*/
|
||||
static lv_fs_drv_t fs_drv; /*A driver descriptor*/
|
||||
lv_fs_drv_init(&fs_drv);
|
||||
lv_fs_drv_t * fs_drv_p = &(LV_GLOBAL_DEFAULT()->stdio_fs_drv);
|
||||
lv_fs_drv_init(fs_drv_p);
|
||||
|
||||
/*Set up fields...*/
|
||||
fs_drv.letter = LV_FS_STDIO_LETTER;
|
||||
fs_drv.cache_size = LV_FS_STDIO_CACHE_SIZE;
|
||||
fs_drv_p->letter = LV_FS_STDIO_LETTER;
|
||||
fs_drv_p->cache_size = LV_FS_STDIO_CACHE_SIZE;
|
||||
|
||||
fs_drv.open_cb = fs_open;
|
||||
fs_drv.close_cb = fs_close;
|
||||
fs_drv.read_cb = fs_read;
|
||||
fs_drv.write_cb = fs_write;
|
||||
fs_drv.seek_cb = fs_seek;
|
||||
fs_drv.tell_cb = fs_tell;
|
||||
fs_drv_p->open_cb = fs_open;
|
||||
fs_drv_p->close_cb = fs_close;
|
||||
fs_drv_p->read_cb = fs_read;
|
||||
fs_drv_p->write_cb = fs_write;
|
||||
fs_drv_p->seek_cb = fs_seek;
|
||||
fs_drv_p->tell_cb = fs_tell;
|
||||
|
||||
fs_drv.dir_close_cb = fs_dir_close;
|
||||
fs_drv.dir_open_cb = fs_dir_open;
|
||||
fs_drv.dir_read_cb = fs_dir_read;
|
||||
fs_drv_p->dir_close_cb = fs_dir_close;
|
||||
fs_drv_p->dir_open_cb = fs_dir_open;
|
||||
fs_drv_p->dir_read_cb = fs_dir_read;
|
||||
|
||||
lv_fs_drv_register(&fs_drv);
|
||||
lv_fs_drv_register(fs_drv_p);
|
||||
}
|
||||
|
||||
/**********************
|
||||
@ -282,7 +283,7 @@ static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn)
|
||||
do {
|
||||
entry = readdir(handle->dir_p);
|
||||
if(entry) {
|
||||
if(entry->d_type == DT_DIR) sprintf(fn, "/%s", entry->d_name);
|
||||
if(entry->d_type == DT_DIR) snprintf(fn, strlen(entry->d_name), "/%s", entry->d_name);
|
||||
else lv_strcpy(fn, entry->d_name);
|
||||
}
|
||||
else {
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "../../core/lv_global.h"
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
@ -66,25 +67,25 @@ void lv_fs_win32_init(void)
|
||||
*--------------------------------------------------*/
|
||||
|
||||
/*Add a simple driver to open images*/
|
||||
static lv_fs_drv_t fs_drv; /*A driver descriptor*/
|
||||
lv_fs_drv_init(&fs_drv);
|
||||
lv_fs_drv_t * fs_drv_p = &(LV_GLOBAL_DEFAULT()->win32_fs_drv);
|
||||
lv_fs_drv_init(fs_drv_p);
|
||||
|
||||
/*Set up fields...*/
|
||||
fs_drv.letter = LV_FS_WIN32_LETTER;
|
||||
fs_drv.cache_size = LV_FS_WIN32_CACHE_SIZE;
|
||||
fs_drv_p->letter = LV_FS_WIN32_LETTER;
|
||||
fs_drv_p->cache_size = LV_FS_WIN32_CACHE_SIZE;
|
||||
|
||||
fs_drv.open_cb = fs_open;
|
||||
fs_drv.close_cb = fs_close;
|
||||
fs_drv.read_cb = fs_read;
|
||||
fs_drv.write_cb = fs_write;
|
||||
fs_drv.seek_cb = fs_seek;
|
||||
fs_drv.tell_cb = fs_tell;
|
||||
fs_drv_p->open_cb = fs_open;
|
||||
fs_drv_p->close_cb = fs_close;
|
||||
fs_drv_p->read_cb = fs_read;
|
||||
fs_drv_p->write_cb = fs_write;
|
||||
fs_drv_p->seek_cb = fs_seek;
|
||||
fs_drv_p->tell_cb = fs_tell;
|
||||
|
||||
fs_drv.dir_close_cb = fs_dir_close;
|
||||
fs_drv.dir_open_cb = fs_dir_open;
|
||||
fs_drv.dir_read_cb = fs_dir_read;
|
||||
fs_drv_p->dir_close_cb = fs_dir_close;
|
||||
fs_drv_p->dir_open_cb = fs_dir_open;
|
||||
fs_drv_p->dir_read_cb = fs_dir_read;
|
||||
|
||||
lv_fs_drv_register(&fs_drv);
|
||||
lv_fs_drv_register(fs_drv_p);
|
||||
}
|
||||
|
||||
/**********************
|
||||
|
@ -172,35 +172,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||
#ifndef LV_TICK_CUSTOM
|
||||
#ifdef CONFIG_LV_TICK_CUSTOM
|
||||
#define LV_TICK_CUSTOM CONFIG_LV_TICK_CUSTOM
|
||||
#else
|
||||
#define LV_TICK_CUSTOM 0
|
||||
#endif
|
||||
#endif
|
||||
#if LV_TICK_CUSTOM
|
||||
#ifndef LV_TICK_CUSTOM_INCLUDE
|
||||
#ifdef CONFIG_LV_TICK_CUSTOM_INCLUDE
|
||||
#define LV_TICK_CUSTOM_INCLUDE CONFIG_LV_TICK_CUSTOM_INCLUDE
|
||||
#else
|
||||
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
|
||||
#endif
|
||||
#endif
|
||||
#ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR
|
||||
#ifdef CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR CONFIG_LV_TICK_CUSTOM_SYS_TIME_EXPR
|
||||
#else
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
|
||||
#endif
|
||||
#endif
|
||||
/*If using lvgl as ESP32 component*/
|
||||
// #define LV_TICK_CUSTOM_INCLUDE "esp_timer.h"
|
||||
// #define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
|
||||
#endif /*LV_TICK_CUSTOM*/
|
||||
|
||||
/*Default Dot Per Inch. Used to initialize default sizes such as widgets sized, style paddings.
|
||||
*(Not so important, you can adjust it to modify default sizes and spaces)*/
|
||||
#ifndef LV_DPI_DEF
|
||||
@ -249,6 +220,28 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Align the stride of all layers and images to this bytes*/
|
||||
#ifndef LV_DRAW_BUF_STRIDE_ALIGN
|
||||
#ifdef _LV_KCONFIG_PRESENT
|
||||
#ifdef CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
|
||||
#define LV_DRAW_BUF_STRIDE_ALIGN CONFIG_LV_DRAW_BUF_STRIDE_ALIGN
|
||||
#else
|
||||
#define LV_DRAW_BUF_STRIDE_ALIGN 0
|
||||
#endif
|
||||
#else
|
||||
#define LV_DRAW_BUF_STRIDE_ALIGN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Align the start address of draw_buf addresses to this bytes*/
|
||||
#ifndef LV_DRAW_BUF_ALIGN
|
||||
#ifdef CONFIG_LV_DRAW_BUF_ALIGN
|
||||
#define LV_DRAW_BUF_ALIGN CONFIG_LV_DRAW_BUF_ALIGN
|
||||
#else
|
||||
#define LV_DRAW_BUF_ALIGN 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Max. memory to be used for layers */
|
||||
#ifndef LV_LAYER_MAX_MEMORY_USAGE
|
||||
#ifdef CONFIG_LV_LAYER_MAX_MEMORY_USAGE
|
||||
@ -366,7 +359,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*=======================
|
||||
* FEATURE CONFIGURATION
|
||||
*=======================*/
|
||||
@ -692,24 +684,23 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*Garbage Collector settings
|
||||
*Used if lvgl is bound to higher level language and the memory is managed by that language*/
|
||||
#ifndef LV_ENABLE_GC
|
||||
#ifdef CONFIG_LV_ENABLE_GC
|
||||
#define LV_ENABLE_GC CONFIG_LV_ENABLE_GC
|
||||
#ifndef LV_ENABLE_GLOBAL_CUSTOM
|
||||
#ifdef CONFIG_LV_ENABLE_GLOBAL_CUSTOM
|
||||
#define LV_ENABLE_GLOBAL_CUSTOM CONFIG_LV_ENABLE_GLOBAL_CUSTOM
|
||||
#else
|
||||
#define LV_ENABLE_GC 0
|
||||
#define LV_ENABLE_GLOBAL_CUSTOM 0
|
||||
#endif
|
||||
#endif
|
||||
#if LV_ENABLE_GC != 0
|
||||
#ifndef LV_GC_INCLUDE
|
||||
#ifdef CONFIG_LV_GC_INCLUDE
|
||||
#define LV_GC_INCLUDE CONFIG_LV_GC_INCLUDE
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM
|
||||
/*Header to include for the custom 'lv_global' function"*/
|
||||
#ifndef LV_GLOBAL_CUSTOM_INCLUDE
|
||||
#ifdef CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
|
||||
#define LV_GLOBAL_CUSTOM_INCLUDE CONFIG_LV_GLOBAL_CUSTOM_INCLUDE
|
||||
#else
|
||||
#define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
|
||||
#define LV_GLOBAL_CUSTOM_INCLUDE <stdint.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif /*LV_ENABLE_GC*/
|
||||
#endif
|
||||
|
||||
/*Default image cache size. Image caching keeps some images opened.
|
||||
*If only the built-in image formats are used there is no real advantage of caching.
|
||||
|
106
src/lv_init.c
106
src/lv_init.c
@ -6,10 +6,11 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "core/lv_global.h"
|
||||
#include "core/lv_obj.h"
|
||||
#include "disp/lv_disp_private.h"
|
||||
#include "indev/lv_indev_private.h"
|
||||
#include "layouts/lv_layouts.h"
|
||||
#include "layouts/lv_layout.h"
|
||||
#include "libs/bmp/lv_bmp.h"
|
||||
#include "libs/ffmpeg/lv_ffmpeg.h"
|
||||
#include "libs/freetype/lv_freetype.h"
|
||||
@ -19,18 +20,13 @@
|
||||
#include "libs/sjpg/lv_sjpg.h"
|
||||
#include "draw/lv_draw.h"
|
||||
#include "draw/lv_img_cache_builtin.h"
|
||||
#include "misc/lv_anim.h"
|
||||
#include "misc/lv_timer.h"
|
||||
#include "misc/lv_async.h"
|
||||
#include "misc/lv_fs.h"
|
||||
#include "misc/lv_gc.h"
|
||||
#if LV_USE_DRAW_SW
|
||||
#include "draw/sw/lv_draw_sw.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define lv_initialized LV_GLOBAL_DEFAULT()->inited
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -43,7 +39,9 @@
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static bool lv_initialized = false;
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM == 0
|
||||
lv_global_t lv_global;
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -52,6 +50,33 @@ static bool lv_initialized = false;
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
static inline void lv_global_init(lv_global_t * global)
|
||||
{
|
||||
LV_ASSERT_NULL(global);
|
||||
|
||||
if(global == NULL) {
|
||||
LV_LOG_ERROR("lv_global cannot be null");
|
||||
return;
|
||||
}
|
||||
|
||||
lv_memset(global, 0, sizeof(lv_global_t));
|
||||
|
||||
_lv_ll_init(&(global->disp_ll), sizeof(lv_disp_t));
|
||||
_lv_ll_init(&(global->indev_ll), sizeof(lv_indev_t));
|
||||
|
||||
global->memory_zero = ZERO_MEM_SENTINEL;
|
||||
global->style_refresh = true;
|
||||
global->layout_count = _LV_LAYOUT_LAST;
|
||||
global->style_last_custom_prop_id = (uint16_t)_LV_STYLE_LAST_BUILT_IN_PROP;
|
||||
global->area_trans_cache.angle_prev = INT32_MIN;
|
||||
global->event_last_register_id = _LV_EVENT_LAST;
|
||||
global->math_rand_seed = 0x1234ABCD;
|
||||
|
||||
#if defined(LV_DRAW_SW_SHADOW_CACHE_SIZE) && LV_DRAW_SW_SHADOW_CACHE_SIZE > 0
|
||||
global->sw_shadow_cache.cache_size = -1;
|
||||
global->sw_shadow_cache.cache_r = -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool lv_is_initialized(void)
|
||||
{
|
||||
@ -60,21 +85,28 @@ bool lv_is_initialized(void)
|
||||
|
||||
void lv_init(void)
|
||||
{
|
||||
/*Do nothing if already initialized*/
|
||||
if(lv_initialized) {
|
||||
LV_LOG_WARN("lv_init: already inited");
|
||||
return;
|
||||
}
|
||||
|
||||
LV_LOG_INFO("begin");
|
||||
|
||||
/*First initialize Garbage Collection if needed*/
|
||||
#ifdef LV_GC_INIT
|
||||
LV_GC_INIT();
|
||||
#endif
|
||||
|
||||
/*Do nothing if already initialized*/
|
||||
if(lv_initialized) {
|
||||
LV_LOG_WARN("lv_init: already initialized");
|
||||
return;
|
||||
}
|
||||
|
||||
LV_LOG_INFO("begin");
|
||||
|
||||
/*Initialize members of static variable lv_global */
|
||||
lv_global_init(LV_GLOBAL_DEFAULT());
|
||||
|
||||
lv_mem_init();
|
||||
|
||||
#if LV_USE_SPAN != 0
|
||||
lv_span_stack_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN
|
||||
lv_profiler_builtin_config_t profiler_config;
|
||||
lv_profiler_builtin_config_init(&profiler_config);
|
||||
@ -85,6 +117,8 @@ void lv_init(void)
|
||||
|
||||
_lv_fs_init();
|
||||
|
||||
_lv_layout_init();
|
||||
|
||||
_lv_anim_core_init();
|
||||
|
||||
_lv_group_init();
|
||||
@ -96,8 +130,6 @@ void lv_init(void)
|
||||
#endif
|
||||
|
||||
_lv_obj_style_init();
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
|
||||
|
||||
/*Initialize the screen refresh system*/
|
||||
_lv_refr_init();
|
||||
@ -147,15 +179,6 @@ void lv_init(void)
|
||||
LV_LOG_WARN("Log level is set to 'Trace' which makes LVGL much slower");
|
||||
#endif
|
||||
|
||||
|
||||
#if LV_USE_FLEX
|
||||
lv_flex_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_GRID
|
||||
lv_grid_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_MSG
|
||||
lv_msg_init();
|
||||
#endif
|
||||
@ -208,15 +231,38 @@ void lv_init(void)
|
||||
LV_LOG_TRACE("finished");
|
||||
}
|
||||
|
||||
#if LV_ENABLE_GC || LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM || LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||||
|
||||
void lv_deinit(void)
|
||||
{
|
||||
_lv_gc_clear_roots();
|
||||
#if LV_USE_SYSMON
|
||||
_lv_sysmon_builtin_deinit();
|
||||
#endif
|
||||
|
||||
lv_disp_set_default(NULL);
|
||||
|
||||
#if LV_USE_SPAN != 0
|
||||
lv_span_stack_deinit();
|
||||
#endif
|
||||
|
||||
#if LV_USE_FREETYPE
|
||||
lv_freetype_uninit();
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_DEFAULT
|
||||
lv_theme_default_deinit();
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_BASIC
|
||||
lv_theme_basic_deinit();
|
||||
#endif
|
||||
|
||||
#if LV_USE_THEME_MONO
|
||||
lv_theme_mono_deinit();
|
||||
#endif
|
||||
|
||||
lv_mem_deinit();
|
||||
|
||||
lv_initialized = false;
|
||||
|
||||
LV_LOG_INFO("lv_deinit done");
|
||||
@ -227,8 +273,6 @@ void lv_deinit(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
@ -35,11 +35,12 @@ extern "C" {
|
||||
void lv_init(void);
|
||||
|
||||
|
||||
#if LV_ENABLE_GC || LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||||
#if LV_ENABLE_GLOBAL_CUSTOM || LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN
|
||||
|
||||
/**
|
||||
* Deinit the 'lv' library
|
||||
* Currently only implemented when not using custom allocators, or GC is enabled.
|
||||
* Currently only implemented when not using custom allocators,
|
||||
* or using custom 'lv_global'.
|
||||
*/
|
||||
void lv_deinit(void);
|
||||
|
||||
|
@ -8,19 +8,21 @@
|
||||
*********************/
|
||||
#include "lv_anim.h"
|
||||
|
||||
#include "../core/lv_global.h"
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "lv_assert.h"
|
||||
#include "lv_timer.h"
|
||||
#include "lv_math.h"
|
||||
#include "../stdlib/lv_mem.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define LV_ANIM_RESOLUTION 1024
|
||||
#define LV_ANIM_RES_SHIFT 10
|
||||
#define state LV_GLOBAL_DEFAULT()->anim_state
|
||||
#define anim_ll_p &(state.anim_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -38,9 +40,6 @@ static int32_t lv_anim_path_cubic_bezier(const lv_anim_t * a, int32_t x1,
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static bool anim_list_changed;
|
||||
static bool anim_run_round;
|
||||
static lv_timer_t * _lv_anim_tmr;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -58,10 +57,11 @@ static lv_timer_t * _lv_anim_tmr;
|
||||
|
||||
void _lv_anim_core_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_anim_ll), sizeof(lv_anim_t));
|
||||
_lv_anim_tmr = lv_timer_create(anim_timer, LV_DEF_REFR_PERIOD, NULL);
|
||||
_lv_ll_init(anim_ll_p, sizeof(lv_anim_t));
|
||||
state.timer = lv_timer_create(anim_timer, LV_DEF_REFR_PERIOD, NULL);
|
||||
anim_mark_list_change(); /*Turn off the animation timer*/
|
||||
anim_list_changed = false;
|
||||
state.anim_list_changed = false;
|
||||
state.anim_run_round = false;
|
||||
}
|
||||
|
||||
void lv_anim_init(lv_anim_t * a)
|
||||
@ -83,14 +83,14 @@ lv_anim_t * lv_anim_start(const lv_anim_t * a)
|
||||
if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*exec_cb == NULL would delete all animations of var*/
|
||||
|
||||
/*Add the new animation to the animation linked list*/
|
||||
lv_anim_t * new_anim = _lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll));
|
||||
lv_anim_t * new_anim = _lv_ll_ins_head(anim_ll_p);
|
||||
LV_ASSERT_MALLOC(new_anim);
|
||||
if(new_anim == NULL) return NULL;
|
||||
|
||||
/*Initialize the animation descriptor*/
|
||||
lv_memcpy(new_anim, a, sizeof(lv_anim_t));
|
||||
if(a->var == a) new_anim->var = new_anim;
|
||||
new_anim->run_round = anim_run_round;
|
||||
new_anim->run_round = state.anim_run_round;
|
||||
new_anim->last_timer_run = lv_tick_get();
|
||||
|
||||
/*Set the start value*/
|
||||
@ -138,13 +138,13 @@ bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb)
|
||||
lv_anim_t * a;
|
||||
lv_anim_t * a_next;
|
||||
bool del = false;
|
||||
a = _lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
|
||||
a = _lv_ll_get_head(anim_ll_p);
|
||||
while(a != NULL) {
|
||||
/*'a' might be deleted, so get the next object while 'a' is valid*/
|
||||
a_next = _lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
|
||||
a_next = _lv_ll_get_next(anim_ll_p, a);
|
||||
|
||||
if((a->var == var || var == NULL) && (a->exec_cb == exec_cb || exec_cb == NULL)) {
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_anim_ll), a);
|
||||
_lv_ll_remove(anim_ll_p, a);
|
||||
if(a->deleted_cb != NULL) a->deleted_cb(a);
|
||||
lv_free(a);
|
||||
anim_mark_list_change(); /*Read by `anim_timer`. It need to know if a delete occurred in
|
||||
@ -160,14 +160,14 @@ bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb)
|
||||
|
||||
void lv_anim_del_all(void)
|
||||
{
|
||||
_lv_ll_clear(&LV_GC_ROOT(_lv_anim_ll));
|
||||
_lv_ll_clear(anim_ll_p);
|
||||
anim_mark_list_change();
|
||||
}
|
||||
|
||||
lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb)
|
||||
{
|
||||
lv_anim_t * a;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_anim_ll), a) {
|
||||
_LV_LL_READ(anim_ll_p, a) {
|
||||
if(a->var == var && (a->exec_cb == exec_cb || exec_cb == NULL)) {
|
||||
return a;
|
||||
}
|
||||
@ -178,14 +178,14 @@ lv_anim_t * lv_anim_get(void * var, lv_anim_exec_xcb_t exec_cb)
|
||||
|
||||
struct _lv_timer_t * lv_anim_get_timer(void)
|
||||
{
|
||||
return _lv_anim_tmr;
|
||||
return state.timer;
|
||||
}
|
||||
|
||||
uint16_t lv_anim_count_running(void)
|
||||
{
|
||||
uint16_t cnt = 0;
|
||||
lv_anim_t * a;
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_anim_ll), a) cnt++;
|
||||
_LV_LL_READ(anim_ll_p, a) cnt++;
|
||||
|
||||
return cnt;
|
||||
}
|
||||
@ -324,9 +324,9 @@ static void anim_timer(lv_timer_t * param)
|
||||
|
||||
|
||||
/*Flip the run round*/
|
||||
anim_run_round = anim_run_round ? false : true;
|
||||
state.anim_run_round = state.anim_run_round ? false : true;
|
||||
|
||||
lv_anim_t * a = _lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
|
||||
lv_anim_t * a = _lv_ll_get_head(anim_ll_p);
|
||||
|
||||
while(a != NULL) {
|
||||
uint32_t elaps = lv_tick_elaps(a->last_timer_run);
|
||||
@ -335,10 +335,10 @@ static void anim_timer(lv_timer_t * param)
|
||||
* happened in `anim_ready_handler` which could make this linked list reading corrupt
|
||||
* because the list is changed meanwhile
|
||||
*/
|
||||
anim_list_changed = false;
|
||||
state.anim_list_changed = false;
|
||||
|
||||
if(a->run_round != anim_run_round) {
|
||||
a->run_round = anim_run_round; /*The list readying might be reset so need to know which anim has run already*/
|
||||
if(a->run_round != state.anim_run_round) {
|
||||
a->run_round = state.anim_run_round; /*The list readying might be reset so need to know which anim has run already*/
|
||||
|
||||
/*The animation will run now for the first time. Call `start_cb`*/
|
||||
int32_t new_act_time = a->act_time + elaps;
|
||||
@ -373,10 +373,10 @@ static void anim_timer(lv_timer_t * param)
|
||||
|
||||
/*If the linked list changed due to anim. delete then it's not safe to continue
|
||||
*the reading of the list from here -> start from the head*/
|
||||
if(anim_list_changed)
|
||||
a = _lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
|
||||
if(state.anim_list_changed)
|
||||
a = _lv_ll_get_head(anim_ll_p);
|
||||
else
|
||||
a = _lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
|
||||
a = _lv_ll_get_next(anim_ll_p, a);
|
||||
}
|
||||
|
||||
}
|
||||
@ -400,7 +400,7 @@ static void anim_ready_handler(lv_anim_t * a)
|
||||
|
||||
/*Delete the animation from the list.
|
||||
* This way the `ready_cb` will see the animations like it's animation is ready deleted*/
|
||||
_lv_ll_remove(&LV_GC_ROOT(_lv_anim_ll), a);
|
||||
_lv_ll_remove(anim_ll_p, a);
|
||||
/*Flag that the list has changed*/
|
||||
anim_mark_list_change();
|
||||
|
||||
@ -433,11 +433,11 @@ static void anim_ready_handler(lv_anim_t * a)
|
||||
|
||||
static void anim_mark_list_change(void)
|
||||
{
|
||||
anim_list_changed = true;
|
||||
if(_lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)) == NULL)
|
||||
lv_timer_pause(_lv_anim_tmr);
|
||||
state.anim_list_changed = true;
|
||||
if(_lv_ll_get_head(anim_ll_p) == NULL)
|
||||
lv_timer_pause(state.timer);
|
||||
else
|
||||
lv_timer_resume(_lv_anim_tmr);
|
||||
lv_timer_resume(state.timer);
|
||||
}
|
||||
|
||||
static int32_t lv_anim_path_cubic_bezier(const lv_anim_t * a, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
|
||||
|
@ -15,6 +15,8 @@ extern "C" {
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "lv_math.h"
|
||||
#include "lv_timer.h"
|
||||
#include "lv_ll.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@ -89,6 +91,13 @@ typedef enum {
|
||||
struct _lv_anim_t;
|
||||
struct _lv_timer_t;
|
||||
|
||||
typedef struct {
|
||||
bool anim_list_changed;
|
||||
bool anim_run_round;
|
||||
struct _lv_timer_t * timer;
|
||||
lv_ll_t anim_ll;
|
||||
} lv_anim_state_t;
|
||||
|
||||
/** Get the current value during an animation*/
|
||||
typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *);
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
#include "lv_area.h"
|
||||
#include "lv_math.h"
|
||||
@ -14,6 +15,7 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define trans_cache LV_GLOBAL_DEFAULT()->area_trans_cache
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -471,11 +473,8 @@ void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_po
|
||||
p->y = (((int32_t)(p->y) * zoom) >> 8) + pivot->y;
|
||||
return;
|
||||
}
|
||||
|
||||
static int32_t angle_prev = INT32_MIN;
|
||||
static int32_t sinma;
|
||||
static int32_t cosma;
|
||||
if(angle_prev != angle) {
|
||||
lv_area_transform_cache_t * cache = &trans_cache;
|
||||
if(cache->angle_prev != angle) {
|
||||
int32_t angle_limited = angle;
|
||||
if(angle_limited > 3600) angle_limited -= 3600;
|
||||
if(angle_limited < 0) angle_limited += 3600;
|
||||
@ -490,21 +489,21 @@ void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_po
|
||||
int32_t c1 = lv_trigo_sin(angle_low + 90);
|
||||
int32_t c2 = lv_trigo_sin(angle_high + 90);
|
||||
|
||||
sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
|
||||
cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
|
||||
sinma = sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
|
||||
cosma = cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
|
||||
angle_prev = angle;
|
||||
cache->sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10;
|
||||
cache->cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10;
|
||||
cache->sinma = cache->sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
|
||||
cache->cosma = cache->cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT);
|
||||
cache->angle_prev = angle;
|
||||
}
|
||||
int32_t x = p->x;
|
||||
int32_t y = p->y;
|
||||
if(zoom == 256) {
|
||||
p->x = ((cosma * x - sinma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
|
||||
p->y = ((sinma * x + cosma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
|
||||
p->x = ((cache->cosma * x - cache->sinma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x;
|
||||
p->y = ((cache->sinma * x + cache->cosma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y;
|
||||
}
|
||||
else {
|
||||
p->x = (((cosma * x - sinma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x;
|
||||
p->y = (((sinma * x + cosma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y;
|
||||
p->x = (((cache->cosma * x - cache->sinma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x;
|
||||
p->y = (((cache->sinma * x + cache->cosma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,11 @@ typedef _lv_dir_t lv_dir_t;
|
||||
typedef uint8_t lv_dir_t;
|
||||
#endif /*DOXYGEN*/
|
||||
|
||||
typedef struct {
|
||||
int32_t angle_prev;
|
||||
int32_t sinma;
|
||||
int32_t cosma;
|
||||
} lv_area_transform_cache_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -32,6 +32,11 @@ typedef struct {
|
||||
lv_base_dir_t dir;
|
||||
} bracket_stack_t;
|
||||
|
||||
typedef struct {
|
||||
bracket_stack_t br_stack[LV_BIDI_BRACKLET_DEPTH];
|
||||
uint8_t br_stack_p;
|
||||
} lv_bidi_ctx_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
@ -42,12 +47,14 @@ static bool lv_bidi_letter_is_weak(uint32_t letter);
|
||||
static bool lv_bidi_letter_is_rtl(uint32_t letter);
|
||||
static bool lv_bidi_letter_is_neutral(uint32_t letter);
|
||||
|
||||
static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint32_t max_len, uint32_t * len,
|
||||
static lv_base_dir_t get_next_run(lv_bidi_ctx_t * ctx, const char * txt, lv_base_dir_t base_dir, uint32_t max_len,
|
||||
uint32_t * len,
|
||||
uint16_t * pos_conv_len);
|
||||
static void rtl_reverse(char * dest, const char * src, uint32_t len, uint16_t * pos_conv_out, uint16_t pos_conv_rd_base,
|
||||
uint16_t pos_conv_len);
|
||||
static uint32_t char_change_to_pair(uint32_t letter);
|
||||
static lv_base_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32_t len, uint32_t letter,
|
||||
static lv_base_dir_t bracket_process(lv_bidi_ctx_t * ctx, const char * txt, uint32_t next_pos, uint32_t len,
|
||||
uint32_t letter,
|
||||
lv_base_dir_t base_dir);
|
||||
static void fill_pos_conv(uint16_t * out, uint16_t len, uint16_t index);
|
||||
static uint32_t get_txt_len(const char * txt, uint32_t max_len);
|
||||
@ -57,8 +64,6 @@ static uint32_t get_txt_len(const char * txt, uint32_t max_len);
|
||||
**********************/
|
||||
static const uint8_t bracket_left[] = {"<({["};
|
||||
static const uint8_t bracket_right[] = {">)}]"};
|
||||
static bracket_stack_t br_stack[LV_BIDI_BRACKLET_DEPTH];
|
||||
static uint8_t br_stack_p;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -240,14 +245,15 @@ void _lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t le
|
||||
lv_base_dir_t dir = base_dir;
|
||||
|
||||
/*Empty the bracket stack*/
|
||||
br_stack_p = 0;
|
||||
lv_bidi_ctx_t ctx;
|
||||
lv_memzero(&ctx, sizeof(ctx));
|
||||
|
||||
/*Process neutral chars in the beginning*/
|
||||
while(rd < len) {
|
||||
uint32_t letter = _lv_txt_encoded_next(str_in, &rd);
|
||||
pos_conv_rd++;
|
||||
dir = lv_bidi_get_letter_dir(letter);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(str_in, rd, len, letter, base_dir);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(&ctx, str_in, rd, len, letter, base_dir);
|
||||
else if(dir != LV_BASE_DIR_WEAK) break;
|
||||
}
|
||||
|
||||
@ -278,7 +284,7 @@ void _lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t le
|
||||
/*Get and process the runs*/
|
||||
|
||||
while(rd < len && str_in[rd]) {
|
||||
run_dir = get_next_run(&str_in[rd], base_dir, len - rd, &run_len, &pos_conv_run_len);
|
||||
run_dir = get_next_run(&ctx, &str_in[rd], base_dir, len - rd, &run_len, &pos_conv_run_len);
|
||||
|
||||
if(base_dir == LV_BASE_DIR_LTR) {
|
||||
if(run_dir == LV_BASE_DIR_LTR) {
|
||||
@ -429,7 +435,8 @@ static void fill_pos_conv(uint16_t * out, uint16_t len, uint16_t index)
|
||||
}
|
||||
}
|
||||
|
||||
static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint32_t max_len, uint32_t * len,
|
||||
static lv_base_dir_t get_next_run(lv_bidi_ctx_t * ctx, const char * txt, lv_base_dir_t base_dir, uint32_t max_len,
|
||||
uint32_t * len,
|
||||
uint16_t * pos_conv_len)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
@ -439,7 +446,7 @@ static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint
|
||||
|
||||
letter = _lv_txt_encoded_next(txt, NULL);
|
||||
lv_base_dir_t dir = lv_bidi_get_letter_dir(letter);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(txt, 0, max_len, letter, base_dir);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(ctx, txt, 0, max_len, letter, base_dir);
|
||||
|
||||
/*Find the first strong char. Skip the neutrals*/
|
||||
while(dir == LV_BASE_DIR_NEUTRAL || dir == LV_BASE_DIR_WEAK) {
|
||||
@ -447,7 +454,7 @@ static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint
|
||||
|
||||
pos_conv_i++;
|
||||
dir = lv_bidi_get_letter_dir(letter);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(txt, i, max_len, letter, base_dir);
|
||||
if(dir == LV_BASE_DIR_NEUTRAL) dir = bracket_process(ctx, txt, i, max_len, letter, base_dir);
|
||||
|
||||
if(dir == LV_BASE_DIR_LTR || dir == LV_BASE_DIR_RTL) break;
|
||||
|
||||
@ -471,7 +478,7 @@ static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint
|
||||
letter = _lv_txt_encoded_next(txt, &i);
|
||||
pos_conv_i++;
|
||||
next_dir = lv_bidi_get_letter_dir(letter);
|
||||
if(next_dir == LV_BASE_DIR_NEUTRAL) next_dir = bracket_process(txt, i, max_len, letter, base_dir);
|
||||
if(next_dir == LV_BASE_DIR_NEUTRAL) next_dir = bracket_process(ctx, txt, i, max_len, letter, base_dir);
|
||||
|
||||
if(next_dir == LV_BASE_DIR_WEAK) {
|
||||
if(run_dir == LV_BASE_DIR_RTL) {
|
||||
@ -605,7 +612,8 @@ static uint32_t char_change_to_pair(uint32_t letter)
|
||||
return letter;
|
||||
}
|
||||
|
||||
static lv_base_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32_t len, uint32_t letter,
|
||||
static lv_base_dir_t bracket_process(lv_bidi_ctx_t * ctx, const char * txt, uint32_t next_pos, uint32_t len,
|
||||
uint32_t letter,
|
||||
lv_base_dir_t base_dir)
|
||||
{
|
||||
lv_base_dir_t bracket_dir = LV_BASE_DIR_NEUTRAL;
|
||||
@ -663,19 +671,19 @@ static lv_base_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32
|
||||
/*The letter was an opening bracket*/
|
||||
if(bracket_left[i] != '\0') {
|
||||
|
||||
if(bracket_dir == LV_BASE_DIR_NEUTRAL || br_stack_p == LV_BIDI_BRACKLET_DEPTH) return LV_BASE_DIR_NEUTRAL;
|
||||
if(bracket_dir == LV_BASE_DIR_NEUTRAL || ctx->br_stack_p == LV_BIDI_BRACKLET_DEPTH) return LV_BASE_DIR_NEUTRAL;
|
||||
|
||||
br_stack[br_stack_p].bracklet_pos = i;
|
||||
br_stack[br_stack_p].dir = bracket_dir;
|
||||
ctx->br_stack[ctx->br_stack_p].bracklet_pos = i;
|
||||
ctx->br_stack[ctx->br_stack_p].dir = bracket_dir;
|
||||
|
||||
br_stack_p++;
|
||||
ctx->br_stack_p++;
|
||||
return bracket_dir;
|
||||
}
|
||||
else if(br_stack_p > 0) {
|
||||
else if(ctx->br_stack_p > 0) {
|
||||
/*Is the letter a closing bracket of the last opening?*/
|
||||
if(letter == bracket_right[br_stack[br_stack_p - 1].bracklet_pos]) {
|
||||
bracket_dir = br_stack[br_stack_p - 1].dir;
|
||||
br_stack_p--;
|
||||
if(letter == bracket_right[ctx->br_stack[ctx->br_stack_p - 1].bracklet_pos]) {
|
||||
bracket_dir = ctx->br_stack[ctx->br_stack_p - 1].dir;
|
||||
ctx->br_stack_p--;
|
||||
return bracket_dir;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_event.h"
|
||||
#include "../core/lv_global.h"
|
||||
#include "../stdlib/lv_mem.h"
|
||||
#include "lv_assert.h"
|
||||
#include <stddef.h>
|
||||
@ -15,6 +16,9 @@
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
#define event_head LV_GLOBAL_DEFAULT()->event_header
|
||||
#define event_last_id LV_GLOBAL_DEFAULT()->event_last_register_id
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -26,11 +30,11 @@
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_event_t * event_head;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#if LV_LOG_TRACE_EVENT
|
||||
#define EVENT_TRACE(...) LV_LOG_TRACE(__VA_ARGS__)
|
||||
#else
|
||||
@ -173,9 +177,8 @@ void lv_event_stop_processing(lv_event_t * e)
|
||||
|
||||
uint32_t lv_event_register_id(void)
|
||||
{
|
||||
static uint32_t last_id = _LV_EVENT_LAST;
|
||||
last_id ++;
|
||||
return last_id;
|
||||
event_last_id ++;
|
||||
return event_last_id;
|
||||
}
|
||||
|
||||
void _lv_event_mark_deleted(void * target)
|
||||
|
@ -12,11 +12,12 @@
|
||||
#include "../misc/lv_assert.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "lv_ll.h"
|
||||
#include "lv_gc.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define fsdrv_ll_p &(LV_GLOBAL_DEFAULT()->fsdrv_ll)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -41,7 +42,7 @@ static const char * lv_fs_get_real_path(const char * path);
|
||||
|
||||
void _lv_fs_init(void)
|
||||
{
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_fsdrv_ll), sizeof(lv_fs_drv_t *));
|
||||
_lv_ll_init(fsdrv_ll_p, sizeof(lv_fs_drv_t *));
|
||||
}
|
||||
|
||||
bool lv_fs_is_ready(char letter)
|
||||
@ -408,7 +409,7 @@ void lv_fs_drv_register(lv_fs_drv_t * drv_p)
|
||||
{
|
||||
/*Save the new driver*/
|
||||
lv_fs_drv_t ** new_drv;
|
||||
new_drv = _lv_ll_ins_head(&LV_GC_ROOT(_lv_fsdrv_ll));
|
||||
new_drv = _lv_ll_ins_head(fsdrv_ll_p);
|
||||
LV_ASSERT_MALLOC(new_drv);
|
||||
if(new_drv == NULL) return;
|
||||
|
||||
@ -419,7 +420,7 @@ lv_fs_drv_t * lv_fs_get_drv(char letter)
|
||||
{
|
||||
lv_fs_drv_t ** drv;
|
||||
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_fsdrv_ll), drv) {
|
||||
_LV_LL_READ(fsdrv_ll_p, drv) {
|
||||
if((*drv)->letter == letter) {
|
||||
return *drv;
|
||||
}
|
||||
@ -433,7 +434,7 @@ char * lv_fs_get_letters(char * buf)
|
||||
lv_fs_drv_t ** drv;
|
||||
uint8_t i = 0;
|
||||
|
||||
_LV_LL_READ(&LV_GC_ROOT(_lv_fsdrv_ll), drv) {
|
||||
_LV_LL_READ(fsdrv_ll_p, drv) {
|
||||
buf[i] = (*drv)->letter;
|
||||
i++;
|
||||
}
|
||||
|
@ -1,47 +0,0 @@
|
||||
/**
|
||||
* @file lv_gc.c
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_gc.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
#if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
|
||||
LV_ROOTS
|
||||
#endif /*LV_ENABLE_GC*/
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
void _lv_gc_clear_roots(void)
|
||||
{
|
||||
#define LV_CLEAR_ROOT(root_type, root_name) lv_memzero(&LV_GC_ROOT(root_name), sizeof(LV_GC_ROOT(root_name)));
|
||||
LV_ITERATE_ROOTS(LV_CLEAR_ROOT)
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
@ -1,97 +0,0 @@
|
||||
/**
|
||||
* @file lv_gc.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_GC_H
|
||||
#define LV_GC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_conf_internal.h"
|
||||
#include <stdint.h>
|
||||
#include "../stdlib/lv_mem.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "lv_ll.h"
|
||||
#include "lv_timer.h"
|
||||
#include "lv_types.h"
|
||||
#include "../draw/lv_img_cache.h"
|
||||
#include "../draw/sw/lv_draw_sw_mask.h"
|
||||
#include "../core/lv_obj_pos.h"
|
||||
#include "../disp/lv_disp.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#if LV_IMG_CACHE_DEF_SIZE
|
||||
# define LV_IMG_CACHE_DEF 1
|
||||
#else
|
||||
# define LV_IMG_CACHE_DEF 0
|
||||
#endif
|
||||
|
||||
#define LV_DISPATCH(f, t, n) f(t, n)
|
||||
#define LV_DISPATCH_COND(f, t, n, m, v) LV_CONCAT3(LV_DISPATCH, m, v)(f, t, n)
|
||||
|
||||
#define LV_DISPATCH00(f, t, n) LV_DISPATCH(f, t, n)
|
||||
#define LV_DISPATCH01(f, t, n)
|
||||
#define LV_DISPATCH10(f, t, n)
|
||||
#define LV_DISPATCH11(f, t, n) LV_DISPATCH(f, t, n)
|
||||
|
||||
#define LV_ITERATE_ROOTS(f) \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_timer_ll) /*Linked list to store the lv_timers*/ \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_disp_ll) /*Linked list of display device*/ \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_indev_ll) /*Linked list of input device*/ \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_fsdrv_ll) \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_anim_ll) \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_group_ll) \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_img_decoder_ll) \
|
||||
LV_DISPATCH(f, lv_ll_t, _lv_obj_style_trans_ll) \
|
||||
LV_DISPATCH(f, lv_layout_dsc_t *, _lv_layout_list) \
|
||||
LV_DISPATCH_COND(f, _lv_img_cache_entry_t*, _lv_img_cache_array, LV_IMG_CACHE_DEF, 1) \
|
||||
LV_DISPATCH_COND(f, _lv_img_cache_entry_t, _lv_img_cache_single, LV_IMG_CACHE_DEF, 0) \
|
||||
LV_DISPATCH(f, lv_timer_t*, _lv_timer_act) \
|
||||
LV_DISPATCH_COND(f, _lv_draw_sw_mask_radius_circle_dsc_arr_t , _lv_circle_cache, LV_DRAW_SW_COMPLEX, 1) \
|
||||
LV_DISPATCH(f, void * , _lv_theme_default_styles) \
|
||||
LV_DISPATCH(f, void * , _lv_theme_basic_styles) \
|
||||
LV_DISPATCH(f, uint8_t * , _lv_style_custom_prop_flag_lookup_table) \
|
||||
LV_DISPATCH(f, lv_draw_unit_t *, _lv_draw_unit_head) \
|
||||
LV_DISPATCH(f, lv_ll_t, _subs_ll)
|
||||
|
||||
#define LV_DEFINE_ROOT(root_type, root_name) root_type root_name;
|
||||
#define LV_ROOTS LV_ITERATE_ROOTS(LV_DEFINE_ROOT)
|
||||
|
||||
#if LV_ENABLE_GC == 1
|
||||
#if LV_USE_BUILTIN_MALLOC
|
||||
#error "GC requires CUSTOM_MEM"
|
||||
#endif /*LV_USE_BUILTIN_MALLOC*/
|
||||
#include LV_GC_INCLUDE
|
||||
#else /*LV_ENABLE_GC*/
|
||||
#define LV_GC_ROOT(x) x
|
||||
#define LV_EXTERN_ROOT(root_type, root_name) extern root_type root_name;
|
||||
LV_ITERATE_ROOTS(LV_EXTERN_ROOT)
|
||||
#endif /*LV_ENABLE_GC*/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void _lv_gc_clear_roots(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_GC_H*/
|
@ -15,6 +15,7 @@
|
||||
#include "../stdlib/lv_mem.h"
|
||||
#include "../stdlib/lv_string.h"
|
||||
#include "../tick/lv_tick.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
#if LV_LOG_PRINTF
|
||||
#include <stdio.h>
|
||||
@ -23,6 +24,10 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#if LV_LOG_USE_TIMESTAMP
|
||||
#define last_log_time LV_GLOBAL_DEFAULT()->log_last_log_time
|
||||
#endif
|
||||
#define custom_print_cb LV_GLOBAL_DEFAULT()->custom_log_print_cb
|
||||
|
||||
#if LV_LOG_USE_TIMESTAMP
|
||||
#define LOG_TIMESTAMP_FMT "\t(%" LV_PRIu32 ".%03" LV_PRIu32 ", +%" LV_PRIu32 ")\t"
|
||||
@ -43,7 +48,6 @@
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_log_print_g_cb_t custom_print_cb;
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -77,10 +81,6 @@ void _lv_log_add(lv_log_level_t level, const char * file, int line, const char *
|
||||
{
|
||||
if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/
|
||||
|
||||
#if LV_LOG_USE_TIMESTAMP
|
||||
static uint32_t last_log_time = 0;
|
||||
#endif
|
||||
|
||||
if(level >= LV_LOG_LEVEL) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
|
@ -7,10 +7,12 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_math.h"
|
||||
#include "../core/lv_global.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define rand_seed LV_GLOBAL_DEFAULT()->math_rand_seed
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@ -377,16 +379,14 @@ int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32
|
||||
|
||||
uint32_t lv_rand(uint32_t min, uint32_t max)
|
||||
{
|
||||
static uint32_t a = 0x1234ABCD; /*Seed*/
|
||||
|
||||
/*Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs"*/
|
||||
uint32_t x = a;
|
||||
uint32_t x = rand_seed;
|
||||
x ^= x << 13;
|
||||
x ^= x >> 17;
|
||||
x ^= x << 5;
|
||||
a = x;
|
||||
rand_seed = x;
|
||||
|
||||
return (a % (max - min + 1)) + min;
|
||||
return (rand_seed % (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
/**********************
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user