docs link fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-17 16:17:20 +02:00
parent 103311192c
commit f97f87fdcd
20 changed files with 64 additions and 38 deletions

View File

@@ -82,7 +82,7 @@ bool my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data)
- Call `lv_timer_handler()` periodically every few milliseconds in the main `while(1)` loop or in an Operation system task. - Call `lv_timer_handler()` periodically every few milliseconds in the main `while(1)` loop or in an Operation system task.
It will redraw the screen if required, handle input devices, animation etc. It will redraw the screen if required, handle input devices, animation etc.
For a more detailed guide go to the [Porting](/porting/index.html) section. For a more detailed guide go to the [Porting](/porting/index) section.
## Learn the basics ## Learn the basics

View File

@@ -58,8 +58,8 @@ It's not mandatory but we highly appreciate it if you write a few words about yo
Although you can get LVGL for free there is a huge work behind it. It's created by a group of volunteers who made it available for you in their free time. Although you can get LVGL for free there is a huge work behind it. It's created by a group of volunteers who made it available for you in their free time.
To make the LVGL project sustainable, please consider [Contributing](/contributing/index) to the project. To make the LVGL project sustainable, please consider [Contributing](/CONTRIBUTING) to the project.
You can choose from [many ways of contributions](/contributing/index) such as simply writing a tweet about you are using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer. You can choose from [many ways of contributions](/CONTRIBUTING) such as simply writing a tweet about you are using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer.
## Repository layout ## Repository layout
All repositories of the LVGL project are hosted n GitHub: https://github.com/lvgl All repositories of the LVGL project are hosted n GitHub: https://github.com/lvgl

View File

