fix(indev.rst): handle lv_obj_is_focused no longer exists. (#7711)

This commit is contained in:
Victor Wheeler
2025-02-06 05:26:49 -07:00
committed by GitHub
parent 970ca51361
commit f9a9d5b41b

View File

@@ -217,7 +217,7 @@ Handling touch events
Touch events are handled like any other event. First, setup a listener for the ``LV_EVENT_GESTURE`` event type by defining and setting the callback function. Touch events are handled like any other event. First, setup a listener for the ``LV_EVENT_GESTURE`` event type by defining and setting the callback function.
The state or scale of the pinch gesture can be retrieved by The state or scale of the pinch gesture can be retrieved by
calling the ``lv_event_get_pinch_scale`` and ``lv_indev_get_gesture_state`` from within the calling the ``lv_event_get_pinch_scale`` and ``lv_indev_get_gesture_state`` from within the
callback. callback.
An example of such an application is available in An example of such an application is available in
@@ -319,8 +319,9 @@ a Widget to the group use :cpp:expr:`lv_group_add_obj(g, widget)`.
Once a Widget has been added to a group, you can find out what group it is in Once a Widget has been added to a group, you can find out what group it is in
using :cpp:expr:`lv_obj_get_group(widget)`. using :cpp:expr:`lv_obj_get_group(widget)`.
To find out if a Widget in a group has focus, call :cpp:expr:`lv_obj_is_focused(widget)`. To find out what Widget in a group has focus, if any, call
If the Widget is not part of a group, this function will return ``false``. :cpp:expr:`lv_group_get_focused(group)`. If a Widget in that group has focus, it
will return a pointer to it, otherwise it will return NULL.
To associate a group with an input device use :cpp:expr:`lv_indev_set_group(indev, g)`. To associate a group with an input device use :cpp:expr:`lv_indev_set_group(indev, g)`.