Mercurial > hgrepos > Python2 > PyMuPDF
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/thirdparty/zxing-cpp/wrappers/rust/src/bindings.rs Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,237 @@ +/* automatically generated by rust-bindgen 0.69.2 */ + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_Barcode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_Barcodes { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_ImageView { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_Image { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_ReaderOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_CreatorOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ZXing_WriterOptions { + _unused: [u8; 0], +} +pub const ZXing_ImageFormat_None: ZXing_ImageFormat = 0; +pub const ZXing_ImageFormat_Lum: ZXing_ImageFormat = 16777216; +pub const ZXing_ImageFormat_LumA: ZXing_ImageFormat = 33554432; +pub const ZXing_ImageFormat_RGB: ZXing_ImageFormat = 50331906; +pub const ZXing_ImageFormat_BGR: ZXing_ImageFormat = 50462976; +pub const ZXing_ImageFormat_RGBA: ZXing_ImageFormat = 67109122; +pub const ZXing_ImageFormat_ARGB: ZXing_ImageFormat = 67174915; +pub const ZXing_ImageFormat_BGRA: ZXing_ImageFormat = 67240192; +pub const ZXing_ImageFormat_ABGR: ZXing_ImageFormat = 67305985; +pub type ZXing_ImageFormat = ::core::ffi::c_uint; +pub const ZXing_BarcodeFormat_None: ZXing_BarcodeFormat = 0; +pub const ZXing_BarcodeFormat_Aztec: ZXing_BarcodeFormat = 1; +pub const ZXing_BarcodeFormat_Codabar: ZXing_BarcodeFormat = 2; +pub const ZXing_BarcodeFormat_Code39: ZXing_BarcodeFormat = 4; +pub const ZXing_BarcodeFormat_Code93: ZXing_BarcodeFormat = 8; +pub const ZXing_BarcodeFormat_Code128: ZXing_BarcodeFormat = 16; +pub const ZXing_BarcodeFormat_DataBar: ZXing_BarcodeFormat = 32; +pub const ZXing_BarcodeFormat_DataBarExpanded: ZXing_BarcodeFormat = 64; +pub const ZXing_BarcodeFormat_DataMatrix: ZXing_BarcodeFormat = 128; +pub const ZXing_BarcodeFormat_EAN8: ZXing_BarcodeFormat = 256; +pub const ZXing_BarcodeFormat_EAN13: ZXing_BarcodeFormat = 512; +pub const ZXing_BarcodeFormat_ITF: ZXing_BarcodeFormat = 1024; +pub const ZXing_BarcodeFormat_MaxiCode: ZXing_BarcodeFormat = 2048; +pub const ZXing_BarcodeFormat_PDF417: ZXing_BarcodeFormat = 4096; +pub const ZXing_BarcodeFormat_QRCode: ZXing_BarcodeFormat = 8192; +pub const ZXing_BarcodeFormat_UPCA: ZXing_BarcodeFormat = 16384; +pub const ZXing_BarcodeFormat_UPCE: ZXing_BarcodeFormat = 32768; +pub const ZXing_BarcodeFormat_MicroQRCode: ZXing_BarcodeFormat = 65536; +pub const ZXing_BarcodeFormat_RMQRCode: ZXing_BarcodeFormat = 131072; +pub const ZXing_BarcodeFormat_DXFilmEdge: ZXing_BarcodeFormat = 262144; +pub const ZXing_BarcodeFormat_DataBarLimited: ZXing_BarcodeFormat = 524288; +pub const ZXing_BarcodeFormat_LinearCodes: ZXing_BarcodeFormat = 837502; +pub const ZXing_BarcodeFormat_MatrixCodes: ZXing_BarcodeFormat = 211073; +pub const ZXing_BarcodeFormat_Any: ZXing_BarcodeFormat = 1048575; +pub const ZXing_BarcodeFormat_Invalid: ZXing_BarcodeFormat = 4294967295; +pub type ZXing_BarcodeFormat = ::core::ffi::c_uint; +pub use self::ZXing_BarcodeFormat as ZXing_BarcodeFormats; +pub const ZXing_ContentType_Text: ZXing_ContentType = 0; +pub const ZXing_ContentType_Binary: ZXing_ContentType = 1; +pub const ZXing_ContentType_Mixed: ZXing_ContentType = 2; +pub const ZXing_ContentType_GS1: ZXing_ContentType = 3; +pub const ZXing_ContentType_ISO15434: ZXing_ContentType = 4; +pub const ZXing_ContentType_UnknownECI: ZXing_ContentType = 5; +pub type ZXing_ContentType = ::core::ffi::c_uint; +pub const ZXing_ErrorType_None: ZXing_ErrorType = 0; +pub const ZXing_ErrorType_Format: ZXing_ErrorType = 1; +pub const ZXing_ErrorType_Checksum: ZXing_ErrorType = 2; +pub const ZXing_ErrorType_Unsupported: ZXing_ErrorType = 3; +pub type ZXing_ErrorType = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ZXing_PointI { + pub x: ::core::ffi::c_int, + pub y: ::core::ffi::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ZXing_Position { + pub topLeft: ZXing_PointI, + pub topRight: ZXing_PointI, + pub bottomRight: ZXing_PointI, + pub bottomLeft: ZXing_PointI, +} +pub const ZXing_Binarizer_LocalAverage: ZXing_Binarizer = 0; +pub const ZXing_Binarizer_GlobalHistogram: ZXing_Binarizer = 1; +pub const ZXing_Binarizer_FixedThreshold: ZXing_Binarizer = 2; +pub const ZXing_Binarizer_BoolCast: ZXing_Binarizer = 3; +pub type ZXing_Binarizer = ::core::ffi::c_uint; +pub const ZXing_EanAddOnSymbol_Ignore: ZXing_EanAddOnSymbol = 0; +pub const ZXing_EanAddOnSymbol_Read: ZXing_EanAddOnSymbol = 1; +pub const ZXing_EanAddOnSymbol_Require: ZXing_EanAddOnSymbol = 2; +pub type ZXing_EanAddOnSymbol = ::core::ffi::c_uint; +pub const ZXing_TextMode_Plain: ZXing_TextMode = 0; +pub const ZXing_TextMode_ECI: ZXing_TextMode = 1; +pub const ZXing_TextMode_HRI: ZXing_TextMode = 2; +pub const ZXing_TextMode_Hex: ZXing_TextMode = 3; +pub const ZXing_TextMode_Escaped: ZXing_TextMode = 4; +pub type ZXing_TextMode = ::core::ffi::c_uint; +extern "C" { + pub fn ZXing_ImageView_new( + data: *const u8, + width: ::core::ffi::c_int, + height: ::core::ffi::c_int, + format: ZXing_ImageFormat, + rowStride: ::core::ffi::c_int, + pixStride: ::core::ffi::c_int, + ) -> *mut ZXing_ImageView; + pub fn ZXing_ImageView_new_checked( + data: *const u8, + size: ::core::ffi::c_int, + width: ::core::ffi::c_int, + height: ::core::ffi::c_int, + format: ZXing_ImageFormat, + rowStride: ::core::ffi::c_int, + pixStride: ::core::ffi::c_int, + ) -> *mut ZXing_ImageView; + pub fn ZXing_ImageView_delete(iv: *mut ZXing_ImageView); + pub fn ZXing_ImageView_crop( + iv: *mut ZXing_ImageView, + left: ::core::ffi::c_int, + top: ::core::ffi::c_int, + width: ::core::ffi::c_int, + height: ::core::ffi::c_int, + ); + pub fn ZXing_ImageView_rotate(iv: *mut ZXing_ImageView, degree: ::core::ffi::c_int); + pub fn ZXing_Image_delete(img: *mut ZXing_Image); + pub fn ZXing_Image_data(img: *const ZXing_Image) -> *const u8; + pub fn ZXing_Image_width(img: *const ZXing_Image) -> ::core::ffi::c_int; + pub fn ZXing_Image_height(img: *const ZXing_Image) -> ::core::ffi::c_int; + pub fn ZXing_Image_format(img: *const ZXing_Image) -> ZXing_ImageFormat; + pub fn ZXing_BarcodeFormatsFromString(str_: *const ::core::ffi::c_char) -> ZXing_BarcodeFormats; + pub fn ZXing_BarcodeFormatFromString(str_: *const ::core::ffi::c_char) -> ZXing_BarcodeFormat; + pub fn ZXing_BarcodeFormatToString(format: ZXing_BarcodeFormat) -> *mut ::core::ffi::c_char; + pub fn ZXing_ContentTypeToString(type_: ZXing_ContentType) -> *mut ::core::ffi::c_char; + pub fn ZXing_PositionToString(position: ZXing_Position) -> *mut ::core::ffi::c_char; + pub fn ZXing_Barcode_isValid(barcode: *const ZXing_Barcode) -> bool; + pub fn ZXing_Barcode_errorType(barcode: *const ZXing_Barcode) -> ZXing_ErrorType; + pub fn ZXing_Barcode_errorMsg(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char; + pub fn ZXing_Barcode_format(barcode: *const ZXing_Barcode) -> ZXing_BarcodeFormat; + pub fn ZXing_Barcode_contentType(barcode: *const ZXing_Barcode) -> ZXing_ContentType; + pub fn ZXing_Barcode_bytes(barcode: *const ZXing_Barcode, len: *mut ::core::ffi::c_int) -> *mut u8; + pub fn ZXing_Barcode_bytesECI(barcode: *const ZXing_Barcode, len: *mut ::core::ffi::c_int) -> *mut u8; + pub fn ZXing_Barcode_text(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char; + pub fn ZXing_Barcode_ecLevel(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char; + pub fn ZXing_Barcode_symbologyIdentifier(barcode: *const ZXing_Barcode) -> *mut ::core::ffi::c_char; + pub fn ZXing_Barcode_position(barcode: *const ZXing_Barcode) -> ZXing_Position; + pub fn ZXing_Barcode_orientation(barcode: *const ZXing_Barcode) -> ::core::ffi::c_int; + pub fn ZXing_Barcode_hasECI(barcode: *const ZXing_Barcode) -> bool; + pub fn ZXing_Barcode_isInverted(barcode: *const ZXing_Barcode) -> bool; + pub fn ZXing_Barcode_isMirrored(barcode: *const ZXing_Barcode) -> bool; + pub fn ZXing_Barcode_lineCount(barcode: *const ZXing_Barcode) -> ::core::ffi::c_int; + pub fn ZXing_Barcode_delete(barcode: *mut ZXing_Barcode); + pub fn ZXing_Barcodes_delete(barcodes: *mut ZXing_Barcodes); + pub fn ZXing_Barcodes_size(barcodes: *const ZXing_Barcodes) -> ::core::ffi::c_int; + pub fn ZXing_Barcodes_at(barcodes: *const ZXing_Barcodes, i: ::core::ffi::c_int) -> *const ZXing_Barcode; + pub fn ZXing_Barcodes_move(barcodes: *mut ZXing_Barcodes, i: ::core::ffi::c_int) -> *mut ZXing_Barcode; + pub fn ZXing_ReaderOptions_new() -> *mut ZXing_ReaderOptions; + pub fn ZXing_ReaderOptions_delete(opts: *mut ZXing_ReaderOptions); + pub fn ZXing_ReaderOptions_setTryHarder(opts: *mut ZXing_ReaderOptions, tryHarder: bool); + pub fn ZXing_ReaderOptions_setTryRotate(opts: *mut ZXing_ReaderOptions, tryRotate: bool); + pub fn ZXing_ReaderOptions_setTryInvert(opts: *mut ZXing_ReaderOptions, tryInvert: bool); + pub fn ZXing_ReaderOptions_setTryDownscale(opts: *mut ZXing_ReaderOptions, tryDownscale: bool); + pub fn ZXing_ReaderOptions_setIsPure(opts: *mut ZXing_ReaderOptions, isPure: bool); + pub fn ZXing_ReaderOptions_setReturnErrors(opts: *mut ZXing_ReaderOptions, returnErrors: bool); + pub fn ZXing_ReaderOptions_setFormats(opts: *mut ZXing_ReaderOptions, formats: ZXing_BarcodeFormats); + pub fn ZXing_ReaderOptions_setBinarizer(opts: *mut ZXing_ReaderOptions, binarizer: ZXing_Binarizer); + pub fn ZXing_ReaderOptions_setEanAddOnSymbol(opts: *mut ZXing_ReaderOptions, eanAddOnSymbol: ZXing_EanAddOnSymbol); + pub fn ZXing_ReaderOptions_setTextMode(opts: *mut ZXing_ReaderOptions, textMode: ZXing_TextMode); + pub fn ZXing_ReaderOptions_setMinLineCount(opts: *mut ZXing_ReaderOptions, n: ::core::ffi::c_int); + pub fn ZXing_ReaderOptions_setMaxNumberOfSymbols(opts: *mut ZXing_ReaderOptions, n: ::core::ffi::c_int); + pub fn ZXing_ReaderOptions_getTryHarder(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getTryRotate(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getTryInvert(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getTryDownscale(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getIsPure(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getReturnErrors(opts: *const ZXing_ReaderOptions) -> bool; + pub fn ZXing_ReaderOptions_getFormats(opts: *const ZXing_ReaderOptions) -> ZXing_BarcodeFormats; + pub fn ZXing_ReaderOptions_getBinarizer(opts: *const ZXing_ReaderOptions) -> ZXing_Binarizer; + pub fn ZXing_ReaderOptions_getEanAddOnSymbol(opts: *const ZXing_ReaderOptions) -> ZXing_EanAddOnSymbol; + pub fn ZXing_ReaderOptions_getTextMode(opts: *const ZXing_ReaderOptions) -> ZXing_TextMode; + pub fn ZXing_ReaderOptions_getMinLineCount(opts: *const ZXing_ReaderOptions) -> ::core::ffi::c_int; + pub fn ZXing_ReaderOptions_getMaxNumberOfSymbols(opts: *const ZXing_ReaderOptions) -> ::core::ffi::c_int; + pub fn ZXing_ReadBarcodes(iv: *const ZXing_ImageView, opts: *const ZXing_ReaderOptions) -> *mut ZXing_Barcodes; + pub fn ZXing_CreatorOptions_new(format: ZXing_BarcodeFormat) -> *mut ZXing_CreatorOptions; + pub fn ZXing_CreatorOptions_delete(opts: *mut ZXing_CreatorOptions); + pub fn ZXing_CreatorOptions_setFormat(opts: *mut ZXing_CreatorOptions, format: ZXing_BarcodeFormat); + pub fn ZXing_CreatorOptions_getFormat(opts: *const ZXing_CreatorOptions) -> ZXing_BarcodeFormat; + pub fn ZXing_CreatorOptions_setReaderInit(opts: *mut ZXing_CreatorOptions, readerInit: bool); + pub fn ZXing_CreatorOptions_getReaderInit(opts: *const ZXing_CreatorOptions) -> bool; + pub fn ZXing_CreatorOptions_setForceSquareDataMatrix(opts: *mut ZXing_CreatorOptions, forceSquareDataMatrix: bool); + pub fn ZXing_CreatorOptions_getForceSquareDataMatrix(opts: *const ZXing_CreatorOptions) -> bool; + pub fn ZXing_CreatorOptions_setEcLevel(opts: *mut ZXing_CreatorOptions, ecLevel: *const ::core::ffi::c_char); + pub fn ZXing_CreatorOptions_getEcLevel(opts: *const ZXing_CreatorOptions) -> *mut ::core::ffi::c_char; + pub fn ZXing_WriterOptions_new() -> *mut ZXing_WriterOptions; + pub fn ZXing_WriterOptions_delete(opts: *mut ZXing_WriterOptions); + pub fn ZXing_WriterOptions_setScale(opts: *mut ZXing_WriterOptions, scale: ::core::ffi::c_int); + pub fn ZXing_WriterOptions_getScale(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int; + pub fn ZXing_WriterOptions_setSizeHint(opts: *mut ZXing_WriterOptions, sizeHint: ::core::ffi::c_int); + pub fn ZXing_WriterOptions_getSizeHint(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int; + pub fn ZXing_WriterOptions_setRotate(opts: *mut ZXing_WriterOptions, rotate: ::core::ffi::c_int); + pub fn ZXing_WriterOptions_getRotate(opts: *const ZXing_WriterOptions) -> ::core::ffi::c_int; + pub fn ZXing_WriterOptions_setWithHRT(opts: *mut ZXing_WriterOptions, withHRT: bool); + pub fn ZXing_WriterOptions_getWithHRT(opts: *const ZXing_WriterOptions) -> bool; + pub fn ZXing_WriterOptions_setWithQuietZones(opts: *mut ZXing_WriterOptions, withQuietZones: bool); + pub fn ZXing_WriterOptions_getWithQuietZones(opts: *const ZXing_WriterOptions) -> bool; + pub fn ZXing_CreateBarcodeFromText( + data: *const ::core::ffi::c_char, + size: ::core::ffi::c_int, + opts: *const ZXing_CreatorOptions, + ) -> *mut ZXing_Barcode; + pub fn ZXing_CreateBarcodeFromBytes( + data: *const ::core::ffi::c_void, + size: ::core::ffi::c_int, + opts: *const ZXing_CreatorOptions, + ) -> *mut ZXing_Barcode; + pub fn ZXing_WriteBarcodeToSVG(barcode: *const ZXing_Barcode, opts: *const ZXing_WriterOptions) -> *mut ::core::ffi::c_char; + pub fn ZXing_WriteBarcodeToImage(barcode: *const ZXing_Barcode, opts: *const ZXing_WriterOptions) -> *mut ZXing_Image; + pub fn ZXing_LastErrorMsg() -> *mut ::core::ffi::c_char; + pub fn ZXing_free(ptr: *mut ::core::ffi::c_void); +}