@@ -99,7 +99,7 @@ You can force Flex to put an item into a new line with `lv_obj_add_flag(child, L
```eval_rst ```eval_rst
.. include:: ../../../examples/layouts/flex/index.rst .. include:: ../../examples/layouts/flex/index.rst
``` ```

View File

@@ -96,7 +96,7 @@ The columns will be placed from right to left.
```eval_rst ```eval_rst
.. include:: ../../../examples/layouts/grid/index.rst .. include:: ../../examples/layouts/grid/index.rst
``` ```

View File

@@ -51,7 +51,7 @@ Be sure not to confuse displays and screens:
Screens can be considered the highest level containers which have no parent. Screens can be considered the highest level containers which have no parent.
The screen's size is always equal to its display and size their position is (0;0). Therefore, the screens coordinates can't be changed, i.e. `lv_obj_set_pos()`, `lv_obj_set_size()` or similar functions can't be used on screens. The screen's size is always equal to its display and size their position is (0;0). Therefore, the screens coordinates can't be changed, i.e. `lv_obj_set_pos()`, `lv_obj_set_size()` or similar functions can't be used on screens.
A screen can be created from any object type but, the two most typical types are the [Base object](/widgets/obj) and the [Image](/widgets/img) (to create a wallpaper). A screen can be created from any object type but, the two most typical types are the [Base object](/widgets/obj) and the [Image](/widgets/core/img) (to create a wallpaper).
To create a screen, use `lv_obj_t * scr = lv_<type>_create(NULL, copy)`. `copy` can be an other screen to copy it. To create a screen, use `lv_obj_t * scr = lv_<type>_create(NULL, copy)`. `copy` can be an other screen to copy it.

View File

@@ -146,7 +146,7 @@ lv_event_send(mbox, LV_EVENT_VALUE_CHANGED, &btn_id);
`lv_event_t` is the only parameter passed to event callback and it contains all the data about the event. The following values can be get from it: `lv_event_t` is the only parameter passed to event callback and it contains all the data about the event. The following values can be get from it:
- `lv_event_get_code(e)` get the event code - `lv_event_get_code(e)` get the event code
- `lv_event_get_target(e)` get the object to which the event is sent - `lv_event_get_target(e)` get the object to which the event is sent
- `lv_event_get_original_target(e)` get the object to which the event is sent originally sent (different from `lv_event_get_target` if [event bubbling](event-bubbling) is enabled) - `lv_event_get_original_target(e)` get the object to which the event is sent originally sent (different from `lv_event_get_target` if [event bubbling](#event-bubbling) is enabled)
- `lv_event_get_user_data(e)` get the pointer passed as the last parameter of `lv_obj_add_event_cb`. - `lv_event_get_user_data(e)` get the pointer passed as the last parameter of `lv_obj_add_event_cb`.
- `lv_event_get_param(e)` get the parameter passed as the last parameter of `lv_event_send` - `lv_event_get_param(e)` get the parameter passed as the last parameter of `lv_event_send`

View File

@@ -96,7 +96,7 @@ lv_fs_dir_close(&dir);
## Use drivers for images ## Use drivers for images
[Image](/widgets/img) objects can be opened from files too (besides variables stored in the flash). [Image](/widgets/core/img) objects can be opened from files too (besides variables stored in the flash).
To initialize the image, the following callbacks are required: To initialize the image, the following callbacks are required:
- open - open

View File

@@ -108,11 +108,11 @@ static lv_img_dsc_t my_img_dsc = {
If the color format is `LV_IMG_CF_TRUE_COLOR_ALPHA` you can set `data_size` like `80 * 60 * LV_IMG_PX_SIZE_ALPHA_BYTE`. If the color format is `LV_IMG_CF_TRUE_COLOR_ALPHA` you can set `data_size` like `80 * 60 * LV_IMG_PX_SIZE_ALPHA_BYTE`.
Another (possibly simpler) option to create and display an image at run-time is to use the [Canvas](/widgets/canvas) object. Another (possibly simpler) option to create and display an image at run-time is to use the [Canvas](/widgets/core/canvas) object.
### Use images ### Use images
The simplest way to use an image in LVGL is to display it with an [lv_img](/widgets/img) object: The simplest way to use an image in LVGL is to display it with an [lv_img](/widgets/core/img) object:
```c ```c
lv_obj_t * icon = lv_img_create(lv_scr_act(), NULL); lv_obj_t * icon = lv_img_create(lv_scr_act(), NULL);

View File

@@ -5,7 +5,7 @@
# Objects # Objects
In the LVGL the **basic building blocks** of a user interface are the objects, also called *Widgets*. In the LVGL the **basic building blocks** of a user interface are the objects, also called *Widgets*.
For example a [Button](/widgets/core/btn), [Label](/widgets/core/label), [Image](/widgets/core/img), [List](/widgets/core/list), [Chart](/widgets/extra/chart) or [Text area](/widgets/core/textarea). For example a [Button](/widgets/core/btn), [Label](/widgets/core/label), [Image](/widgets/core/img), [List](/widgets/extra/list), [Chart](/widgets/extra/chart) or [Text area](/widgets/core/textarea).
Check all the [Object types](/widgets/index) here. Check all the [Object types](/widgets/index) here.

View File

@@ -104,7 +104,7 @@ The following predefined parts exist in LVGL:
- `LV_PART_CUSTOM_FIRST` Custom parts can be added from here. - `LV_PART_CUSTOM_FIRST` Custom parts can be added from here.
For example a [Slider](/widgets/slider) has three parts: For example a [Slider](/widgets/core/slider) has three parts:
- Background - Background
- Indiactor - Indiactor
- Knob - Knob
@@ -327,19 +327,17 @@ void new_theme_apply_cb(lv_theme_t * th, lv_obj_t * obj)
## API ## API
```eval_rst ```eval_rst
.. doxygenfile:: lv_obj_style.h
:project: lvgl
.. doxygenfile:: lv_obj_style_dec.h
:project: lvgl
.. doxygenfile:: lv_style.h .. doxygenfile:: lv_style.h
:project: lvgl :project: lvgl
.. doxygenfile:: lv_style_dec.h
:project: lvgl
.. doxygenfile:: lv_theme.h .. doxygenfile:: lv_theme.h
:project: lvgl :project: lvgl
.. doxygenfile:: lv_obj_style_gen.h
:project: lvgl
.. doxygenfile:: lv_style_gen.h
:project: lvgl
``` ```

View File

@@ -5,7 +5,7 @@
# Timers # Timers
LVGL has a built-in timer system. You can register a function to have it be called periodically. The timers are handled and called in `lv_timer_handler()`, which needs to be called periodically every few milliseconds. LVGL has a built-in timer system. You can register a function to have it be called periodically. The timers are handled and called in `lv_timer_handler()`, which needs to be called periodically every few milliseconds.
See [Porting](/porting/timer-handler) for more information. See [Porting](/porting/task-handler) for more information.
The timers are non-preemptive, which means a timer cannot interrupt another timer. Therefore, you can call any LVGL related function in a timer. The timers are non-preemptive, which means a timer cannot interrupt another timer. Therefore, you can call any LVGL related function in a timer.

View File

@@ -8,14 +8,14 @@ LVGL is **not thread-safe** by default.
However, in the following conditions it's valid to call LVGL related functions: However, in the following conditions it's valid to call LVGL related functions:
- In *events*. Learn more in [Events](/overview/event). - In *events*. Learn more in [Events](/overview/event).
- In *lv_tasks*. Learn more in [Tasks](/overview/task). - In *lv_timer*. Learn more in [Timers](/overview/timter).
## Tasks and threads ## Tasks and threads
If you need to use real tasks or threads, you need a mutex which should be invoked before the call of `lv_task_handler` and released after it. If you need to use real tasks or threads, you need a mutex which should be invoked before the call of `lv_timer_handler` and released after it.
Also, you have to use the same mutex in other tasks and threads around every LVGL (`lv_...`) related function calls and codes. Also, you have to use the same mutex in other tasks and threads around every LVGL (`lv_...`) related function calls and codes.
This way you can use LVGL in a real multitasking environment. Just make use of a mutex to avoid the concurrent calling of LVGL functions. This way you can use LVGL in a real multitasking environment. Just make use of a mutex to avoid the concurrent calling of LVGL functions.
## Interrupts ## Interrupts
Try to avoid calling LVGL functions from the interrupts (except `lv_tick_inc()` and `lv_disp_flush_ready()`). But, if you need to do this you have to disable the interrupt which uses LVGL functions while `lv_task_handler` is running. Try to avoid calling LVGL functions from the interrupts (except `lv_tick_inc()` and `lv_disp_flush_ready()`). But, if you need to do this you have to disable the interrupt which uses LVGL functions while `lv_timer_handler` is running.
It's a better approach to set a flag or some value and periodically check it in an `lv_task`. It's a better approach to set a flag or some value and periodically check it in an `lv_timer`.

View File

@@ -4,7 +4,7 @@
``` ```
# Task Handler # Task Handler
To handle the tasks of LVGL you need to call `lv_task_handler()` periodically in one of the followings: To handle the tasks of LVGL you need to call `lv_timer_handler()` periodically in one of the followings:
- *while(1)* of *main()* function - *while(1)* of *main()* function
- timer interrupt periodically (low priority then `lv_tick_inc()`) - timer interrupt periodically (low priority then `lv_tick_inc()`)
- an OS task periodically - an OS task periodically
@@ -14,10 +14,10 @@ The timing is not critical but it should be about 5 milliseconds to keep the sys
Example: Example:
```c ```c
while(1) { while(1) {
lv_task_handler(); lv_timer_handler();
my_delay_ms(5); my_delay_ms(5);
} }
``` ```
To learn more about task visit the [Tasks](/overview/task) section. To learn more about timers visit the [Timer](/overview/timer) section.

View File

@@ -137,7 +137,7 @@ Learn more about [Keys](/overview/indev).
```eval_rst ```eval_rst
.. include:: ../../../examples/widgets/lv_example_chart/index.rst .. include:: ../../../examples/widgets/chart/index.rst
``` ```

View File

@@ -46,7 +46,7 @@ Learn more about [Keys](/overview/indev).
```eval_rst ```eval_rst
.. include:: ../../../examples/widgets/lv_example_colorwheel/index.rst .. include:: ../../../examples/widgets/colorwheel/index.rst
``` ```

View File

@@ -21,7 +21,7 @@ The Base object can be directly used as a simple widgets. It nothing else than a
### Coordinates ### Coordinates
Here only a small subset of cooridnate settings is described. To see all the features of LVGL (padding, cooridnates in styles, layouts, etc) visit the [Coordinates](overview/coord) page. Here only a small subset of cooridnate settings is described. To see all the features of LVGL (padding, cooridnates in styles, layouts, etc) visit the [Coordinates](/overview/coords) page.
#### Size #### Size
The object size can be modified on individual axes with `lv_obj_set_width(obj, new_width)` and `lv_obj_set_height(obj, new_height)`, or both axes can be modified at the same time with `lv_obj_set_size(obj, new_width, new_height)`. The object size can be modified on individual axes with `lv_obj_set_width(obj, new_width)` and `lv_obj_set_height(obj, new_height)`, or both axes can be modified at the same time with `lv_obj_set_size(obj, new_width, new_height)`.

View File

@@ -4,10 +4,38 @@ C
Line Chart Line Chart
"""""""""" """"""""""
.. lv_example:: lv_ex_widgets/lv_ex_chart/lv_ex_chart_1 .. lv_example:: widgets/chart/lv_example_chart_1
:language: c :language: c
.. lv_example:: lv_ex_widgets/lv_ex_chart/lv_ex_chart_2
Faded area line chart with custom division lines
"""""""""""""""""""""""""""""""""""""""""""""""""""
.. lv_example:: widgets/chart/lv_example_chart_2
:language: c
Axis ticks and labels with scrolling
""""""""""""""""""""""""""""""""""""
.. lv_example:: widgets/chart/lv_example_chart_3
:language: c
Show the value of the pressed points
""""""""""""""""""""""""""""""""""""""
.. lv_example:: widgets/chart/lv_example_chart_4
:language: c
Display 1000 data points with zooming and scrolling
"""""""""""""""""""""""""""""""""""""""""""""""""""
.. lv_example:: widgets/chart/lv_example_chart_5
:language: c
Show cursor on the clicked point
"""""""""""""""""""""""""""""""""""
.. lv_example:: widgets/chart/lv_example_chart_6
:language: c :language: c

View File

@@ -54,7 +54,7 @@ static void event_cb(lv_event_t * e)
} }
/** /**
* Add ticks and labels to the axis and demonstrate scrolling * Show the value of the pressed points
*/ */
void lv_example_chart_4(void) void lv_example_chart_4(void)
{ {

View File

@@ -14,7 +14,7 @@ Slider with custom style
:language: c :language: c
Slider with extended drawer Slider with extended drawer
""""""""""""""""""""""""" """"""""""""""""""""""""""""
.. lv_example:: widgets/slider/lv_example_slider_3 .. lv_example:: widgets/slider/lv_example_slider_3
:language: c :language: c

View File

@@ -8,7 +8,7 @@ Simple table
:language: c :language: c
Lightweighted list from table Lightweighted list from table
""""""""""""""""""""""" """"""""""""""""""""""""""""""
.. lv_example:: widgets/table/lv_example_table_2 .. lv_example:: widgets/table/lv_example_table_2
:language: c :language: c