mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-23 01:33:59 +08:00
chore: fix spelling (#6401)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
parent
94d48feb22
commit
df0d36f02a
@ -355,7 +355,7 @@
|
||||
#define LV_ATTRIBUTE_FAST_MEM
|
||||
|
||||
/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
||||
*should also appear on LVGL binding API such as Micropython.*/
|
||||
*should also appear on LVGL binding API such as MicroPython.*/
|
||||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
|
||||
|
||||
/*Prefix all global extern data with this*/
|
||||
@ -460,7 +460,7 @@
|
||||
#endif
|
||||
|
||||
/*Enable Arabic/Persian processing
|
||||
*In these languages characters should be replaced with an other form based on their position in the text*/
|
||||
*In these languages characters should be replaced with another form based on their position in the text*/
|
||||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
||||
|
||||
/*==================
|
||||
@ -796,7 +796,7 @@
|
||||
#define LV_USE_IME_PINYIN 1
|
||||
#if LV_USE_IME_PINYIN
|
||||
/*1: Use default thesaurus*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesaurus*/
|
||||
#define LV_IME_PINYIN_USE_DEFAULT_DICT 1
|
||||
/*Set the maximum number of candidate panels that can be displayed*/
|
||||
/*This needs to be adjusted according to the size of the screen*/
|
||||
@ -838,7 +838,7 @@
|
||||
#define LV_USE_X11 0
|
||||
#if LV_USE_X11
|
||||
#define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for rendering*/
|
||||
/*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/
|
||||
#define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/
|
||||
#define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
"vscode": {
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
//"searking.preview-vscode"
|
||||
//"searKing.preview-vscode"
|
||||
"analytic-signal.preview-html"
|
||||
]
|
||||
}
|
||||
|
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -7,7 +7,7 @@ body:
|
||||
attributes:
|
||||
value: >
|
||||
Be sure to read the
|
||||
[FAQ](https://docs.lvgl.io/master/intro/index.html#faq), and the realted
|
||||
[FAQ](https://docs.lvgl.io/master/intro/index.html#faq), and the related
|
||||
part of the [Documentation](https://docs.lvgl.io/) first.
|
||||
- type: input
|
||||
id: version
|
||||
|
2
.github/workflows/build_micropython.yml
vendored
2
.github/workflows/build_micropython.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Micropython CI
|
||||
name: MicroPython CI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
6
Kconfig
6
Kconfig
@ -918,7 +918,7 @@ menu "LVGL configuration"
|
||||
bool "Enable Arabic/Persian processing"
|
||||
help
|
||||
In these languages characters should be replaced with
|
||||
an other form based on their position in the text.
|
||||
another form based on their position in the text.
|
||||
endmenu
|
||||
|
||||
menu "Widget Usage"
|
||||
@ -1207,7 +1207,7 @@ menu "LVGL configuration"
|
||||
bool "GIF decoder library"
|
||||
|
||||
config LV_GIF_CACHE_DECODE_DATA
|
||||
bool "Use extra 16KB RAM to cache decoded data to accerlate"
|
||||
bool "Use extra 16KB RAM to cache decoded data to accelerate"
|
||||
depends on LV_USE_GIF
|
||||
|
||||
config LV_BIN_DECODER_RAM_LOAD
|
||||
@ -1401,7 +1401,7 @@ menu "LVGL configuration"
|
||||
depends on LV_USE_IME_PINYIN
|
||||
default y
|
||||
help
|
||||
If you do not use the default thesaurus, be sure to use lv_ime_pinyin after setting the thesauruss
|
||||
If you do not use the default thesaurus, be sure to use lv_ime_pinyin after setting the thesaurus
|
||||
config LV_IME_PINYIN_CAND_TEXT_NUM
|
||||
int "Maximum number of candidate panels"
|
||||
depends on LV_USE_IME_PINYIN
|
||||
|
@ -60,7 +60,7 @@ Our team is ready to help you with graphics design, UI implementation and consul
|
||||
- [Multiple display](https://docs.lvgl.io/master/overview/display.html#multiple-display-support) support.
|
||||
|
||||
**Binding and Build Support**
|
||||
- [Micropython Binding](https://blog.lvgl.io/2019-02-20/micropython-bindings) exposes LVGL API
|
||||
- [MicroPython Binding](https://blog.lvgl.io/2019-02-20/micropython-bindings) exposes LVGL API
|
||||
- [PikaScript Binding](https://blog.lvgl.io/2022-08-24/pikascript-and-lvgl) python on MCU lighter and easier.
|
||||
- No custom build system is used. You can build LVGL as you build the other files of your project.
|
||||
- Support for Make and [CMake](https://docs.lvgl.io/master/integration/building/cmake.html) is included out of the box.
|
||||
|
@ -45,7 +45,7 @@ extern "C" {
|
||||
* but simply the time difference between the start and end of the rendering is measured
|
||||
*
|
||||
* - Flush time: It's the sum of
|
||||
* - the time spent in the `fluch_cb` and
|
||||
* - the time spent in the `flush_cb` and
|
||||
* - the time spent with waiting for flush ready.
|
||||
*/
|
||||
void lv_demo_benchmark(void);
|
||||
|
@ -23,5 +23,5 @@ The music player demo shows what kind of modern, smartphone-like user interfaces
|
||||
|
||||
## Using spectrum.py
|
||||
- install `librosa` with `pip3 install librosa`
|
||||
- run `python sectrum.py my_file.mp3`
|
||||
- run `python spectrum.py my_file.mp3`
|
||||
- see the result in `spectrum.h`
|
||||
|
@ -95,7 +95,7 @@ Fixes
|
||||
- **fix(x11): fix assert on delete** `5799 <https://github.com/lvgl/lvgl/pull/5799>`__
|
||||
- **fix(demo_music): fix the previous button in the music demo is not clickable** `5808 <https://github.com/lvgl/lvgl/pull/5808>`__
|
||||
- **fix(draw): fix non antialiased rgb565a8 transformation** `5782 <https://github.com/lvgl/lvgl/pull/5782>`__
|
||||
- **fix(freetpye): fix the problem of incomplete font drawing when setting with italic** `5807 <https://github.com/lvgl/lvgl/pull/5807>`__
|
||||
- **fix(freetype): fix the problem of incomplete font drawing when setting with italic** `5807 <https://github.com/lvgl/lvgl/pull/5807>`__
|
||||
- **fix(fsdrv): add missing lv_fs_littlefs_init function declaration** `5778 <https://github.com/lvgl/lvgl/pull/5778>`__
|
||||
- **fix(vg_lite):fix bug for wrong rendering in vertical or horizontal dir** `5789 <https://github.com/lvgl/lvgl/pull/5789>`__
|
||||
- **fix(env): added *.cpp glob in ESP configuration** `5761 <https://github.com/lvgl/lvgl/pull/5761>`__
|
||||
@ -120,7 +120,7 @@ Fixes
|
||||
- **fix(vg_lite): fix the loss of display accuracy of rounded rectangles** `5714 <https://github.com/lvgl/lvgl/pull/5714>`__
|
||||
- **fix(test): check compiler flag should not contain '_'** `5706 <https://github.com/lvgl/lvgl/pull/5706>`__
|
||||
- **fix(imagebutton): fix the example** `5719 <https://github.com/lvgl/lvgl/pull/5719>`__
|
||||
- **fix(drm): eliminate use of non-existent lv_api_map.h and enable smoke tests** `5694 <https://github.com/lvgl/lvgl/pull/5694>`__
|
||||
- **fix(drm): eliminate use of nonexistent lv_api_map.h and enable smoke tests** `5694 <https://github.com/lvgl/lvgl/pull/5694>`__
|
||||
- **fix(test): enable -Wpedantic** `5676 <https://github.com/lvgl/lvgl/pull/5676>`__
|
||||
- **fix(pxp): fix issues in pxp cache management callback** `5685 <https://github.com/lvgl/lvgl/pull/5685>`__
|
||||
- **fix(windows): improve graphic performance via using high resolution tick count and timer delay implementation** `5711 <https://github.com/lvgl/lvgl/pull/5711>`__
|
||||
@ -198,7 +198,7 @@ Fixes
|
||||
- **fix(lvgl.mk): fix vg_lite_tvg.cpp not compiling** `5435 <https://github.com/lvgl/lvgl/pull/5435>`__
|
||||
- **fix(ci): use the dev branch of PlatformIO** `5432 <https://github.com/lvgl/lvgl/pull/5432>`__
|
||||
- **fix(vector) : add path bounding and matrix transform functions.** `5389 <https://github.com/lvgl/lvgl/pull/5389>`__
|
||||
- **fix(warning): fix shadown variable warning** `47750f1 <https://github.com/lvgl/lvgl/commit/47750f1b866e5ea0617035fd208c727878bebc44>`__
|
||||
- **fix(warning): fix shadow variable warning** `47750f1 <https://github.com/lvgl/lvgl/commit/47750f1b866e5ea0617035fd208c727878bebc44>`__
|
||||
- **fix(thorvg): link lvgl_thorvgl with lvgl** `9b09182 <https://github.com/lvgl/lvgl/commit/9b09182fc76032ef0bc8a2d930fa1cf4fd081431>`__
|
||||
- **fix(warning): error: no newline at end of file** `9a6a194 <https://github.com/lvgl/lvgl/commit/9a6a194680db9ea12f59e94eab6e812cb28d504f>`__
|
||||
- **fix(color): treat RGB565A8 bpp same as RGB565** `52426ec <https://github.com/lvgl/lvgl/commit/52426ec1919274e282889129f00e00a9a2a9ce60>`__
|
||||
|
@ -218,4 +218,4 @@ Use GPL licensed code
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The GPL license is not compatible with the MIT license. Therefore, LVGL
|
||||
can not accept GPL licensed code.
|
||||
cannot accept GPL licensed code.
|
||||
|
@ -204,7 +204,7 @@ QT_AUTOBRIEF = NO
|
||||
# tag to YES if you prefer the old behavior instead.
|
||||
#
|
||||
# Note that setting this tag to YES also means that rational rose comments are
|
||||
# not recognized any more.
|
||||
# not recognized anymore.
|
||||
# The default value is: NO.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
@ -278,7 +278,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
@ -520,7 +520,7 @@ INTERNAL_DOCS = YES
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# in case and if your file system supports case-sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
@ -685,7 +685,7 @@ SHOW_NAMESPACES = YES
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command command input-file, where command is the value of the
|
||||
# popen()) the command input-file, where command is the value of the
|
||||
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
|
||||
# by doxygen. Whatever the program writes to standard output is used as the file
|
||||
# version. For an example see the documentation.
|
||||
@ -1487,7 +1487,7 @@ FORMULA_FONTSIZE = 10
|
||||
# FORMULA_TRANSPARENT = YES **OBSOLETE**
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# http://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@ -1557,7 +1557,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
|
@ -60,7 +60,7 @@ LVGL のシステム要件は、RAM 32KB、Flash
|
||||
|
||||
**UIエディタ**\ SquareLine Studio
|
||||
は、LVGL用のプロフェッショナル&リーズナブルなドラッグ&ドロップ型のUIエディターです。
|
||||
Windows、Linux、MacOS
|
||||
Windows、Linux、macOS
|
||||
で動作し、ウェブサイトへの登録なしで試すことができます。
|
||||
|
||||
**サービス**\ LVGL LLC
|
||||
@ -103,7 +103,7 @@ Guide <https://docs-lvgl-io.translate.goog/master/porting/project.html?_x_tr_sl=
|
||||
`マルチディスプレイ <https://docs-lvgl-io.translate.goog/master/overview/display.html?_x_tr_sl=en&_x_tr_tl=ja&_x_tr_hl=ja>`__
|
||||
対応。
|
||||
|
||||
**Binding と Build をサポート** - `Micropython
|
||||
**Binding と Build をサポート** - `MicroPython
|
||||
Binding <https://blog-lvgl-io.translate.goog/2019-02-20/micropython-bindings?_x_tr_sl=en&_x_tr_tl=ja&_x_tr_hl=ja>`__
|
||||
が LVGL API を公開。 -
|
||||
カスタムビルドシステムは使用せず、プロジェクトの他のファイルをビルドするときに、LVGLをビルド可能。
|
||||
|
@ -94,7 +94,7 @@ RAM 和 128 KB Flash、C 编译器、帧缓冲区和至少 1/10 屏幕大小的
|
||||
|
||||
**绑定和构建支持**
|
||||
|
||||
- `Microython 绑定 <https://blog.lvgl.io/2019-02-20/micropython-bindings>`__
|
||||
- `MicroPython 绑定 <https://blog.lvgl.io/2019-02-20/micropython-bindings>`__
|
||||
公开 LVGL的API
|
||||
- `PikaScript 绑定 <https://blog.lvgl.io/2022-08-24/pikascript-and-lvgl>`__
|
||||
在 MCU 上的更轻更简单的 Python 版本
|
||||
|
@ -133,7 +133,7 @@ Drawing and rendering
|
||||
- |uncheck| Multiple shadow/border
|
||||
- |uncheck| Perspective
|
||||
- |uncheck| Text shadow
|
||||
- |uncheck| Innter shadow
|
||||
- |uncheck| Inner shadow
|
||||
- |uncheck| ARGB image stroke/grow on the alpha map
|
||||
- |uncheck| Real time blur
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# ****************************************************************************
|
||||
# IMPOTRANT: If you are getting a lexer error for an example you need to check
|
||||
# IMPORTANT: If you are getting a lexer error for an example you need to check
|
||||
# for extra lines at the end of the file. Only a single empty line
|
||||
# is allowed!!! Ask me how long it took me to figure this out
|
||||
# ****************************************************************************
|
||||
@ -18,7 +18,7 @@ import config_builder
|
||||
import add_translation
|
||||
|
||||
# due to the modifications that take place to the documentation files
|
||||
# when the documentaation builds it is better to copy the source files to a
|
||||
# when the documentation builds it is better to copy the source files to a
|
||||
# temporary folder and modify the copies. Not setting it up this way makes it
|
||||
# a real headache when making alterations that need to be committed as the
|
||||
# alterations trigger the files as changed.
|
||||
|
@ -345,7 +345,7 @@ Examples
|
||||
|
||||
.. _quick-overview_micropython:
|
||||
|
||||
Micropython
|
||||
MicroPython
|
||||
-----------
|
||||
|
||||
Learn more about :ref:`micropython`.
|
||||
|
@ -1,18 +1,18 @@
|
||||
.. _micropython:
|
||||
|
||||
===========
|
||||
Micropython
|
||||
MicroPython
|
||||
===========
|
||||
|
||||
What is Micropython?
|
||||
What is MicroPython?
|
||||
--------------------
|
||||
|
||||
`Micropython <http://micropython.org/>`__ is Python for
|
||||
microcontrollers. Using Micropython, you can write Python3 code and run
|
||||
`MicroPython <http://micropython.org/>`__ is Python for
|
||||
microcontrollers. Using MicroPython, you can write Python3 code and run
|
||||
it even on a bare metal architecture with limited resources.
|
||||
|
||||
|
||||
Highlights of Micropython
|
||||
Highlights of MicroPython
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- **Compact**: Fits and runs within just 256k of code space and 16k of RAM. No OS is needed, although you
|
||||
@ -34,25 +34,25 @@ Highlights of Micropython
|
||||
--------------
|
||||
|
||||
|
||||
Why Micropython + LVGL?
|
||||
Why MicroPython + LVGL?
|
||||
-----------------------
|
||||
|
||||
Micropython `does not have a good native high-level GUI library <https://forum.micropython.org/viewtopic.php?f=18&t=5543>`__.
|
||||
MicroPython `does not have a good native high-level GUI library <https://forum.micropython.org/viewtopic.php?f=18&t=5543>`__.
|
||||
LVGL is an `Object-Oriented Component Based <https://blog.lvgl.io/2018-12-13/extend-lvgl-objects>`__
|
||||
high-level GUI library, which seems to be a natural candidate to map into a higher level language, such as Python.
|
||||
LVGL is implemented in C and its APIs are in C.
|
||||
|
||||
|
||||
Here are some advantages of using LVGL in Micropython:
|
||||
Here are some advantages of using LVGL in MicroPython:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Develop GUI in Python, a very popular high level language. Use paradigms such as Object-Oriented Programming.
|
||||
- Usually, GUI development requires multiple iterations to get things right. With C, each iteration consists of
|
||||
**``Change code`` > ``Build`` > ``Flash`` > ``Run``**. In Micropython it's just
|
||||
**``Change code`` > ``Build`` > ``Flash`` > ``Run``**. In MicroPython it's just
|
||||
**``Change code`` > ``Run``** ! You can even run commands interactively using the
|
||||
`REPL <https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop>`__ (the interactive prompt)
|
||||
|
||||
Micropython + LVGL could be used for:
|
||||
MicroPython + LVGL could be used for:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Fast prototyping GUI.
|
||||
@ -100,20 +100,20 @@ How can I use it?
|
||||
Online Simulator
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to experiment with LVGL + Micropython without downloading
|
||||
If you want to experiment with LVGL + MicroPython without downloading
|
||||
anything - you can use our online simulator! It's a fully functional
|
||||
LVGL + Micropython that runs entirely in the browser and allows you to
|
||||
LVGL + MicroPython that runs entirely in the browser and allows you to
|
||||
edit a python script and run it.
|
||||
|
||||
`Click here to experiment on the online simulator <https://sim.lvgl.io/>`__
|
||||
|
||||
Many `LVGL examples <https://docs.lvgl.io/master/examples.html>`__ are available also for Micropython. Just click the link!
|
||||
Many `LVGL examples <https://docs.lvgl.io/master/examples.html>`__ are available also for MicroPython. Just click the link!
|
||||
|
||||
|
||||
PC Simulator
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Micropython is ported to many platforms. One notable port is "unix", which allows you to build and run Micropython
|
||||
MicroPython is ported to many platforms. One notable port is "unix", which allows you to build and run MicroPython
|
||||
(+LVGL) on a Linux machine. (On a Windows machine you might need Virtual Box or WSL or MinGW or Cygwin etc.)
|
||||
|
||||
`Click here to know more information about building and running the unix port <https://github.com/lvgl/lv_micropython>`__
|
||||
@ -122,13 +122,13 @@ Micropython is ported to many platforms. One notable port is "unix", which allow
|
||||
Embedded Platforms
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In the end, the goal is to run it all on an embedded platform. Both Micropython and LVGL can be used on many embedded
|
||||
architectures. `lv_micropython <https://github.com/lvgl/lv_micropython>`__ is a fork of Micropython+LVGL and currently
|
||||
supports Linux, ESP32, STM32 and RP2. It can be ported to any other platform supported by Micropython.
|
||||
In the end, the goal is to run it all on an embedded platform. Both MicroPython and LVGL can be used on many embedded
|
||||
architectures. `lv_micropython <https://github.com/lvgl/lv_micropython>`__ is a fork of MicroPython+LVGL and currently
|
||||
supports Linux, ESP32, STM32 and RP2. It can be ported to any other platform supported by MicroPython.
|
||||
|
||||
- You would also need display and input drivers. You can either use one of the existing drivers provided with lv_micropython,
|
||||
or you can create your own input/display drivers for your specific hardware.
|
||||
- Drivers can be implemented either in C as a Micropython module, or in pure Python!
|
||||
- Drivers can be implemented either in C as a MicroPython module, or in pure Python!
|
||||
|
||||
lv_micropython already contains these drivers:
|
||||
|
||||
@ -165,17 +165,17 @@ Where can I find more information?
|
||||
- ``lv_micropython`` `README <https://github.com/lvgl/lv_micropython>`__
|
||||
- ``lv_binding_micropython`` `README <https://github.com/lvgl/lv_binding_micropython>`__
|
||||
- The `LVGL micropython forum <https://forum.lvgl.io/c/micropython>`__ (Feel free to ask anything!)
|
||||
- At Micropython: `docs <http://docs.micropython.org/en/latest/>`__ and `forum <https://forum.micropython.org/>`__
|
||||
- At MicroPython: `docs <http://docs.micropython.org/en/latest/>`__ and `forum <https://forum.micropython.org/>`__
|
||||
- `Blog Post <https://blog.lvgl.io/2019-02-20/micropython-bindings>`__, a little outdated.
|
||||
|
||||
|
||||
The Micropython Binding is auto generated!
|
||||
The MicroPython Binding is auto generated!
|
||||
------------------------------------------
|
||||
|
||||
- LVGL is a git submodule inside `lv_micropython <https://github.com/lvgl/lv_micropython>`__
|
||||
(LVGL is a git submodule of `lv_binding_micropython <https://github.com/lvgl/lv_binding_micropython>`__
|
||||
which is itself a submodule of `lv_micropython <https://github.com/lvgl/lv_micropython>`__).
|
||||
- When building lv_micropython, the public LVGL C API is scanned and Micropython API is auto-generated. That means that
|
||||
- When building lv_micropython, the public LVGL C API is scanned and MicroPython API is auto-generated. That means that
|
||||
lv_micropython provides LVGL API for **any** LVGL version, and generally does not require code changes as LVGL evolves.
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ For a summary of coding conventions to follow see the :ref:`coding-style`.
|
||||
Memory Management
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
| When LVGL runs in Micropython, all dynamic memory allocations (:cpp:func:`lv_malloc`) are handled by Micropython's memory
|
||||
| When LVGL runs in MicroPython, all dynamic memory allocations (:cpp:func:`lv_malloc`) are handled by MicroPython's memory
|
||||
manager which is `garbage-collected <https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)>`__ (GC).
|
||||
| To prevent GC from collecting memory prematurely, all dynamic allocated RAM must be reachable by GC.
|
||||
| GC is aware of most allocations, except from pointers on the `Data Segment <https://en.wikipedia.org/wiki/Data_segment>`__:
|
||||
@ -230,18 +230,18 @@ More Information
|
||||
Callbacks
|
||||
~~~~~~~~~
|
||||
|
||||
In C a callback is just a function pointer. But in Micropython we need to register a *Micropython callable object* for each
|
||||
callback. Therefore in the Micropython binding we need to register both a function pointer and a Micropython object for every callback.
|
||||
In C a callback is just a function pointer. But in MicroPython we need to register a *MicroPython callable object* for each
|
||||
callback. Therefore in the MicroPython binding we need to register both a function pointer and a MicroPython object for every callback.
|
||||
|
||||
Therefore we defined a **callback convention** for the LVGL C API that expects lvgl headers to be defined in a certain
|
||||
way. Callbacks that are declared according to the convention would allow the binding to register a Micropython object
|
||||
way. Callbacks that are declared according to the convention would allow the binding to register a MicroPython object
|
||||
next to the function pointer when registering a callback, and access that object when the callback is called.
|
||||
|
||||
- The basic idea is that we have ``void * user_data`` field that is used automatically by the Micropython Binding
|
||||
to save the *Micropython callable object* for a callback. This field must be provided when registering the function
|
||||
- The basic idea is that we have ``void * user_data`` field that is used automatically by the MicroPython Binding
|
||||
to save the *MicroPython callable object* for a callback. This field must be provided when registering the function
|
||||
pointer, and provided to the callback function itself.
|
||||
- Although called "user_data", the user is not expected to read/write that field. Instead, the Micropython glue code uses
|
||||
``user_data`` to automatically keep track of the Micropython callable object. The glue code updates it when the callback
|
||||
- Although called "user_data", the user is not expected to read/write that field. Instead, the MicroPython glue code uses
|
||||
``user_data`` to automatically keep track of the MicroPython callable object. The glue code updates it when the callback
|
||||
is registered, and uses it when the callback is called in order to invoke a call to the original callable object.
|
||||
|
||||
There are a few options for defining a callback in LVGL C API:
|
||||
|
@ -32,10 +32,10 @@ Why PikaScript + LVGL ?
|
||||
-----------------------
|
||||
|
||||
PikaScript now supports the main features of LVGL8, and these APIs are
|
||||
fully compatible with Micropython!
|
||||
fully compatible with MicroPython!
|
||||
|
||||
This means that you can continue to use already written code from
|
||||
Micropython, and then use less code space and RAM.
|
||||
MicroPython, and then use less code space and RAM.
|
||||
|
||||
Enjoy detailed code hints down to the parameter type for a better
|
||||
programming experience
|
||||
|
@ -9,8 +9,8 @@ Overview
|
||||
This project uses CMakePresets to ensure an easy build. Find out more on Cmake Presets here:
|
||||
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
|
||||
|
||||
Prerequsites
|
||||
------------
|
||||
Prerequisites
|
||||
-------------
|
||||
You need to install
|
||||
|
||||
- CMake
|
||||
@ -46,7 +46,7 @@ When hitting the generate button, CMake will create solution files (for VS) or N
|
||||
The following targets are available.
|
||||
|
||||
- lvgl (the actual library, required)
|
||||
- lvgl_thorvg (an vector grafics extension, optional)
|
||||
- lvgl_thorvg (an vector graphics extension, optional)
|
||||
- lvgl_examples (example usages, optional)
|
||||
- lvgl_demos (some demos, optional)
|
||||
|
||||
@ -62,7 +62,7 @@ Build with Command line
|
||||
-----------------------
|
||||
|
||||
You can also build your project using the command line.
|
||||
Run the follwoing commands
|
||||
Run the following commands
|
||||
|
||||
- cmake --preset windows-base
|
||||
- cmake --build --preset windows-base_dbg
|
||||
|
@ -351,7 +351,7 @@ Supported draw tasks are available in "src/draw/nxp/pxp/lv_draw_vglite.c":
|
||||
break;
|
||||
}
|
||||
|
||||
All the below opration can be done in addition with optional opacity.
|
||||
All the below operation can be done in addition with optional opacity.
|
||||
- Fill area with color (w/ radius or gradient).
|
||||
- Blit source image (any format from `_vglite_src_cf_supported()`) over
|
||||
destination (any format from `_vglite_dest_cf_supported()`).
|
||||
|
@ -7,11 +7,11 @@ Overview
|
||||
|
||||
From the `Wikipedia <https://en.wikipedia.org/wiki/MIPI_Alliance>`__:
|
||||
|
||||
`MIPI Allience <https://www.mipi.org/>`__ is a global business alliance that develops technical specifications
|
||||
`MIPI Alliance <https://www.mipi.org/>`__ is a global business alliance that develops technical specifications
|
||||
for the mobile ecosystem, particularly smart phones but including mobile-influenced industries. MIPI was founded in 2003 by Arm, Intel, Nokia, Samsung,
|
||||
STMicroelectronics and Texas Instruments.
|
||||
|
||||
MIPI Allience published a series of specifications related to display devices, including DBI (Display Bus Interface), DSI (Display Serial Interface) and DCS
|
||||
MIPI Alliance published a series of specifications related to display devices, including DBI (Display Bus Interface), DSI (Display Serial Interface) and DCS
|
||||
(Display Command Set). Usually when one talks about a MIPI-compatible display, one thinks of a device with a DSI serial interface. However, the Display Bus Interface specification
|
||||
includes a number of other, legacy interfaces, like SPI serial, or i8080-compatible parallel interface, which are often used to interface LCD displays to lower-end microcontrollers.
|
||||
Furthermore, the DCS specification contains a standard command set, which is supported by a large number of legacy TFT LCD controllers, including the popular Sitronix
|
||||
|
@ -50,7 +50,8 @@ The following code demonstrates using the diver in :cpp:enumerator:`LV_DISPLAY_R
|
||||
lv_display_set_default(disp);
|
||||
|
||||
To use the driver in :cpp:enumerator:`LV_DISPLAY_RENDER_MODE_PARTIAL` mode, an extra buffer must be allocated,
|
||||
desirably in the fastest available memory region.
|
||||
preferably in the fastest available memory region.
|
||||
|
||||
Buffer swapping can be activated by passing a second buffer of same size instead of the :cpp:expr:`NULL` argument.
|
||||
|
||||
.. code:: c
|
||||
|
@ -52,7 +52,7 @@ also introduced the Berry scripting language, a small-footprint language
|
||||
similar to Python and fully integrated in Tasmota.
|
||||
|
||||
A comprehensive mapping of LVGL in Berry language is now available,
|
||||
similar to the mapping of Micropython. It allows to use +98% of all LVGL
|
||||
similar to the mapping of MicroPython. It allows to use +98% of all LVGL
|
||||
features. It is also possible to write custom widgets in Berry.
|
||||
|
||||
Versions supported: LVGL v8.0.2, LodePNG v20201017, Freetype 2.10.4
|
||||
|
@ -43,7 +43,7 @@ Built-in drivers
|
||||
LVGL comes with several `built-in drivers <https://docs.lvgl.io/master/integration/driver/index.html>`__.
|
||||
|
||||
Even if a simulator project comes with e.g. SDL, you can easily replace it by enabling
|
||||
an other driver in ``lv_conf.h`` and calling its ``create`` function.
|
||||
another driver in ``lv_conf.h`` and calling its ``create`` function.
|
||||
|
||||
For example to use the Linux frame buffer device instead of SDL just enable ``LV_USE_LINUX_FBDEV``
|
||||
and call
|
||||
|
@ -120,7 +120,7 @@ This way even if a wrapper item is used on the grid and can be made "transparent
|
||||
|
||||
Limitations:
|
||||
|
||||
- The sub grid is resolved only in one level depth. That is a grid can have a sub grid children, but a sub grid can't have an other sub grid.
|
||||
- The sub grid is resolved only in one level depth. That is a grid can have a sub grid children, but a sub grid can't have another sub grid.
|
||||
- ``LV_GRID_CONTENT`` tracks on the are not handled in the sub grid, only in the its own grid.
|
||||
|
||||
The sub grid feature works the same as in CSS. For further reference see `this description <https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Subgrid>`__.
|
||||
|
@ -38,7 +38,7 @@ Limitations
|
||||
Use GIMP to save the image in the required format. Both RGB888 and
|
||||
ARGB888 works with :c:macro:`LV_COLOR_DEPTH` ``32``
|
||||
- Palette is not supported.
|
||||
- Because not the whole image is read in can not be zoomed or rotated.
|
||||
- Because not the whole image is read in cannot be zoomed or rotated.
|
||||
|
||||
.. _bmp_example:
|
||||
|
||||
|
@ -124,7 +124,7 @@ these examples:
|
||||
The default animation mode is **play forward with loop**.
|
||||
|
||||
If you don't enable looping, a :cpp:enumerator:`LV_EVENT_READY` is sent when the
|
||||
animation can not make more progress without looping.
|
||||
animation cannot make more progress without looping.
|
||||
|
||||
To get the number of frames in an animation or the current frame index,
|
||||
you can cast the :c:struct:`lv_obj_t` instance to a :c:struct:`lv_rlottie_t` instance
|
||||
|
@ -223,7 +223,7 @@ horizontally:
|
||||
|
||||
lv_obj_align_to(label, btn, LV_ALIGN_OUT_TOP_MID, 0, -10);
|
||||
|
||||
Note that, unlike with :cpp:func:`lv_obj_align`, :cpp:func:`lv_obj_align_to` can not
|
||||
Note that, unlike with :cpp:func:`lv_obj_align`, :cpp:func:`lv_obj_align_to` cannot
|
||||
realign the object if its coordinates or the reference object's
|
||||
coordinates change.
|
||||
|
||||
|
@ -125,7 +125,7 @@ The following style properties trigger the creation of a "Simple layer":
|
||||
|
||||
In this case widget will be sliced into ``LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE`` sized chunks.
|
||||
|
||||
If there is no memory for a new chunk, LVGL will try allocating layer when an other chunk is rendered and freed.
|
||||
If there is no memory for a new chunk, LVGL will try allocating layer when another chunk is rendered and freed.
|
||||
|
||||
|
||||
Transformed layer
|
||||
|
@ -13,7 +13,7 @@ Arm-2D accelerates LVGL9 with two modes: **Synchronous Mode** and
|
||||
- When Arm-2D backed 2D-GPUs are available, for example, **DMAC-350 based 2D
|
||||
GPUs**, it is recommend to use **Asynchronous Mode** to accelerate LVGL.
|
||||
|
||||
Arm-2D is an open-source project on Github. For more, please refer to:
|
||||
Arm-2D is an open-source project on GitHub. For more, please refer to:
|
||||
https://github.com/ARM-software/Arm-2D.
|
||||
|
||||
How to Use
|
||||
@ -47,7 +47,7 @@ LVGL (sometimes worse) for regular Cortex-M processors.
|
||||
- The target processors support
|
||||
`Helium <https://developer.arm.com/documentation/102102/0103/?lang=en>`__.
|
||||
- The device vendor provides an arm-2d compliant driver for their
|
||||
propriotory 2D accelerators and/or ACI(Arm Customized Instruction).
|
||||
proprietary 2D accelerators and/or ACI(Arm Customized Instruction).
|
||||
- The target device contains
|
||||
`DMAC-350 <https://community.arm.com/arm-community-blogs/b/internet-of-things-blog/posts/arm-corelink-dma-350-next-generation-direct-memory-access-for-endpoint-ai>`__
|
||||
|
||||
|
@ -148,7 +148,7 @@ The scroll momentum can be enabled/disabled with the
|
||||
Elastic scroll
|
||||
--------------
|
||||
|
||||
Normally an object can't be scrolled past the extremeties of its
|
||||
Normally an object can't be scrolled past the extremities of its
|
||||
content. That is the top side of the content can't be below the top side
|
||||
of the object.
|
||||
|
||||
|
@ -931,7 +931,7 @@ Defines how to align the tracks of the flow
|
||||
</ul>
|
||||
|
||||
### flex_grow
|
||||
Defines how mayn space to take proprtionally the free space of the object's trach
|
||||
Defines how much space to take proportionally from the free space of the object's track
|
||||
<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>
|
||||
|
@ -1456,7 +1456,7 @@ Defines how to align the tracks of the flow
|
||||
flex_grow
|
||||
~~~~~~~~~
|
||||
|
||||
Defines how mayn space to take proprtionally the free space of the object's trach
|
||||
Defines how much space to take proportionally from the free space of the object's track
|
||||
|
||||
.. raw:: html
|
||||
|
||||
|
@ -205,7 +205,7 @@ Property set functions looks like this:
|
||||
|
||||
static lv_style_t style_btn_red;
|
||||
lv_style_init(&style_btn_red);
|
||||
lv_style_set_bg_color(&style_btn_red, lv_plaette_main(LV_PALETTE_RED));
|
||||
lv_style_set_bg_color(&style_btn_red, lv_palette_main(LV_PALETTE_RED));
|
||||
lv_style_set_bg_opa(&style_btn_red, LV_OPA_COVER);
|
||||
|
||||
To remove a property use:
|
||||
@ -249,7 +249,7 @@ Styles can be built as ``const`` too to save RAM:
|
||||
LV_STYLE_CONST_INIT(style1, style1_props);
|
||||
|
||||
Later ``const`` style can be used like any other style but (obviously)
|
||||
new properties can not be added.
|
||||
new properties cannot be added.
|
||||
|
||||
.. _styles_add_remove:
|
||||
|
||||
@ -457,7 +457,7 @@ configured by the following properties in ``lv_conf.h``:
|
||||
- :cpp:enumerator:`LV_LAYER_SIMPLE_BUF_SIZE`: [bytes] the optimal target buffer size. LVGL will try to allocate this size of memory.
|
||||
- :cpp:enumerator:`LV_LAYER_SIMPLE_FALLBACK_BUF_SIZE`: [bytes] used if :cpp:enumerator:`LV_LAYER_SIMPLE_BUF_SIZE` couldn't be allocated.
|
||||
|
||||
If transformation properties were also used the layer can not be
|
||||
If transformation properties were also used the layer cannot be
|
||||
rendered in chunks, but one larger memory needs to be allocated. The
|
||||
required memory depends on the angle, zoom and pivot parameters, and the
|
||||
size of the area to redraw, but it's never larger than the size of the
|
||||
|
@ -234,7 +234,7 @@ If you have multiple displays call :cpp:expr:`lv_display_set_default(disp1)` to
|
||||
select the display to refresh before :cpp:expr:`_lv_display_refr_timer(NULL)`.
|
||||
|
||||
|
||||
.. note:: that :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_display_refr_timer` can not run at the same time.
|
||||
.. note:: that :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_display_refr_timer` cannot run at the same time.
|
||||
|
||||
|
||||
If the performance monitor is enabled, the value of :c:macro:`LV_DEF_REFR_PERIOD` needs to be set to be
|
||||
|
@ -44,7 +44,7 @@ Dispatching
|
||||
While collecting draw tasks LVGL frequently tries to dispatch the collected draw tasks to the draw units.
|
||||
This handles via the ``dispatch_cb`` of the draw units.
|
||||
|
||||
If a draw unit is busy with an other draw task, it just returns. However, it is available it can take a draw task.
|
||||
If a draw unit is busy with another draw task, it just returns. However, it is available it can take a draw task.
|
||||
|
||||
:cpp:expr:`lv_draw_get_next_available_task(layer, previous_task, draw_unit_id)` is a useful helper function which
|
||||
returns an available draw task. "Available draw task" means that, all the draw tasks which should be drawn under a draw task
|
||||
|
@ -75,7 +75,7 @@ To get the steps in an event callback use :cpp:func:`int32_t diff = lv_event_get
|
||||
|
||||
The rotary sensitivity can be adjusted on 2 levels:
|
||||
|
||||
1. In the input device by the `indev->rotary_sensitvity` element (1/256 unit)
|
||||
1. In the input device by the `indev->rotary_sensitivity` element (1/256 unit)
|
||||
2. By the `rotary_sensitivity` style property in the widget (1/256 unit)
|
||||
|
||||
The final diff is calculated like this:
|
||||
@ -289,7 +289,7 @@ You can do this in the following way:
|
||||
/*Call this anywhere you want to read the input device*/
|
||||
lv_indev_read(indev);
|
||||
|
||||
.. note:: that :cpp:func:`lv_indev_read`, :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_display_refr_timer` can not run at the same time.
|
||||
.. note:: that :cpp:func:`lv_indev_read`, :cpp:func:`lv_timer_handler` and :cpp:func:`_lv_display_refr_timer` cannot run at the same time.
|
||||
|
||||
.. note:: For devices in event-driven mode, `data->continue_reading` is ignored.
|
||||
|
||||
|
@ -27,7 +27,7 @@ LVGL has a built-in mutex which can be used with:
|
||||
- :cpp:func:`lv_unlock()`
|
||||
|
||||
These functions are called internally in :cpp:func:`lv_timer_handler`
|
||||
and the users need to call them only from their own therads.
|
||||
and the users need to call them only from their own threads.
|
||||
|
||||
To enable ``lv_lock/lv_unlock`` ``LV_USE_OS`` needs to be set to other
|
||||
than ``LV_OS_NONE``.
|
||||
|
@ -44,7 +44,7 @@ For integration with CMake take a look this section of the
|
||||
Other platforms and tools
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The `Get started </integartion/index>`__ section contains many platform
|
||||
The `Get started </integration/index>`__ section contains many platform
|
||||
specific descriptions e.g. for ESP32, Arduino, NXP, RT-Thread, NuttX,
|
||||
etc.
|
||||
|
||||
|
@ -133,7 +133,7 @@ Some aspects of the scrolling animations in long modes
|
||||
:cpp:enumerator:`LV_LABEL_LONG_SCROLL` and :cpp:enumerator:`LV_LABEL_LONG_SCROLL_CIRCULAR` can be
|
||||
customized by setting the animation property of a style, using
|
||||
:cpp:func:`lv_style_set_anim`.
|
||||
It will be treated as a template which will be used to create the scroll animatins.
|
||||
It will be treated as a template which will be used to create the scroll animations.
|
||||
|
||||
.. _lv_label_symbols:
|
||||
|
||||
|
@ -28,7 +28,7 @@ To create a spinner use
|
||||
:cpp:expr:`lv_spinner_create(parent)`.
|
||||
|
||||
Using :cpp:expr:`lv_spinner_set_anim_params(spinner, spin_duration, angle)` the duration
|
||||
of one revulation and the length of he arc can be customized.
|
||||
of one revolution and the length of he arc can be customized.
|
||||
|
||||
.. _lv_spinner_events:
|
||||
|
||||
|
@ -8,7 +8,7 @@ add_library(lvgl_interface INTERFACE)
|
||||
# ${SOURCES} must NOT be given to add_library directly for some reason (won't be
|
||||
# built)
|
||||
target_sources(lvgl_interface INTERFACE ${SOURCES})
|
||||
# Micropython builds with -Werror; we need to suppress some warnings, such as:
|
||||
# MicroPython builds with -Werror; we need to suppress some warnings, such as:
|
||||
#
|
||||
# /home/test/build/lv_micropython/ports/rp2/build-PICO/lv_mp.c:29316:16: error:
|
||||
# 'lv_style_transition_dsc_t_path_xcb_callback' defined but not used
|
||||
|
@ -99,15 +99,15 @@
|
||||
</release>
|
||||
<release date="2022-11-28" version="1.0.11" url="https://github.com/lvgl/lvgl/raw/f433ed62248cafd915848ff4d0720f97fb0fc7fd/env_support/cmsis-pack/LVGL.lvgl.1.0.11.pack">
|
||||
- LVGL 9.0.0-dev
|
||||
- Montyly update for November
|
||||
- Monthly update for November
|
||||
</release>
|
||||
<release date="2022-10-31" version="1.0.10" url="https://github.com/lvgl/lvgl/raw/0738d1ac36387c1ad5b6bf6f478bc315817bc34e/env_support/cmsis-pack/LVGL.lvgl.1.0.10.pack">
|
||||
- LVGL 9.0.0-dev
|
||||
- Montyly update for October
|
||||
- Monthly update for October
|
||||
</release>
|
||||
<release date="2022-09-16" version="1.0.9" url="https://github.com/lvgl/lvgl/raw/df7d5859f4f4886cb0320f2af1898c350e0ecd2a/env_support/cmsis-pack/LVGL.lvgl.1.0.9.pack">
|
||||
- LVGL 9.0.0-dev
|
||||
- Montyly update for September
|
||||
- Monthly update for September
|
||||
- Introduce a new component: File Explorer
|
||||
- Add support for TTF (Tiny TTF)
|
||||
- Add GPU Support for GD32F450-IPA
|
||||
@ -115,7 +115,7 @@
|
||||
<release date="2022-08-30" version="1.0.8" url="https://github.com/lvgl/lvgl/raw/eb2e296d23b009aca7daf0e9be062d05b4b0048a/env_support/cmsis-pack/LVGL.lvgl.1.0.8.pack">
|
||||
- LVGL 9.0.0-dev
|
||||
- Add the binding for pikascript (an ultra-light-weight python VM)
|
||||
- Montyly update for August
|
||||
- Monthly update for August
|
||||
</release>
|
||||
<release date="2022-07-29" version="1.0.7" url="https://github.com/lvgl/lvgl/raw/b454a66e0be85976385c81cf9c9025f272a66f5d/env_support/cmsis-pack/LVGL.lvgl.1.0.7.pack">
|
||||
- LVGL 9.0.0-dev
|
||||
@ -171,7 +171,7 @@
|
||||
<!-- keywords for indexing -->
|
||||
<keyword>Cortex-M</keyword>
|
||||
<keyword>SysTick</keyword>
|
||||
<keyword>Performance Analaysis</keyword>
|
||||
<keyword>Performance Analysis</keyword>
|
||||
</keywords>
|
||||
|
||||
<conditions>
|
||||
@ -1814,7 +1814,7 @@
|
||||
|
||||
<RTE_Components_h>
|
||||
|
||||
/*! \brief enable demo:bencharmk */
|
||||
/*! \brief enable demo:benchmark */
|
||||
#define LV_USE_DEMO_BENCHMARK 1
|
||||
</RTE_Components_h>
|
||||
|
||||
|
@ -380,7 +380,7 @@
|
||||
#define LV_ATTRIBUTE_FAST_MEM
|
||||
|
||||
/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
||||
*should also appear on LVGL binding API such as Micropython.*/
|
||||
*should also appear on LVGL binding API such as MicroPython.*/
|
||||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
|
||||
|
||||
/*Prefix all global extern data with this*/
|
||||
@ -486,7 +486,7 @@
|
||||
#endif
|
||||
|
||||
/*Enable Arabic/Persian processing
|
||||
*In these languages characters should be replaced with an other form based on their position in the text*/
|
||||
*In these languages characters should be replaced with another form based on their position in the text*/
|
||||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
||||
|
||||
/*==================
|
||||
@ -790,7 +790,7 @@
|
||||
/*Requires: lv_keyboard*/
|
||||
#if LV_USE_IME_PINYIN
|
||||
/*1: Use default thesaurus*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesaurus*/
|
||||
#define LV_IME_PINYIN_USE_DEFAULT_DICT 1
|
||||
/*Set the maximum number of candidate panels that can be displayed*/
|
||||
/*This needs to be adjusted according to the size of the screen*/
|
||||
@ -832,7 +832,7 @@
|
||||
#define LV_USE_X11 0
|
||||
#if LV_USE_X11
|
||||
#define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for rendering*/
|
||||
/*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/
|
||||
#define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/
|
||||
#define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/
|
||||
|
@ -11,7 +11,7 @@
|
||||
PikaEventListener* g_pika_lv_timer_event_listener;
|
||||
|
||||
void __pika_timer_cb(lv_timer_t* timer) {
|
||||
PikaObj* eventHandleObj = pks_eventLisener_getEventHandleObj(
|
||||
PikaObj* eventHandleObj = pks_eventListener_getEventHandleObj(
|
||||
g_pika_lv_timer_event_listener, (uint32_t)timer);
|
||||
obj_newDirectObj(eventHandleObj, "timer", New_pika_lvgl_lv_timer_t);
|
||||
obj_setPtr(obj_getPtr(eventHandleObj, "timer"), "lv_timer", timer);
|
||||
@ -30,9 +30,9 @@ void pika_lvgl_lv_timer_t_set_cb(PikaObj* self, Arg* cb) {
|
||||
obj_setArg(self, "eventCallBack", cb);
|
||||
/* init event_listener for the first time */
|
||||
if (NULL == g_pika_lv_timer_event_listener) {
|
||||
pks_eventLisener_init(&g_pika_lv_timer_event_listener);
|
||||
pks_eventListener_init(&g_pika_lv_timer_event_listener);
|
||||
}
|
||||
pks_eventLicener_registerEvent(g_pika_lv_timer_event_listener,
|
||||
pks_eventListener_registerEvent(g_pika_lv_timer_event_listener,
|
||||
(uint32_t)lv_timer, self);
|
||||
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ void pika_lvgl_lv_obj_add_state(PikaObj* self, int state) {
|
||||
lv_obj_add_state(lv_obj, state);
|
||||
}
|
||||
|
||||
PikaObj* eventLisener_getHandler(PikaObj* self, uintptr_t event_id) {
|
||||
PikaObj* eventListener_getHandler(PikaObj* self, uintptr_t event_id) {
|
||||
Args buffs = {0};
|
||||
char* event_name =
|
||||
strsFormat(&buffs, PIKA_SPRINTF_BUFF_SIZE, "%d", event_id);
|
||||
@ -63,13 +63,13 @@ PikaObj* eventLisener_getHandler(PikaObj* self, uintptr_t event_id) {
|
||||
static void __pika_event_cb(lv_event_t* e) {
|
||||
lv_obj_t* target = lv_event_get_target(e);
|
||||
PikaObj* event_handler =
|
||||
eventLisener_getHandler(pika_lv_event_listener_g, (uintptr_t)target);
|
||||
eventListener_getHandler(pika_lv_event_listener_g, (uintptr_t)target);
|
||||
PikaObj* evt = obj_getObj(event_handler, "_event_evt");
|
||||
obj_setPtr(evt, "lv_event", e);
|
||||
obj_run(event_handler, "_event_cb(_event_evt)");
|
||||
}
|
||||
|
||||
void eventLicener_registerEvent(PikaObj* self,
|
||||
void eventListener_registerEvent(PikaObj* self,
|
||||
uintptr_t event_id,
|
||||
PikaObj* event_handler) {
|
||||
Args buffs = {0};
|
||||
@ -90,7 +90,7 @@ void pika_lvgl_lv_obj_add_event_cb(PikaObj* self,
|
||||
obj_setArg(self, "_event_cb", event_cb);
|
||||
obj_setPtr(self, "_event_user_data", user_data);
|
||||
obj_newDirectObj(self, "_event_evt", New_pika_lvgl_lv_event);
|
||||
eventLicener_registerEvent(pika_lv_event_listener_g, (uintptr_t)lv_obj, self);
|
||||
eventListener_registerEvent(pika_lv_event_listener_g, (uintptr_t)lv_obj, self);
|
||||
}
|
||||
|
||||
void pika_lvgl_lv_obj_add_style(PikaObj *self, PikaObj* style, int selector){
|
||||
|
@ -46,7 +46,7 @@ void lv_example_gridnav_3(void)
|
||||
label = lv_label_create(btn);
|
||||
lv_label_set_text(label, "Button 2");
|
||||
|
||||
/*Create an other container with long text to show how LV_GRIDNAV_CTRL_SCROLL_FIRST works*/
|
||||
/*Create another container with long text to show how LV_GRIDNAV_CTRL_SCROLL_FIRST works*/
|
||||
lv_obj_t * cont_sub1 = lv_obj_create(cont_main);
|
||||
lv_obj_set_size(cont_sub1, lv_pct(100), 100);
|
||||
|
||||
@ -65,7 +65,7 @@ void lv_example_gridnav_3(void)
|
||||
"Hello world!\n"
|
||||
"Hello world!");
|
||||
|
||||
/*Create a third container that can be focused with ENTER and contains an other grid nav*/
|
||||
/*Create a third container that can be focused with ENTER and contains another grid nav*/
|
||||
lv_obj_t * cont_sub2 = lv_obj_create(cont_main);
|
||||
lv_gridnav_add(cont_sub2, LV_GRIDNAV_CTRL_ROLLOVER);
|
||||
/*Only the container needs to be in a group*/
|
||||
|
@ -146,7 +146,7 @@ static void download_timer_cb(lv_timer_t * t)
|
||||
}
|
||||
|
||||
/**
|
||||
* Emulate connection and FW dowlading by timers
|
||||
* Emulate connection and FW downloading by timers
|
||||
*/
|
||||
static void fw_upload_manager_observer_cb(lv_observer_t * observer, lv_subject_t * subject)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ void lv_example_lottie_1(void)
|
||||
static uint8_t buf[64 * 64 * 4];
|
||||
lv_lottie_set_buffer(lottie, 64, 64, buf);
|
||||
#else
|
||||
/*For GPUs and special alignemnt/strid setting use a draw_buf instead*/
|
||||
/*For GPUs and special alignment/strid setting use a draw_buf instead*/
|
||||
LV_DRAW_BUF_DEFINE(draw_buf, 64, 64, LV_COLOR_FORMAT_ARGB8888);
|
||||
lv_lottie_set_draw_buf(lottie, &draw_buf);
|
||||
#endif
|
||||
|
@ -17,7 +17,7 @@ void lv_example_lottie_2(void)
|
||||
static uint8_t buf[64 * 64 * 4];
|
||||
lv_lottie_set_buffer(lottie, 64, 64, buf);
|
||||
#else
|
||||
/*For GPUs and special alignemnt/strid setting use a draw_buf instead*/
|
||||
/*For GPUs and special alignment/strid setting use a draw_buf instead*/
|
||||
LV_DRAW_BUF_DEFINE(draw_buf, 64, 64, LV_COLOR_FORMAT_ARGB8888);
|
||||
lv_lottie_set_draw_buf(lottie, &draw_buf);
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@ static void timer_cb(lv_timer_t * timer)
|
||||
}
|
||||
|
||||
/**
|
||||
* A round scale with multiple needles, resembing a clock
|
||||
* A round scale with multiple needles, resembling a clock
|
||||
*/
|
||||
void lv_example_scale_6(void)
|
||||
{
|
||||
|
@ -424,7 +424,7 @@
|
||||
#define LV_ATTRIBUTE_FAST_MEM
|
||||
|
||||
/*Export integer constant to binding. This macro is used with constants in the form of LV_<CONST> that
|
||||
*should also appear on LVGL binding API such as Micropython.*/
|
||||
*should also appear on LVGL binding API such as MicroPython.*/
|
||||
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning /*The default value just prevents GCC warning*/
|
||||
|
||||
/*Prefix all global extern data with this*/
|
||||
@ -530,7 +530,7 @@
|
||||
#endif
|
||||
|
||||
/*Enable Arabic/Persian processing
|
||||
*In these languages characters should be replaced with an other form based on their position in the text*/
|
||||
*In these languages characters should be replaced with another form based on their position in the text*/
|
||||
#define LV_USE_ARABIC_PERSIAN_CHARS 0
|
||||
|
||||
/*==================
|
||||
@ -887,7 +887,7 @@
|
||||
#define LV_USE_IME_PINYIN 0
|
||||
#if LV_USE_IME_PINYIN
|
||||
/*1: Use default thesaurus*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesauruss*/
|
||||
/*If you do not use the default thesaurus, be sure to use `lv_ime_pinyin` after setting the thesaurus*/
|
||||
#define LV_IME_PINYIN_USE_DEFAULT_DICT 1
|
||||
/*Set the maximum number of candidate panels that can be displayed*/
|
||||
/*This needs to be adjusted according to the size of the screen*/
|
||||
@ -930,7 +930,7 @@
|
||||
#define LV_USE_X11 0
|
||||
#if LV_USE_X11
|
||||
#define LV_X11_DIRECT_EXIT 1 /*Exit the application when all X11 windows have been closed*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for endering*/
|
||||
#define LV_X11_DOUBLE_BUFFER 1 /*Use double buffers for rendering*/
|
||||
/*select only 1 of the following render modes (LV_X11_RENDER_MODE_PARTIAL preferred!)*/
|
||||
#define LV_X11_RENDER_MODE_PARTIAL 1 /*Partial render mode (preferred)*/
|
||||
#define LV_X11_RENDER_MODE_DIRECT 0 /*direct render mode*/
|
||||
|
@ -308,7 +308,7 @@ def write_c_array_file(
|
||||
stride: int,
|
||||
cf: ColorFormat,
|
||||
filename: str,
|
||||
premulitplied: bool,
|
||||
premultiplied: bool,
|
||||
compress: CompressMethod,
|
||||
data: bytes):
|
||||
varname = path.basename(filename).split('.')[0]
|
||||
@ -318,7 +318,7 @@ def write_c_array_file(
|
||||
flags = "0"
|
||||
if compress is not CompressMethod.NONE:
|
||||
flags += " | LV_IMAGE_FLAGS_COMPRESSED"
|
||||
if premulitplied:
|
||||
if premultiplied:
|
||||
flags += " | LV_IMAGE_FLAGS_PREMULTIPLIED"
|
||||
|
||||
macro = "LV_ATTRIBUTE_" + varname.upper()
|
||||
@ -494,7 +494,7 @@ class LVGLImage:
|
||||
h: int = 0,
|
||||
data: bytes = b'') -> None:
|
||||
self.stride = 0 # default no valid stride value
|
||||
self.premulitplied = False
|
||||
self.premultiplied = False
|
||||
self.set_data(cf, w, h, data)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
@ -570,12 +570,12 @@ class LVGLImage:
|
||||
self.stride = stride
|
||||
self.data = bytearray(b''.join(data_out))
|
||||
|
||||
def premulitply(self):
|
||||
def premultiply(self):
|
||||
"""
|
||||
Pre-multiply image RGB data with alpha, set corresponding image header flags
|
||||
"""
|
||||
if self.premulitplied:
|
||||
raise ParameterError("Image already pre-mulitplied")
|
||||
if self.premultiplied:
|
||||
raise ParameterError("Image already pre-multiplied")
|
||||
|
||||
if not self.cf.has_alpha:
|
||||
raise ParameterError(f"Image has no alpha channel: {self.cf.name}")
|
||||
@ -659,7 +659,7 @@ class LVGLImage:
|
||||
else:
|
||||
raise ParameterError(f"Not supported yet: {self.cf.name}")
|
||||
|
||||
self.premulitplied = True
|
||||
self.premultiplied = True
|
||||
|
||||
@property
|
||||
def data_len(self) -> int:
|
||||
@ -752,7 +752,7 @@ class LVGLImage:
|
||||
bin = bytearray()
|
||||
flags = 0
|
||||
flags |= 0x08 if compress != CompressMethod.NONE else 0
|
||||
flags |= 0x01 if self.premulitplied else 0
|
||||
flags |= 0x01 if self.premultiplied else 0
|
||||
|
||||
header = LVGLImageHeader(self.cf,
|
||||
self.w,
|
||||
@ -778,7 +778,7 @@ class LVGLImage:
|
||||
else:
|
||||
data = self.data
|
||||
write_c_array_file(self.w, self.h, self.stride, self.cf, filename,
|
||||
self.premulitplied,
|
||||
self.premultiplied,
|
||||
compress, data)
|
||||
|
||||
def to_png(self, filename: str):
|
||||
@ -1232,7 +1232,7 @@ class PNGConverter:
|
||||
img = LVGLImage().from_png(f, self.cf, background=self.background)
|
||||
img.adjust_stride(align=self.align)
|
||||
if self.premultiply:
|
||||
img.premulitply()
|
||||
img.premultiply()
|
||||
output.append((f, img))
|
||||
if self.ofmt == OutputFormat.BIN_FILE:
|
||||
img.to_bin(self._replace_ext(f, ".bin"),
|
||||
@ -1337,7 +1337,7 @@ def test():
|
||||
cf=ColorFormat.ARGB8565,
|
||||
background=0xFF_FF_00)
|
||||
img.adjust_stride(align=16)
|
||||
img.premulitply()
|
||||
img.premultiply()
|
||||
img.to_bin("output/cogwheel.ARGB8565.bin")
|
||||
img.to_c_array("output/cogwheel-abc.c") # file name is used as c var name
|
||||
img.to_png("output/cogwheel.ARGB8565.png.png") # convert back to png
|
||||
|
@ -40,7 +40,7 @@ print("\tRES = " + str(width) + " x " + str(height) + '\n')
|
||||
|
||||
lenbuf = []
|
||||
block_size = JPEG_SPLIT_HEIGHT;
|
||||
spilts = math.ceil(height/block_size)
|
||||
splits = math.ceil(height/block_size)
|
||||
|
||||
c_code = '''//LVGL SJPG C ARRAY\n#include "lvgl/lvgl.h"\n\nconst uint8_t ''' + OUTPUT_FILE_NAME + '''_map[] = {\n'''
|
||||
|
||||
@ -49,7 +49,7 @@ sjpeg = bytearray()
|
||||
|
||||
|
||||
row_remaining = height;
|
||||
for i in range(spilts):
|
||||
for i in range(splits):
|
||||
if row_remaining < block_size:
|
||||
crop = im.crop((0, i*block_size, width, row_remaining + i*block_size))
|
||||
else:
|
||||
@ -61,7 +61,7 @@ for i in range(spilts):
|
||||
|
||||
|
||||
|
||||
for i in range(spilts):
|
||||
for i in range(splits):
|
||||
f = open(str(i)+".jpg", "rb")
|
||||
a = f.read()
|
||||
f.close()
|
||||
@ -83,7 +83,7 @@ header = header + width.to_bytes(2, byteorder='little');
|
||||
header = header + height.to_bytes(2, byteorder='little');
|
||||
|
||||
#NUMBER OF ITEMS 2 BYTES
|
||||
header = header + spilts.to_bytes(2, byteorder='little');
|
||||
header = header + splits.to_bytes(2, byteorder='little');
|
||||
|
||||
#NUMBER OF ITEMS 2 BYTES
|
||||
header = header + int(JPEG_SPLIT_HEIGHT).to_bytes(2, byteorder='little');
|
||||
|
@ -421,7 +421,7 @@ props = [
|
||||
|
||||
{'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"},
|
||||
'dsc': "Defines how much space to take proportionally from the free space of the object's track"},
|
||||
|
||||
|
||||
|
||||
|
@ -122,7 +122,7 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj);
|
||||
/**
|
||||
* Swap 2 object in a group. The object must be in the same group
|
||||
* @param obj1 pointer to an object
|
||||
* @param obj2 pointer to an other object
|
||||
* @param obj2 pointer to another object
|
||||
*/
|
||||
void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2);
|
||||
|
||||
|
@ -327,7 +327,7 @@ bool lv_obj_has_flag(const lv_obj_t * obj, lv_obj_flag_t f);
|
||||
* Check if a given flag or any of the flags are set on an object.
|
||||
* @param obj pointer to an object
|
||||
* @param f the flag(s) to check (OR-ed values can be used)
|
||||
* @return true: at lest one flag flag is set; false: none of the flags are set
|
||||
* @return true: at least one flag is set; false: none of the flags are set
|
||||
*/
|
||||
bool lv_obj_has_flag_any(const lv_obj_t * obj, lv_obj_flag_t f);
|
||||
|
||||
|
@ -28,7 +28,7 @@ extern "C" {
|
||||
/**
|
||||
* Used as the event parameter of ::LV_EVENT_HIT_TEST to check if an `point` can click the object or not.
|
||||
* `res` should be set like this:
|
||||
* - If already set to `false` an other event wants that point non clickable. If you want to respect it leave it as `false` or set `true` to overwrite it.
|
||||
* - If already set to `false` another event wants that point non clickable. If you want to respect it leave it as `false` or set `true` to overwrite it.
|
||||
* - If already set `true` and `point` shouldn't be clickable set to `false`
|
||||
* - If already set to `true` you agree that `point` can click the object leave it as `true`
|
||||
*/
|
||||
@ -97,7 +97,7 @@ lv_obj_t * lv_event_get_target_obj(lv_event_t * e);
|
||||
* @param obj pointer to an object
|
||||
* @param filter an event code (e.g. `LV_EVENT_CLICKED`) on which the event should be called. `LV_EVENT_ALL` can be used to receive all the events.
|
||||
* @param event_cb the new event function
|
||||
* @param user_data custom data data will be available in `event_cb`
|
||||
* @param user_data custom data will be available in `event_cb`
|
||||
* @return handler to the event. It can be used in `lv_obj_remove_event_dsc`.
|
||||
*/
|
||||
lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data);
|
||||
|
@ -179,9 +179,9 @@ void lv_obj_set_align(lv_obj_t * obj, lv_align_t align);
|
||||
void lv_obj_align(lv_obj_t * obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs);
|
||||
|
||||
/**
|
||||
* Align an object to an other object.
|
||||
* Align an object to another object.
|
||||
* @param obj pointer to an object to align
|
||||
* @param base pointer to an other object (if NULL `obj`s parent is used). 'obj' will be aligned to it.
|
||||
* @param base pointer to another object (if NULL `obj`s parent is used). 'obj' will be aligned to it.
|
||||
* @param align type of alignment (see 'lv_align_t' enum)
|
||||
* @param x_ofs x coordinate offset after alignment
|
||||
* @param y_ofs y coordinate offset after alignment
|
||||
|
@ -212,7 +212,7 @@ void lv_obj_move_to_index(lv_obj_t * obj, int32_t index)
|
||||
}
|
||||
|
||||
const uint32_t parent_child_count = lv_obj_get_child_count(parent);
|
||||
/* old_index only can be 0 or greater, this point can not be reached if the parent is not null */
|
||||
/* old_index only can be 0 or greater, this point cannot be reached if the parent is not null */
|
||||
const int32_t old_index = lv_obj_get_index(obj);
|
||||
LV_ASSERT(0 <= old_index);
|
||||
|
||||
|
@ -807,7 +807,7 @@ static void refr_obj_and_children(lv_layer_t * layer, lv_obj_t * top_obj)
|
||||
}
|
||||
}
|
||||
|
||||
/*Call the post draw draw function of the parents of the to object*/
|
||||
/*Call the post draw function of the parents of the to object*/
|
||||
lv_obj_send_event(parent, LV_EVENT_DRAW_POST_BEGIN, (void *)layer);
|
||||
lv_obj_send_event(parent, LV_EVENT_DRAW_POST, (void *)layer);
|
||||
lv_obj_send_event(parent, LV_EVENT_DRAW_POST_END, (void *)layer);
|
||||
@ -896,7 +896,7 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
|
||||
lv_result_t res = layer_get_area(layer, obj, layer_type, &layer_area_full, &obj_draw_size);
|
||||
if(res != LV_RESULT_OK) return;
|
||||
|
||||
/*Simple layers can be subdivied into smaller layers*/
|
||||
/*Simple layers can be subdivided into smaller layers*/
|
||||
uint32_t max_rgb_row_height = lv_area_get_height(&layer_area_full);
|
||||
uint32_t max_argb_row_height = lv_area_get_height(&layer_area_full);
|
||||
if(layer_type == LV_LAYER_TYPE_SIMPLE) {
|
||||
|
@ -187,7 +187,7 @@ void lv_display_delete(lv_display_t * disp)
|
||||
disp->act_scr = NULL;
|
||||
|
||||
while(disp->screen_cnt != 0) {
|
||||
/*Delete the screenst*/
|
||||
/*Delete the screens*/
|
||||
lv_obj_delete(disp->screens[0]);
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ lv_obj_t * lv_display_get_layer_sys(lv_display_t * disp);
|
||||
|
||||
/**
|
||||
* Return the bottom layer. The bottom layer is the same on all screen and it is under the normal screen layer.
|
||||
* It's visible only if the the screen is transparent.
|
||||
* It's visible only if the screen is transparent.
|
||||
* @param disp pointer to display (NULL to use the default screen)
|
||||
* @return pointer to the bottom layer object
|
||||
*/
|
||||
|
@ -231,7 +231,7 @@ lv_draw_task_t * lv_draw_add_task(lv_layer_t * layer, const lv_area_t * coords);
|
||||
* It will send an event about the new draw task to the widget
|
||||
* and assign it to a draw unit.
|
||||
* @param layer pointer to a layer
|
||||
* @param t poinr to a draw task
|
||||
* @param t pointer to a draw task
|
||||
*/
|
||||
void lv_draw_finalize_task_creation(lv_layer_t * layer, lv_draw_task_t * t);
|
||||
|
||||
@ -271,7 +271,7 @@ lv_draw_task_t * lv_draw_get_next_available_task(lv_layer_t * layer, lv_draw_tas
|
||||
|
||||
/**
|
||||
* Tell how many draw task are waiting to be drawn on the area of `t_check`.
|
||||
* It can be used to determine if a GPU shall combine many draw tasks in to one or not.
|
||||
* It can be used to determine if a GPU shall combine many draw tasks into one or not.
|
||||
* If a lot of tasks are waiting for the current ones it makes sense to draw them one-by-one
|
||||
* to not block the dependent tasks' rendering
|
||||
* @param t_check the task whose dependent tasks shall be counted
|
||||
|
@ -218,7 +218,7 @@ uint32_t lv_draw_buf_width_to_stride_user(const lv_draw_buf_handlers_t * handler
|
||||
void lv_draw_buf_clear(lv_draw_buf_t * draw_buf, const lv_area_t * a);
|
||||
|
||||
/**
|
||||
* Copy an area from a buffer to an other
|
||||
* Copy an area from a buffer to another
|
||||
* @param dest pointer to the destination draw buffer
|
||||
* @param dest_area the area to copy from the destination buffer, if NULL, use the whole buffer
|
||||
* @param src pointer to the source draw buffer
|
||||
|
@ -113,7 +113,7 @@ lv_draw_image_dsc_t * lv_draw_task_get_image_dsc(lv_draw_task_t * task);
|
||||
void lv_draw_image(lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords);
|
||||
|
||||
/**
|
||||
* Create a draw task to blend a layer to an other layer
|
||||
* Create a draw task to blend a layer to another layer
|
||||
* @param layer pointer to a layer
|
||||
* @param dsc pointer to an initialized draw descriptor
|
||||
* @param coords the coordinates of the layer.
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define RAD_TO_DEG 57.295779513082320876798154814105f
|
||||
|
||||
#define MATH_RADIANS(deg) ((deg) * DEG_TO_RAD)
|
||||
#define MATH_DEGRESS(rad) ((rad) * RAD_TO_DEG)
|
||||
#define MATH_DEGREES(rad) ((rad) * RAD_TO_DEG)
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
@ -270,7 +270,7 @@ lv_draw_buf_t * lv_image_decoder_post_process(lv_image_decoder_dsc_t * dsc, lv_d
|
||||
else {
|
||||
decoded = lv_draw_buf_dup_user(image_cache_draw_buf_handlers, decoded);
|
||||
if(decoded == NULL) {
|
||||
LV_LOG_ERROR("No memory for premulitplying.");
|
||||
LV_LOG_ERROR("No memory for premultiplying.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ extern "C" {
|
||||
*********************/
|
||||
|
||||
/** Magic number for lvgl image, 9 means lvgl version 9
|
||||
* It must not be a valid ASCII character nor larger than 0x80. See `lv_image_src_get_type`.
|
||||
* It must be neither a valid ASCII character nor larger than 0x80. See `lv_image_src_get_type`.
|
||||
*/
|
||||
#define LV_IMAGE_HEADER_MAGIC (0x19)
|
||||
LV_EXPORT_CONST_INT(LV_IMAGE_HEADER_MAGIC);
|
||||
|
@ -409,8 +409,8 @@ static void _vglite_draw_pattern(const lv_area_t * clip_area, const lv_area_t *
|
||||
vg_lite_color_t vgcol = _vglite_recolor(dsc);
|
||||
|
||||
/* Filter */
|
||||
bool has_trasform = (dsc->rotation != 0 || dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
|
||||
vg_lite_filter_t filter = has_trasform ? VG_LITE_FILTER_BI_LINEAR : VG_LITE_FILTER_POINT;
|
||||
bool has_transform = (dsc->rotation != 0 || dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
|
||||
vg_lite_filter_t filter = has_transform ? VG_LITE_FILTER_BI_LINEAR : VG_LITE_FILTER_POINT;
|
||||
|
||||
/* Draw Pattern */
|
||||
VGLITE_CHECK_ERROR(vg_lite_draw_pattern(dst_vgbuf, &path, VG_LITE_FILL_NON_ZERO, &path_matrix,
|
||||
|
@ -222,25 +222,25 @@ void lv_draw_sw_rgb565_swap(void * buf, uint32_t buf_size_px)
|
||||
|
||||
}
|
||||
|
||||
void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_sride,
|
||||
void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_stride,
|
||||
int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format)
|
||||
{
|
||||
if(rotation == LV_DISPLAY_ROTATION_90) {
|
||||
switch(color_format) {
|
||||
#if LV_DRAW_SW_SUPPORT_RGB565
|
||||
case LV_COLOR_FORMAT_RGB565:
|
||||
rotate90_rgb565(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate90_rgb565(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_RGB888
|
||||
case LV_COLOR_FORMAT_RGB888:
|
||||
rotate90_rgb888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate90_rgb888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_XRGB8888
|
||||
case LV_COLOR_FORMAT_XRGB8888:
|
||||
case LV_COLOR_FORMAT_ARGB8888:
|
||||
rotate90_argb8888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate90_argb8888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -254,18 +254,18 @@ void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t
|
||||
switch(color_format) {
|
||||
#if LV_DRAW_SW_SUPPORT_RGB565
|
||||
case LV_COLOR_FORMAT_RGB565:
|
||||
rotate180_rgb565(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate180_rgb565(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_RGB888
|
||||
case LV_COLOR_FORMAT_RGB888:
|
||||
rotate180_rgb888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate180_rgb888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_XRGB8888
|
||||
case LV_COLOR_FORMAT_XRGB8888:
|
||||
case LV_COLOR_FORMAT_ARGB8888:
|
||||
rotate180_argb8888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate180_argb8888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -279,18 +279,18 @@ void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t
|
||||
switch(color_format) {
|
||||
#if LV_DRAW_SW_SUPPORT_RGB565
|
||||
case LV_COLOR_FORMAT_RGB565:
|
||||
rotate270_rgb565(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate270_rgb565(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_RGB888
|
||||
case LV_COLOR_FORMAT_RGB888:
|
||||
rotate270_rgb888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate270_rgb888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
#if LV_DRAW_SW_SUPPORT_ARGB8888 || LV_DRAW_SW_SUPPORT_XRGB8888
|
||||
case LV_COLOR_FORMAT_XRGB8888:
|
||||
case LV_COLOR_FORMAT_ARGB8888:
|
||||
rotate270_argb8888(src, dest, src_width, src_height, src_sride, dest_stride);
|
||||
rotate270_argb8888(src, dest, src_width, src_height, src_stride, dest_stride);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -180,17 +180,17 @@ void lv_draw_sw_vector(lv_draw_unit_t * draw_unit, const lv_draw_vector_task_dsc
|
||||
void lv_draw_sw_rgb565_swap(void * buf, uint32_t buf_size_px);
|
||||
|
||||
/**
|
||||
* Rotate a buffer into an other buffer
|
||||
* Rotate a buffer into another buffer
|
||||
* @param src the source buffer
|
||||
* @param dest the destination buffer
|
||||
* @param src_width source width in pixels
|
||||
* @param src_height source height in pixels
|
||||
* @param src_sride source stride in bytes (number of bytes in a row)
|
||||
* @param src_stride source stride in bytes (number of bytes in a row)
|
||||
* @param dest_stride destination stride in bytes (number of bytes in a row)
|
||||
* @param rotation LV_DISPLAY_ROTATION_0/90/180/270
|
||||
* @param color_format LV_COLOR_FORMAT_RGB565/RGB888/XRGB8888/ARGB8888
|
||||
*/
|
||||
void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_sride,
|
||||
void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_stride,
|
||||
int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format);
|
||||
|
||||
/***********************
|
||||
|
@ -582,7 +582,7 @@ static void LV_ATTRIBUTE_FAST_MEM shadow_draw_corner_buf(const lv_area_t * coord
|
||||
lv_draw_sw_mask_radius_init(&mask_param, &sh_area, r, false);
|
||||
|
||||
#if SHADOW_ENHANCE
|
||||
/*Set half shadow width width because blur will be repeated*/
|
||||
/*Set half shadow width because blur will be repeated*/
|
||||
if(sw_ori == 1) sw = 1;
|
||||
else sw = sw_ori >> 1;
|
||||
#endif /*SHADOW_ENHANCE*/
|
||||
|
@ -270,7 +270,7 @@ static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t
|
||||
|
||||
if(decoder_res == LV_RESULT_OK) lv_image_decoder_close(&mask_decoder_dsc);
|
||||
}
|
||||
/* check whether it is possible to accelerate the operation in synchronouse mode */
|
||||
/* check whether it is possible to accelerate the operation in synchronous mode */
|
||||
else if(LV_RESULT_INVALID == LV_DRAW_SW_IMAGE(transformed, /* whether require transform */
|
||||
cf, /* image format */
|
||||
src_buf, /* image buffer */
|
||||
|
@ -87,8 +87,8 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
|
||||
lv_memset(&color, dsc->opa, sizeof(color));
|
||||
}
|
||||
|
||||
bool has_trasform = (dsc->rotation != 0 || dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
|
||||
vg_lite_filter_t filter = has_trasform ? VG_LITE_FILTER_BI_LINEAR : VG_LITE_FILTER_POINT;
|
||||
bool has_transform = (dsc->rotation != 0 || dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
|
||||
vg_lite_filter_t filter = has_transform ? VG_LITE_FILTER_BI_LINEAR : VG_LITE_FILTER_POINT;
|
||||
|
||||
vg_lite_matrix_t matrix;
|
||||
vg_lite_identity(&matrix);
|
||||
|
@ -207,7 +207,7 @@ static lv_result_t decoder_open_variable(lv_image_decoder_t * decoder, lv_image_
|
||||
uint32_t stride = lv_draw_buf_width_to_stride(width, src_cf);
|
||||
lv_draw_buf_init(draw_buf, width, height, src_cf, stride, (void *)image_data, image_data_size);
|
||||
|
||||
/* Use alloced bit to indicate we should not free the memory */
|
||||
/* Use allocated bit to indicate we should not free the memory */
|
||||
draw_buf->header.flags &= ~LV_IMAGE_FLAGS_ALLOCATED;
|
||||
|
||||
/* Do not add this kind of image to cache, since its life is managed by user. */
|
||||
|
@ -46,7 +46,9 @@ float math_fast_inv_sqrtf(float number)
|
||||
x2 = number * 0.5f;
|
||||
y = number;
|
||||
i = *(int32_t *)&y; /* evil floating point bit level hacking */
|
||||
i = 0x5f3759df - (i >> 1); /* what the fuck? */
|
||||
i = 0x5f3759df /* floating-point representation of an approximation of {\sqrt {2^{127}}}} see https://en.wikipedia.org/wiki/Fast_inverse_square_root. */
|
||||
- (i >>
|
||||
1);
|
||||
y = *(float *)&i;
|
||||
y = y * (threehalfs - (x2 * y * y)); /* 1st iteration */
|
||||
|
||||
|
@ -40,7 +40,7 @@ extern "C" {
|
||||
#define MATH_SQRTF(x) sqrtf(x)
|
||||
|
||||
#define MATH_RADIANS(deg) ((deg) * DEG_TO_RAD)
|
||||
#define MATH_DEGRESS(rad) ((rad) * RAD_TO_DEG)
|
||||
#define MATH_DEGREES(rad) ((rad) * RAD_TO_DEG)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
@ -90,7 +90,7 @@ void lv_vg_lite_dump_info(void)
|
||||
|
||||
vg_lite_uint32_t mem_avail = 0;
|
||||
vg_lite_get_mem_size(&mem_avail);
|
||||
LV_LOG_USER("Memory Avaliable: %" LV_PRId32 " Bytes", (uint32_t)mem_avail);
|
||||
LV_LOG_USER("Memory Available: %" LV_PRId32 " Bytes", (uint32_t)mem_avail);
|
||||
}
|
||||
|
||||
const char * lv_vg_lite_error_string(vg_lite_error_t error)
|
||||
@ -398,7 +398,7 @@ vg_lite_buffer_format_t lv_vg_lite_vg_fmt(lv_color_format_t cf)
|
||||
return VG_LITE_NV12;
|
||||
|
||||
default:
|
||||
LV_LOG_ERROR("unsupport color format: %d", cf);
|
||||
LV_LOG_ERROR("unsupported color format: %d", cf);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -489,7 +489,7 @@ void lv_vg_lite_buffer_format_bytes(
|
||||
*mul = 3;
|
||||
break;
|
||||
default:
|
||||
LV_LOG_ERROR("unsupport color format: 0x%" PRIx32, (uint32_t)format);
|
||||
LV_LOG_ERROR("unsupported color format: 0x%" PRIx32, (uint32_t)format);
|
||||
LV_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ static void glcdc_init(void)
|
||||
lv_memzero(fb_background, sizeof(fb_background));
|
||||
|
||||
#ifdef _RENESAS_RA_
|
||||
/* Initalize GLCDC driver */
|
||||
/* Initialize GLCDC driver */
|
||||
uint8_t * p_fb = &fb_background[1][0];
|
||||
fsp_err_t err;
|
||||
|
||||
|
@ -236,7 +236,7 @@ static void mouse_button_callback(GLFWwindow * window, int button, int action, i
|
||||
}
|
||||
}
|
||||
|
||||
static void mouse_move_cllback(GLFWwindow * window, double xpos, double ypos)
|
||||
static void mouse_move_callback(GLFWwindow * window, double xpos, double ypos)
|
||||
{
|
||||
LV_UNUSED(window);
|
||||
lv_display_t * disp = lv_display_get_default();
|
||||
@ -309,7 +309,7 @@ static int window_create(lv_display_t * disp)
|
||||
glfwSetFramebufferSizeCallback(dsc->window, framebuffer_size_callback);
|
||||
|
||||
glfwSetMouseButtonCallback(dsc->window, mouse_button_callback);
|
||||
glfwSetCursorPosCallback(dsc->window, mouse_move_cllback);
|
||||
glfwSetCursorPosCallback(dsc->window, mouse_move_callback);
|
||||
|
||||
glfwSetKeyCallback(dsc->window, key_callback);
|
||||
|
||||
|
@ -116,7 +116,7 @@ size_t lv_libinput_find_devs(lv_libinput_capability capabilities, char ** found,
|
||||
lv_indev_t * lv_libinput_create(lv_indev_type_t indev_type, const char * dev_path);
|
||||
|
||||
/**
|
||||
* Delete a libinput input devic
|
||||
* Delete a libinput input device
|
||||
* @param indev pointer to input device
|
||||
*/
|
||||
void lv_libinput_delete(lv_indev_t * indev);
|
||||
|
@ -189,7 +189,7 @@ void _lv_sdl_mouse_handler(SDL_Event * event)
|
||||
case SDL_MOUSEWHEEL:
|
||||
#if LV_SDL_MOUSEWHEEL_MODE == LV_SDL_MOUSEWHEEL_MODE_CROWN
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/*Escripten scales it wrong*/
|
||||
/*Emscripten scales it wrong*/
|
||||
if(event->wheel.y < 0) dsc->diff++;
|
||||
if(event->wheel.y > 0) dsc->diff--;
|
||||
#else
|
||||
|
@ -117,7 +117,7 @@ void _lv_sdl_mousewheel_handler(SDL_Event * event)
|
||||
switch(event->type) {
|
||||
case SDL_MOUSEWHEEL:
|
||||
#ifdef __EMSCRIPTEN__
|
||||
/*Escripten scales it wrong*/
|
||||
/*Emscripten scales it wrong*/
|
||||
if(event->wheel.y < 0) dsc->diff++;
|
||||
if(event->wheel.y > 0) dsc->diff--;
|
||||
#else
|
||||
|
@ -39,7 +39,7 @@ typedef void(*lv_x11_close_cb)(void * user_data);
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* create and add keyboard, mouse and scrillwheel objects and connect them to x11 display.
|
||||
* create and add keyboard, mouse and scrollwheel objects and connect them to x11 display.
|
||||
*
|
||||
* This is a convenience method handling the typical input initialisation of an X11 window:
|
||||
* - create keyboard (@ref lv_x11_keyboard_create)
|
||||
|
@ -160,7 +160,7 @@ static void x11_flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t *
|
||||
}
|
||||
|
||||
/**
|
||||
* event callbed by lvgl display if resolution has been changed (@ref lv_display_set_resolution has been called)
|
||||
* event called by lvgl display if resolution has been changed (@ref lv_display_set_resolution has been called)
|
||||
* @param[in] e event data, containing lv_display_t object
|
||||
*/
|
||||
static void x11_resolution_evt_cb(lv_event_t * e)
|
||||
@ -189,7 +189,7 @@ static void x11_resolution_evt_cb(lv_event_t * e)
|
||||
}
|
||||
|
||||
/**
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* event called by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* @param[in] e event data, containing lv_display_t object
|
||||
*/
|
||||
static void x11_disp_delete_evt_cb(lv_event_t * e)
|
||||
|
@ -33,7 +33,7 @@ typedef struct _x11_inp_data {
|
||||
lv_indev_t * mousewheel; /**< encoder input device object */
|
||||
lv_timer_t * timer; /**< timer object for @ref x11_event_handler */
|
||||
/* user input related information */
|
||||
char kb_buffer[32]; /**< keyboard buffer for X keyboard inpputs */
|
||||
char kb_buffer[32]; /**< keyboard buffer for X keyboard inputs */
|
||||
lv_point_t mouse_pos; /**< current reported mouse position */
|
||||
bool left_mouse_btn; /**< current state of left mouse button */
|
||||
bool right_mouse_btn; /**< current state of right mouse button */
|
||||
@ -180,7 +180,7 @@ static void x11_inp_event_handler(lv_timer_t * t)
|
||||
}
|
||||
|
||||
/**
|
||||
* event callbed by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* event called by lvgl display if display has been closed (@ref lv_display_delete has been called)
|
||||
* @param[in] e event data, containing lv_display_t object
|
||||
*/
|
||||
static void x11_inp_delete_evt_cb(lv_event_t * e)
|
||||
|
@ -488,13 +488,13 @@ static inline uint8_t rle_next(void)
|
||||
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->state = RLE_STATE_REPEATED;
|
||||
}
|
||||
|
||||
rle->prev_v = ret;
|
||||
rle->rdp += rle->bpp;
|
||||
}
|
||||
else if(rle->state == RLE_STATE_REPEATE) {
|
||||
else if(rle->state == RLE_STATE_REPEATED) {
|
||||
v = get_bits(rle->in, rle->rdp, 1);
|
||||
rle->count++;
|
||||
rle->rdp += 1;
|
||||
|
@ -194,7 +194,7 @@ typedef struct {
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
typedef enum {
|
||||
RLE_STATE_SINGLE = 0,
|
||||
RLE_STATE_REPEATE,
|
||||
RLE_STATE_REPEATED,
|
||||
RLE_STATE_COUNTER,
|
||||
} lv_font_fmt_rle_state_t;
|
||||
|
||||
|
@ -27,7 +27,7 @@ extern "C" {
|
||||
62018, 62019, 62020, 62087, 62099, 62189, 62212, 62810, 63426, 63650
|
||||
*/
|
||||
|
||||
/* These symbols can be prefined in the lv_conf.h file.
|
||||
/* These symbols can be predefined in the lv_conf.h file.
|
||||
* If they are not predefined, they will use the following values
|
||||
*/
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define LV_INDEV_DEF_SCROLL_THROW 10
|
||||
|
||||
/*Long press time in milliseconds.
|
||||
*Time to send `LV_EVENT_LONG_PRESSSED`)*/
|
||||
*Time to send `LV_EVENT_LONG_PRESSED`)*/
|
||||
#define LV_INDEV_DEF_LONG_PRESS_TIME 400
|
||||
|
||||
/*Repeated trigger period in long press [ms]
|
||||
@ -134,7 +134,7 @@ lv_indev_t * lv_indev_create(void)
|
||||
indev->long_press_repeat_time = LV_INDEV_DEF_LONG_PRESS_REP_TIME;
|
||||
indev->gesture_limit = LV_INDEV_DEF_GESTURE_LIMIT;
|
||||
indev->gesture_min_velocity = LV_INDEV_DEF_GESTURE_MIN_VELOCITY;
|
||||
indev->rotary_sensitvity = LV_INDEV_DEF_ROTARY_SENSITIVITY;
|
||||
indev->rotary_sensitivity = LV_INDEV_DEF_ROTARY_SENSITIVITY;
|
||||
return indev;
|
||||
}
|
||||
|
||||
@ -1373,7 +1373,7 @@ static void indev_proc_pointer_diff(lv_indev_t * indev)
|
||||
bool editable = lv_obj_is_editable(obj);
|
||||
|
||||
if(editable) {
|
||||
uint32_t indev_sensitivity = indev->rotary_sensitvity;
|
||||
uint32_t indev_sensitivity = indev->rotary_sensitivity;
|
||||
uint32_t obj_sensitivity = lv_obj_get_style_rotary_sensitivity(indev_obj_act, 0);
|
||||
int32_t diff = (int32_t)((int32_t)indev->pointer.diff * indev_sensitivity * obj_sensitivity + 32768) >> 16;
|
||||
send_event(LV_EVENT_ROTARY, &diff);
|
||||
@ -1385,7 +1385,7 @@ static void indev_proc_pointer_diff(lv_indev_t * indev)
|
||||
indev->pointer.act_obj = obj;
|
||||
lv_obj_t * scroll_obj = lv_indev_find_scroll_obj(indev);
|
||||
if(scroll_obj == NULL) return;
|
||||
uint32_t indev_sensitivity = indev->rotary_sensitvity;
|
||||
uint32_t indev_sensitivity = indev->rotary_sensitivity;
|
||||
uint32_t obj_sensitivity = lv_obj_get_style_rotary_sensitivity(scroll_obj, 0);
|
||||
int32_t diff = (int32_t)((int32_t)indev->pointer.diff * indev_sensitivity * obj_sensitivity + 32768) >> 16;
|
||||
|
||||
|
@ -70,7 +70,7 @@ struct _lv_indev_t {
|
||||
uint16_t long_press_repeat_time;
|
||||
|
||||
/**< Rotary diff count will be multiplied by this value and divided by 256*/
|
||||
int32_t rotary_sensitvity;
|
||||
int32_t rotary_sensitivity;
|
||||
|
||||
struct {
|
||||
/*Pointer and button data*/
|
||||
|
@ -422,7 +422,7 @@ lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t * decoder, lv_image_decod
|
||||
else {
|
||||
decoded_area->y1++;
|
||||
decoded_area->y2++;
|
||||
decoded = decoder_data->decoded_partial; /*Already alloced*/
|
||||
decoded = decoder_data->decoded_partial; /*Already allocated*/
|
||||
}
|
||||
|
||||
img_data = decoded->data; /*Get the buffer to operate on*/
|
||||
|
@ -1938,7 +1938,7 @@ static unsigned deflateDynamic(LodePNGBitWriter * writer, Hash * hash,
|
||||
size_t datasize = dataend - datapos;
|
||||
|
||||
/*
|
||||
If we could call "bitlen_cl" the the code length code lengths ("clcl"), that is the bit lengths of codes to represent
|
||||
If we could call "bitlen_cl" the code length code lengths ("clcl"), that is the bit lengths of codes to represent
|
||||
tree_cl in CLCL_ORDER, then due to the huffman compression of huffman tree representations ("two levels"), there are
|
||||
some analogies:
|
||||
bitlen_lld is to tree_cl what data is to tree_ll and tree_d.
|
||||
|
@ -278,7 +278,7 @@ struct _LodePNGDecompressSettings {
|
||||
|
||||
/*Maximum decompressed size, beyond this the decoder may (and is encouraged to) stop decoding,
|
||||
return an error, output a data size > max_output_size and all the data up to that point. This is
|
||||
not hard limit nor a guarantee, but can prevent excessive memory usage. This setting is
|
||||
neither a hard limit nor a guarantee, but can prevent excessive memory usage. This setting is
|
||||
ignored by the PNG decoder, but is used by the deflate/zlib decoder and can be used by custom ones.
|
||||
Set to 0 to impose no limit (the default).*/
|
||||
size_t max_output_size;
|
||||
@ -1187,7 +1187,7 @@ The following features are supported by the decoder:
|
||||
*) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image
|
||||
*) Adam7 interlace and deinterlace for any color type
|
||||
*) loading the image from harddisk or decoding it from a buffer from other sources than harddisk
|
||||
*) support for alpha channels, including RGBA color modelete,translucent palettes and color keying
|
||||
*) support for alpha channels, including RGBA color model,translucent palettes and color keying
|
||||
*) zlib decompression (inflate)
|
||||
*) zlib compression (deflate)
|
||||
*) CRC32 and ADLER32 checksums
|
||||
|
@ -76,7 +76,7 @@ extern "C" {
|
||||
metadata includes block's compressed size, and maximum bound of decompressed size.
|
||||
Each application is free to encode and pass such metadata in whichever way it wants.
|
||||
|
||||
lz4.h only handle blocks, it can not generate Frames.
|
||||
lz4.h only handle blocks, it cannot generate Frames.
|
||||
|
||||
Blocks are different from Frames (doc/lz4_Frame_format.md).
|
||||
Frames bundle both blocks and metadata in a specified manner.
|
||||
@ -592,7 +592,7 @@ LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset (void* state, const c
|
||||
* Alternatively, the provided dictionaryStream may be NULL,
|
||||
* in which case any existing dictionary stream is unset.
|
||||
*
|
||||
* If a dictionary is provided, it replaces any pre-existing stream history.
|
||||
* If a dictionary is provided, it replaces any preexisting stream history.
|
||||
* The dictionary contents are the only history that can be referenced and
|
||||
* logically immediately precede the data compressed in the first subsequent
|
||||
* compression call.
|
||||
|
@ -121,7 +121,7 @@ static void lv_rlottie_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
|
||||
rlottie->animation = lottie_animation_from_file(create_info.path);
|
||||
}
|
||||
if(rlottie->animation == NULL) {
|
||||
LV_LOG_WARN("The aniamtion can't be opened");
|
||||
LV_LOG_WARN("The animation can't be opened");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -131,18 +131,18 @@ static void lv_rlottie_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
|
||||
|
||||
rlottie->scanline_width = create_info.width * LV_ARGB32 / 8;
|
||||
|
||||
size_t allocaled_buf_size = (create_info.width * create_info.height * LV_ARGB32 / 8);
|
||||
rlottie->allocated_buf = lv_malloc(allocaled_buf_size);
|
||||
size_t allocated_buf_size = (create_info.width * create_info.height * LV_ARGB32 / 8);
|
||||
rlottie->allocated_buf = lv_malloc(allocated_buf_size);
|
||||
if(rlottie->allocated_buf != NULL) {
|
||||
rlottie->allocated_buffer_size = allocaled_buf_size;
|
||||
memset(rlottie->allocated_buf, 0, allocaled_buf_size);
|
||||
rlottie->allocated_buffer_size = allocated_buf_size;
|
||||
memset(rlottie->allocated_buf, 0, allocated_buf_size);
|
||||
}
|
||||
|
||||
rlottie->imgdsc.header.cf = LV_COLOR_FORMAT_ARGB8888;
|
||||
rlottie->imgdsc.header.h = create_info.height;
|
||||
rlottie->imgdsc.header.w = create_info.width;
|
||||
rlottie->imgdsc.data = (void *)rlottie->allocated_buf;
|
||||
rlottie->imgdsc.data_size = allocaled_buf_size;
|
||||
rlottie->imgdsc.data_size = allocated_buf_size;
|
||||
|
||||
lv_image_set_src(obj, &rlottie->imgdsc);
|
||||
|
||||
|
@ -856,7 +856,7 @@ public:
|
||||
/*!
|
||||
\param a An array obtained by \c GetArray().
|
||||
\note \c Array is always pass-by-value.
|
||||
\note the source array is moved into this value and the sourec array becomes empty.
|
||||
\note the source array is moved into this value and the source array becomes empty.
|
||||
*/
|
||||
GenericValue(Array a) RAPIDJSON_NOEXCEPT : data_(a.value_.data_) {
|
||||
a.value_.data_ = Data();
|
||||
@ -867,7 +867,7 @@ public:
|
||||
/*!
|
||||
\param o An object obtained by \c GetObject().
|
||||
\note \c Object is always pass-by-value.
|
||||
\note the source object is moved into this value and the sourec object becomes empty.
|
||||
\note the source object is moved into this value and the source object becomes empty.
|
||||
*/
|
||||
GenericValue(Object o) RAPIDJSON_NOEXCEPT : data_(o.value_.data_) {
|
||||
o.value_.data_ = Data();
|
||||
@ -922,7 +922,7 @@ public:
|
||||
if (RAPIDJSON_LIKELY(this != &rhs)) {
|
||||
// Can't destroy "this" before assigning "rhs", otherwise "rhs"
|
||||
// could be used after free if it's an sub-Value of "this",
|
||||
// hence the temporary danse.
|
||||
// hence the temporary dance.
|
||||
GenericValue temp;
|
||||
temp.RawAssign(rhs);
|
||||
this->~GenericValue();
|
||||
@ -1820,7 +1820,7 @@ public:
|
||||
uint64_t GetUint64() const { RAPIDJSON_ASSERT(data_.f.flags & kUint64Flag); return data_.n.u64; }
|
||||
|
||||
//! Get the value as double type.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the converison is lossless.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessDouble() to check whether the conversion is lossless.
|
||||
*/
|
||||
double GetDouble() const {
|
||||
RAPIDJSON_ASSERT(IsNumber());
|
||||
@ -1832,7 +1832,7 @@ public:
|
||||
}
|
||||
|
||||
//! Get the value as float type.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the converison is lossless.
|
||||
/*! \note If the value is 64-bit integer type, it may lose precision. Use \c IsLosslessFloat() to check whether the conversion is lossless.
|
||||
*/
|
||||
float GetFloat() const {
|
||||
return static_cast<float>(GetDouble());
|
||||
|
@ -452,7 +452,7 @@ struct UTF32 {
|
||||
}
|
||||
};
|
||||
|
||||
//! UTF-32 little endian enocoding.
|
||||
//! UTF-32 little endian encoding.
|
||||
template<typename CharType = unsigned>
|
||||
struct UTF32LE : UTF32<CharType> {
|
||||
template <typename InputByteStream>
|
||||
@ -609,7 +609,7 @@ enum UTFType {
|
||||
};
|
||||
|
||||
//! Dynamically select encoding according to stream's runtime-specified UTF encoding type.
|
||||
/*! \note This class can be used with AutoUTFInputtStream and AutoUTFOutputStream, which provides GetType().
|
||||
/*! \note This class can be used with AutoUTFInputStream and AutoUTFOutputStream, which provides GetType().
|
||||
*/
|
||||
template<typename CharType>
|
||||
struct AutoUTF {
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
//! Assignment operator.
|
||||
GenericPointer& operator=(const GenericPointer& rhs) {
|
||||
if (this != &rhs) {
|
||||
// Do not delete ownAllcator
|
||||
// Do not delete ownAllocator
|
||||
if (nameBuffer_)
|
||||
Allocator::Free(tokens_);
|
||||
|
||||
@ -191,7 +191,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! Swap the content of this pointer with an other.
|
||||
//! Swap the content of this pointer with another.
|
||||
/*!
|
||||
\param other The pointer to swap with.
|
||||
\note Constant complexity.
|
||||
@ -525,7 +525,7 @@ public:
|
||||
|
||||
\note
|
||||
There are only 3 situations when a URI cannot be resolved:
|
||||
1. A value in the path is not an array nor object.
|
||||
1. A value in the path is neither an array nor object.
|
||||
2. An object value does not contain the token.
|
||||
3. A token is out of range of an array value.
|
||||
|
||||
@ -586,7 +586,7 @@ public:
|
||||
|
||||
\note
|
||||
There are only 3 situations when a value cannot be resolved:
|
||||
1. A value in the path is not an array nor object.
|
||||
1. A value in the path is neither an array nor object.
|
||||
2. An object value does not contain the token.
|
||||
3. A token is out of range of an array value.
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user