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 <libudev.h>
33 #include <stdarg.h>
34 #include <stdint.h>
35 #include <stdlib.h>
36 
37 #define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args) \
38  __attribute__ ((format (printf, _format, _args)))
39 #define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
40 
48 struct libinput;
49 
58 
68 
77 
97 
109 
117 
125 
134 
146 
160 
174 
188 
198 };
199 
214 };
215 
225 };
226 
237  LIBINPUT_LED_KANA = (1 << 4)
238 };
239 
249 };
250 
266 };
267 
304 };
305 
321 };
322 
338 };
339 
374 };
375 
395 };
396 
411 };
412 
441 
458 int
460 
485  unsigned int index);
486 
499 unsigned int
501 
519 unsigned int
521  struct libinput_tablet_pad_mode_group *group);
522 
542 unsigned int
544 
557 int
559  unsigned int button);
560 
573 int
575  unsigned int dial);
576 
589 int
591  unsigned int ring);
592 
605 int
607  unsigned int strip);
608 
627 int
629  struct libinput_tablet_pad_mode_group *group,
630  unsigned int button);
631 
645 
659 
673 void
675  struct libinput_tablet_pad_mode_group *group,
676  void *user_data);
677 
689 void *
691  struct libinput_tablet_pad_mode_group *group);
692 
707 };
708 
723 
739 
753 };
754 
763 struct libinput_event_switch;
764 
777 
787 
793 
795 
829 
843 
857 
872 
882 
973 
997 
1005 
1018 
1026 
1038 
1043 };
1044 
1061 void
1062 libinput_event_destroy(struct libinput_event *event);
1063 
1073 
1082 struct libinput *
1084 
1098 struct libinput_device *
1100 
1111 struct libinput_event_pointer *
1113 
1124 struct libinput_event_keyboard *
1126 
1137 struct libinput_event_touch *
1139 
1157 struct libinput_event_gesture *
1159 
1174 
1187 
1200 struct libinput_event_switch *
1202 
1216 
1222 struct libinput_event *
1224 
1240 uint32_t
1242 
1251 uint64_t
1253 
1259 uint32_t
1261 
1267 enum libinput_key_state
1269 
1275 struct libinput_event *
1277 
1290 uint32_t
1292 
1308 uint32_t
1310 
1319 uint64_t
1321 
1340 double
1342 
1361 double
1363 
1385 double
1387 
1409 double
1411 
1427 double
1429 
1445 double
1447 
1465 double
1467  uint32_t width);
1468 
1486 double
1488  uint32_t height);
1489 
1502 uint32_t
1504 
1519 
1533 uint32_t
1535 
1558 int
1560  enum libinput_pointer_axis axis);
1561 
1586 double
1588  enum libinput_pointer_axis axis);
1589 
1638 
1664 double
1666  enum libinput_pointer_axis axis);
1667 
1716 double
1718  enum libinput_pointer_axis axis);
1719 
1756 double
1758  enum libinput_pointer_axis axis);
1759 
1765 struct libinput_event *
1767 
1782 uint32_t
1784 
1793 uint64_t
1795 
1815 int32_t
1817 
1837 int32_t
1839 
1857 double
1859 
1877 double
1879 
1897 double
1899  uint32_t width);
1900 
1918 double
1920  uint32_t height);
1921 
1927 struct libinput_event *
1929 
1952 uint32_t
1954 
1963 uint64_t
1965 
1971 struct libinput_event *
1973 
1989 int
1991 
2008 int
2010 
2026 double
2028 
2044 double
2046 
2065 double
2067 
2086 double
2088 
2115 double
2117 
2139 double
2141 
2166 struct libinput_event *
2168 
2188 int
2190 
2210 int
2212 
2232 int
2234  struct libinput_event_tablet_tool *event);
2235 
2257 int
2259  struct libinput_event_tablet_tool *event);
2260 
2280 int
2282 
2302 int
2323 int
2325  struct libinput_event_tablet_tool *event);
2345 int
2347 
2365 int
2367  struct libinput_event_tablet_tool *event);
2368 
2386 int
2388  struct libinput_event_tablet_tool *event);
2389 
2409 int
2411 
2432 double
2434 
2455 double
2457 
2474 double
2476 
2493 double
2495 
2509 double
2511 
2525 double
2527 
2545 double
2547 
2565 double
2567 
2587 double
2589 
2605 double
2607  struct libinput_event_tablet_tool *event);
2608 
2624 double
2626 
2642 double
2644 
2655 double
2657 
2670 int
2672  struct libinput_event_tablet_tool *event);
2673 
2693 double
2695  uint32_t width);
2696 
2716 double
2718  uint32_t height);
2719 
2742 struct libinput_tablet_tool *
2744 
2773  struct libinput_event_tablet_tool *event);
2774 
2790 
2805 uint32_t
2807 
2823 
2839 uint32_t
2841  struct libinput_event_tablet_tool *event);
2842 
2854 uint32_t
2856 
2868 uint64_t
2870 
2897 
2918 uint64_t
2920 
2944 const char *
2946 
2960 struct libinput_tablet_tool *
2962 
2977 struct libinput_tablet_tool *
2979 
2990 int
2992 
3003 int
3005 
3016 int
3018 
3029 int
3031 
3042 int
3044 
3056 int
3058 
3069 int
3071 
3085 int
3086 libinput_tablet_tool_has_button(struct libinput_tablet_tool *tool, uint32_t code);
3087 
3104 int
3106 
3143 uint64_t
3145 
3158 void *
3160 
3171 void
3172 libinput_tablet_tool_set_user_data(struct libinput_tablet_tool *tool, void *user_data);
3173 
3190 struct libinput_event *
3192 
3215 double
3217 
3234 unsigned int
3236 
3255 
3278 double
3280 
3297 unsigned int
3299 
3318 
3339 uint32_t
3341 
3358 
3377 uint32_t
3379 
3394 enum libinput_key_state
3396 
3413 double
3415 
3432 unsigned int
3434 
3467 unsigned int
3469 
3495 
3507 uint32_t
3509 
3521 uint64_t
3523 
3545 enum libinput_switch
3547 
3565 
3573 struct libinput_event *
3575 
3587 uint32_t
3589 
3601 uint64_t
3603 
3631  int (*open_restricted)(const char *path, int flags, void *user_data);
3639  void (*close_restricted)(int fd, void *user_data);
3640 };
3641 
3655 struct libinput *
3656 libinput_udev_create_context(const struct libinput_interface *interface,
3657  void *user_data,
3658  struct udev *udev);
3659 
3681 int
3682 libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id);
3683 
3703 struct libinput *
3704 libinput_path_create_context(const struct libinput_interface *interface,
3705  void *user_data);
3706 
3727 struct libinput_device *
3728 libinput_path_add_device(struct libinput *libinput, const char *path);
3729 
3748 void
3750 
3776 void
3777 libinput_plugin_system_append_path(struct libinput *libinput, const char *path);
3778 
3806 void
3808 
3811 };
3812 
3839 int
3841  enum libinput_plugin_system_flags flags);
3842 
3851 int
3853 
3871 int
3873 
3885 struct libinput_event *
3887 
3901 
3913 void
3914 libinput_set_user_data(struct libinput *libinput, void *user_data);
3915 
3926 void *
3928 
3940 int
3942 
3952 void
3954 
3964 struct libinput *
3965 libinput_ref(struct libinput *libinput);
3966 
3998 struct libinput *
4000 
4016 void
4018  enum libinput_log_priority priority);
4019 
4036 
4051 typedef void (*libinput_log_handler)(struct libinput *libinput,
4052  enum libinput_log_priority priority,
4053  const char *format,
4054  va_list args) LIBINPUT_ATTRIBUTE_PRINTF(3, 0);
4055 
4071 void
4072 libinput_log_set_handler(struct libinput *libinput, libinput_log_handler log_handler);
4073 
4095 struct libinput_seat *
4096 libinput_seat_ref(struct libinput_seat *seat);
4097 
4109 struct libinput_seat *
4110 libinput_seat_unref(struct libinput_seat *seat);
4111 
4123 void
4124 libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data);
4125 
4135 void *
4137 
4146 struct libinput *
4148 
4165 const char *
4167 
4177 const char *
4179 
4195 struct libinput_device *
4196 libinput_device_ref(struct libinput_device *device);
4197 
4209 struct libinput_device *
4210 libinput_device_unref(struct libinput_device *device);
4211 
4223 void
4224 libinput_device_set_user_data(struct libinput_device *device, void *user_data);
4225 
4235 void *
4237 
4246 struct libinput *
4248 
4309 struct libinput_device_group *
4311 
4323 const char *
4325 
4339 const char *
4341 
4352 unsigned int
4354 
4363 unsigned int
4365 
4374 unsigned int
4376 
4396 const char *
4398 
4419 struct libinput_seat *
4421 
4447 int
4448 libinput_device_set_seat_logical_name(struct libinput_device *device, const char *name);
4449 
4469 struct udev_device *
4471 
4482 void
4483 libinput_device_led_update(struct libinput_device *device, enum libinput_led leds);
4484 
4492 int
4494  enum libinput_device_capability capability);
4495 
4510 int
4511 libinput_device_get_size(struct libinput_device *device, double *width, double *height);
4512 
4525 int
4526 libinput_device_pointer_has_button(struct libinput_device *device, uint32_t code);
4527 
4540 int
4541 libinput_device_keyboard_has_key(struct libinput_device *device, uint32_t code);
4542 
4556 int
4558 
4573 int
4575  enum libinput_switch sw);
4576 
4591 int
4593 
4608 int
4610 
4625 int
4627 
4642 int
4644 
4659 int
4660 libinput_device_tablet_pad_has_key(struct libinput_device *device, uint32_t code);
4661 
4674 struct libinput_device_group *
4676 
4690 struct libinput_device_group *
4692 
4704 void
4706  void *user_data);
4707 
4718 void *
4720 
4777 };
4778 
4788 const char *
4790 
4799 };
4800 
4816 int
4818 
4841  enum libinput_config_tap_state enable);
4842 
4861 
4878 
4889 };
4890 
4899 };
4900 
4934 
4956 
4978 
4999 };
5000 
5020  enum libinput_config_drag_state enable);
5021 
5039 
5059 
5074 };
5075 
5103  struct libinput_device *device,
5104  enum libinput_config_drag_lock_state enable);
5105 
5128 
5153  struct libinput_device *device);
5154 
5178 };
5179 
5193 int
5195 
5216  enum libinput_config_3fg_drag_state enable);
5217 
5236 
5255 
5268 int
5270 
5322  const float matrix[6]);
5323 
5340 int
5342  float matrix[6]);
5343 
5364 int
5366  float matrix[6]);
5367 
5385  double x1;
5386  double y1;
5387  double x2;
5388  double y2;
5389 };
5390 
5403 int
5405 
5461  struct libinput_device *device,
5462  const struct libinput_config_area_rectangle *rect);
5463 
5484 
5505 
5539 };
5540 
5555 uint32_t
5557 
5588  uint32_t mode);
5589 
5609 uint32_t
5611 
5625 uint32_t
5627 
5641 int
5643 
5665 libinput_device_config_accel_set_speed(struct libinput_device *device, double speed);
5666 
5688 double
5690 
5705 double
5707 
5727 
5733 
5742 };
5743 
5769 struct libinput_config_accel;
5770 
5792 struct libinput_config_accel *
5794 
5809 void
5810 libinput_config_accel_destroy(struct libinput_config_accel *accel_config);
5811 
5832  struct libinput_config_accel *accel_config);
5833 
5871 };
5872 
5904 libinput_config_accel_set_points(struct libinput_config_accel *accel_config,
5905  enum libinput_config_accel_type accel_type,
5906  double step,
5907  size_t npoints,
5908  const double *points);
5909 
5922 uint32_t
5924 
5940  enum libinput_config_accel_profile profile);
5941 
5955 
5969 
5999 int
6001 
6018  int enable);
6032 int
6034  struct libinput_device *device);
6035 
6049 int
6051  struct libinput_device *device);
6052 
6066 int
6068 
6093 libinput_device_config_left_handed_set(struct libinput_device *device, int left_handed);
6094 
6108 int
6110 
6124 int
6126 
6148 };
6149 
6165 uint32_t
6167 
6190  enum libinput_config_click_method method);
6208 
6226 
6253  struct libinput_device *device,
6255 
6272 
6289  struct libinput_device *device);
6290 
6305 };
6306 
6327 int
6329 
6354  struct libinput_device *device,
6356 
6382 
6409  struct libinput_device *device);
6410 
6445 };
6446 
6464 uint32_t
6466 
6493  enum libinput_config_scroll_method method);
6494 
6513 
6532 
6570  uint32_t button);
6571 
6596 uint32_t
6598 
6619 uint32_t
6621 
6625 };
6626 
6652  struct libinput_device *device,
6654 
6679 
6699 
6708 };
6709 
6727 int
6729 
6755  enum libinput_config_dwt_state enable);
6756 
6776 
6796 
6819 libinput_device_config_dwt_set_timeout(struct libinput_device *device, uint32_t millis);
6820 
6833 uint32_t
6835 
6852 uint32_t
6854 
6865 };
6866 
6887 int
6889 
6917  enum libinput_config_dwtp_state enable);
6918 
6940 
6962 
6983  uint32_t millis);
6984 
6997 uint32_t
6999 
7016 uint32_t
7018 
7033 int
7035 
7065  unsigned int degrees_cw);
7066 
7083 unsigned int
7085 
7102 unsigned int
7104 
7121 int
7123  struct libinput_tablet_tool *tool);
7124 
7155  double minimum,
7156  double maximum);
7157 
7177 double
7179  struct libinput_tablet_tool *tool);
7180 
7200 double
7202  struct libinput_tablet_tool *tool);
7203 
7223 double
7225  struct libinput_tablet_tool *tool);
7226 
7246 double
7248  struct libinput_tablet_tool *tool);
7249 
7267 };
7268 
7296 uint32_t
7298 
7329  struct libinput_tablet_tool *tool,
7331 
7353 
7375  struct libinput_tablet_tool *tool);
7376 
7403  uint32_t button);
7404 
7424 unsigned int
7426 
7446 unsigned int
7448  struct libinput_tablet_tool *tool);
7449 
7450 #ifdef __cplusplus
7451 }
7452 #endif
7453 #endif /* LIBINPUT_H */
Definition: libinput.h:1030
libinput_config_dwt_state
Possible states for the disable-while-typing feature.
Definition: libinput.h:6705
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)
enum libinput_config_status libinput_device_config_accel_set_profile(struct libinput_device *device, enum libinput_config_accel_profile profile)
Set the pointer acceleration profile of this pointer device to the given mode.
A custom acceleration profile.
Definition: libinput.h:5741
Middle mouse button emulation is to be disabled, or is currently disabled.
Definition: libinput.h:6299
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:48
Never send scroll events instead of pointer motion events.
Definition: libinput.h:6422
const char * libinput_tablet_tool_get_name(struct libinput_tablet_tool *tool)
Return the tool name for a tool object, if any.
libinput_config_accel_type
Acceleration types are categories of movement by a device that may have specific acceleration functio...
Definition: libinput.h:5855
Definition: libinput.h:6864
Definition: libinput.h:705
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.
libinput_config_clickfinger_button_map
Definition: libinput.h:4894
uint32_t libinput_device_config_accel_get_profiles(struct libinput_device *device)
Returns a bitmask of the configurable acceleration modes available on this device.
Definition: libinput.h:3810
Signals that a tool has come in or out of proximity of a device with the LIBINPUT_DEVICE_CAP_TABLET_T...
Definition: libinput.h:929
enum libinput_config_status libinput_config_accel_set_points(struct libinput_config_accel *accel_config, enum libinput_config_accel_type accel_type, double step, size_t npoints, const double *points)
Defines the acceleration function for a given movement type in an acceleration configuration with the...
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:368
unsigned int libinput_device_get_id_product(struct libinput_device *device)
Get the product ID for this device.
Definition: libinput.h:209
libinput_config_accel_profile
Definition: libinput.h:5713
Drag is to be disabled, or is currently disabled.
Definition: libinput.h:5167
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'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:875
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.
enum libinput_config_status libinput_device_config_3fg_drag_set_enabled(struct libinput_device *device, enum libinput_config_3fg_drag_state enable)
Enable or disable 3-finger drag on this device.
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 x1
Definition: libinput.h:5385
enum libinput_config_status libinput_tablet_tool_config_eraser_button_set_button(struct libinput_tablet_tool *tool, uint32_t button)
Set a button to be the eraser button for this tool.
uint32_t libinput_device_config_dwtp_get_default_timeout(struct libinput_device *device)
Get the default disable-while-trackpointing timeout.
int libinput_device_tablet_pad_has_key(struct libinput_device *device, uint32_t code)
Check if a LIBINPUT_DEVICE_CAP_TABLET_PAD device has a key with the given code (see linux/input-event...
double libinput_tablet_tool_config_pressure_range_get_default_maximum(struct libinput_tablet_tool *tool)
Get the maximum pressure value for this tablet tool, normalized to the range [0.0, 1.0] of the available hardware pressure.
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:3619
Definition: libinput.h:211
enum libinput_config_3fg_drag_state libinput_device_config_3fg_drag_get_default_enabled(struct libinput_device *device)
Return whether 3-finger drag is enabled or disabled by default on this device.
Definition: libinput.h:195
The number of fingers decides which button press to generate.
Definition: libinput.h:6147
A scroll event from various sources.
Definition: libinput.h:828
Drag is to be enabled, or is currently enabled.
Definition: libinput.h:4998
Definition: libinput.h:248
libinput_switch_state
The state of a switch.
Definition: libinput.h:704
A rotary device with positional and rotation data.
Definition: libinput.h:371
double libinput_event_tablet_tool_get_distance(struct libinput_event_tablet_tool *event)
Returns the current distance from the tablet'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.
int libinput_device_config_area_has_rectangle(struct libinput_device *device)
Check if the device can change its logical input area via a rectangle.
libinput_led
Mask reflecting LEDs on a device.
Definition: libinput.h:232
enum libinput_config_eraser_button_mode libinput_tablet_tool_config_eraser_button_get_mode(struct libinput_tablet_tool *tool)
Get the mode for the eraser button.
libinput_pointer_axis_source
The source for a libinput_pointer_axis event.
Definition: libinput.h:280
uint32_t libinput_device_config_dwt_get_timeout(struct libinput_device *device)
Get the current disable-while-typing timeout.
enum libinput_config_scroll_button_lock_state libinput_device_config_scroll_get_button_lock(struct libinput_device *device)
Get the current scroll button lock state.
Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events...
Definition: libinput.h:133
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:1036
Definition: libinput.h:873
double libinput_event_tablet_pad_get_ring_position(struct libinput_event_tablet_pad *event)
Returns the current position of the ring, in degrees clockwise from the northern-most point of the ri...
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:265
libinput_tablet_tool_type
Available tool types for a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
Definition: libinput.h:362
Signals the end of a set of touchpoints at one device sample time.
Definition: libinput.h:881
void libinput_plugin_system_append_default_paths(struct libinput *libinput)
Add the default plugin lookup paths, typically:
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:4773
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.
Definition: libinput.h:6863
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:235
Use software-button areas to generate button events.
Definition: libinput.h:6143
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.
libinput_plugin_system_flags
Definition: libinput.h:3809
This switch indicates if the device keypad is exposed or not.
Definition: libinput.h:752
The event is caused by the tilting of a mouse wheel rather than its rotation.
Definition: libinput.h:303
The event is caused by the movement of one or more fingers on a device.
Definition: libinput.h:289
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:4988
Tapping is to be enabled, or is currently enabled.
Definition: libinput.h:4797
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.
uint32_t libinput_event_tablet_pad_get_key(struct libinput_event_tablet_pad *event)
Return the key code that triggered this event, e.g.
int libinput_event_gesture_get_finger_count(struct libinput_event_gesture *event)
Return the number of fingers used for a gesture.
Drag lock is to be enabled in sticky mode, or is currently enabled in sticky mode.
Definition: libinput.h:5073
struct libinput_event * libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event)
unsigned int libinput_tablet_tool_config_eraser_button_get_button(struct libinput_tablet_tool *tool)
Get the button configured to emulate an eraser for this tool.
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:6139
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:794
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:4051
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:1031
int libinput_device_touch_get_touch_count(struct libinput_device *device)
Check how many touches a LIBINPUT_DEVICE_CAP_TOUCH device supports simultaneously.
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...
struct libinput_config_area_rectangle libinput_device_config_area_get_rectangle(struct libinput_device *device)
Return the current area rectangle 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.
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:786
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:4774
double libinput_tablet_tool_config_pressure_range_get_minimum(struct libinput_tablet_tool *tool)
Get the minimum pressure value for this tablet tool, normalized to the range [0.0, 1.0] of the available hardware pressure.
Drag is to be enabled for 4 fingers, or is currently enabled.
Definition: libinput.h:5177
void(* close_restricted)(int fd, void *user_data)
Close the file descriptor.
Definition: libinput.h:3639
libinput_tablet_tool_proximity_state
The state of proximity for a tool on a device.
Definition: libinput.h:392
Definition: libinput.h:796
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:5726
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)
enum libinput_config_status libinput_device_config_accel_apply(struct libinput_device *device, struct libinput_config_accel *accel_config)
Apply this pointer acceleration configuration to the device.
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:792
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.
int libinput_device_config_3fg_drag_get_finger_count(struct libinput_device *device)
Returns the maximum number of fingers available for 3-finger dragging.
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:1032
Definition: libinput.h:196
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:5512
1/2/3 finger click maps to left/right/middle
Definition: libinput.h:4896
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:246
const char * libinput_config_status_to_str(enum libinput_config_status status)
Return a string describing the error.
enum libinput_config_status libinput_device_config_click_set_clickfinger_button_map(struct libinput_device *device, enum libinput_config_clickfinger_button_map map)
Set the finger number to button number mapping for clickfinger.
Definition: libinput.h:213
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.
double libinput_event_tablet_pad_get_dial_delta_v120(struct libinput_event_tablet_pad *event)
Returns the delta change of the dial, in multiples or fractions of 120, with each multiple of 120 ind...
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 high-level tool type for a tool object.
Send scroll events when two fingers are logically down on the device.
Definition: libinput.h:6427
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:124
double libinput_device_config_accel_get_speed(struct libinput_device *device)
Get the current pointer acceleration setting for this pointer device.
int libinput_plugin_system_load_plugins(struct libinput *libinput, enum libinput_plugin_system_flags flags)
Load the plugins from the set of lookup paths.
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:954
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.
int libinput_tablet_tool_config_pressure_range_is_available(struct libinput_tablet_tool *tool)
Check if a tablet tool can have a custom pressure range.
libinput_tablet_tool_tip_state
The tip contact state for a tool on a device.
Definition: libinput.h:408
uint32_t libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event)
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's current logical orientation, in degrees off the tablet'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:798
int libinput_device_config_dwtp_is_available(struct libinput_device *device)
Check if this device supports configurable disable-while-trackpointing feature.
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.
Acceleration type for regular pointer movement.
Definition: libinput.h:5865
A scroll event from a continuous scroll source, e.g.
Definition: libinput.h:871
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:263
void libinput_device_group_set_user_data(struct libinput_device_group *group, void *user_data)
Set caller-specific data associated with this device group.
The eraser button on the tool sends a button event instead.
Definition: libinput.h:7266
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.
enum libinput_config_clickfinger_button_map libinput_device_config_click_get_clickfinger_button_map(struct libinput_device *device)
Get the finger number to button number mapping for clickfinger.
libinput_config_tap_state
Definition: libinput.h:4794
A mouse tool with a lens.
Definition: libinput.h:370
Definition: libinput.h:207
void libinput_set_user_data(struct libinput *libinput, void *user_data)
Set caller-specific data associated with this context.
Eraser.
Definition: libinput.h:364
uint32_t libinput_device_config_dwt_get_default_timeout(struct libinput_device *device)
Get the default disable-while-typing timeout.
An object representing a tool being used by a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capabil...
Definition: libinput.h:76
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:363
double libinput_tablet_tool_config_pressure_range_get_maximum(struct libinput_tablet_tool *tool)
Get the maximum pressure value for this tablet tool, normalized to the range [0.0, 1.0] of the available hardware pressure.
Middle mouse button emulation is to be enabled, or is currently enabled.
Definition: libinput.h:6304
unsigned int libinput_device_get_id_bustype(struct libinput_device *device)
Get the bus type ID for this device.
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:223
libinput_device_capability
Capabilities on a device.
Definition: libinput.h:206
The event is caused by the rotation of a wheel.
Definition: libinput.h:284
unsigned int libinput_tablet_tool_config_eraser_button_get_default_button(struct libinput_tablet_tool *tool)
Get the default button configured to emulate an eraser for this tool.
Definition: libinput.h:874
libinput_config_status
Status codes returned when applying configuration settings.
Definition: libinput.h:4772
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.
int libinput_event_tablet_tool_size_minor_has_changed(struct libinput_event_tablet_tool *event)
Check if the size minor axis was updated in this event.
uint32_t libinput_tablet_tool_config_eraser_button_get_modes(struct libinput_tablet_tool *tool)
Check if a tool can change the behavior of or to a firmware eraser button.
Definition: libinput.h:224
libinput_tablet_pad_ring_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_RING event.
Definition: libinput.h:314
Definition: libinput.h:1028
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. ...
1/2/3 finger click maps to left/middle/right
Definition: libinput.h:4898
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:4884
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 ...
libinput_config_3fg_drag_state
A config status to distinguish or set 3-finger dragging on a device.
Definition: libinput.h:5162
Definition: libinput.h:197
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.
enum libinput_config_3fg_drag_state libinput_device_config_3fg_drag_get_enabled(struct libinput_device *device)
Return whether 3-finger drag is enabled or disabled on 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:1042
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:159
uint64_t libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *event)
enum libinput_config_status libinput_device_config_dwt_set_timeout(struct libinput_device *device, uint32_t millis)
Set the disable-while-typing timeout.
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...
A key pressed on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:1017
double libinput_event_gesture_get_dy(struct libinput_event_gesture *event)
Return the delta between the last event and the current event.
double libinput_event_pointer_get_scroll_value(struct libinput_event_pointer *event, enum libinput_pointer_axis axis)
Return the axis value of the given axis.
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.
legacy spelling for LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_TIMEOUT
Definition: libinput.h:5070
1/2/3 finger tap maps to left/middle/right
Definition: libinput.h:4888
The laptop lid was closed when the switch state is LIBINPUT_SWITCH_STATE_ON, or was opened when it is...
Definition: libinput.h:722
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:210
Definition: libinput.h:876
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:96
#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args)
Definition: libinput.h:37
libinput_config_click_method
The click method defines when to generate software-emulated buttons, usually on a device that does no...
Definition: libinput.h:6134
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:57
void libinput_config_accel_destroy(struct libinput_config_accel *accel_config)
Destroy an acceleration configuration.
int libinput_device_config_left_handed_get_default(struct libinput_device *device)
Get the default left-handed configuration of the device.
enum libinput_config_status libinput_device_config_dwtp_set_timeout(struct libinput_device *device, uint32_t millis)
Set the disable-while-trackpointing timeout.
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:365
double y1
Definition: libinput.h:5386
A button pressed on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:989
The event is caused by the movement of one or more fingers on the ring.
Definition: libinput.h:320
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:5518
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:6706
struct libinput * libinput_device_get_context(struct libinput_device *device)
Get the libinput context from the device.
Invalid parameter range.
Definition: libinput.h:4776
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.
The default acceleration type used as a fallback when other acceleration types are not provided...
Definition: libinput.h:5860
Acceleration type for scroll movement.
Definition: libinput.h:5870
Placeholder for devices that don't have a configurable pointer acceleration profile.
Definition: libinput.h:5718
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:996
double libinput_event_gesture_get_dx(struct libinput_event_gesture *event)
Return the delta between the last event and the current event.
double libinput_event_pointer_get_scroll_value_v120(struct libinput_event_pointer *event, enum libinput_pointer_axis axis)
For events of type LIBINPUT_EVENT_POINTER_SCROLL_WHEEL the v120-normalized value represents the movem...
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.
Use the default hardware behavior of the tool.
Definition: libinput.h:7258
libinput_switch
The type of a switch.
Definition: libinput.h:716
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.
A scroll event caused by the movement of one or more fingers on a device.
Definition: libinput.h:856
Drag lock is to be disabled, or is currently disabled.
Definition: libinput.h:5065
Definition: libinput.h:208
Drag lock is to be enabled in timeout mode, or is currently enabled in timeout mode.
Definition: libinput.h:5068
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's current logical orientation, in degrees off the tablet'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:902
void libinput_event_destroy(struct libinput_event *event)
Destroy the event, freeing all associated resources.
Definition: libinput.h:797
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.
double libinput_tablet_tool_config_pressure_range_get_default_minimum(struct libinput_tablet_tool *tool)
Get the minimum pressure value for this tablet tool, normalized to the range [0.0, 1.0] of the available hardware pressure.
Tablet pad event representing a button press, or ring/strip update on the tablet pad itself...
Definition: libinput.h:173
Physical drawing tool, e.g.
Definition: libinput.h:366
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:4993
Send scroll events when a finger moves in a circular motion, clockwise for a logical scroll down and ...
Definition: libinput.h:6444
enum libinput_config_clickfinger_button_map libinput_device_config_click_get_default_clickfinger_button_map(struct libinput_device *device)
Get the default finger number to button number mapping for clickfinger.
int libinput_device_config_scroll_has_natural_scroll(struct libinput_device *device)
Return non-zero if the device supports "natural scrolling".
Definition: libinput.h:233
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)
enum libinput_config_scroll_button_lock_state libinput_device_config_scroll_get_default_button_lock(struct libinput_device *device)
Get the default scroll button lock state.
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)
enum libinput_key_state libinput_event_tablet_pad_get_key_state(struct libinput_event_tablet_pad *event)
Return the key state of the 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:6437
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:6417
Send scroll events when a finger moves along the bottom or right edge of a device.
Definition: libinput.h:6432
Tapping is to be disabled, or is currently disabled.
Definition: libinput.h:4795
A scroll event from a wheel.
Definition: libinput.h:842
Definition: libinput.h:247
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:1029
Definition: libinput.h:237
The base handle for accessing libinput seats.
Definition: libinput.h:67
Definition: libinput.h:212
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.
Drag is to be enabled for 3 fingers, or is currently enabled.
Definition: libinput.h:5172
libinput_event_type
Event type for events returned by libinput_get_event().
Definition: libinput.h:770
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'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.
double libinput_event_tablet_tool_get_size_minor(struct libinput_event_tablet_tool *event)
Returns the current size in mm along the minor axis of the touching ellipse.
The event is caused by the motion of some device.
Definition: libinput.h:293
Definition: libinput.h:706
This switch indicates whether the device is in normal laptop mode or behaves like a tablet-like devic...
Definition: libinput.h:738
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:5532
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.
struct libinput_config_area_rectangle libinput_device_config_area_get_default_rectangle(struct libinput_device *device)
Return the default area rectangle for this device.
Definition: libinput.h:394
Definition: libinput.h:234
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:6294
struct libinput_seat * libinput_device_get_seat(struct libinput_device *device)
Get the seat associated with this input device.
unsigned int libinput_event_tablet_pad_get_dial_number(struct libinput_event_tablet_pad *event)
Returns the number of the dial that has changed state, with 0 being the first dial.
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.
libinput_config_dwtp_state
Possible states for the disable-while-trackpointing feature.
Definition: libinput.h:6862
The event is caused by the movement of one or more fingers on the strip.
Definition: libinput.h:337
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:264
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.
struct libinput_config_accel * libinput_config_accel_create(enum libinput_config_accel_profile profile)
Create an acceleration configuration of a given profile.
uint32_t libinput_device_config_dwtp_get_timeout(struct libinput_device *device)
Get the current disable-while-trackpointing timeout.
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.
int libinput_tablet_pad_mode_group_has_dial(struct libinput_tablet_pad_mode_group *group, unsigned int dial)
Devices without mode switching capabilities return true for every dial.
Definition: libinput.h:1027
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's log handler.
Definition: libinput.h:4072
enum libinput_log_priority libinput_log_get_priority(const struct libinput *libinput)
Get the context's log priority.
libinput_tablet_pad_strip_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_STRIP event.
Definition: libinput.h:331
Signals that a tool has changed a logical button state on a device with the LIBINPUT_DEVICE_CAP_TABLE...
Definition: libinput.h:972
int libinput_tablet_tool_has_size(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a ellipsis major and minor.
libinput_config_eraser_button_mode
Definition: libinput.h:7253
const char * libinput_device_get_sysname(struct libinput_device *device)
Get the system name of the device.
enum libinput_config_status libinput_tablet_tool_config_eraser_button_set_mode(struct libinput_tablet_tool *tool, enum libinput_config_eraser_button_mode mode)
Change the eraser button behavior on a tool.
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.
Definition: libinput.h:236
libinput_config_drag_lock_state
Definition: libinput.h:5063
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:1004
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:5538
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_plugin_system_append_path(struct libinput *libinput, const char *path)
Appends the given directory path to the libinput plugin lookup path.
int libinput_device_tablet_pad_get_num_dials(struct libinput_device *device)
Return the number of dials a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability provides...
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:4886
libinput_config_scroll_button_lock_state
Definition: libinput.h:6622
int libinput_event_tablet_tool_size_major_has_changed(struct libinput_event_tablet_tool *event)
Check if the size major axis was updated in this event.
libinput_log_priority
Log priority for internal logging messages.
Definition: libinput.h:194
A mouse bound to the tablet.
Definition: libinput.h:369
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-event-c...
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...
double libinput_event_tablet_tool_get_size_major(struct libinput_event_tablet_tool *event)
Returns the current size in mm along the major axis of the touching ellipse.
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:3631
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:108
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.
enum libinput_config_dwtp_state libinput_device_config_dwtp_get_enabled(struct libinput_device *device)
Check if the disable-while-trackpointing feature is currently enabled on this device.
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:409
Definition: libinput.h:1037
A gesture event representing a swipe, pinch or hold gesture.
Definition: libinput.h:145
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_config_eraser_button_mode libinput_tablet_tool_config_eraser_button_get_default_mode(struct libinput_tablet_tool *tool)
Get the default mode for the eraser button.
enum libinput_switch libinput_event_switch_get_switch(struct libinput_event_switch *event)
Return the switch that triggered this event.
enum libinput_config_dwtp_state libinput_device_config_dwtp_get_default_enabled(struct libinput_device *device)
Check if the disable-while-trackpointing feature is enabled on this device by default.
enum libinput_config_status libinput_device_config_dwtp_set_enabled(struct libinput_device *device, enum libinput_config_dwtp_state enable)
Enable or disable the disable-while-trackpointing feature.
libinput_key_state
Logical state of a key.
Definition: libinput.h:222
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:776
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
Set caller-specific data associated with this input device.
double y2
Definition: libinput.h:5388
int libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports tilt.
A status change on a tablet dial with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition: libinput.h:1025
int libinput_device_switch_has_switch(struct libinput_device *device, enum libinput_switch sw)
Check if a LIBINPUT_DEVICE_CAP_SWITCH device has a switch of the given type.
Definition: libinput.h:410
double x2
Definition: libinput.h:5387
uint64_t libinput_event_touch_get_time_usec(struct libinput_event_touch *event)
Definition: libinput.h:315
Describes a rectangle to configure a device's area, see libinput_device_config_area_set_rectangle().
Definition: libinput.h:5384
enum libinput_config_status libinput_device_config_area_set_rectangle(struct libinput_device *device, const struct libinput_config_area_rectangle *rect)
Set the given rectangle as the logical input area of this device.
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-event...
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:116
An adaptive acceleration profile.
Definition: libinput.h:5732
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.
enum libinput_config_status libinput_device_config_scroll_set_button_lock(struct libinput_device *device, enum libinput_config_scroll_button_lock_state state)
Set the scroll button lock.
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.
enum libinput_config_status libinput_tablet_tool_config_pressure_range_set(struct libinput_tablet_tool *tool, double minimum, double maximum)
Set the pressure range for this tablet tool.
Definition: libinput.h:6707
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.