diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-06-04 09:52:20 +1000 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-06-04 11:39:32 +1000 |
| commit | 91e95d2ff4e8811af9b5f784afa9988c9707223d (patch) | |
| tree | bf9cbb888fda7760f0c01e5e7f272931d9a5988f /libevdev/libevdev.h | |
| parent | d029e6ddbf72036c804b61e5ef4d7755ddee5e70 (diff) | |
| download | libevdev-91e95d2ff4e8811af9b5f784afa9988c9707223d.tar.gz | |
Expose API for retrieving event names
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'libevdev/libevdev.h')
| -rw-r--r-- | libevdev/libevdev.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h index 5e42f32..a693acd 100644 --- a/libevdev/libevdev.h +++ b/libevdev/libevdev.h @@ -464,4 +464,32 @@ int libevdev_disable_event_code(struct libevdev *dev, unsigned int type, unsigne */ int libevdev_kernel_set_abs_value(struct libevdev *dev, unsigned int code, const struct input_absinfo *abs); +/** + * @return The name of the given event type (e.g. EV_ABS) or NULL for an + * invalid type + * + * @note The list of names is compiled into libevdev. If the kernel adds new + * defines for new properties libevdev will not automatically pick these up. + */ +const char * libevdev_get_event_type_name(unsigned int type); +/** + * @return The name of the given event code (e.g. ABS_X) or NULL for an + * invalid type or code + * + * @note The list of names is compiled into libevdev. If the kernel adds new + * defines for new properties libevdev will not automatically pick these up. + */ +const char * libevdev_get_event_code_name(unsigned int type, unsigned int code); + +/** + * @return The name of the given input prop (e.g. INPUT_PROP_BUTTONPAD) or NULL for an + * invalid property + * + * @note The list of names is compiled into libevdev. If the kernel adds new + * defines for new properties libevdev will not automatically pick these up. + * @note On older kernels input properties may not be defined and + * libevdev_get_input_prop_name will always return NULL + */ +const char * libevdev_get_input_prop_name(unsigned int prop); + #endif /* libevdev_H */ |
