Lines Matching refs:to
18 …lv_indev_t * indev = lv_indev_create(); /* Create input device connected to Default Display…
22 If you have multiple displays, you will need to ensure the Default Display is set
23 to the display your input device is "connected to" before making the above calls.
32 ``my_input_read`` is a function pointer which will be called periodically to
33 report the current state of an input device to LVGL.
40 Input devices that can click points on the display belong to the POINTER
75 … lv_indev_set_cursor(mouse_indev, cursor_obj); /* Connect image to Input Device. */
88 gestures to their parents so they can be detected on the Screen Widget in the
117 To prevent passing the gesture event to the parent from a Widget, use
123 :cpp:expr:`lv_indev_wait_release(lv_indev_active())` in the event handler to
137 As this behavior is tightly related to the last clicked widget, the crown support is
138 an extension of the pointer input device. Just set ``data->diff`` to the number of
155 For example, if both the indev and widget sensitivity is set to 128 (0.5), the input
162 LVGL has the ability to recognize multi-touch gestures, when a gesture
163 is detected a ``LV_EVENT_GESTURE`` is passed to the object on which the
174 is called. It is the responsibility of the driver to call
176 to recognise pinch gestures call ``lv_indev_gesture_detect_pinch``.
178 After calling the gesture detection function, it's necessary to call
179 the ``lv_indev_set_gesture_data`` function to set the ``gesture_data``
190 /* A counter that needs to be incremented each time a touch event is received */
206 /* Set the gesture information, before returning to LVGL */
233 keypad or encoder. It works similar to the *TAB* key on the PC to select an element
238 - Register a Read Callback function for your device and set its type to
240 - Create a Widget Group (``lv_group_t * g = lv_group_create()``) and add Widgets to
242 - Assign the group to an input device: :cpp:expr:`lv_indev_set_group(indev, g)`.
243 - Use ``LV_KEY_...`` to navigate among the Widgets in the group. See
278 the Widget will go to edit mode whereby you can navigate inside the
282 To use an Encoder (similar to the *Keypads*) the Widgets should be added to a group.
302 When input focus needs to be managed among a set of Widgets (e.g. to capture user
304 thereafter manages how input focus moves from Widget to Widget.
312 You need to associate an input device with a group. An input device can
313 send key events to only one group but a group can receive data from more
316 To create a group use :cpp:expr:`lv_group_t * g = lv_group_create()` and to add
317 a Widget to the group use :cpp:expr:`lv_group_add_obj(g, widget)`.
319 Once a Widget has been added to a group, you can find out what group it is in
336 - :cpp:enumerator:`LV_KEY_NEXT`: Move focus to next object
337 - :cpp:enumerator:`LV_KEY_PREV`: Move focus to previous object
341 - :cpp:enumerator:`LV_KEY_RIGHT`: Increase value or move to the right
342 - :cpp:enumerator:`LV_KEY_LEFT`: Decrease value or move to the left
346 - :cpp:enumerator:`LV_KEY_HOME`: Go to the beginning/top (e.g. in a :ref:`Text Area <lv_textarea>`)
347 - :cpp:enumerator:`LV_KEY_END`: Go to the end (e.g. in a :ref:`Text Area <lv_textarea>`)
359 You should translate some of your keys to these special keys to support navigation
362 Usually, it's enough to use only :cpp:enumerator:`LV_KEY_LEFT` and :cpp:enumerator:`LV_KEY_RIGHT` b…
371 Since a keypad has plenty of keys, it's easy to navigate between Widgets
373 "keys" and hence it is difficult to navigate using the default options.
374 *Navigate* and *Edit* modes are used to avoid this problem with
377 …mode, an encoder's :cpp:enumerator:`LV_KEY_LEFT` or :cpp:enumerator:`LV_KEY_RIGHT` is translated to
380 to *Edit* mode.
382 In *Edit* mode, :cpp:enumerator:`LV_KEY_NEXT` and :cpp:enumerator:`LV_KEY_PREV` is usually used to …
384 :cpp:enumerator:`LV_KEY_ENTER` changes back to *Navigate* mode. Usually, a Widget
393 be automatically added to a default group. Just create a group with
397 Don't forget to assign one or more input devices to the default group
403 When a Widget receives focus either by clicking it via touchpad or by navigating to
404 it with an encoder or keypad, it goes to the :cpp:enumerator:`LV_STATE_FOCUSED`
405 state. Hence, focused styles will be applied to it.
407 If a Widget switches to edit mode it enters the
409 assigned to these states will be shown.
419 In addition to standard encoder behavior, you can also utilize its logic
420 to navigate(focus) and edit widgets using buttons. This is especially
421 handy if you have only few buttons available, or you want to use other
422 buttons in addition to an encoder wheel.
424 You need to have 3 buttons available:
429 - other keys will be passed to the focused widget.
456 A *Hardware Button* here is an external button (switch) typically next to the screen
457 which is assigned to specific coordinates of the screen. If a button is pressed it
458 will simulate the pressing on the assigned coordinate, similar to a touchpad.
460 To assign Hardware Buttons to coordinates use ``lv_indev_set_button_points(my_indev,
466 ``points_array`` cannot be allowed to go out of scope. Either declare it as a
488 When the ``button_read`` callback in the example above changes the ``data->btn_id`` to ``0``
502 - ``scroll_limit`` Number of pixels to slide before actually scrolling the Widget
504 - ``long_press_time`` Press time to send :cpp:enumerator:`LV_EVENT_LONG_PRESSED` (in milliseconds)
506 - ``read_timer`` pointer to the ``lv_timer`` which reads the input device. Its parameters
516 feedback for the user, e.g. to play a sound on :cpp:enumerator:`LV_EVENT_CLICKED`.
528 ``data->continue_reading`` flag will tell LVGL there is more data to
531 Switching the Input Device to Event-Driven Mode
536 need more control over when to read the input device. For example, you
537 might need to read it by polling a file descriptor (fd).
543 /* Update the input device's running mode to LV_INDEV_MODE_EVENT */
548 /* Call this anywhere you want to read the input device */