-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlibinput.scm
More file actions
1926 lines (1919 loc) · 83.4 KB
/
Copy pathlibinput.scm
File metadata and controls
1926 lines (1919 loc) · 83.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(define-module (libinput)
#:use-module (bytestructure-class)
#:use-module ((system foreign) #:prefix ffi:)
#:use-module (system foreign-library)
#:use-module (bytestructures guile)
#:use-module (oop goops)
#:use-module (rnrs base)
#:use-module (libinput config))
(load-extension "libguile_libinput" "init_libinput")
(define-syntax define-libinput-procedure
(lambda (x)
(syntax-case x ()
((_ (pname args ...) (c-return c-name c-args) body ...)
(with-syntax ((% (datum->syntax x '%)))
(syntax
(define-public pname
(let ((% (ffi:pointer->procedure
c-return
(dynamic-func c-name (force %libinput))
c-args)))
(lambda* (args ...)
#((name . pname))
body ...)))))))))
(define (pointer->string* ptr)
(if (ffi:null-pointer? ptr) #f (ffi:pointer->string ptr)))
(define non-zero? (negate zero?))
(begin
(define-public %libinput-struct (bs:unknow))
(define-bytestructure-class
<libinput>
()
%libinput-struct
wrap-libinput
unwrap-libinput
libinput?))
(begin
(define-public %libinput-device-struct (bs:unknow))
(define-bytestructure-class
<libinput-device>
()
%libinput-device-struct
wrap-libinput-device
unwrap-libinput-device
libinput-device?))
(begin
(define-public %libinput-device-group-struct (bs:unknow))
(define-bytestructure-class
<libinput-device-group>
()
%libinput-device-group-struct
wrap-libinput-device-group
unwrap-libinput-device-group
libinput-device-group?))
(begin
(define-public %libinput-seat-struct (bs:unknow))
(define-bytestructure-class
<libinput-seat>
()
%libinput-seat-struct
wrap-libinput-seat
unwrap-libinput-seat
libinput-seat?))
(begin
(define-public %libinput-tablet-tool-struct (bs:unknow))
(define-bytestructure-class
<libinput-tablet-tool>
()
%libinput-tablet-tool-struct
wrap-libinput-tablet-tool
unwrap-libinput-tablet-tool
libinput-tablet-tool?))
(begin
(define-public %libinput-event-struct (bs:unknow))
(define-bytestructure-class
<libinput-event>
()
%libinput-event-struct
wrap-libinput-event
unwrap-libinput-event
libinput-event?))
(begin
(define-public %libinput-event-device-notify-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-device-notify>
()
%libinput-event-device-notify-struct
wrap-libinput-event-device-notify
unwrap-libinput-event-device-notify
libinput-event-device-notify?))
(begin
(define-public %libinput-event-keyboard-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-keyboard>
()
%libinput-event-keyboard-struct
wrap-libinput-event-keyboard
unwrap-libinput-event-keyboard
libinput-event-keyboard?))
(begin
(define-public %libinput-event-pointer-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-pointer>
()
%libinput-event-pointer-struct
wrap-libinput-event-pointer
unwrap-libinput-event-pointer
libinput-event-pointer?))
(begin
(define-public %libinput-event-touch-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-touch>
()
%libinput-event-touch-struct
wrap-libinput-event-touch
unwrap-libinput-event-touch
libinput-event-touch?))
(begin
(define-public %libinput-event-tablet-tool-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-tablet-tool>
()
%libinput-event-tablet-tool-struct
wrap-libinput-event-tablet-tool
unwrap-libinput-event-tablet-tool
libinput-event-tablet-tool?))
(begin
(define-public %libinput-event-tablet-pad-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-tablet-pad>
()
%libinput-event-tablet-pad-struct
wrap-libinput-event-tablet-pad
unwrap-libinput-event-tablet-pad
libinput-event-tablet-pad?))
(begin
(define-public %libinput-log-priority-enum
(bs:enum
'((LIBINPUT_LOG_PRIORITY_DEBUG 10)
(LIBINPUT_LOG_PRIORITY_INFO 20)
(LIBINPUT_LOG_PRIORITY_ERROR 30))))
(define-public LIBINPUT_LOG_PRIORITY_DEBUG 10)
(define-public LIBINPUT_LOG_PRIORITY_INFO 20)
(define-public LIBINPUT_LOG_PRIORITY_ERROR 30)
(define-public (number->%libinput-log-priority-enum o)
(or (assq-ref
'((10 . LIBINPUT_LOG_PRIORITY_DEBUG)
(20 . LIBINPUT_LOG_PRIORITY_INFO)
(30 . LIBINPUT_LOG_PRIORITY_ERROR))
o)
(error "not found" '%libinput-log-priority-enum o)))
(define-public (%libinput-log-priority-enum->number o)
(bs:enum->integer %libinput-log-priority-enum o)))
(begin
(define-public %libinput-device-capability-enum
(bs:enum
'((LIBINPUT_DEVICE_CAP_KEYBOARD 0)
(LIBINPUT_DEVICE_CAP_POINTER 1)
(LIBINPUT_DEVICE_CAP_TOUCH 2)
(LIBINPUT_DEVICE_CAP_TABLET_TOOL 3)
(LIBINPUT_DEVICE_CAP_TABLET_PAD 4)
(LIBINPUT_DEVICE_CAP_GESTURE 5)
(LIBINPUT_DEVICE_CAP_SWITCH 6))))
(define-public LIBINPUT_DEVICE_CAP_KEYBOARD 0)
(define-public LIBINPUT_DEVICE_CAP_POINTER 1)
(define-public LIBINPUT_DEVICE_CAP_TOUCH 2)
(define-public LIBINPUT_DEVICE_CAP_TABLET_TOOL 3)
(define-public LIBINPUT_DEVICE_CAP_TABLET_PAD 4)
(define-public LIBINPUT_DEVICE_CAP_GESTURE 5)
(define-public LIBINPUT_DEVICE_CAP_SWITCH 6)
(define-public (number->%libinput-device-capability-enum o)
(or (assq-ref
'((0 . LIBINPUT_DEVICE_CAP_KEYBOARD)
(1 . LIBINPUT_DEVICE_CAP_POINTER)
(2 . LIBINPUT_DEVICE_CAP_TOUCH)
(3 . LIBINPUT_DEVICE_CAP_TABLET_TOOL)
(4 . LIBINPUT_DEVICE_CAP_TABLET_PAD)
(5 . LIBINPUT_DEVICE_CAP_GESTURE)
(6 . LIBINPUT_DEVICE_CAP_SWITCH))
o)
(error "not found" '%libinput-device-capability-enum o)))
(define-public (%libinput-device-capability-enum->number o)
(bs:enum->integer %libinput-device-capability-enum o)))
(begin
(define-public %libinput-key-state-enum
(bs:enum
'((LIBINPUT_KEY_STATE_RELEASED 0) (LIBINPUT_KEY_STATE_PRESSED 1))))
(define-public LIBINPUT_KEY_STATE_RELEASED 0)
(define-public LIBINPUT_KEY_STATE_PRESSED 1)
(define-public (number->%libinput-key-state-enum o)
(or (assq-ref
'((0 . LIBINPUT_KEY_STATE_RELEASED) (1 . LIBINPUT_KEY_STATE_PRESSED))
o)
(error "not found" '%libinput-key-state-enum o)))
(define-public (%libinput-key-state-enum->number o)
(bs:enum->integer %libinput-key-state-enum o)))
(begin
(define-public %libinput-led-enum
(bs:enum
'((LIBINPUT_LED_NUM_LOCK 1)
(LIBINPUT_LED_CAPS_LOCK 2)
(LIBINPUT_LED_SCROLL_LOCK 4))))
(define-public LIBINPUT_LED_NUM_LOCK 1)
(define-public LIBINPUT_LED_CAPS_LOCK 2)
(define-public LIBINPUT_LED_SCROLL_LOCK 4)
(define-public (number->%libinput-led-enum o)
(or (assq-ref
'((1 . LIBINPUT_LED_NUM_LOCK)
(2 . LIBINPUT_LED_CAPS_LOCK)
(4 . LIBINPUT_LED_SCROLL_LOCK))
o)
(error "not found" '%libinput-led-enum o)))
(define-public (%libinput-led-enum->number o)
(bs:enum->integer %libinput-led-enum o)))
(begin
(define-public %libinput-button-state-enum
(bs:enum
'((LIBINPUT_BUTTON_STATE_RELEASED 0) (LIBINPUT_BUTTON_STATE_PRESSED 1))))
(define-public LIBINPUT_BUTTON_STATE_RELEASED 0)
(define-public LIBINPUT_BUTTON_STATE_PRESSED 1)
(define-public (number->%libinput-button-state-enum o)
(or (assq-ref
'((0 . LIBINPUT_BUTTON_STATE_RELEASED)
(1 . LIBINPUT_BUTTON_STATE_PRESSED))
o)
(error "not found" '%libinput-button-state-enum o)))
(define-public (%libinput-button-state-enum->number o)
(bs:enum->integer %libinput-button-state-enum o)))
(begin
(define-public %libinput-pointer-axis-enum
(bs:enum
'((LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL 0)
(LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL 1))))
(define-public LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL 0)
(define-public LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL 1)
(define-public (number->%libinput-pointer-axis-enum o)
(or (assq-ref
'((0 . LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)
(1 . LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL))
o)
(error "not found" '%libinput-pointer-axis-enum o)))
(define-public (%libinput-pointer-axis-enum->number o)
(bs:enum->integer %libinput-pointer-axis-enum o)))
(begin
(define-public %libinput-pointer-axis-source-enum
(bs:enum
'((LIBINPUT_POINTER_AXIS_SOURCE_WHEEL 1)
(LIBINPUT_POINTER_AXIS_SOURCE_FINGER 2)
(LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS 3)
(LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT 4))))
(define-public LIBINPUT_POINTER_AXIS_SOURCE_WHEEL 1)
(define-public LIBINPUT_POINTER_AXIS_SOURCE_FINGER 2)
(define-public LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS 3)
(define-public LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT 4)
(define-public (number->%libinput-pointer-axis-source-enum o)
(or (assq-ref
'((1 . LIBINPUT_POINTER_AXIS_SOURCE_WHEEL)
(2 . LIBINPUT_POINTER_AXIS_SOURCE_FINGER)
(3 . LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS)
(4 . LIBINPUT_POINTER_AXIS_SOURCE_WHEEL_TILT))
o)
(error "not found" '%libinput-pointer-axis-source-enum o)))
(define-public (%libinput-pointer-axis-source-enum->number o)
(bs:enum->integer %libinput-pointer-axis-source-enum o)))
(begin
(define-public %libinput-tablet-pad-ring-axis-source-enum
(bs:enum
'((LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN 1)
(LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER 2))))
(define-public LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN 1)
(define-public LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER 2)
(define-public (number->%libinput-tablet-pad-ring-axis-source-enum o)
(or (assq-ref
'((1 . LIBINPUT_TABLET_PAD_RING_SOURCE_UNKNOWN)
(2 . LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER))
o)
(error "not found" '%libinput-tablet-pad-ring-axis-source-enum o)))
(define-public (%libinput-tablet-pad-ring-axis-source-enum->number o)
(bs:enum->integer %libinput-tablet-pad-ring-axis-source-enum o)))
(begin
(define-public %libinput-tablet-pad-strip-axis-source-enum
(bs:enum
'((LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN 1)
(LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER 2))))
(define-public LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN 1)
(define-public LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER 2)
(define-public (number->%libinput-tablet-pad-strip-axis-source-enum o)
(or (assq-ref
'((1 . LIBINPUT_TABLET_PAD_STRIP_SOURCE_UNKNOWN)
(2 . LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER))
o)
(error "not found" '%libinput-tablet-pad-strip-axis-source-enum o)))
(define-public (%libinput-tablet-pad-strip-axis-source-enum->number o)
(bs:enum->integer %libinput-tablet-pad-strip-axis-source-enum o)))
(begin
(define-public %libinput-tablet-tool-type-enum
(bs:enum
'((LIBINPUT_TABLET_TOOL_TYPE_PEN 1)
(LIBINPUT_TABLET_TOOL_TYPE_ERASER 2)
(LIBINPUT_TABLET_TOOL_TYPE_BRUSH 3)
(LIBINPUT_TABLET_TOOL_TYPE_PENCIL 4)
(LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH 5)
(LIBINPUT_TABLET_TOOL_TYPE_MOUSE 6)
(LIBINPUT_TABLET_TOOL_TYPE_LENS 7)
(LIBINPUT_TABLET_TOOL_TYPE_TOTEM 8))))
(define-public LIBINPUT_TABLET_TOOL_TYPE_PEN 1)
(define-public LIBINPUT_TABLET_TOOL_TYPE_ERASER 2)
(define-public LIBINPUT_TABLET_TOOL_TYPE_BRUSH 3)
(define-public LIBINPUT_TABLET_TOOL_TYPE_PENCIL 4)
(define-public LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH 5)
(define-public LIBINPUT_TABLET_TOOL_TYPE_MOUSE 6)
(define-public LIBINPUT_TABLET_TOOL_TYPE_LENS 7)
(define-public LIBINPUT_TABLET_TOOL_TYPE_TOTEM 8)
(define-public (number->%libinput-tablet-tool-type-enum o)
(or (assq-ref
'((1 . LIBINPUT_TABLET_TOOL_TYPE_PEN)
(2 . LIBINPUT_TABLET_TOOL_TYPE_ERASER)
(3 . LIBINPUT_TABLET_TOOL_TYPE_BRUSH)
(4 . LIBINPUT_TABLET_TOOL_TYPE_PENCIL)
(5 . LIBINPUT_TABLET_TOOL_TYPE_AIRBRUSH)
(6 . LIBINPUT_TABLET_TOOL_TYPE_MOUSE)
(7 . LIBINPUT_TABLET_TOOL_TYPE_LENS)
(8 . LIBINPUT_TABLET_TOOL_TYPE_TOTEM))
o)
(error "not found" '%libinput-tablet-tool-type-enum o)))
(define-public (%libinput-tablet-tool-type-enum->number o)
(bs:enum->integer %libinput-tablet-tool-type-enum o)))
(begin
(define-public %libinput-tablet-tool-proximity-state-enum
(bs:enum
'((LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT 0)
(LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN 1))))
(define-public LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT 0)
(define-public LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN 1)
(define-public (number->%libinput-tablet-tool-proximity-state-enum o)
(or (assq-ref
'((0 . LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_OUT)
(1 . LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN))
o)
(error "not found" '%libinput-tablet-tool-proximity-state-enum o)))
(define-public (%libinput-tablet-tool-proximity-state-enum->number o)
(bs:enum->integer %libinput-tablet-tool-proximity-state-enum o)))
(begin
(define-public %libinput-tablet-tool-tip-state-enum
(bs:enum
'((LIBINPUT_TABLET_TOOL_TIP_UP 0) (LIBINPUT_TABLET_TOOL_TIP_DOWN 1))))
(define-public LIBINPUT_TABLET_TOOL_TIP_UP 0)
(define-public LIBINPUT_TABLET_TOOL_TIP_DOWN 1)
(define-public (number->%libinput-tablet-tool-tip-state-enum o)
(or (assq-ref
'((0 . LIBINPUT_TABLET_TOOL_TIP_UP)
(1 . LIBINPUT_TABLET_TOOL_TIP_DOWN))
o)
(error "not found" '%libinput-tablet-tool-tip-state-enum o)))
(define-public (%libinput-tablet-tool-tip-state-enum->number o)
(bs:enum->integer %libinput-tablet-tool-tip-state-enum o)))
(begin
(define-public %libinput-tablet-pad-mode-group-struct (bs:unknow))
(define-bytestructure-class
<libinput-tablet-pad-mode-group>
()
%libinput-tablet-pad-mode-group-struct
wrap-libinput-tablet-pad-mode-group
unwrap-libinput-tablet-pad-mode-group
libinput-tablet-pad-mode-group?))
(define-libinput-procedure
(libinput-device-tablet-pad-get-num-mode-groups device)
(ffi:int "libinput_device_tablet_pad_get_num_mode_groups" (list '*))
(% (unwrap-libinput-device device)))
(define-libinput-procedure
(libinput-device-tablet-pad-get-mode-group device index)
('* "libinput_device_tablet_pad_get_mode_group" (list '* ffi:unsigned-int))
(wrap-libinput-tablet-pad-mode-group
(% (unwrap-libinput-device device) index)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-get-index group)
(ffi:unsigned-int "libinput_tablet_pad_mode_group_get_index" (list '*))
(% (unwrap-libinput-tablet-pad-mode-group group)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-get-num-modes group)
(ffi:unsigned-int "libinput_tablet_pad_mode_group_get_num_modes" (list '*))
(% (unwrap-libinput-tablet-pad-mode-group group)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-get-mode group)
(ffi:unsigned-int "libinput_tablet_pad_mode_group_get_mode" (list '*))
(% (unwrap-libinput-tablet-pad-mode-group group)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-has-button group button)
(ffi:int
"libinput_tablet_pad_mode_group_has_button"
(list '* ffi:unsigned-int))
(non-zero? (% (unwrap-libinput-tablet-pad-mode-group group) button)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-has-ring group ring)
(ffi:int
"libinput_tablet_pad_mode_group_has_ring"
(list '* ffi:unsigned-int))
(non-zero? (% (unwrap-libinput-tablet-pad-mode-group group) ring)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-has-strip group strip)
(ffi:int
"libinput_tablet_pad_mode_group_has_strip"
(list '* ffi:unsigned-int))
(non-zero? (% (unwrap-libinput-tablet-pad-mode-group group) strip)))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-button-is-toggle group button)
(ffi:int
"libinput_tablet_pad_mode_group_button_is_toggle"
(list '* ffi:unsigned-int))
(% (unwrap-libinput-tablet-pad-mode-group group) button))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-ref group)
('* "libinput_tablet_pad_mode_group_ref" (list '*))
(wrap-libinput-tablet-pad-mode-group
(% (unwrap-libinput-tablet-pad-mode-group group))))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-unref group)
('* "libinput_tablet_pad_mode_group_unref" (list '*))
(wrap-libinput-tablet-pad-mode-group
(% (unwrap-libinput-tablet-pad-mode-group group))))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-set-user-data group user_data)
(ffi:void "libinput_tablet_pad_mode_group_set_user_data" (list '* '*))
(% (unwrap-libinput-tablet-pad-mode-group group) user_data))
(define-libinput-procedure
(libinput-tablet-pad-mode-group-get-user-data group)
('* "libinput_tablet_pad_mode_group_get_user_data" (list '*))
(% (unwrap-libinput-tablet-pad-mode-group group)))
(begin
(define-public %libinput-switch-state-enum
(bs:enum '((LIBINPUT_SWITCH_STATE_OFF 0) (LIBINPUT_SWITCH_STATE_ON 1))))
(define-public LIBINPUT_SWITCH_STATE_OFF 0)
(define-public LIBINPUT_SWITCH_STATE_ON 1)
(define-public (number->%libinput-switch-state-enum o)
(or (assq-ref
'((0 . LIBINPUT_SWITCH_STATE_OFF) (1 . LIBINPUT_SWITCH_STATE_ON))
o)
(error "not found" '%libinput-switch-state-enum o)))
(define-public (%libinput-switch-state-enum->number o)
(bs:enum->integer %libinput-switch-state-enum o)))
(begin
(define-public %libinput-switch-enum
(bs:enum '((LIBINPUT_SWITCH_LID 1) (LIBINPUT_SWITCH_TABLET_MODE 2))))
(define-public LIBINPUT_SWITCH_LID 1)
(define-public LIBINPUT_SWITCH_TABLET_MODE 2)
(define-public (number->%libinput-switch-enum o)
(or (assq-ref
'((1 . LIBINPUT_SWITCH_LID) (2 . LIBINPUT_SWITCH_TABLET_MODE))
o)
(error "not found" '%libinput-switch-enum o)))
(define-public (%libinput-switch-enum->number o)
(bs:enum->integer %libinput-switch-enum o)))
(begin
(define-public %libinput-event-switch-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-switch>
()
%libinput-event-switch-struct
wrap-libinput-event-switch
unwrap-libinput-event-switch
libinput-event-switch?))
(begin
(define-public %libinput-event-type-enum
(bs:enum
'((LIBINPUT_EVENT_NONE 0)
(LIBINPUT_EVENT_DEVICE_ADDED 1)
(LIBINPUT_EVENT_DEVICE_REMOVED 2)
(LIBINPUT_EVENT_KEYBOARD_KEY 300)
(LIBINPUT_EVENT_POINTER_MOTION 400)
(LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE 401)
(LIBINPUT_EVENT_POINTER_BUTTON 402)
(LIBINPUT_EVENT_POINTER_AXIS 403)
(LIBINPUT_EVENT_POINTER_SCROLL_WHEEL 404)
(LIBINPUT_EVENT_POINTER_SCROLL_FINGER 405)
(LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS 406)
(LIBINPUT_EVENT_TOUCH_DOWN 500)
(LIBINPUT_EVENT_TOUCH_UP 501)
(LIBINPUT_EVENT_TOUCH_MOTION 502)
(LIBINPUT_EVENT_TOUCH_CANCEL 503)
(LIBINPUT_EVENT_TOUCH_FRAME 504)
(LIBINPUT_EVENT_TABLET_TOOL_AXIS 600)
(LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY 601)
(LIBINPUT_EVENT_TABLET_TOOL_TIP 602)
(LIBINPUT_EVENT_TABLET_TOOL_BUTTON 603)
(LIBINPUT_EVENT_TABLET_PAD_BUTTON 700)
(LIBINPUT_EVENT_TABLET_PAD_RING 701)
(LIBINPUT_EVENT_TABLET_PAD_STRIP 702)
(LIBINPUT_EVENT_TABLET_PAD_KEY 703)
(LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN 800)
(LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE 801)
(LIBINPUT_EVENT_GESTURE_SWIPE_END 802)
(LIBINPUT_EVENT_GESTURE_PINCH_BEGIN 803)
(LIBINPUT_EVENT_GESTURE_PINCH_UPDATE 804)
(LIBINPUT_EVENT_GESTURE_PINCH_END 805)
(LIBINPUT_EVENT_GESTURE_HOLD_BEGIN 806)
(LIBINPUT_EVENT_GESTURE_HOLD_END 807)
(LIBINPUT_EVENT_SWITCH_TOGGLE 900))))
(define-public LIBINPUT_EVENT_NONE 0)
(define-public LIBINPUT_EVENT_DEVICE_ADDED 1)
(define-public LIBINPUT_EVENT_DEVICE_REMOVED 2)
(define-public LIBINPUT_EVENT_KEYBOARD_KEY 300)
(define-public LIBINPUT_EVENT_POINTER_MOTION 400)
(define-public LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE 401)
(define-public LIBINPUT_EVENT_POINTER_BUTTON 402)
(define-public LIBINPUT_EVENT_POINTER_AXIS 403)
(define-public LIBINPUT_EVENT_POINTER_SCROLL_WHEEL 404)
(define-public LIBINPUT_EVENT_POINTER_SCROLL_FINGER 405)
(define-public LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS 406)
(define-public LIBINPUT_EVENT_TOUCH_DOWN 500)
(define-public LIBINPUT_EVENT_TOUCH_UP 501)
(define-public LIBINPUT_EVENT_TOUCH_MOTION 502)
(define-public LIBINPUT_EVENT_TOUCH_CANCEL 503)
(define-public LIBINPUT_EVENT_TOUCH_FRAME 504)
(define-public LIBINPUT_EVENT_TABLET_TOOL_AXIS 600)
(define-public LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY 601)
(define-public LIBINPUT_EVENT_TABLET_TOOL_TIP 602)
(define-public LIBINPUT_EVENT_TABLET_TOOL_BUTTON 603)
(define-public LIBINPUT_EVENT_TABLET_PAD_BUTTON 700)
(define-public LIBINPUT_EVENT_TABLET_PAD_RING 701)
(define-public LIBINPUT_EVENT_TABLET_PAD_STRIP 702)
(define-public LIBINPUT_EVENT_TABLET_PAD_KEY 703)
(define-public LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN 800)
(define-public LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE 801)
(define-public LIBINPUT_EVENT_GESTURE_SWIPE_END 802)
(define-public LIBINPUT_EVENT_GESTURE_PINCH_BEGIN 803)
(define-public LIBINPUT_EVENT_GESTURE_PINCH_UPDATE 804)
(define-public LIBINPUT_EVENT_GESTURE_PINCH_END 805)
(define-public LIBINPUT_EVENT_GESTURE_HOLD_BEGIN 806)
(define-public LIBINPUT_EVENT_GESTURE_HOLD_END 807)
(define-public LIBINPUT_EVENT_SWITCH_TOGGLE 900)
(define-public (number->%libinput-event-type-enum o)
(or (assq-ref
'((0 . LIBINPUT_EVENT_NONE)
(1 . LIBINPUT_EVENT_DEVICE_ADDED)
(2 . LIBINPUT_EVENT_DEVICE_REMOVED)
(300 . LIBINPUT_EVENT_KEYBOARD_KEY)
(400 . LIBINPUT_EVENT_POINTER_MOTION)
(401 . LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE)
(402 . LIBINPUT_EVENT_POINTER_BUTTON)
(403 . LIBINPUT_EVENT_POINTER_AXIS)
(404 . LIBINPUT_EVENT_POINTER_SCROLL_WHEEL)
(405 . LIBINPUT_EVENT_POINTER_SCROLL_FINGER)
(406 . LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS)
(500 . LIBINPUT_EVENT_TOUCH_DOWN)
(501 . LIBINPUT_EVENT_TOUCH_UP)
(502 . LIBINPUT_EVENT_TOUCH_MOTION)
(503 . LIBINPUT_EVENT_TOUCH_CANCEL)
(504 . LIBINPUT_EVENT_TOUCH_FRAME)
(600 . LIBINPUT_EVENT_TABLET_TOOL_AXIS)
(601 . LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY)
(602 . LIBINPUT_EVENT_TABLET_TOOL_TIP)
(603 . LIBINPUT_EVENT_TABLET_TOOL_BUTTON)
(700 . LIBINPUT_EVENT_TABLET_PAD_BUTTON)
(701 . LIBINPUT_EVENT_TABLET_PAD_RING)
(702 . LIBINPUT_EVENT_TABLET_PAD_STRIP)
(703 . LIBINPUT_EVENT_TABLET_PAD_KEY)
(800 . LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN)
(801 . LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE)
(802 . LIBINPUT_EVENT_GESTURE_SWIPE_END)
(803 . LIBINPUT_EVENT_GESTURE_PINCH_BEGIN)
(804 . LIBINPUT_EVENT_GESTURE_PINCH_UPDATE)
(805 . LIBINPUT_EVENT_GESTURE_PINCH_END)
(806 . LIBINPUT_EVENT_GESTURE_HOLD_BEGIN)
(807 . LIBINPUT_EVENT_GESTURE_HOLD_END)
(900 . LIBINPUT_EVENT_SWITCH_TOGGLE))
o)
(error "not found" '%libinput-event-type-enum o)))
(define-public (%libinput-event-type-enum->number o)
(bs:enum->integer %libinput-event-type-enum o)))
(define %libinput_event_destroy
(delay (foreign-library-pointer (force %libinput) "libinput_event_destroy")))
(define-libinput-procedure
(libinput-event-get-type event)
(ffi:int32 "libinput_event_get_type" (list '*))
(number->%libinput-event-type-enum (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-context event)
('* "libinput_event_get_context" (list '*))
(wrap-libinput (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-device event)
('* "libinput_event_get_device" (list '*))
(wrap-libinput-device (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-pointer-event event)
('* "libinput_event_get_pointer_event" (list '*))
(wrap-libinput-event-pointer (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-keyboard-event event)
('* "libinput_event_get_keyboard_event" (list '*))
(wrap-libinput-event-keyboard (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-touch-event event)
('* "libinput_event_get_touch_event" (list '*))
(wrap-libinput-event-touch (% (unwrap-libinput-event event))))
(begin
(define-public %libinput-event-gesture-struct (bs:unknow))
(define-bytestructure-class
<libinput-event-gesture>
()
%libinput-event-gesture-struct
wrap-libinput-event-gesture
unwrap-libinput-event-gesture
libinput-event-gesture?))
(define-libinput-procedure
(libinput-event-get-gesture-event event)
('* "libinput_event_get_gesture_event" (list '*))
(wrap-libinput-event-gesture (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-tablet-tool-event event)
('* "libinput_event_get_tablet_tool_event" (list '*))
(wrap-libinput-event-tablet-tool (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-tablet-pad-event event)
('* "libinput_event_get_tablet_pad_event" (list '*))
(wrap-libinput-event-tablet-pad (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-switch-event event)
('* "libinput_event_get_switch_event" (list '*))
(wrap-libinput-event-switch (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-get-device-notify-event event)
('* "libinput_event_get_device_notify_event" (list '*))
(wrap-libinput-event-device-notify (% (unwrap-libinput-event event))))
(define-libinput-procedure
(libinput-event-device-notify-get-base-event event)
('* "libinput_event_device_notify_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-device-notify event))))
(define-libinput-procedure
(libinput-event-keyboard-get-time event)
(ffi:uint32 "libinput_event_keyboard_get_time" (list '*))
(% (unwrap-libinput-event-keyboard event)))
(define-libinput-procedure
(libinput-event-keyboard-get-time-usec event)
(ffi:uint64 "libinput_event_keyboard_get_time_usec" (list '*))
(% (unwrap-libinput-event-keyboard event)))
(define-libinput-procedure
(libinput-event-keyboard-get-key event)
(ffi:uint32 "libinput_event_keyboard_get_key" (list '*))
(% (unwrap-libinput-event-keyboard event)))
(define-libinput-procedure
(libinput-event-keyboard-get-key-state event)
(ffi:int32 "libinput_event_keyboard_get_key_state" (list '*))
(number->%libinput-key-state-enum
(% (unwrap-libinput-event-keyboard event))))
(define-libinput-procedure
(libinput-event-keyboard-get-base-event event)
('* "libinput_event_keyboard_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-keyboard event))))
(define-libinput-procedure
(libinput-event-keyboard-get-seat-key-count event)
(ffi:uint32 "libinput_event_keyboard_get_seat_key_count" (list '*))
(% (unwrap-libinput-event-keyboard event)))
(define-libinput-procedure
(libinput-event-pointer-get-time event)
(ffi:uint32 "libinput_event_pointer_get_time" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-time-usec event)
(ffi:uint64 "libinput_event_pointer_get_time_usec" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-dx event)
(ffi:double "libinput_event_pointer_get_dx" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-dy event)
(ffi:double "libinput_event_pointer_get_dy" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-dx-unaccelerated event)
(ffi:double "libinput_event_pointer_get_dx_unaccelerated" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-dy-unaccelerated event)
(ffi:double "libinput_event_pointer_get_dy_unaccelerated" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-absolute-x event)
(ffi:double "libinput_event_pointer_get_absolute_x" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-absolute-y event)
(ffi:double "libinput_event_pointer_get_absolute_y" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-absolute-x-transformed event width)
(ffi:double
"libinput_event_pointer_get_absolute_x_transformed"
(list '* ffi:uint32))
(% (unwrap-libinput-event-pointer event) width))
(define-libinput-procedure
(libinput-event-pointer-get-absolute-y-transformed event height)
(ffi:double
"libinput_event_pointer_get_absolute_y_transformed"
(list '* ffi:uint32))
(% (unwrap-libinput-event-pointer event) height))
(define-libinput-procedure
(libinput-event-pointer-get-button event)
(ffi:uint32 "libinput_event_pointer_get_button" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-get-button-state event)
(ffi:int32 "libinput_event_pointer_get_button_state" (list '*))
(number->%libinput-button-state-enum
(% (unwrap-libinput-event-pointer event))))
(define-libinput-procedure
(libinput-event-pointer-get-seat-button-count event)
(ffi:uint32 "libinput_event_pointer_get_seat_button_count" (list '*))
(% (unwrap-libinput-event-pointer event)))
(define-libinput-procedure
(libinput-event-pointer-has-axis event axis)
(ffi:int "libinput_event_pointer_has_axis" (list '* ffi:int32))
(non-zero?
(% (unwrap-libinput-event-pointer event)
(%libinput-pointer-axis-enum->number axis))))
(define-libinput-procedure
(libinput-event-pointer-get-axis-value event axis)
(ffi:double "libinput_event_pointer_get_axis_value" (list '* ffi:int32))
(% (unwrap-libinput-event-pointer event)
(%libinput-pointer-axis-enum->number axis)))
(define-libinput-procedure
(libinput-event-pointer-get-axis-source event)
(ffi:int32 "libinput_event_pointer_get_axis_source" (list '*))
(number->%libinput-pointer-axis-source-enum
(% (unwrap-libinput-event-pointer event))))
(define-libinput-procedure
(libinput-event-pointer-get-axis-value-discrete event axis)
(ffi:double
"libinput_event_pointer_get_axis_value_discrete"
(list '* ffi:int32))
(% (unwrap-libinput-event-pointer event)
(%libinput-pointer-axis-enum->number axis)))
(define-libinput-procedure
(libinput-event-pointer-get-scroll-value event axis)
(ffi:double "libinput_event_pointer_get_scroll_value" (list '* ffi:int32))
(% (unwrap-libinput-event-pointer event)
(%libinput-pointer-axis-enum->number axis)))
(define-libinput-procedure
(libinput-event-pointer-get-scroll-value-v120 event axis)
(ffi:double
"libinput_event_pointer_get_scroll_value_v120"
(list '* ffi:int32))
(% (unwrap-libinput-event-pointer event)
(%libinput-pointer-axis-enum->number axis)))
(define-libinput-procedure
(libinput-event-pointer-get-base-event event)
('* "libinput_event_pointer_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-pointer event))))
(define-libinput-procedure
(libinput-event-touch-get-time event)
(ffi:uint32 "libinput_event_touch_get_time" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-time-usec event)
(ffi:uint64 "libinput_event_touch_get_time_usec" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-slot event)
(ffi:int32 "libinput_event_touch_get_slot" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-seat-slot event)
(ffi:int32 "libinput_event_touch_get_seat_slot" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-x event)
(ffi:double "libinput_event_touch_get_x" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-y event)
(ffi:double "libinput_event_touch_get_y" (list '*))
(% (unwrap-libinput-event-touch event)))
(define-libinput-procedure
(libinput-event-touch-get-x-transformed event width)
(ffi:double "libinput_event_touch_get_x_transformed" (list '* ffi:uint32))
(% (unwrap-libinput-event-touch event) width))
(define-libinput-procedure
(libinput-event-touch-get-y-transformed event height)
(ffi:double "libinput_event_touch_get_y_transformed" (list '* ffi:uint32))
(% (unwrap-libinput-event-touch event) height))
(define-libinput-procedure
(libinput-event-touch-get-base-event event)
('* "libinput_event_touch_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-touch event))))
(define-libinput-procedure
(libinput-event-gesture-get-time event)
(ffi:uint32 "libinput_event_gesture_get_time" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-time-usec event)
(ffi:uint64 "libinput_event_gesture_get_time_usec" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-base-event event)
('* "libinput_event_gesture_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-gesture event))))
(define-libinput-procedure
(libinput-event-gesture-get-finger-count event)
(ffi:int "libinput_event_gesture_get_finger_count" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-cancelled event)
(ffi:int "libinput_event_gesture_get_cancelled" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-dx event)
(ffi:double "libinput_event_gesture_get_dx" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-dy event)
(ffi:double "libinput_event_gesture_get_dy" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-dx-unaccelerated event)
(ffi:double "libinput_event_gesture_get_dx_unaccelerated" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-dy-unaccelerated event)
(ffi:double "libinput_event_gesture_get_dy_unaccelerated" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-scale event)
(ffi:double "libinput_event_gesture_get_scale" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-gesture-get-angle-delta event)
(ffi:double "libinput_event_gesture_get_angle_delta" (list '*))
(% (unwrap-libinput-event-gesture event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-base-event event)
('* "libinput_event_tablet_tool_get_base_event" (list '*))
(wrap-libinput-event (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-x-has-changed event)
(ffi:int "libinput_event_tablet_tool_x_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-y-has-changed event)
(ffi:int "libinput_event_tablet_tool_y_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-pressure-has-changed event)
(ffi:int "libinput_event_tablet_tool_pressure_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-distance-has-changed event)
(ffi:int "libinput_event_tablet_tool_distance_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-tilt-x-has-changed event)
(ffi:int "libinput_event_tablet_tool_tilt_x_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-tilt-y-has-changed event)
(ffi:int "libinput_event_tablet_tool_tilt_y_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-rotation-has-changed event)
(ffi:int "libinput_event_tablet_tool_rotation_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-slider-has-changed event)
(ffi:int "libinput_event_tablet_tool_slider_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-size-major-has-changed event)
(ffi:int "libinput_event_tablet_tool_size_major_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-size-minor-has-changed event)
(ffi:int "libinput_event_tablet_tool_size_minor_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-wheel-has-changed event)
(ffi:int "libinput_event_tablet_tool_wheel_has_changed" (list '*))
(non-zero? (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-get-x event)
(ffi:double "libinput_event_tablet_tool_get_x" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-y event)
(ffi:double "libinput_event_tablet_tool_get_y" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-dx event)
(ffi:double "libinput_event_tablet_tool_get_dx" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-dy event)
(ffi:double "libinput_event_tablet_tool_get_dy" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-pressure event)
(ffi:double "libinput_event_tablet_tool_get_pressure" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-distance event)
(ffi:double "libinput_event_tablet_tool_get_distance" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-tilt-x event)
(ffi:double "libinput_event_tablet_tool_get_tilt_x" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-tilt-y event)
(ffi:double "libinput_event_tablet_tool_get_tilt_y" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-rotation event)
(ffi:double "libinput_event_tablet_tool_get_rotation" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-slider-position event)
(ffi:double "libinput_event_tablet_tool_get_slider_position" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-size-major event)
(ffi:double "libinput_event_tablet_tool_get_size_major" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-size-minor event)
(ffi:double "libinput_event_tablet_tool_get_size_minor" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-wheel-delta event)
(ffi:double "libinput_event_tablet_tool_get_wheel_delta" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-wheel-delta-discrete event)
(ffi:int "libinput_event_tablet_tool_get_wheel_delta_discrete" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-x-transformed event width)
(ffi:double
"libinput_event_tablet_tool_get_x_transformed"
(list '* ffi:uint32))
(% (unwrap-libinput-event-tablet-tool event) width))
(define-libinput-procedure
(libinput-event-tablet-tool-get-y-transformed event height)
(ffi:double
"libinput_event_tablet_tool_get_y_transformed"
(list '* ffi:uint32))
(% (unwrap-libinput-event-tablet-tool event) height))
(define-libinput-procedure
(libinput-event-tablet-tool-get-tool event)
('* "libinput_event_tablet_tool_get_tool" (list '*))
(wrap-libinput-tablet-tool (% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-get-proximity-state event)
(ffi:int32 "libinput_event_tablet_tool_get_proximity_state" (list '*))
(number->%libinput-tablet-tool-proximity-state-enum
(% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-get-tip-state event)
(ffi:int32 "libinput_event_tablet_tool_get_tip_state" (list '*))
(number->%libinput-tablet-tool-tip-state-enum
(% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-get-button event)
(ffi:uint32 "libinput_event_tablet_tool_get_button" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-button-state event)
(ffi:int32 "libinput_event_tablet_tool_get_button_state" (list '*))
(number->%libinput-button-state-enum
(% (unwrap-libinput-event-tablet-tool event))))
(define-libinput-procedure
(libinput-event-tablet-tool-get-seat-button-count event)
(ffi:uint32 "libinput_event_tablet_tool_get_seat_button_count" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-time event)
(ffi:uint32 "libinput_event_tablet_tool_get_time" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-event-tablet-tool-get-time-usec event)
(ffi:uint64 "libinput_event_tablet_tool_get_time_usec" (list '*))
(% (unwrap-libinput-event-tablet-tool event)))
(define-libinput-procedure
(libinput-tablet-tool-get-type tool)
(ffi:int32 "libinput_tablet_tool_get_type" (list '*))
(number->%libinput-tablet-tool-type-enum
(% (unwrap-libinput-tablet-tool tool))))
(define-libinput-procedure
(libinput-tablet-tool-get-tool-id tool)
(ffi:uint64 "libinput_tablet_tool_get_tool_id" (list '*))
(% (unwrap-libinput-tablet-tool tool)))
(define-libinput-procedure
(libinput-tablet-tool-ref tool)
('* "libinput_tablet_tool_ref" (list '*))
(wrap-libinput-tablet-tool (% (unwrap-libinput-tablet-tool tool))))
(define-libinput-procedure
(libinput-tablet-tool-unref tool)
('* "libinput_tablet_tool_unref" (list '*))
(wrap-libinput-tablet-tool (% (unwrap-libinput-tablet-tool tool))))
(define-libinput-procedure