lv_libinput.h
API reference for lv_libinput.h
Functions
lv_libinput_query_capability
Determine the capabilities of a specific libinput device.
lv_libinput_capability lv_libinput_query_capability(struct libinput_device *device)| Name | Type | Description |
|---|---|---|
device | struct libinput_device * | the libinput device to query |
Returns: lv_libinput_capability — the supported input capabilities
lv_libinput_find_dev
Find connected input device with specific capabilities
char * lv_libinput_find_dev(lv_libinput_capability capabilities, bool force_rescan)| Name | Type | Description |
|---|---|---|
capabilities | lv_libinput_capability | required device capabilities |
force_rescan | bool | erase the device cache (if any) and rescan the file system for available devices |
Returns: char * — device node path (e.g. /dev/input/event0) for the first matching device or NULL if no device was found. The pointer is safe to use until the next forceful device search.
lv_libinput_find_devs
Find connected input devices with specific capabilities
size_t lv_libinput_find_devs(lv_libinput_capability capabilities, char **found, size_t count, bool force_rescan)| Name | Type | Description |
|---|---|---|
capabilities | lv_libinput_capability | required device capabilities |
found | char ** | pre-allocated array to store the found device node paths (e.g. /dev/input/event0). The pointers are safe to use until the next forceful device search. |
count | size_t | maximum number of devices to find (the devices array should be at least this long) |
force_rescan | bool | erase the device cache (if any) and rescan the file system for available devices |
Returns: size_t — number of devices that were found
lv_libinput_clear_devs
Clear the device cache.
This frees the cached device path strings, so any pointers previously returned by lv_libinput_find_dev() or lv_libinput_find_devs() become invalid after this call.
void lv_libinput_clear_devs(void)lv_libinput_create
Create a new libinput input device
lv_indev_t * lv_libinput_create(lv_indev_type_t indev_type, const char *dev_path)| Name | Type | Description |
|---|---|---|
indev_type | lv_indev_type_t | LV_INDEV_TYPE_POINTER or LV_INDEV_TYPE_KEYPAD |
dev_path | const char * | device path, e.g. /dev/input/event0 |
Returns: lv_indev_t * — pointer to input device or NULL if opening failed
lv_libinput_delete
Delete a libinput input device
void lv_libinput_delete(lv_indev_t *indev)| Name | Type | Description |
|---|---|---|
indev | lv_indev_t * | pointer to input device May be NULL. |
Enums
lv_libinput_capability
| Name | Value |
|---|---|
LV_LIBINPUT_CAPABILITY_NONE | 0 |
LV_LIBINPUT_CAPABILITY_KEYBOARD | 1U << 0 |
LV_LIBINPUT_CAPABILITY_POINTER | 1U << 1 |
LV_LIBINPUT_CAPABILITY_TOUCH | 1U << 2 |
Used by 2 functions
lv_libinput_find_dev— paramcapabilitieslv_libinput_find_devs— paramcapabilities
Macros
LV_LIBINPUT_MAX_EVENTS
#define LV_LIBINPUT_MAX_EVENTS 32Dependencies
lv_indev.hpoll.hpthread.hlv_xkb.h
Indirect dependencies
Last updated on