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

@@ -72,7 +72,7 @@ bool my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data)
/*`touchpad_is_pressed` and `touchpad_get_xy` needs to be implemented by you*/
if(touchpad_is_pressed()) {
data->state = LV_INDEV_STATE_PRESSED;
touchpad_get_xy(&data->point.x, &data->point.y);
touchpad_get_xy(&data->point.x, &data->point.y);
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
@@ -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.
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

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.
To make the LVGL project sustainable, please consider [Contributing](/contributing/index) 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.
To make the LVGL project sustainable, please consider [Contributing](/CONTRIBUTING) to the project.
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
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
.. 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
.. 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.
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.

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_get_code(e)` get the event code
- `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_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
[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:
- 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`.
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
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
lv_obj_t * icon = lv_img_create(lv_scr_act(), NULL);

View File

@@ -5,7 +5,7 @@
# Objects
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.

View File

@@ -104,7 +104,7 @@ The following predefined parts exist in LVGL:
- `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
- Indiactor
- Knob
@@ -327,19 +327,17 @@ void new_theme_apply_cb(lv_theme_t * th, lv_obj_t * obj)
## API
```eval_rst
.. doxygenfile:: lv_obj_style.h
:project: lvgl
.. doxygenfile:: lv_obj_style_dec.h
:project: lvgl
.. doxygenfile:: lv_style.h
:project: lvgl
.. doxygenfile:: lv_style_dec.h
:project: lvgl
.. doxygenfile:: lv_theme.h
:project: lvgl
.. doxygenfile:: lv_obj_style_gen.h
:project: lvgl
.. doxygenfile:: lv_style_gen.h
:project: lvgl
```

View File

@@ -5,7 +5,7 @@
# 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.
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.

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:
- 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
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.
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
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.
It's a better approach to set a flag or some value and periodically check it in an `lv_task`.
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_timer`.

View File

@@ -4,7 +4,7 @@
```
# 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
- timer interrupt periodically (low priority then `lv_tick_inc()`)
- 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:
```c
while(1) {
lv_task_handler();
lv_timer_handler();
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
.. 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
.. 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
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
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)`.