libinput.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Jonas Ådahl
3  * Copyright © 2013-2015 Red Hat, Inc.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef LIBINPUT_H
26 #define LIBINPUT_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <stdlib.h>
33 #include <stdint.h>
34 #include <libudev.h>
35 
36 #define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args) \
37  __attribute__ ((format (printf, _format, _args)))
38 #define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
39 
47 struct libinput;
48 
57 
67 
76 
93 
105 
113 
121 
130 
142 
154 
165 
175 };
176 
191 };
192 
202 };
203 
213 };
214 
224 };
225 
241 };
242 
269 };
270 
284 };
285 
299 };
300 
330 };
331 
349 };
350 
363 };
364 
391 
405 int
407 
430  unsigned int index);
431 
442 unsigned int
444 
460 unsigned int
462 
480 unsigned int
482 
493 int
495  unsigned int button);
496 
507 int
509  unsigned int ring);
510 
521 int
523  unsigned int strip);
524 
541 int
543  unsigned int button);
544 
556  struct libinput_tablet_pad_mode_group *group);
557 
569  struct libinput_tablet_pad_mode_group *group);
570 
583 void
585  struct libinput_tablet_pad_mode_group *group,
586  void *user_data);
587 
597 void *
599  struct libinput_tablet_pad_mode_group *group);
600 
613 };
614 
627 };
628 
635 struct libinput_event_switch;
636 
649 
659 
665 
667 
672 
682 
765 
779 
785 
792 
794 };
795 
812 void
814 
824 
833 struct libinput *
835 
849 struct libinput_device *
851 
862 struct libinput_event_pointer *
864 
877 
888 struct libinput_event_touch *
890 
901 struct libinput_event_gesture *
903 
916 
929 
940 struct libinput_event_switch *
942 
956 
962 struct libinput_event *
964 
977 uint32_t
979 
985 uint64_t
987 
993 uint32_t
995 
1001 enum libinput_key_state
1003 
1009 struct libinput_event *
1011 
1024 uint32_t
1026  struct libinput_event_keyboard *event);
1027 
1040 uint32_t
1042 
1048 uint64_t
1050 
1069 double
1071 
1090 double
1092 
1114 double
1116  struct libinput_event_pointer *event);
1117 
1139 double
1141  struct libinput_event_pointer *event);
1142 
1158 double
1160 
1176 double
1178 
1196 double
1198  struct libinput_event_pointer *event,
1199  uint32_t width);
1200 
1218 double
1220  struct libinput_event_pointer *event,
1221  uint32_t height);
1222 
1235 uint32_t
1237 
1252 
1266 uint32_t
1268  struct libinput_event_pointer *event);
1269 
1287 int
1289  enum libinput_pointer_axis axis);
1290 
1315 double
1317  enum libinput_pointer_axis axis);
1318 
1365 
1382 double
1384  enum libinput_pointer_axis axis);
1385 
1391 struct libinput_event *
1393 
1405 uint32_t
1407 
1413 uint64_t
1415 
1435 int32_t
1437 
1457 int32_t
1459 
1477 double
1479 
1497 double
1499 
1517 double
1519  uint32_t width);
1520 
1538 double
1540  uint32_t height);
1541 
1547 struct libinput_event *
1549 
1569 uint32_t
1570 libinput_event_gesture_get_time(struct libinput_event_gesture *event);
1571 
1577 uint64_t
1578 libinput_event_gesture_get_time_usec(struct libinput_event_gesture *event);
1579 
1585 struct libinput_event *
1586 libinput_event_gesture_get_base_event(struct libinput_event_gesture *event);
1587 
1599 int
1600 libinput_event_gesture_get_finger_count(struct libinput_event_gesture *event);
1601 
1616 int
1617 libinput_event_gesture_get_cancelled(struct libinput_event_gesture *event);
1618 
1634 double
1635 libinput_event_gesture_get_dx(struct libinput_event_gesture *event);
1636 
1652 double
1653 libinput_event_gesture_get_dy(struct libinput_event_gesture *event);
1654 
1673 double
1675  struct libinput_event_gesture *event);
1676 
1695 double
1697  struct libinput_event_gesture *event);
1698 
1725 double
1726 libinput_event_gesture_get_scale(struct libinput_event_gesture *event);
1727 
1749 double
1750 libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event);
1751 
1774 struct libinput_event *
1776 
1794 int
1796  struct libinput_event_tablet_tool *event);
1797 
1815 int
1817  struct libinput_event_tablet_tool *event);
1818 
1836 int
1838  struct libinput_event_tablet_tool *event);
1839 
1859 int
1861  struct libinput_event_tablet_tool *event);
1862 
1880 int
1882  struct libinput_event_tablet_tool *event);
1883 
1901 int
1903  struct libinput_event_tablet_tool *event);
1921 int
1923  struct libinput_event_tablet_tool *event);
1941 int
1943  struct libinput_event_tablet_tool *event);
1961 int
1963  struct libinput_event_tablet_tool *event);
1964 
1979 double
1981 
1996 double
1998 
2013 double
2015 
2030 double
2032 
2044 double
2046 
2058 double
2060 
2076 double
2078 
2094 double
2096 
2114 double
2116 
2130 double
2132 
2143 double
2145  struct libinput_event_tablet_tool *event);
2146 
2157 int
2159  struct libinput_event_tablet_tool *event);
2160 
2178 double
2180  uint32_t width);
2181 
2199 double
2201  uint32_t height);
2202 
2223 struct libinput_tablet_tool *
2225 
2240 
2254 
2267 uint32_t
2269 
2283 
2297 uint32_t
2299 
2306 uint32_t
2308 
2315 uint64_t
2317 
2331 
2348 uint64_t
2350 
2362 struct libinput_tablet_tool *
2364 
2377 struct libinput_tablet_tool *
2379 
2388 int
2390 
2399 int
2401 
2410 int
2412 
2421 int
2423 
2432 int
2434 
2443 int
2445 
2457 int
2459  uint32_t code);
2460 
2475 int
2477 
2490 uint64_t
2492 
2503 void *
2505 
2514 void
2516  void *user_data);
2517 
2530 struct libinput_event *
2532 
2553 double
2555 
2570 unsigned int
2572 
2589 
2610 double
2612 
2627 unsigned int
2629 
2646 
2665 uint32_t
2667 
2682 
2711 unsigned int
2713 
2734 
2741 uint32_t
2743 
2750 uint64_t
2752 
2772 enum libinput_switch
2774 
2790 
2796 struct libinput_event *
2798 
2805 uint32_t
2807 
2814 uint64_t
2816 
2844  int (*open_restricted)(const char *path, int flags, void *user_data);
2852  void (*close_restricted)(int fd, void *user_data);
2853 };
2854 
2868 struct libinput *
2869 libinput_udev_create_context(const struct libinput_interface *interface,
2870  void *user_data,
2871  struct udev *udev);
2872 
2894 int
2896  const char *seat_id);
2897 
2917 struct libinput *
2918 libinput_path_create_context(const struct libinput_interface *interface,
2919  void *user_data);
2920 
2941 struct libinput_device *
2943  const char *path);
2944 
2963 void
2965 
2974 int
2976 
2994 int
2996 
3008 struct libinput_event *
3010 
3024 
3036 void
3038  void *user_data);
3039 
3049 void *
3051 
3063 int
3065 
3075 void
3077 
3087 struct libinput *
3088 libinput_ref(struct libinput *libinput);
3089 
3120 struct libinput *
3122 
3138 void
3140  enum libinput_log_priority priority);
3141 
3158 
3173 typedef void (*libinput_log_handler)(struct libinput *libinput,
3174  enum libinput_log_priority priority,
3175  const char *format, va_list args)
3177 
3193 void
3194 libinput_log_set_handler(struct libinput *libinput,
3195  libinput_log_handler log_handler);
3196 
3217 struct libinput_seat *
3218 libinput_seat_ref(struct libinput_seat *seat);
3219 
3231 struct libinput_seat *
3232 libinput_seat_unref(struct libinput_seat *seat);
3233 
3245 void
3246 libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data);
3247 
3257 void *
3259 
3268 struct libinput *
3270 
3287 const char *
3289 
3299 const char *
3301 
3317 struct libinput_device *
3318 libinput_device_ref(struct libinput_device *device);
3319 
3331 struct libinput_device *
3332 libinput_device_unref(struct libinput_device *device);
3333 
3345 void
3346 libinput_device_set_user_data(struct libinput_device *device, void *user_data);
3347 
3357 void *
3359 
3368 struct libinput *
3370 
3431 struct libinput_device_group *
3433 
3445 const char *
3447 
3461 const char *
3463 
3472 unsigned int
3474 
3483 unsigned int
3485 
3497 const char *
3499 
3519 struct libinput_seat *
3521 
3547 int
3549  const char *name);
3550 
3570 struct udev_device *
3572 
3583 void
3585  enum libinput_led leds);
3586 
3594 int
3596  enum libinput_device_capability capability);
3597 
3612 int
3614  double *width,
3615  double *height);
3616 
3629 int
3630 libinput_device_pointer_has_button(struct libinput_device *device, uint32_t code);
3631 
3644 int
3646  uint32_t code);
3647 
3660 int
3662 
3675 int
3677 
3690 int
3692 
3705 struct libinput_device_group *
3707 
3721 struct libinput_device_group *
3723 
3735 void
3737  void *user_data);
3738 
3749 void *
3751 
3803 };
3804 
3814 const char *
3816 
3825 };
3826 
3842 int
3844 
3867  enum libinput_config_tap_state enable);
3868 
3887 
3904 
3913 };
3914 
3946 
3966 
3986 
4005 };
4006 
4024  enum libinput_config_drag_state enable);
4025 
4041 
4059 
4068 };
4069 
4094  enum libinput_config_drag_lock_state enable);
4095 
4115 
4138 
4151 int
4153 
4205  const float matrix[6]);
4206 
4223 int
4225  float matrix[6]);
4226 
4246 int
4248  float matrix[6]);
4249 
4283 };
4284 
4299 uint32_t
4301 
4332  uint32_t mode);
4333 
4353 uint32_t
4355 
4369 uint32_t
4371 
4385 int
4387 
4410  double speed);
4411 
4427 double
4429 
4444 double
4446 
4464 
4470 };
4471 
4482 uint32_t
4484 
4498  enum libinput_config_accel_profile mode);
4499 
4511 
4523 
4553 int
4555 
4572  int enable);
4586 int
4588 
4602 int
4604 
4618 int
4620 
4646  int left_handed);
4647 
4661 int
4663 
4677 int
4679 
4702 };
4703 
4719 uint32_t
4721 
4744  enum libinput_config_click_method method);
4762 
4780 
4795 };
4796 
4816 int
4818  struct libinput_device *device);
4819 
4844  struct libinput_device *device,
4846 
4871  struct libinput_device *device);
4872 
4898  struct libinput_device *device);
4899 
4927 };
4928 
4946 uint32_t
4948 
4975  enum libinput_config_scroll_method method);
4976 
4995 
5014 
5052  uint32_t button);
5053 
5078 uint32_t
5080 
5101 uint32_t
5103 
5113 };
5114 
5130 int
5132 
5156  enum libinput_config_dwt_state enable);
5157 
5175 
5193 
5206 int
5208 
5241  unsigned int degrees_cw);
5242 
5257 unsigned int
5259 
5274 unsigned int
5276 
5277 #ifdef __cplusplus
5278 }
5279 #endif
5280 #endif /* LIBINPUT_H */
Definition: libinput.h:789
libinput_config_dwt_state
Possible states for the disable-while-typing feature.
Definition: libinput.h:5110
const char * libinput_seat_get_physical_name(struct libinput_seat *seat)
Return the physical name of the seat.
struct libinput_event * libinput_event_tablet_pad_get_base_event(struct libinput_event_tablet_pad *event)
Middle mouse button emulation is to be disabled, or is currently disabled.
Definition: libinput.h:4789
enum libinput_tablet_pad_ring_axis_source libinput_event_tablet_pad_get_ring_source(struct libinput_event_tablet_pad *event)
Returns the source of the interaction with the ring.
A base handle for accessing libinput devices.
Definition: libinput.h:47
Never send scroll events instead of pointer motion events.
Definition: libinput.h:4911
Definition: libinput.h:611
struct libinput_event_tablet_pad * libinput_event_get_tablet_pad_event(struct libinput_event *event)
Return the tablet pad event that is this input event.
uint32_t libinput_device_config_accel_get_profiles(struct libinput_device *device)
Returns a bitmask of the configurable acceleration modes available on this device.
Signals that a tool has come in or out of proximity of a device with the LIBINPUT_DEVICE_CAP_TABLET_T...
Definition: libinput.h:725
uint64_t libinput_event_switch_get_time_usec(struct libinput_event_switch *event)
int libinput_event_tablet_tool_pressure_has_changed(struct libinput_event_tablet_tool *event)
Check if the pressure axis was updated in this event.
uint32_t libinput_event_tablet_tool_get_time(struct libinput_event_tablet_tool *event)
An airbrush-like tool.
Definition: libinput.h:327
unsigned int libinput_device_get_id_product(struct libinput_device *device)
Get the product ID for this device.
Definition: libinput.h:186
libinput_config_accel_profile
Definition: libinput.h:4450
uint32_t libinput_event_switch_get_time(struct libinput_event_switch *event)
double libinput_event_tablet_tool_get_rotation(struct libinput_event_tablet_tool *event)
Returns the current z rotation of the tool in degrees, clockwise from the tool&#39;s logical neutral posi...
uint32_t libinput_event_pointer_get_button(struct libinput_event_pointer *event)
Return the button that triggered this event.
double libinput_event_tablet_pad_get_strip_position(struct libinput_event_tablet_pad *event)
Returns the current position of the strip, normalized to the range [0, 1], with 0 being the top/left-...
Definition: libinput.h:675
enum libinput_config_status libinput_device_config_rotation_set_angle(struct libinput_device *device, unsigned int degrees_cw)
Set the rotation of a device in degrees clockwise off the logical neutral position.
int libinput_dispatch(struct libinput *libinput)
Main event dispatchment function.
struct libinput * libinput_ref(struct libinput *libinput)
Add a reference to the context.
struct libinput_tablet_pad_mode_group * libinput_tablet_pad_mode_group_unref(struct libinput_tablet_pad_mode_group *group)
Decrease the refcount of the mode group.
double libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event)
Return the angle delta in degrees between the last and the current LIBINPUT_EVENT_GESTURE_PINCH_UPDAT...
double libinput_event_tablet_tool_get_pressure(struct libinput_event_tablet_tool *event)
Returns the current pressure being applied on the tool in use, normalized to the range [0...
libinput does not open file descriptors to devices directly, instead open_restricted() and close_rest...
Definition: libinput.h:2832
enum libinput_config_status libinput_device_config_accel_set_profile(struct libinput_device *device, enum libinput_config_accel_profile mode)
Set the pointer acceleration profile of this pointer device to the given mode.
Definition: libinput.h:188
Definition: libinput.h:172
The number of fingers decides which button press to generate.
Definition: libinput.h:4701
Definition: libinput.h:671
Drag is to be enabled, or is currently enabled.
Definition: libinput.h:4004
Definition: libinput.h:223
libinput_switch_state
The state of a switch.
Definition: libinput.h:610
double libinput_event_tablet_tool_get_distance(struct libinput_event_tablet_tool *event)
Returns the current distance from the tablet&#39;s sensor, normalized to the range [0, 1].
int libinput_device_config_rotation_is_available(struct libinput_device *device)
Check whether a device can have a custom rotation applied.
libinput_led
Mask reflecting LEDs on a device.
Definition: libinput.h:209
libinput_pointer_axis_source
The source for a libinput_pointer_axis event.
Definition: libinput.h:249
Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events...
Definition: libinput.h:129
struct libinput_event * libinput_event_gesture_get_base_event(struct libinput_event_gesture *event)
unsigned int libinput_device_config_rotation_get_default_angle(struct libinput_device *device)
Get the default rotation of a device in degrees clockwise off the logical neutral position...
Definition: libinput.h:673
double libinput_event_tablet_pad_get_ring_position(struct libinput_event_tablet_pad *event)
Returns the current position of the ring, in degrees counterclockwise from the northern-most point of...
double libinput_event_tablet_tool_get_y(struct libinput_event_tablet_tool *event)
Returns the Y coordinate of the tablet tool, in mm from the top left corner of the tablet in its curr...
int32_t libinput_event_touch_get_slot(struct libinput_event_touch *event)
Get the slot of this touch event.
enum libinput_config_status libinput_device_config_tap_set_button_map(struct libinput_device *device, enum libinput_config_tap_button_map map)
Set the finger number to button number mapping for tap-to-click.
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:240
libinput_tablet_tool_type
Available tool types for a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
Definition: libinput.h:321
Signals the end of a set of touchpoints at one device sample time.
Definition: libinput.h:681
enum libinput_tablet_tool_tip_state libinput_event_tablet_tool_get_tip_state(struct libinput_event_tablet_tool *event)
Returns the new tip state of a tool from a tip event.
int libinput_event_tablet_tool_get_wheel_delta_discrete(struct libinput_event_tablet_tool *event)
Return the delta for the wheel in discrete steps (e.g.
uint64_t libinput_event_keyboard_get_time_usec(struct libinput_event_keyboard *event)
Config applied successfully.
Definition: libinput.h:3799
int libinput_tablet_tool_has_pressure(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports pressure.
A switch event representing a changed state in a switch.
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.
int libinput_event_tablet_tool_rotation_has_changed(struct libinput_event_tablet_tool *event)
Check if the z-rotation axis was updated in this event.
Definition: libinput.h:212
Use software-button areas (see Clickfinger behavior) to generate button events.
Definition: libinput.h:4697
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...
uint32_t libinput_event_tablet_pad_get_button_number(struct libinput_event_tablet_pad *event)
Return the button number that triggered this event, starting at 0.
struct libinput_tablet_tool * libinput_tablet_tool_unref(struct libinput_tablet_tool *tool)
Decrement the reference count of the tool by one.
double libinput_event_gesture_get_scale(struct libinput_event_gesture *event)
Return the absolute scale of a pinch gesture, the scale is the division of the current distance betwe...
enum libinput_config_status libinput_device_config_dwt_set_enabled(struct libinput_device *device, enum libinput_config_dwt_state enable)
Enable or disable the disable-while-typing feature.
double libinput_event_tablet_tool_get_dy(struct libinput_event_tablet_tool *event)
Return the delta between the last event and the current event.
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 tilting of a mouse wheel rather than its rotation.
Definition: libinput.h:268
The event is caused by the movement of one or more fingers on a device.
Definition: libinput.h:258
struct libinput_tablet_pad_mode_group * libinput_device_tablet_pad_get_mode_group(struct libinput_device *device, unsigned int index)
The returned mode group is not refcounted and may become invalid after the next call to libinput...
libinput_config_drag_state
A config status to distinguish or set dragging on a device.
Definition: libinput.h:3994
Tapping is to be enabled, or is currently enabled.
Definition: libinput.h:3823
uint64_t libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool)
Return the serial number of a tool.
enum libinput_config_accel_profile libinput_device_config_accel_get_profile(struct libinput_device *device)
Get the current pointer acceleration profile for this pointer device.
int libinput_event_gesture_get_finger_count(struct libinput_event_gesture *event)
Return the number of fingers used for a gesture.
struct libinput_event * libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event)
enum libinput_config_middle_emulation_state libinput_device_config_middle_emulation_get_enabled(struct libinput_device *device)
Check if configurable middle button emulation is enabled on this device.
enum libinput_config_dwt_state libinput_device_config_dwt_get_default_enabled(struct libinput_device *device)
Check if the disable-while typing feature is enabled on this device by default.
Do not send software-emulated button events.
Definition: libinput.h:4692
int libinput_event_tablet_tool_x_has_changed(struct libinput_event_tablet_tool *event)
Check if the x axis was updated in this event.
Definition: libinput.h:666
uint32_t libinput_device_config_scroll_get_default_button(struct libinput_device *device)
Get the default button for the LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN method for this device...
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:3173
struct libinput_tablet_tool * libinput_event_tablet_tool_get_tool(struct libinput_event_tablet_tool *event)
Returns the tool that was in use during this event.
double libinput_event_tablet_tool_get_slider_position(struct libinput_event_tablet_tool *event)
Returns the current position of the slider on the tool, normalized to the range [-1, 1].
Definition: libinput.h:790
enum libinput_config_tap_button_map libinput_device_config_tap_get_button_map(struct libinput_device *device)
Get the finger number to button number mapping for tap-to-click.
double libinput_event_tablet_tool_get_x_transformed(struct libinput_event_tablet_tool *event, uint32_t width)
Return the current absolute x coordinate of the tablet tool event, transformed to screen coordinates...
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.
double libinput_event_tablet_tool_get_y_transformed(struct libinput_event_tablet_tool *event, uint32_t height)
Return the current absolute y coordinate of the tablet tool event, transformed to screen coordinates...
Signals that a device has been added to the context.
Definition: libinput.h:658
void libinput_tablet_pad_mode_group_set_user_data(struct libinput_tablet_pad_mode_group *group, void *user_data)
Set caller-specific data associated with this mode group.
double libinput_event_gesture_get_dy_unaccelerated(struct libinput_event_gesture *event)
Return the relative delta of the unaccelerated motion vector of the current event.
Configuration not available on this device.
Definition: libinput.h:3800
void(* close_restricted)(int fd, void *user_data)
Close the file descriptor.
Definition: libinput.h:2852
libinput_tablet_tool_proximity_state
The state of proximity for a tool on a device.
Definition: libinput.h:346
Definition: libinput.h:668
double libinput_event_pointer_get_dy(struct libinput_event_pointer *event)
Return the delta between the last event and the current event.
enum libinput_config_click_method libinput_device_config_click_get_default_method(struct libinput_device *device)
Get the default button click method for this device.
A flat acceleration profile.
Definition: libinput.h:4463
int libinput_device_tablet_pad_get_num_buttons(struct libinput_device *device)
Return the number of buttons on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
uint32_t libinput_event_gesture_get_time(struct libinput_event_gesture *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:664
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 log priority for the libinput context.
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.
enum libinput_button_state libinput_event_tablet_tool_get_button_state(struct libinput_event_tablet_tool *event)
Return the button state of the event.
Definition: libinput.h:791
Definition: libinput.h:173
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:4256
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:221
const char * libinput_config_status_to_str(enum libinput_config_status status)
Return a string describing the error.
Definition: libinput.h:190
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.
int libinput_event_tablet_tool_wheel_has_changed(struct libinput_event_tablet_tool *event)
Check if the wheel axis was updated in this event.
struct libinput_device * libinput_device_ref(struct libinput_device *device)
Increase the refcount of the input device.
enum libinput_tablet_tool_type libinput_tablet_tool_get_type(struct libinput_tablet_tool *tool)
Return the tool type for a tool object, see Vendor-specific tablet tool types for details...
Send scroll events when two fingers are logically down on the device.
Definition: libinput.h:4916
uint32_t libinput_event_touch_get_time(struct libinput_event_touch *event)
A pointer event representing relative or absolute pointer movement, a button press/release or scroll ...
Definition: libinput.h:120
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...
int libinput_event_tablet_tool_tilt_x_has_changed(struct libinput_event_tablet_tool *event)
Check if the tilt x axis was updated in this event.
Signals that a tool has come in contact with the surface of a device with the LIBINPUT_DEVICE_CAP_TAB...
Definition: libinput.h:748
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...
double libinput_event_gesture_get_dx_unaccelerated(struct libinput_event_gesture *event)
Return the relative delta of the unaccelerated motion vector of the current event.
int libinput_tablet_tool_is_unique(struct libinput_tablet_tool *tool)
Return nonzero if the physical tool can be uniquely identified by libinput, or nonzero otherwise...
int libinput_device_config_calibration_get_matrix(struct libinput_device *device, float matrix[6])
Return the current calibration matrix for this device.
libinput_tablet_tool_tip_state
The tip contact state for a tool on a device.
Definition: libinput.h:360
unsigned int libinput_tablet_pad_mode_group_get_mode(struct libinput_tablet_pad_mode_group *group)
Return the current mode this mode group is in.
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.
double libinput_event_tablet_tool_get_tilt_x(struct libinput_event_tablet_tool *event)
Returns the current tilt along the X axis of the tablet&#39;s current logical orientation, in degrees off the tablet&#39;s z axis.
void * libinput_tablet_pad_mode_group_get_user_data(struct libinput_tablet_pad_mode_group *group)
Get the caller-specific data associated with this mode group, if any.
Definition: libinput.h:670
enum libinput_config_middle_emulation_state libinput_device_config_middle_emulation_get_default_enabled(struct libinput_device *device)
Check if configurable middle button emulation is enabled by default on this device.
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 with the capability LIBINPUT_DEVICE_CAP_POINTER that are not x or y coordinates...
Definition: libinput.h:238
void libinput_device_group_set_user_data(struct libinput_device_group *group, void *user_data)
Set caller-specific data associated with this device group.
int libinput_device_config_calibration_has_matrix(struct libinput_device *device)
Check if the device can be calibrated via a calibration matrix.
int libinput_device_config_dwt_is_available(struct libinput_device *device)
Check if this device supports configurable disable-while-typing feature.
libinput_config_tap_state
Definition: libinput.h:3820
A mouse tool with a lens.
Definition: libinput.h:329
Definition: libinput.h:184
void libinput_set_user_data(struct libinput *libinput, void *user_data)
Set caller-specific data associated with this context.
Eraser.
Definition: libinput.h:323
An object representing a tool being used by a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capabil...
Definition: libinput.h:75
int libinput_device_tablet_pad_get_num_rings(struct libinput_device *device)
Return the number of rings a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability provides...
A generic pen.
Definition: libinput.h:322
Middle mouse button emulation is to be enabled, or is currently enabled.
Definition: libinput.h:4794
enum libinput_button_state libinput_event_tablet_pad_get_button_state(struct libinput_event_tablet_pad *event)
Return the button state of the event.
A mode on a tablet pad is a virtual grouping of functionality, usually based on some visual feedback ...
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:200
libinput_device_capability
Capabilities on a device.
Definition: libinput.h:183
The event is caused by the rotation of a wheel.
Definition: libinput.h:253
Definition: libinput.h:674
libinput_config_status
Status codes returned when applying configuration settings.
Definition: libinput.h:3798
int libinput_event_tablet_tool_distance_has_changed(struct libinput_event_tablet_tool *event)
Check if the distance axis was updated in this event.
enum libinput_config_tap_button_map libinput_device_config_tap_get_default_button_map(struct libinput_device *device)
Get the default finger number to button number mapping for tap-to-click.
int libinput_event_tablet_tool_tilt_y_has_changed(struct libinput_event_tablet_tool *event)
Check if the tilt y axis was updated in this event.
struct libinput_tablet_pad_mode_group * libinput_tablet_pad_mode_group_ref(struct libinput_tablet_pad_mode_group *group)
Increase the refcount of the mode group.
Definition: libinput.h:201
libinput_tablet_pad_ring_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_RING event.
Definition: libinput.h:277
Definition: libinput.h:787
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...
struct libinput_event * libinput_event_tablet_tool_get_base_event(struct libinput_event_tablet_tool *event)
int libinput_device_config_middle_emulation_is_available(struct libinput_device *device)
Check if middle mouse button emulation configuration is available on this device. ...
enum libinput_config_scroll_method libinput_device_config_scroll_get_method(struct libinput_device *device)
Get the scroll method for this device.
libinput_config_tap_button_map
Definition: libinput.h:3908
unsigned int libinput_event_tablet_pad_get_strip_number(struct libinput_event_tablet_pad *event)
Returns the number of the strip that has changed state, with 0 being the first strip.
double libinput_event_tablet_tool_get_wheel_delta(struct libinput_event_tablet_tool *event)
Return the delta for the wheel in degrees.
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_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.
int libinput_device_tablet_pad_get_num_mode_groups(struct libinput_device *device)
Most devices only provide a single mode group, however devices such as the Wacom Cintiq 22HD provide ...
Definition: libinput.h:174
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.
int libinput_event_gesture_get_cancelled(struct libinput_event_gesture *event)
Return if the gesture ended normally, or if it was cancelled.
Definition: libinput.h:793
void libinput_device_led_update(struct libinput_device *device, enum libinput_led leds)
Update the LEDs on the device, if any.
enum libinput_config_status libinput_device_config_click_set_method(struct libinput_device *device, enum libinput_config_click_method method)
Set the button click method for this device.
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().
Tablet tool event representing an axis update, button press, or tool update.
Definition: libinput.h:141
uint64_t libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *event)
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...
double libinput_event_gesture_get_dy(struct libinput_event_gesture *event)
Return the delta between the last event and the current event.
unsigned int libinput_event_tablet_pad_get_ring_number(struct libinput_event_tablet_pad *event)
Returns the number of the ring that has changed state, with 0 being the first ring.
void libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool, void *user_data)
Set the user data associated with a tool object, if any.
struct libinput * libinput_event_get_context(struct libinput_event *event)
Get the libinput context from the event.
Drag lock is to be enabled, or is currently disabled.
Definition: libinput.h:4067
1/2/3 finger tap maps to left/middle/right
Definition: libinput.h:3912
The laptop lid was closed when the switch state is LIBINPUT_SWITCH_STATE_ON, or was opened when it is...
Definition: libinput.h:626
enum libinput_config_drag_lock_state libinput_device_config_tap_get_default_drag_lock_enabled(struct libinput_device *device)
Check if drag-lock during tapping is enabled by default on this device.
enum libinput_config_click_method libinput_device_config_click_get_method(struct libinput_device *device)
Get the button click method for this device.
Definition: libinput.h:187
Definition: libinput.h:676
struct libinput_event_gesture * libinput_event_get_gesture_event(struct libinput_event *event)
Return the gesture event that is this input event.
The base event type.
Definition: libinput.h:92
#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args)
Definition: libinput.h:36
libinput_config_click_method
The click method defines when to generate software-emulated buttons, usually on a device that does no...
Definition: libinput.h:4687
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.
enum libinput_tablet_tool_proximity_state libinput_event_tablet_tool_get_proximity_state(struct libinput_event_tablet_tool *event)
Returns the new proximity state of a tool from a proximity event.
enum libinput_config_drag_state libinput_device_config_tap_get_drag_enabled(struct libinput_device *device)
Return whether tap-and-drag is enabled or disabled on this device.
A base handle for accessing libinput device groups.
Definition: libinput.h:56
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...
A paintbrush-like tool.
Definition: libinput.h:324
A button pressed on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:773
The event is caused by the movement of one or more fingers on the ring.
Definition: libinput.h:283
unsigned int libinput_event_tablet_pad_get_mode(struct libinput_event_tablet_pad *event)
Returns the mode the button, ring, or strip that triggered this event is in, at the time of the event...
struct libinput_seat * libinput_seat_unref(struct libinput_seat *seat)
Decrease the refcount of the seat.
Send events from this device normally.
Definition: libinput.h:4262
int libinput_device_config_tap_get_finger_count(struct libinput_device *device)
Check if the device supports tap-to-click and how many fingers can be used for tapping.
Definition: libinput.h:5111
struct libinput * libinput_device_get_context(struct libinput_device *device)
Get the libinput context from the device.
Invalid parameter range.
Definition: libinput.h:3802
unsigned int libinput_device_get_id_vendor(struct libinput_device *device)
Get the vendor ID for this device.
int libinput_tablet_pad_mode_group_has_ring(struct libinput_tablet_pad_mode_group *group, unsigned int ring)
Devices without mode switching capabilities return true for every ring.
int libinput_tablet_pad_mode_group_button_is_toggle(struct libinput_tablet_pad_mode_group *group, unsigned int button)
The toggle button in a mode group is the button assigned to cycle to or directly assign a new mode wh...
struct libinput_event_switch * libinput_event_get_switch_event(struct libinput_event *event)
Return the switch event that is this input event.
Placeholder for devices that don&#39;t have a configurable pointer acceleration profile.
Definition: libinput.h:4455
enum libinput_event_type libinput_event_get_type(struct libinput_event *event)
Get the type of the event.
struct libinput_device_group * libinput_device_group_ref(struct libinput_device_group *group)
Increase the refcount of the device group.
uint32_t libinput_event_tablet_tool_get_seat_button_count(struct libinput_event_tablet_tool *event)
For the button of a LIBINPUT_EVENT_TABLET_TOOL_BUTTON event, return the total number of buttons press...
A handle for accessing libinput.
A status change on a tablet ring with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:778
double libinput_event_gesture_get_dx(struct libinput_event_gesture *event)
Return the delta between the last event and the current event.
enum libinput_config_dwt_state libinput_device_config_dwt_get_enabled(struct libinput_device *device)
Check if the disable-while typing feature is currently enabled on this device.
libinput_switch
The type of a switch.
Definition: libinput.h:620
struct libinput_device * libinput_event_get_device(struct libinput_event *event)
Return the device associated with this event.
double libinput_event_tablet_tool_get_dx(struct libinput_event_tablet_tool *event)
Return the delta between the last event and the current event.
void * libinput_get_user_data(struct libinput *libinput)
Get the caller-specific data associated with this context, if any.
int libinput_tablet_pad_mode_group_has_button(struct libinput_tablet_pad_mode_group *group, unsigned int button)
Devices without mode switching capabilities return true for every button.
Drag lock is to be disabled, or is currently disabled.
Definition: libinput.h:4065
Definition: libinput.h:185
double libinput_event_tablet_tool_get_tilt_y(struct libinput_event_tablet_tool *event)
Returns the current tilt along the Y axis of the tablet&#39;s current logical orientation, in degrees off the tablet&#39;s z axis.
int libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool, uint32_t code)
Check if a tablet tool has a button with the passed-in code (see linux/input.h).
int libinput_tablet_tool_has_wheel(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a relative wheel.
One or more axes have changed state on a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capability...
Definition: libinput.h:700
void libinput_event_destroy(struct libinput_event *event)
Destroy the event, freeing all associated resources.
Definition: libinput.h:669
enum libinput_config_status libinput_device_config_middle_emulation_set_enabled(struct libinput_device *device, enum libinput_config_middle_emulation_state enable)
Enable or disable middle button emulation on this device.
Tablet pad event representing a button press, or ring/strip update on the tablet pad itself...
Definition: libinput.h:153
Physical drawing tool, e.g.
Definition: libinput.h:325
void libinput_suspend(struct libinput *libinput)
Suspend monitoring for new devices and close existing devices.
struct libinput_event * libinput_event_switch_get_base_event(struct libinput_event_switch *event)
enum libinput_config_scroll_method libinput_device_config_scroll_get_default_method(struct libinput_device *device)
Get the default scroll method for this device.
Drag is to be disabled, or is currently disabled.
Definition: libinput.h:3999
int libinput_device_config_scroll_has_natural_scroll(struct libinput_device *device)
Return non-zero if the device supports "natural scrolling".
Definition: libinput.h:210
enum libinput_config_accel_profile libinput_device_config_accel_get_default_profile(struct libinput_device *device)
Return the default pointer acceleration profile for this pointer device.
enum libinput_config_status libinput_device_config_tap_set_drag_lock_enabled(struct libinput_device *device, enum libinput_config_drag_lock_state enable)
Enable or disable drag-lock during tapping on this device.
struct libinput_event_tablet_tool * libinput_event_get_tablet_tool_event(struct libinput_event *event)
Return the tablet tool event that is this input event.
uint64_t libinput_event_pointer_get_time_usec(struct libinput_event_pointer *event)
int libinput_device_tablet_pad_get_num_strips(struct libinput_device *device)
Return the number of strips a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability provides...
uint64_t libinput_event_gesture_get_time_usec(struct libinput_event_gesture *event)
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:4926
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:4906
Send scroll events when a finger moves along the bottom or right edge of a device.
Definition: libinput.h:4921
Tapping is to be disabled, or is currently disabled.
Definition: libinput.h:3821
Definition: libinput.h:222
int libinput_get_fd(struct libinput *libinput)
libinput keeps a single file descriptor for all events.
enum libinput_config_drag_lock_state libinput_device_config_tap_get_drag_lock_enabled(struct libinput_device *device)
Check if drag-lock during tapping is enabled on this device.
struct libinput_tablet_tool * libinput_tablet_tool_ref(struct libinput_tablet_tool *tool)
Increment the reference count of the tool by one.
unsigned int libinput_device_config_rotation_get_angle(struct libinput_device *device)
Get the current rotation of a device in degrees clockwise off the logical neutral position...
int libinput_resume(struct libinput *libinput)
Resume a suspended libinput context.
int libinput_tablet_tool_has_slider(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a slider axis.
Definition: libinput.h:788
The base handle for accessing libinput seats.
Definition: libinput.h:66
Definition: libinput.h:189
uint64_t libinput_event_tablet_pad_get_time_usec(struct libinput_event_tablet_pad *event)
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:642
uint32_t libinput_device_config_click_get_methods(struct libinput_device *device)
Check which button click methods a device supports.
struct libinput_event * libinput_get_event(struct libinput *libinput)
Retrieve the next event from libinput&#39;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:262
Definition: libinput.h:612
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...
int libinput_event_tablet_tool_slider_has_changed(struct libinput_event_tablet_tool *event)
Check if the slider axis was updated in this event.
uint32_t libinput_event_keyboard_get_time(struct libinput_event_keyboard *event)
Do not send events through this device.
Definition: libinput.h:4276
double libinput_event_tablet_tool_get_x(struct libinput_event_tablet_tool *event)
Returns the X coordinate of the tablet tool, in mm from the top left corner of the tablet in its curr...
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:348
Definition: libinput.h:211
int libinput_device_config_accel_is_available(struct libinput_device *device)
Check if a device uses libinput-internal pointer-acceleration.
int libinput_tablet_tool_has_rotation(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports z-rotation.
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.
libinput_config_middle_emulation_state
Definition: libinput.h:4784
struct libinput_seat * libinput_device_get_seat(struct libinput_device *device)
Get the seat associated with this input device, see Seats for details.
uint32_t libinput_event_tablet_tool_get_button(struct libinput_event_tablet_tool *event)
Return the button that triggered this event.
enum libinput_button_state libinput_event_pointer_get_button_state(struct libinput_event_pointer *event)
Return the button state that triggered this event.
The event is caused by the movement of one or more fingers on the strip.
Definition: libinput.h:298
int libinput_tablet_pad_mode_group_has_strip(struct libinput_tablet_pad_mode_group *group, unsigned int strip)
Devices without mode switching capabilities return true for every strip.
Definition: libinput.h:239
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.
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.
Definition: libinput.h:786
int libinput_tablet_tool_has_distance(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports distance.
void(*) voi libinput_log_set_handler)(struct libinput *libinput, libinput_log_handler log_handler)
Set the context&#39;s log handler.
Definition: libinput.h:3194
enum libinput_log_priority libinput_log_get_priority(const struct libinput *libinput)
Get the context&#39;s log priority.
libinput_tablet_pad_strip_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_STRIP event.
Definition: libinput.h:292
Signals that a tool has changed a logical button state on a device with the LIBINPUT_DEVICE_CAP_TABLE...
Definition: libinput.h:764
const char * libinput_device_get_sysname(struct libinput_device *device)
Get the system name of the device.
struct libinput_tablet_pad_mode_group * libinput_event_tablet_pad_get_mode_group(struct libinput_event_tablet_pad *event)
Returns the mode group that the button, ring, or strip that triggered this event is considered in...
struct libinput_device * libinput_device_unref(struct libinput_device *device)
Decrease the refcount of the input device.
libinput_config_drag_lock_state
Definition: libinput.h:4063
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.
enum libinput_config_status libinput_device_config_tap_set_drag_enabled(struct libinput_device *device, enum libinput_config_drag_state enable)
Enable or disable tap-and-drag on this device.
A status change on a strip on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:784
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.
If an external pointer device is plugged in, do not send events from this device. ...
Definition: libinput.h:4282
enum libinput_switch_state libinput_event_switch_get_switch_state(struct libinput_event_switch *event)
Return the switch state that triggered this event.
void * libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool)
Return the user data associated with a tool object.
1/2/3 finger tap maps to left/right/middle
Definition: libinput.h:3910
libinput_log_priority
Log priority for internal logging messages.
Definition: libinput.h:171
A mouse bound to the tablet.
Definition: libinput.h:328
int libinput_device_keyboard_has_key(struct libinput_device *device, uint32_t code)
Check if a LIBINPUT_DEVICE_CAP_KEYBOARD device has a key with the given code (see linux/input...
enum libinput_config_drag_state libinput_device_config_tap_get_default_drag_enabled(struct libinput_device *device)
Return whether tap-and-drag is enabled or disabled by default on this device.
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...
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:2844
enum libinput_config_tap_state libinput_device_config_tap_get_default_enabled(struct libinput_device *device)
Return the default setting for whether tap-to-click is enabled on this device.
An event notifying the caller of a device being added or removed.
Definition: libinput.h:104
struct libinput_device_group * libinput_device_group_unref(struct libinput_device_group *group)
Decrease the refcount of the device group.
uint32_t libinput_device_config_scroll_get_methods(struct libinput_device *device)
Check which scroll methods a device supports.
unsigned int libinput_tablet_pad_mode_group_get_num_modes(struct libinput_tablet_pad_mode_group *group)
Query the mode group for the number of available modes.
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.
Definition: libinput.h:361
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.
enum libinput_switch libinput_event_switch_get_switch(struct libinput_event_switch *event)
Return the switch that triggered this event.
libinput_key_state
Logical state of a key.
Definition: libinput.h:199
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:648
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
Set caller-specific data associated with this input device.
int libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports tilt.
Definition: libinput.h:362
uint64_t libinput_event_touch_get_time_usec(struct libinput_event_touch *event)
Definition: libinput.h:278
uint32_t libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event)
int libinput_device_pointer_has_button(struct libinput_device *device, uint32_t code)
Check if a LIBINPUT_DEVICE_CAP_POINTER device has a button with the given code (see linux/input...
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:112
An adaptive acceleration profile.
Definition: libinput.h:4469
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)
unsigned int libinput_tablet_pad_mode_group_get_index(struct libinput_tablet_pad_mode_group *group)
The returned number is the same index as passed to libinput_device_tablet_pad_get_mode_group().
enum libinput_tablet_pad_strip_axis_source libinput_event_tablet_pad_get_strip_source(struct libinput_event_tablet_pad *event)
Returns the source of the interaction with the strip.
struct libinput_event_pointer * libinput_event_get_pointer_event(struct libinput_event *event)
Return the pointer event that is this input event.
int libinput_event_tablet_tool_y_has_changed(struct libinput_event_tablet_tool *event)
Check if the y axis was updated in this event.
struct libinput_device_group * libinput_device_get_device_group(struct libinput_device *device)
Get the device group this device is assigned to.
uint32_t libinput_device_config_send_events_get_modes(struct libinput_device *device)
Return the possible send-event modes for this device.
void * libinput_device_group_get_user_data(struct libinput_device_group *group)
Get the caller-specific data associated with this input device group, if any.
Definition: libinput.h:5112
struct libinput_event_touch * libinput_event_get_touch_event(struct libinput_event *event)
Return the touch event that is this input event.
uint64_t libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool)
Return the tool ID for a tool object.