Skip to main content

shapelib/include/
bridge_bindings.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3#[repr(C)]
4pub struct ShapeC__bindgen_vtable(::std::os::raw::c_void);
5#[doc = " no more use (only for test)"]
6#[repr(C)]
7#[derive(Debug)]
8pub struct ShapeC {
9    pub vtable_: *const ShapeC__bindgen_vtable,
10    pub valid: bool,
11    pub fname: *mut ::std::os::raw::c_char,
12    pub encode: *mut ::std::os::raw::c_char,
13    pub hSHP: *mut ::std::os::raw::c_void,
14    pub hDBF: *mut ::std::os::raw::c_void,
15    pub c: ::std::os::raw::c_int,
16}
17#[test]
18fn bindgen_test_layout_ShapeC() {
19    const UNINIT: ::std::mem::MaybeUninit<ShapeC> = ::std::mem::MaybeUninit::uninit();
20    let ptr = UNINIT.as_ptr();
21    assert_eq!(
22        ::std::mem::size_of::<ShapeC>(),
23        56usize,
24        concat!("Size of: ", stringify!(ShapeC))
25    );
26    assert_eq!(
27        ::std::mem::align_of::<ShapeC>(),
28        8usize,
29        concat!("Alignment of ", stringify!(ShapeC))
30    );
31    assert_eq!(
32        unsafe { ::std::ptr::addr_of!((*ptr).valid) as usize - ptr as usize },
33        8usize,
34        concat!(
35            "Offset of field: ",
36            stringify!(ShapeC),
37            "::",
38            stringify!(valid)
39        )
40    );
41    assert_eq!(
42        unsafe { ::std::ptr::addr_of!((*ptr).fname) as usize - ptr as usize },
43        16usize,
44        concat!(
45            "Offset of field: ",
46            stringify!(ShapeC),
47            "::",
48            stringify!(fname)
49        )
50    );
51    assert_eq!(
52        unsafe { ::std::ptr::addr_of!((*ptr).encode) as usize - ptr as usize },
53        24usize,
54        concat!(
55            "Offset of field: ",
56            stringify!(ShapeC),
57            "::",
58            stringify!(encode)
59        )
60    );
61    assert_eq!(
62        unsafe { ::std::ptr::addr_of!((*ptr).hSHP) as usize - ptr as usize },
63        32usize,
64        concat!(
65            "Offset of field: ",
66            stringify!(ShapeC),
67            "::",
68            stringify!(hSHP)
69        )
70    );
71    assert_eq!(
72        unsafe { ::std::ptr::addr_of!((*ptr).hDBF) as usize - ptr as usize },
73        40usize,
74        concat!(
75            "Offset of field: ",
76            stringify!(ShapeC),
77            "::",
78            stringify!(hDBF)
79        )
80    );
81    assert_eq!(
82        unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
83        48usize,
84        concat!("Offset of field: ", stringify!(ShapeC), "::", stringify!(c))
85    );
86}
87extern "C" {
88    #[link_name = "\u{1}?is_valid@ShapeC@@QEAA_NXZ"]
89    pub fn ShapeC_is_valid(this: *mut ShapeC) -> bool;
90}
91extern "C" {
92    #[link_name = "\u{1}?dispose@ShapeC@@QEAAXXZ"]
93    pub fn ShapeC_dispose(this: *mut ShapeC);
94}
95extern "C" {
96    #[link_name = "\u{1}?disp_record_inf@ShapeC@@QEAAXXZ"]
97    pub fn ShapeC_disp_record_inf(this: *mut ShapeC);
98}
99extern "C" {
100    #[link_name = "\u{1}?alloc_gci@ShapeC@@QEAAPEAXXZ"]
101    pub fn ShapeC_alloc_gci(this: *mut ShapeC) -> *mut ::std::os::raw::c_void;
102}
103extern "C" {
104    #[link_name = "\u{1}?free_gci@ShapeC@@QEAAXPEAX@Z"]
105    pub fn ShapeC_free_gci(this: *mut ShapeC, p_gci: *mut ::std::os::raw::c_void);
106}
107extern "C" {
108    #[link_name = "\u{1}?get_shape@ShapeC@@QEAAXPEAX@Z"]
109    pub fn ShapeC_get_shape(this: *mut ShapeC, p_gci: *mut ::std::os::raw::c_void);
110}
111extern "C" {
112    #[link_name = "\u{1}?from@ShapeC@@SA?AV1@HH@Z"]
113    pub fn ShapeC_from(a: ::std::os::raw::c_int, b: ::std::os::raw::c_int) -> ShapeC;
114}
115extern "C" {
116    #[link_name = "\u{1}?to_int@ShapeC@@QEAAHXZ"]
117    pub fn ShapeC_to_int(this: *mut ShapeC) -> ::std::os::raw::c_int;
118}
119extern "C" {
120    #[link_name = "\u{1}??0ShapeC@@QEAA@PEBD0@Z"]
121    pub fn ShapeC_ShapeC(
122        this: *mut ShapeC,
123        fn_: *const ::std::os::raw::c_char,
124        enc: *const ::std::os::raw::c_char,
125    );
126}
127impl ShapeC {
128    #[inline]
129    pub unsafe fn is_valid(&mut self) -> bool {
130        ShapeC_is_valid(self)
131    }
132    #[inline]
133    pub unsafe fn dispose(&mut self) {
134        ShapeC_dispose(self)
135    }
136    #[inline]
137    pub unsafe fn disp_record_inf(&mut self) {
138        ShapeC_disp_record_inf(self)
139    }
140    #[inline]
141    pub unsafe fn alloc_gci(&mut self) -> *mut ::std::os::raw::c_void {
142        ShapeC_alloc_gci(self)
143    }
144    #[inline]
145    pub unsafe fn free_gci(&mut self, p_gci: *mut ::std::os::raw::c_void) {
146        ShapeC_free_gci(self, p_gci)
147    }
148    #[inline]
149    pub unsafe fn get_shape(&mut self, p_gci: *mut ::std::os::raw::c_void) {
150        ShapeC_get_shape(self, p_gci)
151    }
152    #[inline]
153    pub unsafe fn from(a: ::std::os::raw::c_int, b: ::std::os::raw::c_int) -> ShapeC {
154        ShapeC_from(a, b)
155    }
156    #[inline]
157    pub unsafe fn to_int(&mut self) -> ::std::os::raw::c_int {
158        ShapeC_to_int(self)
159    }
160    #[inline]
161    pub unsafe fn new(
162        fn_: *const ::std::os::raw::c_char,
163        enc: *const ::std::os::raw::c_char,
164    ) -> Self {
165        let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
166        ShapeC_ShapeC(__bindgen_tmp.as_mut_ptr(), fn_, enc);
167        __bindgen_tmp.assume_init()
168    }
169}
170extern "C" {
171    #[link_name = "\u{1}??_DShapeC@@QEAAXXZ"]
172    pub fn ShapeC_ShapeC_destructor(this: *mut ShapeC);
173}
174extern "C" {
175    #[doc = " test"]
176    pub fn c(a: ::std::os::raw::c_int, b: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
177}
178extern "C" {
179    #[doc = " dup str"]
180    pub fn sdup(src: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
181}