mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-05-07 16:38:32 +02:00
Improve the documentation a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
4b3d2405e3
commit
7e8ba41a40
1 changed files with 24 additions and 11 deletions
|
|
@ -217,17 +217,17 @@ extern "C" {
|
||||||
* Minimum requirements
|
* Minimum requirements
|
||||||
* ====================
|
* ====================
|
||||||
* libevdev requires a 2.6.36 kernel as minimum. Specifically, it requires
|
* libevdev requires a 2.6.36 kernel as minimum. Specifically, it requires
|
||||||
* ABS_MT_SLOT and the matching behavior.
|
* kernel-support for ABS_MT_SLOT.
|
||||||
*
|
*
|
||||||
* Event and input property names
|
* Event and input property names
|
||||||
* ==============================
|
* ==============================
|
||||||
* Event names and input property names are defined at build-time by the
|
* Event names and input property names are defined at build-time by the
|
||||||
* linux/input.h shipped with libevedv.
|
* linux/input.h shipped with libevdev.
|
||||||
* The list of event names is compiled at build-time and thus any events not defined
|
* The list of event names is compiled at build-time, any events not defined
|
||||||
* at build time will not resolve. Specifically,
|
* at build time will not resolve. Specifically,
|
||||||
* libevdev_event_code_get_name(type, code) for an undefined type or code will
|
* libevdev_event_code_get_name() for an undefined type or code will
|
||||||
* always return NULL. Likewise, libevdev_property_get_name() will return NULL
|
* always return NULL. Likewise, libevdev_property_get_name() will return NULL
|
||||||
* for properties undefined on the build system.
|
* for properties undefined at build-time.
|
||||||
*
|
*
|
||||||
* Input properties
|
* Input properties
|
||||||
* ================
|
* ================
|
||||||
|
|
@ -242,14 +242,13 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* MT slot behavior
|
* MT slot behavior
|
||||||
* =================
|
* =================
|
||||||
* If the kernel does not support the EVIOCGMTSLOTS ioctl, libevdev continues
|
* If the kernel does not support the EVIOCGMTSLOTS ioctl, libevdev
|
||||||
* as normal and assumes all values in all slots to be 0.
|
* assumes all values in all slots are 0 and continues without an error.
|
||||||
*
|
*
|
||||||
* SYN_DROPPED behavior
|
* SYN_DROPPED behavior
|
||||||
* ====================
|
* ====================
|
||||||
* A kernel without SYN_DROPPED, won't send the event. libevdev_next_event()
|
* A kernel without SYN_DROPPED won't send such an event. libevdev_next_event()
|
||||||
* will never require the switch to sync mode.
|
* will never require the switch to sync mode.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -262,7 +261,7 @@ extern "C" {
|
||||||
* <dd>supported, see libevdev_get_driver_version()</dd>
|
* <dd>supported, see libevdev_get_driver_version()</dd>
|
||||||
* <dt>EVIOCGID:</dt>
|
* <dt>EVIOCGID:</dt>
|
||||||
* <dd>supported, see libevdev_get_id_product(), libevdev_get_id_vendor(),
|
* <dd>supported, see libevdev_get_id_product(), libevdev_get_id_vendor(),
|
||||||
* libevdev_get_id_bustype(), * * libevdev_get_id_version()</dd>
|
* libevdev_get_id_bustype(), libevdev_get_id_version()</dd>
|
||||||
* <dt>EVIOCGREP:</dt>
|
* <dt>EVIOCGREP:</dt>
|
||||||
* <dd>supported, see libevdev_get_event_value())</dd>
|
* <dd>supported, see libevdev_get_event_value())</dd>
|
||||||
* <dt>EVIOCSREP:</dt>
|
* <dt>EVIOCSREP:</dt>
|
||||||
|
|
@ -547,6 +546,9 @@ void libevdev_set_log_priority(enum libevdev_log_priority priority);
|
||||||
/**
|
/**
|
||||||
* @ingroup init
|
* @ingroup init
|
||||||
*
|
*
|
||||||
|
* Return the current log priority level. Messages higher than this level
|
||||||
|
* are printed, others are discarded. This is a global setting.
|
||||||
|
*
|
||||||
* @return the current log level
|
* @return the current log level
|
||||||
*/
|
*/
|
||||||
enum libevdev_log_priority libevdev_get_log_priority(void);
|
enum libevdev_log_priority libevdev_get_log_priority(void);
|
||||||
|
|
@ -596,7 +598,7 @@ int libevdev_grab(struct libevdev *dev, enum libevdev_grab_mode grab);
|
||||||
* @param dev The evdev device
|
* @param dev The evdev device
|
||||||
* @param fd The file descriptor for the device
|
* @param fd The file descriptor for the device
|
||||||
*
|
*
|
||||||
* @return 0 on success, or a negative error code on failure
|
* @return 0 on success, or a negative errno on failure
|
||||||
*
|
*
|
||||||
* @see libevdev_change_fd
|
* @see libevdev_change_fd
|
||||||
* @see libevdev_new
|
* @see libevdev_new
|
||||||
|
|
@ -617,6 +619,17 @@ int libevdev_set_fd(struct libevdev* dev, int fd);
|
||||||
* device state. Use libevdev_next_event with the
|
* device state. Use libevdev_next_event with the
|
||||||
* @ref LIBEVDEV_READ_FLAG_FORCE_SYNC flag to force a re-sync.
|
* @ref LIBEVDEV_READ_FLAG_FORCE_SYNC flag to force a re-sync.
|
||||||
*
|
*
|
||||||
|
* The example code below illustrates how to force a re-sync of the
|
||||||
|
* library-internal state. Note that this code doesn't handle the events in
|
||||||
|
* the caller, it merely forces an update of the internal library state.
|
||||||
|
@code
|
||||||
|
struct input_event ev;
|
||||||
|
libevdev_change_fd(dev, new_fd);
|
||||||
|
libevdev_next_event(dev, LIBEVDEV_READ_FLAG_FORCE_SYNC, &ev);
|
||||||
|
while (libevdev_next_event(dev, LIBEVDEV_READ_FLAG_SYNC, &ev) == LIBEVDEV_READ_STATUS_SYNC)
|
||||||
|
; // noop
|
||||||
|
@endcode
|
||||||
|
*
|
||||||
* The fd may be open in O_RDONLY or O_RDWR.
|
* The fd may be open in O_RDONLY or O_RDWR.
|
||||||
*
|
*
|
||||||
* It is an error to call this function before calling libevdev_set_fd().
|
* It is an error to call this function before calling libevdev_set_fd().
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue