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
1001
1002
1003
pub type wlc_handle = usize;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct wlc_point {
pub x: i32,
pub y: i32,
}
#[test]
fn bindgen_test_layout_wlc_point() {
assert_eq!(::std::mem::size_of::<wlc_point>() , 8usize , concat ! (
"Size of: " , stringify ! ( wlc_point ) ));
assert_eq! (::std::mem::align_of::<wlc_point>() , 4usize , concat ! (
"Alignment of " , stringify ! ( wlc_point ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_point ) ) . x as * const _ as usize }
, 0usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_point ) , "::" ,
stringify ! ( x ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_point ) ) . y as * const _ as usize }
, 4usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_point ) , "::" ,
stringify ! ( y ) ));
}
impl Clone for wlc_point {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct wlc_size {
pub w: u32,
pub h: u32,
}
#[test]
fn bindgen_test_layout_wlc_size() {
assert_eq!(::std::mem::size_of::<wlc_size>() , 8usize , concat ! (
"Size of: " , stringify ! ( wlc_size ) ));
assert_eq! (::std::mem::align_of::<wlc_size>() , 4usize , concat ! (
"Alignment of " , stringify ! ( wlc_size ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_size ) ) . w as * const _ as usize }
, 0usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_size ) , "::" ,
stringify ! ( w ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_size ) ) . h as * const _ as usize }
, 4usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_size ) , "::" ,
stringify ! ( h ) ));
}
impl Clone for wlc_size {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct wlc_geometry {
pub origin: wlc_point,
pub size: wlc_size,
}
#[test]
fn bindgen_test_layout_wlc_geometry() {
assert_eq!(::std::mem::size_of::<wlc_geometry>() , 16usize , concat ! (
"Size of: " , stringify ! ( wlc_geometry ) ));
assert_eq! (::std::mem::align_of::<wlc_geometry>() , 4usize , concat ! (
"Alignment of " , stringify ! ( wlc_geometry ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_geometry ) ) . origin as * const _ as
usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_geometry ) , "::" ,
stringify ! ( origin ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_geometry ) ) . size as * const _ as
usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_geometry ) , "::" ,
stringify ! ( size ) ));
}
impl Clone for wlc_geometry {
fn clone(&self) -> Self { *self }
}
pub type __pid_t = libc::c_int;
pub type pid_t = __pid_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct wlc_event_source([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xkb_state([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xkb_keymap([u8; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libinput_device([u8; 0]);
pub const wlc_log_type_WLC_LOG_INFO: wlc_log_type = 0;
pub const wlc_log_type_WLC_LOG_WARN: wlc_log_type = 1;
pub const wlc_log_type_WLC_LOG_ERROR: wlc_log_type = 2;
pub const wlc_log_type_WLC_LOG_WAYLAND: wlc_log_type = 3;
pub type wlc_log_type = libc::c_uint;
pub const wlc_backend_type_WLC_BACKEND_NONE: wlc_backend_type = 0;
pub const wlc_backend_type_WLC_BACKEND_DRM: wlc_backend_type = 1;
pub const wlc_backend_type_WLC_BACKEND_X11: wlc_backend_type = 2;
pub type wlc_backend_type = libc::c_uint;
pub const wlc_event_bit_WLC_EVENT_READABLE: wlc_event_bit = 1;
pub const wlc_event_bit_WLC_EVENT_WRITABLE: wlc_event_bit = 2;
pub const wlc_event_bit_WLC_EVENT_HANGUP: wlc_event_bit = 4;
pub const wlc_event_bit_WLC_EVENT_ERROR: wlc_event_bit = 8;
pub type wlc_event_bit = libc::c_uint;
pub const wlc_view_state_bit_WLC_BIT_MAXIMIZED: wlc_view_state_bit = 1;
pub const wlc_view_state_bit_WLC_BIT_FULLSCREEN: wlc_view_state_bit = 2;
pub const wlc_view_state_bit_WLC_BIT_RESIZING: wlc_view_state_bit = 4;
pub const wlc_view_state_bit_WLC_BIT_MOVING: wlc_view_state_bit = 8;
pub const wlc_view_state_bit_WLC_BIT_ACTIVATED: wlc_view_state_bit = 16;
pub type wlc_view_state_bit = libc::c_uint;
pub const wlc_view_type_bit_WLC_BIT_OVERRIDE_REDIRECT: wlc_view_type_bit = 1;
pub const wlc_view_type_bit_WLC_BIT_UNMANAGED: wlc_view_type_bit = 2;
pub const wlc_view_type_bit_WLC_BIT_SPLASH: wlc_view_type_bit = 4;
pub const wlc_view_type_bit_WLC_BIT_MODAL: wlc_view_type_bit = 8;
pub const wlc_view_type_bit_WLC_BIT_POPUP: wlc_view_type_bit = 16;
pub type wlc_view_type_bit = libc::c_uint;
pub const wlc_view_property_update_bit_WLC_BIT_PROPERTY_TITLE:
wlc_view_property_update_bit =
1;
pub const wlc_view_property_update_bit_WLC_BIT_PROPERTY_CLASS:
wlc_view_property_update_bit =
2;
pub const wlc_view_property_update_bit_WLC_BIT_PROPERTY_APP_ID:
wlc_view_property_update_bit =
4;
pub const wlc_view_property_update_bit_WLC_BIT_PROPERTY_PID:
wlc_view_property_update_bit =
8;
pub type wlc_view_property_update_bit = libc::c_uint;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_NONE: wlc_resize_edge = 0;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_TOP: wlc_resize_edge = 1;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_BOTTOM: wlc_resize_edge = 2;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_LEFT: wlc_resize_edge = 4;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_TOP_LEFT: wlc_resize_edge = 5;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_BOTTOM_LEFT: wlc_resize_edge = 6;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_RIGHT: wlc_resize_edge = 8;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_TOP_RIGHT: wlc_resize_edge = 9;
pub const wlc_resize_edge_WLC_RESIZE_EDGE_BOTTOM_RIGHT: wlc_resize_edge = 10;
pub type wlc_resize_edge = libc::c_uint;
pub const wlc_modifier_bit_WLC_BIT_MOD_SHIFT: wlc_modifier_bit = 1;
pub const wlc_modifier_bit_WLC_BIT_MOD_CAPS: wlc_modifier_bit = 2;
pub const wlc_modifier_bit_WLC_BIT_MOD_CTRL: wlc_modifier_bit = 4;
pub const wlc_modifier_bit_WLC_BIT_MOD_ALT: wlc_modifier_bit = 8;
pub const wlc_modifier_bit_WLC_BIT_MOD_MOD2: wlc_modifier_bit = 16;
pub const wlc_modifier_bit_WLC_BIT_MOD_MOD3: wlc_modifier_bit = 32;
pub const wlc_modifier_bit_WLC_BIT_MOD_LOGO: wlc_modifier_bit = 64;
pub const wlc_modifier_bit_WLC_BIT_MOD_MOD5: wlc_modifier_bit = 128;
pub type wlc_modifier_bit = libc::c_uint;
pub const wlc_led_bit_WLC_BIT_LED_NUM: wlc_led_bit = 1;
pub const wlc_led_bit_WLC_BIT_LED_CAPS: wlc_led_bit = 2;
pub const wlc_led_bit_WLC_BIT_LED_SCROLL: wlc_led_bit = 4;
pub type wlc_led_bit = libc::c_uint;
pub const wlc_key_state_WLC_KEY_STATE_RELEASED: wlc_key_state = 0;
pub const wlc_key_state_WLC_KEY_STATE_PRESSED: wlc_key_state = 1;
pub type wlc_key_state = libc::c_uint;
pub const wlc_button_state_WLC_BUTTON_STATE_RELEASED: wlc_button_state = 0;
pub const wlc_button_state_WLC_BUTTON_STATE_PRESSED: wlc_button_state = 1;
pub type wlc_button_state = libc::c_uint;
pub const wlc_scroll_axis_bit_WLC_SCROLL_AXIS_VERTICAL: wlc_scroll_axis_bit =
1;
pub const wlc_scroll_axis_bit_WLC_SCROLL_AXIS_HORIZONTAL: wlc_scroll_axis_bit
=
2;
pub type wlc_scroll_axis_bit = libc::c_uint;
pub const wlc_touch_type_WLC_TOUCH_DOWN: wlc_touch_type = 0;
pub const wlc_touch_type_WLC_TOUCH_UP: wlc_touch_type = 1;
pub const wlc_touch_type_WLC_TOUCH_MOTION: wlc_touch_type = 2;
pub const wlc_touch_type_WLC_TOUCH_FRAME: wlc_touch_type = 3;
pub const wlc_touch_type_WLC_TOUCH_CANCEL: wlc_touch_type = 4;
pub type wlc_touch_type = libc::c_uint;
pub const wlc_positioner_anchor_bit_WLC_BIT_ANCHOR_NONE:
wlc_positioner_anchor_bit =
0;
pub const wlc_positioner_anchor_bit_WLC_BIT_ANCHOR_TOP:
wlc_positioner_anchor_bit =
1;
pub const wlc_positioner_anchor_bit_WLC_BIT_ANCHOR_BOTTOM:
wlc_positioner_anchor_bit =
2;
pub const wlc_positioner_anchor_bit_WLC_BIT_ANCHOR_LEFT:
wlc_positioner_anchor_bit =
4;
pub const wlc_positioner_anchor_bit_WLC_BIT_ANCHOR_RIGHT:
wlc_positioner_anchor_bit =
8;
pub type wlc_positioner_anchor_bit = libc::c_uint;
pub const wlc_positioner_gravity_bit_WLC_BIT_GRAVITY_NONE:
wlc_positioner_gravity_bit =
0;
pub const wlc_positioner_gravity_bit_WLC_BIT_GRAVITY_TOP:
wlc_positioner_gravity_bit =
1;
pub const wlc_positioner_gravity_bit_WLC_BIT_GRAVITY_BOTTOM:
wlc_positioner_gravity_bit =
2;
pub const wlc_positioner_gravity_bit_WLC_BIT_GRAVITY_LEFT:
wlc_positioner_gravity_bit =
4;
pub const wlc_positioner_gravity_bit_WLC_BIT_GRAVITY_RIGHT:
wlc_positioner_gravity_bit =
8;
pub type wlc_positioner_gravity_bit = libc::c_uint;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_NONE:
wlc_positioner_constraint_adjustment_bit =
0;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_SLIDE_X:
wlc_positioner_constraint_adjustment_bit =
1;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_SLIDE_Y:
wlc_positioner_constraint_adjustment_bit =
2;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_FLIP_X:
wlc_positioner_constraint_adjustment_bit =
4;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_FLIP_Y:
wlc_positioner_constraint_adjustment_bit =
8;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_RESIZE_X:
wlc_positioner_constraint_adjustment_bit =
16;
pub const wlc_positioner_constraint_adjustment_bit_WLC_BIT_CONSTRAINT_ADJUSTMENT_RESIZE_Y:
wlc_positioner_constraint_adjustment_bit =
32;
pub type wlc_positioner_constraint_adjustment_bit = libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct wlc_modifiers {
pub leds: u32,
pub mods: u32,
}
#[test]
fn bindgen_test_layout_wlc_modifiers() {
assert_eq!(::std::mem::size_of::<wlc_modifiers>() , 8usize , concat ! (
"Size of: " , stringify ! ( wlc_modifiers ) ));
assert_eq! (::std::mem::align_of::<wlc_modifiers>() , 4usize , concat ! (
"Alignment of " , stringify ! ( wlc_modifiers ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_modifiers ) ) . leds as * const _ as
usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_modifiers ) , "::"
, stringify ! ( leds ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const wlc_modifiers ) ) . mods as * const _ as
usize } , 4usize , concat ! (
"Alignment of field: " , stringify ! ( wlc_modifiers ) , "::"
, stringify ! ( mods ) ));
}
impl Clone for wlc_modifiers {
fn clone(&self) -> Self { *self }
}
extern "C" {
pub fn wlc_set_output_created_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)
-> bool>);
}
extern "C" {
pub fn wlc_set_output_destroyed_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_output_focus_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle,
focus:
bool)>);
}
extern "C" {
pub fn wlc_set_output_resolution_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle,
from:
*const wlc_size,
to:
*const wlc_size)>);
}
extern "C" {
pub fn wlc_set_output_render_pre_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_output_render_post_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_output_context_created_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_output_context_destroyed_cb(cb:
::std::option::Option<unsafe extern "C" fn(output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_view_created_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle)
-> bool>);
}
extern "C" {
pub fn wlc_set_view_destroyed_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_view_focus_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
focus:
bool)>);
}
extern "C" {
pub fn wlc_set_view_move_to_output_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
from_output:
wlc_handle,
to_output:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_view_request_geometry_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
arg1:
*const wlc_geometry)>);
}
extern "C" {
pub fn wlc_set_view_request_state_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
arg1:
wlc_view_state_bit,
toggle:
bool)>);
}
extern "C" {
pub fn wlc_set_view_request_move_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
arg1:
*const wlc_point)>);
}
extern "C" {
pub fn wlc_set_view_request_resize_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
edges:
u32,
arg1:
*const wlc_point)>);
}
extern "C" {
pub fn wlc_set_view_render_pre_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_view_render_post_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle)>);
}
extern "C" {
pub fn wlc_set_view_properties_updated_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
mask:
u32)>);
}
extern "C" {
pub fn wlc_set_keyboard_key_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
time:
u32,
arg1:
*const wlc_modifiers,
key:
u32,
arg2:
wlc_key_state)
-> bool>);
}
extern "C" {
pub fn wlc_set_pointer_button_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
time:
u32,
arg1:
*const wlc_modifiers,
button:
u32,
arg2:
wlc_button_state,
arg3:
*const wlc_point)
-> bool>);
}
extern "C" {
pub fn wlc_set_pointer_scroll_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
time:
u32,
arg1:
*const wlc_modifiers,
axis_bits:
u8,
amount:
*mut f64)
-> bool>);
}
extern "C" {
pub fn wlc_set_pointer_motion_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
time:
u32,
arg1:
*const wlc_point)
-> bool>);
}
extern "C" {
pub fn wlc_set_touch_cb(cb:
::std::option::Option<unsafe extern "C" fn(view:
wlc_handle,
time:
u32,
arg1:
*const wlc_modifiers,
arg2:
wlc_touch_type,
slot:
i32,
arg3:
*const wlc_point)
-> bool>);
}
extern "C" {
pub fn wlc_set_compositor_ready_cb(cb:
::std::option::Option<unsafe extern "C" fn()>);
}
extern "C" {
pub fn wlc_set_compositor_terminate_cb(cb:
::std::option::Option<unsafe extern "C" fn()>);
}
extern "C" {
pub fn wlc_set_input_created_cb(cb:
::std::option::Option<unsafe extern "C" fn(device:
*mut libinput_device)
-> bool>);
}
extern "C" {
pub fn wlc_set_input_destroyed_cb(cb:
::std::option::Option<unsafe extern "C" fn(device:
*mut libinput_device)>);
}
extern "C" {
pub fn wlc_log_set_handler(cb:
::std::option::Option<unsafe extern "C" fn(type_:
wlc_log_type,
str:
*const libc::c_char)>);
}
extern "C" {
pub fn wlc_init() -> bool;
}
extern "C" {
pub fn wlc_terminate();
}
extern "C" {
pub fn wlc_get_backend_type() -> wlc_backend_type;
}
extern "C" {
pub fn wlc_exec(bin: *const libc::c_char,
args: *const *const libc::c_char);
}
extern "C" {
pub fn wlc_run();
}
extern "C" {
pub fn wlc_handle_set_user_data(handle: wlc_handle,
userdata: *const libc::c_void);
}
extern "C" {
pub fn wlc_handle_get_user_data(handle: wlc_handle) -> *mut libc::c_void;
}
extern "C" {
pub fn wlc_event_loop_add_fd(fd: libc::c_int, mask: u32,
cb:
::std::option::Option<unsafe extern "C" fn(fd:
libc::c_int,
mask:
u32,
userdata:
*mut libc::c_void)
->
libc::c_int>,
userdata: *mut libc::c_void)
-> *mut wlc_event_source;
}
extern "C" {
pub fn wlc_event_loop_add_timer(cb:
::std::option::Option<unsafe extern "C" fn(userdata:
*mut libc::c_void)
->
libc::c_int>,
userdata: *mut libc::c_void)
-> *mut wlc_event_source;
}
extern "C" {
pub fn wlc_event_source_timer_update(source: *mut wlc_event_source,
ms_delay: i32) -> bool;
}
extern "C" {
pub fn wlc_event_source_remove(source: *mut wlc_event_source);
}
extern "C" {
pub fn wlc_get_outputs(out_memb: *mut usize) -> *const wlc_handle;
}
extern "C" {
pub fn wlc_get_focused_output() -> wlc_handle;
}
extern "C" {
pub fn wlc_output_get_name(output: wlc_handle) -> *const libc::c_char;
}
extern "C" {
pub fn wlc_output_get_sleep(output: wlc_handle) -> bool;
}
extern "C" {
pub fn wlc_output_set_sleep(output: wlc_handle, sleep: bool);
}
extern "C" {
pub fn wlc_output_set_gamma(output: wlc_handle, size: u16, r: *mut u16,
g: *mut u16, b: *mut u16);
}
extern "C" {
pub fn wlc_output_get_gamma_size(output: wlc_handle) -> u16;
}
extern "C" {
pub fn wlc_output_get_resolution(output: wlc_handle) -> *const wlc_size;
}
extern "C" {
pub fn wlc_output_get_virtual_resolution(output: wlc_handle)
-> *const wlc_size;
}
extern "C" {
pub fn wlc_output_set_resolution(output: wlc_handle,
resolution: *const wlc_size, scale: u32);
}
extern "C" {
pub fn wlc_output_get_scale(output: wlc_handle) -> u32;
}
extern "C" {
pub fn wlc_output_get_mask(output: wlc_handle) -> u32;
}
extern "C" {
pub fn wlc_output_set_mask(output: wlc_handle, mask: u32);
}
extern "C" {
pub fn wlc_output_get_views(output: wlc_handle, out_memb: *mut usize)
-> *const wlc_handle;
}
extern "C" {
pub fn wlc_output_get_mutable_views(output: wlc_handle,
out_memb: *mut usize)
-> *mut wlc_handle;
}
extern "C" {
pub fn wlc_output_set_views(output: wlc_handle, views: *const wlc_handle,
memb: usize) -> bool;
}
extern "C" {
pub fn wlc_output_focus(output: wlc_handle);
}
extern "C" {
pub fn wlc_view_focus(view: wlc_handle);
}
extern "C" {
pub fn wlc_view_close(view: wlc_handle);
}
extern "C" {
pub fn wlc_view_get_output(view: wlc_handle) -> wlc_handle;
}
extern "C" {
pub fn wlc_view_set_output(view: wlc_handle, output: wlc_handle);
}
extern "C" {
pub fn wlc_view_send_to_back(view: wlc_handle);
}
extern "C" {
pub fn wlc_view_send_below(view: wlc_handle, other: wlc_handle);
}
extern "C" {
pub fn wlc_view_bring_above(view: wlc_handle, other: wlc_handle);
}
extern "C" {
pub fn wlc_view_bring_to_front(view: wlc_handle);
}
extern "C" {
pub fn wlc_view_get_mask(view: wlc_handle) -> u32;
}
extern "C" {
pub fn wlc_view_set_mask(view: wlc_handle, mask: u32);
}
extern "C" {
pub fn wlc_view_get_geometry(view: wlc_handle) -> *const wlc_geometry;
}
extern "C" {
pub fn wlc_view_positioner_get_size(view: wlc_handle) -> *const wlc_size;
}
extern "C" {
pub fn wlc_view_positioner_get_anchor_rect(view: wlc_handle)
-> *const wlc_geometry;
}
extern "C" {
pub fn wlc_view_positioner_get_offset(view: wlc_handle)
-> *const wlc_point;
}
extern "C" {
pub fn wlc_view_positioner_get_anchor(view: wlc_handle)
-> wlc_positioner_anchor_bit;
}
extern "C" {
pub fn wlc_view_positioner_get_gravity(view: wlc_handle)
-> wlc_positioner_gravity_bit;
}
extern "C" {
pub fn wlc_view_positioner_get_constraint_adjustment(view: wlc_handle)
-> wlc_positioner_constraint_adjustment_bit;
}
extern "C" {
pub fn wlc_view_get_visible_geometry(view: wlc_handle,
out_geometry: *mut wlc_geometry);
}
extern "C" {
pub fn wlc_view_set_geometry(view: wlc_handle, edges: u32,
geometry: *const wlc_geometry);
}
extern "C" {
pub fn wlc_view_get_type(view: wlc_handle) -> u32;
}
extern "C" {
pub fn wlc_view_set_type(view: wlc_handle, type_: wlc_view_type_bit,
toggle: bool);
}
extern "C" {
pub fn wlc_view_get_state(view: wlc_handle) -> u32;
}
extern "C" {
pub fn wlc_view_set_state(view: wlc_handle, state: wlc_view_state_bit,
toggle: bool);
}
extern "C" {
pub fn wlc_view_get_parent(view: wlc_handle) -> wlc_handle;
}
extern "C" {
pub fn wlc_view_set_parent(view: wlc_handle, parent: wlc_handle);
}
extern "C" {
pub fn wlc_view_get_title(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
pub fn wlc_view_get_instance(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
pub fn wlc_view_get_class(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
pub fn wlc_view_get_app_id(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
pub fn wlc_view_get_pid(view: wlc_handle) -> pid_t;
}
extern "C" {
pub fn wlc_keyboard_get_xkb_state() -> *mut xkb_state;
}
extern "C" {
pub fn wlc_keyboard_get_xkb_keymap() -> *mut xkb_keymap;
}
extern "C" {
pub fn wlc_keyboard_get_current_keys(out_memb: *mut usize) -> *const u32;
}
extern "C" {
pub fn wlc_keyboard_get_keysym_for_key(key: u32,
modifiers: *const wlc_modifiers)
-> u32;
}
extern "C" {
pub fn wlc_keyboard_get_utf32_for_key(key: u32,
modifiers: *const wlc_modifiers)
-> u32;
}
extern "C" {
pub fn wlc_pointer_get_position(out_position: *mut wlc_point);
}
extern "C" {
pub fn wlc_pointer_set_position(position: *const wlc_point);
}
pub type wlc_resource = usize;
extern "C" {
pub fn wlc_get_wl_display() -> *mut wl_display;
}
extern "C" {
pub fn wlc_handle_from_wl_surface_resource(resource: *mut wl_resource)
-> wlc_handle;
}
extern "C" {
pub fn wlc_handle_from_wl_output_resource(resource: *mut wl_resource)
-> wlc_handle;
}
extern "C" {
pub fn wlc_resource_from_wl_surface_resource(resource: *mut wl_resource)
-> wlc_resource;
}
extern "C" {
pub fn wlc_surface_get_size(surface: wlc_resource) -> *const wlc_size;
}
extern "C" {
pub fn wlc_surface_get_wl_resource(surface: wlc_resource)
-> *mut wl_resource;
}
extern "C" {
pub fn wlc_view_from_surface(surface: wlc_resource,
client: *mut wl_client,
interface: *const wl_interface,
implementation: *const libc::c_void,
version: u32, id: u32,
userdata: *mut libc::c_void) -> wlc_handle;
}
extern "C" {
pub fn wlc_view_get_surface(view: wlc_handle) -> wlc_resource;
}
extern "C" {
pub fn wlc_surface_get_subsurfaces(parent: wlc_resource,
out_size: *mut usize)
-> *const wlc_resource;
}
extern "C" {
pub fn wlc_get_subsurface_geometry(surface: wlc_resource,
out_geometry: *mut wlc_geometry);
}
extern "C" {
pub fn wlc_view_get_wl_client(view: wlc_handle) -> *mut wl_client;
}
extern "C" {
pub fn wlc_view_get_role(view: wlc_handle) -> *mut wl_resource;
}
pub const wlc_pixel_format_WLC_RGBA8888: wlc_pixel_format = 0;
pub type wlc_pixel_format = libc::c_uint;
extern "C" {
pub fn wlc_pixels_write(format: wlc_pixel_format,
geometry: *const wlc_geometry,
data: *const libc::c_void);
}
extern "C" {
pub fn wlc_pixels_read(format: wlc_pixel_format,
geometry: *const wlc_geometry,
out_geometry: *mut wlc_geometry,
out_data: *mut libc::c_void);
}
extern "C" {
pub fn wlc_surface_render(surface: wlc_resource,
geometry: *const wlc_geometry);
}
extern "C" {
pub fn wlc_output_schedule_render(output: wlc_handle);
}
extern "C" {
pub fn wlc_surface_flush_frame_callbacks(surface: wlc_resource);
}
pub const wlc_renderer_WLC_RENDERER_GLES2: wlc_renderer = 0;
pub const wlc_renderer_WLC_NO_RENDERER: wlc_renderer = 1;
pub type wlc_renderer = libc::c_uint;
extern "C" {
pub fn wlc_output_get_renderer(output: wlc_handle) -> wlc_renderer;
}
pub const wlc_surface_format_SURFACE_RGB: wlc_surface_format = 0;
pub const wlc_surface_format_SURFACE_RGBA: wlc_surface_format = 1;
pub const wlc_surface_format_SURFACE_EGL: wlc_surface_format = 2;
pub const wlc_surface_format_SURFACE_Y_UV: wlc_surface_format = 3;
pub const wlc_surface_format_SURFACE_Y_U_V: wlc_surface_format = 4;
pub const wlc_surface_format_SURFACE_Y_XUXV: wlc_surface_format = 5;
pub type wlc_surface_format = libc::c_uint;
extern "C" {
pub fn wlc_surface_get_textures(surface: wlc_resource,
out_textures: *mut u32,
out_format: *mut wlc_surface_format)
-> bool;
}