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

pub type size_t = ::std::os::raw::c_ulong;
pub const ClipType_ctIntersection: ClipType = 0;
pub const ClipType_ctUnion: ClipType = 1;
pub const ClipType_ctDifference: ClipType = 2;
pub const ClipType_ctXor: ClipType = 3;
pub type ClipType = u32;
pub const JoinType_jtSquare: JoinType = 0;
pub const JoinType_jtRound: JoinType = 1;
pub const JoinType_jtMiter: JoinType = 2;
pub type JoinType = u32;
pub const EndType_etClosedPolygon: EndType = 0;
pub const EndType_etClosedLine: EndType = 1;
pub const EndType_etOpenButt: EndType = 2;
pub const EndType_etOpenSquare: EndType = 3;
pub const EndType_etOpenRound: EndType = 4;
pub type EndType = u32;
pub const PolyType_ptSubject: PolyType = 0;
pub const PolyType_ptClip: PolyType = 1;
pub type PolyType = u32;
pub const PolyFillType_pftEvenOdd: PolyFillType = 0;
pub const PolyFillType_pftNonZero: PolyFillType = 1;
pub const PolyFillType_pftPositive: PolyFillType = 2;
pub const PolyFillType_pftNegative: PolyFillType = 3;
pub type PolyFillType = u32;
pub type cInt = ::std::os::raw::c_longlong;
pub type Vertice = [cInt; 2usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Path {
    pub vertices: *mut Vertice,
    pub vertices_count: size_t,
    pub closed: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_Path() {
    assert_eq!(
        ::std::mem::size_of::<Path>(),
        24usize,
        concat!("Size of: ", stringify!(Path))
    );
    assert_eq!(
        ::std::mem::align_of::<Path>(),
        8usize,
        concat!("Alignment of ", stringify!(Path))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Path>())).vertices as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Path),
            "::",
            stringify!(vertices)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Path>())).vertices_count as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Path),
            "::",
            stringify!(vertices_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Path>())).closed as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(Path),
            "::",
            stringify!(closed)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Polygon {
    pub paths: *mut Path,
    pub paths_count: size_t,
    pub type_: PolyType,
}
#[test]
fn bindgen_test_layout_Polygon() {
    assert_eq!(
        ::std::mem::size_of::<Polygon>(),
        24usize,
        concat!("Size of: ", stringify!(Polygon))
    );
    assert_eq!(
        ::std::mem::align_of::<Polygon>(),
        8usize,
        concat!("Alignment of ", stringify!(Polygon))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Polygon>())).paths as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Polygon),
            "::",
            stringify!(paths)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Polygon>())).paths_count as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Polygon),
            "::",
            stringify!(paths_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Polygon>())).type_ as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(Polygon),
            "::",
            stringify!(type_)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Polygons {
    pub polygons: *mut Polygon,
    pub polygons_count: size_t,
}
#[test]
fn bindgen_test_layout_Polygons() {
    assert_eq!(
        ::std::mem::size_of::<Polygons>(),
        16usize,
        concat!("Size of: ", stringify!(Polygons))
    );
    assert_eq!(
        ::std::mem::align_of::<Polygons>(),
        8usize,
        concat!("Alignment of ", stringify!(Polygons))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Polygons>())).polygons as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(Polygons),
            "::",
            stringify!(polygons)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<Polygons>())).polygons_count as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(Polygons),
            "::",
            stringify!(polygons_count)
        )
    );
}
extern "C" {
    pub fn execute(
        clip_type: ClipType,
        polygons: Polygons,
        subject_fill_type: PolyFillType,
        clip_fill_type: PolyFillType,
    ) -> Polygons;
}
extern "C" {
    pub fn offset(
        miter_limit: f64,
        round_precision: f64,
        join_type: JoinType,
        end_type: EndType,
        polygons: Polygon,
        delta: f64,
    ) -> Polygons;
}
extern "C" {
    pub fn free_path(path: Path);
}
extern "C" {
    pub fn free_polygon(polygon: Polygon);
}
extern "C" {
    pub fn free_polygons(polygons: Polygons);
}