comparison mupdf-source/thirdparty/zxing-cpp/wrappers/rust/src/bindings.rs @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /* automatically generated by rust-bindgen 0.69.2 */
2
3 #[repr(C)]
4 #[derive(Debug, Copy, Clone)]
5 pub struct ZXing_Barcode {
6 _unused: [u8; 0],
7 }
8 #[repr(C)]
9 #[derive(Debug, Copy, Clone)]
10 pub struct ZXing_Barcodes {
11 _unused: [u8; 0],
12 }
13 #[repr(C)]
14 #[derive(Debug, Copy, Clone)]
15 pub struct ZXing_ImageView {
16 _unused: [u8; 0],
17 }
18 #[repr(C)]
19 #[derive(Debug, Copy, Clone)]
20 pub struct ZXing_Image {
21 _unused: [u8; 0],
22 }
23 #[repr(C)]
24 #[derive(Debug, Copy, Clone)]
25 pub struct ZXing_ReaderOptions {
26 _unused: [u8; 0],
27 }
28 #[repr(C)]
29 #[derive(Debug, Copy, Clone)]
30 pub struct ZXing_CreatorOptions {
31 _unused: [u8; 0],
32 }
33 #[repr(C)]
34 #[derive(Debug, Copy, Clone)]
35 pub struct ZXing_WriterOptions {
36 _unused: [u8; 0],
37 }
38 pub const ZXing_ImageFormat_None: ZXing_ImageFormat = 0;
39 pub const ZXing_ImageFormat_Lum: ZXing_ImageFormat = 16777216;
40 pub const ZXing_ImageFormat_LumA: ZXing_ImageFormat = 33554432;
41 pub const ZXing_ImageFormat_RGB: ZXing_ImageFormat = 50331906;
42 pub const ZXing_ImageFormat_BGR: ZXing_ImageFormat = 50462976;
43 pub const ZXing_ImageFormat_RGBA: ZXing_ImageFormat = 67109122;
44 pub const ZXing_ImageFormat_ARGB: ZXing_ImageFormat = 67174915;
45 pub const ZXing_ImageFormat_BGRA: ZXing_ImageFormat = 67240192;
46 pub const ZXing_ImageFormat_ABGR: ZXing_ImageFormat = 67305985;
47 pub type ZXing_ImageFormat = ::core::ffi::c_uint;
48 pub const ZXing_BarcodeFormat_None: ZXing_BarcodeFormat = 0;
49 pub const ZXing_BarcodeFormat_Aztec: ZXing_BarcodeFormat = 1;
50 pub const ZXing_BarcodeFormat_Codabar: ZXing_BarcodeFormat = 2;
51 pub const ZXing_BarcodeFormat_Code39: ZXing_BarcodeFormat = 4;
52 pub const ZXing_BarcodeFormat_Code93: ZXing_BarcodeFormat = 8;
53 pub const ZXing_BarcodeFormat_Code128: ZXing_BarcodeFormat = 16;
54 pub const ZXing_BarcodeFormat_DataBar: ZXing_BarcodeFormat = 32;
55 pub const ZXing_BarcodeFormat_DataBarExpanded: ZXing_BarcodeFormat = 64;
56 pub const ZXing_BarcodeFormat_DataMatrix: ZXing_BarcodeFormat = 128;
57 pub const ZXing_BarcodeFormat_EAN8: ZXing_BarcodeFormat = 256;
58 pub const ZXing_BarcodeFormat_EAN13: ZXing_BarcodeFormat = 512;
59 pub const ZXing_BarcodeFormat_ITF: ZXing_BarcodeFormat = 1024;
60 pub const ZXing_BarcodeFormat_MaxiCode: ZXing_BarcodeFormat = 2048;
61 pub const ZXing_BarcodeFormat_PDF417: ZXing_BarcodeFormat = 4096;
62 pub const ZXing_BarcodeFormat_QRCode: ZXing_BarcodeFormat = 8192;
63 pub const ZXing_BarcodeFormat_UPCA: ZXing_BarcodeFormat = 16384;
64 pub const ZXing_BarcodeFormat_UPCE: ZXing_BarcodeFormat = 32768;
65 pub const ZXing_BarcodeFormat_MicroQRCode: ZXing_BarcodeFormat = 65536;
66 pub const ZXing_BarcodeFormat_RMQRCode: ZXing_BarcodeFormat = 131072;
67 pub const ZXing_BarcodeFormat_DXFilmEdge: ZXing_BarcodeFormat = 262144;
68 pub const ZXing_BarcodeFormat_DataBarLimited: ZXing_BarcodeFormat = 524288;
69 pub const ZXing_BarcodeFormat_LinearCodes: ZXing_BarcodeFormat = 837502;
70 pub const ZXing_BarcodeFormat_MatrixCodes: ZXing_BarcodeFormat = 211073;
71 pub const ZXing_BarcodeFormat_Any: ZXing_BarcodeFormat = 1048575;
72 pub const ZXing_BarcodeFormat_Invalid: ZXing_BarcodeFormat = 4294967295;
73 pub type ZXing_BarcodeFormat = ::core::ffi::c_uint;
74 pub use self::ZXing_BarcodeFormat as ZXing_BarcodeFormats;
75 pub const ZXing_ContentType_Text: ZXing_ContentType = 0;
76 pub const ZXing_ContentType_Binary: ZXing_ContentType = 1;
77 pub const ZXing_ContentType_Mixed: ZXing_ContentType = 2;
78 pub const ZXing_ContentType_GS1: ZXing_ContentType = 3;
79 pub const ZXing_ContentType_ISO15434: ZXing_ContentType = 4;
80 pub const ZXing_ContentType_UnknownECI: ZXing_ContentType = 5;
81 pub type ZXing_ContentType = ::core::ffi::c_uint;
82 pub const ZXing_ErrorType_None: ZXing_ErrorType = 0;
83 pub const ZXing_ErrorType_Format: ZXing_ErrorType = 1;
84 pub const ZXing_ErrorType_Checksum: ZXing_ErrorType = 2;
85 pub const ZXing_ErrorType_Unsupported: ZXing_ErrorType = 3;
86 pub type ZXing_ErrorType = ::core::ffi::c_uint;
87 #[repr(C)]
88 #[derive(Debug, Copy, Clone, PartialEq)]
89 pub struct ZXing_PointI {
90 pub x: ::core::ffi::c_int,
91 pub y: ::core::ffi::c_int,
92 }
93 #[repr(C)]
94 #[derive(Debug, Copy, Clone, PartialEq)]
95 pub struct ZXing_Position {
96 pub topLeft: ZXing_PointI,
97 pub topRight: ZXing_PointI,
98 pub bottomRight: ZXing_PointI,
99 pub bottomLeft: ZXing_PointI,
100 }
101 pub const ZXing_Binarizer_LocalAverage: ZXing_Binarizer = 0;
102 pub const ZXing_Binarizer_GlobalHistogram: ZXing_Binarizer = 1;
103 pub const ZXing_Binarizer_FixedThreshold: ZXing_Binarizer = 2;
104 pub const ZXing_Binarizer_BoolCast: ZXing_Binarizer = 3;
105 pub type ZXing_Binarizer = ::core::ffi::c_uint;
106 pub const ZXing_EanAddOnSymbol_Ignore: ZXing_EanAddOnSymbol = 0;
107 pub const ZXing_EanAddOnSymbol_Read: ZXing_EanAddOnSymbol = 1;
108 pub const ZXing_EanAddOnSymbol_Require: ZXing_EanAddOnSymbol = 2;
109 pub type ZXing_EanAddOnSymbol = ::core::ffi::c_uint;
110 pub const ZXing_TextMode_Plain: ZXing_TextMode = 0;
111 pub const ZXing_TextMode_ECI: ZXing_TextMode = 1;
112 pub const ZXing_TextMode_HRI: ZXing_TextMode = 2;
113 pub const ZXing_TextMode_Hex: ZXing_TextMode = 3;
114 pub const ZXing_TextMode_Escaped: ZXing_TextMode = 4;
115 pub type ZXing_TextMode = ::core::ffi::c_uint;
116 extern "C" {
117 pub fn ZXing_ImageView_new(
118 data: *const u8,
119 width: ::core::ffi::c_int,
120 height: ::core::ffi::c_int,
121 format: ZXing_ImageFormat,
122 rowStride: ::core::ffi::c_int,
123 pixStride: ::core::ffi::c_int,
124 ) -> *mut ZXing_ImageView;
125 pub fn ZXing_ImageView_new_checked(
126 data: *const u8,
127 size: ::core::ffi::c_int,
128 width: ::core::ffi::c_int,
129 height: ::core::ffi::c_int,
130 format: ZXing_ImageFormat,
131 rowStride: ::core::ffi::c_int,
132 pixStride: ::core::ffi::c_int,
133 ) -> *mut ZXing_ImageView;
134 pub fn ZXing_ImageView_delete(iv: *mut ZXing_ImageView);
135 pub fn ZXing_ImageView_crop(
136 iv: *mut ZXing_ImageView,
137 left: ::core::ffi::c_int,
138 top: ::core::ffi::c_int,
139 width: ::core::ffi::c_int,
140 height: ::core::ffi::c_int,
141 );
142 pub fn ZXing_ImageView_rotate(iv: *mut ZXing_ImageView, degree: ::core::ffi::c_int);
143 pub fn ZXing_Image_delete(img: *mut ZXing_Image);
144 pub fn ZXing_Image_data(img: *const ZXing_Image) -> *const u8;
145 pub fn ZXing_Image_width(img: *const ZXing_Image) -> ::core::ffi::c_int;
146 pub fn ZXing_Image_height(img: *const ZXing_Image) -> ::core::ffi::c_int;
147 pub fn ZXing_Image_format(img: *const ZXing_Image) -> ZXing_ImageFormat;
148 pub fn ZXing_BarcodeFormatsFromString(str_: *const ::core::ffi::c_char) -> ZXing_BarcodeFormats;
149 pub fn ZXing_BarcodeFormatFromString(str_: *const ::core::ffi::c_char) -> ZXing_BarcodeFormat;
150 pub fn ZXing_BarcodeFormatToString(format: ZXing_BarcodeFormat) -> *mut ::core::ffi::c_char;
151 pub fn ZXing_ContentTypeToString(type_: ZXing_ContentType) -> *mut ::core::ffi::c_char;
152 pub fn ZXing_PositionToString(position: ZXing_Position) -> *mut ::core::ffi::c_char;
153 pub fn ZXing_Barcode_isValid(barcode: *const ZXing_Barcode) -> bool;
154 pub fn ZXing_Barcode_errorType(barcode: *const ZXing_Barcode) -> ZXing_ErrorType;
155 pub fn ZXing_Barcode_errorMsg(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char;
156 pub fn ZXing_Barcode_format(barcode: *const ZXing_Barcode) -> ZXing_BarcodeFormat;
157 pub fn ZXing_Barcode_contentType(barcode: *const ZXing_Barcode) -> ZXing_ContentType;
158 pub fn ZXing_Barcode_bytes(barcode: *const ZXing_Barcode, len: *mut ::core::ffi::c_int) -> *mut u8;
159 pub fn ZXing_Barcode_bytesECI(barcode: *const ZXing_Barcode, len: *mut ::core::ffi::c_int) -> *mut u8;
160 pub fn ZXing_Barcode_text(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char;
161 pub fn ZXing_Barcode_ecLevel(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char;
162 pub fn ZXing_Barcode_symbologyIdentifier(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char;
163 pub fn ZXing_Barcode_position(barcode: *const ZXing_Barcode) -> ZXing_Position;
164 pub fn ZXing_Barcode_orientation(barcode: *const ZXing_Barcode) -> ::core::ffi::c_int;
165 pub fn ZXing_Barcode_hasECI(barcode: *const ZXing_Barcode) -> bool;
166 pub fn ZXing_Barcode_isInverted(barcode: *const ZXing_Barcode) -> bool;
167 pub fn ZXing_Barcode_isMirrored(barcode: *const ZXing_Barcode) -> bool;
168 pub fn ZXing_Barcode_lineCount(barcode: *const ZXing_Barcode) -> ::core::ffi::c_int;
169 pub fn ZXing_Barcode_delete(barcode: *mut ZXing_Barcode);
170 pub fn ZXing_Barcodes_delete(barcodes: *mut ZXing_Barcodes);
171 pub fn ZXing_Barcodes_size(barcodes: *const ZXing_Barcodes) -> ::core::ffi::c_int;
172 pub fn ZXing_Barcodes_at(barcodes: *const ZXing_Barcodes, i: ::core::ffi::c_int) -> *const ZXing_Barcode;
173 pub fn ZXing_Barcodes_move(barcodes: *mut ZXing_Barcodes, i: ::core::ffi::c_int) -> *mut ZXing_Barcode;
174 pub fn ZXing_ReaderOptions_new() -> *mut ZXing_ReaderOptions;
175 pub fn ZXing_ReaderOptions_delete(opts: *mut ZXing_ReaderOptions);
176 pub fn ZXing_ReaderOptions_setTryHarder(opts: *mut ZXing_ReaderOptions, tryHarder: bool);
177 pub fn ZXing_ReaderOptions_setTryRotate(opts: *mut ZXing_ReaderOptions, tryRotate: bool);
178 pub fn ZXing_ReaderOptions_setTryInvert(opts: *mut ZXing_ReaderOptions, tryInvert: bool);
179 pub fn ZXing_ReaderOptions_setTryDownscale(opts: *mut ZXing_ReaderOptions, tryDownscale: bool);
180 pub fn ZXing_ReaderOptions_setIsPure(opts: *mut ZXing_ReaderOptions, isPure: bool);
181 pub fn ZXing_ReaderOptions_setReturnErrors(opts: *mut ZXing_ReaderOptions, returnErrors: bool);
182 pub fn ZXing_ReaderOptions_setFormats(opts: *mut ZXing_ReaderOptions, formats: ZXing_BarcodeFormats);
183 pub fn ZXing_ReaderOptions_setBinarizer(opts: *mut ZXing_ReaderOptions, binarizer: ZXing_Binarizer);
184 pub fn ZXing_ReaderOptions_setEanAddOnSymbol(opts: *mut ZXing_ReaderOptions, eanAddOnSymbol: ZXing_EanAddOnSymbol);
185 pub fn ZXing_ReaderOptions_setTextMode(opts: *mut ZXing_ReaderOptions, textMode: ZXing_TextMode);
186 pub fn ZXing_ReaderOptions_setMinLineCount(opts: *mut ZXing_ReaderOptions, n: ::core::ffi::c_int);
187 pub fn ZXing_ReaderOptions_setMaxNumberOfSymbols(opts: *mut ZXing_ReaderOptions, n: ::core::ffi::c_int);
188 pub fn ZXing_ReaderOptions_getTryHarder(opts: *const ZXing_ReaderOptions) -> bool;
189 pub fn ZXing_ReaderOptions_getTryRotate(opts: *const ZXing_ReaderOptions) -> bool;
190 pub fn ZXing_ReaderOptions_getTryInvert(opts: *const ZXing_ReaderOptions) -> bool;
191 pub fn ZXing_ReaderOptions_getTryDownscale(opts: *const ZXing_ReaderOptions) -> bool;
192 pub fn ZXing_ReaderOptions_getIsPure(opts: *const ZXing_ReaderOptions) -> bool;
193 pub fn ZXing_ReaderOptions_getReturnErrors(opts: *const ZXing_ReaderOptions) -> bool;
194 pub fn ZXing_ReaderOptions_getFormats(opts: *const ZXing_ReaderOptions) -> ZXing_BarcodeFormats;
195 pub fn ZXing_ReaderOptions_getBinarizer(opts: *const ZXing_ReaderOptions) -> ZXing_Binarizer;
196 pub fn ZXing_ReaderOptions_getEanAddOnSymbol(opts: *const ZXing_ReaderOptions) -> ZXing_EanAddOnSymbol;
197 pub fn ZXing_ReaderOptions_getTextMode(opts: *const ZXing_ReaderOptions) -> ZXing_TextMode;
198 pub fn ZXing_ReaderOptions_getMinLineCount(opts: *const ZXing_ReaderOptions) -> ::core::ffi::c_int;
199 pub fn ZXing_ReaderOptions_getMaxNumberOfSymbols(opts: *const ZXing_ReaderOptions) -> ::core::ffi::c_int;
200 pub fn ZXing_ReadBarcodes(iv: *const ZXing_ImageView, opts: *const ZXing_ReaderOptions) -> *mut ZXing_Barcodes;
201 pub fn ZXing_CreatorOptions_new(format: ZXing_BarcodeFormat) -> *mut ZXing_CreatorOptions;
202 pub fn ZXing_CreatorOptions_delete(opts: *mut ZXing_CreatorOptions);
203 pub fn ZXing_CreatorOptions_setFormat(opts: *mut ZXing_CreatorOptions, format: ZXing_BarcodeFormat);
204 pub fn ZXing_CreatorOptions_getFormat(opts: *const ZXing_CreatorOptions) -> ZXing_BarcodeFormat;
205 pub fn ZXing_CreatorOptions_setReaderInit(opts: *mut ZXing_CreatorOptions, readerInit: bool);
206 pub fn ZXing_CreatorOptions_getReaderInit(opts: *const ZXing_CreatorOptions) -> bool;
207 pub fn ZXing_CreatorOptions_setForceSquareDataMatrix(opts: *mut ZXing_CreatorOptions, forceSquareDataMatrix: bool);
208 pub fn ZXing_CreatorOptions_getForceSquareDataMatrix(opts: *const ZXing_CreatorOptions) -> bool;
209 pub fn ZXing_CreatorOptions_setEcLevel(opts: *mut ZXing_CreatorOptions, ecLevel: *const ::core::ffi::c_char);
210 pub fn ZXing_CreatorOptions_getEcLevel(opts: *const ZXing_CreatorOptions) -> *mut ::core::ffi::c_char;
211 pub fn ZXing_WriterOptions_new() -> *mut ZXing_WriterOptions;
212 pub fn ZXing_WriterOptions_delete(opts: *mut ZXing_WriterOptions);
213 pub fn ZXing_WriterOptions_setScale(opts: *mut ZXing_WriterOptions, scale: ::core::ffi::c_int);
214 pub fn ZXing_WriterOptions_getScale(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int;
215 pub fn ZXing_WriterOptions_setSizeHint(opts: *mut ZXing_WriterOptions, sizeHint: ::core::ffi::c_int);
216 pub fn ZXing_WriterOptions_getSizeHint(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int;
217 pub fn ZXing_WriterOptions_setRotate(opts: *mut ZXing_WriterOptions, rotate: ::core::ffi::c_int);
218 pub fn ZXing_WriterOptions_getRotate(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int;
219 pub fn ZXing_WriterOptions_setWithHRT(opts: *mut ZXing_WriterOptions, withHRT: bool);
220 pub fn ZXing_WriterOptions_getWithHRT(opts: *const ZXing_WriterOptions) -> bool;
221 pub fn ZXing_WriterOptions_setWithQuietZones(opts: *mut ZXing_WriterOptions, withQuietZones: bool);
222 pub fn ZXing_WriterOptions_getWithQuietZones(opts: *const ZXing_WriterOptions) -> bool;
223 pub fn ZXing_CreateBarcodeFromText(
224 data: *const ::core::ffi::c_char,
225 size: ::core::ffi::c_int,
226 opts: *const ZXing_CreatorOptions,
227 ) -> *mut ZXing_Barcode;
228 pub fn ZXing_CreateBarcodeFromBytes(
229 data: *const ::core::ffi::c_void,
230 size: ::core::ffi::c_int,
231 opts: *const ZXing_CreatorOptions,
232 ) -> *mut ZXing_Barcode;
233 pub fn ZXing_WriteBarcodeToSVG(barcode: *const ZXing_Barcode, opts: *const ZXing_WriterOptions) -> *mut ::core::ffi::c_char;
234 pub fn ZXing_WriteBarcodeToImage(barcode: *const ZXing_Barcode, opts: *const ZXing_WriterOptions) -> *mut ZXing_Image;
235 pub fn ZXing_LastErrorMsg() -> *mut ::core::ffi::c_char;
236 pub fn ZXing_free(ptr: *mut ::core::ffi::c_void);
237 }