lv_libinput.h

API reference for lv_libinput.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_libinput_private.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)
Parameters
NameTypeDescription
devicestruct 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)
Parameters
NameTypeDescription
capabilitieslv_libinput_capabilityrequired device capabilities
force_rescanboolerase 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)
Parameters
NameTypeDescription
capabilitieslv_libinput_capabilityrequired device capabilities
foundchar **
countsize_tmaximum number of devices to find (the devices array should be at least this long)
force_rescanboolerase the device cache (if any) and rescan the file system for available devices

Returns: size_t — number of devices that were found

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)
Parameters
NameTypeDescription
indev_typelv_indev_type_t
dev_pathconst 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)
Parameters
NameTypeDescription
indevlv_indev_t *pointer to input device

Enums

lv_libinput_capability

NameValue
LV_LIBINPUT_CAPABILITY_NONE0
LV_LIBINPUT_CAPABILITY_KEYBOARD1U << 0
LV_LIBINPUT_CAPABILITY_POINTER1U << 1
LV_LIBINPUT_CAPABILITY_TOUCH1U << 2
Used by 2 functions
  • lv_libinput_find_dev — param capabilities
  • lv_libinput_find_devs — param capabilities

Macros

LV_LIBINPUT_MAX_EVENTS

 
#define LV_LIBINPUT_MAX_EVENTS 32

Dependencies

How is this guide?

Last updated on

On this page