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
29extern "C" {
30#endif
31
32#include <stdlib.h>
33#include <stdint.h>
34#include <stdarg.h>
35#include <libudev.h>
36
37#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args) \
38 __attribute__ ((format (printf, _format, _args)))
39#define LIBINPUT_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated))
40
48struct libinput;
49
57struct libinput_device;
58
68
76struct libinput_seat;
77
97
108struct libinput_event;
109
117
125
134
146
160
174
185
201
212
223
234
251
289
306
323
359
380
396
425
442int
444
469 unsigned int index);
470
483unsigned int
485
503unsigned int
505
525unsigned int
527
540int
542 unsigned int button);
543
556int
558 unsigned int dial);
559
572int
574 unsigned int ring);
575
588int
590 unsigned int strip);
591
610int
612 unsigned int button);
613
627 struct libinput_tablet_pad_mode_group *group);
628
642 struct libinput_tablet_pad_mode_group *group);
643
657void
659 struct libinput_tablet_pad_mode_group *group,
660 void *user_data);
661
673void *
675 struct libinput_tablet_pad_mode_group *group);
676
692
724
734
1014
1031void
1033
1043
1052struct libinput *
1054
1068struct libinput_device *
1070
1083
1096
1107struct libinput_event_touch *
1109
1127struct libinput_event_gesture *
1129
1144
1157
1170struct libinput_event_switch *
1172
1186
1192struct libinput_event *
1194
1210uint32_t
1212
1221uint64_t
1223
1229uint32_t
1231
1239
1245struct libinput_event *
1247
1260uint32_t
1262 struct libinput_event_keyboard *event);
1263
1279uint32_t
1281
1290uint64_t
1292
1311double
1313
1332double
1334
1356double
1358 struct libinput_event_pointer *event);
1359
1381double
1383 struct libinput_event_pointer *event);
1384
1400double
1402
1418double
1420
1438double
1440 struct libinput_event_pointer *event,
1441 uint32_t width);
1442
1460double
1462 struct libinput_event_pointer *event,
1463 uint32_t height);
1464
1477uint32_t
1479
1494
1508uint32_t
1510 struct libinput_event_pointer *event);
1511
1534int
1536 enum libinput_pointer_axis axis);
1537
1562double
1564 enum libinput_pointer_axis axis);
1565
1614
1640double
1642 enum libinput_pointer_axis axis);
1643
1692double
1694 enum libinput_pointer_axis axis);
1695
1732double
1734 enum libinput_pointer_axis axis);
1735
1741struct libinput_event *
1743
1758uint32_t
1760
1769uint64_t
1771
1791int32_t
1793
1813int32_t
1815
1833double
1835
1853double
1855
1873double
1875 uint32_t width);
1876
1894double
1896 uint32_t height);
1897
1903struct libinput_event *
1905
1928uint32_t
1929libinput_event_gesture_get_time(struct libinput_event_gesture *event);
1930
1939uint64_t
1940libinput_event_gesture_get_time_usec(struct libinput_event_gesture *event);
1941
1947struct libinput_event *
1948libinput_event_gesture_get_base_event(struct libinput_event_gesture *event);
1949
1965int
1966libinput_event_gesture_get_finger_count(struct libinput_event_gesture *event);
1967
1982int
1983libinput_event_gesture_get_cancelled(struct libinput_event_gesture *event);
1984
2000double
2001libinput_event_gesture_get_dx(struct libinput_event_gesture *event);
2002
2018double
2019libinput_event_gesture_get_dy(struct libinput_event_gesture *event);
2020
2039double
2041 struct libinput_event_gesture *event);
2042
2061double
2063 struct libinput_event_gesture *event);
2064
2091double
2092libinput_event_gesture_get_scale(struct libinput_event_gesture *event);
2093
2115double
2116libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event);
2117
2142struct libinput_event *
2144
2164int
2166 struct libinput_event_tablet_tool *event);
2167
2187int
2189 struct libinput_event_tablet_tool *event);
2190
2210int
2212 struct libinput_event_tablet_tool *event);
2213
2235int
2237 struct libinput_event_tablet_tool *event);
2238
2258int
2260 struct libinput_event_tablet_tool *event);
2261
2281int
2283 struct libinput_event_tablet_tool *event);
2303int
2305 struct libinput_event_tablet_tool *event);
2325int
2327 struct libinput_event_tablet_tool *event);
2328
2346int
2348 struct libinput_event_tablet_tool *event);
2349
2367int
2369 struct libinput_event_tablet_tool *event);
2370
2390int
2392 struct libinput_event_tablet_tool *event);
2393
2410double
2412
2429double
2431
2448double
2450
2467double
2469
2483double
2485
2499double
2501
2519double
2521
2539double
2541
2561double
2563
2579double
2581
2597double
2599
2615double
2617
2628double
2630 struct libinput_event_tablet_tool *event);
2631
2644int
2646 struct libinput_event_tablet_tool *event);
2647
2667double
2669 uint32_t width);
2670
2690double
2692 uint32_t height);
2693
2716struct libinput_tablet_tool *
2718
2747
2763
2778uint32_t
2780
2796
2812uint32_t
2814
2826uint32_t
2828
2840uint64_t
2842
2868
2888uint64_t
2890
2904struct libinput_tablet_tool *
2906
2921struct libinput_tablet_tool *
2923
2934int
2936
2947int
2949
2960int
2962
2973int
2975
2986int
2988
3000int
3002
3013int
3015
3029int
3031 uint32_t code);
3032
3049int
3051
3088uint64_t
3090
3103void *
3105
3116void
3118 void *user_data);
3119
3136struct libinput_event *
3138
3161double
3163
3180unsigned int
3182
3201
3224double
3226
3243unsigned int
3245
3264
3285uint32_t
3287
3304
3323uint32_t
3325
3342
3359double
3361
3378unsigned int
3380
3413unsigned int
3415
3441
3453uint32_t
3455
3467uint64_t
3469
3491enum libinput_switch
3493
3511
3519struct libinput_event *
3521
3533uint32_t
3535
3547uint64_t
3549
3577 int (*open_restricted)(const char *path, int flags, void *user_data);
3585 void (*close_restricted)(int fd, void *user_data);
3586};
3587
3601struct libinput *
3603 void *user_data,
3604 struct udev *udev);
3605
3627int
3629 const char *seat_id);
3630
3650struct libinput *
3652 void *user_data);
3653
3674struct libinput_device *
3676 const char *path);
3677
3696void
3698
3707int
3709
3727int
3729
3741struct libinput_event *
3743
3757
3769void
3771 void *user_data);
3772
3783void *
3785
3797int
3799
3809void
3811
3821struct libinput *
3823
3855struct libinput *
3857
3873void
3875 enum libinput_log_priority priority);
3876
3893
3909 enum libinput_log_priority priority,
3910 const char *format, va_list args)
3912
3928void
3930 libinput_log_handler log_handler);
3931
3953struct libinput_seat *
3955
3967struct libinput_seat *
3969
3981void
3982libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data);
3983
3993void *
3995
4004struct libinput *
4006
4023const char *
4025
4035const char *
4037
4053struct libinput_device *
4055
4067struct libinput_device *
4069
4081void
4082libinput_device_set_user_data(struct libinput_device *device, void *user_data);
4083
4093void *
4095
4104struct libinput *
4106
4167struct libinput_device_group *
4169
4181const char *
4183
4197const char *
4199
4210unsigned int
4212
4221unsigned int
4223
4232unsigned int
4234
4254const char *
4256
4277struct libinput_seat *
4279
4305int
4307 const char *name);
4308
4328struct udev_device *
4330
4341void
4343 enum libinput_led leds);
4344
4352int
4354 enum libinput_device_capability capability);
4355
4370int
4372 double *width,
4373 double *height);
4374
4387int
4389
4402int
4404 uint32_t code);
4405
4419int
4421
4436int
4438 enum libinput_switch sw);
4439
4454int
4456
4471int
4473
4488int
4490
4505int
4507
4522int
4524 uint32_t code);
4525
4538struct libinput_device_group *
4540
4554struct libinput_device_group *
4556
4568void
4570 void *user_data);
4571
4582void *
4584
4638
4648const char *
4650
4660
4676int
4678
4701 enum libinput_config_tap_state enable);
4702
4721
4738
4750
4760
4794
4816
4838
4860
4880 enum libinput_config_drag_state enable);
4881
4899
4919
4929
4955
4975
4998
5011int
5013
5065 const float matrix[6]);
5066
5083int
5085 float matrix[6]);
5086
5107int
5109 float matrix[6]);
5110
5145
5160uint32_t
5162
5193 uint32_t mode);
5194
5214uint32_t
5216
5230uint32_t
5232
5246int
5248
5271 double speed);
5272
5294double
5296
5311double
5313
5349
5375struct libinput_config_accel;
5376
5398struct libinput_config_accel *
5400
5415void
5416libinput_config_accel_destroy(struct libinput_config_accel *accel_config);
5417
5438 struct libinput_config_accel *accel_config);
5439
5478
5510libinput_config_accel_set_points(struct libinput_config_accel *accel_config,
5511 enum libinput_config_accel_type accel_type,
5512 double step, size_t npoints, double *points);
5513
5526uint32_t
5528
5544 enum libinput_config_accel_profile profile);
5545
5559
5573
5603int
5605
5622 int enable);
5636int
5638
5652int
5654
5668int
5670
5696 int left_handed);
5697
5711int
5713
5727int
5729
5752
5768uint32_t
5770
5793 enum libinput_config_click_method method);
5811
5829
5857
5874
5891
5907
5928int
5930 struct libinput_device *device);
5931
5956 struct libinput_device *device,
5958
5984 struct libinput_device *device);
5985
6012 struct libinput_device *device);
6013
6042
6060uint32_t
6062
6089 enum libinput_config_scroll_method method);
6090
6109
6128
6166 uint32_t button);
6167
6192uint32_t
6194
6215uint32_t
6217
6222
6247
6272
6292
6302
6318int
6320
6344 enum libinput_config_dwt_state enable);
6345
6363
6381
6393
6412int
6414
6440 enum libinput_config_dwtp_state enable);
6441
6461
6481
6496int
6498
6528 unsigned int degrees_cw);
6529
6546unsigned int
6548
6565unsigned int
6567
6584int
6586
6615 double minimum,
6616 double maximum);
6617
6635double
6637
6655double
6657
6675double
6677
6695double
6697
6698#ifdef __cplusplus
6699}
6700#endif
6701#endif /* LIBINPUT_H */
int libinput_dispatch(struct libinput *libinput)
Main event dispatchment function.
struct libinput * libinput_ref(struct libinput *libinput)
Add a reference to the context.
int libinput_resume(struct libinput *libinput)
Resume a suspended libinput context.
struct libinput_event * libinput_get_event(struct libinput *libinput)
Retrieve the next event from libinput's internal event queue.
void libinput_suspend(struct libinput *libinput)
Suspend monitoring for new devices and close existing devices.
struct libinput * libinput_udev_create_context(const struct libinput_interface *interface, void *user_data, struct udev *udev)
Create a new libinput context from udev.
int libinput_udev_assign_seat(struct libinput *libinput, const char *seat_id)
Assign a seat to this libinput context.
enum libinput_log_priority libinput_log_get_priority(const struct libinput *libinput)
Get the context's log priority.
void libinput_log_set_priority(struct libinput *libinput, enum libinput_log_priority priority)
Set the log priority for the libinput context.
int libinput_get_fd(struct libinput *libinput)
libinput keeps a single file descriptor for all events.
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...
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:3908
libinput_log_priority
Log priority for internal logging messages.
Definition libinput.h:180
void libinput_set_user_data(struct libinput *libinput, void *user_data)
Set caller-specific data associated with this context.
libinput_event_type
Event type for events returned by libinput_get_event().
Definition libinput.h:740
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().
enum libinput_event_type libinput_next_event_type(struct libinput *libinput)
Return the type of the next event in the internal queue.
void(*) voi libinput_log_set_handler)(struct libinput *libinput, libinput_log_handler log_handler)
Set the context's log handler.
Definition libinput.h:3929
void * libinput_get_user_data(struct libinput *libinput)
Get the caller-specific data associated with this context, if any.
struct libinput * libinput_unref(struct libinput *libinput)
Dereference the libinput context.
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...
@ LIBINPUT_LOG_PRIORITY_DEBUG
Definition libinput.h:181
@ LIBINPUT_LOG_PRIORITY_INFO
Definition libinput.h:182
@ LIBINPUT_LOG_PRIORITY_ERROR
Definition libinput.h:183
@ LIBINPUT_EVENT_POINTER_SCROLL_WHEEL
A scroll event from a wheel.
Definition libinput.h:812
@ LIBINPUT_EVENT_TABLET_PAD_DIAL
A status change on a tablet dial with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition libinput.h:995
@ LIBINPUT_EVENT_GESTURE_SWIPE_END
Definition libinput.h:999
@ LIBINPUT_EVENT_TABLET_PAD_KEY
A key pressed on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition libinput.h:987
@ LIBINPUT_EVENT_POINTER_MOTION
Definition libinput.h:766
@ LIBINPUT_EVENT_TOUCH_UP
Definition libinput.h:844
@ LIBINPUT_EVENT_TABLET_PAD_RING
A status change on a tablet ring with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition libinput.h:966
@ LIBINPUT_EVENT_POINTER_BUTTON
Definition libinput.h:768
@ LIBINPUT_EVENT_TABLET_PAD_STRIP
A status change on a strip on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition libinput.h:974
@ LIBINPUT_EVENT_TOUCH_FRAME
Signals the end of a set of touchpoints at one device sample time.
Definition libinput.h:851
@ LIBINPUT_EVENT_POINTER_SCROLL_FINGER
A scroll event caused by the movement of one or more fingers on a device.
Definition libinput.h:826
@ LIBINPUT_EVENT_KEYBOARD_KEY
Definition libinput.h:764
@ LIBINPUT_EVENT_DEVICE_ADDED
Signals that a device has been added to the context.
Definition libinput.h:756
@ LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY
Signals that a tool has come in or out of proximity of a device with the LIBINPUT_DEVICE_CAP_TABLET_T...
Definition libinput.h:899
@ LIBINPUT_EVENT_POINTER_AXIS
A scroll event from various sources.
Definition libinput.h:798
@ LIBINPUT_EVENT_GESTURE_HOLD_END
Definition libinput.h:1007
@ LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE
Definition libinput.h:767
@ LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN
Definition libinput.h:997
@ LIBINPUT_EVENT_TABLET_TOOL_BUTTON
Signals that a tool has changed a logical button state on a device with the LIBINPUT_DEVICE_CAP_TABLE...
Definition libinput.h:942
@ LIBINPUT_EVENT_GESTURE_HOLD_BEGIN
Definition libinput.h:1006
@ LIBINPUT_EVENT_TABLET_PAD_BUTTON
A button pressed on a device with the LIBINPUT_DEVICE_CAP_TABLET_PAD capability.
Definition libinput.h:959
@ LIBINPUT_EVENT_DEVICE_REMOVED
Signals that a device has been removed.
Definition libinput.h:762
@ LIBINPUT_EVENT_TABLET_TOOL_TIP
Signals that a tool has come in contact with the surface of a device with the LIBINPUT_DEVICE_CAP_TAB...
Definition libinput.h:924
@ LIBINPUT_EVENT_GESTURE_PINCH_END
Definition libinput.h:1002
@ LIBINPUT_EVENT_TOUCH_DOWN
Definition libinput.h:843
@ LIBINPUT_EVENT_SWITCH_TOGGLE
Definition libinput.h:1012
@ LIBINPUT_EVENT_TOUCH_MOTION
Definition libinput.h:845
@ LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE
Definition libinput.h:998
@ LIBINPUT_EVENT_TOUCH_CANCEL
Definition libinput.h:846
@ LIBINPUT_EVENT_NONE
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:746
@ LIBINPUT_EVENT_GESTURE_PINCH_UPDATE
Definition libinput.h:1001
@ LIBINPUT_EVENT_GESTURE_PINCH_BEGIN
Definition libinput.h:1000
@ LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS
A scroll event from a continuous scroll source, e.g.
Definition libinput.h:841
@ LIBINPUT_EVENT_TABLET_TOOL_AXIS
One or more axes have changed state on a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
Definition libinput.h:872
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.
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.
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_device_config_dwt_is_available(struct libinput_device *device)
Check if this device supports configurable disable-while-typing feature.
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_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.
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.
libinput_config_accel_type
Acceleration types are categories of movement by a device that may have specific acceleration functio...
Definition libinput.h:5461
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.
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],...
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,...
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_accel_apply(struct libinput_device *device, struct libinput_config_accel *accel_config)
Apply this pointer acceleration configuration to the device.
int libinput_device_config_rotation_is_available(struct libinput_device *device)
Check whether a device can have a custom rotation applied.
uint32_t libinput_device_config_click_get_methods(struct libinput_device *device)
Check which button click methods a device supports.
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_config_status
Status codes returned when applying configuration settings.
Definition libinput.h:4632
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.
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...
int libinput_device_config_calibration_get_default_matrix(struct libinput_device *device, float matrix[6])
Return the default calibration matrix for this device.
libinput_config_click_method
The click method defines when to generate software-emulated buttons, usually on a device that does no...
Definition libinput.h:5737
libinput_config_middle_emulation_state
Definition libinput.h:5895
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_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_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.
enum libinput_config_scroll_method libinput_device_config_scroll_get_method(struct libinput_device *device)
Get the scroll method for this device.
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.
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.
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:5117
int libinput_device_config_dwtp_is_available(struct libinput_device *device)
Check if this device supports configurable disable-while-trackpointing feature.
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.
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.
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.
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.
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.
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:6020
enum libinput_config_click_method libinput_device_config_click_get_method(struct libinput_device *device)
Get the button click method for this device.
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].
int libinput_device_config_left_handed_is_available(struct libinput_device *device)
Check if a device has a configuration that supports left-handed usage.
int libinput_device_config_accel_is_available(struct libinput_device *device)
Check if a device uses libinput-internal pointer-acceleration.
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,...
libinput_config_tap_button_map
Definition libinput.h:4744
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.
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.
int libinput_device_config_scroll_has_natural_scroll(struct libinput_device *device)
Return non-zero if the device supports "natural scrolling".
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.
enum libinput_config_scroll_method libinput_device_config_scroll_get_default_method(struct libinput_device *device)
Get the default scroll method for this 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.
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,...
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.
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.
const char * libinput_config_status_to_str(enum libinput_config_status status)
Return a string describing the error.
int libinput_device_config_left_handed_get(struct libinput_device *device)
Get the current left-handed configuration of 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.
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.
uint32_t libinput_device_config_send_events_get_modes(struct libinput_device *device)
Return the possible send-event modes for this device.
int libinput_device_config_calibration_get_matrix(struct libinput_device *device, float matrix[6])
Return the current calibration matrix for this device.
int libinput_device_config_left_handed_get_default(struct libinput_device *device)
Get the default left-handed configuration of the device.
void libinput_config_accel_destroy(struct libinput_config_accel *accel_config)
Destroy an acceleration configuration.
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.
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, double *points)
Defines the acceleration function for a given movement type in an acceleration configuration with the...
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.
int libinput_device_config_scroll_get_default_natural_scroll_enabled(struct libinput_device *device)
Get the default mode for scrolling on this device.
double libinput_device_config_accel_get_speed(struct libinput_device *device)
Get the current pointer acceleration setting for this pointer device.
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.
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_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.
libinput_config_clickfinger_button_map
Definition libinput.h:4754
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.
uint32_t libinput_device_config_accel_get_profiles(struct libinput_device *device)
Returns a bitmask of the configurable acceleration modes available on this device.
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.
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.
libinput_config_tap_state
Definition libinput.h:4654
uint32_t libinput_device_config_scroll_get_methods(struct libinput_device *device)
Check which scroll methods a device supports.
struct libinput_config_accel * libinput_config_accel_create(enum libinput_config_accel_profile profile)
Create an acceleration configuration of a given profile.
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.
libinput_config_dwt_state
Possible states for the disable-while-typing feature.
Definition libinput.h:6298
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.
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.
libinput_config_accel_profile
Definition libinput.h:5319
int libinput_device_config_middle_emulation_is_available(struct libinput_device *device)
Check if middle mouse button emulation configuration is available on this device.
int libinput_device_config_calibration_has_matrix(struct libinput_device *device)
Check if the device can be calibrated via a calibration matrix.
libinput_config_drag_state
A config status to distinguish or set dragging on a device.
Definition libinput.h:4848
libinput_config_dwtp_state
Possible states for the disable-while-trackpointing feature.
Definition libinput.h:6389
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.
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.
uint32_t libinput_device_config_send_events_get_mode(struct libinput_device *device)
Get the send-event mode for this device.
libinput_config_drag_lock_state
Definition libinput.h:4923
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.
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_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.
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.
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.
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,...
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.
@ LIBINPUT_ACCEL_TYPE_FALLBACK
The default acceleration type used as a fallback when other acceleration types are not provided.
Definition libinput.h:5466
@ LIBINPUT_ACCEL_TYPE_SCROLL
Acceleration type for scroll movement.
Definition libinput.h:5476
@ LIBINPUT_ACCEL_TYPE_MOTION
Acceleration type for regular pointer movement.
Definition libinput.h:5471
@ LIBINPUT_CONFIG_STATUS_UNSUPPORTED
Configuration not available on this device.
Definition libinput.h:4634
@ LIBINPUT_CONFIG_STATUS_SUCCESS
Config applied successfully.
Definition libinput.h:4633
@ LIBINPUT_CONFIG_STATUS_INVALID
Invalid parameter range.
Definition libinput.h:4636
@ LIBINPUT_CONFIG_CLICK_METHOD_NONE
Do not send software-emulated button events.
Definition libinput.h:5742
@ LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
Use software-button areas to generate button events.
Definition libinput.h:5746
@ LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
The number of fingers decides which button press to generate.
Definition libinput.h:5750
@ LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED
Middle mouse button emulation is to be disabled, or is currently disabled.
Definition libinput.h:5900
@ LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED
Middle mouse button emulation is to be enabled, or is currently enabled.
Definition libinput.h:5905
@ LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
Send events from this device normally.
Definition libinput.h:5123
@ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
Do not send events through this device.
Definition libinput.h:5137
@ LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
If an external pointer device is plugged in, do not send events from this device.
Definition libinput.h:5143
@ LIBINPUT_CONFIG_SCROLL_EDGE
Send scroll events when a finger moves along the bottom or right edge of a device.
Definition libinput.h:6035
@ LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
Send scroll events when a button is down and the device moves along a scroll-capable axis.
Definition libinput.h:6040
@ LIBINPUT_CONFIG_SCROLL_2FG
Send scroll events when two fingers are logically down on the device.
Definition libinput.h:6030
@ LIBINPUT_CONFIG_SCROLL_NO_SCROLL
Never send scroll events instead of pointer motion events.
Definition libinput.h:6025
@ LIBINPUT_CONFIG_TAP_MAP_LRM
1/2/3 finger tap maps to left/right/middle
Definition libinput.h:4746
@ LIBINPUT_CONFIG_TAP_MAP_LMR
1/2/3 finger tap maps to left/middle/right
Definition libinput.h:4748
@ LIBINPUT_CONFIG_CLICKFINGER_MAP_LMR
1/2/3 finger click maps to left/middle/right
Definition libinput.h:4758
@ LIBINPUT_CONFIG_CLICKFINGER_MAP_LRM
1/2/3 finger click maps to left/right/middle
Definition libinput.h:4756
@ LIBINPUT_CONFIG_TAP_DISABLED
Tapping is to be disabled, or is currently disabled.
Definition libinput.h:4655
@ LIBINPUT_CONFIG_TAP_ENABLED
Tapping is to be enabled, or is currently enabled.
Definition libinput.h:4657
@ LIBINPUT_CONFIG_DWT_DISABLED
Definition libinput.h:6299
@ LIBINPUT_CONFIG_DWT_ENABLED
Definition libinput.h:6300
@ LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
An adaptive acceleration profile.
Definition libinput.h:5338
@ LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM
A custom acceleration profile.
Definition libinput.h:5347
@ LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
A flat acceleration profile.
Definition libinput.h:5332
@ LIBINPUT_CONFIG_ACCEL_PROFILE_NONE
Placeholder for devices that don't have a configurable pointer acceleration profile.
Definition libinput.h:5324
@ LIBINPUT_CONFIG_DRAG_ENABLED
Drag is to be enabled, or is currently enabled.
Definition libinput.h:4858
@ LIBINPUT_CONFIG_DRAG_DISABLED
Drag is to be disabled, or is currently disabled.
Definition libinput.h:4853
@ LIBINPUT_CONFIG_DWTP_DISABLED
Definition libinput.h:6390
@ LIBINPUT_CONFIG_DWTP_ENABLED
Definition libinput.h:6391
@ LIBINPUT_CONFIG_DRAG_LOCK_ENABLED
Drag lock is to be enabled, or is currently disabled.
Definition libinput.h:4927
@ LIBINPUT_CONFIG_DRAG_LOCK_DISABLED
Drag lock is to be disabled, or is currently disabled.
Definition libinput.h:4925
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...
struct libinput_device * libinput_device_unref(struct libinput_device *device)
Decrease the refcount of the input device.
const char * libinput_device_get_sysname(struct libinput_device *device)
Get the system name of the device.
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.
void * libinput_device_get_user_data(struct libinput_device *device)
Get the caller-specific data associated with this input device, if any.
libinput_device_capability
Capabilities on a device.
Definition libinput.h:192
libinput_key_state
Logical state of a key.
Definition libinput.h:208
libinput_led
Mask reflecting LEDs on a device.
Definition libinput.h:218
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.
libinput_switch
The type of a switch.
Definition libinput.h:700
libinput_button_state
Logical state of a physical button.
Definition libinput.h:230
libinput_tablet_tool_proximity_state
The state of proximity for a tool on a device.
Definition libinput.h:376
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.
void libinput_device_set_user_data(struct libinput_device *device, void *user_data)
Set caller-specific data associated with this input device.
int libinput_device_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.
libinput_switch_state
The state of a switch.
Definition libinput.h:688
struct libinput_device_group * libinput_device_group_unref(struct libinput_device_group *group)
Decrease the refcount of the device group.
libinput_pointer_axis_source
The source for a libinput_pointer_axis event.
Definition libinput.h:264
struct libinput_device_group * libinput_device_get_device_group(struct libinput_device *device)
Get the device group this device is assigned to.
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...
libinput_pointer_axis
Axes on a device with the capability LIBINPUT_DEVICE_CAP_POINTER that are not x or y coordinates.
Definition libinput.h:247
libinput_tablet_tool_type
Available tool types for a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capability.
Definition libinput.h:346
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...
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.
struct libinput * libinput_device_get_context(struct libinput_device *device)
Get the libinput context from the device.
int libinput_device_has_capability(struct libinput_device *device, enum libinput_device_capability capability)
Check if the given device has the specified capability.
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...
struct libinput_device_group * libinput_device_group_ref(struct libinput_device_group *group)
Increase the refcount of the device group.
const char * libinput_device_get_output_name(struct libinput_device *device)
A device may be mapped to a single output, or all available outputs.
int libinput_device_get_size(struct libinput_device *device, double *width, double *height)
Get the physical size of a device in mm, where meaningful.
libinput_tablet_tool_tip_state
The tip contact state for a tool on a device.
Definition libinput.h:392
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.
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.
unsigned int libinput_device_get_id_bustype(struct libinput_device *device)
Get the bus type ID for this device.
int libinput_device_touch_get_touch_count(struct libinput_device *device)
Check how many touches a LIBINPUT_DEVICE_CAP_TOUCH device supports simultaneously.
unsigned int libinput_device_get_id_vendor(struct libinput_device *device)
Get the vendor ID for this device.
unsigned int libinput_device_get_id_product(struct libinput_device *device)
Get the product ID for this device.
struct libinput_device * libinput_device_ref(struct libinput_device *device)
Increase the refcount of the input device.
void libinput_device_group_set_user_data(struct libinput_device_group *group, void *user_data)
Set caller-specific data associated with this device group.
struct libinput_seat * libinput_device_get_seat(struct libinput_device *device)
Get the seat associated with this input 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.
void libinput_device_led_update(struct libinput_device *device, enum libinput_led leds)
Update the LEDs on the device, if any.
@ LIBINPUT_DEVICE_CAP_GESTURE
Definition libinput.h:198
@ LIBINPUT_DEVICE_CAP_POINTER
Definition libinput.h:194
@ LIBINPUT_DEVICE_CAP_KEYBOARD
Definition libinput.h:193
@ LIBINPUT_DEVICE_CAP_TABLET_PAD
Definition libinput.h:197
@ LIBINPUT_DEVICE_CAP_TOUCH
Definition libinput.h:195
@ LIBINPUT_DEVICE_CAP_TABLET_TOOL
Definition libinput.h:196
@ LIBINPUT_DEVICE_CAP_SWITCH
Definition libinput.h:199
@ LIBINPUT_KEY_STATE_PRESSED
Definition libinput.h:210
@ LIBINPUT_KEY_STATE_RELEASED
Definition libinput.h:209
@ LIBINPUT_LED_CAPS_LOCK
Definition libinput.h:220
@ LIBINPUT_LED_SCROLL_LOCK
Definition libinput.h:221
@ LIBINPUT_LED_NUM_LOCK
Definition libinput.h:219
@ LIBINPUT_SWITCH_TABLET_MODE
This switch indicates whether the device is in normal laptop mode or behaves like a tablet-like devic...
Definition libinput.h:722
@ LIBINPUT_SWITCH_LID
The laptop lid was closed when the switch state is LIBINPUT_SWITCH_STATE_ON, or was opened when it is...
Definition libinput.h:706
@ LIBINPUT_BUTTON_STATE_PRESSED
Definition libinput.h:232
@ LIBINPUT_BUTTON_STATE_RELEASED
Definition libinput.h:231
@ LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN
Definition libinput.h:378
@ LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT
Definition libinput.h:377
@ LIBINPUT_SWITCH_STATE_OFF
Definition libinput.h:689
@ LIBINPUT_SWITCH_STATE_ON
Definition libinput.h:690
@ LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS
The event is caused by the motion of some device.
Definition libinput.h:277
@ LIBINPUT_POINTER_AXIS_SOURCE_WHEEL
The event is caused by the rotation of a wheel.
Definition libinput.h:268
@ LIBINPUT_POINTER_AXIS_SOURCE_FINGER
The event is caused by the movement of one or more fingers on a device.
Definition libinput.h:273
@ LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT
The event is caused by the tilting of a mouse wheel rather than its rotation.
Definition libinput.h:287
@ LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL
Definition libinput.h:248
@ LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL
Definition libinput.h:249
@ LIBINPUT_TABLET_TOOL_TYPE_MOUSE
A mouse bound to the tablet.
Definition libinput.h:353
@ LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH
An airbrush-like tool.
Definition libinput.h:352
@ LIBINPUT_TABLET_TOOL_TYPE_TOTEM
A rotary device with positional and rotation data.
Definition libinput.h:355
@ LIBINPUT_TABLET_TOOL_TYPE_LENS
A mouse tool with a lens.
Definition libinput.h:354
@ LIBINPUT_TABLET_TOOL_TYPE_ERASER
Eraser.
Definition libinput.h:348
@ LIBINPUT_TABLET_TOOL_TYPE_PEN
A generic pen.
Definition libinput.h:347
@ LIBINPUT_TABLET_TOOL_TYPE_BRUSH
A paintbrush-like tool.
Definition libinput.h:349
@ LIBINPUT_TABLET_TOOL_TYPE_PENCIL
Physical drawing tool, e.g.
Definition libinput.h:350
@ LIBINPUT_TABLET_TOOL_TIP_DOWN
Definition libinput.h:394
@ LIBINPUT_TABLET_TOOL_TIP_UP
Definition libinput.h:393
uint64_t libinput_event_gesture_get_time_usec(struct libinput_event_gesture *event)
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_gesture_get_dy_unaccelerated(struct libinput_event_gesture *event)
Return the relative delta of the unaccelerated motion vector of the current event.
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...
uint32_t libinput_event_gesture_get_time(struct libinput_event_gesture *event)
int libinput_event_gesture_get_cancelled(struct libinput_event_gesture *event)
Return if the gesture ended normally, or if it was cancelled.
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.
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...
struct libinput_event * libinput_event_gesture_get_base_event(struct libinput_event_gesture *event)
double libinput_event_gesture_get_dy(struct libinput_event_gesture *event)
Return the delta between the last event and the current event.
int libinput_event_gesture_get_finger_count(struct libinput_event_gesture *event)
Return the number of fingers used for a gesture.
uint32_t libinput_event_keyboard_get_time(struct libinput_event_keyboard *event)
uint64_t libinput_event_keyboard_get_time_usec(struct libinput_event_keyboard *event)
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...
struct libinput_event * libinput_event_keyboard_get_base_event(struct libinput_event_keyboard *event)
uint32_t libinput_event_keyboard_get_key(struct libinput_event_keyboard *event)
enum libinput_key_state libinput_event_keyboard_get_key_state(struct libinput_event_keyboard *event)
uint32_t libinput_event_pointer_get_seat_button_count(struct libinput_event_pointer *event)
For the button of a LIBINPUT_EVENT_POINTER_BUTTON event, return the total number of buttons pressed o...
int libinput_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_pointer_axis_source libinput_event_pointer_get_axis_source(struct libinput_event_pointer *event)
Return the source for a given axis event.
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.
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_dy_unaccelerated(struct libinput_event_pointer *event)
Return the relative delta of the unaccelerated motion vector of 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...
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.
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 ...
enum libinput_button_state libinput_event_pointer_get_button_state(struct libinput_event_pointer *event)
Return the button state that triggered this 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.
uint32_t libinput_event_pointer_get_button(struct libinput_event_pointer *event)
Return the button that triggered this event.
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_pointer_get_dy(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 ...
uint32_t libinput_event_pointer_get_time(struct libinput_event_pointer *event)
double libinput_event_pointer_get_dx_unaccelerated(struct libinput_event_pointer *event)
Return the relative delta of the unaccelerated motion vector of the current event.
struct libinput_event * libinput_event_pointer_get_base_event(struct libinput_event_pointer *event)
uint64_t libinput_event_pointer_get_time_usec(struct libinput_event_pointer *event)
enum libinput_switch libinput_event_switch_get_switch(struct libinput_event_switch *event)
Return the switch that triggered this event.
uint64_t libinput_event_switch_get_time_usec(struct libinput_event_switch *event)
uint32_t libinput_event_switch_get_time(struct libinput_event_switch *event)
struct libinput_event * libinput_event_switch_get_base_event(struct libinput_event_switch *event)
enum libinput_switch_state libinput_event_switch_get_switch_state(struct libinput_event_switch *event)
Return the switch state that triggered this event.
libinput_tablet_pad_strip_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_STRIP event.
Definition libinput.h:315
uint32_t libinput_event_tablet_pad_get_time(struct libinput_event_tablet_pad *event)
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.
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.
uint32_t libinput_event_tablet_pad_get_key(struct libinput_event_tablet_pad *event)
Return the key code that triggered this event, e.g.
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.
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.
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...
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...
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...
uint64_t libinput_event_tablet_pad_get_time_usec(struct libinput_event_tablet_pad *event)
enum libinput_button_state libinput_event_tablet_pad_get_button_state(struct libinput_event_tablet_pad *event)
Return the button state of the event.
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.
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_key_state libinput_event_tablet_pad_get_key_state(struct libinput_event_tablet_pad *event)
Return the key state of the event.
struct libinput_event * libinput_event_tablet_pad_get_base_event(struct libinput_event_tablet_pad *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.
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-...
libinput_tablet_pad_ring_axis_source
The source for a LIBINPUT_EVENT_TABLET_PAD_RING event.
Definition libinput.h:298
@ LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN
Definition libinput.h:316
@ LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER
The event is caused by the movement of one or more fingers on the strip.
Definition libinput.h:321
@ LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN
Definition libinput.h:299
@ LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER
The event is caused by the movement of one or more fingers on the ring.
Definition libinput.h:304
double libinput_event_tablet_tool_get_wheel_delta(struct libinput_event_tablet_tool *event)
Return the delta for the wheel in degrees.
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_button_state libinput_event_tablet_tool_get_button_state(struct libinput_event_tablet_tool *event)
Return the button state of the event.
int libinput_event_tablet_tool_distance_has_changed(struct libinput_event_tablet_tool *event)
Check if the distance axis was updated in this event.
struct libinput_tablet_tool * libinput_tablet_tool_ref(struct libinput_tablet_tool *tool)
Increment the reference count of the tool by one.
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.
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,...
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.
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.
int libinput_event_tablet_tool_y_has_changed(struct libinput_event_tablet_tool *event)
Check if the y axis was updated in this 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.
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,...
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.
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_slider_has_changed(struct libinput_event_tablet_tool *event)
Check if the slider axis was updated in this event.
void * libinput_tablet_tool_get_user_data(struct libinput_tablet_tool *tool)
Return the user data associated with a tool object.
uint64_t libinput_tablet_tool_get_tool_id(struct libinput_tablet_tool *tool)
Return the tool ID for a tool object.
int libinput_event_tablet_tool_x_has_changed(struct libinput_event_tablet_tool *event)
Check if the x axis was updated in this event.
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,...
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.
int libinput_tablet_tool_has_distance(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports distance.
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.
double libinput_event_tablet_tool_get_dy(struct libinput_event_tablet_tool *event)
Return the delta between the last event and the current event.
uint64_t libinput_event_tablet_tool_get_time_usec(struct libinput_event_tablet_tool *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.
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.
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.
struct libinput_event * libinput_event_tablet_tool_get_base_event(struct libinput_event_tablet_tool *event)
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...
struct libinput_tablet_tool * libinput_tablet_tool_unref(struct libinput_tablet_tool *tool)
Decrement the reference count of the tool by one.
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.
int libinput_tablet_tool_has_pressure(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports pressure.
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.
int libinput_tablet_tool_has_rotation(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports z-rotation.
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.
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,...
int libinput_tablet_tool_has_size(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a ellipsis major and minor.
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...
uint32_t libinput_event_tablet_tool_get_time(struct libinput_event_tablet_tool *event)
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...
int libinput_event_tablet_tool_wheel_has_changed(struct libinput_event_tablet_tool *event)
Check if the wheel axis was updated in this event.
int libinput_tablet_tool_has_tilt(struct libinput_tablet_tool *tool)
Return whether the tablet tool supports tilt.
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).
uint64_t libinput_tablet_tool_get_serial(struct libinput_tablet_tool *tool)
Return the serial number of a tool.
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.
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.
int libinput_tablet_tool_has_wheel(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a relative wheel.
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,...
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.
int libinput_tablet_tool_has_slider(struct libinput_tablet_tool *tool)
Return whether the tablet tool has a slider axis.
uint32_t libinput_event_tablet_tool_get_button(struct libinput_event_tablet_tool *event)
Return the button that triggered this 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...
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...
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.
struct libinput_event * libinput_event_touch_get_base_event(struct libinput_event_touch *event)
uint32_t libinput_event_touch_get_time(struct libinput_event_touch *event)
uint64_t libinput_event_touch_get_time_usec(struct libinput_event_touch *event)
int32_t libinput_event_touch_get_seat_slot(struct libinput_event_touch *event)
Get the seat slot of the touch event.
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...
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.
int32_t libinput_event_touch_get_slot(struct libinput_event_touch *event)
Get the slot of this touch event.
struct libinput_event_keyboard * libinput_event_get_keyboard_event(struct libinput_event *event)
Return the keyboard event that is this input event.
void libinput_event_destroy(struct libinput_event *event)
Destroy the event, freeing all associated resources.
struct libinput_event_gesture * libinput_event_get_gesture_event(struct libinput_event *event)
Return the gesture event that is this input event.
enum libinput_event_type libinput_event_get_type(struct libinput_event *event)
Get the type of the event.
struct libinput * libinput_event_get_context(struct libinput_event *event)
Get the libinput context from the event.
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.
struct libinput_event * libinput_event_device_notify_get_base_event(struct libinput_event_device_notify *event)
struct libinput_event_touch * libinput_event_get_touch_event(struct libinput_event *event)
Return the touch event that is this input event.
struct libinput_event_pointer * libinput_event_get_pointer_event(struct libinput_event *event)
Return the pointer event that is this input event.
struct libinput_device * libinput_event_get_device(struct libinput_event *event)
Return the device associated with this event.
struct libinput_event_switch * libinput_event_get_switch_event(struct libinput_event *event)
Return the switch event that is this input event.
struct libinput_event_device_notify * libinput_event_get_device_notify_event(struct libinput_event *event)
Return the device event that is this input event.
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.
struct libinput_seat * libinput_seat_ref(struct libinput_seat *seat)
Increase the refcount of the seat.
const char * libinput_seat_get_physical_name(struct libinput_seat *seat)
Return the physical name of the seat.
void libinput_seat_set_user_data(struct libinput_seat *seat, void *user_data)
Set caller-specific data associated with this seat.
void * libinput_seat_get_user_data(struct libinput_seat *seat)
Get the caller-specific data associated with this seat, if any.
const char * libinput_seat_get_logical_name(struct libinput_seat *seat)
Return the logical name of the seat.
struct libinput_seat * libinput_seat_unref(struct libinput_seat *seat)
Decrease the refcount of the seat.
struct libinput * libinput_seat_get_context(struct libinput_seat *seat)
Get the libinput context from the seat.
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.
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.
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.
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.
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 ...
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.
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.
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.
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().
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.
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.
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.
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...
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.
#define LIBINPUT_ATTRIBUTE_PRINTF(_format, _args)
Definition libinput.h:37
libinput_config_scroll_button_lock_state
Definition libinput.h:6218
@ LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED
Definition libinput.h:6220
@ LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED
Definition libinput.h:6219
A base handle for accessing libinput device groups.
A base handle for accessing libinput devices.
An event notifying the caller of a device being added or removed.
A keyboard event representing a key press/release.
A pointer event representing relative or absolute pointer movement, a button press/release or scroll ...
A switch event representing a changed state in a switch.
Tablet pad event representing a button press, or ring/strip update on the tablet pad itself.
Tablet tool event representing an axis update, button press, or tool update.
Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events.
The base event type.
libinput does not open file descriptors to devices directly, instead open_restricted() and close_rest...
Definition libinput.h:3565
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:3577
void(* close_restricted)(int fd, void *user_data)
Close the file descriptor.
Definition libinput.h:3585
The base handle for accessing libinput seats.
A mode on a tablet pad is a virtual grouping of functionality, usually based on some visual feedback ...
An object representing a tool being used by a device with the LIBINPUT_DEVICE_CAP_TABLET_TOOL capabil...
A handle for accessing libinput.