refactor(style): rename lv_indev_get_act to lv_indev_active
This commit is contained in:
@@ -87,7 +87,7 @@ existing screen copied into the new screen.
|
||||
To load a screen, use :cpp:expr:`lv_screen_load(scr)`. To get the active screen,
|
||||
use :cpp:expr:`lv_screen_active()`. These functions work on the default display. If
|
||||
you want to specify which display to work on, use
|
||||
:cpp:expr:`lv_disp_get_screen_act(disp)` and :cpp:expr:`lv_disp_load_scr(disp, scr)`. A
|
||||
:cpp:expr:`lv_disp_get_screen_active(disp)` and :cpp:expr:`lv_disp_load_scr(disp, scr)`. A
|
||||
screen can be loaded with animations too. Read more
|
||||
`here <object.html#load-screens>`__.
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ Input device events
|
||||
- :cpp:enumerator:`LV_EVENT_SCROLL_THROW_BEGIN`: Sent once when the object is released while scrolling but the "momentum" still keeps the content scrolling.
|
||||
- :cpp:enumerator:`LV_EVENT_SCROLL_END`: Scrolling ends.
|
||||
- :cpp:enumerator:`LV_EVENT_SCROLL`: An object was scrolled
|
||||
- :cpp:enumerator:`LV_EVENT_GESTURE`: A gesture is detected. Get the gesture with :cpp:expr:`lv_indev_get_gesture_dir(lv_indev_get_act())`
|
||||
- :cpp:enumerator:`LV_EVENT_KEY`: A key is sent to an object. Get the key with :cpp:expr:`lv_indev_get_key(lv_indev_get_act())`
|
||||
- :cpp:enumerator:`LV_EVENT_GESTURE`: A gesture is detected. Get the gesture with :cpp:expr:`lv_indev_get_gesture_dir(lv_indev_active())`
|
||||
- :cpp:enumerator:`LV_EVENT_KEY`: A key is sent to an object. Get the key with :cpp:expr:`lv_indev_get_key(lv_indev_active())`
|
||||
- :cpp:enumerator:`LV_EVENT_FOCUSED`: An object is focused
|
||||
- :cpp:enumerator:`LV_EVENT_DEFOCUSED`: An object is unfocused
|
||||
- :cpp:enumerator:`LV_EVENT_LEAVE`: An object is unfocused but still selected
|
||||
|
||||
@@ -46,7 +46,7 @@ event. For example:
|
||||
void my_event(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t * screen = lv_event_get_current_target(e);
|
||||
lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_act());
|
||||
lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_active());
|
||||
switch(dir) {
|
||||
case LV_DIR_LEFT:
|
||||
...
|
||||
@@ -73,7 +73,7 @@ To prevent passing the gesture event to the parent from an object use
|
||||
Note that, gestures are not triggered if an object is being scrolled.
|
||||
|
||||
If you did some action on a gesture you can call
|
||||
:cpp:expr:`lv_indev_wait_release(lv_indev_get_act())` in the event handler to
|
||||
:cpp:expr:`lv_indev_wait_release(lv_indev_active())` in the event handler to
|
||||
prevent LVGL sending further input device related events.
|
||||
|
||||
Keypad and encoder
|
||||
|
||||
@@ -56,7 +56,7 @@ To select a new tab you can:
|
||||
|
||||
- Click on its tab button
|
||||
- Slide horizontally
|
||||
- Use :cpp:expr:`lv_tabview_set_act(tabview, id, LV_ANIM_ON)` function
|
||||
- Use :cpp:expr:`lv_tabview_set_active(tabview, id, LV_ANIM_ON)` function
|
||||
|
||||
Get the parts
|
||||
-------------
|
||||
@@ -69,7 +69,7 @@ Events
|
||||
******
|
||||
|
||||
- :cpp:enumerator:`LV_EVENT_VALUE_CHANGED` Sent when a new tab is selected by sliding
|
||||
or clicking the tab button. :cpp:expr:`lv_tabview_get_tab_act(tabview)`
|
||||
or clicking the tab button. :cpp:expr:`lv_tabview_get_tab_active(tabview)`
|
||||
returns the zero based index of the current tab.
|
||||
|
||||
Learn more about :ref:`events`.
|
||||
|
||||
@@ -45,7 +45,7 @@ Events
|
||||
******
|
||||
|
||||
- :cpp:enumerator:`LV_EVENT_VALUE_CHANGED` Sent when a new tile loaded by scrolling.
|
||||
:cpp:expr:`lv_tileview_get_tile_act(tabview)` can be used to get current
|
||||
:cpp:expr:`lv_tileview_get_tile_active(tabview)` can be used to get current
|
||||
tile.
|
||||
|
||||
Keys
|
||||
|
||||
Reference in New Issue
Block a user