clipper_sys/opt/rustwide/workdir/generated/
bindings.rs

1/* automatically generated by rust-bindgen 0.59.2 */
2
3pub const ClipType_ctIntersection: ClipType = 0;
4pub const ClipType_ctUnion: ClipType = 1;
5pub const ClipType_ctDifference: ClipType = 2;
6pub const ClipType_ctXor: ClipType = 3;
7pub type ClipType = ::std::os::raw::c_uint;
8pub const JoinType_jtSquare: JoinType = 0;
9pub const JoinType_jtRound: JoinType = 1;
10pub const JoinType_jtMiter: JoinType = 2;
11pub type JoinType = ::std::os::raw::c_uint;
12pub const EndType_etClosedPolygon: EndType = 0;
13pub const EndType_etClosedLine: EndType = 1;
14pub const EndType_etOpenButt: EndType = 2;
15pub const EndType_etOpenSquare: EndType = 3;
16pub const EndType_etOpenRound: EndType = 4;
17pub type EndType = ::std::os::raw::c_uint;
18pub const PolyType_ptSubject: PolyType = 0;
19pub const PolyType_ptClip: PolyType = 1;
20pub type PolyType = ::std::os::raw::c_uint;
21pub const PolyFillType_pftEvenOdd: PolyFillType = 0;
22pub const PolyFillType_pftNonZero: PolyFillType = 1;
23pub const PolyFillType_pftPositive: PolyFillType = 2;
24pub const PolyFillType_pftNegative: PolyFillType = 3;
25pub type PolyFillType = ::std::os::raw::c_uint;
26pub type cInt = ::std::os::raw::c_longlong;
27pub type Vertice = [cInt; 2usize];
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct Path {
31    pub vertices: *mut Vertice,
32    pub vertices_count: usize,
33    pub closed: ::std::os::raw::c_int,
34}
35#[test]
36fn bindgen_test_layout_Path() {
37    assert_eq!(
38        ::std::mem::size_of::<Path>(),
39        24usize,
40        concat!("Size of: ", stringify!(Path))
41    );
42    assert_eq!(
43        ::std::mem::align_of::<Path>(),
44        8usize,
45        concat!("Alignment of ", stringify!(Path))
46    );
47    assert_eq!(
48        unsafe { &(*(::std::ptr::null::<Path>())).vertices as *const _ as usize },
49        0usize,
50        concat!(
51            "Offset of field: ",
52            stringify!(Path),
53            "::",
54            stringify!(vertices)
55        )
56    );
57    assert_eq!(
58        unsafe { &(*(::std::ptr::null::<Path>())).vertices_count as *const _ as usize },
59        8usize,
60        concat!(
61            "Offset of field: ",
62            stringify!(Path),
63            "::",
64            stringify!(vertices_count)
65        )
66    );
67    assert_eq!(
68        unsafe { &(*(::std::ptr::null::<Path>())).closed as *const _ as usize },
69        16usize,
70        concat!(
71            "Offset of field: ",
72            stringify!(Path),
73            "::",
74            stringify!(closed)
75        )
76    );
77}
78#[repr(C)]
79#[derive(Debug, Copy, Clone)]
80pub struct Polygon {
81    pub paths: *mut Path,
82    pub paths_count: usize,
83    pub type_: PolyType,
84}
85#[test]
86fn bindgen_test_layout_Polygon() {
87    assert_eq!(
88        ::std::mem::size_of::<Polygon>(),
89        24usize,
90        concat!("Size of: ", stringify!(Polygon))
91    );
92    assert_eq!(
93        ::std::mem::align_of::<Polygon>(),
94        8usize,
95        concat!("Alignment of ", stringify!(Polygon))
96    );
97    assert_eq!(
98        unsafe { &(*(::std::ptr::null::<Polygon>())).paths as *const _ as usize },
99        0usize,
100        concat!(
101            "Offset of field: ",
102            stringify!(Polygon),
103            "::",
104            stringify!(paths)
105        )
106    );
107    assert_eq!(
108        unsafe { &(*(::std::ptr::null::<Polygon>())).paths_count as *const _ as usize },
109        8usize,
110        concat!(
111            "Offset of field: ",
112            stringify!(Polygon),
113            "::",
114            stringify!(paths_count)
115        )
116    );
117    assert_eq!(
118        unsafe { &(*(::std::ptr::null::<Polygon>())).type_ as *const _ as usize },
119        16usize,
120        concat!(
121            "Offset of field: ",
122            stringify!(Polygon),
123            "::",
124            stringify!(type_)
125        )
126    );
127}
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct Polygons {
131    pub polygons: *mut Polygon,
132    pub polygons_count: usize,
133}
134#[test]
135fn bindgen_test_layout_Polygons() {
136    assert_eq!(
137        ::std::mem::size_of::<Polygons>(),
138        16usize,
139        concat!("Size of: ", stringify!(Polygons))
140    );
141    assert_eq!(
142        ::std::mem::align_of::<Polygons>(),
143        8usize,
144        concat!("Alignment of ", stringify!(Polygons))
145    );
146    assert_eq!(
147        unsafe { &(*(::std::ptr::null::<Polygons>())).polygons as *const _ as usize },
148        0usize,
149        concat!(
150            "Offset of field: ",
151            stringify!(Polygons),
152            "::",
153            stringify!(polygons)
154        )
155    );
156    assert_eq!(
157        unsafe { &(*(::std::ptr::null::<Polygons>())).polygons_count as *const _ as usize },
158        8usize,
159        concat!(
160            "Offset of field: ",
161            stringify!(Polygons),
162            "::",
163            stringify!(polygons_count)
164        )
165    );
166}
167extern "C" {
168    pub fn execute(
169        clip_type: ClipType,
170        polygons: Polygons,
171        subject_fill_type: PolyFillType,
172        clip_fill_type: PolyFillType,
173    ) -> Polygons;
174}
175extern "C" {
176    pub fn offset_simplify_clean(
177        polygons: Polygons,
178        miter_limit: f64,
179        round_precision: f64,
180        join_type: JoinType,
181        end_type: EndType,
182        delta: f64,
183        fill_type: PolyFillType,
184        distance: f64,
185    ) -> Polygons;
186}
187extern "C" {
188    pub fn offset(
189        miter_limit: f64,
190        round_precision: f64,
191        join_type: JoinType,
192        end_type: EndType,
193        polygons: Polygons,
194        delta: f64,
195    ) -> Polygons;
196}
197extern "C" {
198    pub fn simplify(polygons: Polygons, fill_type: PolyFillType) -> Polygons;
199}
200extern "C" {
201    pub fn clean(polygons: Polygons, distance: f64) -> Polygons;
202}
203extern "C" {
204    pub fn free_path(path: Path);
205}
206extern "C" {
207    pub fn free_polygon(polygon: Polygon);
208}
209extern "C" {
210    pub fn free_polygons(polygons: Polygons);
211}