From d029e6ddbf72036c804b61e5ef4d7755ddee5e70 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 4 Jun 2013 09:53:32 +1000 Subject: [PATCH] Add man page for libevdev_get_event_value and friends Signed-off-by: Peter Hutterer --- man/libevdev_get_event_value.txt | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 man/libevdev_get_event_value.txt diff --git a/man/libevdev_get_event_value.txt b/man/libevdev_get_event_value.txt new file mode 100644 index 0000000..c7e4793 --- /dev/null +++ b/man/libevdev_get_event_value.txt @@ -0,0 +1,71 @@ +libevdev_get_event_value(3) +=========================== + +NAME +---- + +libevdev_get_event_value, libevdev_fetch_event_value, libevdev_get_slot_value, libevdev_fetch_slot_value - retrieve the current value of an event type and code. + +SYNOPSIS +-------- + +#include + +int libevdev_get_event_value(const struct libevdev *dev, unsigned int type, unsigned int code); +int libevdev_fetch_event_value(const struct libevdev *dev, unsigned int type, unsigned int code, int *value); +int libevdev_get_slot_value(const struct libevdev *dev, unsigned int slot, unsigned int code); +int libevdev_fetch_slot_value(const struct libevdev *dev, unsigned int slot, unsigned int code, int *value); + +DESCRIPTION +----------- +*libevdev_get_event_value* returns the current value of the given event type +and code on this device. The caller must check if the event type and code +are available on this device with *libevdev_has_event_type(3)* and +*libevdev_has_event_code(3)*. + +*libevdev_get_event_value* may not be used to check for the current value +of any ABS_MT_* axis if the device supports multitouchs slots. Use +*libevdev_get_slot_value* instead. + +*libevev_get_slot_value* returns the current value of the given multitouch +slot. The caller must check if the device supports the multitouch slot +protocol with *libevdev_has_event_type(3)* and +*libevdev_has_event_code(3)*. The caller must ensure that the requested slot +value is within the allowed range (see *libevdev_get_num_slots(3)*). + +*libevdev_fetch_event_value* and *libevdev_fetch_slot_value* are convenience +functions so callers can check if an axis or slot exists and fetch the value +in one function call. + +PARAMETERS +---------- +*dev*:: + Pointer to the libevdev device. + +*type*:: + Specifies the event type to query. + +*code*:: + Specifies the event code to query. + +*slot*:: + Specifies the MT slot to query. + +*value*:: + Returns the current value of the event code or slot. + +RETURN VALUE +------------ +On success, *libevdev_get_event_value* and *libevdev_get_slot_value* returns +the current value of the axis and/or slot. If the device does not support +this axis or the slot is invalid, the return value is undefined. + +On success, *libevdev_fetch_event_value* and *libevdev_fetch_slot_value* +return 1 and ''value'' is set to the current value of this axis, or slot, +respectively. If the device does not support this axis or the slot is +invalid, 0 is returned and ''value'' is left as-is. + +SEE ALSO +-------- + +libevdev_has_event_type(3), libevdev_has_event_code(3), libevdev_get_num_slots(3)