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
/* automatically generated by rust-bindgen */

#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TessWindingRule {
    TESS_WINDING_ODD = 0,
    TESS_WINDING_NONZERO = 1,
    TESS_WINDING_POSITIVE = 2,
    TESS_WINDING_NEGATIVE = 3,
    TESS_WINDING_ABS_GEQ_TWO = 4,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum TessElementType {
    TESS_POLYGONS = 0,
    TESS_CONNECTED_POLYGONS = 1,
    TESS_BOUNDARY_CONTOURS = 2,
}
pub type TESSreal = f32;
pub type TESSindex = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TESStesselator {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct TESSalloc {
    pub memalloc: ::std::option::Option<unsafe extern "C" fn(userData:
                                                                 *mut ::std::os::raw::c_void,
                                                             size:
                                                                 ::std::os::raw::c_uint)
                                            -> *mut ::std::os::raw::c_void>,
    pub memrealloc: ::std::option::Option<unsafe extern "C" fn(userData:
                                                                   *mut ::std::os::raw::c_void,
                                                               ptr:
                                                                   *mut ::std::os::raw::c_void,
                                                               size:
                                                                   ::std::os::raw::c_uint)
                                              -> *mut ::std::os::raw::c_void>,
    pub memfree: ::std::option::Option<unsafe extern "C" fn(userData:
                                                                *mut ::std::os::raw::c_void,
                                                            ptr:
                                                                *mut ::std::os::raw::c_void)>,
    pub userData: *mut ::std::os::raw::c_void,
    pub meshEdgeBucketSize: ::std::os::raw::c_int,
    pub meshVertexBucketSize: ::std::os::raw::c_int,
    pub meshFaceBucketSize: ::std::os::raw::c_int,
    pub dictNodeBucketSize: ::std::os::raw::c_int,
    pub regionBucketSize: ::std::os::raw::c_int,
    pub extraVertices: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_TESSalloc() {
    assert_eq!(::std::mem::size_of::<TESSalloc>() , 56usize , concat ! (
               "Size of: " , stringify ! ( TESSalloc ) ));
    assert_eq! (::std::mem::align_of::<TESSalloc>() , 8usize , concat ! (
                "Alignment of " , stringify ! ( TESSalloc ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . memalloc as * const _ as
                usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( memalloc ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . memrealloc as * const _
                as usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( memrealloc ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . memfree as * const _ as
                usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( memfree ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . userData as * const _ as
                usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( userData ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . meshEdgeBucketSize as *
                const _ as usize } , 32usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( meshEdgeBucketSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . meshVertexBucketSize as *
                const _ as usize } , 36usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( meshVertexBucketSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . meshFaceBucketSize as *
                const _ as usize } , 40usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( meshFaceBucketSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . dictNodeBucketSize as *
                const _ as usize } , 44usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( dictNodeBucketSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . regionBucketSize as *
                const _ as usize } , 48usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( regionBucketSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const TESSalloc ) ) . extraVertices as * const
                _ as usize } , 52usize , concat ! (
                "Alignment of field: " , stringify ! ( TESSalloc ) , "::" ,
                stringify ! ( extraVertices ) ));
}
impl Clone for TESSalloc {
    fn clone(&self) -> Self { *self }
}
extern "C" {
    pub fn tessNewTess(alloc: *mut TESSalloc) -> *mut TESStesselator;
}
extern "C" {
    pub fn tessDeleteTess(tess: *mut TESStesselator);
}
extern "C" {
    pub fn tessAddContour(tess: *mut TESStesselator,
                          size: ::std::os::raw::c_int,
                          pointer: *const ::std::os::raw::c_void,
                          stride: ::std::os::raw::c_int,
                          count: ::std::os::raw::c_int);
}
extern "C" {
    pub fn tessTesselate(tess: *mut TESStesselator,
                         windingRule: ::std::os::raw::c_int,
                         elementType: ::std::os::raw::c_int,
                         polySize: ::std::os::raw::c_int,
                         vertexSize: ::std::os::raw::c_int,
                         normal: *const TESSreal) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn tessGetVertexCount(tess: *mut TESStesselator)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn tessGetVertices(tess: *mut TESStesselator) -> *const TESSreal;
}
extern "C" {
    pub fn tessGetVertexIndices(tess: *mut TESStesselator)
     -> *const TESSindex;
}
extern "C" {
    pub fn tessGetElementCount(tess: *mut TESStesselator)
     -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn tessGetElements(tess: *mut TESStesselator) -> *const TESSindex;
}