mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 22:00:07 +01:00
Add a function to retrieve the current slot
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
4ae4f24ef7
commit
ee054e9cf9
2 changed files with 17 additions and 0 deletions
|
|
@ -677,6 +677,12 @@ libevdev_get_num_slots(const struct libevdev *dev)
|
||||||
return dev->num_slots;
|
return dev->num_slots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
libevdev_get_current_slot(const struct libevdev *dev)
|
||||||
|
{
|
||||||
|
return dev->current_slot;
|
||||||
|
}
|
||||||
|
|
||||||
const struct input_absinfo*
|
const struct input_absinfo*
|
||||||
libevdev_get_abs_info(const struct libevdev *dev, unsigned int code)
|
libevdev_get_abs_info(const struct libevdev *dev, unsigned int code)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -308,6 +308,17 @@ int libevdev_fetch_slot_value(const struct libevdev *dev, unsigned int slot, uns
|
||||||
*/
|
*/
|
||||||
int libevdev_get_num_slots(const struct libevdev *dev);
|
int libevdev_get_num_slots(const struct libevdev *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the currently active slot. This may differ from the value
|
||||||
|
* an ioctl may return at this time as events may have been read off the fd
|
||||||
|
* since changing the slot value but those events are still in the buffer
|
||||||
|
* waiting to be processed. The returned value is the value a caller would
|
||||||
|
* see if it were to process events manually one-by-one.
|
||||||
|
*
|
||||||
|
* @return the currently active slot (logically)
|
||||||
|
*/
|
||||||
|
int libevdev_get_current_slot(const struct libevdev *dev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forcibly enable an event type on this device, even if the underlying
|
* Forcibly enable an event type on this device, even if the underlying
|
||||||
* device does not support it. While this cannot make the device actually
|
* device does not support it. While this cannot make the device actually
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue