libtess2_sys/opt/rustwide/workdir/generated/
bindings.rs1pub const TessWindingRule_TESS_WINDING_ODD: TessWindingRule = 0;
4pub const TessWindingRule_TESS_WINDING_NONZERO: TessWindingRule = 1;
5pub const TessWindingRule_TESS_WINDING_POSITIVE: TessWindingRule = 2;
6pub const TessWindingRule_TESS_WINDING_NEGATIVE: TessWindingRule = 3;
7pub const TessWindingRule_TESS_WINDING_ABS_GEQ_TWO: TessWindingRule = 4;
8pub type TessWindingRule = ::std::os::raw::c_uint;
9pub const TessElementType_TESS_POLYGONS: TessElementType = 0;
10pub const TessElementType_TESS_CONNECTED_POLYGONS: TessElementType = 1;
11pub const TessElementType_TESS_BOUNDARY_CONTOURS: TessElementType = 2;
12pub type TessElementType = ::std::os::raw::c_uint;
13pub const TessOption_TESS_CONSTRAINED_DELAUNAY_TRIANGULATION: TessOption = 0;
14pub const TessOption_TESS_REVERSE_CONTOURS: TessOption = 1;
15pub type TessOption = ::std::os::raw::c_uint;
16pub type TESSreal = f32;
17pub type TESSindex = ::std::os::raw::c_int;
18#[repr(C)]
19#[derive(Debug, Copy, Clone)]
20pub struct TESStesselator {
21 _unused: [u8; 0],
22}
23#[repr(C)]
24#[derive(Debug, Copy, Clone)]
25pub struct TESSalloc {
26 pub memalloc: ::std::option::Option<
27 unsafe extern "C" fn(
28 userData: *mut ::std::os::raw::c_void,
29 size: ::std::os::raw::c_uint,
30 ) -> *mut ::std::os::raw::c_void,
31 >,
32 pub memrealloc: ::std::option::Option<
33 unsafe extern "C" fn(
34 userData: *mut ::std::os::raw::c_void,
35 ptr: *mut ::std::os::raw::c_void,
36 size: ::std::os::raw::c_uint,
37 ) -> *mut ::std::os::raw::c_void,
38 >,
39 pub memfree: ::std::option::Option<
40 unsafe extern "C" fn(
41 userData: *mut ::std::os::raw::c_void,
42 ptr: *mut ::std::os::raw::c_void,
43 ),
44 >,
45 pub userData: *mut ::std::os::raw::c_void,
46 pub meshEdgeBucketSize: ::std::os::raw::c_int,
47 pub meshVertexBucketSize: ::std::os::raw::c_int,
48 pub meshFaceBucketSize: ::std::os::raw::c_int,
49 pub dictNodeBucketSize: ::std::os::raw::c_int,
50 pub regionBucketSize: ::std::os::raw::c_int,
51 pub extraVertices: ::std::os::raw::c_int,
52}
53#[test]
54fn bindgen_test_layout_TESSalloc() {
55 const UNINIT: ::std::mem::MaybeUninit<TESSalloc> = ::std::mem::MaybeUninit::uninit();
56 let ptr = UNINIT.as_ptr();
57 assert_eq!(
58 ::std::mem::size_of::<TESSalloc>(),
59 56usize,
60 concat!("Size of: ", stringify!(TESSalloc))
61 );
62 assert_eq!(
63 ::std::mem::align_of::<TESSalloc>(),
64 8usize,
65 concat!("Alignment of ", stringify!(TESSalloc))
66 );
67 assert_eq!(
68 unsafe { ::std::ptr::addr_of!((*ptr).memalloc) as usize - ptr as usize },
69 0usize,
70 concat!(
71 "Offset of field: ",
72 stringify!(TESSalloc),
73 "::",
74 stringify!(memalloc)
75 )
76 );
77 assert_eq!(
78 unsafe { ::std::ptr::addr_of!((*ptr).memrealloc) as usize - ptr as usize },
79 8usize,
80 concat!(
81 "Offset of field: ",
82 stringify!(TESSalloc),
83 "::",
84 stringify!(memrealloc)
85 )
86 );
87 assert_eq!(
88 unsafe { ::std::ptr::addr_of!((*ptr).memfree) as usize - ptr as usize },
89 16usize,
90 concat!(
91 "Offset of field: ",
92 stringify!(TESSalloc),
93 "::",
94 stringify!(memfree)
95 )
96 );
97 assert_eq!(
98 unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize },
99 24usize,
100 concat!(
101 "Offset of field: ",
102 stringify!(TESSalloc),
103 "::",
104 stringify!(userData)
105 )
106 );
107 assert_eq!(
108 unsafe { ::std::ptr::addr_of!((*ptr).meshEdgeBucketSize) as usize - ptr as usize },
109 32usize,
110 concat!(
111 "Offset of field: ",
112 stringify!(TESSalloc),
113 "::",
114 stringify!(meshEdgeBucketSize)
115 )
116 );
117 assert_eq!(
118 unsafe { ::std::ptr::addr_of!((*ptr).meshVertexBucketSize) as usize - ptr as usize },
119 36usize,
120 concat!(
121 "Offset of field: ",
122 stringify!(TESSalloc),
123 "::",
124 stringify!(meshVertexBucketSize)
125 )
126 );
127 assert_eq!(
128 unsafe { ::std::ptr::addr_of!((*ptr).meshFaceBucketSize) as usize - ptr as usize },
129 40usize,
130 concat!(
131 "Offset of field: ",
132 stringify!(TESSalloc),
133 "::",
134 stringify!(meshFaceBucketSize)
135 )
136 );
137 assert_eq!(
138 unsafe { ::std::ptr::addr_of!((*ptr).dictNodeBucketSize) as usize - ptr as usize },
139 44usize,
140 concat!(
141 "Offset of field: ",
142 stringify!(TESSalloc),
143 "::",
144 stringify!(dictNodeBucketSize)
145 )
146 );
147 assert_eq!(
148 unsafe { ::std::ptr::addr_of!((*ptr).regionBucketSize) as usize - ptr as usize },
149 48usize,
150 concat!(
151 "Offset of field: ",
152 stringify!(TESSalloc),
153 "::",
154 stringify!(regionBucketSize)
155 )
156 );
157 assert_eq!(
158 unsafe { ::std::ptr::addr_of!((*ptr).extraVertices) as usize - ptr as usize },
159 52usize,
160 concat!(
161 "Offset of field: ",
162 stringify!(TESSalloc),
163 "::",
164 stringify!(extraVertices)
165 )
166 );
167}
168extern "C" {
169 pub fn tessNewTess(alloc: *mut TESSalloc) -> *mut TESStesselator;
170}
171extern "C" {
172 pub fn tessDeleteTess(tess: *mut TESStesselator);
173}
174extern "C" {
175 pub fn tessAddContour(
176 tess: *mut TESStesselator,
177 size: ::std::os::raw::c_int,
178 pointer: *const ::std::os::raw::c_void,
179 stride: ::std::os::raw::c_int,
180 count: ::std::os::raw::c_int,
181 );
182}
183extern "C" {
184 pub fn tessSetOption(
185 tess: *mut TESStesselator,
186 option: ::std::os::raw::c_int,
187 value: ::std::os::raw::c_int,
188 );
189}
190extern "C" {
191 pub fn tessTesselate(
192 tess: *mut TESStesselator,
193 windingRule: ::std::os::raw::c_int,
194 elementType: ::std::os::raw::c_int,
195 polySize: ::std::os::raw::c_int,
196 vertexSize: ::std::os::raw::c_int,
197 normal: *const TESSreal,
198 ) -> ::std::os::raw::c_int;
199}
200extern "C" {
201 pub fn tessGetVertexCount(tess: *mut TESStesselator) -> ::std::os::raw::c_int;
202}
203extern "C" {
204 pub fn tessGetVertices(tess: *mut TESStesselator) -> *const TESSreal;
205}
206extern "C" {
207 pub fn tessGetVertexIndices(tess: *mut TESStesselator) -> *const TESSindex;
208}
209extern "C" {
210 pub fn tessGetElementCount(tess: *mut TESStesselator) -> ::std::os::raw::c_int;
211}
212extern "C" {
213 pub fn tessGetElements(tess: *mut TESStesselator) -> *const TESSindex;
214}