libinput 1.15.4
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
doc
api
libinput.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2013 Jonas Ådahl
3
* Copyright © 2013-2015 Red Hat, Inc.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a
6
* copy of this software and associated documentation files (the "Software"),
7
* to deal in the Software without restriction, including without limitation
8
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
* and/or sell copies of the Software, and to permit persons to whom the
10
* Software is furnished to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice (including the next
13
* paragraph) shall be included in all copies or substantial portions of the
14
* Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
* DEALINGS IN THE SOFTWARE.
23
*/
24
25
#ifndef LIBINPUT_H
26
#define LIBINPUT_H
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
#include <stdlib.h>
33
#include <stdint.h>
34
#include <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
48
struct
libinput
;
49
57
struct
libinput_device
;
58
67
struct
libinput_device_group
;
68
76
struct
libinput_seat
;
77
96
struct
libinput_tablet_tool
;
97
108
struct
libinput_event
;
109
116
struct
libinput_event_device_notify
;
117
124
struct
libinput_event_keyboard
;
125
133
struct
libinput_event_pointer
;
134
145
struct
libinput_event_touch
;
146
159
struct
libinput_event_tablet_tool
;
160
172
struct
libinput_event_tablet_pad
;
173
179
enum
libinput_log_priority
{
180
LIBINPUT_LOG_PRIORITY_DEBUG
= 10,
181
LIBINPUT_LOG_PRIORITY_INFO
= 20,
182
LIBINPUT_LOG_PRIORITY_ERROR
= 30,
183
};
184
191
enum
libinput_device_capability
{
192
LIBINPUT_DEVICE_CAP_KEYBOARD
= 0,
193
LIBINPUT_DEVICE_CAP_POINTER
= 1,
194
LIBINPUT_DEVICE_CAP_TOUCH
= 2,
195
LIBINPUT_DEVICE_CAP_TABLET_TOOL
= 3,
196
LIBINPUT_DEVICE_CAP_TABLET_PAD
= 4,
197
LIBINPUT_DEVICE_CAP_GESTURE
= 5,
198
LIBINPUT_DEVICE_CAP_SWITCH
= 6,
199
};
200
207
enum
libinput_key_state
{
208
LIBINPUT_KEY_STATE_RELEASED
= 0,
209
LIBINPUT_KEY_STATE_PRESSED
= 1
210
};
211
217
enum
libinput_led
{
218
LIBINPUT_LED_NUM_LOCK
= (1 << 0),
219
LIBINPUT_LED_CAPS_LOCK
= (1 << 1),
220
LIBINPUT_LED_SCROLL_LOCK
= (1 << 2)
221
};
222
229
enum
libinput_button_state
{
230
LIBINPUT_BUTTON_STATE_RELEASED
= 0,
231
LIBINPUT_BUTTON_STATE_PRESSED
= 1
232
};
233
246
enum
libinput_pointer_axis
{
247
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL
= 0,
248
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL
= 1,
249
};
250
257
enum
libinput_pointer_axis_source
{
261
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL
= 1,
266
LIBINPUT_POINTER_AXIS_SOURCE_FINGER
,
270
LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS
,
276
LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT
,
277
};
278
287
enum
libinput_tablet_pad_ring_axis_source
{
288
LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN
= 1,
293
LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER
,
294
};
295
304
enum
libinput_tablet_pad_strip_axis_source
{
305
LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN
= 1,
310
LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER
,
311
};
312
335
enum
libinput_tablet_tool_type
{
336
LIBINPUT_TABLET_TOOL_TYPE_PEN
= 1,
337
LIBINPUT_TABLET_TOOL_TYPE_ERASER
,
338
LIBINPUT_TABLET_TOOL_TYPE_BRUSH
,
339
LIBINPUT_TABLET_TOOL_TYPE_PENCIL
,
341
LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH
,
342
LIBINPUT_TABLET_TOOL_TYPE_MOUSE
,
343
LIBINPUT_TABLET_TOOL_TYPE_LENS
,
344
LIBINPUT_TABLET_TOOL_TYPE_TOTEM
,
347
};
348
365
enum
libinput_tablet_tool_proximity_state
{
366
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT
= 0,
367
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN
= 1,
368
};
369
381
enum
libinput_tablet_tool_tip_state
{
382
LIBINPUT_TABLET_TOOL_TIP_UP
= 0,
383
LIBINPUT_TABLET_TOOL_TIP_DOWN
= 1,
384
};
385
413
struct
libinput_tablet_pad_mode_group
;
414
430
int
431
libinput_device_tablet_pad_get_num_mode_groups
(
struct
libinput_device
*device);
432
455
struct
libinput_tablet_pad_mode_group
*
456
libinput_device_tablet_pad_get_mode_group
(
struct
libinput_device
*device,
457
unsigned
int
index);
458
471
unsigned
int
472
libinput_tablet_pad_mode_group_get_index
(
struct
libinput_tablet_pad_mode_group
*group);
473
491
unsigned
int
492
libinput_tablet_pad_mode_group_get_num_modes
(
struct
libinput_tablet_pad_mode_group
*group);
493
513
unsigned
int
514
libinput_tablet_pad_mode_group_get_mode
(
struct
libinput_tablet_pad_mode_group
*group);
515
528
int
529
libinput_tablet_pad_mode_group_has_button
(
struct
libinput_tablet_pad_mode_group
*group,
530
unsigned
int
button);
531
544
int
545
libinput_tablet_pad_mode_group_has_ring
(
struct
libinput_tablet_pad_mode_group
*group,
546
unsigned
int
ring);
547
560
int
561
libinput_tablet_pad_mode_group_has_strip
(
struct
libinput_tablet_pad_mode_group
*group,
562
unsigned
int
strip);
563
582
int
583
libinput_tablet_pad_mode_group_button_is_toggle
(
struct
libinput_tablet_pad_mode_group
*group,
584
unsigned
int
button);
585
597
struct
libinput_tablet_pad_mode_group
*
598
libinput_tablet_pad_mode_group_ref
(
599
struct
libinput_tablet_pad_mode_group
*group);
600
612
struct
libinput_tablet_pad_mode_group
*
613
libinput_tablet_pad_mode_group_unref
(
614
struct
libinput_tablet_pad_mode_group
*group);
615
629
void
630
libinput_tablet_pad_mode_group_set_user_data
(
631
struct
libinput_tablet_pad_mode_group
*group,
632
void
*user_data);
633
645
void
*
646
libinput_tablet_pad_mode_group_get_user_data
(
647
struct
libinput_tablet_pad_mode_group
*group);
648
660
enum
libinput_switch_state
{
661
LIBINPUT_SWITCH_STATE_OFF
= 0,
662
LIBINPUT_SWITCH_STATE_ON
= 1,
663
};
664
672
enum
libinput_switch
{
678
LIBINPUT_SWITCH_LID
= 1,
679
694
LIBINPUT_SWITCH_TABLET_MODE
,
695
};
696
705
struct
libinput_event_switch
;
706
712
enum
libinput_event_type
{
718
LIBINPUT_EVENT_NONE
= 0,
719
728
LIBINPUT_EVENT_DEVICE_ADDED
,
729
734
LIBINPUT_EVENT_DEVICE_REMOVED
,
735
736
LIBINPUT_EVENT_KEYBOARD_KEY
= 300,
737
738
LIBINPUT_EVENT_POINTER_MOTION
= 400,
739
LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE
,
740
LIBINPUT_EVENT_POINTER_BUTTON
,
741
LIBINPUT_EVENT_POINTER_AXIS
,
742
743
LIBINPUT_EVENT_TOUCH_DOWN
= 500,
744
LIBINPUT_EVENT_TOUCH_UP
,
745
LIBINPUT_EVENT_TOUCH_MOTION
,
746
LIBINPUT_EVENT_TOUCH_CANCEL
,
751
LIBINPUT_EVENT_TOUCH_FRAME
,
752
772
LIBINPUT_EVENT_TABLET_TOOL_AXIS
= 600,
799
LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY
,
824
LIBINPUT_EVENT_TABLET_TOOL_TIP
,
842
LIBINPUT_EVENT_TABLET_TOOL_BUTTON
,
843
859
LIBINPUT_EVENT_TABLET_PAD_BUTTON
= 700,
866
LIBINPUT_EVENT_TABLET_PAD_RING
,
867
874
LIBINPUT_EVENT_TABLET_PAD_STRIP
,
875
887
LIBINPUT_EVENT_TABLET_PAD_KEY
,
888
889
LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN
= 800,
890
LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE
,
891
LIBINPUT_EVENT_GESTURE_SWIPE_END
,
892
LIBINPUT_EVENT_GESTURE_PINCH_BEGIN
,
893
LIBINPUT_EVENT_GESTURE_PINCH_UPDATE
,
894
LIBINPUT_EVENT_GESTURE_PINCH_END
,
895
899
LIBINPUT_EVENT_SWITCH_TOGGLE
= 900,
900
};
901
918
void
919
libinput_event_destroy
(
struct
libinput_event
*event);
920
928
enum
libinput_event_type
929
libinput_event_get_type
(
struct
libinput_event
*event);
930
939
struct
libinput
*
940
libinput_event_get_context
(
struct
libinput_event
*event);
941
955
struct
libinput_device
*
956
libinput_event_get_device
(
struct
libinput_event
*event);
957
968
struct
libinput_event_pointer
*
969
libinput_event_get_pointer_event
(
struct
libinput_event
*event);
970
981
struct
libinput_event_keyboard
*
982
libinput_event_get_keyboard_event
(
struct
libinput_event
*event);
983
994
struct
libinput_event_touch
*
995
libinput_event_get_touch_event
(
struct
libinput_event
*event);
996
1014
struct
libinput_event_gesture *
1015
libinput_event_get_gesture_event
(
struct
libinput_event
*event);
1016
1029
struct
libinput_event_tablet_tool
*
1030
libinput_event_get_tablet_tool_event
(
struct
libinput_event
*event);
1031
1042
struct
libinput_event_tablet_pad
*
1043
libinput_event_get_tablet_pad_event
(
struct
libinput_event
*event);
1044
1057
struct
libinput_event_switch
*
1058
libinput_event_get_switch_event
(
struct
libinput_event
*event);
1059
1071
struct
libinput_event_device_notify
*
1072
libinput_event_get_device_notify_event
(
struct
libinput_event
*event);
1073
1079
struct
libinput_event
*
1080
libinput_event_device_notify_get_base_event
(
struct
libinput_event_device_notify
*event);
1081
1097
uint32_t
1098
libinput_event_keyboard_get_time
(
struct
libinput_event_keyboard
*event);
1099
1108
uint64_t
1109
libinput_event_keyboard_get_time_usec
(
struct
libinput_event_keyboard
*event);
1110
1116
uint32_t
1117
libinput_event_keyboard_get_key
(
struct
libinput_event_keyboard
*event);
1118
1124
enum
libinput_key_state
1125
libinput_event_keyboard_get_key_state
(
struct
libinput_event_keyboard
*event);
1126
1132
struct
libinput_event
*
1133
libinput_event_keyboard_get_base_event
(
struct
libinput_event_keyboard
*event);
1134
1147
uint32_t
1148
libinput_event_keyboard_get_seat_key_count
(
1149
struct
libinput_event_keyboard
*event);
1150
1166
uint32_t
1167
libinput_event_pointer_get_time
(
struct
libinput_event_pointer
*event);
1168
1177
uint64_t
1178
libinput_event_pointer_get_time_usec
(
struct
libinput_event_pointer
*event);
1179
1198
double
1199
libinput_event_pointer_get_dx
(
struct
libinput_event_pointer
*event);
1200
1219
double
1220
libinput_event_pointer_get_dy
(
struct
libinput_event_pointer
*event);
1221
1243
double
1244
libinput_event_pointer_get_dx_unaccelerated
(
1245
struct
libinput_event_pointer
*event);
1246
1268
double
1269
libinput_event_pointer_get_dy_unaccelerated
(
1270
struct
libinput_event_pointer
*event);
1271
1287
double
1288
libinput_event_pointer_get_absolute_x
(
struct
libinput_event_pointer
*event);
1289
1305
double
1306
libinput_event_pointer_get_absolute_y
(
struct
libinput_event_pointer
*event);
1307
1325
double
1326
libinput_event_pointer_get_absolute_x_transformed
(
1327
struct
libinput_event_pointer
*event,
1328
uint32_t width);
1329
1347
double
1348
libinput_event_pointer_get_absolute_y_transformed
(
1349
struct
libinput_event_pointer
*event,
1350
uint32_t height);
1351
1364
uint32_t
1365
libinput_event_pointer_get_button
(
struct
libinput_event_pointer
*event);
1366
1379
enum
libinput_button_state
1380
libinput_event_pointer_get_button_state
(
struct
libinput_event_pointer
*event);
1381
1395
uint32_t
1396
libinput_event_pointer_get_seat_button_count
(
1397
struct
libinput_event_pointer
*event);
1398
1416
int
1417
libinput_event_pointer_has_axis
(
struct
libinput_event_pointer
*event,
1418
enum
libinput_pointer_axis
axis);
1419
1444
double
1445
libinput_event_pointer_get_axis_value
(
struct
libinput_event_pointer
*event,
1446
enum
libinput_pointer_axis
axis);
1447
1492
enum
libinput_pointer_axis_source
1493
libinput_event_pointer_get_axis_source
(
struct
libinput_event_pointer
*event);
1494
1511
double
1512
libinput_event_pointer_get_axis_value_discrete
(
struct
libinput_event_pointer
*event,
1513
enum
libinput_pointer_axis
axis);
1514
1520
struct
libinput_event
*
1521
libinput_event_pointer_get_base_event
(
struct
libinput_event_pointer
*event);
1522
1537
uint32_t
1538
libinput_event_touch_get_time
(
struct
libinput_event_touch
*event);
1539
1548
uint64_t
1549
libinput_event_touch_get_time_usec
(
struct
libinput_event_touch
*event);
1550
1570
int32_t
1571
libinput_event_touch_get_slot
(
struct
libinput_event_touch
*event);
1572
1592
int32_t
1593
libinput_event_touch_get_seat_slot
(
struct
libinput_event_touch
*event);
1594
1612
double
1613
libinput_event_touch_get_x
(
struct
libinput_event_touch
*event);
1614
1632
double
1633
libinput_event_touch_get_y
(
struct
libinput_event_touch
*event);
1634
1652
double
1653
libinput_event_touch_get_x_transformed
(
struct
libinput_event_touch
*event,
1654
uint32_t width);
1655
1673
double
1674
libinput_event_touch_get_y_transformed
(
struct
libinput_event_touch
*event,
1675
uint32_t height);
1676
1682
struct
libinput_event
*
1683
libinput_event_touch_get_base_event
(
struct
libinput_event_touch
*event);
1684
1707
uint32_t
1708
libinput_event_gesture_get_time
(
struct
libinput_event_gesture *event);
1709
1718
uint64_t
1719
libinput_event_gesture_get_time_usec
(
struct
libinput_event_gesture *event);
1720
1726
struct
libinput_event
*
1727
libinput_event_gesture_get_base_event
(
struct
libinput_event_gesture *event);
1728
1744
int
1745
libinput_event_gesture_get_finger_count
(
struct
libinput_event_gesture *event);
1746
1761
int
1762
libinput_event_gesture_get_cancelled
(
struct
libinput_event_gesture *event);
1763
1779
double
1780
libinput_event_gesture_get_dx
(
struct
libinput_event_gesture *event);
1781
1797
double
1798
libinput_event_gesture_get_dy
(
struct
libinput_event_gesture *event);
1799
1818
double
1819
libinput_event_gesture_get_dx_unaccelerated
(
1820
struct
libinput_event_gesture *event);
1821
1840
double
1841
libinput_event_gesture_get_dy_unaccelerated
(
1842
struct
libinput_event_gesture *event);
1843
1870
double
1871
libinput_event_gesture_get_scale
(
struct
libinput_event_gesture *event);
1872
1894
double
1895
libinput_event_gesture_get_angle_delta
(
struct
libinput_event_gesture *event);
1896
1921
struct
libinput_event
*
1922
libinput_event_tablet_tool_get_base_event
(
struct
libinput_event_tablet_tool
*event);
1923
1943
int
1944
libinput_event_tablet_tool_x_has_changed
(
1945
struct
libinput_event_tablet_tool
*event);
1946
1966
int
1967
libinput_event_tablet_tool_y_has_changed
(
1968
struct
libinput_event_tablet_tool
*event);
1969
1989
int
1990
libinput_event_tablet_tool_pressure_has_changed
(
1991
struct
libinput_event_tablet_tool
*event);
1992
2014
int
2015
libinput_event_tablet_tool_distance_has_changed
(
2016
struct
libinput_event_tablet_tool
*event);
2017
2037
int
2038
libinput_event_tablet_tool_tilt_x_has_changed
(
2039
struct
libinput_event_tablet_tool
*event);
2040
2060
int
2061
libinput_event_tablet_tool_tilt_y_has_changed
(
2062
struct
libinput_event_tablet_tool
*event);
2082
int
2083
libinput_event_tablet_tool_rotation_has_changed
(
2084
struct
libinput_event_tablet_tool
*event);
2104
int
2105
libinput_event_tablet_tool_slider_has_changed
(
2106
struct
libinput_event_tablet_tool
*event);
2107
2125
int
2126
libinput_event_tablet_tool_size_major_has_changed
(
2127
struct
libinput_event_tablet_tool
*event);
2128
2146
int
2147
libinput_event_tablet_tool_size_minor_has_changed
(
2148
struct
libinput_event_tablet_tool
*event);
2149
2169
int
2170
libinput_event_tablet_tool_wheel_has_changed
(
2171
struct
libinput_event_tablet_tool
*event);
2172
2189
double
2190
libinput_event_tablet_tool_get_x
(
struct
libinput_event_tablet_tool
*event);
2191
2208
double
2209
libinput_event_tablet_tool_get_y
(
struct
libinput_event_tablet_tool
*event);
2210
2227
double
2228
libinput_event_tablet_tool_get_dx
(
struct
libinput_event_tablet_tool
*event);
2229
2246
double
2247
libinput_event_tablet_tool_get_dy
(
struct
libinput_event_tablet_tool
*event);
2248
2262
double
2263
libinput_event_tablet_tool_get_pressure
(
struct
libinput_event_tablet_tool
*event);
2264
2278
double
2279
libinput_event_tablet_tool_get_distance
(
struct
libinput_event_tablet_tool
*event);
2280
2298
double
2299
libinput_event_tablet_tool_get_tilt_x
(
struct
libinput_event_tablet_tool
*event);
2300
2318
double
2319
libinput_event_tablet_tool_get_tilt_y
(
struct
libinput_event_tablet_tool
*event);
2320
2340
double
2341
libinput_event_tablet_tool_get_rotation
(
struct
libinput_event_tablet_tool
*event);
2342
2358
double
2359
libinput_event_tablet_tool_get_slider_position
(
struct
libinput_event_tablet_tool
*event);
2360
2376
double
2377
libinput_event_tablet_tool_get_size_major
(
struct
libinput_event_tablet_tool
*event);
2378
2394
double
2395
libinput_event_tablet_tool_get_size_minor
(
struct
libinput_event_tablet_tool
*event);
2396
2407
double
2408
libinput_event_tablet_tool_get_wheel_delta
(
2409
struct
libinput_event_tablet_tool
*event);
2410
2423
int
2424
libinput_event_tablet_tool_get_wheel_delta_discrete
(
2425
struct
libinput_event_tablet_tool
*event);
2426
2446
double
2447
libinput_event_tablet_tool_get_x_transformed
(
struct
libinput_event_tablet_tool
*event,
2448
uint32_t width);
2449
2469
double
2470
libinput_event_tablet_tool_get_y_transformed
(
struct
libinput_event_tablet_tool
*event,
2471
uint32_t height);
2472
2495
struct
libinput_tablet_tool
*
2496
libinput_event_tablet_tool_get_tool
(
struct
libinput_event_tablet_tool
*event);
2497
2524
enum
libinput_tablet_tool_proximity_state
2525
libinput_event_tablet_tool_get_proximity_state
(
struct
libinput_event_tablet_tool
*event);
2526
2540
enum
libinput_tablet_tool_tip_state
2541
libinput_event_tablet_tool_get_tip_state
(
struct
libinput_event_tablet_tool
*event);
2542
2557
uint32_t
2558
libinput_event_tablet_tool_get_button
(
struct
libinput_event_tablet_tool
*event);
2559
2573
enum
libinput_button_state
2574
libinput_event_tablet_tool_get_button_state
(
struct
libinput_event_tablet_tool
*event);
2575
2591
uint32_t
2592
libinput_event_tablet_tool_get_seat_button_count
(
struct
libinput_event_tablet_tool
*event);
2593
2605
uint32_t
2606
libinput_event_tablet_tool_get_time
(
struct
libinput_event_tablet_tool
*event);
2607
2619
uint64_t
2620
libinput_event_tablet_tool_get_time_usec
(
struct
libinput_event_tablet_tool
*event);
2621
2645
enum
libinput_tablet_tool_type
2646
libinput_tablet_tool_get_type
(
struct
libinput_tablet_tool
*tool);
2647
2667
uint64_t
2668
libinput_tablet_tool_get_tool_id
(
struct
libinput_tablet_tool
*tool);
2669
2683
struct
libinput_tablet_tool
*
2684
libinput_tablet_tool_ref
(
struct
libinput_tablet_tool
*tool);
2685
2700
struct
libinput_tablet_tool
*
2701
libinput_tablet_tool_unref
(
struct
libinput_tablet_tool
*tool);
2702
2713
int
2714
libinput_tablet_tool_has_pressure
(
struct
libinput_tablet_tool
*tool);
2715
2726
int
2727
libinput_tablet_tool_has_distance
(
struct
libinput_tablet_tool
*tool);
2728
2739
int
2740
libinput_tablet_tool_has_tilt
(
struct
libinput_tablet_tool
*tool);
2741
2752
int
2753
libinput_tablet_tool_has_rotation
(
struct
libinput_tablet_tool
*tool);
2754
2765
int
2766
libinput_tablet_tool_has_slider
(
struct
libinput_tablet_tool
*tool);
2767
2779
int
2780
libinput_tablet_tool_has_size
(
struct
libinput_tablet_tool
*tool);
2781
2792
int
2793
libinput_tablet_tool_has_wheel
(
struct
libinput_tablet_tool
*tool);
2794
2808
int
2809
libinput_tablet_tool_has_button
(
struct
libinput_tablet_tool
*tool,
2810
uint32_t code);
2811
2828
int
2829
libinput_tablet_tool_is_unique
(
struct
libinput_tablet_tool
*tool);
2830
2867
uint64_t
2868
libinput_tablet_tool_get_serial
(
struct
libinput_tablet_tool
*tool);
2869
2882
void
*
2883
libinput_tablet_tool_get_user_data
(
struct
libinput_tablet_tool
*tool);
2884
2895
void
2896
libinput_tablet_tool_set_user_data
(
struct
libinput_tablet_tool
*tool,
2897
void
*user_data);
2898
2915
struct
libinput_event
*
2916
libinput_event_tablet_pad_get_base_event
(
struct
libinput_event_tablet_pad
*event);
2917
2940
double
2941
libinput_event_tablet_pad_get_ring_position
(
struct
libinput_event_tablet_pad
*event);
2942
2959
unsigned
int
2960
libinput_event_tablet_pad_get_ring_number
(
struct
libinput_event_tablet_pad
*event);
2961
2978
enum
libinput_tablet_pad_ring_axis_source
2979
libinput_event_tablet_pad_get_ring_source
(
struct
libinput_event_tablet_pad
*event);
2980
3003
double
3004
libinput_event_tablet_pad_get_strip_position
(
struct
libinput_event_tablet_pad
*event);
3005
3022
unsigned
int
3023
libinput_event_tablet_pad_get_strip_number
(
struct
libinput_event_tablet_pad
*event);
3024
3041
enum
libinput_tablet_pad_strip_axis_source
3042
libinput_event_tablet_pad_get_strip_source
(
struct
libinput_event_tablet_pad
*event);
3043
3064
uint32_t
3065
libinput_event_tablet_pad_get_button_number
(
struct
libinput_event_tablet_pad
*event);
3066
3081
enum
libinput_button_state
3082
libinput_event_tablet_pad_get_button_state
(
struct
libinput_event_tablet_pad
*event);
3083
3102
uint32_t
3103
libinput_event_tablet_pad_get_key
(
struct
libinput_event_tablet_pad
*event);
3104
3119
enum
libinput_key_state
3120
libinput_event_tablet_pad_get_key_state
(
struct
libinput_event_tablet_pad
*event);
3121
3154
unsigned
int
3155
libinput_event_tablet_pad_get_mode
(
struct
libinput_event_tablet_pad
*event);
3156
3180
struct
libinput_tablet_pad_mode_group
*
3181
libinput_event_tablet_pad_get_mode_group
(
struct
libinput_event_tablet_pad
*event);
3182
3194
uint32_t
3195
libinput_event_tablet_pad_get_time
(
struct
libinput_event_tablet_pad
*event);
3196
3208
uint64_t
3209
libinput_event_tablet_pad_get_time_usec
(
struct
libinput_event_tablet_pad
*event);
3210
3232
enum
libinput_switch
3233
libinput_event_switch_get_switch
(
struct
libinput_event_switch
*event);
3234
3250
enum
libinput_switch_state
3251
libinput_event_switch_get_switch_state
(
struct
libinput_event_switch
*event);
3252
3260
struct
libinput_event
*
3261
libinput_event_switch_get_base_event
(
struct
libinput_event_switch
*event);
3262
3274
uint32_t
3275
libinput_event_switch_get_time
(
struct
libinput_event_switch
*event);
3276
3288
uint64_t
3289
libinput_event_switch_get_time_usec
(
struct
libinput_event_switch
*event);
3290
3306
struct
libinput_interface
{
3318
int (*
open_restricted
)(
const
char
*path,
int
flags,
void
*user_data);
3326
void (*
close_restricted
)(
int
fd,
void
*user_data);
3327
};
3328
3342
struct
libinput
*
3343
libinput_udev_create_context
(
const
struct
libinput_interface
*interface,
3344
void
*user_data,
3345
struct
udev *udev);
3346
3368
int
3369
libinput_udev_assign_seat
(
struct
libinput
*
libinput
,
3370
const
char
*seat_id);
3371
3391
struct
libinput
*
3392
libinput_path_create_context
(
const
struct
libinput_interface
*interface,
3393
void
*user_data);
3394
3415
struct
libinput_device
*
3416
libinput_path_add_device
(
struct
libinput
*
libinput
,
3417
const
char
*path);
3418
3437
void
3438
libinput_path_remove_device
(
struct
libinput_device
*device);
3439
3448
int
3449
libinput_get_fd
(
struct
libinput
*
libinput
);
3450
3468
int
3469
libinput_dispatch
(
struct
libinput
*
libinput
);
3470
3482
struct
libinput_event
*
3483
libinput_get_event
(
struct
libinput
*
libinput
);
3484
3496
enum
libinput_event_type
3497
libinput_next_event_type
(
struct
libinput
*
libinput
);
3498
3510
void
3511
libinput_set_user_data
(
struct
libinput
*
libinput
,
3512
void
*user_data);
3513
3524
void
*
3525
libinput_get_user_data
(
struct
libinput
*
libinput
);
3526
3538
int
3539
libinput_resume
(
struct
libinput
*
libinput
);
3540
3550
void
3551
libinput_suspend
(
struct
libinput
*
libinput
);
3552
3562
struct
libinput
*
3563
libinput_ref
(
struct
libinput
*
libinput
);
3564
3596
struct
libinput
*
3597
libinput_unref
(
struct
libinput
*
libinput
);
3598
3614
void
3615
libinput_log_set_priority
(
struct
libinput
*
libinput
,
3616
enum
libinput_log_priority
priority);
3617
3632
enum
libinput_log_priority
3633
libinput_log_get_priority
(
const
struct
libinput
*
libinput
);
3634
3649
typedef
void (*
libinput_log_handler
)(
struct
libinput
*
libinput
,
3650
enum
libinput_log_priority
priority,
3651
const
char
*format, va_list args)
3652
LIBINPUT_ATTRIBUTE_PRINTF
(3, 0);
3653
3669
void
3670
libinput_log_set_handler
(
struct
libinput *libinput,
3671
libinput_log_handler
log_handler);
3672
3694
struct
libinput_seat
*
3695
libinput_seat_ref
(
struct
libinput_seat
*seat);
3696
3708
struct
libinput_seat
*
3709
libinput_seat_unref
(
struct
libinput_seat
*seat);
3710
3722
void
3723
libinput_seat_set_user_data
(
struct
libinput_seat
*seat,
void
*user_data);
3724
3734
void
*
3735
libinput_seat_get_user_data
(
struct
libinput_seat
*seat);
3736
3745
struct
libinput *
3746
libinput_seat_get_context
(
struct
libinput_seat
*seat);
3747
3764
const
char
*
3765
libinput_seat_get_physical_name
(
struct
libinput_seat
*seat);
3766
3776
const
char
*
3777
libinput_seat_get_logical_name
(
struct
libinput_seat
*seat);
3778
3794
struct
libinput_device
*
3795
libinput_device_ref
(
struct
libinput_device
*device);
3796
3808
struct
libinput_device
*
3809
libinput_device_unref
(
struct
libinput_device
*device);
3810
3822
void
3823
libinput_device_set_user_data
(
struct
libinput_device
*device,
void
*user_data);
3824
3834
void
*
3835
libinput_device_get_user_data
(
struct
libinput_device
*device);
3836
3845
struct
libinput *
3846
libinput_device_get_context
(
struct
libinput_device
*device);
3847
3908
struct
libinput_device_group
*
3909
libinput_device_get_device_group
(
struct
libinput_device
*device);
3910
3922
const
char
*
3923
libinput_device_get_sysname
(
struct
libinput_device
*device);
3924
3938
const
char
*
3939
libinput_device_get_name
(
struct
libinput_device
*device);
3940
3949
unsigned
int
3950
libinput_device_get_id_product
(
struct
libinput_device
*device);
3951
3960
unsigned
int
3961
libinput_device_get_id_vendor
(
struct
libinput_device
*device);
3962
3982
const
char
*
3983
libinput_device_get_output_name
(
struct
libinput_device
*device);
3984
4005
struct
libinput_seat
*
4006
libinput_device_get_seat
(
struct
libinput_device
*device);
4007
4033
int
4034
libinput_device_set_seat_logical_name
(
struct
libinput_device
*device,
4035
const
char
*name);
4036
4056
struct
udev_device *
4057
libinput_device_get_udev_device
(
struct
libinput_device
*device);
4058
4069
void
4070
libinput_device_led_update
(
struct
libinput_device
*device,
4071
enum
libinput_led
leds);
4072
4080
int
4081
libinput_device_has_capability
(
struct
libinput_device
*device,
4082
enum
libinput_device_capability
capability);
4083
4098
int
4099
libinput_device_get_size
(
struct
libinput_device
*device,
4100
double
*width,
4101
double
*height);
4102
4115
int
4116
libinput_device_pointer_has_button
(
struct
libinput_device
*device, uint32_t code);
4117
4130
int
4131
libinput_device_keyboard_has_key
(
struct
libinput_device
*device,
4132
uint32_t code);
4133
4147
int
4148
libinput_device_touch_get_touch_count
(
struct
libinput_device
*device);
4149
4164
int
4165
libinput_device_switch_has_switch
(
struct
libinput_device
*device,
4166
enum
libinput_switch
sw);
4167
4182
int
4183
libinput_device_tablet_pad_get_num_buttons
(
struct
libinput_device
*device);
4184
4199
int
4200
libinput_device_tablet_pad_get_num_rings
(
struct
libinput_device
*device);
4201
4216
int
4217
libinput_device_tablet_pad_get_num_strips
(
struct
libinput_device
*device);
4218
4233
int
4234
libinput_device_tablet_pad_has_key
(
struct
libinput_device
*device,
4235
uint32_t code);
4236
4249
struct
libinput_device_group
*
4250
libinput_device_group_ref
(
struct
libinput_device_group
*group);
4251
4265
struct
libinput_device_group
*
4266
libinput_device_group_unref
(
struct
libinput_device_group
*group);
4267
4279
void
4280
libinput_device_group_set_user_data
(
struct
libinput_device_group
*group,
4281
void
*user_data);
4282
4293
void
*
4294
libinput_device_group_get_user_data
(
struct
libinput_device_group
*group);
4295
4342
enum
libinput_config_status
{
4343
LIBINPUT_CONFIG_STATUS_SUCCESS
= 0,
4344
LIBINPUT_CONFIG_STATUS_UNSUPPORTED
,
4346
LIBINPUT_CONFIG_STATUS_INVALID
,
4347
};
4348
4358
const
char
*
4359
libinput_config_status_to_str
(
enum
libinput_config_status
status);
4360
4364
enum
libinput_config_tap_state
{
4365
LIBINPUT_CONFIG_TAP_DISABLED
,
4367
LIBINPUT_CONFIG_TAP_ENABLED
,
4369
};
4370
4386
int
4387
libinput_device_config_tap_get_finger_count
(
struct
libinput_device
*device);
4388
4409
enum
libinput_config_status
4410
libinput_device_config_tap_set_enabled
(
struct
libinput_device
*device,
4411
enum
libinput_config_tap_state
enable);
4412
4429
enum
libinput_config_tap_state
4430
libinput_device_config_tap_get_enabled
(
struct
libinput_device
*device);
4431
4446
enum
libinput_config_tap_state
4447
libinput_device_config_tap_get_default_enabled
(
struct
libinput_device
*device);
4448
4454
enum
libinput_config_tap_button_map
{
4456
LIBINPUT_CONFIG_TAP_MAP_LRM
,
4458
LIBINPUT_CONFIG_TAP_MAP_LMR
,
4459
};
4460
4491
enum
libinput_config_status
4492
libinput_device_config_tap_set_button_map
(
struct
libinput_device
*device,
4493
enum
libinput_config_tap_button_map
map);
4494
4514
enum
libinput_config_tap_button_map
4515
libinput_device_config_tap_get_button_map
(
struct
libinput_device
*device);
4516
4536
enum
libinput_config_tap_button_map
4537
libinput_device_config_tap_get_default_button_map
(
struct
libinput_device
*device);
4538
4548
enum
libinput_config_drag_state
{
4553
LIBINPUT_CONFIG_DRAG_DISABLED
,
4558
LIBINPUT_CONFIG_DRAG_ENABLED
,
4559
};
4560
4579
enum
libinput_config_status
4580
libinput_device_config_tap_set_drag_enabled
(
struct
libinput_device
*device,
4581
enum
libinput_config_drag_state
enable);
4582
4598
enum
libinput_config_drag_state
4599
libinput_device_config_tap_get_drag_enabled
(
struct
libinput_device
*device);
4600
4618
enum
libinput_config_drag_state
4619
libinput_device_config_tap_get_default_drag_enabled
(
struct
libinput_device
*device);
4620
4624
enum
libinput_config_drag_lock_state
{
4626
LIBINPUT_CONFIG_DRAG_LOCK_DISABLED
,
4628
LIBINPUT_CONFIG_DRAG_LOCK_ENABLED
,
4629
};
4630
4653
enum
libinput_config_status
4654
libinput_device_config_tap_set_drag_lock_enabled
(
struct
libinput_device
*device,
4655
enum
libinput_config_drag_lock_state
enable);
4656
4674
enum
libinput_config_drag_lock_state
4675
libinput_device_config_tap_get_drag_lock_enabled
(
struct
libinput_device
*device);
4676
4697
enum
libinput_config_drag_lock_state
4698
libinput_device_config_tap_get_default_drag_lock_enabled
(
struct
libinput_device
*device);
4699
4712
int
4713
libinput_device_config_calibration_has_matrix
(
struct
libinput_device
*device);
4714
4764
enum
libinput_config_status
4765
libinput_device_config_calibration_set_matrix
(
struct
libinput_device
*device,
4766
const
float
matrix[6]);
4767
4784
int
4785
libinput_device_config_calibration_get_matrix
(
struct
libinput_device
*device,
4786
float
matrix[6]);
4787
4808
int
4809
libinput_device_config_calibration_get_default_matrix
(
struct
libinput_device
*device,
4810
float
matrix[6]);
4811
4818
enum
libinput_config_send_events_mode
{
4824
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
= 0,
4838
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
= (1 << 0),
4844
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
= (1 << 1),
4845
};
4846
4861
uint32_t
4862
libinput_device_config_send_events_get_modes
(
struct
libinput_device
*device);
4863
4892
enum
libinput_config_status
4893
libinput_device_config_send_events_set_mode
(
struct
libinput_device
*device,
4894
uint32_t mode);
4895
4915
uint32_t
4916
libinput_device_config_send_events_get_mode
(
struct
libinput_device
*device);
4917
4931
uint32_t
4932
libinput_device_config_send_events_get_default_mode
(
struct
libinput_device
*device);
4933
4947
int
4948
libinput_device_config_accel_is_available
(
struct
libinput_device
*device);
4949
4970
enum
libinput_config_status
4971
libinput_device_config_accel_set_speed
(
struct
libinput_device
*device,
4972
double
speed);
4973
4989
double
4990
libinput_device_config_accel_get_speed
(
struct
libinput_device
*device);
4991
5006
double
5007
libinput_device_config_accel_get_default_speed
(
struct
libinput_device
*device);
5008
5014
enum
libinput_config_accel_profile
{
5019
LIBINPUT_CONFIG_ACCEL_PROFILE_NONE
= 0,
5027
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
= (1 << 0),
5028
5033
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
= (1 << 1),
5034
};
5035
5048
uint32_t
5049
libinput_device_config_accel_get_profiles
(
struct
libinput_device
*device);
5050
5064
enum
libinput_config_status
5065
libinput_device_config_accel_set_profile
(
struct
libinput_device
*device,
5066
enum
libinput_config_accel_profile
mode);
5067
5079
enum
libinput_config_accel_profile
5080
libinput_device_config_accel_get_profile
(
struct
libinput_device
*device);
5081
5093
enum
libinput_config_accel_profile
5094
libinput_device_config_accel_get_default_profile
(
struct
libinput_device
*device);
5095
5125
int
5126
libinput_device_config_scroll_has_natural_scroll
(
struct
libinput_device
*device);
5127
5142
enum
libinput_config_status
5143
libinput_device_config_scroll_set_natural_scroll_enabled
(
struct
libinput_device
*device,
5144
int
enable);
5158
int
5159
libinput_device_config_scroll_get_natural_scroll_enabled
(
struct
libinput_device
*device);
5160
5174
int
5175
libinput_device_config_scroll_get_default_natural_scroll_enabled
(
struct
libinput_device
*device);
5176
5190
int
5191
libinput_device_config_left_handed_is_available
(
struct
libinput_device
*device);
5192
5216
enum
libinput_config_status
5217
libinput_device_config_left_handed_set
(
struct
libinput_device
*device,
5218
int
left_handed);
5219
5233
int
5234
libinput_device_config_left_handed_get
(
struct
libinput_device
*device);
5235
5249
int
5250
libinput_device_config_left_handed_get_default
(
struct
libinput_device
*device);
5251
5259
enum
libinput_config_click_method
{
5264
LIBINPUT_CONFIG_CLICK_METHOD_NONE
= 0,
5268
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
= (1 << 0),
5272
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
= (1 << 1),
5273
};
5274
5290
uint32_t
5291
libinput_device_config_click_get_methods
(
struct
libinput_device
*device);
5292
5313
enum
libinput_config_status
5314
libinput_device_config_click_set_method
(
struct
libinput_device
*device,
5315
enum
libinput_config_click_method
method);
5331
enum
libinput_config_click_method
5332
libinput_device_config_click_get_method
(
struct
libinput_device
*device);
5333
5349
enum
libinput_config_click_method
5350
libinput_device_config_click_get_default_method
(
struct
libinput_device
*device);
5351
5355
enum
libinput_config_middle_emulation_state
{
5360
LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED
,
5365
LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED
,
5366
};
5367
5388
int
5389
libinput_device_config_middle_emulation_is_available
(
5390
struct
libinput_device
*device);
5391
5414
enum
libinput_config_status
5415
libinput_device_config_middle_emulation_set_enabled
(
5416
struct
libinput_device
*device,
5417
enum
libinput_config_middle_emulation_state
enable);
5418
5442
enum
libinput_config_middle_emulation_state
5443
libinput_device_config_middle_emulation_get_enabled
(
5444
struct
libinput_device
*device);
5445
5470
enum
libinput_config_middle_emulation_state
5471
libinput_device_config_middle_emulation_get_default_enabled
(
5472
struct
libinput_device
*device);
5473
5480
enum
libinput_config_scroll_method
{
5485
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
= 0,
5490
LIBINPUT_CONFIG_SCROLL_2FG
= (1 << 0),
5495
LIBINPUT_CONFIG_SCROLL_EDGE
= (1 << 1),
5500
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
= (1 << 2),
5501
};
5502
5520
uint32_t
5521
libinput_device_config_scroll_get_methods
(
struct
libinput_device
*device);
5522
5547
enum
libinput_config_status
5548
libinput_device_config_scroll_set_method
(
struct
libinput_device
*device,
5549
enum
libinput_config_scroll_method
method);
5550
5567
enum
libinput_config_scroll_method
5568
libinput_device_config_scroll_get_method
(
struct
libinput_device
*device);
5569
5586
enum
libinput_config_scroll_method
5587
libinput_device_config_scroll_get_default_method
(
struct
libinput_device
*device);
5588
5624
enum
libinput_config_status
5625
libinput_device_config_scroll_set_button
(
struct
libinput_device
*device,
5626
uint32_t button);
5627
5652
uint32_t
5653
libinput_device_config_scroll_get_button
(
struct
libinput_device
*device);
5654
5675
uint32_t
5676
libinput_device_config_scroll_get_default_button
(
struct
libinput_device
*device);
5677
5678
enum
libinput_config_scroll_button_lock_state
{
5679
LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_DISABLED
,
5680
LIBINPUT_CONFIG_SCROLL_BUTTON_LOCK_ENABLED
,
5681
};
5682
5704
enum
libinput_config_status
5705
libinput_device_config_scroll_set_button_lock
(
struct
libinput_device
*device,
5706
enum
libinput_config_scroll_button_lock_state
state);
5707
5730
enum
libinput_config_scroll_button_lock_state
5731
libinput_device_config_scroll_get_button_lock
(
struct
libinput_device
*device);
5732
5750
enum
libinput_config_scroll_button_lock_state
5751
libinput_device_config_scroll_get_default_button_lock
(
struct
libinput_device
*device);
5752
5758
enum
libinput_config_dwt_state
{
5759
LIBINPUT_CONFIG_DWT_DISABLED
,
5760
LIBINPUT_CONFIG_DWT_ENABLED
,
5761
};
5762
5778
int
5779
libinput_device_config_dwt_is_available
(
struct
libinput_device
*device);
5780
5802
enum
libinput_config_status
5803
libinput_device_config_dwt_set_enabled
(
struct
libinput_device
*device,
5804
enum
libinput_config_dwt_state
enable);
5805
5821
enum
libinput_config_dwt_state
5822
libinput_device_config_dwt_get_enabled
(
struct
libinput_device
*device);
5823
5839
enum
libinput_config_dwt_state
5840
libinput_device_config_dwt_get_default_enabled
(
struct
libinput_device
*device);
5841
5856
int
5857
libinput_device_config_rotation_is_available
(
struct
libinput_device
*device);
5858
5891
enum
libinput_config_status
5892
libinput_device_config_rotation_set_angle
(
struct
libinput_device
*device,
5893
unsigned
int
degrees_cw);
5894
5911
unsigned
int
5912
libinput_device_config_rotation_get_angle
(
struct
libinput_device
*device);
5913
5930
unsigned
int
5931
libinput_device_config_rotation_get_default_angle
(
struct
libinput_device
*device);
5932
5933
#ifdef __cplusplus
5934
}
5935
#endif
5936
#endif
/* LIBINPUT_H */
Generated on Sun Apr 5 2020 19:30:40 for libinput by
1.8.3.1