libinput  0.8.0
A wrapper library for input devices
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
libinput.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Jonas Ådahl
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and
5  * its documentation for any purpose is hereby granted without fee, provided
6  * that the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name of the copyright holders not be used in
9  * advertising or publicity pertaining to distribution of the software
10  * without specific, written prior permission. The copyright holders make
11  * no representations about the suitability of this software for any
12  * purpose. It is provided "as is" without express or implied warranty.
13  *
14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
15  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
16  * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
17  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
18  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
19  * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21  */
22 
23 #ifndef LIBINPUT_H
24 #define LIBINPUT_H
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include <stdlib.h>
31 #include <stdint.h>
32 #include <libudev.h>
33 
34 #define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args) \
35  __attribute__ ((format (printf, _format, _args)))
36 #define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
37 
45 };
46 
58 };
59 
69 };
70 
80 };
81 
91 };
92 
93 
108 };
109 
130 };
131 
144 
154 
160 
162 
167 
177 };
178 
186 struct libinput;
187 
196 
205 
217 
225 
233 
242 
253 struct libinput_event_touch;
254 
271 void
273 
283 
292 struct libinput *
294 
308 struct libinput_device *
310 
321 struct libinput_event_pointer *
323 
336 
347 struct libinput_event_touch *
349 
363 
369 struct libinput_event *
371 
384 uint32_t
386 
392 uint32_t
394 
402 
408 struct libinput_event *
410 
423 uint32_t
425  struct libinput_event_keyboard *event);
426 
439 uint32_t
441 
460 double
462 
481 double
483 
501 double
503  struct libinput_event_pointer *event);
504 
522 double
524  struct libinput_event_pointer *event);
525 
541 double
543 
559 double
561 
579 double
581  struct libinput_event_pointer *event,
582  uint32_t width);
583 
601 double
603  struct libinput_event_pointer *event,
604  uint32_t height);
605 
618 uint32_t
620 
635 
649 uint32_t
651  struct libinput_event_pointer *event);
652 
664 int
666  enum libinput_pointer_axis axis);
667 
692 double
694  enum libinput_pointer_axis axis);
695 
733 
750 double
752  enum libinput_pointer_axis axis);
753 
759 struct libinput_event *
761 
773 uint32_t
775 
790 int32_t
792 
807 int32_t
809 
823 double
825 
841 double
843 
857 double
859  uint32_t width);
860 
874 double
876  uint32_t height);
877 
883 struct libinput_event *
885 
913  int (*open_restricted)(const char *path, int flags, void *user_data);
921  void (*close_restricted)(int fd, void *user_data);
922 };
923 
937 struct libinput *
938 libinput_udev_create_context(const struct libinput_interface *interface,
939  void *user_data,
940  struct udev *udev);
941 
963 int
965  const char *seat_id);
966 
986 struct libinput *
987 libinput_path_create_context(const struct libinput_interface *interface,
988  void *user_data);
989 
1010 struct libinput_device *
1012  const char *path);
1013 
1032 void
1034 
1043 int
1045 
1059 int
1061 
1073 struct libinput_event *
1075 
1089 
1097 void
1099  void *user_data);
1100 
1108 void *
1110 
1122 int
1124 
1134 void
1136 
1146 struct libinput *
1147 libinput_ref(struct libinput *libinput);
1148 
1159 struct libinput *
1161 
1176 void
1178  enum libinput_log_priority priority);
1179 
1196 
1211 typedef void (*libinput_log_handler)(struct libinput *libinput,
1212  enum libinput_log_priority priority,
1213  const char *format, va_list args)
1215 
1231 void
1232 libinput_log_set_handler(struct libinput *libinput,
1233  libinput_log_handler log_handler);
1234 
1255 struct libinput_seat *
1256 libinput_seat_ref(struct libinput_seat *seat);
1257 
1269 struct libinput_seat *
1270 libinput_seat_unref(struct libinput_seat *seat);
1271 
1283 void
1284 libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data);
1285 
1295 void *
1297 
1306 struct libinput *
1308 
1325 const char *
1327 
1337 const char *
1339 
1355 struct libinput_device *
1356 libinput_device_ref(struct libinput_device *device);
1357 
1369 struct libinput_device *
1370 libinput_device_unref(struct libinput_device *device);
1371 
1383 void
1384 libinput_device_set_user_data(struct libinput_device *device, void *user_data);
1385 
1395 void *
1397 
1406 struct libinput *
1408 
1420 const char *
1422 
1436 const char *
1438 
1447 unsigned int
1449 
1458 unsigned int
1460 
1472 const char *
1474 
1488 struct libinput_seat *
1490 
1513 int
1515  const char *name);
1516 
1532 struct udev_device *
1534 
1545 void
1547  enum libinput_led leds);
1548 
1556 int
1558  enum libinput_device_capability capability);
1559 
1574 int
1576  double *width,
1577  double *height);
1578 
1591 int
1592 libinput_device_has_button(struct libinput_device *device, uint32_t code);
1593 
1618 };
1619 
1629 const char *
1631 
1640 };
1641 
1656 int
1658 
1681  enum libinput_config_tap_state enable);
1682 
1700 
1716 
1729 int
1731 
1783  const float matrix[6]);
1784 
1801 int
1803  float matrix[6]);
1804 
1838 int
1840  float matrix[6]);
1841 
1873 };
1874 
1889 uint32_t
1891 
1922  uint32_t mode);
1923 
1943 uint32_t
1945 
1959 uint32_t
1961 
1971 int
1973 
1992  double speed);
1993 
2005 double
2007 
2018 double
2020 
2050 int
2052 
2069  int enable);
2083 int
2085 
2099 int
2101 
2115 int
2117 
2145  int left_handed);
2146 
2160 int
2162 
2176 int
2178 
2205 };
2206 
2224 uint32_t
2226 
2253  enum libinput_config_scroll_method method);
2254 
2273 
2292 
2329  uint32_t button);
2330 
2355 uint32_t
2357 
2377 uint32_t
2379 
2380 #ifdef __cplusplus
2381 }
2382 #endif
2383 #endif /* LIBINPUT_H */
const char * libinput_seat_get_physical_name(struct libinput_seat *seat)
Return the physical name of the seat.
A base handle for accessing libinput devices.
Definition: libinput.h:186
libinput_log_priority
Log priority for internal logging messages.
Definition: libinput.h:41
Never send scroll events instead of pointer motion events.
Definition: libinput.h:2190
void(*) voi libinput_log_set_handler)(struct libinput *libinput, libinput_log_handler log_handler)
Set the global log handler.
Definition: libinput.h:1232
unsigned int libinput_device_get_id_product(struct libinput_device *device)
Get the product ID for this device.
Definition: libinput.h:57
uint32_t libinput_event_pointer_get_button(struct libinput_event_pointer *event)
Return the button that triggered this event.
void(* close_restricted)(int fd, void *user_data)
Close the file descriptor.
Definition: libinput.h:921
Definition: libinput.h:170
int libinput_dispatch(struct libinput *libinput)
Main event dispatchment function.
struct libinput * libinput_ref(struct libinput *libinput)
Add a reference to the context.
libinput does not open file descriptors to devices directly, instead open_restricted() and close_rest...
Definition: libinput.h:901
struct udev_device * libinput_device_get_udev_device(struct libinput_device *device)
Return a udev handle to the device that is this libinput device, if any.
Definition: libinput.h:166
Definition: libinput.h:90
libinput_led
Mask reflecting LEDs on a device.
Definition: libinput.h:76
libinput_pointer_axis_source
The source for a libinput_pointer_axis event.
Definition: libinput.h:116
Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events...
Definition: libinput.h:241
Definition: libinput.h:168
int32_t libinput_event_touch_get_slot(struct libinput_event_touch *event)
Get the slot of this touch event.
void * libinput_device_get_user_data(struct libinput_device *device)
Get the caller-specific data associated with this input device, if any.
struct libinput_seat * libinput_seat_ref(struct libinput_seat *seat)
Increase the refcount of the seat.
Definition: libinput.h:107
Signals the end of a set of touchpoints at one device sample time.
Definition: libinput.h:176
Config applied successfully.
Definition: libinput.h:1614
uint32_t libinput_device_config_scroll_get_button(struct libinput_device *device)
Get the button for the LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for this device.
const char * libinput_device_get_name(struct libinput_device *device)
The descriptive device name as advertised by the kernel and/or the hardware itself.
enum libinput_config_status libinput_device_config_calibration_set_matrix(struct libinput_device *device, const float matrix[6])
Apply the 3x3 transformation matrix to absolute device coordinates.
Definition: libinput.h:79
uint32_t libinput_event_keyboard_get_seat_key_count(struct libinput_event_keyboard *event)
For the key of a LIBINPUT_EVENT_KEYBOARD_KEY event, return the total number of keys pressed on all de...
void * libinput_seat_get_user_data(struct libinput_seat *seat)
Get the caller-specific data associated with this seat, if any.
The event is caused by the movement of one or more fingers on a device.
Definition: libinput.h:125
Tapping is to be enabled, or is currently enabled.
Definition: libinput.h:1638
struct libinput_event * libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event)
Definition: libinput.h:161
uint32_t libinput_device_config_scroll_get_default_button(struct libinput_device *device)
Get the default button for LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for this device.
double libinput_event_pointer_get_axis_value(struct libinput_event_pointer *event, enum libinput_pointer_axis axis)
Return the axis value of the given axis.
Signals that a device has been added to the context.
Definition: libinput.h:153
Send events from this device normally.
Definition: libinput.h:1852
Configuration not available on this device.
Definition: libinput.h:1615
Definition: libinput.h:163
double libinput_event_pointer_get_dy(struct libinput_event_pointer *event)
Return the delta between the last event and the current event.
void libinput_path_remove_device(struct libinput_device *device)
Remove a device from a libinput context initialized with libinput_path_create_context() or added to s...
Signals that a device has been removed.
Definition: libinput.h:159
int libinput_device_config_calibration_get_default_matrix(struct libinput_device *device, float matrix[6])
Return the default calibration matrix for this device.
void libinput_log_set_priority(struct libinput *libinput, enum libinput_log_priority priority)
Set the global log priority.
int libinput_device_config_scroll_get_natural_scroll_enabled(struct libinput_device *device)
Get the current mode for scrolling on this device.
enum libinput_config_status libinput_device_config_scroll_set_method(struct libinput_device *device, enum libinput_config_scroll_method method)
Set the scroll method for this device.
int libinput_device_set_seat_logical_name(struct libinput_device *device, const char *name)
Change the logical seat associated with this device by removing the device and adding it to the new s...
libinput_button_state
Logical state of a physical button.
Definition: libinput.h:88
const char * libinput_config_status_to_str(enum libinput_config_status status)
Return a string describing the error.
enum libinput_config_tap_state libinput_device_config_tap_get_enabled(struct libinput_device *device)
Check if tap-to-click is enabled on this device.
struct libinput_device * libinput_device_ref(struct libinput_device *device)
Increase the refcount of the input device.
Send scroll events when 2 fingers are down on the device.
Definition: libinput.h:2194
uint32_t libinput_event_touch_get_time(struct libinput_event_touch *event)
int libinput_device_has_button(struct libinput_device *device, uint32_t code)
Check if a LIBINPUT_DEVICE_CAP_POINTER device has a button with the passed in code (see linux/input...
A pointer event representing relative or absolute pointer movement, a button press/release or scroll ...
Definition: libinput.h:232
double libinput_device_config_accel_get_speed(struct libinput_device *device)
Get the current pointer acceleration setting for this pointer device.
double libinput_event_touch_get_x(struct libinput_event_touch *event)
Return the current absolute x coordinate of the touch event, in mm from the top left corner of the de...
uint32_t libinput_event_pointer_get_seat_button_count(struct libinput_event_pointer *event)
For the button of a LIBINPUT_EVENT_POINTER_BUTTON event, return the total number of buttons pressed o...
int libinput_device_config_calibration_get_matrix(struct libinput_device *device, float matrix[6])
Return the current calibration matrix for this device.
enum libinput_config_status libinput_device_config_scroll_set_button(struct libinput_device *device, uint32_t button)
Set the button for the LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for this device.
Definition: libinput.h:165
Definition: libinput.h:43
enum libinput_key_state libinput_event_keyboard_get_key_state(struct libinput_event_keyboard *event)
int libinput_device_config_left_handed_is_available(struct libinput_device *device)
Check if a device has a configuration that supports left-handed usage.
double libinput_event_pointer_get_dx(struct libinput_event_pointer *event)
Return the delta between the last event and the current event.
double libinput_event_pointer_get_absolute_y_transformed(struct libinput_event_pointer *event, uint32_t height)
Return the current absolute y coordinate of the pointer event, transformed to screen coordinates...
double libinput_event_pointer_get_absolute_x(struct libinput_event_pointer *event)
Return the current absolute x coordinate of the pointer event, in mm from the top left corner of the ...
struct libinput_event_device_notify * libinput_event_get_device_notify_event(struct libinput_event *event)
Return the device event that is this input event.
libinput_pointer_axis
Axes on a device that are not x or y coordinates.
Definition: libinput.h:105
int libinput_device_config_calibration_has_matrix(struct libinput_device *device)
Check if the device can be calibrated via a calibration matrix.
libinput_config_tap_state
Definition: libinput.h:1635
int(* open_restricted)(const char *path, int flags, void *user_data)
Open the device at the given path with the flags provided and return the fd.
Definition: libinput.h:913
Definition: libinput.h:55
void libinput_set_user_data(struct libinput *libinput, void *user_data)
void(* libinput_log_handler)(struct libinput *libinput, enum libinput_log_priority priority, const char *format, va_list args) LIBINPUT_ATTRIBUTE_PRINTF(3
Log handler type for custom logging.
Definition: libinput.h:1211
double libinput_event_pointer_get_axis_value_discrete(struct libinput_event_pointer *event, enum libinput_pointer_axis axis)
Return the axis value in discrete steps for a given axis event.
uint32_t libinput_device_config_send_events_get_default_mode(struct libinput_device *device)
Get the default send-event mode for this device.
enum libinput_pointer_axis_source libinput_event_pointer_get_axis_source(struct libinput_event_pointer *event)
Return the source for a given axis event.
int libinput_event_pointer_has_axis(struct libinput_event_pointer *event, enum libinput_pointer_axis axis)
Check if the event has a valid value for the given axis.
enum libinput_config_status libinput_device_config_tap_set_enabled(struct libinput_device *device, enum libinput_config_tap_state enable)
Enable or disable tap-to-click on this device, with a default mapping of 1, 2, 3 finger tap mapping t...
Definition: libinput.h:67
libinput_device_capability
Capabilities on a device.
Definition: libinput.h:54
The event is caused by the rotation of a wheel.
Definition: libinput.h:120
Definition: libinput.h:169
libinput_config_status
Status codes returned when applying configuration settings.
Definition: libinput.h:1613
Definition: libinput.h:68
double libinput_event_touch_get_y(struct libinput_event_touch *event)
Return the current absolute y coordinate of the touch event, in mm from the top left corner of the de...
enum libinput_config_scroll_method libinput_device_config_scroll_get_method(struct libinput_device *device)
Get the scroll method for this device.
int32_t libinput_event_touch_get_seat_slot(struct libinput_event_touch *event)
Get the seat slot of the touch event.
double libinput_event_pointer_get_absolute_y(struct libinput_event_pointer *event)
Return the current absolute y coordinate of the pointer event, in mm from the top left corner of the ...
uint32_t libinput_device_config_send_events_get_mode(struct libinput_device *device)
Get the send-event mode for this device.
void libinput_device_led_update(struct libinput_device *device, enum libinput_led leds)
Update the LEDs on the device, if any.
struct libinput_device * libinput_path_add_device(struct libinput *libinput, const char *path)
Add a device to a libinput context initialized with libinput_path_create_context().
double libinput_event_touch_get_x_transformed(struct libinput_event_touch *event, uint32_t width)
Return the current absolute x coordinate of the touch event, transformed to screen coordinates...
Definition: libinput.h:42
struct libinput * libinput_event_get_context(struct libinput_event *event)
Get the libinput context from the event.
Definition: libinput.h:171
The base event type.
Definition: libinput.h:204
#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args)
Definition: libinput.h:34
enum libinput_config_status libinput_device_config_accel_set_speed(struct libinput_device *device, double speed)
Set the pointer acceleration speed of this pointer device within a range of [-1, 1], where 0 is the default acceleration for this device, -1 is the slowest acceleration and 1 is the maximum acceleration available on this device.
int libinput_device_config_left_handed_get_default(struct libinput_device *device)
Get the default left-handed configuration of the device.
struct libinput * libinput_path_create_context(const struct libinput_interface *interface, void *user_data)
Create a new libinput context that requires the caller to manually add or remove devices with libinpu...
If an external pointer device is plugged in, do not send events from this device. ...
Definition: libinput.h:1872
struct libinput_seat * libinput_seat_unref(struct libinput_seat *seat)
Decrease the refcount of the seat.
int libinput_device_config_tap_get_finger_count(struct libinput_device *device)
Check if the device supports tap-to-click.
struct libinput * libinput_device_get_context(struct libinput_device *device)
Get the libinput context from the device.
Invalid parameter range.
Definition: libinput.h:1617
unsigned int libinput_device_get_id_vendor(struct libinput_device *device)
Get the vendor ID for this device.
enum libinput_event_type libinput_event_get_type(struct libinput_event *event)
Get the type of the event.
A handle for accessing libinput.
struct libinput_device * libinput_event_get_device(struct libinput_event *event)
Return the device associated with this event, if applicable.
void * libinput_get_user_data(struct libinput *libinput)
Definition: libinput.h:56
void libinput_event_destroy(struct libinput_event *event)
Destroy the event, freeing all associated resources.
Definition: libinput.h:164
void libinput_suspend(struct libinput *libinput)
Suspend monitoring for new devices and close existing devices.
enum libinput_config_scroll_method libinput_device_config_scroll_get_default_method(struct libinput_device *device)
Get the default scroll method for this device.
int libinput_device_config_scroll_has_natural_scroll(struct libinput_device *device)
Return non-zero if the device supports "natural scrolling".
Definition: libinput.h:77
uint32_t libinput_event_keyboard_get_key(struct libinput_event_keyboard *event)
Send scroll events when a button is down and the device moves along a scroll-capable axis...
Definition: libinput.h:2204
libinput_config_scroll_method
The scroll method of a device selects when to generate scroll axis events instead of pointer motion e...
Definition: libinput.h:2185
Send scroll events when a finger is moved along the bottom or right edge of a device.
Definition: libinput.h:2199
Tapping is to be disabled, or is currently disabled.
Definition: libinput.h:1636
libinput_config_send_events_mode
The send-event mode of a device defines when a device may generate events and pass those events to th...
Definition: libinput.h:1846
Definition: libinput.h:89
int libinput_get_fd(struct libinput *libinput)
libinput keeps a single file descriptor for all events.
int libinput_resume(struct libinput *libinput)
Resume a suspended libinput context.
The base handle for accessing libinput seats.
Definition: libinput.h:195
struct libinput * libinput_udev_create_context(const struct libinput_interface *interface, void *user_data, struct udev *udev)
Create a new libinput context from udev.
libinput_event_type
Event type for events returned by libinput_get_event().
Definition: libinput.h:137
struct libinput_event * libinput_get_event(struct libinput *libinput)
Retrieve the next event from libinput's internal event queue.
enum libinput_event_type libinput_next_event_type(struct libinput *libinput)
Return the type of the next event in the internal queue.
int libinput_device_has_capability(struct libinput_device *device, enum libinput_device_capability capability)
Check if the given device has the specified capability.
The event is caused by the motion of some device.
Definition: libinput.h:129
double libinput_event_pointer_get_absolute_x_transformed(struct libinput_event_pointer *event, uint32_t width)
Return the current absolute x coordinate of the pointer event, transformed to screen coordinates...
uint32_t libinput_event_keyboard_get_time(struct libinput_event_keyboard *event)
struct libinput_event_keyboard * libinput_event_get_keyboard_event(struct libinput_event *event)
Return the keyboard event that is this input event.
Definition: libinput.h:78
int libinput_device_config_accel_is_available(struct libinput_device *device)
Check if a device uses libinput-internal pointer-acceleration.
double libinput_event_pointer_get_dx_unaccelerated(struct libinput_event_pointer *event)
Return the relative delta of the unaccelerated motion vector of the current event.
struct libinput_seat * libinput_device_get_seat(struct libinput_device *device)
Get the seat associated with this input device.
enum libinput_button_state libinput_event_pointer_get_button_state(struct libinput_event_pointer *event)
Return the button state that triggered this event.
Definition: libinput.h:106
Do not send events through this device.
Definition: libinput.h:1866
enum libinput_config_status libinput_device_config_scroll_set_natural_scroll_enabled(struct libinput_device *device, int enable)
Enable or disable natural scrolling on the device.
enum libinput_config_status libinput_device_config_left_handed_set(struct libinput_device *device, int left_handed)
Set the left-handed configuration of the device.
struct libinput * libinput_unref(struct libinput *libinput)
Dereference the libinput context.
enum libinput_log_priority libinput_log_get_priority(const struct libinput *libinput)
Get the global log priority.
const char * libinput_device_get_sysname(struct libinput_device *device)
Get the system name of the device.
struct libinput_device * libinput_device_unref(struct libinput_device *device)
Decrease the refcount of the input device.
int libinput_device_config_scroll_get_default_natural_scroll_enabled(struct libinput_device *device)
Get the default mode for scrolling on this device.
int libinput_device_get_size(struct libinput_device *device, double *width, double *height)
Get the physical size of a device in mm, where meaningful.
void libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data)
Set caller-specific data associated with this seat.
const char * libinput_seat_get_logical_name(struct libinput_seat *seat)
Return the logical name of the seat.
int libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id)
Assign a seat to this libinput context.
double libinput_event_touch_get_y_transformed(struct libinput_event_touch *event, uint32_t height)
Return the current absolute y coordinate of the touch event, transformed to screen coordinates...
enum libinput_config_tap_state libinput_device_config_tap_get_default_enabled(struct libinput_device *device)
Return the default setting for whether tapping is enabled on this device.
An event notifying the caller of a device being added or removed.
Definition: libinput.h:216
uint32_t libinput_device_config_scroll_get_methods(struct libinput_device *device)
Check which scroll methods a device supports.
struct libinput_event * libinput_event_keyboard_get_base_event(struct libinput_event_keyboard *event)
const char * libinput_device_get_output_name(struct libinput_device *device)
A device may be mapped to a single output, or all available outputs.
uint32_t libinput_event_pointer_get_time(struct libinput_event_pointer *event)
struct libinput_event * libinput_event_touch_get_base_event(struct libinput_event_touch *event)
double libinput_device_config_accel_get_default_speed(struct libinput_device *device)
Return the default speed setting for this device, normalized to a range of [-1, 1].
double libinput_event_pointer_get_dy_unaccelerated(struct libinput_event_pointer *event)
Return the relative delta of the unaccelerated motion vector of the current event.
enum libinput_config_status libinput_device_config_send_events_set_mode(struct libinput_device *device, uint32_t mode)
Set the send-event mode for this device.
libinput_key_state
Logical state of a key.
Definition: libinput.h:66
This is not a real event type, and is only used to tell the user that no new event is available in th...
Definition: libinput.h:143
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
Set caller-specific data associated with this input device.
int libinput_device_config_left_handed_get(struct libinput_device *device)
Get the current left-handed configuration of the device.
A keyboard event representing a key press/release.
Definition: libinput.h:224
struct libinput * libinput_seat_get_context(struct libinput_seat *seat)
Get the libinput context from the seat.
struct libinput_event * libinput_event_pointer_get_base_event(struct libinput_event_pointer *event)
struct libinput_event_pointer * libinput_event_get_pointer_event(struct libinput_event *event)
Return the pointer event that is this input event.
uint32_t libinput_device_config_send_events_get_modes(struct libinput_device *device)
Return the possible send-event modes for this device.
Definition: libinput.h:44
struct libinput_event_touch * libinput_event_get_touch_event(struct libinput_event *event)
Return the touch event that is this input event.