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
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
/* automatically generated by rust-bindgen */

pub type wlc_handle = usize;
/** Fixed 2D point */
#[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 }
}
/** Fixed 2D size */
#[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 }
}
/** Fixed 2D point, size pair */
#[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;
/** wlc_log(), wlc_vlog(); */
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 const wlc_backend_type_WLC_BACKEND_WAYLAND: wlc_backend_type = 3;
/** wlc_get_backend_type(); */
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;
/** mask in wlc_event_loop_add_fd(); */
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;
/** wlc_view_get_state(); */
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;
/** wlc_view_get_type(); */
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;
/** wlc_set_view_properties_updated_cb(); */
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;
/** wlc_view_set_geometry(); Edges in interface interface.view.request.resize function. */
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;
/** Mods in interface.keyboard.key function. */
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;
/** Leds in interface.keyboard.key function. */
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;
/** State in interface.keyboard.key function. */
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;
/** State in interface.pointer.button function. */
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;
/** Axis in interface.pointer.scroll function. */
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;
/** Type in interface.touch.touch function */
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;
/** wlc_view_positioner_get_anchor(); */
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;
/** wlc_view_positioner_get_gravity(); */
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;
/** wlc_view_positioner_get_gravity(); */
pub type wlc_positioner_constraint_adjustment_bit = libc::c_uint;
/** State of keyboard modifiers in various functions. */
#[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" {
    /** Output was created. Return false if you want to destroy the output. (e.g. failed to allocate data related to view) */
    pub fn wlc_set_output_created_cb(cb:
                                         ::std::option::Option<unsafe extern "C" fn(output:
                                                                                        wlc_handle)
                                                                   -> bool>);
}
extern "C" {
    /** Output was destroyed. */
    pub fn wlc_set_output_destroyed_cb(cb:
                                           ::std::option::Option<unsafe extern "C" fn(output:
                                                                                          wlc_handle)>);
}
extern "C" {
    /** Output got or lost focus. */
    pub fn wlc_set_output_focus_cb(cb:
                                       ::std::option::Option<unsafe extern "C" fn(output:
                                                                                      wlc_handle,
                                                                                  focus:
                                                                                      bool)>);
}
extern "C" {
    /** Output resolution changed. */
    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" {
    /** Output pre render hook. */
    pub fn wlc_set_output_render_pre_cb(cb:
                                            ::std::option::Option<unsafe extern "C" fn(output:
                                                                                           wlc_handle)>);
}
extern "C" {
    /** Output post render hook. */
    pub fn wlc_set_output_render_post_cb(cb:
                                             ::std::option::Option<unsafe extern "C" fn(output:
                                                                                            wlc_handle)>);
}
extern "C" {
    /** Output context is created. This generally happens on startup and when current tty changes */
    pub fn wlc_set_output_context_created_cb(cb:
                                                 ::std::option::Option<unsafe extern "C" fn(output:
                                                                                                wlc_handle)>);
}
extern "C" {
    /** Output context was destroyed. */
    pub fn wlc_set_output_context_destroyed_cb(cb:
                                                   ::std::option::Option<unsafe extern "C" fn(output:
                                                                                                  wlc_handle)>);
}
extern "C" {
    /** View was created. Return false if you want to destroy the view. (e.g. failed to allocate data related to view) */
    pub fn wlc_set_view_created_cb(cb:
                                       ::std::option::Option<unsafe extern "C" fn(view:
                                                                                      wlc_handle)
                                                                 -> bool>);
}
extern "C" {
    /** View was destroyed. */
    pub fn wlc_set_view_destroyed_cb(cb:
                                         ::std::option::Option<unsafe extern "C" fn(view:
                                                                                        wlc_handle)>);
}
extern "C" {
    /** View got or lost focus. */
    pub fn wlc_set_view_focus_cb(cb:
                                     ::std::option::Option<unsafe extern "C" fn(view:
                                                                                    wlc_handle,
                                                                                focus:
                                                                                    bool)>);
}
extern "C" {
    /** View was moved to output. */
    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" {
    /** Request to set given geometry for view. Apply using wlc_view_set_geometry to agree. */
    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" {
    /** Request to disable or enable the given state for view. Apply using wlc_view_set_state to agree. */
    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" {
    /** Request to move itself. Start a interactive move to agree. */
    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" {
    /** Request to resize itself with the given edges. Start a interactive resize to agree. */
    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" {
    /** View pre render hook. */
    pub fn wlc_set_view_render_pre_cb(cb:
                                          ::std::option::Option<unsafe extern "C" fn(view:
                                                                                         wlc_handle)>);
}
extern "C" {
    /** View post render hook. */
    pub fn wlc_set_view_render_post_cb(cb:
                                           ::std::option::Option<unsafe extern "C" fn(view:
                                                                                          wlc_handle)>);
}
extern "C" {
    /** View properties (title, class, app_id) was updated */
    pub fn wlc_set_view_properties_updated_cb(cb:
                                                  ::std::option::Option<unsafe extern "C" fn(view:
                                                                                                 wlc_handle,
                                                                                             mask:
                                                                                                 u32)>);
}
extern "C" {
    /**
* View requested to be minimized. Return true if you allow the request, false if not.
* Actual minimization is compositor dependent.
*/
    pub fn wlc_set_view_minimized_cb(cb:
                                         ::std::option::Option<unsafe extern "C" fn(view:
                                                                                        wlc_handle,
                                                                                    minimized:
                                                                                        bool)
                                                                   -> bool>);
}
extern "C" {
    /** Key event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients. */
    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" {
    /** Button event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients. */
    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" {
    /** Scroll event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients. */
    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" {
    /** Motion event was triggered, view handle will be zero if there was no focus. Apply with wlc_pointer_set_position_v2 to agree. Return true to prevent sending the event to clients. */
    pub fn wlc_set_pointer_motion_cb_v2(cb:
                                            ::std::option::Option<unsafe extern "C" fn(view:
                                                                                           wlc_handle,
                                                                                       time:
                                                                                           u32,
                                                                                       x:
                                                                                           f64,
                                                                                       y:
                                                                                           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" {
    /** Touch event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients. */
    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" {
    /** Compositor is ready to accept clients. */
    pub fn wlc_set_compositor_ready_cb(cb:
                                           ::std::option::Option<unsafe extern "C" fn()>);
}
extern "C" {
    /** Compositor is about to terminate */
    pub fn wlc_set_compositor_terminate_cb(cb:
                                               ::std::option::Option<unsafe extern "C" fn()>);
}
extern "C" {
    /** Input device was created. Return value does nothing. (Experimental) */
    pub fn wlc_set_input_created_cb(cb:
                                        ::std::option::Option<unsafe extern "C" fn(device:
                                                                                       *mut libinput_device)
                                                                  -> bool>);
}
extern "C" {
    /** Input device was destroyed. (Experimental) */
    pub fn wlc_set_input_destroyed_cb(cb:
                                          ::std::option::Option<unsafe extern "C" fn(device:
                                                                                         *mut libinput_device)>);
}
extern "C" {
    /** Set log handler. Can be set before wlc_init. */
    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" {
    /**
 * Initialize wlc. Returns false on failure.
 *
 * Avoid running unverified code before wlc_init as wlc compositor may be run with higher
 * privileges on non logind systems where compositor binary needs to be suid.
 *
 * wlc_init's purpose is to initialize and drop privileges as soon as possible.
 *
 * Callbacks should be set using wlc_set_*_cb functions before calling wlc_init,
 * failing to do so will cause any callback the init may trigger to not be called.
 */
    pub fn wlc_init() -> bool;
}
extern "C" {
    /** Terminate wlc. */
    pub fn wlc_terminate();
}
extern "C" {
    /** Query backend wlc is using. */
    pub fn wlc_get_backend_type() -> wlc_backend_type;
}
extern "C" {
    /** Exec program. */
    pub fn wlc_exec(bin: *const libc::c_char,
                    args: *const *const libc::c_char);
}
extern "C" {
    /** Run event loop. */
    pub fn wlc_run();
}
extern "C" {
    /** Link custom data to handle. */
    pub fn wlc_handle_set_user_data(handle: wlc_handle,
                                    userdata: *const libc::c_void);
}
extern "C" {
    /** Get linked custom data from handle. */
    pub fn wlc_handle_get_user_data(handle: wlc_handle) -> *mut libc::c_void;
}
extern "C" {
    /** Add fd to event loop. Return value of callback is unused, you should return 0. */
    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" {
    /** Add timer to event loop. Return value of callback is unused, you should return 0. */
    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" {
    /** Update timer to trigger after delay. Returns true on success. */
    pub fn wlc_event_source_timer_update(source: *mut wlc_event_source,
                                         ms_delay: i32) -> bool;
}
extern "C" {
    /** Remove event source from event loop. */
    pub fn wlc_event_source_remove(source: *mut wlc_event_source);
}
extern "C" {
    /** Get outputs. Returned array is a direct reference, careful when moving and destroying handles. */
    pub fn wlc_get_outputs(out_memb: *mut usize) -> *const wlc_handle;
}
extern "C" {
    /** Get focused output. */
    pub fn wlc_get_focused_output() -> wlc_handle;
}
extern "C" {
    /** Get output name. */
    pub fn wlc_output_get_name(output: wlc_handle) -> *const libc::c_char;
}
extern "C" {
    /** Get sleep state. */
    pub fn wlc_output_get_sleep(output: wlc_handle) -> bool;
}
extern "C" {
    /** Wake up / sleep. */
    pub fn wlc_output_set_sleep(output: wlc_handle, sleep: bool);
}
extern "C" {
    /** Set gamma. R, G, and B are color ramp arrays of size elements. */
    pub fn wlc_output_set_gamma(output: wlc_handle, size: u16, r: *mut u16,
                                g: *mut u16, b: *mut u16);
}
extern "C" {
    /** Get gamma size */
    pub fn wlc_output_get_gamma_size(output: wlc_handle) -> u16;
}
extern "C" {
    /**
 * Get real resolution.
 * Resolution applied by either wlc_output_set_resolution call or initially.
 * Do not use this for coordinate boundary.
 */
    pub fn wlc_output_get_resolution(output: wlc_handle) -> *const wlc_size;
}
extern "C" {
    /**
 * Get virtual resolution.
 * Resolution with transformations applied for proper rendering for example on high density displays.
 * Use this to figure out coordinate boundary.
 */
    pub fn wlc_output_get_virtual_resolution(output: wlc_handle)
     -> *const wlc_size;
}
extern "C" {
    /** Set resolution. */
    pub fn wlc_output_set_resolution(output: wlc_handle,
                                     resolution: *const wlc_size, scale: u32);
}
extern "C" {
    /** Get scale factor. */
    pub fn wlc_output_get_scale(output: wlc_handle) -> u32;
}
extern "C" {
    /** Get current visibility bitmask. */
    pub fn wlc_output_get_mask(output: wlc_handle) -> u32;
}
extern "C" {
    /** Set visibility bitmask. */
    pub fn wlc_output_set_mask(output: wlc_handle, mask: u32);
}
extern "C" {
    /** Get views in stack order. Returned array is a direct reference, careful when moving and destroying handles. */
    pub fn wlc_output_get_views(output: wlc_handle, out_memb: *mut usize)
     -> *const wlc_handle;
}
extern "C" {
    /**
 * Get mutable views in creation order. Returned array is a direct reference, careful when moving and destroying handles.
 * This is mainly useful for wm's who need another view stack for inplace sorting.
 * For example tiling wms, may want to use this to keep their tiling order separated from floating order.
 */
    pub fn wlc_output_get_mutable_views(output: wlc_handle,
                                        out_memb: *mut usize)
     -> *mut wlc_handle;
}
extern "C" {
    /** Set views in stack order. This will also change mutable views. Returns false on failure. */
    pub fn wlc_output_set_views(output: wlc_handle, views: *const wlc_handle,
                                memb: usize) -> bool;
}
extern "C" {
    /** Focus output. Pass zero for no focus. */
    pub fn wlc_output_focus(output: wlc_handle);
}
extern "C" {
    /** Focus view. Pass zero for no focus. */
    pub fn wlc_view_focus(view: wlc_handle);
}
extern "C" {
    /** Close view. */
    pub fn wlc_view_close(view: wlc_handle);
}
extern "C" {
    /** Get current output. */
    pub fn wlc_view_get_output(view: wlc_handle) -> wlc_handle;
}
extern "C" {
    /** Set output. Alternatively you can wlc_output_set_views. */
    pub fn wlc_view_set_output(view: wlc_handle, output: wlc_handle);
}
extern "C" {
    /** Send behind everything. */
    pub fn wlc_view_send_to_back(view: wlc_handle);
}
extern "C" {
    /** Send below another view. */
    pub fn wlc_view_send_below(view: wlc_handle, other: wlc_handle);
}
extern "C" {
    /** Send above another view. */
    pub fn wlc_view_bring_above(view: wlc_handle, other: wlc_handle);
}
extern "C" {
    /** Bring to front of everything. */
    pub fn wlc_view_bring_to_front(view: wlc_handle);
}
extern "C" {
    /** Get current visibility bitmask. */
    pub fn wlc_view_get_mask(view: wlc_handle) -> u32;
}
extern "C" {
    /** Set visibility bitmask. */
    pub fn wlc_view_set_mask(view: wlc_handle, mask: u32);
}
extern "C" {
    /** Get current geometry. (what client sees) */
    pub fn wlc_view_get_geometry(view: wlc_handle) -> *const wlc_geometry;
}
extern "C" {
    /**
 * Get size requested by positioner, as defined in xdg-shell v6.
 * Returns NULL if view has no valid positioner
 */
    pub fn wlc_view_positioner_get_size(view: wlc_handle) -> *const wlc_size;
}
extern "C" {
    /**
 * Get anchor rectangle requested by positioner, as defined in xdg-shell v6.
 * Returns NULL if view has no valid positioner.
 */
    pub fn wlc_view_positioner_get_anchor_rect(view: wlc_handle)
     -> *const wlc_geometry;
}
extern "C" {
    /**
 * Get offset requested by positioner, as defined in xdg-shell v6.
 * Returns NULL if view has no valid positioner,
 * or default value (0, 0) if positioner has no offset set.
 */
    pub fn wlc_view_positioner_get_offset(view: wlc_handle)
     -> *const wlc_point;
}
extern "C" {
    /**
 * Get anchor requested by positioner, as defined in xdg-shell v6.
 * Returns default value WLC_BIT_ANCHOR_NONE if view has no valid positioner
 * or if positioner has no anchor set.
 */
    pub fn wlc_view_positioner_get_anchor(view: wlc_handle)
     -> wlc_positioner_anchor_bit;
}
extern "C" {
    /**
 * Get anchor requested by positioner, as defined in xdg-shell v6.
 * Returns default value WLC_BIT_GRAVITY_NONE if view has no valid positioner
 * or if positioner has no gravity set.
 */
    pub fn wlc_view_positioner_get_gravity(view: wlc_handle)
     -> wlc_positioner_gravity_bit;
}
extern "C" {
    /**
 * Get constraint adjustment requested by positioner, as defined in xdg-shell v6.
 * Returns default value WLC_BIT_CONSTRAINT_ADJUSTMENT_NONE if view has no
 * valid positioner or if positioner has no constraint adjustment set.
 */
    pub fn wlc_view_positioner_get_constraint_adjustment(view: wlc_handle)
     -> wlc_positioner_constraint_adjustment_bit;
}
extern "C" {
    /** Get visible geometry. (what wlc displays) */
    pub fn wlc_view_get_visible_geometry(view: wlc_handle,
                                         out_geometry: *mut wlc_geometry);
}
extern "C" {
    /** Set geometry. Set edges if the geometry change is caused by interactive resize. */
    pub fn wlc_view_set_geometry(view: wlc_handle, edges: u32,
                                 geometry: *const wlc_geometry);
}
extern "C" {
    /** Get type bitfield. */
    pub fn wlc_view_get_type(view: wlc_handle) -> u32;
}
extern "C" {
    /** Set type bit. Toggle indicates whether it is set or not. */
    pub fn wlc_view_set_type(view: wlc_handle, type_: wlc_view_type_bit,
                             toggle: bool);
}
extern "C" {
    /** Get current state bitfield. */
    pub fn wlc_view_get_state(view: wlc_handle) -> u32;
}
extern "C" {
    /** Set state bit. Toggle indicates whether it is set or not. */
    pub fn wlc_view_set_state(view: wlc_handle, state: wlc_view_state_bit,
                              toggle: bool);
}
extern "C" {
    /** Get parent view. */
    pub fn wlc_view_get_parent(view: wlc_handle) -> wlc_handle;
}
extern "C" {
    /** Set parent view. */
    pub fn wlc_view_set_parent(view: wlc_handle, parent: wlc_handle);
}
extern "C" {
    /** Get title. */
    pub fn wlc_view_get_title(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
    /** Get instance. (shell-surface only) */
    pub fn wlc_view_get_instance(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
    /** Get class. (shell-surface only) */
    pub fn wlc_view_get_class(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
    /** Get app id. (xdg-surface only) */
    pub fn wlc_view_get_app_id(view: wlc_handle) -> *const libc::c_char;
}
extern "C" {
    /** Get pid. */
    pub fn wlc_view_get_pid(view: wlc_handle) -> pid_t;
}
extern "C" {
    /** Returns whether view is minimized or not */
    pub fn wlc_view_is_minimized(view: wlc_handle) -> bool;
}
extern "C" {
    /** Internal xkb_state exposed. You can use it to do more advanced key handling.
 *  However you should avoid messing up with its state. */
    pub fn wlc_keyboard_get_xkb_state() -> *mut xkb_state;
}
extern "C" {
    /** Internal xkb_keymap exposed. You can use it to do more advanced key handling. */
    pub fn wlc_keyboard_get_xkb_keymap() -> *mut xkb_keymap;
}
extern "C" {
    /** Get currently held keys. */
    pub fn wlc_keyboard_get_current_keys(out_memb: *mut usize) -> *const u32;
}
extern "C" {
    /** Utility function to convert raw keycode to keysym. Passed modifiers may transform the key. */
    pub fn wlc_keyboard_get_keysym_for_key(key: u32,
                                           modifiers: *const wlc_modifiers)
     -> u32;
}
extern "C" {
    /** Utility function to convert raw keycode to Unicode/UTF-32 codepoint. Passed modifiers may transform the key. */
    pub fn wlc_keyboard_get_utf32_for_key(key: u32,
                                          modifiers: *const wlc_modifiers)
     -> u32;
}
extern "C" {
    /** Get current pointer position. */
    pub fn wlc_pointer_get_position_v2(out_x: *mut f64, out_y: *mut f64);
}
extern "C" {
    pub fn wlc_pointer_get_position(out_position: *mut wlc_point);
}
extern "C" {
    /** Set current pointer position. */
    pub fn wlc_pointer_set_position_v2(x: f64, y: f64);
}
extern "C" {
    pub fn wlc_pointer_set_position(position: *const wlc_point);
}
extern "C" {
    /** Set current default selection source.
 *  The given callback shall send the data for the requested type over the fd and close it then */
    pub fn wlc_set_selection(data: *mut libc::c_void,
                             types: *const *const libc::c_char,
                             types_count: usize,
                             send:
                                 ::std::option::Option<unsafe extern "C" fn(data:
                                                                                *mut libc::c_void,
                                                                            type_:
                                                                                *const libc::c_char,
                                                                            fd:
                                                                                libc::c_int)>);
}
extern "C" {
    /** Receives the supported mime types of the current selection.
 *  The paramater size will be set to hold the number of types, it must not be NULL.
 *  If there is no current selection, NULL is returned and size set to 0.
 *  The caller is responsible for freeing the return pointer, the const char* values
 *  are guaranteed to stay valid at least until the data source changes */
    pub fn wlc_get_selection_types(size: *mut usize)
     -> *mut *const libc::c_char;
}
extern "C" {
    /** Asks the current selection to write its data with the given mime type to the given fd
  *  and close the fd afterwards. Returns false if there is no current selection, does
  *  not close the fd in this case.
  *  mime_type should be a type supported by the selection */
    pub fn wlc_get_selection_data(mime_type: *const libc::c_char,
                                  fd: libc::c_int) -> bool;
}
pub type wlc_resource = usize;
extern "C" {
    /** Returns Wayland display. */
    pub fn wlc_get_wl_display() -> *mut wl_display;
}
extern "C" {
    /** Returns view handle from wl_surface resource. */
    pub fn wlc_handle_from_wl_surface_resource(resource: *mut wl_resource)
     -> wlc_handle;
}
extern "C" {
    /** Returns output handle from wl_output resource. */
    pub fn wlc_handle_from_wl_output_resource(resource: *mut wl_resource)
     -> wlc_handle;
}
extern "C" {
    /** Returns internal wlc surface from wl_surface resource. */
    pub fn wlc_resource_from_wl_surface_resource(resource: *mut wl_resource)
     -> wlc_resource;
}
extern "C" {
    /** Get surface size. */
    pub fn wlc_surface_get_size(surface: wlc_resource) -> *const wlc_size;
}
extern "C" {
    /** Return wl_surface resource from internal wlc surface. */
    pub fn wlc_surface_get_wl_resource(surface: wlc_resource)
     -> *mut wl_resource;
}
extern "C" {
    /**
 * Turns wl_surface into a wlc view. Returns 0 on failure. This will also trigger view.created callback as any view would.
 * For the extra arguments see details of wl_resource_create and wl_resource_set_implementation.
 * The extra arguments may be set NULL, if you are not implementing Wayland interface for the surface role.
 */
    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" {
    /** Returns internal wlc surface from view handle */
    pub fn wlc_view_get_surface(view: wlc_handle) -> wlc_resource;
}
extern "C" {
    /** Returns a list of the subsurfaces of the given surface */
    pub fn wlc_surface_get_subsurfaces(parent: wlc_resource,
                                       out_size: *mut usize)
     -> *const wlc_resource;
}
extern "C" {
    /** Returns the size of a subsurface and its position relative to parent */
    pub fn wlc_get_subsurface_geometry(surface: wlc_resource,
                                       out_geometry: *mut wlc_geometry);
}
extern "C" {
    /** Returns wl_client from view handle */
    pub fn wlc_view_get_wl_client(view: wlc_handle) -> *mut wl_client;
}
extern "C" {
    /** Returns surface role resource from view handle. Return value will be NULL if the view was not assigned role or created with wlc_view_create_from_surface(). */
    pub fn wlc_view_get_role(view: wlc_handle) -> *mut wl_resource;
}
pub const wlc_pixel_format_WLC_RGBA8888: wlc_pixel_format = 0;
/** Allowed pixel formats. */
pub type wlc_pixel_format = libc::c_uint;
extern "C" {
    /**
 * Write pixel data with the specific format to output's framebuffer.
 * If the geometry is out of bounds, it will be automaticall clamped.
 */
    pub fn wlc_pixels_write(format: wlc_pixel_format,
                            geometry: *const wlc_geometry,
                            data: *const libc::c_void);
}
extern "C" {
    /**
 * Read pixel data from output's framebuffer.
 * If the geometry is out of bounds, it will be automatically clamped.
 * Potentially clamped geometry will be stored in out_geometry, to indicate width / height of the returned data.
 */
    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" {
    /** Renders surface. */
    pub fn wlc_surface_render(surface: wlc_resource,
                              geometry: *const wlc_geometry);
}
extern "C" {
    /**
 * Schedules output for rendering next frame. If output was already scheduled this is no-op,
 * if output is currently rendering, it will render immediately after.
 */
    pub fn wlc_output_schedule_render(output: wlc_handle);
}
extern "C" {
    /**
 * Adds frame callbacks of the given surface for the next output frame.
 * It applies recursively to all subsurfaces.
 * Useful when the compositor creates custom animations which require disabling internal rendering,
 * but still need to update the surface textures (for ex. video players).
 */
    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;
/** Enabled renderers */
pub type wlc_renderer = libc::c_uint;
extern "C" {
    /** Returns currently active renderer on the given output */
    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" {
    /**
 * Fills out_textures[] with the textures of a surface. Returns false if surface is invalid.
 * Array must have at least 3 elements and should be refreshed at each frame.
 * Note that these are not only OpenGL textures but rather render-specific.
 * For more info what they are check the renderer's source code */
    pub fn wlc_surface_get_textures(surface: wlc_resource,
                                    out_textures: *mut u32,
                                    out_format: *mut wlc_surface_format)
     -> bool;
}