chore(docs): fix a few typos (#4170)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
@@ -91,7 +91,7 @@ Our goal is to provide financial compensation for people who do the most for LVG
|
|||||||
We use [GitHub Sponsors](https://github.com/sponsors/lvgl) where you can easily send one time or recurring donations. You can also see all of our expenses in a transparent way.
|
We use [GitHub Sponsors](https://github.com/sponsors/lvgl) where you can easily send one time or recurring donations. You can also see all of our expenses in a transparent way.
|
||||||
|
|
||||||
**How to get paid for your contribution?**<br>
|
**How to get paid for your contribution?**<br>
|
||||||
If someone implements or fixes an issue labeled as [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) he or she will get a payment for that work. We estimate the required time, complexity and importance of the issue and set a price accordingly. To jump in just comment on a [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) issue saying "Hi, I'd like to deal with it. This is how I'm planning to fix/implement it...". A work is considered ready when it's approved and merged by a maintainer. After that you can submit and expense at [opencollective.com](https://opencollective.com/lvgl) and you will receive teh payment in a few days.
|
If someone implements or fixes an issue labeled as [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) he or she will get a payment for that work. We estimate the required time, complexity and importance of the issue and set a price accordingly. To jump in just comment on a [Sponsored](https://github.com/lvgl/lvgl/labels/Sponsored) issue saying "Hi, I'd like to deal with it. This is how I'm planning to fix/implement it...". A work is considered ready when it's approved and merged by a maintainer. After that you can submit and expense at [opencollective.com](https://opencollective.com/lvgl) and you will receive the payment in a few days.
|
||||||
|
|
||||||
**Organizations supporting LVGL**<br>
|
**Organizations supporting LVGL**<br>
|
||||||
[](https://opencollective.com/lvgl)
|
[](https://opencollective.com/lvgl)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ pre-commit
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
`pre-commit <https://pre-commit.com/>`__ is a multi-language package
|
`pre-commit <https://pre-commit.com/>`__ is a multi-language package
|
||||||
manager for pre-commit hooks. See the `instalation
|
manager for pre-commit hooks. See the `installation
|
||||||
guide <https://pre-commit.com/#installation>`__ to get pre-commit python
|
guide <https://pre-commit.com/#installation>`__ to get pre-commit python
|
||||||
package installed into your development machine.
|
package installed into your development machine.
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ Other features which are (still) not on the road map are listed in the
|
|||||||
`Feature request <https://forum.lvgl.io/c/feature-request/9>`__ category
|
`Feature request <https://forum.lvgl.io/c/feature-request/9>`__ category
|
||||||
of the Forum.
|
of the Forum.
|
||||||
|
|
||||||
When adding a new features the followings also needs to be updated:
|
When adding a new features the following also needs to be updated:
|
||||||
|
|
||||||
- Update `lv_conf_template.h <https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h>`__
|
- Update `lv_conf_template.h <https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h>`__
|
||||||
- Add description in the `docs <https://github.com/lvgl/lvgl/tree/master/docs>`__
|
- Add description in the `docs <https://github.com/lvgl/lvgl/tree/master/docs>`__
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
- [x] New driver architecture #2720
|
- [x] New driver architecture #2720
|
||||||
- [x] `draw_ctx->buffer_convert`? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1147954592). Also remove 16 SWAPPED color format? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1140886258).
|
- [x] `draw_ctx->buffer_convert`? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1147954592). Also remove 16 SWAPPED color format? See [here](https://github.com/lvgl/lvgl/issues/3379#issuecomment-1140886258).
|
||||||
- [ ] `lv_img_set_src()` use "type-aware" parameter and rework image decoders. See [here](https://github.com/lvgl/lvgl/tree/arch/img-decode-rework)
|
- [ ] `lv_img_set_src()` use "type-aware" parameter and rework image decoders. See [here](https://github.com/lvgl/lvgl/tree/arch/img-decode-rework)
|
||||||
- [ ] Reconsider masks. There should be a generic high level mask API whic is independent of the drawing engine. [#4059](https://github.com/lvgl/lvgl/issues/4059)
|
- [ ] Reconsider masks. There should be a generic high level mask API which is independent of the drawing engine. [#4059](https://github.com/lvgl/lvgl/issues/4059)
|
||||||
- [x] `get_glyph_bitmap` should return an a8 bitmap that can be blended immediately.
|
- [x] `get_glyph_bitmap` should return an a8 bitmap that can be blended immediately.
|
||||||
- [ ] Reconsider how themes should work. See [here](https://github.com/lvgl/lvgl/pull/3390#pullrequestreview-990710921).
|
- [ ] Reconsider how themes should work. See [here](https://github.com/lvgl/lvgl/pull/3390#pullrequestreview-990710921).
|
||||||
- [ ] Make LVGL render independent areas in parallel. [#4016](https://github.com/lvgl/lvgl/issues/4016)
|
- [ ] Make LVGL render independent areas in parallel. [#4016](https://github.com/lvgl/lvgl/issues/4016)
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
- [ ] Disabled widgets should absorb indev actions without sending events. [#3860](https://github.com/lvgl/lvgl/issues/3860)
|
- [ ] Disabled widgets should absorb indev actions without sending events. [#3860](https://github.com/lvgl/lvgl/issues/3860)
|
||||||
|
|
||||||
### Drawing and rendering
|
### Drawing and rendering
|
||||||
- [ ] Automatically recalculate the layout if a coordinte is get with `lv_obj_get_width/height/x/y/etc`
|
- [ ] Automatically recalculate the layout if a coordinate is get with `lv_obj_get_width/height/x/y/etc`
|
||||||
|
|
||||||
### Animations
|
### Animations
|
||||||
- [ ] Use `anim` events to replace many callbacks with one
|
- [ ] Use `anim` events to replace many callbacks with one
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
## Planned in general
|
## Planned in general
|
||||||
|
|
||||||
### CI
|
### CI
|
||||||
- [ ] Plaform independent bechmarking #3443
|
- [ ] Platform independent benchmarking #3443
|
||||||
- [ ] Run static analyzer
|
- [ ] Run static analyzer
|
||||||
- [ ] Release script
|
- [ ] Release script
|
||||||
- [ ] Unit test for all widgets #2337
|
- [ ] Unit test for all widgets #2337
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
- [ ] Named grid cells to allow updating layouts without touching the children (like CSS `grid-template-areas`)
|
- [ ] Named grid cells to allow updating layouts without touching the children (like CSS `grid-template-areas`)
|
||||||
- [ ] Scene support. See [this comment](https://github.com/lvgl/lvgl/issues/2790#issuecomment-965100911)
|
- [ ] Scene support. See [this comment](https://github.com/lvgl/lvgl/issues/2790#issuecomment-965100911)
|
||||||
- [ ] Circle layout. #2871
|
- [ ] Circle layout. #2871
|
||||||
- [ ] Variable binding. I.e create properties which can be bound to objects and those obejcts are notified on value change. Maybe based on `lv_msg`?
|
- [ ] Variable binding. I.e create properties which can be bound to objects and those objects are notified on value change. Maybe based on `lv_msg`?
|
||||||
- [ ] Consider [stagger animations](https://greensock.com/docs/v3/Staggers).
|
- [ ] Consider [stagger animations](https://greensock.com/docs/v3/Staggers).
|
||||||
|
|
||||||
## Ideas
|
## Ideas
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ providing a familiar React-like experience to users.
|
|||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
**Code Runing on Real Device**
|
**Code Running on Real Device**
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
-----------------
|
-----------------
|
||||||
@@ -29,7 +29,7 @@ Features
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
- Support all lvgl built-in components
|
- Support all lvgl built-in components
|
||||||
- Fully suport lvgl flex and grid style
|
- Fully support lvgl flex and grid style
|
||||||
- support most lvgl style,just write like html5 css
|
- support most lvgl style,just write like html5 css
|
||||||
- support dynamic load image
|
- support dynamic load image
|
||||||
- Fully support lvgl animation
|
- Fully support lvgl animation
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ follow some coding conventions:
|
|||||||
- Argument must be named in H files too.
|
- Argument must be named in H files too.
|
||||||
- Do not ``malloc`` into a static or global variables. Instead declare the variable in :c:macro:`LV_ITERATE_ROOTS`
|
- Do not ``malloc`` into a static or global variables. Instead declare the variable in :c:macro:`LV_ITERATE_ROOTS`
|
||||||
list in ``lv_gc.h`` and mark the variable with :cpp:expr:`GC_ROOT(variable)` when it's used. **See** :ref:`memory_management`
|
list in ``lv_gc.h`` and mark the variable with :cpp:expr:`GC_ROOT(variable)` when it's used. **See** :ref:`memory_management`
|
||||||
- To register and use callbacks one of the followings needs to be followed. **See** :ref:`callbacks`
|
- To register and use callbacks one of the following needs to be followed. **See** :ref:`callbacks`
|
||||||
|
|
||||||
- Pass a pointer to a ``struct`` as the first argument of both the registration function and the callback. That
|
- Pass a pointer to a ``struct`` as the first argument of both the registration function and the callback. That
|
||||||
``struct`` must contain ``void * user_data`` field.
|
``struct`` must contain ``void * user_data`` field.
|
||||||
@@ -262,7 +262,7 @@ next to the function pointer when registering a callback, and access that object
|
|||||||
- The basic idea is that we have ``void * user_data`` field that is used automatically by the Micropython Binding
|
- 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
|
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.
|
pointer, and provided to the callback function itself.
|
||||||
- Although called "user_data", the user is not expectd to read/write that field. Instead, the Micropython glue code uses
|
- 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
|
``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.
|
is registered, and uses it when the callback is called in order to invoke a call to the original callable object.
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ There are a few options for defining a callback in LVGL C API:
|
|||||||
|
|
||||||
- A parameter called ``void * user_data`` is provided to the registration function as the **last** argument
|
- A parameter called ``void * user_data`` is provided to the registration function as the **last** argument
|
||||||
|
|
||||||
- The callback itself recieves ``void *`` as the **last** argument
|
- The callback itself receives ``void *`` as the **last** argument
|
||||||
|
|
||||||
- Option 3: both callback and ``user_data`` are struct fields
|
- Option 3: both callback and ``user_data`` are struct fields
|
||||||
|
|
||||||
@@ -296,12 +296,12 @@ Examples
|
|||||||
|
|
||||||
- :cpp:type:`lv_anim_t` contains ``user_data`` field. :cpp:func:`lv_anim_set_path_cb`
|
- :cpp:type:`lv_anim_t` contains ``user_data`` field. :cpp:func:`lv_anim_set_path_cb`
|
||||||
registers `path_cb` callback. Both ``lv_anim_set_path_cb`` and :cpp:type:`lv_anim_path_cb_t`
|
registers `path_cb` callback. Both ``lv_anim_set_path_cb`` and :cpp:type:`lv_anim_path_cb_t`
|
||||||
recieve :cpp:type:`lv_anim_t` as their first argument
|
receive :cpp:type:`lv_anim_t` as their first argument
|
||||||
- ``path_cb`` field can also be assigned directly in the Python code because it's a member
|
- ``path_cb`` field can also be assigned directly in the Python code because it's a member
|
||||||
of :cpp:type:`lv_anim_t` which contains ``user_data`` field, and :cpp:type:`lv_anim_path_cb_t`
|
of :cpp:type:`lv_anim_t` which contains ``user_data`` field, and :cpp:type:`lv_anim_path_cb_t`
|
||||||
recieve :cpp:type:`lv_anim_t` as its first argument.
|
receive :cpp:type:`lv_anim_t` as its first argument.
|
||||||
- :cpp:func:`lv_imgfont_create` registers ``path_cb`` and recieves ``user_data`` as the last
|
- :cpp:func:`lv_imgfont_create` registers ``path_cb`` and receives ``user_data`` as the last
|
||||||
argument. The callback :cpp:func:`lv_imgfont_get_path_cb_t` also receieves the ``user_data`` as the last argument.
|
argument. The callback :cpp:func:`lv_imgfont_get_path_cb_t` also receives the ``user_data`` as the last argument.
|
||||||
|
|
||||||
.. _more-information-1:
|
.. _more-information-1:
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ automatically scan main.py and bind the ``pika_lvgl`` module
|
|||||||
PikaStdLib==v1.10.0
|
PikaStdLib==v1.10.0
|
||||||
PikaStdDevice==v1.10.0
|
PikaStdDevice==v1.10.0
|
||||||
(pikascript) pika compiler:
|
(pikascript) pika compiler:
|
||||||
scaning main.py...
|
scanning main.py...
|
||||||
binding pika_lvgl.pyi...
|
binding pika_lvgl.pyi...
|
||||||
|
|
||||||
The precompiler is written in Rust, runs on windows and linux, and is
|
The precompiler is written in Rust, runs on windows and linux, and is
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Besides :c:macro:`LV_CONF_PATH` there are few additional CMake options available
|
|||||||
Include paths options
|
Include paths options
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
- :c:macro:`LV_LVGL_H_INCLUDE_SIMPLE`: which specifies whether to ``#include "lvgl.h"`` absolut or relative
|
- :c:macro:`LV_LVGL_H_INCLUDE_SIMPLE`: which specifies whether to ``#include "lvgl.h"`` absolute or relative
|
||||||
|
|
||||||
============ ==============
|
============ ==============
|
||||||
ON (default) OFF
|
ON (default) OFF
|
||||||
@@ -78,7 +78,7 @@ Include paths options
|
|||||||
"lvgl.h" "../../lvgl.h"
|
"lvgl.h" "../../lvgl.h"
|
||||||
============ ==============
|
============ ==============
|
||||||
|
|
||||||
- :c:macro:`LV_CONF_INCLUDE_SIMPLE`: which specifies whether to ``#include "lv_conf.h"`` and ``"lv_drv_conf.h"`` absolut or relative
|
- :c:macro:`LV_CONF_INCLUDE_SIMPLE`: which specifies whether to ``#include "lv_conf.h"`` and ``"lv_drv_conf.h"`` absolute or relative
|
||||||
|
|
||||||
=============== =====================
|
=============== =====================
|
||||||
ON (default) OFF
|
ON (default) OFF
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ lottie size is as intended - Limit total number of frames, the longer
|
|||||||
the lottie animation is, the more memory it will consume for rendering
|
the lottie animation is, the more memory it will consume for rendering
|
||||||
(rlottie consumes IRAM for rendering) - Build the lottie animation for
|
(rlottie consumes IRAM for rendering) - Build the lottie animation for
|
||||||
the intended frame rate - default lottie is 60fps, embedded LCDs likely
|
the intended frame rate - default lottie is 60fps, embedded LCDs likely
|
||||||
wont go above 30fps
|
won't go above 30fps
|
||||||
|
|
||||||
IDF Setup
|
IDF Setup
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
@@ -194,7 +194,7 @@ Rlottie patch file
|
|||||||
Rlottie relies on a dynamic linking for an image loader lib. This needs
|
Rlottie relies on a dynamic linking for an image loader lib. This needs
|
||||||
to be disabled as the IDF doesn't play nice with dynamic linking.
|
to be disabled as the IDF doesn't play nice with dynamic linking.
|
||||||
|
|
||||||
A patch file is available in lvgl uner:
|
A patch file is available in lvgl under:
|
||||||
``/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch``
|
``/env_support/esp/rlottie/0001-changes-to-compile-with-esp-idf.patch``
|
||||||
|
|
||||||
Apply the patch file to your rlottie submodule.
|
Apply the patch file to your rlottie submodule.
|
||||||
@@ -223,7 +223,7 @@ guarantee that every animation will work.
|
|||||||
Additional Rlottie considerations in ESP-IDF
|
Additional Rlottie considerations in ESP-IDF
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
While unecessary, removing the ``rlottie/rlottie/example`` folder can remove
|
While unnecessary, removing the ``rlottie/rlottie/example`` folder can remove
|
||||||
many un-needed files for this embedded LVGL application
|
many un-needed files for this embedded LVGL application
|
||||||
|
|
||||||
From here, you can use the relevant LVGL lv_rlottie functions to create
|
From here, you can use the relevant LVGL lv_rlottie functions to create
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Overview
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
- Supports both normal JPG and the custom SJPG formats.
|
- Supports both normal JPG and the custom SJPG formats.
|
||||||
- Decoding normal JPG consumes RAM with the size fo the whole
|
- Decoding normal JPG consumes RAM with the size of the whole
|
||||||
uncompressed image (recommended only for devices with more RAM)
|
uncompressed image (recommended only for devices with more RAM)
|
||||||
- SJPG is a custom format based on "normal" JPG and specially made for
|
- SJPG is a custom format based on "normal" JPG and specially made for
|
||||||
LVGL.
|
LVGL.
|
||||||
@@ -24,7 +24,7 @@ Overview
|
|||||||
- By default the sjpg image cache will be image width \* 2 \* 16 bytes
|
- By default the sjpg image cache will be image width \* 2 \* 16 bytes
|
||||||
(can be modified)
|
(can be modified)
|
||||||
- Currently only 16 bit image format is supported (TODO)
|
- Currently only 16 bit image format is supported (TODO)
|
||||||
- Only the required partion of the JPG and SJPG images are decoded,
|
- Only the required portion of the JPG and SJPG images are decoded,
|
||||||
therefore they can't be zoomed or rotated.
|
therefore they can't be zoomed or rotated.
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ The callback should look like this:
|
|||||||
...do something...
|
...do something...
|
||||||
}
|
}
|
||||||
|
|
||||||
From :c:struct:`lv_msg_t` the followings can be used to get some data:
|
From :c:struct:`lv_msg_t` the following can be used to get some data:
|
||||||
|
|
||||||
- :c:expr:`lv_msg_get_id(m)`
|
- :c:expr:`lv_msg_get_id(m)`
|
||||||
- :c:expr:`lv_msg_get_payload(m)`
|
- :c:expr:`lv_msg_get_payload(m)`
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ to combine scroll event and store the scroll top position.
|
|||||||
lv_obj_t* container = lv_obj_create(NULL);
|
lv_obj_t* container = lv_obj_create(NULL);
|
||||||
lv_obj_add_event(container, store_scroll_value_event_cb, LV_EVENT_SCROLL, NULL);
|
lv_obj_add_event(container, store_scroll_value_event_cb, LV_EVENT_SCROLL, NULL);
|
||||||
|
|
||||||
Scrool coordinates can be retrieve from differents axes with these
|
Scroll coordinates can be retrieved from different axes with these
|
||||||
functions:
|
functions:
|
||||||
|
|
||||||
- ``lv_obj_get_scroll_x(obj)`` Get the ``x`` coordinate of object
|
- ``lv_obj_get_scroll_x(obj)`` Get the ``x`` coordinate of object
|
||||||
@@ -262,7 +262,7 @@ an object. Here is an example to see how to handle the event:
|
|||||||
if(event_code == LV_EVENT_GET_SELF_SIZE) {
|
if(event_code == LV_EVENT_GET_SELF_SIZE) {
|
||||||
lv_point_t * p = lv_event_get_param(e);
|
lv_point_t * p = lv_event_get_param(e);
|
||||||
|
|
||||||
//If x or y < 0 then it doesn't neesd to be calculated now
|
//If x or y < 0 then it doesn't need to be calculated now
|
||||||
if(p->x >= 0) {
|
if(p->x >= 0) {
|
||||||
p->x = 200; //Set or calculate the self width
|
p->x = 200; //Set or calculate the self width
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2347,7 +2347,7 @@ Ext. draw No
|
|||||||
border_width
|
border_width
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
Set hte width of the border. Only pixel values can be used.
|
Set the width of the border. Only pixel values can be used.
|
||||||
|
|
||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
|
||||||
@@ -3456,7 +3456,7 @@ Ext. draw No
|
|||||||
line_color
|
line_color
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
Set the color fo the lines.
|
Set the color of the lines.
|
||||||
|
|
||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ Draw buffers
|
|||||||
The draw buffers can be set with
|
The draw buffers can be set with
|
||||||
:cpp:expr:`lv_disp_set_draw_buffers(disp, buf1, buf2, buf_size_px, render_mode)`
|
:cpp:expr:`lv_disp_set_draw_buffers(disp, buf1, buf2, buf_size_px, render_mode)`
|
||||||
|
|
||||||
- ``buf1`` a bufer where LVGL can render
|
- ``buf1`` a buffer where LVGL can render
|
||||||
- ``buf2`` a second optional buffer (see more details below)
|
- ``buf2`` a second optional buffer (see more details below)
|
||||||
- ``buf_size_byte`` size of the buffer(s) in bytes
|
- ``buf_size_byte`` size of the buffer(s) in bytes
|
||||||
- ``render_mode``
|
- ``render_mode``
|
||||||
|
|
||||||
- :cpp:enumerator:`LV_DISP_RENDER_MODE_PARTIAL` Use the buffer(s) to render the
|
- :cpp:enumerator:`LV_DISP_RENDER_MODE_PARTIAL` Use the buffer(s) to render the
|
||||||
screen is smaller parts. This way the buffers can be smaller then
|
screen is smaller parts. This way the buffers can be smaller then
|
||||||
the display to save RAM. At least 1/10 sceen size buffer(s) are
|
the display to save RAM. At least 1/10 screen size buffer(s) are
|
||||||
recommended. In ``flush_cb`` the rendered images needs to be
|
recommended. In ``flush_cb`` the rendered images needs to be
|
||||||
copied to the given area of the display.
|
copied to the given area of the display.
|
||||||
- :cpp:enumerator:`LV_DISP_RENDER_MODE_DIRECT` The buffer(s) has to be screen
|
- :cpp:enumerator:`LV_DISP_RENDER_MODE_DIRECT` The buffer(s) has to be screen
|
||||||
@@ -115,7 +115,7 @@ To set the resolution of the display after creation use
|
|||||||
It's not mandatory to use the whole display for LVGL, however in some
|
It's not mandatory to use the whole display for LVGL, however in some
|
||||||
cases the physical resolution is important. For example the touchpad
|
cases the physical resolution is important. For example the touchpad
|
||||||
still sees the whole resolution and the values needs to be converted to
|
still sees the whole resolution and the values needs to be converted to
|
||||||
the active LVGL display area. So the physical resoltution and the offset
|
the active LVGL display area. So the physical resolution and the offset
|
||||||
of the active area can be set with
|
of the active area can be set with
|
||||||
:cpp:expr:`lv_disp_set_physical_res(disp, hor_res, ver_res)` and
|
:cpp:expr:`lv_disp_set_physical_res(disp, hor_res, ver_res)` and
|
||||||
:cpp:expr:`lv_disp_set_offset(disp, x, y)`
|
:cpp:expr:`lv_disp_set_offset(disp, x, y)`
|
||||||
@@ -129,7 +129,7 @@ select whether you'd like software rotation or hardware rotation.
|
|||||||
The orientation of the display can be changed with
|
The orientation of the display can be changed with
|
||||||
``lv_disp_set_rotation(disp, LV_DISP_ROTATION_0/90/180/270, true/false)``.
|
``lv_disp_set_rotation(disp, LV_DISP_ROTATION_0/90/180/270, true/false)``.
|
||||||
LVGL will swap the horizontal and vertical resolutions internally
|
LVGL will swap the horizontal and vertical resolutions internally
|
||||||
according to the set degree. IF the last paramter is ``true`` LVGL will
|
according to the set degree. If the last parameter is ``true`` LVGL will
|
||||||
rotate the rendered image. If it's ``false`` the display driver should
|
rotate the rendered image. If it's ``false`` the display driver should
|
||||||
rotate the rendered image.
|
rotate the rendered image.
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ Color format
|
|||||||
|
|
||||||
Set the color format of the display. The default is
|
Set the color format of the display. The default is
|
||||||
:cpp:enumerator:`LV_COLOR_FORMAT_NATIVE` which means LVGL render with the follow
|
:cpp:enumerator:`LV_COLOR_FORMAT_NATIVE` which means LVGL render with the follow
|
||||||
formats dpeneding on :c:macro:`LV_COLOR_DEPTH`:
|
formats depending on :c:macro:`LV_COLOR_DEPTH`:
|
||||||
|
|
||||||
- :c:macro:`LV_COLOR_DEPTH` ``32``: XRGB8888 (4 bytes/pixel)
|
- :c:macro:`LV_COLOR_DEPTH` ``32``: XRGB8888 (4 bytes/pixel)
|
||||||
- :c:macro:`LV_COLOR_DEPTH` ``24``: RGB888 (3 bytes/pixel)
|
- :c:macro:`LV_COLOR_DEPTH` ``24``: RGB888 (3 bytes/pixel)
|
||||||
@@ -152,7 +152,7 @@ values:
|
|||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_NATIVE_ALPHA`: Append an alpha byte to the native format resulting
|
- :cpp:enumerator:`LV_COLOR_FORMAT_NATIVE_ALPHA`: Append an alpha byte to the native format resulting
|
||||||
in A8L8, ARGB8565, ARGB8888 formats.
|
in A8L8, ARGB8565, ARGB8888 formats.
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_NATIVE_REVERSE`: Reverse the byte order of the native format. Useful if the
|
- :cpp:enumerator:`LV_COLOR_FORMAT_NATIVE_REVERSE`: Reverse the byte order of the native format. Useful if the
|
||||||
rendered image is sent to the disply via SPI and
|
rendered image is sent to the display via SPI and
|
||||||
the display needs the bytes in the opposite order.
|
the display needs the bytes in the opposite order.
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_L8`: Lightness only on 8 bit
|
- :cpp:enumerator:`LV_COLOR_FORMAT_L8`: Lightness only on 8 bit
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_A8`: Alpha only on 8 bit
|
- :cpp:enumerator:`LV_COLOR_FORMAT_A8`: Alpha only on 8 bit
|
||||||
@@ -165,20 +165,20 @@ values:
|
|||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_ARGB4444`: 4 bit for each channel
|
- :cpp:enumerator:`LV_COLOR_FORMAT_ARGB4444`: 4 bit for each channel
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_RGB888`: 8 bit for each color channel with out alpha channel
|
- :cpp:enumerator:`LV_COLOR_FORMAT_RGB888`: 8 bit for each color channel with out alpha channel
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_ARGB8888`: 8 bit for each channel
|
- :cpp:enumerator:`LV_COLOR_FORMAT_ARGB8888`: 8 bit for each channel
|
||||||
- :cpp:enumerator:`LV_COLOR_FORMAT_XRGB8888`: 8 bit for each color channel and 8 bit placholder for the alpha cannel
|
- :cpp:enumerator:`LV_COLOR_FORMAT_XRGB8888`: 8 bit for each color channel and 8 bit placeholder for the alpha channel
|
||||||
|
|
||||||
If the color fotmat is set to non-native ``draw_ctx->buffer_convert``
|
If the color format is set to non-native ``draw_ctx->buffer_convert``
|
||||||
function will be called before calling ``flush_cb`` to convert the
|
function will be called before calling ``flush_cb`` to convert the
|
||||||
native color format to the desired, therfore rendering in non-native
|
native color format to the desired, therefore rendering in non-native
|
||||||
formats has a negative effect on peroformance. Learn more about
|
formats has a negative effect on performance. Learn more about
|
||||||
``draw_ctx`` `here </porting/gpu>`__.
|
``draw_ctx`` `here </porting/gpu>`__.
|
||||||
|
|
||||||
It's very important that draw buffer(s) should be large enough for both
|
It's very important that draw buffer(s) should be large enough for both
|
||||||
the native format and the target color format. For example if
|
the native format and the target color format. For example if
|
||||||
``LV_COLOR_DEPTH == 16`` and :cpp:enumerator:`LV_COLOR_FORMAT_XRGB8888` is selected
|
``LV_COLOR_DEPTH == 16`` and :cpp:enumerator:`LV_COLOR_FORMAT_XRGB8888` is selected
|
||||||
LVGL will choosoe the larger to figure out how many pixel can be
|
LVGL will choose the larger to figure out how many pixel can be
|
||||||
rendered at once. Therefore with :cpp:enumerator:`LV_DISP_RENDER_MODE_FULL` and the
|
rendered at once. Therefore with :cpp:enumerator:`LV_DISP_RENDER_MODE_FULL` and the
|
||||||
larger pixel size needs to choosen.
|
larger pixel size needs to be chosen.
|
||||||
|
|
||||||
:cpp:enumerator:`LV_DISP_RENDER_MODE_DIRECT` supports only the
|
:cpp:enumerator:`LV_DISP_RENDER_MODE_DIRECT` supports only the
|
||||||
:cpp:enumerator:`LV_COLOR_FORMAT_NATIVE` format.
|
:cpp:enumerator:`LV_COLOR_FORMAT_NATIVE` format.
|
||||||
@@ -203,9 +203,9 @@ an event handler to a display. The following events are sent:
|
|||||||
|
|
||||||
- :cpp:enumerator:`LV_DISP_EVENT_INVALIDATE_AREA` An area is invalidated (marked for redraw).
|
- :cpp:enumerator:`LV_DISP_EVENT_INVALIDATE_AREA` An area is invalidated (marked for redraw).
|
||||||
:cpp:expr:`lv_event_get_param(e)` returns a pointer to an :cpp:struct:`lv_area_t`
|
:cpp:expr:`lv_event_get_param(e)` returns a pointer to an :cpp:struct:`lv_area_t`
|
||||||
varaible with the coordinates of the area to be invalidated. The ara can
|
variable with the coordinates of the area to be invalidated. The area can
|
||||||
be freely modified is needed to adopt it the special requirement of the
|
be freely modified is needed to adopt it the special requirement of the
|
||||||
display. Usually needed with monoschrome displays to invalidate Nx8
|
display. Usually needed with monochrome displays to invalidate Nx8
|
||||||
lines at once.
|
lines at once.
|
||||||
- :cpp:enumerator:`LV_DISP_EVENT_RENDER_START`: Called when rendering starts.
|
- :cpp:enumerator:`LV_DISP_EVENT_RENDER_START`: Called when rendering starts.
|
||||||
- :cpp:enumerator:`LV_DISP_EVENT_RENDER_READY`: Called when rendering is ready
|
- :cpp:enumerator:`LV_DISP_EVENT_RENDER_READY`: Called when rendering is ready
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ Events
|
|||||||
|
|
||||||
- ``part``: :cpp:enumerator:`LV_PART_ITEMS`
|
- ``part``: :cpp:enumerator:`LV_PART_ITEMS`
|
||||||
- ``id``:index of the button being drawn
|
- ``id``:index of the button being drawn
|
||||||
- ``draw_area``: the area of teh button
|
- ``draw_area``: the area of the button
|
||||||
- ``rect_dsc``
|
- ``rect_dsc``
|
||||||
|
|
||||||
See the events of the `Base object </widgets/obj>`__ too.
|
See the events of the `Base object </widgets/obj>`__ too.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ color format of the buffer and the canvas need to match.
|
|||||||
|
|
||||||
To draw something to the canvas use:
|
To draw something to the canvas use:
|
||||||
|
|
||||||
- :cpp:expr:`lv_canvas_draw_rect(canvas, x, y, width, heigth, &draw_dsc)`
|
- :cpp:expr:`lv_canvas_draw_rect(canvas, x, y, width, height, &draw_dsc)`
|
||||||
- :cpp:expr:`lv_canvas_draw_text(canvas, x, y, max_width, &draw_dsc, txt)`
|
- :cpp:expr:`lv_canvas_draw_text(canvas, x, y, max_width, &draw_dsc, txt)`
|
||||||
- :cpp:expr:`lv_canvas_draw_img(canvas, x, y, &img_src, &draw_dsc)`
|
- :cpp:expr:`lv_canvas_draw_img(canvas, x, y, &img_src, &draw_dsc)`
|
||||||
- :cpp:expr:`lv_canvas_draw_line(canvas, point_array, point_cnt, &draw_dsc)`
|
- :cpp:expr:`lv_canvas_draw_line(canvas, point_array, point_cnt, &draw_dsc)`
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ an array for the data points. ``axis`` can have the following values:
|
|||||||
- :cpp:enumerator:`LV_CHART_AXIS_PRIMARY_X` Bottom axis
|
- :cpp:enumerator:`LV_CHART_AXIS_PRIMARY_X` Bottom axis
|
||||||
- :cpp:enumerator:`LV_CHART_AXIS_SECONDARY_X` Top axis
|
- :cpp:enumerator:`LV_CHART_AXIS_SECONDARY_X` Top axis
|
||||||
|
|
||||||
``axis`` tells which axis's range should be used te scale the values.
|
``axis`` tells which axis's range should be used to scale the values.
|
||||||
|
|
||||||
:cpp:expr:`lv_chart_set_ext_y_array(chart, ser, value_array)` makes the chart
|
:cpp:expr:`lv_chart_set_ext_y_array(chart, ser, value_array)` makes the chart
|
||||||
use an external array for the given series. ``value_array`` should look
|
use an external array for the given series. ``value_array`` should look
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ creating new maps a ctrls.
|
|||||||
Keep in mind that using following keywords will have the same effect as
|
Keep in mind that using following keywords will have the same effect as
|
||||||
with the original map:
|
with the original map:
|
||||||
|
|
||||||
- :c:macro:`LV_SYMBOL_OK` Send ``LV_EVENT_RADY`` to the assigend Text area.
|
- :c:macro:`LV_SYMBOL_OK` Send ``LV_EVENT_RADY`` to the assigned Text area.
|
||||||
- :c:macro:`LV_SYMBOL_CLOSE` or :c:macro:`LV_SYMBOL_KEYBOARD` Send :cpp:enumerator:`LV_EVENT_CANCEL` to the assigend Text area.
|
- :c:macro:`LV_SYMBOL_CLOSE` or :c:macro:`LV_SYMBOL_KEYBOARD` Send :cpp:enumerator:`LV_EVENT_CANCEL` to the assigned Text area.
|
||||||
- :c:macro:`LV_SYMBOL_BACKSPACE` Delete on the left.
|
- :c:macro:`LV_SYMBOL_BACKSPACE` Delete on the left.
|
||||||
- :c:macro:`LV_SYMBOL_LEFT` Move the cursor left.
|
- :c:macro:`LV_SYMBOL_LEFT` Move the cursor left.
|
||||||
- :c:macro:`LV_SYMBOL_RIGHT` Move the cursor right.
|
- :c:macro:`LV_SYMBOL_RIGHT` Move the cursor right.
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ To get a specific child of a parent use :cpp:expr:`lv_obj_get_child(parent, idx)
|
|||||||
- ``1`` get the child created second
|
- ``1`` get the child created second
|
||||||
- ``-1`` get the child created last
|
- ``-1`` get the child created last
|
||||||
|
|
||||||
The children can be iterated lke this:
|
The children can be iterated like this:
|
||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user