#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
pub const FZ_VERSION: &[u8; 7] = b"1.22.2\0";
pub const FZ_VERSION_MAJOR: u32 = 1;
pub const FZ_VERSION_MINOR: u32 = 22;
pub const FZ_VERSION_PATCH: u32 = 2;
pub const FZ_ENABLE_SPOT_RENDERING: u32 = 1;
pub const FZ_PLOTTERS_N: u32 = 1;
pub const FZ_PLOTTERS_G: u32 = 1;
pub const FZ_PLOTTERS_RGB: u32 = 1;
pub const FZ_PLOTTERS_CMYK: u32 = 1;
pub const FZ_ENABLE_PDF: u32 = 1;
pub const FZ_ENABLE_XPS: u32 = 1;
pub const FZ_ENABLE_SVG: u32 = 1;
pub const FZ_ENABLE_CBZ: u32 = 1;
pub const FZ_ENABLE_IMG: u32 = 1;
pub const FZ_ENABLE_HTML: u32 = 1;
pub const FZ_ENABLE_EPUB: u32 = 1;
pub const FZ_ENABLE_OCR_OUTPUT: u32 = 1;
pub const FZ_ENABLE_ODT_OUTPUT: u32 = 1;
pub const FZ_ENABLE_DOCX_OUTPUT: u32 = 1;
pub const FZ_ENABLE_JPX: u32 = 1;
pub const FZ_ENABLE_JS: u32 = 1;
pub const FZ_ENABLE_ICC: u32 = 1;
pub const FZ_PI: f64 = 3.14159265;
pub const FZ_RADIAN: f64 = 57.2957795;
pub const FZ_DEGREE: f64 = 0.017453292;
pub const FZ_SQRT2: f64 = 1.41421356;
pub const FZ_LN2: f64 = 0.69314718;
pub const FZ_POINTER_ALIGN_MOD: u32 = 4;
pub const FZ_JMPBUF_ALIGN: u32 = 32;
pub const FZ_REPLACEMENT_CHARACTER: u32 = 65533;
pub const FZ_AES_DECRYPT: u32 = 0;
pub const FZ_AES_ENCRYPT: u32 = 1;
pub const FZ_HASH_TABLE_KEY_LENGTH: u32 = 48;
pub const FZ_META_FORMAT: &[u8; 7] = b"format\0";
pub const FZ_META_ENCRYPTION: &[u8; 11] = b"encryption\0";
pub const FZ_META_INFO: &[u8; 6] = b"info:\0";
pub const FZ_META_INFO_TITLE: &[u8; 11] = b"info:Title\0";
pub const FZ_META_INFO_AUTHOR: &[u8; 12] = b"info:Author\0";
pub const FZ_META_INFO_SUBJECT: &[u8; 13] = b"info:Subject\0";
pub const FZ_META_INFO_KEYWORDS: &[u8; 14] = b"info:Keywords\0";
pub const FZ_META_INFO_CREATOR: &[u8; 13] = b"info:Creator\0";
pub const FZ_META_INFO_PRODUCER: &[u8; 14] = b"info:Producer\0";
pub const FZ_META_INFO_CREATIONDATE: &[u8; 18] = b"info:CreationDate\0";
pub const FZ_META_INFO_MODIFICATIONDATE: &[u8; 13] = b"info:ModDate\0";
pub const UCDN_EAST_ASIAN_F: u32 = 0;
pub const UCDN_EAST_ASIAN_H: u32 = 1;
pub const UCDN_EAST_ASIAN_W: u32 = 2;
pub const UCDN_EAST_ASIAN_NA: u32 = 3;
pub const UCDN_EAST_ASIAN_A: u32 = 4;
pub const UCDN_EAST_ASIAN_N: u32 = 5;
pub const UCDN_SCRIPT_COMMON: u32 = 0;
pub const UCDN_SCRIPT_LATIN: u32 = 1;
pub const UCDN_SCRIPT_GREEK: u32 = 2;
pub const UCDN_SCRIPT_CYRILLIC: u32 = 3;
pub const UCDN_SCRIPT_ARMENIAN: u32 = 4;
pub const UCDN_SCRIPT_HEBREW: u32 = 5;
pub const UCDN_SCRIPT_ARABIC: u32 = 6;
pub const UCDN_SCRIPT_SYRIAC: u32 = 7;
pub const UCDN_SCRIPT_THAANA: u32 = 8;
pub const UCDN_SCRIPT_DEVANAGARI: u32 = 9;
pub const UCDN_SCRIPT_BENGALI: u32 = 10;
pub const UCDN_SCRIPT_GURMUKHI: u32 = 11;
pub const UCDN_SCRIPT_GUJARATI: u32 = 12;
pub const UCDN_SCRIPT_ORIYA: u32 = 13;
pub const UCDN_SCRIPT_TAMIL: u32 = 14;
pub const UCDN_SCRIPT_TELUGU: u32 = 15;
pub const UCDN_SCRIPT_KANNADA: u32 = 16;
pub const UCDN_SCRIPT_MALAYALAM: u32 = 17;
pub const UCDN_SCRIPT_SINHALA: u32 = 18;
pub const UCDN_SCRIPT_THAI: u32 = 19;
pub const UCDN_SCRIPT_LAO: u32 = 20;
pub const UCDN_SCRIPT_TIBETAN: u32 = 21;
pub const UCDN_SCRIPT_MYANMAR: u32 = 22;
pub const UCDN_SCRIPT_GEORGIAN: u32 = 23;
pub const UCDN_SCRIPT_HANGUL: u32 = 24;
pub const UCDN_SCRIPT_ETHIOPIC: u32 = 25;
pub const UCDN_SCRIPT_CHEROKEE: u32 = 26;
pub const UCDN_SCRIPT_CANADIAN_ABORIGINAL: u32 = 27;
pub const UCDN_SCRIPT_OGHAM: u32 = 28;
pub const UCDN_SCRIPT_RUNIC: u32 = 29;
pub const UCDN_SCRIPT_KHMER: u32 = 30;
pub const UCDN_SCRIPT_MONGOLIAN: u32 = 31;
pub const UCDN_SCRIPT_HIRAGANA: u32 = 32;
pub const UCDN_SCRIPT_KATAKANA: u32 = 33;
pub const UCDN_SCRIPT_BOPOMOFO: u32 = 34;
pub const UCDN_SCRIPT_HAN: u32 = 35;
pub const UCDN_SCRIPT_YI: u32 = 36;
pub const UCDN_SCRIPT_OLD_ITALIC: u32 = 37;
pub const UCDN_SCRIPT_GOTHIC: u32 = 38;
pub const UCDN_SCRIPT_DESERET: u32 = 39;
pub const UCDN_SCRIPT_INHERITED: u32 = 40;
pub const UCDN_SCRIPT_TAGALOG: u32 = 41;
pub const UCDN_SCRIPT_HANUNOO: u32 = 42;
pub const UCDN_SCRIPT_BUHID: u32 = 43;
pub const UCDN_SCRIPT_TAGBANWA: u32 = 44;
pub const UCDN_SCRIPT_LIMBU: u32 = 45;
pub const UCDN_SCRIPT_TAI_LE: u32 = 46;
pub const UCDN_SCRIPT_LINEAR_B: u32 = 47;
pub const UCDN_SCRIPT_UGARITIC: u32 = 48;
pub const UCDN_SCRIPT_SHAVIAN: u32 = 49;
pub const UCDN_SCRIPT_OSMANYA: u32 = 50;
pub const UCDN_SCRIPT_CYPRIOT: u32 = 51;
pub const UCDN_SCRIPT_BRAILLE: u32 = 52;
pub const UCDN_SCRIPT_BUGINESE: u32 = 53;
pub const UCDN_SCRIPT_COPTIC: u32 = 54;
pub const UCDN_SCRIPT_NEW_TAI_LUE: u32 = 55;
pub const UCDN_SCRIPT_GLAGOLITIC: u32 = 56;
pub const UCDN_SCRIPT_TIFINAGH: u32 = 57;
pub const UCDN_SCRIPT_SYLOTI_NAGRI: u32 = 58;
pub const UCDN_SCRIPT_OLD_PERSIAN: u32 = 59;
pub const UCDN_SCRIPT_KHAROSHTHI: u32 = 60;
pub const UCDN_SCRIPT_BALINESE: u32 = 61;
pub const UCDN_SCRIPT_CUNEIFORM: u32 = 62;
pub const UCDN_SCRIPT_PHOENICIAN: u32 = 63;
pub const UCDN_SCRIPT_PHAGS_PA: u32 = 64;
pub const UCDN_SCRIPT_NKO: u32 = 65;
pub const UCDN_SCRIPT_SUNDANESE: u32 = 66;
pub const UCDN_SCRIPT_LEPCHA: u32 = 67;
pub const UCDN_SCRIPT_OL_CHIKI: u32 = 68;
pub const UCDN_SCRIPT_VAI: u32 = 69;
pub const UCDN_SCRIPT_SAURASHTRA: u32 = 70;
pub const UCDN_SCRIPT_KAYAH_LI: u32 = 71;
pub const UCDN_SCRIPT_REJANG: u32 = 72;
pub const UCDN_SCRIPT_LYCIAN: u32 = 73;
pub const UCDN_SCRIPT_CARIAN: u32 = 74;
pub const UCDN_SCRIPT_LYDIAN: u32 = 75;
pub const UCDN_SCRIPT_CHAM: u32 = 76;
pub const UCDN_SCRIPT_TAI_THAM: u32 = 77;
pub const UCDN_SCRIPT_TAI_VIET: u32 = 78;
pub const UCDN_SCRIPT_AVESTAN: u32 = 79;
pub const UCDN_SCRIPT_EGYPTIAN_HIEROGLYPHS: u32 = 80;
pub const UCDN_SCRIPT_SAMARITAN: u32 = 81;
pub const UCDN_SCRIPT_LISU: u32 = 82;
pub const UCDN_SCRIPT_BAMUM: u32 = 83;
pub const UCDN_SCRIPT_JAVANESE: u32 = 84;
pub const UCDN_SCRIPT_MEETEI_MAYEK: u32 = 85;
pub const UCDN_SCRIPT_IMPERIAL_ARAMAIC: u32 = 86;
pub const UCDN_SCRIPT_OLD_SOUTH_ARABIAN: u32 = 87;
pub const UCDN_SCRIPT_INSCRIPTIONAL_PARTHIAN: u32 = 88;
pub const UCDN_SCRIPT_INSCRIPTIONAL_PAHLAVI: u32 = 89;
pub const UCDN_SCRIPT_OLD_TURKIC: u32 = 90;
pub const UCDN_SCRIPT_KAITHI: u32 = 91;
pub const UCDN_SCRIPT_BATAK: u32 = 92;
pub const UCDN_SCRIPT_BRAHMI: u32 = 93;
pub const UCDN_SCRIPT_MANDAIC: u32 = 94;
pub const UCDN_SCRIPT_CHAKMA: u32 = 95;
pub const UCDN_SCRIPT_MEROITIC_CURSIVE: u32 = 96;
pub const UCDN_SCRIPT_MEROITIC_HIEROGLYPHS: u32 = 97;
pub const UCDN_SCRIPT_MIAO: u32 = 98;
pub const UCDN_SCRIPT_SHARADA: u32 = 99;
pub const UCDN_SCRIPT_SORA_SOMPENG: u32 = 100;
pub const UCDN_SCRIPT_TAKRI: u32 = 101;
pub const UCDN_SCRIPT_UNKNOWN: u32 = 102;
pub const UCDN_SCRIPT_BASSA_VAH: u32 = 103;
pub const UCDN_SCRIPT_CAUCASIAN_ALBANIAN: u32 = 104;
pub const UCDN_SCRIPT_DUPLOYAN: u32 = 105;
pub const UCDN_SCRIPT_ELBASAN: u32 = 106;
pub const UCDN_SCRIPT_GRANTHA: u32 = 107;
pub const UCDN_SCRIPT_KHOJKI: u32 = 108;
pub const UCDN_SCRIPT_KHUDAWADI: u32 = 109;
pub const UCDN_SCRIPT_LINEAR_A: u32 = 110;
pub const UCDN_SCRIPT_MAHAJANI: u32 = 111;
pub const UCDN_SCRIPT_MANICHAEAN: u32 = 112;
pub const UCDN_SCRIPT_MENDE_KIKAKUI: u32 = 113;
pub const UCDN_SCRIPT_MODI: u32 = 114;
pub const UCDN_SCRIPT_MRO: u32 = 115;
pub const UCDN_SCRIPT_NABATAEAN: u32 = 116;
pub const UCDN_SCRIPT_OLD_NORTH_ARABIAN: u32 = 117;
pub const UCDN_SCRIPT_OLD_PERMIC: u32 = 118;
pub const UCDN_SCRIPT_PAHAWH_HMONG: u32 = 119;
pub const UCDN_SCRIPT_PALMYRENE: u32 = 120;
pub const UCDN_SCRIPT_PAU_CIN_HAU: u32 = 121;
pub const UCDN_SCRIPT_PSALTER_PAHLAVI: u32 = 122;
pub const UCDN_SCRIPT_SIDDHAM: u32 = 123;
pub const UCDN_SCRIPT_TIRHUTA: u32 = 124;
pub const UCDN_SCRIPT_WARANG_CITI: u32 = 125;
pub const UCDN_SCRIPT_AHOM: u32 = 126;
pub const UCDN_SCRIPT_ANATOLIAN_HIEROGLYPHS: u32 = 127;
pub const UCDN_SCRIPT_HATRAN: u32 = 128;
pub const UCDN_SCRIPT_MULTANI: u32 = 129;
pub const UCDN_SCRIPT_OLD_HUNGARIAN: u32 = 130;
pub const UCDN_SCRIPT_SIGNWRITING: u32 = 131;
pub const UCDN_SCRIPT_ADLAM: u32 = 132;
pub const UCDN_SCRIPT_BHAIKSUKI: u32 = 133;
pub const UCDN_SCRIPT_MARCHEN: u32 = 134;
pub const UCDN_SCRIPT_NEWA: u32 = 135;
pub const UCDN_SCRIPT_OSAGE: u32 = 136;
pub const UCDN_SCRIPT_TANGUT: u32 = 137;
pub const UCDN_SCRIPT_MASARAM_GONDI: u32 = 138;
pub const UCDN_SCRIPT_NUSHU: u32 = 139;
pub const UCDN_SCRIPT_SOYOMBO: u32 = 140;
pub const UCDN_SCRIPT_ZANABAZAR_SQUARE: u32 = 141;
pub const UCDN_SCRIPT_DOGRA: u32 = 142;
pub const UCDN_SCRIPT_GUNJALA_GONDI: u32 = 143;
pub const UCDN_SCRIPT_HANIFI_ROHINGYA: u32 = 144;
pub const UCDN_SCRIPT_MAKASAR: u32 = 145;
pub const UCDN_SCRIPT_MEDEFAIDRIN: u32 = 146;
pub const UCDN_SCRIPT_OLD_SOGDIAN: u32 = 147;
pub const UCDN_SCRIPT_SOGDIAN: u32 = 148;
pub const UCDN_SCRIPT_ELYMAIC: u32 = 149;
pub const UCDN_SCRIPT_NANDINAGARI: u32 = 150;
pub const UCDN_SCRIPT_NYIAKENG_PUACHUE_HMONG: u32 = 151;
pub const UCDN_SCRIPT_WANCHO: u32 = 152;
pub const UCDN_SCRIPT_CHORASMIAN: u32 = 153;
pub const UCDN_SCRIPT_DIVES_AKURU: u32 = 154;
pub const UCDN_SCRIPT_KHITAN_SMALL_SCRIPT: u32 = 155;
pub const UCDN_SCRIPT_YEZIDI: u32 = 156;
pub const UCDN_SCRIPT_VITHKUQI: u32 = 157;
pub const UCDN_SCRIPT_OLD_UYGHUR: u32 = 158;
pub const UCDN_SCRIPT_CYPRO_MINOAN: u32 = 159;
pub const UCDN_SCRIPT_TANGSA: u32 = 160;
pub const UCDN_SCRIPT_TOTO: u32 = 161;
pub const UCDN_SCRIPT_KAWI: u32 = 162;
pub const UCDN_SCRIPT_NAG_MUNDARI: u32 = 163;
pub const UCDN_LAST_SCRIPT: u32 = 163;
pub const UCDN_LINEBREAK_CLASS_OP: u32 = 0;
pub const UCDN_LINEBREAK_CLASS_CL: u32 = 1;
pub const UCDN_LINEBREAK_CLASS_CP: u32 = 2;
pub const UCDN_LINEBREAK_CLASS_QU: u32 = 3;
pub const UCDN_LINEBREAK_CLASS_GL: u32 = 4;
pub const UCDN_LINEBREAK_CLASS_NS: u32 = 5;
pub const UCDN_LINEBREAK_CLASS_EX: u32 = 6;
pub const UCDN_LINEBREAK_CLASS_SY: u32 = 7;
pub const UCDN_LINEBREAK_CLASS_IS: u32 = 8;
pub const UCDN_LINEBREAK_CLASS_PR: u32 = 9;
pub const UCDN_LINEBREAK_CLASS_PO: u32 = 10;
pub const UCDN_LINEBREAK_CLASS_NU: u32 = 11;
pub const UCDN_LINEBREAK_CLASS_AL: u32 = 12;
pub const UCDN_LINEBREAK_CLASS_HL: u32 = 13;
pub const UCDN_LINEBREAK_CLASS_ID: u32 = 14;
pub const UCDN_LINEBREAK_CLASS_IN: u32 = 15;
pub const UCDN_LINEBREAK_CLASS_HY: u32 = 16;
pub const UCDN_LINEBREAK_CLASS_BA: u32 = 17;
pub const UCDN_LINEBREAK_CLASS_BB: u32 = 18;
pub const UCDN_LINEBREAK_CLASS_B2: u32 = 19;
pub const UCDN_LINEBREAK_CLASS_ZW: u32 = 20;
pub const UCDN_LINEBREAK_CLASS_CM: u32 = 21;
pub const UCDN_LINEBREAK_CLASS_WJ: u32 = 22;
pub const UCDN_LINEBREAK_CLASS_H2: u32 = 23;
pub const UCDN_LINEBREAK_CLASS_H3: u32 = 24;
pub const UCDN_LINEBREAK_CLASS_JL: u32 = 25;
pub const UCDN_LINEBREAK_CLASS_JV: u32 = 26;
pub const UCDN_LINEBREAK_CLASS_JT: u32 = 27;
pub const UCDN_LINEBREAK_CLASS_RI: u32 = 28;
pub const UCDN_LINEBREAK_CLASS_AI: u32 = 29;
pub const UCDN_LINEBREAK_CLASS_BK: u32 = 30;
pub const UCDN_LINEBREAK_CLASS_CB: u32 = 31;
pub const UCDN_LINEBREAK_CLASS_CJ: u32 = 32;
pub const UCDN_LINEBREAK_CLASS_CR: u32 = 33;
pub const UCDN_LINEBREAK_CLASS_LF: u32 = 34;
pub const UCDN_LINEBREAK_CLASS_NL: u32 = 35;
pub const UCDN_LINEBREAK_CLASS_SA: u32 = 36;
pub const UCDN_LINEBREAK_CLASS_SG: u32 = 37;
pub const UCDN_LINEBREAK_CLASS_SP: u32 = 38;
pub const UCDN_LINEBREAK_CLASS_XX: u32 = 39;
pub const UCDN_LINEBREAK_CLASS_ZWJ: u32 = 40;
pub const UCDN_LINEBREAK_CLASS_EB: u32 = 41;
pub const UCDN_LINEBREAK_CLASS_EM: u32 = 42;
pub const UCDN_GENERAL_CATEGORY_CC: u32 = 0;
pub const UCDN_GENERAL_CATEGORY_CF: u32 = 1;
pub const UCDN_GENERAL_CATEGORY_CN: u32 = 2;
pub const UCDN_GENERAL_CATEGORY_CO: u32 = 3;
pub const UCDN_GENERAL_CATEGORY_CS: u32 = 4;
pub const UCDN_GENERAL_CATEGORY_LL: u32 = 5;
pub const UCDN_GENERAL_CATEGORY_LM: u32 = 6;
pub const UCDN_GENERAL_CATEGORY_LO: u32 = 7;
pub const UCDN_GENERAL_CATEGORY_LT: u32 = 8;
pub const UCDN_GENERAL_CATEGORY_LU: u32 = 9;
pub const UCDN_GENERAL_CATEGORY_MC: u32 = 10;
pub const UCDN_GENERAL_CATEGORY_ME: u32 = 11;
pub const UCDN_GENERAL_CATEGORY_MN: u32 = 12;
pub const UCDN_GENERAL_CATEGORY_ND: u32 = 13;
pub const UCDN_GENERAL_CATEGORY_NL: u32 = 14;
pub const UCDN_GENERAL_CATEGORY_NO: u32 = 15;
pub const UCDN_GENERAL_CATEGORY_PC: u32 = 16;
pub const UCDN_GENERAL_CATEGORY_PD: u32 = 17;
pub const UCDN_GENERAL_CATEGORY_PE: u32 = 18;
pub const UCDN_GENERAL_CATEGORY_PF: u32 = 19;
pub const UCDN_GENERAL_CATEGORY_PI: u32 = 20;
pub const UCDN_GENERAL_CATEGORY_PO: u32 = 21;
pub const UCDN_GENERAL_CATEGORY_PS: u32 = 22;
pub const UCDN_GENERAL_CATEGORY_SC: u32 = 23;
pub const UCDN_GENERAL_CATEGORY_SK: u32 = 24;
pub const UCDN_GENERAL_CATEGORY_SM: u32 = 25;
pub const UCDN_GENERAL_CATEGORY_SO: u32 = 26;
pub const UCDN_GENERAL_CATEGORY_ZL: u32 = 27;
pub const UCDN_GENERAL_CATEGORY_ZP: u32 = 28;
pub const UCDN_GENERAL_CATEGORY_ZS: u32 = 29;
pub const UCDN_BIDI_CLASS_L: u32 = 0;
pub const UCDN_BIDI_CLASS_LRE: u32 = 1;
pub const UCDN_BIDI_CLASS_LRO: u32 = 2;
pub const UCDN_BIDI_CLASS_R: u32 = 3;
pub const UCDN_BIDI_CLASS_AL: u32 = 4;
pub const UCDN_BIDI_CLASS_RLE: u32 = 5;
pub const UCDN_BIDI_CLASS_RLO: u32 = 6;
pub const UCDN_BIDI_CLASS_PDF: u32 = 7;
pub const UCDN_BIDI_CLASS_EN: u32 = 8;
pub const UCDN_BIDI_CLASS_ES: u32 = 9;
pub const UCDN_BIDI_CLASS_ET: u32 = 10;
pub const UCDN_BIDI_CLASS_AN: u32 = 11;
pub const UCDN_BIDI_CLASS_CS: u32 = 12;
pub const UCDN_BIDI_CLASS_NSM: u32 = 13;
pub const UCDN_BIDI_CLASS_BN: u32 = 14;
pub const UCDN_BIDI_CLASS_B: u32 = 15;
pub const UCDN_BIDI_CLASS_S: u32 = 16;
pub const UCDN_BIDI_CLASS_WS: u32 = 17;
pub const UCDN_BIDI_CLASS_ON: u32 = 18;
pub const UCDN_BIDI_CLASS_LRI: u32 = 19;
pub const UCDN_BIDI_CLASS_RLI: u32 = 20;
pub const UCDN_BIDI_CLASS_FSI: u32 = 21;
pub const UCDN_BIDI_CLASS_PDI: u32 = 22;
pub const UCDN_BIDI_PAIRED_BRACKET_TYPE_OPEN: u32 = 0;
pub const UCDN_BIDI_PAIRED_BRACKET_TYPE_CLOSE: u32 = 1;
pub const UCDN_BIDI_PAIRED_BRACKET_TYPE_NONE: u32 = 2;
pub const PDF_MAX_OBJECT_NUMBER: u32 = 8388607;
pub const PDF_MAX_GEN_NUMBER: u32 = 65535;
pub const PDF_MRANGE_CAP: u32 = 32;
pub type va_list = __builtin_va_list;
pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___sigset_t() {
const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__sigset_t>(),
128usize,
concat!("Size of: ", stringify!(__sigset_t))
);
assert_eq!(
::std::mem::align_of::<__sigset_t>(),
8usize,
concat!("Alignment of ", stringify!(__sigset_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigset_t),
"::",
stringify!(__val)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __jmp_buf_tag {
pub __jmpbuf: __jmp_buf,
pub __mask_was_saved: ::std::os::raw::c_int,
pub __saved_mask: __sigset_t,
}
#[test]
fn bindgen_test_layout___jmp_buf_tag() {
const UNINIT: ::std::mem::MaybeUninit<__jmp_buf_tag> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__jmp_buf_tag>(),
200usize,
concat!("Size of: ", stringify!(__jmp_buf_tag))
);
assert_eq!(
::std::mem::align_of::<__jmp_buf_tag>(),
8usize,
concat!("Alignment of ", stringify!(__jmp_buf_tag))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__jmpbuf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__jmpbuf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__mask_was_saved) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__mask_was_saved)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__saved_mask) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__saved_mask)
)
);
}
pub type sigjmp_buf = [__jmp_buf_tag; 1usize];
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _flags2: ::std::os::raw::c_int,
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub __pad5: usize,
pub _mode: ::std::os::raw::c_int,
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
extern "C" {
pub fn Memento_checkBlock(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_checkAllMemory() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_check() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_setParanoia(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_paranoidAt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_breakAt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_breakOnFree(a: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_breakOnRealloc(a: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_getBlockNum(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_find(a: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_breakpoint();
}
extern "C" {
pub fn Memento_failAt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_failThisEvent() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_listBlocks();
}
extern "C" {
pub fn Memento_listNewBlocks();
}
extern "C" {
pub fn Memento_listPhasedBlocks();
}
extern "C" {
pub fn Memento_setMax(arg1: usize) -> usize;
}
extern "C" {
pub fn Memento_stats();
}
extern "C" {
pub fn Memento_label(
arg1: *mut ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_tick();
}
extern "C" {
pub fn Memento_setVerbose(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_addBacktraceLimitFnname(
fnname: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_setAtexitFin(atexitfin: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_setIgnoreNewDelete(ignore: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_malloc(s: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_realloc(
arg1: *mut ::std::os::raw::c_void,
s: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_free(arg1: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_calloc(arg1: usize, arg2: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_strdup(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn Memento_asprintf(
ret: *mut *mut ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_vasprintf(
ret: *mut *mut ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_info(addr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_listBlockInfo();
}
extern "C" {
pub fn Memento_blockInfo(blk: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_takeByteRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_dropByteRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_takeShortRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_dropShortRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_takeIntRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_dropIntRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_takeRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_dropRef(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_adjustRef(
blk: *mut ::std::os::raw::c_void,
adjust: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_reference(blk: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_checkPointerOrNull(blk: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_checkBytePointerOrNull(
blk: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_checkShortPointerOrNull(
blk: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_checkIntPointerOrNull(blk: *mut ::std::os::raw::c_void)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_startLeaking();
}
extern "C" {
pub fn Memento_stopLeaking();
}
extern "C" {
pub fn Memento_sequence() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_squeezing() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn Memento_fin();
}
extern "C" {
pub fn Memento_bt();
}
extern "C" {
pub fn Memento_cpp_new(size: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_cpp_delete(pointer: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_cpp_new_array(size: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn Memento_cpp_delete_array(pointer: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_showHash(hash: ::std::os::raw::c_uint);
}
pub type fz_jmp_buf = sigjmp_buf;
extern "C" {
pub fn fz_stat_ctime(path: *const ::std::os::raw::c_char) -> i64;
}
extern "C" {
pub fn fz_stat_mtime(path: *const ::std::os::raw::c_char) -> i64;
}
extern "C" {
#[doc = "Range checking atof"]
pub fn fz_atof(s: *const ::std::os::raw::c_char) -> f32;
}
extern "C" {
#[doc = "atoi that copes with NULL"]
pub fn fz_atoi(s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "64bit atoi that copes with NULL"]
pub fn fz_atoi64(s: *const ::std::os::raw::c_char) -> i64;
}
#[doc = "fz_point is a point in a two-dimensional space."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_point {
pub x: f32,
pub y: f32,
}
#[test]
fn bindgen_test_layout_fz_point() {
const UNINIT: ::std::mem::MaybeUninit<fz_point> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_point>(),
8usize,
concat!("Size of: ", stringify!(fz_point))
);
assert_eq!(
::std::mem::align_of::<fz_point>(),
4usize,
concat!("Alignment of ", stringify!(fz_point))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_point),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_point),
"::",
stringify!(y)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_rect {
pub x0: f32,
pub y0: f32,
pub x1: f32,
pub y1: f32,
}
#[test]
fn bindgen_test_layout_fz_rect() {
const UNINIT: ::std::mem::MaybeUninit<fz_rect> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_rect>(),
16usize,
concat!("Size of: ", stringify!(fz_rect))
);
assert_eq!(
::std::mem::align_of::<fz_rect>(),
4usize,
concat!("Alignment of ", stringify!(fz_rect))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x0) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y0) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x1) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y1) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(y1)
)
);
}
#[doc = "fz_irect is a rectangle using integers instead of floats.\n\nIt's used in the draw device and for pixmap dimensions."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_irect {
pub x0: ::std::os::raw::c_int,
pub y0: ::std::os::raw::c_int,
pub x1: ::std::os::raw::c_int,
pub y1: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_irect() {
const UNINIT: ::std::mem::MaybeUninit<fz_irect> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_irect>(),
16usize,
concat!("Size of: ", stringify!(fz_irect))
);
assert_eq!(
::std::mem::align_of::<fz_irect>(),
4usize,
concat!("Alignment of ", stringify!(fz_irect))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x0) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y0) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x1) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y1) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(y1)
)
);
}
extern "C" {
#[doc = "A rectangle with sides of length one.\n\nThe bottom left corner is at (0, 0) and the top right corner\nis at (1, 1)."]
pub static fz_unit_rect: fz_rect;
}
extern "C" {
#[doc = "An empty rectangle with an area equal to zero."]
pub static fz_empty_rect: fz_rect;
}
extern "C" {
pub static fz_empty_irect: fz_irect;
}
extern "C" {
#[doc = "An infinite rectangle."]
pub static fz_infinite_rect: fz_rect;
}
extern "C" {
pub static fz_infinite_irect: fz_irect;
}
#[doc = "fz_matrix is a row-major 3x3 matrix used for representing\ntransformations of coordinates throughout MuPDF.\n\nSince all points reside in a two-dimensional space, one vector\nis always a constant unit vector; hence only some elements may\nvary in a matrix. Below is how the elements map between\ndifferent representations.\n\n/ a b 0 \\\n| c d 0 | normally represented as [ a b c d e f ].\n\\ e f 1 /"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_matrix {
pub a: f32,
pub b: f32,
pub c: f32,
pub d: f32,
pub e: f32,
pub f: f32,
}
#[test]
fn bindgen_test_layout_fz_matrix() {
const UNINIT: ::std::mem::MaybeUninit<fz_matrix> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_matrix>(),
24usize,
concat!("Size of: ", stringify!(fz_matrix))
);
assert_eq!(
::std::mem::align_of::<fz_matrix>(),
4usize,
concat!("Alignment of ", stringify!(fz_matrix))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(a)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(b)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(c)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(d)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).e) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(e)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(f)
)
);
}
extern "C" {
#[doc = "Identity transform matrix."]
pub static fz_identity: fz_matrix;
}
extern "C" {
#[doc = "Multiply two matrices.\n\nThe order of the two matrices are important since matrix\nmultiplication is not commutative.\n\nReturns result."]
pub fn fz_concat(left: fz_matrix, right: fz_matrix) -> fz_matrix;
}
extern "C" {
#[doc = "Create a scaling matrix.\n\nThe returned matrix is of the form [ sx 0 0 sy 0 0 ].\n\nm: Pointer to the matrix to populate\n\nsx, sy: Scaling factors along the X- and Y-axes. A scaling\nfactor of 1.0 will not cause any scaling along the relevant\naxis.\n\nReturns m."]
pub fn fz_scale(sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Scale a matrix by premultiplication.\n\nm: Pointer to the matrix to scale\n\nsx, sy: Scaling factors along the X- and Y-axes. A scaling\nfactor of 1.0 will not cause any scaling along the relevant\naxis.\n\nReturns m (updated)."]
pub fn fz_pre_scale(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Scale a matrix by postmultiplication.\n\nm: Pointer to the matrix to scale\n\nsx, sy: Scaling factors along the X- and Y-axes. A scaling\nfactor of 1.0 will not cause any scaling along the relevant\naxis.\n\nReturns m (updated)."]
pub fn fz_post_scale(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a shearing matrix.\n\nThe returned matrix is of the form [ 1 sy sx 1 0 0 ].\n\nm: pointer to place to store returned matrix\n\nsx, sy: Shearing factors. A shearing factor of 0.0 will not\ncause any shearing along the relevant axis.\n\nReturns m."]
pub fn fz_shear(sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Premultiply a matrix with a shearing matrix.\n\nThe shearing matrix is of the form [ 1 sy sx 1 0 0 ].\n\nm: pointer to matrix to premultiply\n\nsx, sy: Shearing factors. A shearing factor of 0.0 will not\ncause any shearing along the relevant axis.\n\nReturns m (updated)."]
pub fn fz_pre_shear(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a rotation matrix.\n\nThe returned matrix is of the form\n[ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ].\n\nm: Pointer to place to store matrix\n\ndegrees: Degrees of counter clockwise rotation. Values less\nthan zero and greater than 360 are handled as expected.\n\nReturns m."]
pub fn fz_rotate(degrees: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Rotate a transformation by premultiplying.\n\nThe premultiplied matrix is of the form\n[ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ].\n\nm: Pointer to matrix to premultiply.\n\ndegrees: Degrees of counter clockwise rotation. Values less\nthan zero and greater than 360 are handled as expected.\n\nReturns m (updated)."]
pub fn fz_pre_rotate(m: fz_matrix, degrees: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a translation matrix.\n\nThe returned matrix is of the form [ 1 0 0 1 tx ty ].\n\nm: A place to store the created matrix.\n\ntx, ty: Translation distances along the X- and Y-axes. A\ntranslation of 0 will not cause any translation along the\nrelevant axis.\n\nReturns m."]
pub fn fz_translate(tx: f32, ty: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Translate a matrix by premultiplication.\n\nm: The matrix to translate\n\ntx, ty: Translation distances along the X- and Y-axes. A\ntranslation of 0 will not cause any translation along the\nrelevant axis.\n\nReturns m."]
pub fn fz_pre_translate(m: fz_matrix, tx: f32, ty: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create transform matrix to draw page\nat a given resolution and rotation. Adjusts the scaling\nfactors so that the page covers whole number of\npixels and adjust the page origin to be at 0,0."]
pub fn fz_transform_page(mediabox: fz_rect, resolution: f32, rotate: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create an inverse matrix.\n\ninverse: Place to store inverse matrix.\n\nmatrix: Matrix to invert. A degenerate matrix, where the\ndeterminant is equal to zero, can not be inverted and the\noriginal matrix is returned instead.\n\nReturns inverse."]
pub fn fz_invert_matrix(matrix: fz_matrix) -> fz_matrix;
}
extern "C" {
#[doc = "Attempt to create an inverse matrix.\n\ninverse: Place to store inverse matrix.\n\nmatrix: Matrix to invert. A degenerate matrix, where the\ndeterminant is equal to zero, can not be inverted.\n\nReturns 1 if matrix is degenerate (singular), or 0 otherwise."]
pub fn fz_try_invert_matrix(inv: *mut fz_matrix, src: fz_matrix) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Check if a transformation is rectilinear.\n\nRectilinear means that no shearing is present and that any\nrotations present are a multiple of 90 degrees. Usually this\nis used to make sure that axis-aligned rectangles before the\ntransformation are still axis-aligned rectangles afterwards."]
pub fn fz_is_rectilinear(m: fz_matrix) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Calculate average scaling factor of matrix."]
pub fn fz_matrix_expansion(m: fz_matrix) -> f32;
}
extern "C" {
#[doc = "Compute intersection of two rectangles.\n\nGiven two rectangles, update the first to be the smallest\naxis-aligned rectangle that covers the area covered by both\ngiven rectangles. If either rectangle is empty then the\nintersection is also empty. If either rectangle is infinite\nthen the intersection is simply the non-infinite rectangle.\nShould both rectangles be infinite, then the intersection is\nalso infinite."]
pub fn fz_intersect_rect(a: fz_rect, b: fz_rect) -> fz_rect;
}
extern "C" {
#[doc = "Compute intersection of two bounding boxes.\n\nSimilar to fz_intersect_rect but operates on two bounding\nboxes instead of two rectangles."]
pub fn fz_intersect_irect(a: fz_irect, b: fz_irect) -> fz_irect;
}
extern "C" {
#[doc = "Compute union of two rectangles.\n\nGiven two rectangles, update the first to be the smallest\naxis-aligned rectangle that encompasses both given rectangles.\nIf either rectangle is infinite then the union is also infinite.\nIf either rectangle is empty then the union is simply the\nnon-empty rectangle. Should both rectangles be empty, then the\nunion is also empty."]
pub fn fz_union_rect(a: fz_rect, b: fz_rect) -> fz_rect;
}
extern "C" {
#[doc = "Convert a rect into the minimal bounding box\nthat covers the rectangle.\n\nCoordinates in a bounding box are integers, so rounding of the\nrects coordinates takes place. The top left corner is rounded\nupwards and left while the bottom right corner is rounded\ndownwards and to the right."]
pub fn fz_irect_from_rect(rect: fz_rect) -> fz_irect;
}
extern "C" {
#[doc = "Round rectangle coordinates.\n\nCoordinates in a bounding box are integers, so rounding of the\nrects coordinates takes place. The top left corner is rounded\nupwards and left while the bottom right corner is rounded\ndownwards and to the right.\n\nThis differs from fz_irect_from_rect, in that fz_irect_from_rect\nslavishly follows the numbers (i.e any slight over/under\ncalculations can cause whole extra pixels to be added).\nfz_round_rect allows for a small amount of rounding error when\ncalculating the bbox."]
pub fn fz_round_rect(rect: fz_rect) -> fz_irect;
}
extern "C" {
#[doc = "Convert a bbox into a rect.\n\nFor our purposes, a rect can represent all the values we meet in\na bbox, so nothing can go wrong.\n\nrect: A place to store the generated rectangle.\n\nbbox: The bbox to convert.\n\nReturns rect (updated)."]
pub fn fz_rect_from_irect(bbox: fz_irect) -> fz_rect;
}
extern "C" {
#[doc = "Expand a bbox by a given amount in all directions."]
pub fn fz_expand_rect(b: fz_rect, expand: f32) -> fz_rect;
}
extern "C" {
pub fn fz_expand_irect(a: fz_irect, expand: ::std::os::raw::c_int) -> fz_irect;
}
extern "C" {
#[doc = "Expand a bbox to include a given point.\nTo create a rectangle that encompasses a sequence of points, the\nrectangle must first be set to be the empty rectangle at one of\nthe points before including the others."]
pub fn fz_include_point_in_rect(r: fz_rect, p: fz_point) -> fz_rect;
}
extern "C" {
#[doc = "Translate bounding box.\n\nTranslate a bbox by a given x and y offset. Allows for overflow."]
pub fn fz_translate_rect(a: fz_rect, xoff: f32, yoff: f32) -> fz_rect;
}
extern "C" {
pub fn fz_translate_irect(
a: fz_irect,
xoff: ::std::os::raw::c_int,
yoff: ::std::os::raw::c_int,
) -> fz_irect;
}
extern "C" {
#[doc = "Test rectangle inclusion.\n\nReturn true if a entirely contains b."]
pub fn fz_contains_rect(a: fz_rect, b: fz_rect) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Apply a transformation to a point.\n\ntransform: Transformation matrix to apply. See fz_concat,\nfz_scale, fz_rotate and fz_translate for how to create a\nmatrix.\n\npoint: Pointer to point to update.\n\nReturns transform (unchanged)."]
pub fn fz_transform_point(point: fz_point, m: fz_matrix) -> fz_point;
}
extern "C" {
pub fn fz_transform_point_xy(x: f32, y: f32, m: fz_matrix) -> fz_point;
}
extern "C" {
#[doc = "Apply a transformation to a vector.\n\ntransform: Transformation matrix to apply. See fz_concat,\nfz_scale and fz_rotate for how to create a matrix. Any\ntranslation will be ignored.\n\nvector: Pointer to vector to update."]
pub fn fz_transform_vector(vector: fz_point, m: fz_matrix) -> fz_point;
}
extern "C" {
#[doc = "Apply a transform to a rectangle.\n\nAfter the four corner points of the axis-aligned rectangle\nhave been transformed it may not longer be axis-aligned. So a\nnew axis-aligned rectangle is created covering at least the\narea of the transformed rectangle.\n\ntransform: Transformation matrix to apply. See fz_concat,\nfz_scale and fz_rotate for how to create a matrix.\n\nrect: Rectangle to be transformed. The two special cases\nfz_empty_rect and fz_infinite_rect, may be used but are\nreturned unchanged as expected."]
pub fn fz_transform_rect(rect: fz_rect, m: fz_matrix) -> fz_rect;
}
extern "C" {
#[doc = "Normalize a vector to length one."]
pub fn fz_normalize_vector(p: fz_point) -> fz_point;
}
extern "C" {
#[doc = "Grid fit a matrix.\n\nas_tiled = 0 => adjust the matrix so that the image of the unit\nsquare completely covers any pixel that was touched by the\nimage of the unit square under the original matrix.\n\nas_tiled = 1 => adjust the matrix so that the corners of the\nimage of the unit square align with the closest integer corner\nof the image of the unit square under the original matrix."]
pub fn fz_gridfit_matrix(as_tiled: ::std::os::raw::c_int, m: fz_matrix) -> fz_matrix;
}
extern "C" {
#[doc = "Find the largest expansion performed by this matrix.\n(i.e. max(abs(m.a),abs(m.b),abs(m.c),abs(m.d))"]
pub fn fz_matrix_max_expansion(m: fz_matrix) -> f32;
}
#[doc = "A representation for a region defined by 4 points.\n\nThe significant difference between quads and rects is that\nthe edges of quads are not axis aligned."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_quad {
pub ul: fz_point,
pub ur: fz_point,
pub ll: fz_point,
pub lr: fz_point,
}
#[test]
fn bindgen_test_layout_fz_quad() {
const UNINIT: ::std::mem::MaybeUninit<fz_quad> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_quad>(),
32usize,
concat!("Size of: ", stringify!(fz_quad))
);
assert_eq!(
::std::mem::align_of::<fz_quad>(),
4usize,
concat!("Alignment of ", stringify!(fz_quad))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ul) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ul)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ur) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ur)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ll) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ll)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lr) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(lr)
)
);
}
extern "C" {
#[doc = "Convert a rect to a quad (losslessly)."]
pub fn fz_quad_from_rect(r: fz_rect) -> fz_quad;
}
extern "C" {
#[doc = "Convert a quad to the smallest rect that covers it."]
pub fn fz_rect_from_quad(q: fz_quad) -> fz_rect;
}
extern "C" {
#[doc = "Transform a quad by a matrix."]
pub fn fz_transform_quad(q: fz_quad, m: fz_matrix) -> fz_quad;
}
extern "C" {
#[doc = "Inclusion test for quads."]
pub fn fz_is_point_inside_quad(p: fz_point, q: fz_quad) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Inclusion test for rects. (Rect is assumed to be open, i.e.\ntop right corner is not included)."]
pub fn fz_is_point_inside_rect(p: fz_point, r: fz_rect) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Inclusion test for irects. (Rect is assumed to be open, i.e.\ntop right corner is not included)."]
pub fn fz_is_point_inside_irect(
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
r: fz_irect,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Inclusion test for quad in quad.\n\nThis may break down if quads are not 'well formed'."]
pub fn fz_is_quad_inside_quad(needle: fz_quad, haystack: fz_quad) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Intersection test for quads.\n\nThis may break down if quads are not 'well formed'."]
pub fn fz_is_quad_intersecting_quad(a: fz_quad, b: fz_quad) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_font_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_colorspace_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_style_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_tuning_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_store {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_glyph_cache {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_document_handler_context {
_unused: [u8; 0],
}
#[doc = "Allocator structure; holds callbacks and private data pointer."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_alloc_context {
pub user: *mut ::std::os::raw::c_void,
pub malloc: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: usize,
) -> *mut ::std::os::raw::c_void,
>,
pub realloc: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: *mut ::std::os::raw::c_void,
arg3: usize,
) -> *mut ::std::os::raw::c_void,
>,
pub free: ::std::option::Option<
unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_void),
>,
}
#[test]
fn bindgen_test_layout_fz_alloc_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_alloc_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_alloc_context>(),
32usize,
concat!("Size of: ", stringify!(fz_alloc_context))
);
assert_eq!(
::std::mem::align_of::<fz_alloc_context>(),
8usize,
concat!("Alignment of ", stringify!(fz_alloc_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).malloc) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(malloc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).realloc) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(realloc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(free)
)
);
}
extern "C" {
pub fn fz_vthrow(
ctx: *mut fz_context,
errcode: ::std::os::raw::c_int,
arg1: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
) -> !;
}
extern "C" {
pub fn fz_throw(
ctx: *mut fz_context,
errcode: ::std::os::raw::c_int,
arg1: *const ::std::os::raw::c_char,
...
) -> !;
}
extern "C" {
pub fn fz_rethrow(ctx: *mut fz_context) -> !;
}
extern "C" {
pub fn fz_morph_error(
ctx: *mut fz_context,
fromcode: ::std::os::raw::c_int,
tocode: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_vwarn(
ctx: *mut fz_context,
fmt: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
);
}
extern "C" {
pub fn fz_warn(ctx: *mut fz_context, fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
pub fn fz_caught_message(ctx: *mut fz_context) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_caught(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_rethrow_if(ctx: *mut fz_context, errcode: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_start_throw_on_repair(ctx: *mut fz_context);
}
extern "C" {
pub fn fz_end_throw_on_repair(ctx: *mut fz_context);
}
pub const FZ_ERROR_NONE: _bindgen_ty_1 = 0;
pub const FZ_ERROR_MEMORY: _bindgen_ty_1 = 1;
pub const FZ_ERROR_GENERIC: _bindgen_ty_1 = 2;
pub const FZ_ERROR_SYNTAX: _bindgen_ty_1 = 3;
pub const FZ_ERROR_MINOR: _bindgen_ty_1 = 4;
pub const FZ_ERROR_TRYLATER: _bindgen_ty_1 = 5;
pub const FZ_ERROR_ABORT: _bindgen_ty_1 = 6;
pub const FZ_ERROR_REPAIRED: _bindgen_ty_1 = 7;
pub const FZ_ERROR_COUNT: _bindgen_ty_1 = 8;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Flush any repeated warnings.\n\nRepeated warnings are buffered, counted and eventually printed\nalong with the number of repetitions. Call fz_flush_warnings\nto force printing of the latest buffered warning and the\nnumber of repetitions, for example to make sure that all\nwarnings are printed before exiting an application."]
pub fn fz_flush_warnings(ctx: *mut fz_context);
}
#[doc = "Locking functions\n\nMuPDF is kept deliberately free of any knowledge of particular\nthreading systems. As such, in order for safe multi-threaded\noperation, we rely on callbacks to client provided functions.\n\nA client is expected to provide FZ_LOCK_MAX number of mutexes,\nand a function to lock/unlock each of them. These may be\nrecursive mutexes, but do not have to be.\n\nIf a client does not intend to use multiple threads, then it\nmay pass NULL instead of a lock structure.\n\nIn order to avoid deadlocks, we have one simple rule\ninternally as to how we use locks: We can never take lock n\nwhen we already hold any lock i, where 0 <= i <= n. In order\nto verify this, we have some debugging code, that can be\nenabled by defining FITZ_DEBUG_LOCKING."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_locks_context {
pub user: *mut ::std::os::raw::c_void,
pub lock: ::std::option::Option<
unsafe extern "C" fn(user: *mut ::std::os::raw::c_void, lock: ::std::os::raw::c_int),
>,
pub unlock: ::std::option::Option<
unsafe extern "C" fn(user: *mut ::std::os::raw::c_void, lock: ::std::os::raw::c_int),
>,
}
#[test]
fn bindgen_test_layout_fz_locks_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_locks_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_locks_context>(),
24usize,
concat!("Size of: ", stringify!(fz_locks_context))
);
assert_eq!(
::std::mem::align_of::<fz_locks_context>(),
8usize,
concat!("Alignment of ", stringify!(fz_locks_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lock) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(lock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).unlock) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(unlock)
)
);
}
pub const FZ_LOCK_ALLOC: _bindgen_ty_2 = 0;
pub const FZ_LOCK_FREETYPE: _bindgen_ty_2 = 1;
pub const FZ_LOCK_GLYPHCACHE: _bindgen_ty_2 = 2;
pub const FZ_LOCK_MAX: _bindgen_ty_2 = 3;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
extern "C" {
pub fn fz_assert_lock_held(ctx: *mut fz_context, lock: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_assert_lock_not_held(ctx: *mut fz_context, lock: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_lock_debug_lock(ctx: *mut fz_context, lock: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_lock_debug_unlock(ctx: *mut fz_context, lock: ::std::os::raw::c_int);
}
pub const FZ_STORE_UNLIMITED: _bindgen_ty_3 = 0;
pub const FZ_STORE_DEFAULT: _bindgen_ty_3 = 268435456;
#[doc = "Specifies the maximum size in bytes of the resource store in\nfz_context. Given as argument to fz_new_context.\n\nFZ_STORE_UNLIMITED: Let resource store grow unbounded.\n\nFZ_STORE_DEFAULT: A reasonable upper bound on the size, for\ndevices that are not memory constrained."]
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Make a clone of an existing context.\n\nThis function is meant to be used in multi-threaded\napplications where each thread requires its own context, yet\nparts of the global state, for example caching, are shared.\n\nctx: Context obtained from fz_new_context to make a copy of.\nctx must have had locks and lock/functions setup when created.\nThe two contexts will share the memory allocator, resource\nstore, locks and lock/unlock functions. They will each have\ntheir own exception stacks though.\n\nMay return NULL."]
pub fn fz_clone_context(ctx: *mut fz_context) -> *mut fz_context;
}
extern "C" {
#[doc = "Free a context and its global state.\n\nThe context and all of its global state is freed, and any\nbuffered warnings are flushed (see fz_flush_warnings). If NULL\nis passed in nothing will happen.\n\nMust not be called for a context that is being used in an active\nfz_try(), fz_always() or fz_catch() block."]
pub fn fz_drop_context(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Set the user field in the context.\n\nNULL initially, this field can be set to any opaque value\nrequired by the user. It is copied on clones."]
pub fn fz_set_user_context(ctx: *mut fz_context, user: *mut ::std::os::raw::c_void);
}
extern "C" {
#[doc = "Read the user field from the context."]
pub fn fz_user_context(ctx: *mut fz_context) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "FIXME: Better not to expose fz_default_error_callback, and\nfz_default_warning callback and to allow 'NULL' to be used\nint fz_set_xxxx_callback to mean \"defaults\".\n\nFIXME: Do we need/want functions like\nfz_error_callback(ctx, message) to allow callers to inject\nstuff into the error/warning streams?\n/\n/**\nThe default error callback. Declared publicly just so that the\nerror callback can be set back to this after it has been\noverridden."]
pub fn fz_default_error_callback(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "The default warning callback. Declared publicly just so that\nthe warning callback can be set back to this after it has been\noverridden."]
pub fn fz_default_warning_callback(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
);
}
#[doc = "A callback called whenever an error message is generated.\nThe user pointer passed to fz_set_error_callback() is passed\nalong with the error message."]
pub type fz_error_cb = ::std::option::Option<
unsafe extern "C" fn(user: *mut ::std::os::raw::c_void, message: *const ::std::os::raw::c_char),
>;
#[doc = "A callback called whenever a warning message is generated.\nThe user pointer passed to fz_set_warning_callback() is\npassed along with the warning message."]
pub type fz_warning_cb = ::std::option::Option<
unsafe extern "C" fn(user: *mut ::std::os::raw::c_void, message: *const ::std::os::raw::c_char),
>;
extern "C" {
#[doc = "Set the error callback. This will be called as part of the\nexception handling.\n\nThe callback must not throw exceptions!"]
pub fn fz_set_error_callback(
ctx: *mut fz_context,
error_cb: fz_error_cb,
user: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Retrieve the currently set error callback, or NULL if none\nhas been set. Optionally, if user is non-NULL, the user pointer\ngiven when the warning callback was set is also passed back to\nthe caller."]
pub fn fz_error_callback(
ctx: *mut fz_context,
user: *mut *mut ::std::os::raw::c_void,
) -> fz_error_cb;
}
extern "C" {
#[doc = "Set the warning callback. This will be called as part of the\nexception handling.\n\nThe callback must not throw exceptions!"]
pub fn fz_set_warning_callback(
ctx: *mut fz_context,
warning_cb: fz_warning_cb,
user: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Retrieve the currently set warning callback, or NULL if none\nhas been set. Optionally, if user is non-NULL, the user pointer\ngiven when the warning callback was set is also passed back to\nthe caller."]
pub fn fz_warning_callback(
ctx: *mut fz_context,
user: *mut *mut ::std::os::raw::c_void,
) -> fz_warning_cb;
}
#[doc = "Given the width and height of an image,\nthe subsample factor, and the subarea of the image actually\nrequired, the caller can decide whether to decode the whole\nimage or just a subarea.\n\narg: The caller supplied opaque argument.\n\nw, h: The width/height of the complete image.\n\nl2factor: The log2 factor for subsampling (i.e. image will be\ndecoded to (w>>l2factor, h>>l2factor)).\n\nsubarea: The actual subarea required for the current operation.\nThe tuning function is allowed to increase this in size if\nrequired."]
pub type fz_tune_image_decode_fn = ::std::option::Option<
unsafe extern "C" fn(
arg: *mut ::std::os::raw::c_void,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
l2factor: ::std::os::raw::c_int,
subarea: *mut fz_irect,
),
>;
#[doc = "Given the source width and height of\nimage, together with the actual required width and height,\ndecide whether we should use mitchell scaling.\n\narg: The caller supplied opaque argument.\n\ndst_w, dst_h: The actual width/height required on the target\ndevice.\n\nsrc_w, src_h: The source width/height of the image.\n\nReturn 0 not to use the Mitchell scaler, 1 to use the Mitchell\nscaler. All other values reserved."]
pub type fz_tune_image_scale_fn = ::std::option::Option<
unsafe extern "C" fn(
arg: *mut ::std::os::raw::c_void,
dst_w: ::std::os::raw::c_int,
dst_h: ::std::os::raw::c_int,
src_w: ::std::os::raw::c_int,
src_h: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
extern "C" {
#[doc = "Set the tuning function to use for\nimage decode.\n\nimage_decode: Function to use.\n\narg: Opaque argument to be passed to tuning function."]
pub fn fz_tune_image_decode(
ctx: *mut fz_context,
image_decode: fz_tune_image_decode_fn,
arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Set the tuning function to use for\nimage scaling.\n\nimage_scale: Function to use.\n\narg: Opaque argument to be passed to tuning function."]
pub fn fz_tune_image_scale(
ctx: *mut fz_context,
image_scale: fz_tune_image_scale_fn,
arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Get the number of bits of antialiasing we are\nusing (for graphics). Between 0 and 8."]
pub fn fz_aa_level(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Set the number of bits of antialiasing we should\nuse (for both text and graphics).\n\nbits: The number of bits of antialiasing to use (values are\nclamped to within the 0 to 8 range)."]
pub fn fz_set_aa_level(ctx: *mut fz_context, bits: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Get the number of bits of antialiasing we are\nusing for text. Between 0 and 8."]
pub fn fz_text_aa_level(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Set the number of bits of antialiasing we\nshould use for text.\n\nbits: The number of bits of antialiasing to use (values are\nclamped to within the 0 to 8 range)."]
pub fn fz_set_text_aa_level(ctx: *mut fz_context, bits: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Get the number of bits of antialiasing we are\nusing for graphics. Between 0 and 8."]
pub fn fz_graphics_aa_level(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Set the number of bits of antialiasing we\nshould use for graphics.\n\nbits: The number of bits of antialiasing to use (values are\nclamped to within the 0 to 8 range)."]
pub fn fz_set_graphics_aa_level(ctx: *mut fz_context, bits: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Get the minimum line width to be\nused for stroked lines.\n\nmin_line_width: The minimum line width to use (in pixels)."]
pub fn fz_graphics_min_line_width(ctx: *mut fz_context) -> f32;
}
extern "C" {
#[doc = "Set the minimum line width to be\nused for stroked lines.\n\nmin_line_width: The minimum line width to use (in pixels)."]
pub fn fz_set_graphics_min_line_width(ctx: *mut fz_context, min_line_width: f32);
}
extern "C" {
#[doc = "Get the user stylesheet source text."]
pub fn fz_user_css(ctx: *mut fz_context) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Set the user stylesheet source text for use with HTML and EPUB."]
pub fn fz_set_user_css(ctx: *mut fz_context, text: *const ::std::os::raw::c_char);
}
extern "C" {
#[doc = "Return whether to respect document styles in HTML and EPUB."]
pub fn fz_use_document_css(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Toggle whether to respect document styles in HTML and EPUB."]
pub fn fz_set_use_document_css(ctx: *mut fz_context, use_: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Enable icc profile based operation."]
pub fn fz_enable_icc(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Disable icc profile based operation."]
pub fn fz_disable_icc(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Allocate uninitialized memory of a given size.\nDoes NOT clear the memory!\n\nMay return NULL for size = 0.\n\nThrows exception in the event of failure to allocate."]
pub fn fz_malloc(ctx: *mut fz_context, size: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Allocate array of memory of count entries of size bytes.\nClears the memory to zero.\n\nThrows exception in the event of failure to allocate."]
pub fn fz_calloc(
ctx: *mut fz_context,
count: usize,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Reallocates a block of memory to given size. Existing contents\nup to min(old_size,new_size) are maintained. The rest of the\nblock is uninitialised.\n\nfz_realloc(ctx, NULL, size) behaves like fz_malloc(ctx, size).\n\nfz_realloc(ctx, p, 0); behaves like fz_free(ctx, p).\n\nThrows exception in the event of failure to allocate."]
pub fn fz_realloc(
ctx: *mut fz_context,
p: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Free a previously allocated block of memory.\n\nfz_free(ctx, NULL) does nothing.\n\nNever throws exceptions."]
pub fn fz_free(ctx: *mut fz_context, p: *mut ::std::os::raw::c_void);
}
extern "C" {
#[doc = "fz_malloc equivalent that returns NULL rather than throwing\nexceptions."]
pub fn fz_malloc_no_throw(ctx: *mut fz_context, size: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "fz_calloc equivalent that returns NULL rather than throwing\nexceptions."]
pub fn fz_calloc_no_throw(
ctx: *mut fz_context,
count: usize,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "fz_realloc equivalent that returns NULL rather than throwing\nexceptions."]
pub fn fz_realloc_no_throw(
ctx: *mut fz_context,
p: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Portable strdup implementation, using fz allocators."]
pub fn fz_strdup(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Fill block with len bytes of pseudo-randomness."]
pub fn fz_memrnd(ctx: *mut fz_context, block: *mut u8, len: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_var_imp(arg1: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn fz_push_try(ctx: *mut fz_context) -> *mut fz_jmp_buf;
}
extern "C" {
pub fn fz_do_try(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_do_always(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_do_catch(ctx: *mut fz_context) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_error_stack_slot {
pub buffer: fz_jmp_buf,
pub state: ::std::os::raw::c_int,
pub code: ::std::os::raw::c_int,
pub padding: [::std::os::raw::c_char; 24usize],
}
#[test]
fn bindgen_test_layout_fz_error_stack_slot() {
const UNINIT: ::std::mem::MaybeUninit<fz_error_stack_slot> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_error_stack_slot>(),
232usize,
concat!("Size of: ", stringify!(fz_error_stack_slot))
);
assert_eq!(
::std::mem::align_of::<fz_error_stack_slot>(),
8usize,
concat!("Alignment of ", stringify!(fz_error_stack_slot))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize },
204usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(padding)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_error_context {
pub top: *mut fz_error_stack_slot,
pub stack: [fz_error_stack_slot; 256usize],
pub padding: fz_error_stack_slot,
pub stack_base: *mut fz_error_stack_slot,
pub errcode: ::std::os::raw::c_int,
pub print_user: *mut ::std::os::raw::c_void,
pub print: ::std::option::Option<
unsafe extern "C" fn(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
),
>,
pub message: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_fz_error_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_error_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_error_context>(),
59920usize,
concat!("Size of: ", stringify!(fz_error_context))
);
assert_eq!(
::std::mem::align_of::<fz_error_context>(),
8usize,
concat!("Alignment of ", stringify!(fz_error_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(stack)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize },
59400usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(padding)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stack_base) as usize - ptr as usize },
59632usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(stack_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).errcode) as usize - ptr as usize },
59640usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(errcode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).print_user) as usize - ptr as usize },
59648usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(print_user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).print) as usize - ptr as usize },
59656usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(print)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
59664usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(message)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_warn_context {
pub print_user: *mut ::std::os::raw::c_void,
pub print: ::std::option::Option<
unsafe extern "C" fn(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
),
>,
pub count: ::std::os::raw::c_int,
pub message: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_fz_warn_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_warn_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_warn_context>(),
280usize,
concat!("Size of: ", stringify!(fz_warn_context))
);
assert_eq!(
::std::mem::align_of::<fz_warn_context>(),
8usize,
concat!("Alignment of ", stringify!(fz_warn_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).print_user) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(print_user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).print) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(print)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(message)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_aa_context {
pub hscale: ::std::os::raw::c_int,
pub vscale: ::std::os::raw::c_int,
pub scale: ::std::os::raw::c_int,
pub bits: ::std::os::raw::c_int,
pub text_bits: ::std::os::raw::c_int,
pub min_line_width: f32,
}
#[test]
fn bindgen_test_layout_fz_aa_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_aa_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_aa_context>(),
24usize,
concat!("Size of: ", stringify!(fz_aa_context))
);
assert_eq!(
::std::mem::align_of::<fz_aa_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_aa_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hscale) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(hscale)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vscale) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(vscale)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(scale)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(bits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text_bits) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(text_bits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).min_line_width) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(min_line_width)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_context {
pub user: *mut ::std::os::raw::c_void,
pub alloc: fz_alloc_context,
pub locks: fz_locks_context,
pub error: fz_error_context,
pub warn: fz_warn_context,
pub aa: fz_aa_context,
pub seed48: [u16; 7usize],
pub icc_enabled: ::std::os::raw::c_int,
pub throw_on_repair: ::std::os::raw::c_int,
pub handler: *mut fz_document_handler_context,
pub style: *mut fz_style_context,
pub tuning: *mut fz_tuning_context,
pub stddbg: *mut fz_output,
pub font: *mut fz_font_context,
pub colorspace: *mut fz_colorspace_context,
pub store: *mut fz_store,
pub glyph_cache: *mut fz_glyph_cache,
}
#[test]
fn bindgen_test_layout_fz_context() {
const UNINIT: ::std::mem::MaybeUninit<fz_context> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_context>(),
60376usize,
concat!("Size of: ", stringify!(fz_context))
);
assert_eq!(
::std::mem::align_of::<fz_context>(),
8usize,
concat!("Alignment of ", stringify!(fz_context))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(alloc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).locks) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(locks)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).warn) as usize - ptr as usize },
59984usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(warn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).aa) as usize - ptr as usize },
60264usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(aa)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).seed48) as usize - ptr as usize },
60288usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(seed48)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).icc_enabled) as usize - ptr as usize },
60304usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(icc_enabled)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).throw_on_repair) as usize - ptr as usize },
60308usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(throw_on_repair)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handler) as usize - ptr as usize },
60312usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(handler)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).style) as usize - ptr as usize },
60320usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(style)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tuning) as usize - ptr as usize },
60328usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(tuning)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stddbg) as usize - ptr as usize },
60336usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(stddbg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font) as usize - ptr as usize },
60344usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize },
60352usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).store) as usize - ptr as usize },
60360usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(store)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).glyph_cache) as usize - ptr as usize },
60368usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(glyph_cache)
)
);
}
extern "C" {
pub fn fz_new_context_imp(
alloc: *const fz_alloc_context,
locks: *const fz_locks_context,
max_store: usize,
version: *const ::std::os::raw::c_char,
) -> *mut fz_context;
}
#[doc = "fz_buffer is a wrapper around a dynamically allocated array of\nbytes.\n\nBuffers have a capacity (the number of bytes storage immediately\navailable) and a current size.\n\nThe contents of the structure are considered implementation\ndetails and are subject to change. Users should use the accessor\nfunctions in preference."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_buffer {
pub refs: ::std::os::raw::c_int,
pub data: *mut ::std::os::raw::c_uchar,
pub cap: usize,
pub len: usize,
pub unused_bits: ::std::os::raw::c_int,
pub shared: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_buffer() {
const UNINIT: ::std::mem::MaybeUninit<fz_buffer> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_buffer>(),
40usize,
concat!("Size of: ", stringify!(fz_buffer))
);
assert_eq!(
::std::mem::align_of::<fz_buffer>(),
8usize,
concat!("Alignment of ", stringify!(fz_buffer))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).unused_bits) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(unused_bits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).shared) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(shared)
)
);
}
extern "C" {
#[doc = "Take an additional reference to the buffer. The same pointer\nis returned.\n\nNever throws exceptions."]
pub fn fz_keep_buffer(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Drop a reference to the buffer. When the reference count reaches\nzero, the buffer is destroyed.\n\nNever throws exceptions."]
pub fn fz_drop_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Retrieve internal memory of buffer.\n\ndatap: Output parameter that will be pointed to the data.\n\nReturns the current size of the data in bytes."]
pub fn fz_buffer_storage(
ctx: *mut fz_context,
buf: *mut fz_buffer,
datap: *mut *mut ::std::os::raw::c_uchar,
) -> usize;
}
extern "C" {
#[doc = "Ensure that a buffer's data ends in a\n0 byte, and return a pointer to it."]
pub fn fz_string_from_buffer(
ctx: *mut fz_context,
buf: *mut fz_buffer,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_new_buffer(ctx: *mut fz_context, capacity: usize) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Create a new buffer with existing data.\n\ndata: Pointer to existing data.\nsize: Size of existing data.\n\nTakes ownership of data. Does not make a copy. Calls fz_free on\nthe data when the buffer is deallocated. Do not use 'data' after\npassing to this function.\n\nReturns pointer to new buffer. Throws exception on allocation\nfailure."]
pub fn fz_new_buffer_from_data(
ctx: *mut fz_context,
data: *mut ::std::os::raw::c_uchar,
size: usize,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Like fz_new_buffer, but does not take ownership."]
pub fn fz_new_buffer_from_shared_data(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
size: usize,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Create a new buffer containing a copy of the passed data."]
pub fn fz_new_buffer_from_copied_data(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
size: usize,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Make a new buffer, containing a copy of the data used in\nthe original."]
pub fn fz_clone_buffer(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Create a new buffer with data decoded from a base64 input string."]
pub fn fz_new_buffer_from_base64(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_char,
size: usize,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Ensure that a buffer has a given capacity,\ntruncating data if required.\n\ncapacity: The desired capacity for the buffer. If the current\nsize of the buffer contents is smaller than capacity, it is\ntruncated."]
pub fn fz_resize_buffer(ctx: *mut fz_context, buf: *mut fz_buffer, capacity: usize);
}
extern "C" {
#[doc = "Make some space within a buffer (i.e. ensure that\ncapacity > size)."]
pub fn fz_grow_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Trim wasted capacity from a buffer by resizing internal memory."]
pub fn fz_trim_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Empties the buffer. Storage is not freed, but is held ready\nto be reused as the buffer is refilled.\n\nNever throws exceptions."]
pub fn fz_clear_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Create a new buffer with a (subset of) the data from the buffer.\n\nstart: if >= 0, offset from start of buffer, if < 0 offset from end of buffer.\n\nend: if >= 0, offset from start of buffer, if < 0 offset from end of buffer."]
pub fn fz_slice_buffer(
ctx: *mut fz_context,
buf: *mut fz_buffer,
start: i64,
end: i64,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Append the contents of the source buffer onto the end of the\ndestination buffer, extending automatically as required.\n\nOwnership of buffers does not change."]
pub fn fz_append_buffer(
ctx: *mut fz_context,
destination: *mut fz_buffer,
source: *mut fz_buffer,
);
}
extern "C" {
#[doc = "Write a base64 encoded data block, optionally with periodic newlines."]
pub fn fz_append_base64(
ctx: *mut fz_context,
out: *mut fz_buffer,
data: *const ::std::os::raw::c_uchar,
size: usize,
newline: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Append a base64 encoded fz_buffer, optionally with periodic newlines."]
pub fn fz_append_base64_buffer(
ctx: *mut fz_context,
out: *mut fz_buffer,
data: *mut fz_buffer,
newline: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "fz_append_*: Append data to a buffer.\n\nThe buffer will automatically grow as required."]
pub fn fz_append_data(
ctx: *mut fz_context,
buf: *mut fz_buffer,
data: *const ::std::os::raw::c_void,
len: usize,
);
}
extern "C" {
pub fn fz_append_string(
ctx: *mut fz_context,
buf: *mut fz_buffer,
data: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn fz_append_byte(ctx: *mut fz_context, buf: *mut fz_buffer, c: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_rune(ctx: *mut fz_context, buf: *mut fz_buffer, c: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_int32_le(ctx: *mut fz_context, buf: *mut fz_buffer, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_int16_le(ctx: *mut fz_context, buf: *mut fz_buffer, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_int32_be(ctx: *mut fz_context, buf: *mut fz_buffer, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_int16_be(ctx: *mut fz_context, buf: *mut fz_buffer, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_append_bits(
ctx: *mut fz_context,
buf: *mut fz_buffer,
value: ::std::os::raw::c_int,
count: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_append_bits_pad(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "fz_append_pdf_string: Append a string with PDF syntax quotes and\nescapes.\n\nThe buffer will automatically grow as required."]
pub fn fz_append_pdf_string(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
text: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "fz_append_printf: Format and append data to buffer using\nprintf-like formatting (see fz_vsnprintf).\n\nThe buffer will automatically grow as required."]
pub fn fz_append_printf(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
fmt: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
#[doc = "fz_append_vprintf: Format and append data to buffer using\nprintf-like formatting with varargs (see fz_vsnprintf)."]
pub fn fz_append_vprintf(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
fmt: *const ::std::os::raw::c_char,
args: *mut __va_list_tag,
);
}
extern "C" {
#[doc = "Zero-terminate buffer in order to use as a C string.\n\nThis byte is invisible and does not affect the length of the\nbuffer as returned by fz_buffer_storage. The zero byte is\nwritten *after* the data, and subsequent writes will overwrite\nthe terminating byte.\n\nSubsequent changes to the size of the buffer (such as by\nfz_buffer_trim, fz_buffer_grow, fz_resize_buffer, etc) may\ninvalidate this."]
pub fn fz_terminate_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Create an MD5 digest from buffer contents.\n\nNever throws exceptions."]
pub fn fz_md5_buffer(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
digest: *mut ::std::os::raw::c_uchar,
);
}
extern "C" {
#[doc = "Take ownership of buffer contents.\n\nPerforms the same task as fz_buffer_storage, but ownership of\nthe data buffer returns with this call. The buffer is left\nempty.\n\nNote: Bad things may happen if this is called on a buffer with\nmultiple references that is being used from multiple threads.\n\ndata: Pointer to place to retrieve data pointer.\n\nReturns length of stream."]
pub fn fz_buffer_extract(
ctx: *mut fz_context,
buf: *mut fz_buffer,
data: *mut *mut ::std::os::raw::c_uchar,
) -> usize;
}
extern "C" {
#[doc = "Return strlen(s), if that is less than maxlen, or maxlen if\nthere is no null byte ('\\0') among the first maxlen bytes."]
pub fn fz_strnlen(s: *const ::std::os::raw::c_char, maxlen: usize) -> usize;
}
extern "C" {
#[doc = "Given a pointer to a C string (or a pointer to NULL) break\nit at the first occurrence of a delimiter char (from a given\nset).\n\nstringp: Pointer to a C string pointer (or NULL). Updated on\nexit to point to the first char of the string after the\ndelimiter that was found. The string pointed to by stringp will\nbe corrupted by this call (as the found delimiter will be\noverwritten by 0).\n\ndelim: A C string of acceptable delimiter characters.\n\nReturns a pointer to a C string containing the chars of stringp\nup to the first delimiter char (or the end of the string), or\nNULL."]
pub fn fz_strsep(
stringp: *mut *mut ::std::os::raw::c_char,
delim: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Copy at most n-1 chars of a string into a destination\nbuffer with null termination, returning the real length of the\ninitial string (excluding terminator).\n\ndst: Destination buffer, at least n bytes long.\n\nsrc: C string (non-NULL).\n\nn: Size of dst buffer in bytes.\n\nReturns the length (excluding terminator) of src."]
pub fn fz_strlcpy(
dst: *mut ::std::os::raw::c_char,
src: *const ::std::os::raw::c_char,
n: usize,
) -> usize;
}
extern "C" {
#[doc = "Concatenate 2 strings, with a maximum length.\n\ndst: pointer to first string in a buffer of n bytes.\n\nsrc: pointer to string to concatenate.\n\nn: Size (in bytes) of buffer that dst is in.\n\nReturns the real length that a concatenated dst + src would have\nbeen (not including terminator)."]
pub fn fz_strlcat(
dst: *mut ::std::os::raw::c_char,
src: *const ::std::os::raw::c_char,
n: usize,
) -> usize;
}
extern "C" {
#[doc = "Find the start of the first occurrence of the substring needle in haystack."]
pub fn fz_memmem(
haystack: *const ::std::os::raw::c_void,
haystacklen: usize,
needle: *const ::std::os::raw::c_void,
needlelen: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "extract the directory component from a path."]
pub fn fz_dirname(
dir: *mut ::std::os::raw::c_char,
path: *const ::std::os::raw::c_char,
dirsize: usize,
);
}
extern "C" {
#[doc = "Find the filename component in a path."]
pub fn fz_basename(path: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "decode url escapes."]
pub fn fz_urldecode(url: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "create output file name using a template.\n\nIf the path contains %[0-9]*d, the first such pattern will be\nreplaced with the page number. If the template does not contain\nsuch a pattern, the page number will be inserted before the\nfilename extension. If the template does not have a filename\nextension, the page number will be added to the end."]
pub fn fz_format_output_path(
ctx: *mut fz_context,
path: *mut ::std::os::raw::c_char,
size: usize,
fmt: *const ::std::os::raw::c_char,
page: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "rewrite path to the shortest string that names the same path.\n\nEliminates multiple and trailing slashes, interprets \".\" and\n\"..\". Overwrites the string in place."]
pub fn fz_cleanname(name: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Resolve a path to an absolute file name.\nThe resolved path buffer must be of at least PATH_MAX size."]
pub fn fz_realpath(
path: *const ::std::os::raw::c_char,
resolved_path: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Case insensitive (ASCII only) string comparison."]
pub fn fz_strcasecmp(
a: *const ::std::os::raw::c_char,
b: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_strncasecmp(
a: *const ::std::os::raw::c_char,
b: *const ::std::os::raw::c_char,
n: usize,
) -> ::std::os::raw::c_int;
}
pub const FZ_UTFMAX: _bindgen_ty_4 = 4;
#[doc = "FZ_UTFMAX: Maximum number of bytes in a decoded rune (maximum\nlength returned by fz_chartorune)."]
pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "UTF8 decode a single rune from a sequence of chars.\n\nrune: Pointer to an int to assign the decoded 'rune' to.\n\nstr: Pointer to a UTF8 encoded string.\n\nReturns the number of bytes consumed."]
pub fn fz_chartorune(
rune: *mut ::std::os::raw::c_int,
str_: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "UTF8 encode a rune to a sequence of chars.\n\nstr: Pointer to a place to put the UTF8 encoded character.\n\nrune: Pointer to a 'rune'.\n\nReturns the number of bytes the rune took to output."]
pub fn fz_runetochar(
str_: *mut ::std::os::raw::c_char,
rune: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Count how many chars are required to represent a rune.\n\nrune: The rune to encode.\n\nReturns the number of bytes required to represent this run in\nUTF8."]
pub fn fz_runelen(rune: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Compute the index of a rune in a string.\n\nstr: Pointer to beginning of a string.\n\np: Pointer to a char in str.\n\nReturns the index of the rune pointed to by p in str."]
pub fn fz_runeidx(
str_: *const ::std::os::raw::c_char,
p: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Obtain a pointer to the char representing the rune\nat a given index.\n\nstr: Pointer to beginning of a string.\n\nidx: Index of a rune to return a char pointer to.\n\nReturns a pointer to the char where the desired rune starts,\nor NULL if the string ends before the index is reached."]
pub fn fz_runeptr(
str_: *const ::std::os::raw::c_char,
idx: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Count how many runes the UTF-8 encoded string\nconsists of.\n\ns: The UTF-8 encoded, NUL-terminated text string.\n\nReturns the number of runes in the string."]
pub fn fz_utflen(s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Locale-independent decimal to binary conversion. On overflow\nreturn (-)INFINITY and set errno to ERANGE. On underflow return\n0 and set errno to ERANGE. Special inputs (case insensitive):\n\"NAN\", \"INF\" or \"INFINITY\"."]
pub fn fz_strtof(s: *const ::std::os::raw::c_char, es: *mut *mut ::std::os::raw::c_char)
-> f32;
}
extern "C" {
pub fn fz_grisu(
f: f32,
s: *mut ::std::os::raw::c_char,
exp: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Check and parse string into page ranges:\n/,?(-?\\d+|N)(-(-?\\d+|N))?/"]
pub fn fz_is_page_range(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_parse_page_range(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
a: *mut ::std::os::raw::c_int,
b: *mut ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Unicode aware tolower and toupper functions."]
pub fn fz_tolower(c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_toupper(c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return true if the named file exists and is readable."]
pub fn fz_file_exists(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Open the named file and wrap it in a stream.\n\nfilename: Path to a file. On non-Windows machines the filename\nshould be exactly as it would be passed to fopen(2). On Windows\nmachines, the path should be UTF-8 encoded so that non-ASCII\ncharacters can be represented. Other platforms do the encoding\nas standard anyway (and in most cases, particularly for MacOS\nand Linux, the encoding they use is UTF-8 anyway)."]
pub fn fz_open_file(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Open a block of memory as a stream.\n\ndata: Pointer to start of data block. Ownership of the data\nblock is NOT passed in.\n\nlen: Number of bytes in data block.\n\nReturns pointer to newly created stream. May throw exceptions on\nfailure to allocate."]
pub fn fz_open_memory(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
len: usize,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Open a buffer as a stream.\n\nbuf: The buffer to open. Ownership of the buffer is NOT passed\nin (this function takes its own reference).\n\nReturns pointer to newly created stream. May throw exceptions on\nfailure to allocate."]
pub fn fz_open_buffer(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_stream;
}
extern "C" {
#[doc = "Attach a filter to a stream that will store any\ncharacters read from the stream into the supplied buffer.\n\nchain: The underlying stream to leech from.\n\nbuf: The buffer into which the read data should be appended.\nThe buffer will be resized as required.\n\nReturns pointer to newly created stream. May throw exceptions on\nfailure to allocate."]
pub fn fz_open_leecher(
ctx: *mut fz_context,
chain: *mut fz_stream,
buf: *mut fz_buffer,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Increments the reference count for a stream. Returns the same\npointer.\n\nNever throws exceptions."]
pub fn fz_keep_stream(ctx: *mut fz_context, stm: *mut fz_stream) -> *mut fz_stream;
}
extern "C" {
#[doc = "Decrements the reference count for a stream.\n\nWhen the reference count for the stream hits zero, frees the\nstorage used for the fz_stream itself, and (usually)\nreleases the underlying resources that the stream is based upon\n(depends on the method used to open the stream initially)."]
pub fn fz_drop_stream(ctx: *mut fz_context, stm: *mut fz_stream);
}
extern "C" {
#[doc = "return the current reading position within a stream"]
pub fn fz_tell(ctx: *mut fz_context, stm: *mut fz_stream) -> i64;
}
extern "C" {
#[doc = "Seek within a stream.\n\nstm: The stream to seek within.\n\noffset: The offset to seek to.\n\nwhence: From where the offset is measured (see fseek)."]
pub fn fz_seek(
ctx: *mut fz_context,
stm: *mut fz_stream,
offset: i64,
whence: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Read from a stream into a given data block.\n\nstm: The stream to read from.\n\ndata: The data block to read into.\n\nlen: The length of the data block (in bytes).\n\nReturns the number of bytes read. May throw exceptions."]
pub fn fz_read(
ctx: *mut fz_context,
stm: *mut fz_stream,
data: *mut ::std::os::raw::c_uchar,
len: usize,
) -> usize;
}
extern "C" {
#[doc = "Read from a stream discarding data.\n\nstm: The stream to read from.\n\nlen: The number of bytes to read.\n\nReturns the number of bytes read. May throw exceptions."]
pub fn fz_skip(ctx: *mut fz_context, stm: *mut fz_stream, len: usize) -> usize;
}
extern "C" {
#[doc = "Read all of a stream into a buffer.\n\nstm: The stream to read from\n\ninitial: Suggested initial size for the buffer.\n\nReturns a buffer created from reading from the stream. May throw\nexceptions on failure to allocate."]
pub fn fz_read_all(ctx: *mut fz_context, stm: *mut fz_stream, initial: usize)
-> *mut fz_buffer;
}
extern "C" {
#[doc = "Read all the contents of a file into a buffer."]
pub fn fz_read_file(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "fz_read_[u]int(16|24|32|64)(_le)?\n\nRead a 16/32/64 bit signed/unsigned integer from stream,\nin big or little-endian byte orders.\n\nThrows an exception if EOF is encountered."]
pub fn fz_read_uint16(ctx: *mut fz_context, stm: *mut fz_stream) -> u16;
}
extern "C" {
pub fn fz_read_uint24(ctx: *mut fz_context, stm: *mut fz_stream) -> u32;
}
extern "C" {
pub fn fz_read_uint32(ctx: *mut fz_context, stm: *mut fz_stream) -> u32;
}
extern "C" {
pub fn fz_read_uint64(ctx: *mut fz_context, stm: *mut fz_stream) -> u64;
}
extern "C" {
pub fn fz_read_uint16_le(ctx: *mut fz_context, stm: *mut fz_stream) -> u16;
}
extern "C" {
pub fn fz_read_uint24_le(ctx: *mut fz_context, stm: *mut fz_stream) -> u32;
}
extern "C" {
pub fn fz_read_uint32_le(ctx: *mut fz_context, stm: *mut fz_stream) -> u32;
}
extern "C" {
pub fn fz_read_uint64_le(ctx: *mut fz_context, stm: *mut fz_stream) -> u64;
}
extern "C" {
pub fn fz_read_int16(ctx: *mut fz_context, stm: *mut fz_stream) -> i16;
}
extern "C" {
pub fn fz_read_int32(ctx: *mut fz_context, stm: *mut fz_stream) -> i32;
}
extern "C" {
pub fn fz_read_int64(ctx: *mut fz_context, stm: *mut fz_stream) -> i64;
}
extern "C" {
pub fn fz_read_int16_le(ctx: *mut fz_context, stm: *mut fz_stream) -> i16;
}
extern "C" {
pub fn fz_read_int32_le(ctx: *mut fz_context, stm: *mut fz_stream) -> i32;
}
extern "C" {
pub fn fz_read_int64_le(ctx: *mut fz_context, stm: *mut fz_stream) -> i64;
}
extern "C" {
pub fn fz_read_float_le(ctx: *mut fz_context, stm: *mut fz_stream) -> f32;
}
extern "C" {
pub fn fz_read_float(ctx: *mut fz_context, stm: *mut fz_stream) -> f32;
}
extern "C" {
#[doc = "Read a null terminated string from the stream into\na buffer of a given length. The buffer will be null terminated.\nThrows on failure (including the failure to fit the entire\nstring including the terminator into the buffer)."]
pub fn fz_read_string(
ctx: *mut fz_context,
stm: *mut fz_stream,
buffer: *mut ::std::os::raw::c_char,
len: ::std::os::raw::c_int,
);
}
#[doc = "A function type for use when implementing\nfz_streams. The supplied function of this type is called\nwhenever data is required, and the current buffer is empty.\n\nstm: The stream to operate on.\n\nmax: a hint as to the maximum number of bytes that the caller\nneeds to be ready immediately. Can safely be ignored.\n\nReturns -1 if there is no more data in the stream. Otherwise,\nthe function should find its internal state using stm->state,\nrefill its buffer, update stm->rp and stm->wp to point to the\nstart and end of the new data respectively, and then\n\"return *stm->rp++\"."]
pub type fz_stream_next_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
stm: *mut fz_stream,
max: usize,
) -> ::std::os::raw::c_int,
>;
#[doc = "A function type for use when implementing\nfz_streams. The supplied function of this type is called\nwhen the stream is dropped, to release the stream specific\nstate information.\n\nstate: The stream state to release."]
pub type fz_stream_drop_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, state: *mut ::std::os::raw::c_void),
>;
#[doc = "A function type for use when implementing\nfz_streams. The supplied function of this type is called when\nfz_seek is requested, and the arguments are as defined for\nfz_seek.\n\nThe stream can find it's private state in stm->state."]
pub type fz_stream_seek_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
stm: *mut fz_stream,
offset: i64,
whence: ::std::os::raw::c_int,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stream {
pub refs: ::std::os::raw::c_int,
pub error: ::std::os::raw::c_int,
pub eof: ::std::os::raw::c_int,
pub progressive: ::std::os::raw::c_int,
pub pos: i64,
pub avail: ::std::os::raw::c_int,
pub bits: ::std::os::raw::c_int,
pub rp: *mut ::std::os::raw::c_uchar,
pub wp: *mut ::std::os::raw::c_uchar,
pub state: *mut ::std::os::raw::c_void,
pub next: fz_stream_next_fn,
pub drop: fz_stream_drop_fn,
pub seek: fz_stream_seek_fn,
}
#[test]
fn bindgen_test_layout_fz_stream() {
const UNINIT: ::std::mem::MaybeUninit<fz_stream> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stream>(),
80usize,
concat!("Size of: ", stringify!(fz_stream))
);
assert_eq!(
::std::mem::align_of::<fz_stream>(),
8usize,
concat!("Alignment of ", stringify!(fz_stream))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eof) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(eof)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).progressive) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(progressive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(pos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).avail) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(avail)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(bits)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rp) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(rp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wp) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(wp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(seek)
)
);
}
extern "C" {
#[doc = "Create a new stream object with the given\ninternal state and function pointers.\n\nstate: Internal state (opaque to everything but implementation).\n\nnext: Should provide the next set of bytes (up to max) of stream\ndata. Return the number of bytes read, or EOF when there is no\nmore data.\n\ndrop: Should clean up and free the internal state. May not\nthrow exceptions."]
pub fn fz_new_stream(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
next: fz_stream_next_fn,
drop: fz_stream_drop_fn,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Attempt to read a stream into a buffer. If truncated\nis NULL behaves as fz_read_all, sets a truncated flag in case of\nerror.\n\nstm: The stream to read from.\n\ninitial: Suggested initial size for the buffer.\n\ntruncated: Flag to store success/failure indication in.\n\nworst_case: 0 for unknown, otherwise an upper bound for the\nsize of the stream.\n\nReturns a buffer created from reading from the stream."]
pub fn fz_read_best(
ctx: *mut fz_context,
stm: *mut fz_stream,
initial: usize,
truncated: *mut ::std::os::raw::c_int,
worst_case: usize,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Read a line from stream into the buffer until either a\nterminating newline or EOF, which it replaces with a null byte\n('\\0').\n\nReturns buf on success, and NULL when end of file occurs while\nno characters have been read."]
pub fn fz_read_line(
ctx: *mut fz_context,
stm: *mut fz_stream,
buf: *mut ::std::os::raw::c_char,
max: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Skip over a given string in a stream. Return 0 if successfully\nskipped, non-zero otherwise. As many characters will be skipped\nover as matched in the string."]
pub fn fz_skip_string(
ctx: *mut fz_context,
stm: *mut fz_stream,
str_: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Skip over whitespace (bytes <= 32) in a stream."]
pub fn fz_skip_space(ctx: *mut fz_context, stm: *mut fz_stream);
}
extern "C" {
#[doc = "Create a stream from a FILE * that will not be closed\nwhen the stream is dropped."]
pub fn fz_open_file_ptr_no_close(ctx: *mut fz_context, file: *mut FILE) -> *mut fz_stream;
}
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called\nwhenever data is written to the output.\n\nstate: The state for the output stream.\n\ndata: a pointer to a buffer of data to write.\n\nn: The number of bytes of data to write."]
pub type fz_output_write_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
data: *const ::std::os::raw::c_void,
n: usize,
),
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called when\nfz_seek_output is requested.\n\nstate: The output stream state to seek within.\n\noffset, whence: as defined for fs_seek_output."]
pub type fz_output_seek_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
offset: i64,
whence: ::std::os::raw::c_int,
),
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called when\nfz_tell_output is requested.\n\nstate: The output stream state to report on.\n\nReturns the offset within the output stream."]
pub type fz_output_tell_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, state: *mut ::std::os::raw::c_void) -> i64,
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called\nwhen the output stream is closed, to flush any pending writes."]
pub type fz_output_close_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, state: *mut ::std::os::raw::c_void),
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called\nwhen the output stream is dropped, to release the stream\nspecific state information."]
pub type fz_output_drop_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, state: *mut ::std::os::raw::c_void),
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called\nwhen the fz_stream_from_output is called."]
pub type fz_stream_from_output_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
) -> *mut fz_stream,
>;
#[doc = "A function type for use when implementing\nfz_outputs. The supplied function of this type is called\nwhen fz_truncate_output is called to truncate the file\nat that point."]
pub type fz_truncate_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, state: *mut ::std::os::raw::c_void),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_output {
pub state: *mut ::std::os::raw::c_void,
pub write: fz_output_write_fn,
pub seek: fz_output_seek_fn,
pub tell: fz_output_tell_fn,
pub close: fz_output_close_fn,
pub drop: fz_output_drop_fn,
pub as_stream: fz_stream_from_output_fn,
pub truncate: fz_truncate_fn,
pub bp: *mut ::std::os::raw::c_char,
pub wp: *mut ::std::os::raw::c_char,
pub ep: *mut ::std::os::raw::c_char,
pub buffered: ::std::os::raw::c_int,
pub bits: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_output() {
const UNINIT: ::std::mem::MaybeUninit<fz_output> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_output>(),
96usize,
concat!("Size of: ", stringify!(fz_output))
);
assert_eq!(
::std::mem::align_of::<fz_output>(),
8usize,
concat!("Alignment of ", stringify!(fz_output))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).seek) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(seek)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tell) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(tell)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(close)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_stream) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(as_stream)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).truncate) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(truncate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(bp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wp) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(wp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ep) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(ep)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffered) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(buffered)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(bits)
)
);
}
extern "C" {
#[doc = "Create a new output object with the given\ninternal state and function pointers.\n\nstate: Internal state (opaque to everything but implementation).\n\nwrite: Function to output a given buffer.\n\nclose: Cleanup function to destroy state when output closed.\nMay permissibly be null."]
pub fn fz_new_output(
ctx: *mut fz_context,
bufsiz: ::std::os::raw::c_int,
state: *mut ::std::os::raw::c_void,
write: fz_output_write_fn,
close: fz_output_close_fn,
drop: fz_output_drop_fn,
) -> *mut fz_output;
}
extern "C" {
#[doc = "Open an output stream that writes to a\ngiven path.\n\nfilename: The filename to write to (specified in UTF-8).\n\nappend: non-zero if we should append to the file, rather than\noverwriting it."]
pub fn fz_new_output_with_path(
arg1: *mut fz_context,
filename: *const ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
) -> *mut fz_output;
}
extern "C" {
#[doc = "Open an output stream that appends\nto a buffer.\n\nbuf: The buffer to append to."]
pub fn fz_new_output_with_buffer(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_output;
}
extern "C" {
#[doc = "Retrieve an fz_output that directs to stdout.\n\nOptionally may be fz_dropped when finished with."]
pub fn fz_stdout(ctx: *mut fz_context) -> *mut fz_output;
}
extern "C" {
#[doc = "Retrieve an fz_output that directs to stdout.\n\nOptionally may be fz_dropped when finished with."]
pub fn fz_stderr(ctx: *mut fz_context) -> *mut fz_output;
}
extern "C" {
#[doc = "Set the output stream to be used for fz_stddbg. Set to NULL to\nreset to default (stderr)."]
pub fn fz_set_stddbg(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Retrieve an fz_output for the default debugging stream. On\nWindows this will be OutputDebugString for non-console apps.\nOtherwise, it is always fz_stderr.\n\nOptionally may be fz_dropped when finished with."]
pub fn fz_stddbg(ctx: *mut fz_context) -> *mut fz_output;
}
extern "C" {
#[doc = "Format and write data to an output stream.\nSee fz_format_string for formatting details."]
pub fn fz_write_printf(
ctx: *mut fz_context,
out: *mut fz_output,
fmt: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
#[doc = "va_list version of fz_write_printf."]
pub fn fz_write_vprintf(
ctx: *mut fz_context,
out: *mut fz_output,
fmt: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
);
}
extern "C" {
#[doc = "Seek to the specified file position.\nSee fseek for arguments.\n\nThrow an error on unseekable outputs."]
pub fn fz_seek_output(
ctx: *mut fz_context,
out: *mut fz_output,
off: i64,
whence: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Return the current file position.\n\nThrow an error on untellable outputs."]
pub fn fz_tell_output(ctx: *mut fz_context, out: *mut fz_output) -> i64;
}
extern "C" {
#[doc = "Flush unwritten data."]
pub fn fz_flush_output(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Flush pending output and close an output stream."]
pub fn fz_close_output(arg1: *mut fz_context, arg2: *mut fz_output);
}
extern "C" {
#[doc = "Free an output stream. Don't forget to close it first!"]
pub fn fz_drop_output(arg1: *mut fz_context, arg2: *mut fz_output);
}
extern "C" {
#[doc = "Query whether a given fz_output supports fz_stream_from_output."]
pub fn fz_output_supports_stream(
ctx: *mut fz_context,
out: *mut fz_output,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Obtain the fz_output in the form of a fz_stream.\n\nThis allows data to be read back from some forms of fz_output\nobject. When finished reading, the fz_stream should be released\nby calling fz_drop_stream. Until the fz_stream is dropped, no\nfurther operations should be performed on the fz_output object."]
pub fn fz_stream_from_output(arg1: *mut fz_context, arg2: *mut fz_output) -> *mut fz_stream;
}
extern "C" {
#[doc = "Truncate the output at the current position.\n\nThis allows output streams which have seeked back from the end\nof their storage to be truncated at the current point."]
pub fn fz_truncate_output(arg1: *mut fz_context, arg2: *mut fz_output);
}
extern "C" {
#[doc = "Write data to output.\n\ndata: Pointer to data to write.\nsize: Size of data to write in bytes."]
pub fn fz_write_data(
ctx: *mut fz_context,
out: *mut fz_output,
data: *const ::std::os::raw::c_void,
size: usize,
);
}
extern "C" {
pub fn fz_write_buffer(ctx: *mut fz_context, out: *mut fz_output, data: *mut fz_buffer);
}
extern "C" {
#[doc = "Write a string. Does not write zero terminator."]
pub fn fz_write_string(
ctx: *mut fz_context,
out: *mut fz_output,
s: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write different sized data to an output stream."]
pub fn fz_write_int32_be(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_write_int32_le(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_write_uint32_be(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_uint);
}
extern "C" {
pub fn fz_write_uint32_le(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_uint);
}
extern "C" {
pub fn fz_write_int16_be(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_write_int16_le(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn fz_write_uint16_be(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_uint);
}
extern "C" {
pub fn fz_write_uint16_le(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_uint);
}
extern "C" {
pub fn fz_write_char(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_char);
}
extern "C" {
pub fn fz_write_byte(ctx: *mut fz_context, out: *mut fz_output, x: ::std::os::raw::c_uchar);
}
extern "C" {
pub fn fz_write_float_be(ctx: *mut fz_context, out: *mut fz_output, f: f32);
}
extern "C" {
pub fn fz_write_float_le(ctx: *mut fz_context, out: *mut fz_output, f: f32);
}
extern "C" {
#[doc = "Write a UTF-8 encoded unicode character."]
pub fn fz_write_rune(ctx: *mut fz_context, out: *mut fz_output, rune: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Write a base64 encoded data block, optionally with periodic\nnewlines."]
pub fn fz_write_base64(
ctx: *mut fz_context,
out: *mut fz_output,
data: *const ::std::os::raw::c_uchar,
size: usize,
newline: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Write a base64 encoded fz_buffer, optionally with periodic\nnewlines."]
pub fn fz_write_base64_buffer(
ctx: *mut fz_context,
out: *mut fz_output,
data: *mut fz_buffer,
newline: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Write num_bits of data to the end of the output stream, assumed to be packed\nmost significant bits first."]
pub fn fz_write_bits(
ctx: *mut fz_context,
out: *mut fz_output,
data: ::std::os::raw::c_uint,
num_bits: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Sync to byte boundary after writing bits."]
pub fn fz_write_bits_sync(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Our customised 'printf'-like string formatter.\nTakes %c, %d, %s, %u, %x, as usual.\nModifiers are not supported except for zero-padding ints (e.g.\n%02d, %03u, %04x, etc).\n%g output in \"as short as possible hopefully lossless\nnon-exponent\" form, see fz_ftoa for specifics.\n%f and %e output as usual.\n%C outputs a utf8 encoded int.\n%M outputs a fz_matrix*.\n%R outputs a fz_rect*.\n%P outputs a fz_point*.\n%n outputs a PDF name (with appropriate escaping).\n%q and %( output escaped strings in C/PDF syntax.\n%l{d,u,x} indicates that the values are int64_t.\n%z{d,u,x} indicates that the value is a size_t.\n\nuser: An opaque pointer that is passed to the emit function.\n\nemit: A function pointer called to emit output bytes as the\nstring is being formatted."]
pub fn fz_format_string(
ctx: *mut fz_context,
user: *mut ::std::os::raw::c_void,
emit: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
user: *mut ::std::os::raw::c_void,
c: ::std::os::raw::c_int,
),
>,
fmt: *const ::std::os::raw::c_char,
args: *mut __va_list_tag,
);
}
extern "C" {
#[doc = "A vsnprintf work-alike, using our custom formatter."]
pub fn fz_vsnprintf(
buffer: *mut ::std::os::raw::c_char,
space: usize,
fmt: *const ::std::os::raw::c_char,
args: *mut __va_list_tag,
) -> usize;
}
extern "C" {
#[doc = "The non va_list equivalent of fz_vsnprintf."]
pub fn fz_snprintf(
buffer: *mut ::std::os::raw::c_char,
space: usize,
fmt: *const ::std::os::raw::c_char,
...
) -> usize;
}
extern "C" {
#[doc = "Allocated sprintf.\n\nReturns a null terminated allocated block containing the\nformatted version of the format string/args."]
pub fn fz_asprintf(
ctx: *mut fz_context,
fmt: *const ::std::os::raw::c_char,
...
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Save the contents of a buffer to a file."]
pub fn fz_save_buffer(
ctx: *mut fz_context,
buf: *mut fz_buffer,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Compression and other filtering outputs.\n\nThese outputs write encoded data to another output. Create a\nfilter output with the destination, write to the filter, then\nclose and drop it when you're done. These can also be chained\ntogether, for example to write ASCII Hex encoded, Deflate\ncompressed, and RC4 encrypted data to a buffer output.\n\nOutput streams don't use reference counting, so make sure to\nclose all of the filters in the reverse order of creation so\nthat data is flushed properly.\n\nAccordingly, ownership of 'chain' is never passed into the\nfollowing functions, but remains with the caller, whose\nresponsibility it is to ensure they exist at least until\nthe returned fz_output is dropped."]
pub fn fz_new_asciihex_output(ctx: *mut fz_context, chain: *mut fz_output) -> *mut fz_output;
}
extern "C" {
pub fn fz_new_ascii85_output(ctx: *mut fz_context, chain: *mut fz_output) -> *mut fz_output;
}
extern "C" {
pub fn fz_new_rle_output(ctx: *mut fz_context, chain: *mut fz_output) -> *mut fz_output;
}
extern "C" {
pub fn fz_new_arc4_output(
ctx: *mut fz_context,
chain: *mut fz_output,
key: *mut ::std::os::raw::c_uchar,
keylen: usize,
) -> *mut fz_output;
}
extern "C" {
pub fn fz_new_deflate_output(
ctx: *mut fz_context,
chain: *mut fz_output,
effort: ::std::os::raw::c_int,
raw: ::std::os::raw::c_int,
) -> *mut fz_output;
}
extern "C" {
#[doc = "Output a line to the log."]
pub fn fz_log(ctx: *mut fz_context, fmt: *const ::std::os::raw::c_char, ...);
}
extern "C" {
#[doc = "Output a line to the log for a given module."]
pub fn fz_log_module(
ctx: *mut fz_context,
module: *const ::std::os::raw::c_char,
fmt: *const ::std::os::raw::c_char,
...
);
}
extern "C" {
#[doc = "Internal function to actually do the opening of the logfile.\n\nCaller should close/drop the output when finished with it."]
pub fn fz_new_log_for_module(
ctx: *mut fz_context,
module: *const ::std::os::raw::c_char,
) -> *mut fz_output;
}
#[doc = "Structure definition is public to enable stack\nbased allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_md5 {
pub lo: u32,
pub hi: u32,
pub a: u32,
pub b: u32,
pub c: u32,
pub d: u32,
pub buffer: [::std::os::raw::c_uchar; 64usize],
}
#[test]
fn bindgen_test_layout_fz_md5() {
const UNINIT: ::std::mem::MaybeUninit<fz_md5> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_md5>(),
88usize,
concat!("Size of: ", stringify!(fz_md5))
);
assert_eq!(
::std::mem::align_of::<fz_md5>(),
4usize,
concat!("Alignment of ", stringify!(fz_md5))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lo) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(lo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hi) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(hi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize },
8usize,
concat!("Offset of field: ", stringify!(fz_md5), "::", stringify!(a))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
12usize,
concat!("Offset of field: ", stringify!(fz_md5), "::", stringify!(b))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
16usize,
concat!("Offset of field: ", stringify!(fz_md5), "::", stringify!(c))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize },
20usize,
concat!("Offset of field: ", stringify!(fz_md5), "::", stringify!(d))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "MD5 initialization. Begins an MD5 operation, writing a new\ncontext.\n\nNever throws an exception."]
pub fn fz_md5_init(state: *mut fz_md5);
}
extern "C" {
#[doc = "MD5 block update operation. Continues an MD5 message-digest\noperation, processing another message block, and updating the\ncontext.\n\nNever throws an exception."]
pub fn fz_md5_update(state: *mut fz_md5, input: *const ::std::os::raw::c_uchar, inlen: usize);
}
extern "C" {
#[doc = "MD5 block update operation. Continues an MD5 message-digest\noperation, processing an int64, and updating the context.\n\nNever throws an exception."]
pub fn fz_md5_update_int64(state: *mut fz_md5, i: i64);
}
extern "C" {
#[doc = "MD5 finalization. Ends an MD5 message-digest operation, writing\nthe message digest and zeroizing the context.\n\nNever throws an exception."]
pub fn fz_md5_final(state: *mut fz_md5, digest: *mut ::std::os::raw::c_uchar);
}
#[doc = "Structure definition is public to enable stack\nbased allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_sha256 {
pub state: [::std::os::raw::c_uint; 8usize],
pub count: [::std::os::raw::c_uint; 2usize],
pub buffer: fz_sha256__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_sha256__bindgen_ty_1 {
pub u8_: [::std::os::raw::c_uchar; 64usize],
pub u32_: [::std::os::raw::c_uint; 16usize],
}
#[test]
fn bindgen_test_layout_fz_sha256__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_sha256__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_sha256__bindgen_ty_1>(),
64usize,
concat!("Size of: ", stringify!(fz_sha256__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_sha256__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(fz_sha256__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256__bindgen_ty_1),
"::",
stringify!(u8_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u32_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256__bindgen_ty_1),
"::",
stringify!(u32_)
)
);
}
#[test]
fn bindgen_test_layout_fz_sha256() {
const UNINIT: ::std::mem::MaybeUninit<fz_sha256> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_sha256>(),
104usize,
concat!("Size of: ", stringify!(fz_sha256))
);
assert_eq!(
::std::mem::align_of::<fz_sha256>(),
4usize,
concat!("Alignment of ", stringify!(fz_sha256))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "SHA256 initialization. Begins an SHA256 operation, initialising\nthe supplied context.\n\nNever throws an exception."]
pub fn fz_sha256_init(state: *mut fz_sha256);
}
extern "C" {
#[doc = "SHA256 block update operation. Continues an SHA256 message-\ndigest operation, processing another message block, and updating\nthe context.\n\nNever throws an exception."]
pub fn fz_sha256_update(
state: *mut fz_sha256,
input: *const ::std::os::raw::c_uchar,
inlen: usize,
);
}
extern "C" {
#[doc = "MD5 finalization. Ends an MD5 message-digest operation, writing\nthe message digest and zeroizing the context.\n\nNever throws an exception."]
pub fn fz_sha256_final(state: *mut fz_sha256, digest: *mut ::std::os::raw::c_uchar);
}
#[doc = "Structure definition is public to enable stack\nbased allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_sha512 {
pub state: [u64; 8usize],
pub count: [::std::os::raw::c_uint; 2usize],
pub buffer: fz_sha512__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_sha512__bindgen_ty_1 {
pub u8_: [::std::os::raw::c_uchar; 128usize],
pub u64_: [u64; 16usize],
}
#[test]
fn bindgen_test_layout_fz_sha512__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_sha512__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_sha512__bindgen_ty_1>(),
128usize,
concat!("Size of: ", stringify!(fz_sha512__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_sha512__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(fz_sha512__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u8_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512__bindgen_ty_1),
"::",
stringify!(u8_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u64_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512__bindgen_ty_1),
"::",
stringify!(u64_)
)
);
}
#[test]
fn bindgen_test_layout_fz_sha512() {
const UNINIT: ::std::mem::MaybeUninit<fz_sha512> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_sha512>(),
200usize,
concat!("Size of: ", stringify!(fz_sha512))
);
assert_eq!(
::std::mem::align_of::<fz_sha512>(),
8usize,
concat!("Alignment of ", stringify!(fz_sha512))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "SHA512 initialization. Begins an SHA512 operation, initialising\nthe supplied context.\n\nNever throws an exception."]
pub fn fz_sha512_init(state: *mut fz_sha512);
}
extern "C" {
#[doc = "SHA512 block update operation. Continues an SHA512 message-\ndigest operation, processing another message block, and updating\nthe context.\n\nNever throws an exception."]
pub fn fz_sha512_update(
state: *mut fz_sha512,
input: *const ::std::os::raw::c_uchar,
inlen: usize,
);
}
extern "C" {
#[doc = "SHA512 finalization. Ends an SHA512 message-digest operation,\nwriting the message digest and zeroizing the context.\n\nNever throws an exception."]
pub fn fz_sha512_final(state: *mut fz_sha512, digest: *mut ::std::os::raw::c_uchar);
}
#[doc = "Structure definition is public to enable stack\nbased allocation. Do not access the members directly."]
pub type fz_sha384 = fz_sha512;
extern "C" {
#[doc = "SHA384 initialization. Begins an SHA384 operation, initialising\nthe supplied context.\n\nNever throws an exception."]
pub fn fz_sha384_init(state: *mut fz_sha384);
}
extern "C" {
#[doc = "SHA384 block update operation. Continues an SHA384 message-\ndigest operation, processing another message block, and updating\nthe context.\n\nNever throws an exception."]
pub fn fz_sha384_update(
state: *mut fz_sha384,
input: *const ::std::os::raw::c_uchar,
inlen: usize,
);
}
extern "C" {
#[doc = "SHA384 finalization. Ends an SHA384 message-digest operation,\nwriting the message digest and zeroizing the context.\n\nNever throws an exception."]
pub fn fz_sha384_final(state: *mut fz_sha384, digest: *mut ::std::os::raw::c_uchar);
}
#[doc = "Structure definition is public to enable stack\nbased allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_arc4 {
pub x: ::std::os::raw::c_uint,
pub y: ::std::os::raw::c_uint,
pub state: [::std::os::raw::c_uchar; 256usize],
}
#[test]
fn bindgen_test_layout_fz_arc4() {
const UNINIT: ::std::mem::MaybeUninit<fz_arc4> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_arc4>(),
264usize,
concat!("Size of: ", stringify!(fz_arc4))
);
assert_eq!(
::std::mem::align_of::<fz_arc4>(),
4usize,
concat!("Alignment of ", stringify!(fz_arc4))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(state)
)
);
}
extern "C" {
#[doc = "RC4 initialization. Begins an RC4 operation, writing a new\ncontext.\n\nNever throws an exception."]
pub fn fz_arc4_init(state: *mut fz_arc4, key: *const ::std::os::raw::c_uchar, len: usize);
}
extern "C" {
#[doc = "RC4 block encrypt operation; encrypt src into dst (both of\nlength len) updating the RC4 state as we go.\n\nNever throws an exception."]
pub fn fz_arc4_encrypt(
state: *mut fz_arc4,
dest: *mut ::std::os::raw::c_uchar,
src: *const ::std::os::raw::c_uchar,
len: usize,
);
}
extern "C" {
#[doc = "RC4 finalization. Zero the context.\n\nNever throws an exception."]
pub fn fz_arc4_final(state: *mut fz_arc4);
}
#[doc = "Structure definitions are public to enable stack\nbased allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_aes {
pub nr: ::std::os::raw::c_int,
pub rk: *mut u32,
pub buf: [u32; 68usize],
}
#[test]
fn bindgen_test_layout_fz_aes() {
const UNINIT: ::std::mem::MaybeUninit<fz_aes> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_aes>(),
288usize,
concat!("Size of: ", stringify!(fz_aes))
);
assert_eq!(
::std::mem::align_of::<fz_aes>(),
8usize,
concat!("Alignment of ", stringify!(fz_aes))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(nr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rk) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(rk)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(buf)
)
);
}
extern "C" {
#[doc = "AES encryption intialisation. Fills in the supplied context\nand prepares for encryption using the given key.\n\nReturns non-zero for error (key size other than 128/192/256).\n\nNever throws an exception."]
pub fn fz_aes_setkey_enc(
ctx: *mut fz_aes,
key: *const ::std::os::raw::c_uchar,
keysize: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "AES decryption intialisation. Fills in the supplied context\nand prepares for decryption using the given key.\n\nReturns non-zero for error (key size other than 128/192/256).\n\nNever throws an exception."]
pub fn fz_aes_setkey_dec(
ctx: *mut fz_aes,
key: *const ::std::os::raw::c_uchar,
keysize: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "AES block processing. Encrypts or Decrypts (according to mode,\nwhich must match what was initially set up) length bytes (which\nmust be a multiple of 16), using (and modifying) the insertion\nvector iv, reading from input, and writing to output.\n\nNever throws an exception."]
pub fn fz_aes_crypt_cbc(
ctx: *mut fz_aes,
mode: ::std::os::raw::c_int,
length: usize,
iv: *mut ::std::os::raw::c_uchar,
input: *const ::std::os::raw::c_uchar,
output: *mut ::std::os::raw::c_uchar,
);
}
extern "C" {
#[doc = "Simple functions/variables for use in tools."]
pub fn fz_getopt(
nargc: ::std::os::raw::c_int,
nargv: *const *mut ::std::os::raw::c_char,
ostr: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub static mut fz_optind: ::std::os::raw::c_int;
}
extern "C" {
pub static mut fz_optarg: *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_hash_table {
_unused: [u8; 0],
}
#[doc = "Function type called when a hash table entry is dropped.\n\nOnly used when the entire hash table is dropped."]
pub type fz_hash_table_drop_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, val: *mut ::std::os::raw::c_void),
>;
extern "C" {
#[doc = "Create a new hash table.\n\ninitialsize: The initial size of the hashtable. The hashtable\nmay grow (double in size) if it starts to get crowded (80%\nfull).\n\nkeylen: byte length for each key.\n\nlock: -1 for no lock, otherwise the FZ_LOCK to use to protect\nthis table.\n\ndrop_val: Function to use to destroy values on table drop."]
pub fn fz_new_hash_table(
ctx: *mut fz_context,
initialsize: ::std::os::raw::c_int,
keylen: ::std::os::raw::c_int,
lock: ::std::os::raw::c_int,
drop_val: fz_hash_table_drop_fn,
) -> *mut fz_hash_table;
}
extern "C" {
#[doc = "Destroy the hash table.\n\nValues are dropped using the drop function."]
pub fn fz_drop_hash_table(ctx: *mut fz_context, table: *mut fz_hash_table);
}
extern "C" {
#[doc = "Search for a matching hash within the table, and return the\nassociated value."]
pub fn fz_hash_find(
ctx: *mut fz_context,
table: *mut fz_hash_table,
key: *const ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Insert a new key/value pair into the hash table.\n\nIf an existing entry with the same key is found, no change is\nmade to the hash table, and a pointer to the existing value is\nreturned.\n\nIf no existing entry with the same key is found, ownership of\nval passes in, key is copied, and NULL is returned."]
pub fn fz_hash_insert(
ctx: *mut fz_context,
table: *mut fz_hash_table,
key: *const ::std::os::raw::c_void,
val: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Remove the entry for a given key.\n\nThe value is NOT freed, so the caller is expected to take care\nof this."]
pub fn fz_hash_remove(
ctx: *mut fz_context,
table: *mut fz_hash_table,
key: *const ::std::os::raw::c_void,
);
}
#[doc = "Callback function called on each key/value pair in the hash\ntable, when fz_hash_for_each is run."]
pub type fz_hash_table_for_each_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
key: *mut ::std::os::raw::c_void,
keylen: ::std::os::raw::c_int,
val: *mut ::std::os::raw::c_void,
),
>;
extern "C" {
#[doc = "Iterate over the entries in a hash table."]
pub fn fz_hash_for_each(
ctx: *mut fz_context,
table: *mut fz_hash_table,
state: *mut ::std::os::raw::c_void,
callback: fz_hash_table_for_each_fn,
);
}
#[doc = "Callback function called on each key/value pair in the hash\ntable, when fz_hash_filter is run to remove entries where the\ncallback returns true."]
pub type fz_hash_table_filter_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
state: *mut ::std::os::raw::c_void,
key: *mut ::std::os::raw::c_void,
keylen: ::std::os::raw::c_int,
val: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
#[doc = "Iterate over the entries in a hash table, removing all the ones where callback returns true.\nDoes NOT free the value of the entry, so the caller is expected to take care of this."]
pub fn fz_hash_filter(
ctx: *mut fz_context,
table: *mut fz_hash_table,
state: *mut ::std::os::raw::c_void,
callback: fz_hash_table_filter_fn,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pool {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Create a new pool to allocate from."]
pub fn fz_new_pool(ctx: *mut fz_context) -> *mut fz_pool;
}
extern "C" {
#[doc = "Allocate a block of size bytes from the pool."]
pub fn fz_pool_alloc(
ctx: *mut fz_context,
pool: *mut fz_pool,
size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "strdup equivalent allocating from the pool."]
pub fn fz_pool_strdup(
ctx: *mut fz_context,
pool: *mut fz_pool,
s: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "The current size of the pool.\n\nThe number of bytes of storage currently allocated to the pool.\nThis is the total of the storage used for the blocks making\nup the pool, rather then total of the allocated blocks so far,\nso it will increase in 'lumps'.\nfrom the pool, then the pool size may still be X"]
pub fn fz_pool_size(ctx: *mut fz_context, pool: *mut fz_pool) -> usize;
}
extern "C" {
#[doc = "Drop a pool, freeing and invalidating all storage returned from\nthe pool."]
pub fn fz_drop_pool(ctx: *mut fz_context, pool: *mut fz_pool);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_tree {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Look for the value of a node in the tree with the given key.\n\nSimple pointer equivalence is used for key.\n\nReturns NULL for no match."]
pub fn fz_tree_lookup(
ctx: *mut fz_context,
node: *mut fz_tree,
key: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Insert a new key/value pair and rebalance the tree.\nReturn the new root of the tree after inserting and rebalancing.\nMay be called with a NULL root to create a new tree.\n\nNo data is copied into the tree structure; key and value are\nmerely kept as pointers."]
pub fn fz_tree_insert(
ctx: *mut fz_context,
root: *mut fz_tree,
key: *const ::std::os::raw::c_char,
value: *mut ::std::os::raw::c_void,
) -> *mut fz_tree;
}
extern "C" {
#[doc = "Drop the tree.\n\nThe storage used by the tree is freed, and each value has\ndropfunc called on it."]
pub fn fz_drop_tree(
ctx: *mut fz_context,
node: *mut fz_tree,
dropfunc: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, value: *mut ::std::os::raw::c_void),
>,
);
}
pub const fz_bidi_direction_FZ_BIDI_LTR: fz_bidi_direction = 0;
pub const fz_bidi_direction_FZ_BIDI_RTL: fz_bidi_direction = 1;
pub const fz_bidi_direction_FZ_BIDI_NEUTRAL: fz_bidi_direction = 2;
pub type fz_bidi_direction = ::std::os::raw::c_uint;
pub const fz_bidi_flags_FZ_BIDI_CLASSIFY_WHITE_SPACE: fz_bidi_flags = 1;
pub const fz_bidi_flags_FZ_BIDI_REPLACE_TAB: fz_bidi_flags = 2;
pub type fz_bidi_flags = ::std::os::raw::c_uint;
#[doc = "Prototype for callback function supplied to fz_bidi_fragment_text.\n\n@param\tfragment\tfirst character in fragment\n@param\tfragmentLen\tnumber of characters in fragment\n@param\tbidiLevel\tThe bidirectional level for this text.\nThe bottom bit will be set iff block\nshould concatenate with other blocks as\nright-to-left\n@param\tscript\t\tthe script in use for this fragment (other\nthan common or inherited)\n@param\targ\t\tdata from caller of Bidi_fragmentText"]
pub type fz_bidi_fragment_fn = ::std::option::Option<
unsafe extern "C" fn(
fragment: *const u32,
fragmentLen: usize,
bidiLevel: ::std::os::raw::c_int,
script: ::std::os::raw::c_int,
arg: *mut ::std::os::raw::c_void,
),
>;
extern "C" {
#[doc = "Partitions the given Unicode sequence into one or more\nunidirectional fragments and invokes the given callback\nfunction for each fragment.\n\nFor example, if directionality of text is:\n0123456789\nrrlllrrrrr,\nwe'll invoke callback with:\n&text[0], length == 2\n&text[2], length == 3\n&text[5], length == 5\n\n@param[in] text\tstart of Unicode sequence\n@param[in] textlen number of Unicodes to analyse\n@param[in] baseDir direction of paragraph (specify FZ_BIDI_NEUTRAL to force auto-detection)\n@param[in] callback function to be called for each fragment\n@param[in] arg\tdata to be passed to the callback function\n@param[in] flags flags to control operation (see fz_bidi_flags above)"]
pub fn fz_bidi_fragment_text(
ctx: *mut fz_context,
text: *const u32,
textlen: usize,
baseDir: *mut fz_bidi_direction,
callback: fz_bidi_fragment_fn,
arg: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_int,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_xml {
_unused: [u8; 0],
}
pub type fz_xml_doc = fz_xml;
extern "C" {
#[doc = "Parse the contents of buffer into a tree of xml nodes.\n\npreserve_white: whether to keep or delete all-whitespace nodes."]
pub fn fz_parse_xml(
ctx: *mut fz_context,
buf: *mut fz_buffer,
preserve_white: ::std::os::raw::c_int,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Parse the contents of a buffer into a tree of XML nodes,\nusing the HTML5 parsing algorithm."]
pub fn fz_parse_xml_from_html5(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_xml;
}
extern "C" {
#[doc = "Add a reference to the XML."]
pub fn fz_keep_xml(ctx: *mut fz_context, xml: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Drop a reference to the XML. When the last reference is\ndropped, the node and all its children and siblings will\nbe freed."]
pub fn fz_drop_xml(ctx: *mut fz_context, xml: *mut fz_xml);
}
extern "C" {
#[doc = "Detach a node from the tree, unlinking it from its parent,\nand setting the document root to the node."]
pub fn fz_detach_xml(ctx: *mut fz_context, node: *mut fz_xml);
}
extern "C" {
#[doc = "Return the topmost XML node of a document."]
pub fn fz_xml_root(xml: *mut fz_xml_doc) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return previous sibling of XML node."]
pub fn fz_xml_prev(item: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return next sibling of XML node."]
pub fn fz_xml_next(item: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return parent of XML node."]
pub fn fz_xml_up(item: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return first child of XML node."]
pub fn fz_xml_down(item: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return true if the tag name matches."]
pub fn fz_xml_is_tag(
item: *mut fz_xml,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return tag of XML node. Return NULL for text nodes."]
pub fn fz_xml_tag(item: *mut fz_xml) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Return the value of an attribute of an XML node.\nNULL if the attribute doesn't exist."]
pub fn fz_xml_att(
item: *mut fz_xml,
att: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Return the value of an attribute of an XML node.\nIf the first attribute doesn't exist, try the second.\nNULL if neither attribute exists."]
pub fn fz_xml_att_alt(
item: *mut fz_xml,
one: *const ::std::os::raw::c_char,
two: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Check for a matching attribute on an XML node.\n\nIf the node has the requested attribute (name), and the value\nmatches (match) then return 1. Otherwise, 0."]
pub fn fz_xml_att_eq(
item: *mut fz_xml,
name: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Add an attribute to an XML node."]
pub fn fz_xml_add_att(
ctx: *mut fz_context,
pool: *mut fz_pool,
node: *mut fz_xml,
key: *const ::std::os::raw::c_char,
val: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Return the text content of an XML node.\nReturn NULL if the node is a tag."]
pub fn fz_xml_text(item: *mut fz_xml) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Pretty-print an XML tree to stdout."]
pub fn fz_debug_xml(item: *mut fz_xml, level: ::std::os::raw::c_int);
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with item looking for\nthe first with the given tag.\n\nReturn NULL if none found."]
pub fn fz_xml_find(item: *mut fz_xml, tag: *const ::std::os::raw::c_char) -> *mut fz_xml;
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with the first sibling\nof item looking for the first with the given tag.\n\nReturn NULL if none found."]
pub fn fz_xml_find_next(item: *mut fz_xml, tag: *const ::std::os::raw::c_char) -> *mut fz_xml;
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with the first child\nof item looking for the first with the given tag.\n\nReturn NULL if none found."]
pub fn fz_xml_find_down(item: *mut fz_xml, tag: *const ::std::os::raw::c_char) -> *mut fz_xml;
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with item looking for\nthe first with the given tag (or any tag if tag is NULL), and\nwith a matching attribute.\n\nReturn NULL if none found."]
pub fn fz_xml_find_match(
item: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with the first sibling\nof item looking for the first with the given tag (or any tag if tag\nis NULL), and with a matching attribute.\n\nReturn NULL if none found."]
pub fn fz_xml_find_next_match(
item: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Search the siblings of XML nodes starting with the first child\nof item looking for the first with the given tag (or any tag if\ntag is NULL), and with a matching attribute.\n\nReturn NULL if none found."]
pub fn fz_xml_find_down_match(
item: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Perform a depth first search from item, returning the first\nchild that matches the given tag (or any tag if tag is NULL),\nwith the given attribute (if att is non NULL), that matches\nmatch (if match is non NULL)."]
pub fn fz_xml_find_dfs(
item: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Perform a depth first search onwards from item, returning the first\nchild that matches the given tag (or any tag if tag is NULL),\nwith the given attribute (if att is non NULL), that matches\nmatch (if match is non NULL)."]
pub fn fz_xml_find_next_dfs(
item: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference for the 'body' element of\nthe given DOM."]
pub fn fz_dom_body(ctx: *mut fz_context, dom: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference for the document (the top\nlevel element) of the DOM."]
pub fn fz_dom_document_element(ctx: *mut fz_context, dom: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Create an element of a given tag type for the given DOM.\n\nThe element is not linked into the DOM yet."]
pub fn fz_dom_create_element(
ctx: *mut fz_context,
dom: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Create a text node for the given DOM.\n\nThe element is not linked into the DOM yet."]
pub fn fz_dom_create_text_node(
ctx: *mut fz_context,
dom: *mut fz_xml,
text: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Find the first element matching the requirements in a depth first traversal from elt.\n\nThe tagname must match tag, unless tag is NULL, when all tag names are considered to match.\n\nIf att is NULL, then all tags match.\nOtherwise:\nIf match is NULL, then only nodes that have an att attribute match.\nIf match is non-NULL, then only nodes that have an att attribute that matches match match.\n\nReturns NULL (if no match found), or a borrowed reference to the first matching element."]
pub fn fz_dom_find(
ctx: *mut fz_context,
elt: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Find the next element matching the requirements."]
pub fn fz_dom_find_next(
ctx: *mut fz_context,
elt: *mut fz_xml,
tag: *const ::std::os::raw::c_char,
att: *const ::std::os::raw::c_char,
match_: *const ::std::os::raw::c_char,
) -> *mut fz_xml;
}
extern "C" {
#[doc = "Insert an element as the last child of a parent, unlinking the\nchild from its current position if required."]
pub fn fz_dom_append_child(ctx: *mut fz_context, parent: *mut fz_xml, child: *mut fz_xml);
}
extern "C" {
#[doc = "Insert an element (new_elt), before another element (node),\nunlinking the new_elt from its current position if required."]
pub fn fz_dom_insert_before(ctx: *mut fz_context, node: *mut fz_xml, new_elt: *mut fz_xml);
}
extern "C" {
#[doc = "Insert an element (new_elt), after another element (node),\nunlinking the new_elt from its current position if required."]
pub fn fz_dom_insert_after(ctx: *mut fz_context, node: *mut fz_xml, new_elt: *mut fz_xml);
}
extern "C" {
#[doc = "Remove an element from the DOM. The element can be added back elsewhere\nif required.\n\nNo reference counting changes for the element."]
pub fn fz_dom_remove(ctx: *mut fz_context, elt: *mut fz_xml);
}
extern "C" {
#[doc = "Clone an element (and its children).\n\nA borrowed reference to the clone is returned. The clone is not\nyet linked into the DOM."]
pub fn fz_dom_clone(ctx: *mut fz_context, elt: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference to the first child of a node,\nor NULL if there isn't one."]
pub fn fz_dom_first_child(ctx: *mut fz_context, elt: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference to the parent of a node,\nor NULL if there isn't one."]
pub fn fz_dom_parent(ctx: *mut fz_context, elt: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference to the next sibling of a node,\nor NULL if there isn't one."]
pub fn fz_dom_next(ctx: *mut fz_context, elt: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Return a borrowed reference to the previous sibling of a node,\nor NULL if there isn't one."]
pub fn fz_dom_previous(ctx: *mut fz_context, elt: *mut fz_xml) -> *mut fz_xml;
}
extern "C" {
#[doc = "Add an attribute to an element.\n\nOwnership of att and value remain with the caller."]
pub fn fz_dom_add_attribute(
ctx: *mut fz_context,
elt: *mut fz_xml,
att: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Remove an attribute from an element."]
pub fn fz_dom_remove_attribute(
ctx: *mut fz_context,
elt: *mut fz_xml,
att: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Retrieve the value of a given attribute from a given element.\n\nReturns a borrowed pointer to the value or NULL if not found."]
pub fn fz_dom_attribute(
ctx: *mut fz_context,
elt: *mut fz_xml,
att: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Enumerate through the attributes of an element.\n\nCall with i=0,1,2,3... to enumerate attributes.\n\nOn return *att and the return value will be NULL if there are not\nthat many attributes to read. Otherwise, *att will be filled in\nwith a borrowed pointer to the attribute name, and the return\nvalue will be a borrowed pointer to the value."]
pub fn fz_dom_get_attribute(
ctx: *mut fz_context,
elt: *mut fz_xml,
i: ::std::os::raw::c_int,
att: *mut *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
pub const fz_deflate_level_FZ_DEFLATE_NONE: fz_deflate_level = 0;
pub const fz_deflate_level_FZ_DEFLATE_BEST_SPEED: fz_deflate_level = 1;
pub const fz_deflate_level_FZ_DEFLATE_BEST: fz_deflate_level = 9;
pub const fz_deflate_level_FZ_DEFLATE_DEFAULT: fz_deflate_level = -1;
pub type fz_deflate_level = ::std::os::raw::c_int;
extern "C" {
#[doc = "Returns the upper bound on the\nsize of flated data of length size."]
pub fn fz_deflate_bound(ctx: *mut fz_context, size: usize) -> usize;
}
extern "C" {
#[doc = "Compress source_length bytes of data starting\nat source, into a buffer of length *destLen, starting at dest.\ncompressed_length will be updated on exit to contain the size\nactually used."]
pub fn fz_deflate(
ctx: *mut fz_context,
dest: *mut ::std::os::raw::c_uchar,
compressed_length: *mut usize,
source: *const ::std::os::raw::c_uchar,
source_length: usize,
level: fz_deflate_level,
);
}
extern "C" {
#[doc = "Compress source_length bytes of data starting\nat source, into a new memory block malloced for that purpose.\ncompressed_length is updated on exit to contain the size used.\nOwnership of the block is returned from this function, and the\ncaller is therefore responsible for freeing it. The block may be\nconsiderably larger than is actually required. The caller is\nfree to fz_realloc it down if it wants to."]
pub fn fz_new_deflated_data(
ctx: *mut fz_context,
compressed_length: *mut usize,
source: *const ::std::os::raw::c_uchar,
source_length: usize,
level: fz_deflate_level,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Compress the contents of a fz_buffer into a\nnew block malloced for that purpose. *compressed_length is\nupdated on exit to contain the size used. Ownership of the block\nis returned from this function, and the caller is therefore\nresponsible for freeing it. The block may be considerably larger\nthan is actually required. The caller is free to fz_realloc it\ndown if it wants to."]
pub fn fz_new_deflated_data_from_buffer(
ctx: *mut fz_context,
compressed_length: *mut usize,
buffer: *mut fz_buffer,
level: fz_deflate_level,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Compress bitmap data as CCITT Group 3 1D fax image.\nCreates a stream assuming the default PDF parameters,\nexcept the number of columns."]
pub fn fz_compress_ccitt_fax_g3(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
columns: ::std::os::raw::c_int,
rows: ::std::os::raw::c_int,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Compress bitmap data as CCITT Group 4 2D fax image.\nCreates a stream assuming the default PDF parameters, except\nK=-1 and the number of columns."]
pub fn fz_compress_ccitt_fax_g4(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
columns: ::std::os::raw::c_int,
rows: ::std::os::raw::c_int,
) -> *mut fz_buffer;
}
#[doc = "Function type for a function to drop a storable object.\n\nObjects within the store are identified by type by comparing\ntheir drop_fn pointers."]
pub type fz_store_drop_fn =
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_storable)>;
#[doc = "Any storable object should include an fz_storable structure\nat the start (by convention at least) of their structure.\n(Unless it starts with an fz_key_storable, see below)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_storable {
pub refs: ::std::os::raw::c_int,
pub drop: fz_store_drop_fn,
}
#[test]
fn bindgen_test_layout_fz_storable() {
const UNINIT: ::std::mem::MaybeUninit<fz_storable> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_storable>(),
16usize,
concat!("Size of: ", stringify!(fz_storable))
);
assert_eq!(
::std::mem::align_of::<fz_storable>(),
8usize,
concat!("Alignment of ", stringify!(fz_storable))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_storable),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_storable),
"::",
stringify!(drop)
)
);
}
#[doc = "Any storable object that can appear in the key of another\nstorable object should include an fz_key_storable structure\nat the start (by convention at least) of their structure."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_key_storable {
pub storable: fz_storable,
pub store_key_refs: ::std::os::raw::c_short,
}
#[test]
fn bindgen_test_layout_fz_key_storable() {
const UNINIT: ::std::mem::MaybeUninit<fz_key_storable> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_key_storable>(),
24usize,
concat!("Size of: ", stringify!(fz_key_storable))
);
assert_eq!(
::std::mem::align_of::<fz_key_storable>(),
8usize,
concat!("Alignment of ", stringify!(fz_key_storable))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_key_storable),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).store_key_refs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_key_storable),
"::",
stringify!(store_key_refs)
)
);
}
extern "C" {
#[doc = "Increment the reference count for a storable object.\nReturns the same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_storable(
arg1: *mut fz_context,
arg2: *const fz_storable,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Decrement the reference count for a storable object. When the\nreference count hits zero, the drop function for that object\nis called to free the object.\n\nNever throws exceptions."]
pub fn fz_drop_storable(arg1: *mut fz_context, arg2: *const fz_storable);
}
extern "C" {
#[doc = "Increment the (normal) reference count for a key storable\nobject. Returns the same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_key_storable(
arg1: *mut fz_context,
arg2: *const fz_key_storable,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Decrement the (normal) reference count for a storable object.\nWhen the total reference count hits zero, the drop function for\nthat object is called to free the object.\n\nNever throws exceptions."]
pub fn fz_drop_key_storable(arg1: *mut fz_context, arg2: *const fz_key_storable);
}
extern "C" {
#[doc = "Increment the (key) reference count for a key storable\nobject. Returns the same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_key_storable_key(
arg1: *mut fz_context,
arg2: *const fz_key_storable,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Decrement the (key) reference count for a storable object.\nWhen the total reference count hits zero, the drop function for\nthat object is called to free the object.\n\nNever throws exceptions."]
pub fn fz_drop_key_storable_key(arg1: *mut fz_context, arg2: *const fz_key_storable);
}
#[doc = "The store can be seen as a dictionary that maps keys to\nfz_storable values. In order to allow keys of different types to\nbe stored, we have a structure full of functions for each key\n'type'; this fz_store_type pointer is stored with each key, and\ntells the store how to perform certain operations (like taking/\ndropping a reference, comparing two keys, outputting details for\ndebugging etc).\n\nThe store uses a hash table internally for speed where possible.\nIn order for this to work, we need a mechanism for turning a\ngeneric 'key' into 'a hashable string'. For this purpose the\ntype structure contains a make_hash_key function pointer that\nmaps from a void * to a fz_store_hash structure. If\nmake_hash_key function returns 0, then the key is determined not\nto be hashable, and the value is not stored in the hash table.\n\nSome objects can be used both as values within the store, and as\na component of keys within the store. We refer to these objects\nas \"key storable\" objects. In this case, we need to take\nadditional care to ensure that we do not end up keeping an item\nwithin the store, purely because its value is referred to by\nanother key in the store.\n\nAn example of this are fz_images in PDF files. Each fz_image is\nplaced into the\tstore to enable it to be easily reused. When the\nimage is rendered, a pixmap is generated from the image, and the\npixmap is placed into the store so it can be reused on\nsubsequent renders. The image forms part of the key for the\npixmap.\n\nWhen we close the pdf document (and any associated pages/display\nlists etc), we drop the images from the store. This may leave us\nin the position of the images having non-zero reference counts\npurely because they are used as part of the keys for the\npixmaps.\n\nWe therefore use special reference counting functions to keep\ntrack of these \"key storable\" items, and hence store the number\nof references to these items that are used in keys.\n\nWhen the number of references to an object == the number of\nreferences to an object from keys in the store, we know that we\ncan remove all the items which have that object as part of the\nkey. This is done by running a pass over the store, 'reaping'\nthose items.\n\nReap passes are slower than we would like as they touch every\nitem in the store. We therefore provide a way to 'batch' such\nreap passes together, using fz_defer_reap_start/\nfz_defer_reap_end to bracket a region in which many may be\ntriggered."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_store_hash {
pub drop: fz_store_drop_fn,
pub u: fz_store_hash__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_store_hash__bindgen_ty_1 {
pub pi: fz_store_hash__bindgen_ty_1__bindgen_ty_1,
pub pir: fz_store_hash__bindgen_ty_1__bindgen_ty_2,
pub im: fz_store_hash__bindgen_ty_1__bindgen_ty_3,
pub link: fz_store_hash__bindgen_ty_1__bindgen_ty_4,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_store_hash__bindgen_ty_1__bindgen_ty_1 {
pub ptr: *const ::std::os::raw::c_void,
pub i: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_store_hash__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(i)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_store_hash__bindgen_ty_1__bindgen_ty_2 {
pub ptr: *const ::std::os::raw::c_void,
pub i: ::std::os::raw::c_int,
pub r: fz_irect,
}
#[test]
fn bindgen_test_layout_fz_store_hash__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(i)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(r)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_store_hash__bindgen_ty_1__bindgen_ty_3 {
pub id: ::std::os::raw::c_int,
pub has_shape: ::std::os::raw::c_char,
pub has_group_alpha: ::std::os::raw::c_char,
pub m: [f32; 4usize],
pub ptr: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_fz_store_hash__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_shape) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(has_shape)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_group_alpha) as usize - ptr as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(has_group_alpha)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(m)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(ptr)
)
);
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct fz_store_hash__bindgen_ty_1__bindgen_ty_4 {
pub src_md5: [::std::os::raw::c_uchar; 16usize],
pub dst_md5: [::std::os::raw::c_uchar; 16usize],
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub __bindgen_padding_0: u8,
}
#[test]
fn bindgen_test_layout_fz_store_hash__bindgen_ty_1__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash__bindgen_ty_1__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_4>(),
36usize,
concat!(
"Size of: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_4>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).src_md5) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(src_md5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dst_md5) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(dst_md5)
)
);
}
impl fz_store_hash__bindgen_ty_1__bindgen_ty_4 {
#[inline]
pub fn ri(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
}
#[inline]
pub fn set_ri(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 2u8, val as u64)
}
}
#[inline]
pub fn bp(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_bp(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn format(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_format(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn proof(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_proof(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn src_extras(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 5u8) as u32) }
}
#[inline]
pub fn set_src_extras(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 5u8, val as u64)
}
}
#[inline]
pub fn dst_extras(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 5u8) as u32) }
}
#[inline]
pub fn set_dst_extras(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 5u8, val as u64)
}
}
#[inline]
pub fn copy_spots(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
}
#[inline]
pub fn set_copy_spots(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(15usize, 1u8, val as u64)
}
}
#[inline]
pub fn bgr(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
}
#[inline]
pub fn set_bgr(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
ri: ::std::os::raw::c_uint,
bp: ::std::os::raw::c_uint,
format: ::std::os::raw::c_uint,
proof: ::std::os::raw::c_uint,
src_extras: ::std::os::raw::c_uint,
dst_extras: ::std::os::raw::c_uint,
copy_spots: ::std::os::raw::c_uint,
bgr: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 2u8, {
let ri: u32 = unsafe { ::std::mem::transmute(ri) };
ri as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let bp: u32 = unsafe { ::std::mem::transmute(bp) };
bp as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let format: u32 = unsafe { ::std::mem::transmute(format) };
format as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let proof: u32 = unsafe { ::std::mem::transmute(proof) };
proof as u64
});
__bindgen_bitfield_unit.set(5usize, 5u8, {
let src_extras: u32 = unsafe { ::std::mem::transmute(src_extras) };
src_extras as u64
});
__bindgen_bitfield_unit.set(10usize, 5u8, {
let dst_extras: u32 = unsafe { ::std::mem::transmute(dst_extras) };
dst_extras as u64
});
__bindgen_bitfield_unit.set(15usize, 1u8, {
let copy_spots: u32 = unsafe { ::std::mem::transmute(copy_spots) };
copy_spots as u64
});
__bindgen_bitfield_unit.set(16usize, 1u8, {
let bgr: u32 = unsafe { ::std::mem::transmute(bgr) };
bgr as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_fz_store_hash__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1>(),
40usize,
concat!("Size of: ", stringify!(fz_store_hash__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(fz_store_hash__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pi) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(pi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pir) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(pir)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).im) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(link)
)
);
}
#[test]
fn bindgen_test_layout_fz_store_hash() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_hash> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_hash>(),
48usize,
concat!("Size of: ", stringify!(fz_store_hash))
);
assert_eq!(
::std::mem::align_of::<fz_store_hash>(),
8usize,
concat!("Alignment of ", stringify!(fz_store_hash))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash),
"::",
stringify!(u)
)
);
}
#[doc = "Every type of object to be placed into the store defines an\nfz_store_type. This contains the pointers to functions to\nmake hashes, manipulate keys, and check for needing reaping."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_store_type {
pub name: *const ::std::os::raw::c_char,
pub make_hash_key: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
hash: *mut fz_store_hash,
key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
pub keep_key: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
key: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void,
>,
pub drop_key: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, key: *mut ::std::os::raw::c_void),
>,
pub cmp_key: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
a: *mut ::std::os::raw::c_void,
b: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
pub format_key: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
buf: *mut ::std::os::raw::c_char,
size: usize,
key: *mut ::std::os::raw::c_void,
),
>,
pub needs_reap: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
}
#[test]
fn bindgen_test_layout_fz_store_type() {
const UNINIT: ::std::mem::MaybeUninit<fz_store_type> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_store_type>(),
56usize,
concat!("Size of: ", stringify!(fz_store_type))
);
assert_eq!(
::std::mem::align_of::<fz_store_type>(),
8usize,
concat!("Alignment of ", stringify!(fz_store_type))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).make_hash_key) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(make_hash_key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).keep_key) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(keep_key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_key) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(drop_key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cmp_key) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(cmp_key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).format_key) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(format_key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).needs_reap) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(needs_reap)
)
);
}
extern "C" {
#[doc = "Create a new store inside the context\n\nmax: The maximum size (in bytes) that the store is allowed to\ngrow to. FZ_STORE_UNLIMITED means no limit."]
pub fn fz_new_store_context(ctx: *mut fz_context, max: usize);
}
extern "C" {
#[doc = "Increment the reference count for the store context. Returns\nthe same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_store_context(ctx: *mut fz_context) -> *mut fz_store;
}
extern "C" {
#[doc = "Decrement the reference count for the store context. When the\nreference count hits zero, the store context is freed.\n\nNever throws exceptions."]
pub fn fz_drop_store_context(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Add an item to the store.\n\nAdd an item into the store, returning NULL for success. If an\nitem with the same key is found in the store, then our item will\nnot be inserted, and the function will return a pointer to that\nvalue instead. This function takes its own reference to val, as\nrequired (i.e. the caller maintains ownership of its own\nreference).\n\nkey: The key used to index the item.\n\nval: The value to store.\n\nitemsize: The size in bytes of the value (as counted towards the\nstore size).\n\ntype: Functions used to manipulate the key."]
pub fn fz_store_item(
ctx: *mut fz_context,
key: *mut ::std::os::raw::c_void,
val: *mut ::std::os::raw::c_void,
itemsize: usize,
type_: *const fz_store_type,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Find an item within the store.\n\ndrop: The function used to free the value (to ensure we get a\nvalue of the correct type).\n\nkey: The key used to index the item.\n\ntype: Functions used to manipulate the key.\n\nReturns NULL for not found, otherwise returns a pointer to the\nvalue indexed by key to which a reference has been taken."]
pub fn fz_find_item(
ctx: *mut fz_context,
drop: fz_store_drop_fn,
key: *mut ::std::os::raw::c_void,
type_: *const fz_store_type,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Remove an item from the store.\n\nIf an item indexed by the given key exists in the store, remove\nit.\n\ndrop: The function used to free the value (to ensure we get a\nvalue of the correct type).\n\nkey: The key used to find the item to remove.\n\ntype: Functions used to manipulate the key."]
pub fn fz_remove_item(
ctx: *mut fz_context,
drop: fz_store_drop_fn,
key: *mut ::std::os::raw::c_void,
type_: *const fz_store_type,
);
}
extern "C" {
#[doc = "Evict every item from the store."]
pub fn fz_empty_store(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Internal function used as part of the scavenging\nallocator; when we fail to allocate memory, before returning a\nfailure to the caller, we try to scavenge space within the store\nby evicting at least 'size' bytes. The allocator then retries.\n\nsize: The number of bytes we are trying to have free.\n\nphase: What phase of the scavenge we are in. Updated on exit.\n\nReturns non zero if we managed to free any memory."]
pub fn fz_store_scavenge(
ctx: *mut fz_context,
size: usize,
phase: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "External function for callers to use\nto scavenge while trying allocations.\n\nsize: The number of bytes we are trying to have free.\n\nphase: What phase of the scavenge we are in. Updated on exit.\n\nReturns non zero if we managed to free any memory."]
pub fn fz_store_scavenge_external(
ctx: *mut fz_context,
size: usize,
phase: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Evict items from the store until the total size of\nthe objects in the store is reduced to a given percentage of its\ncurrent size.\n\npercent: %age of current size to reduce the store to.\n\nReturns non zero if we managed to free enough memory, zero\notherwise."]
pub fn fz_shrink_store(
ctx: *mut fz_context,
percent: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
#[doc = "Callback function called by fz_filter_store on every item within\nthe store.\n\nReturn 1 to drop the item from the store, 0 to retain."]
pub type fz_store_filter_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
#[doc = "Filter every element in the store with a matching type with the\ngiven function.\n\nIf the function returns 1 for an element, drop the element."]
pub fn fz_filter_store(
ctx: *mut fz_context,
fn_: fz_store_filter_fn,
arg: *mut ::std::os::raw::c_void,
type_: *const fz_store_type,
);
}
extern "C" {
#[doc = "Output debugging information for the current state of the store\nto the given output channel."]
pub fn fz_debug_store(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Increment the defer reap count.\n\nNo reap operations will take place (except for those\ntriggered by an immediate failed malloc) until the\ndefer reap count returns to 0.\n\nCall this at the start of a process during which you\npotentially might drop many reapable objects.\n\nIt is vital that every fz_defer_reap_start is matched\nby a fz_defer_reap_end call."]
pub fn fz_defer_reap_start(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Decrement the defer reap count.\n\nIf the defer reap count returns to 0, and the store\nhas reapable objects in, a reap pass will begin.\n\nCall this at the end of a process during which you\npotentially might drop many reapable objects.\n\nIt is vital that every fz_defer_reap_start is matched\nby a fz_defer_reap_end call."]
pub fn fz_defer_reap_end(ctx: *mut fz_context);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_jbig2_globals {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_range {
pub offset: i64,
pub length: u64,
}
#[test]
fn bindgen_test_layout_fz_range() {
const UNINIT: ::std::mem::MaybeUninit<fz_range> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_range>(),
16usize,
concat!("Size of: ", stringify!(fz_range))
);
assert_eq!(
::std::mem::align_of::<fz_range>(),
8usize,
concat!("Alignment of ", stringify!(fz_range))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_range),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_range),
"::",
stringify!(length)
)
);
}
extern "C" {
#[doc = "The null filter reads a specified amount of data from the\nsubstream."]
pub fn fz_open_null_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
len: u64,
offset: i64,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "The range filter copies data from specified ranges of the\nchained stream."]
pub fn fz_open_range_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
ranges: *mut fz_range,
nranges: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "The endstream filter reads a PDF substream, and starts to look\nfor an 'endstream' token after the specified length."]
pub fn fz_open_endstream_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
len: u64,
offset: i64,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Concat filter concatenates several streams into one."]
pub fn fz_open_concat(
ctx: *mut fz_context,
max: ::std::os::raw::c_int,
pad: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Add a chained stream to the end of the concatenate filter.\n\nOwnership of chain is passed in."]
pub fn fz_concat_push_drop(ctx: *mut fz_context, concat: *mut fz_stream, chain: *mut fz_stream);
}
extern "C" {
#[doc = "arc4 filter performs RC4 decoding of data read from the chained\nfilter using the supplied key."]
pub fn fz_open_arc4(
ctx: *mut fz_context,
chain: *mut fz_stream,
key: *mut ::std::os::raw::c_uchar,
keylen: ::std::os::raw::c_uint,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "aesd filter performs AES decoding of data read from the chained\nfilter using the supplied key."]
pub fn fz_open_aesd(
ctx: *mut fz_context,
chain: *mut fz_stream,
key: *mut ::std::os::raw::c_uchar,
keylen: ::std::os::raw::c_uint,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "a85d filter performs ASCII 85 Decoding of data read\nfrom the chained filter."]
pub fn fz_open_a85d(ctx: *mut fz_context, chain: *mut fz_stream) -> *mut fz_stream;
}
extern "C" {
#[doc = "ahxd filter performs ASCII Hex decoding of data read\nfrom the chained filter."]
pub fn fz_open_ahxd(ctx: *mut fz_context, chain: *mut fz_stream) -> *mut fz_stream;
}
extern "C" {
#[doc = "rld filter performs Run Length Decoding of data read\nfrom the chained filter."]
pub fn fz_open_rld(ctx: *mut fz_context, chain: *mut fz_stream) -> *mut fz_stream;
}
extern "C" {
#[doc = "dctd filter performs DCT (JPEG) decoding of data read\nfrom the chained filter.\n\ncolor_transform implements the PDF color_transform option;\nuse 0 to disable YUV-RGB / YCCK-CMYK transforms\nuse >0 to enable YUV-RGB / YCCK-CMYK transforms\nuse -1 (default) if not embedded in PDF\nuse -2 (default) if embedded in PDF\n\nFor subsampling on decode, set l2factor to the log2 of the\nreduction required (therefore 0 = full size decode).\n\njpegtables is an optional stream from which the JPEG tables\ncan be read. Use NULL if not required."]
pub fn fz_open_dctd(
ctx: *mut fz_context,
chain: *mut fz_stream,
color_transform: ::std::os::raw::c_int,
l2factor: ::std::os::raw::c_int,
jpegtables: *mut fz_stream,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "faxd filter performs FAX decoding of data read from\nthe chained filter.\n\nk: see fax specification (fax default is 0).\n\nend_of_line: whether we expect end of line markers (fax default\nis 0).\n\nencoded_byte_align: whether we align to bytes after each line\n(fax default is 0).\n\ncolumns: how many columns in the image (fax default is 1728).\n\nrows: 0 for unspecified or the number of rows of data to expect.\n\nend_of_block: whether we expect end of block markers (fax\ndefault is 1).\n\nblack_is_1: determines the polarity of the image (fax default is\n0)."]
pub fn fz_open_faxd(
ctx: *mut fz_context,
chain: *mut fz_stream,
k: ::std::os::raw::c_int,
end_of_line: ::std::os::raw::c_int,
encoded_byte_align: ::std::os::raw::c_int,
columns: ::std::os::raw::c_int,
rows: ::std::os::raw::c_int,
end_of_block: ::std::os::raw::c_int,
black_is_1: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "flated filter performs LZ77 decoding (inflating) of data read\nfrom the chained filter.\n\nwindow_bits: How large a decompression window to use. Typically\n15. A negative number, -n, means to use n bits, but to expect\nraw data with no header."]
pub fn fz_open_flated(
ctx: *mut fz_context,
chain: *mut fz_stream,
window_bits: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "lzwd filter performs LZW decoding of data read from the chained\nfilter.\n\nearly_change: (Default 1) specifies whether to change codes 1\nbit early.\n\nmin_bits: (Default 9) specifies the minimum number of bits to\nuse.\n\nreverse_bits: (Default 0) allows for compatibility with gif and\nold style tiffs (1).\n\nold_tiff: (Default 0) allows for different handling of the clear\ncode, as found in old style tiffs."]
pub fn fz_open_lzwd(
ctx: *mut fz_context,
chain: *mut fz_stream,
early_change: ::std::os::raw::c_int,
min_bits: ::std::os::raw::c_int,
reverse_bits: ::std::os::raw::c_int,
old_tiff: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "predict filter performs pixel prediction on data read from\nthe chained filter.\n\npredictor: 1 = copy, 2 = tiff, other = inline PNG predictor\n\ncolumns: width of image in pixels\n\ncolors: number of components.\n\nbpc: bits per component (typically 8)"]
pub fn fz_open_predict(
ctx: *mut fz_context,
chain: *mut fz_stream,
predictor: ::std::os::raw::c_int,
columns: ::std::os::raw::c_int,
colors: ::std::os::raw::c_int,
bpc: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Open a filter that performs jbig2 decompression on the chained\nstream, using the optional globals record."]
pub fn fz_open_jbig2d(
ctx: *mut fz_context,
chain: *mut fz_stream,
globals: *mut fz_jbig2_globals,
embedded: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Create a jbig2 globals record from a buffer.\n\nImmutable once created."]
pub fn fz_load_jbig2_globals(
ctx: *mut fz_context,
buf: *mut fz_buffer,
) -> *mut fz_jbig2_globals;
}
extern "C" {
#[doc = "Increment the reference count for a jbig2 globals record.\n\nNever throws an exception."]
pub fn fz_keep_jbig2_globals(
ctx: *mut fz_context,
globals: *mut fz_jbig2_globals,
) -> *mut fz_jbig2_globals;
}
extern "C" {
#[doc = "Decrement the reference count for a jbig2 globals record.\nWhen the reference count hits zero, the record is freed.\n\nNever throws an exception."]
pub fn fz_drop_jbig2_globals(ctx: *mut fz_context, globals: *mut fz_jbig2_globals);
}
extern "C" {
#[doc = "Special jbig2 globals drop function for use in implementing\nstore support."]
pub fn fz_drop_jbig2_globals_imp(ctx: *mut fz_context, globals: *mut fz_storable);
}
extern "C" {
#[doc = "Return buffer containing jbig2 globals data stream."]
pub fn fz_jbig2_globals_data(
ctx: *mut fz_context,
globals: *mut fz_jbig2_globals,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "SGI Log 16bit (greyscale) decode from the chained filter.\nDecodes lines of w pixels to 8bpp greyscale."]
pub fn fz_open_sgilog16(
ctx: *mut fz_context,
chain: *mut fz_stream,
w: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "SGI Log 24bit (LUV) decode from the chained filter.\nDecodes lines of w pixels to 8bpc rgb."]
pub fn fz_open_sgilog24(
ctx: *mut fz_context,
chain: *mut fz_stream,
w: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "SGI Log 32bit (LUV) decode from the chained filter.\nDecodes lines of w pixels to 8bpc rgb."]
pub fn fz_open_sgilog32(
ctx: *mut fz_context,
chain: *mut fz_stream,
w: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "4bit greyscale Thunderscan decoding from the chained filter.\nDecodes lines of w pixels to 8bpp greyscale."]
pub fn fz_open_thunder(
ctx: *mut fz_context,
chain: *mut fz_stream,
w: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
#[doc = "Compression parameters used for buffers of compressed data;\ntypically for the source data for images."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_compression_params {
pub type_: ::std::os::raw::c_int,
pub u: fz_compression_params__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_compression_params__bindgen_ty_1 {
pub jpeg: fz_compression_params__bindgen_ty_1__bindgen_ty_1,
pub jpx: fz_compression_params__bindgen_ty_1__bindgen_ty_2,
pub jbig2: fz_compression_params__bindgen_ty_1__bindgen_ty_3,
pub fax: fz_compression_params__bindgen_ty_1__bindgen_ty_4,
pub flate: fz_compression_params__bindgen_ty_1__bindgen_ty_5,
pub lzw: fz_compression_params__bindgen_ty_1__bindgen_ty_6,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_1 {
pub color_transform: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).color_transform) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(color_transform)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_2 {
pub smask_in_data: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).smask_in_data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(smask_in_data)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_3 {
pub globals: *mut fz_jbig2_globals,
pub embedded: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_3>(),
16usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).globals) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(globals)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).embedded) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(embedded)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_4 {
pub columns: ::std::os::raw::c_int,
pub rows: ::std::os::raw::c_int,
pub k: ::std::os::raw::c_int,
pub end_of_line: ::std::os::raw::c_int,
pub encoded_byte_align: ::std::os::raw::c_int,
pub end_of_block: ::std::os::raw::c_int,
pub black_is_1: ::std::os::raw::c_int,
pub damaged_rows_before_error: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).columns) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rows) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(rows)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).k) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(k)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_of_line) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(end_of_line)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).encoded_byte_align) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(encoded_byte_align)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_of_block) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(end_of_block)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).black_is_1) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(black_is_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).damaged_rows_before_error) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(damaged_rows_before_error)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_5 {
pub columns: ::std::os::raw::c_int,
pub colors: ::std::os::raw::c_int,
pub predictor: ::std::os::raw::c_int,
pub bpc: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_5() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_5> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>(),
16usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).columns) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colors) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(colors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).predictor) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(predictor)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpc) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(bpc)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compression_params__bindgen_ty_1__bindgen_ty_6 {
pub columns: ::std::os::raw::c_int,
pub colors: ::std::os::raw::c_int,
pub predictor: ::std::os::raw::c_int,
pub bpc: ::std::os::raw::c_int,
pub early_change: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_6() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1__bindgen_ty_6> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>(),
20usize,
concat!(
"Size of: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).columns) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colors) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(colors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).predictor) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(predictor)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpc) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(bpc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).early_change) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(early_change)
)
);
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(fz_compression_params__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_compression_params__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jpeg) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jpeg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jpx) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jpx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jbig2) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jbig2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fax) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(fax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flate) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(flate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lzw) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(lzw)
)
);
}
#[test]
fn bindgen_test_layout_fz_compression_params() {
const UNINIT: ::std::mem::MaybeUninit<fz_compression_params> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compression_params>(),
40usize,
concat!("Size of: ", stringify!(fz_compression_params))
);
assert_eq!(
::std::mem::align_of::<fz_compression_params>(),
8usize,
concat!("Alignment of ", stringify!(fz_compression_params))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params),
"::",
stringify!(u)
)
);
}
#[doc = "Buffers of compressed data; typically for the source data\nfor images."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_compressed_buffer {
pub params: fz_compression_params,
pub buffer: *mut fz_buffer,
}
#[test]
fn bindgen_test_layout_fz_compressed_buffer() {
const UNINIT: ::std::mem::MaybeUninit<fz_compressed_buffer> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_compressed_buffer>(),
48usize,
concat!("Size of: ", stringify!(fz_compressed_buffer))
);
assert_eq!(
::std::mem::align_of::<fz_compressed_buffer>(),
8usize,
concat!("Alignment of ", stringify!(fz_compressed_buffer))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compressed_buffer),
"::",
stringify!(params)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_compressed_buffer),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "Return the storage size used for a buffer and its data.\nUsed in implementing store handling.\n\nNever throws exceptions."]
pub fn fz_compressed_buffer_size(buffer: *mut fz_compressed_buffer) -> usize;
}
extern "C" {
#[doc = "Open a stream to read the decompressed version of a buffer."]
pub fn fz_open_compressed_buffer(
ctx: *mut fz_context,
arg1: *mut fz_compressed_buffer,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Open a stream to read the decompressed version of a buffer,\nwith optional log2 subsampling.\n\nl2factor = NULL for no subsampling, or a pointer to an integer\ncontaining the maximum log2 subsample factor acceptable (0 =\nnone, 1 = halve dimensions, 2 = quarter dimensions etc). If\nnon-NULL, then *l2factor will be updated on exit with the actual\nlog2 subsample factor achieved."]
pub fn fz_open_image_decomp_stream_from_buffer(
ctx: *mut fz_context,
arg1: *mut fz_compressed_buffer,
l2factor: *mut ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Open a stream to read the decompressed version of another stream\nwith optional log2 subsampling."]
pub fn fz_open_image_decomp_stream(
ctx: *mut fz_context,
arg1: *mut fz_stream,
arg2: *mut fz_compression_params,
l2factor: *mut ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Recognise image format strings in the first 8 bytes from image\ndata."]
pub fn fz_recognize_image_format(
ctx: *mut fz_context,
p: *mut ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Map from FZ_IMAGE_* value to string.\n\nThe returned string is static and therefore must not be freed."]
pub fn fz_image_type_name(type_: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Map from (case sensitive) image type string to FZ_IMAGE_*\ntype value."]
pub fn fz_lookup_image_type(type_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
pub const FZ_IMAGE_UNKNOWN: _bindgen_ty_5 = 0;
pub const FZ_IMAGE_RAW: _bindgen_ty_5 = 1;
pub const FZ_IMAGE_FAX: _bindgen_ty_5 = 2;
pub const FZ_IMAGE_FLATE: _bindgen_ty_5 = 3;
pub const FZ_IMAGE_LZW: _bindgen_ty_5 = 4;
pub const FZ_IMAGE_RLD: _bindgen_ty_5 = 5;
pub const FZ_IMAGE_BMP: _bindgen_ty_5 = 6;
pub const FZ_IMAGE_GIF: _bindgen_ty_5 = 7;
pub const FZ_IMAGE_JBIG2: _bindgen_ty_5 = 8;
pub const FZ_IMAGE_JPEG: _bindgen_ty_5 = 9;
pub const FZ_IMAGE_JPX: _bindgen_ty_5 = 10;
pub const FZ_IMAGE_JXR: _bindgen_ty_5 = 11;
pub const FZ_IMAGE_PNG: _bindgen_ty_5 = 12;
pub const FZ_IMAGE_PNM: _bindgen_ty_5 = 13;
pub const FZ_IMAGE_TIFF: _bindgen_ty_5 = 14;
pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Drop a reference to a compressed buffer. Destroys the buffer\nand frees any storage/other references held by it.\n\nNever throws exceptions."]
pub fn fz_drop_compressed_buffer(ctx: *mut fz_context, buf: *mut fz_compressed_buffer);
}
extern "C" {
#[doc = "Open a zip or tar archive\n\nOpen a file and identify its archive type based on the archive\nsignature contained inside.\n\nfilename: a path to a file as it would be given to open(2)."]
pub fn fz_open_archive(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Open zip or tar archive stream.\n\nOpen an archive using a seekable stream object rather than\nopening a file or directory on disk."]
pub fn fz_open_archive_with_stream(
ctx: *mut fz_context,
file: *mut fz_stream,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Open a directory as if it was an archive.\n\nA special case where a directory is opened as if it was an\narchive.\n\nNote that for directories it is not possible to retrieve the\nnumber of entries or list the entries. It is however possible\nto check if the archive has a particular entry.\n\npath: a path to a directory as it would be given to opendir(3)."]
pub fn fz_open_directory(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Determine if a given path is a directory."]
pub fn fz_is_directory(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Drop a reference to an archive.\n\nWhen the last reference is dropped, this closes and releases\nany memory or filehandles associated with the archive."]
pub fn fz_drop_archive(ctx: *mut fz_context, arch: *mut fz_archive);
}
extern "C" {
#[doc = "Keep a reference to an archive."]
pub fn fz_keep_archive(ctx: *mut fz_context, arch: *mut fz_archive) -> *mut fz_archive;
}
extern "C" {
#[doc = "Return a pointer to a string describing the format of the\narchive.\n\nThe lifetime of the string is unspecified (in current\nimplementations the string will persist until the archive\nis closed, but this is not guaranteed)."]
pub fn fz_archive_format(
ctx: *mut fz_context,
arch: *mut fz_archive,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Number of entries in archive.\n\nWill always return a value >= 0.\n\nMay throw an exception if this type of archive cannot count the\nentries (such as a directory)."]
pub fn fz_count_archive_entries(
ctx: *mut fz_context,
arch: *mut fz_archive,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Get listed name of entry position idx.\n\nidx: Must be a value >= 0 < return value from\nfz_count_archive_entries. If not in range NULL will be\nreturned.\n\nMay throw an exception if this type of archive cannot list the\nentries (such as a directory)."]
pub fn fz_list_archive_entry(
ctx: *mut fz_context,
arch: *mut fz_archive,
idx: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Check if entry by given name exists.\n\nIf named entry does not exist 0 will be returned, if it does\nexist 1 is returned.\n\nname: Entry name to look for, this must be an exact match to\nthe entry name in the archive."]
pub fn fz_has_archive_entry(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Opens an archive entry as a stream.\n\nname: Entry name to look for, this must be an exact match to\nthe entry name in the archive.\n\nThrows an exception if a matching entry cannot be found."]
pub fn fz_open_archive_entry(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Reads all bytes in an archive entry\ninto a buffer.\n\nname: Entry name to look for, this must be an exact match to\nthe entry name in the archive.\n\nThrows an exception if a matching entry cannot be found."]
pub fn fz_read_archive_entry(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Detect if stream object is a tar achieve.\n\nAssumes that the stream object is seekable."]
pub fn fz_is_tar_archive(ctx: *mut fz_context, file: *mut fz_stream) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Open a tar archive file.\n\nAn exception is throw if the file is not a tar archive as\nindicated by the presence of a tar signature.\n\nfilename: a path to a tar archive file as it would be given to\nopen(2)."]
pub fn fz_open_tar_archive(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Open a tar archive stream.\n\nOpen an archive using a seekable stream object rather than\nopening a file or directory on disk.\n\nAn exception is throw if the stream is not a tar archive as\nindicated by the presence of a tar signature."]
pub fn fz_open_tar_archive_with_stream(
ctx: *mut fz_context,
file: *mut fz_stream,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Detect if stream object is a zip archive.\n\nAssumes that the stream object is seekable."]
pub fn fz_is_zip_archive(ctx: *mut fz_context, file: *mut fz_stream) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Open a zip archive file.\n\nAn exception is throw if the file is not a zip archive as\nindicated by the presence of a zip signature.\n\nfilename: a path to a zip archive file as it would be given to\nopen(2)."]
pub fn fz_open_zip_archive(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
) -> *mut fz_archive;
}
extern "C" {
#[doc = "Open a zip archive stream.\n\nOpen an archive using a seekable stream object rather than\nopening a file or directory on disk.\n\nAn exception is throw if the stream is not a zip archive as\nindicated by the presence of a zip signature."]
pub fn fz_open_zip_archive_with_stream(
ctx: *mut fz_context,
file: *mut fz_stream,
) -> *mut fz_archive;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_zip_writer {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Create a new zip writer that writes to a given file.\n\nOpen an archive using a seekable stream object rather than\nopening a file or directory on disk."]
pub fn fz_new_zip_writer(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_zip_writer;
}
extern "C" {
#[doc = "Create a new zip writer that writes to a given output stream.\n\nOwnership of out passes in immediately upon calling this function.\nThe caller should never drop the fz_output, even if this function throws\nan exception."]
pub fn fz_new_zip_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
) -> *mut fz_zip_writer;
}
extern "C" {
#[doc = "Given a buffer of data, (optionally) compress it, and add it to\nthe zip file with the given name."]
pub fn fz_write_zip_entry(
ctx: *mut fz_context,
zip: *mut fz_zip_writer,
name: *const ::std::os::raw::c_char,
buf: *mut fz_buffer,
compress: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Close the zip file for writing.\n\nThis flushes any pending data to the file. This can throw\nexceptions."]
pub fn fz_close_zip_writer(ctx: *mut fz_context, zip: *mut fz_zip_writer);
}
extern "C" {
#[doc = "Drop the reference to the zipfile.\n\nIn common with other 'drop' methods, this will never throw an\nexception."]
pub fn fz_drop_zip_writer(ctx: *mut fz_context, zip: *mut fz_zip_writer);
}
extern "C" {
#[doc = "Create an archive that holds named buffers.\n\ntree can either be a preformed tree with fz_buffers as values,\nor it can be NULL for an empty tree."]
pub fn fz_new_tree_archive(ctx: *mut fz_context, tree: *mut fz_tree) -> *mut fz_archive;
}
extern "C" {
#[doc = "Add a named buffer to an existing tree archive.\n\nThe tree will take a new reference to the buffer. Ownership\nis not transferred."]
pub fn fz_tree_archive_add_buffer(
ctx: *mut fz_context,
arch_: *mut fz_archive,
name: *const ::std::os::raw::c_char,
buf: *mut fz_buffer,
);
}
extern "C" {
#[doc = "Add a named block of data to an existing tree archive.\n\nThe data will be copied into a buffer, and so the caller\nmay free it as soon as this returns."]
pub fn fz_tree_archive_add_data(
ctx: *mut fz_context,
arch_: *mut fz_archive,
name: *const ::std::os::raw::c_char,
data: *const ::std::os::raw::c_void,
size: usize,
);
}
extern "C" {
#[doc = "Create a new multi archive (initially empty)."]
pub fn fz_new_multi_archive(ctx: *mut fz_context) -> *mut fz_archive;
}
extern "C" {
#[doc = "Add an archive to the set of archives handled by a multi\narchive.\n\nIf path is NULL, then the archive contents will appear at the\ntop level, otherwise, the archives contents will appear prefixed\nby path."]
pub fn fz_mount_multi_archive(
ctx: *mut fz_context,
arch_: *mut fz_archive,
sub: *mut fz_archive,
path: *const ::std::os::raw::c_char,
);
}
#[doc = "Implementation details: Subject to change."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_archive {
pub refs: ::std::os::raw::c_int,
pub file: *mut fz_stream,
pub format: *const ::std::os::raw::c_char,
pub drop_archive:
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, arch: *mut fz_archive)>,
pub count_entries: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, arch: *mut fz_archive) -> ::std::os::raw::c_int,
>,
pub list_entry: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arch: *mut fz_archive,
idx: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char,
>,
pub has_entry: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>,
pub read_entry: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> *mut fz_buffer,
>,
pub open_entry: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arch: *mut fz_archive,
name: *const ::std::os::raw::c_char,
) -> *mut fz_stream,
>,
}
#[test]
fn bindgen_test_layout_fz_archive() {
const UNINIT: ::std::mem::MaybeUninit<fz_archive> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_archive>(),
72usize,
concat!("Size of: ", stringify!(fz_archive))
);
assert_eq!(
::std::mem::align_of::<fz_archive>(),
8usize,
concat!("Alignment of ", stringify!(fz_archive))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_archive) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(drop_archive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count_entries) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(count_entries)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).list_entry) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(list_entry)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_entry) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(has_entry)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).read_entry) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(read_entry)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_entry) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(open_entry)
)
);
}
extern "C" {
pub fn fz_new_archive_of_size(
ctx: *mut fz_context,
file: *mut fz_stream,
size: ::std::os::raw::c_int,
) -> *mut fz_archive;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_icc_profile {
_unused: [u8; 0],
}
pub const FZ_RI_PERCEPTUAL: _bindgen_ty_6 = 0;
pub const FZ_RI_RELATIVE_COLORIMETRIC: _bindgen_ty_6 = 1;
pub const FZ_RI_SATURATION: _bindgen_ty_6 = 2;
pub const FZ_RI_ABSOLUTE_COLORIMETRIC: _bindgen_ty_6 = 3;
pub type _bindgen_ty_6 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_color_params {
pub ri: u8,
pub bp: u8,
pub op: u8,
pub opm: u8,
}
#[test]
fn bindgen_test_layout_fz_color_params() {
const UNINIT: ::std::mem::MaybeUninit<fz_color_params> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_color_params>(),
4usize,
concat!("Size of: ", stringify!(fz_color_params))
);
assert_eq!(
::std::mem::align_of::<fz_color_params>(),
1usize,
concat!("Alignment of ", stringify!(fz_color_params))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(ri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(bp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opm) as usize - ptr as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(opm)
)
);
}
extern "C" {
pub static fz_default_color_params: fz_color_params;
}
extern "C" {
#[doc = "Map from (case sensitive) rendering intent string to enumeration\nvalue."]
pub fn fz_lookup_rendering_intent(name: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Map from enumerated rendering intent to string.\n\nThe returned string is static and therefore must not be freed."]
pub fn fz_rendering_intent_name(ri: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
pub const FZ_MAX_COLORS: _bindgen_ty_7 = 32;
#[doc = "The maximum number of colorants available in any given\ncolor/colorspace (not including alpha).\n\nChanging this value will alter the amount of memory being used\n(both stack and heap space), but not hugely. Speed should\n(largely) be determined by the number of colors actually used."]
pub type _bindgen_ty_7 = ::std::os::raw::c_uint;
pub const fz_colorspace_type_FZ_COLORSPACE_NONE: fz_colorspace_type = 0;
pub const fz_colorspace_type_FZ_COLORSPACE_GRAY: fz_colorspace_type = 1;
pub const fz_colorspace_type_FZ_COLORSPACE_RGB: fz_colorspace_type = 2;
pub const fz_colorspace_type_FZ_COLORSPACE_BGR: fz_colorspace_type = 3;
pub const fz_colorspace_type_FZ_COLORSPACE_CMYK: fz_colorspace_type = 4;
pub const fz_colorspace_type_FZ_COLORSPACE_LAB: fz_colorspace_type = 5;
pub const fz_colorspace_type_FZ_COLORSPACE_INDEXED: fz_colorspace_type = 6;
pub const fz_colorspace_type_FZ_COLORSPACE_SEPARATION: fz_colorspace_type = 7;
pub type fz_colorspace_type = ::std::os::raw::c_uint;
pub const FZ_COLORSPACE_IS_DEVICE: _bindgen_ty_8 = 1;
pub const FZ_COLORSPACE_IS_ICC: _bindgen_ty_8 = 2;
pub const FZ_COLORSPACE_HAS_CMYK: _bindgen_ty_8 = 4;
pub const FZ_COLORSPACE_HAS_SPOTS: _bindgen_ty_8 = 8;
pub const FZ_COLORSPACE_HAS_CMYK_AND_SPOTS: _bindgen_ty_8 = 12;
pub type _bindgen_ty_8 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Creates a new colorspace instance and returns a reference.\n\nNo internal checking is done that the colorspace type (e.g.\nCMYK) matches with the flags (e.g. FZ_COLORSPACE_HAS_CMYK) or\ncolorant count (n) or name.\n\nThe reference should be dropped when it is finished with.\n\nColorspaces are immutable once created (with the exception of\nsetting up colorant names for separation spaces)."]
pub fn fz_new_colorspace(
ctx: *mut fz_context,
type_: fz_colorspace_type,
flags: ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
name: *const ::std::os::raw::c_char,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Increment the reference count for the colorspace.\n\nReturns the same pointer. Never throws an exception."]
pub fn fz_keep_colorspace(
ctx: *mut fz_context,
colorspace: *mut fz_colorspace,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Drops a reference to the colorspace.\n\nWhen the reference count reaches zero, the colorspace is\ndestroyed."]
pub fn fz_drop_colorspace(ctx: *mut fz_context, colorspace: *mut fz_colorspace);
}
extern "C" {
#[doc = "Create an indexed colorspace.\n\nThe supplied lookup table is high palette entries long. Each\nentry is n bytes long, where n is given by the number of\ncolorants in the base colorspace, one byte per colorant.\n\nOwnership of lookup is passed it; it will be freed on\ndestruction, so must be heap allocated.\n\nThe colorspace will keep an additional reference to the base\ncolorspace that will be dropped on destruction.\n\nThe returned reference should be dropped when it is finished\nwith.\n\nColorspaces are immutable once created."]
pub fn fz_new_indexed_colorspace(
ctx: *mut fz_context,
base: *mut fz_colorspace,
high: ::std::os::raw::c_int,
lookup: *mut ::std::os::raw::c_uchar,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Create a colorspace from an ICC profile supplied in buf.\n\nLimited checking is done to ensure that the colorspace type is\nappropriate for the supplied ICC profile.\n\nAn additional reference is taken to buf, which will be dropped\non destruction. Ownership is NOT passed in.\n\nThe returned reference should be dropped when it is finished\nwith.\n\nColorspaces are immutable once created."]
pub fn fz_new_icc_colorspace(
ctx: *mut fz_context,
type_: fz_colorspace_type,
flags: ::std::os::raw::c_int,
name: *const ::std::os::raw::c_char,
buf: *mut fz_buffer,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Create a calibrated gray colorspace.\n\nThe returned reference should be dropped when it is finished\nwith.\n\nColorspaces are immutable once created."]
pub fn fz_new_cal_gray_colorspace(
ctx: *mut fz_context,
wp: *mut f32,
bp: *mut f32,
gamma: f32,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Create a calibrated rgb colorspace.\n\nThe returned reference should be dropped when it is finished\nwith.\n\nColorspaces are immutable once created."]
pub fn fz_new_cal_rgb_colorspace(
ctx: *mut fz_context,
wp: *mut f32,
bp: *mut f32,
gamma: *mut f32,
matrix: *mut f32,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Query the type of colorspace."]
pub fn fz_colorspace_type(ctx: *mut fz_context, cs: *mut fz_colorspace) -> fz_colorspace_type;
}
extern "C" {
#[doc = "Query the name of a colorspace.\n\nThe returned string has the same lifespan as the colorspace\ndoes. Caller should not free it."]
pub fn fz_colorspace_name(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Query the number of colorants in a colorspace."]
pub fn fz_colorspace_n(ctx: *mut fz_context, cs: *mut fz_colorspace) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "True for CMYK, Separation and DeviceN colorspaces."]
pub fn fz_colorspace_is_subtractive(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "True if DeviceN color space has only colorants from the CMYK set."]
pub fn fz_colorspace_device_n_has_only_cmyk(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "True if DeviceN color space has cyan magenta yellow or black as\none of its colorants."]
pub fn fz_colorspace_device_n_has_cmyk(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Tests for particular types of colorspaces"]
pub fn fz_colorspace_is_gray(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_rgb(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_cmyk(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_lab(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_indexed(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_device_n(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_device(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_device_gray(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_device_cmyk(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_colorspace_is_lab_icc(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Check to see that a colorspace is appropriate to be used as\na blending space (i.e. only grey, rgb or cmyk)."]
pub fn fz_is_valid_blend_colorspace(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Retrieve global default colorspaces.\n\nThese return borrowed references that should not be dropped,\nunless they are kept first."]
pub fn fz_device_gray(ctx: *mut fz_context) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_device_rgb(ctx: *mut fz_context) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_device_bgr(ctx: *mut fz_context) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_device_cmyk(ctx: *mut fz_context) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_device_lab(ctx: *mut fz_context) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Assign a name for a given colorant in a colorspace.\n\nUsed while initially setting up a colorspace. The string is\ncopied into local storage, so need not be retained by the\ncaller."]
pub fn fz_colorspace_name_colorant(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
n: ::std::os::raw::c_int,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Retrieve a the name for a colorant.\n\nReturns a pointer with the same lifespan as the colorspace."]
pub fn fz_colorspace_colorant(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
n: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Clamp the samples in a color to the correct ranges for a\ngiven colorspace."]
pub fn fz_clamp_color(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
in_: *const f32,
out: *mut f32,
);
}
extern "C" {
#[doc = "Convert color values sv from colorspace ss into colorvalues dv\nfor colorspace ds, via an optional intervening space is,\nrespecting the given color_params."]
pub fn fz_convert_color(
ctx: *mut fz_context,
ss: *mut fz_colorspace,
sv: *const f32,
ds: *mut fz_colorspace,
dv: *mut f32,
is: *mut fz_colorspace,
params: fz_color_params,
);
}
#[doc = "Structure to hold default colorspaces."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_default_colorspaces {
pub refs: ::std::os::raw::c_int,
pub gray: *mut fz_colorspace,
pub rgb: *mut fz_colorspace,
pub cmyk: *mut fz_colorspace,
pub oi: *mut fz_colorspace,
}
#[test]
fn bindgen_test_layout_fz_default_colorspaces() {
const UNINIT: ::std::mem::MaybeUninit<fz_default_colorspaces> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_default_colorspaces>(),
40usize,
concat!("Size of: ", stringify!(fz_default_colorspaces))
);
assert_eq!(
::std::mem::align_of::<fz_default_colorspaces>(),
8usize,
concat!("Alignment of ", stringify!(fz_default_colorspaces))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gray) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(gray)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rgb) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(rgb)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cmyk) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(cmyk)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).oi) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(oi)
)
);
}
extern "C" {
#[doc = "Create a new default colorspace structure with values inherited\nfrom the context, and return a reference to it.\n\nThese can be overridden using fz_set_default_xxxx.\n\nThese should not be overridden while more than one caller has\nthe reference for fear of race conditions.\n\nThe caller should drop this reference once finished with it."]
pub fn fz_new_default_colorspaces(ctx: *mut fz_context) -> *mut fz_default_colorspaces;
}
extern "C" {
#[doc = "Keep an additional reference to the default colorspaces\nstructure.\n\nNever throws exceptions."]
pub fn fz_keep_default_colorspaces(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
) -> *mut fz_default_colorspaces;
}
extern "C" {
#[doc = "Drop a reference to the default colorspaces structure. When the\nreference count reaches 0, the references it holds internally\nto the underlying colorspaces will be dropped, and the structure\nwill be destroyed.\n\nNever throws exceptions."]
pub fn fz_drop_default_colorspaces(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
);
}
extern "C" {
#[doc = "Returns a reference to a newly cloned default colorspaces\nstructure.\n\nThe new clone may safely be altered without fear of race\nconditions as the caller is the only reference holder."]
pub fn fz_clone_default_colorspaces(
ctx: *mut fz_context,
base: *mut fz_default_colorspaces,
) -> *mut fz_default_colorspaces;
}
extern "C" {
#[doc = "Retrieve default colorspaces (typically page local).\n\nIf default_cs is non NULL, the default is retrieved from there,\notherwise the global default is retrieved.\n\nThese return borrowed references that should not be dropped,\nunless they are kept first."]
pub fn fz_default_gray(
ctx: *mut fz_context,
default_cs: *const fz_default_colorspaces,
) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_default_rgb(
ctx: *mut fz_context,
default_cs: *const fz_default_colorspaces,
) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_default_cmyk(
ctx: *mut fz_context,
default_cs: *const fz_default_colorspaces,
) -> *mut fz_colorspace;
}
extern "C" {
pub fn fz_default_output_intent(
ctx: *mut fz_context,
default_cs: *const fz_default_colorspaces,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Set new defaults within the default colorspace structure.\n\nNew references are taken to the new default, and references to\nthe old defaults dropped.\n\nNever throws exceptions."]
pub fn fz_set_default_gray(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
cs: *mut fz_colorspace,
);
}
extern "C" {
pub fn fz_set_default_rgb(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
cs: *mut fz_colorspace,
);
}
extern "C" {
pub fn fz_set_default_cmyk(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
cs: *mut fz_colorspace,
);
}
extern "C" {
pub fn fz_set_default_output_intent(
ctx: *mut fz_context,
default_cs: *mut fz_default_colorspaces,
cs: *mut fz_colorspace,
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_colorspace {
pub key_storable: fz_key_storable,
pub type_: fz_colorspace_type,
pub flags: ::std::os::raw::c_int,
pub n: ::std::os::raw::c_int,
pub name: *mut ::std::os::raw::c_char,
pub u: fz_colorspace__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_colorspace__bindgen_ty_1 {
pub icc: fz_colorspace__bindgen_ty_1__bindgen_ty_1,
pub indexed: fz_colorspace__bindgen_ty_1__bindgen_ty_2,
pub separation: fz_colorspace__bindgen_ty_1__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_colorspace__bindgen_ty_1__bindgen_ty_1 {
pub buffer: *mut fz_buffer,
pub md5: [::std::os::raw::c_uchar; 16usize],
pub profile: *mut fz_icc_profile,
}
#[test]
fn bindgen_test_layout_fz_colorspace__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_colorspace__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).md5) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(md5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(profile)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_colorspace__bindgen_ty_1__bindgen_ty_2 {
pub base: *mut fz_colorspace,
pub high: ::std::os::raw::c_int,
pub lookup: *mut ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout_fz_colorspace__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<fz_colorspace__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>(),
24usize,
concat!(
"Size of: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lookup) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(lookup)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_colorspace__bindgen_ty_1__bindgen_ty_3 {
pub base: *mut fz_colorspace,
pub eval: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
tint: *mut ::std::os::raw::c_void,
s: *const f32,
sn: ::std::os::raw::c_int,
d: *mut f32,
dn: ::std::os::raw::c_int,
),
>,
pub drop: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, tint: *mut ::std::os::raw::c_void),
>,
pub tint: *mut ::std::os::raw::c_void,
pub colorant: [*mut ::std::os::raw::c_char; 32usize],
}
#[test]
fn bindgen_test_layout_fz_colorspace__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<fz_colorspace__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>(),
288usize,
concat!(
"Size of: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eval) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(eval)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tint) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(tint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorant) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(colorant)
)
);
}
#[test]
fn bindgen_test_layout_fz_colorspace__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_colorspace__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1>(),
288usize,
concat!("Size of: ", stringify!(fz_colorspace__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_colorspace__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(fz_colorspace__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).icc) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(icc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).indexed) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(indexed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).separation) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(separation)
)
);
}
#[test]
fn bindgen_test_layout_fz_colorspace() {
const UNINIT: ::std::mem::MaybeUninit<fz_colorspace> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_colorspace>(),
336usize,
concat!("Size of: ", stringify!(fz_colorspace))
);
assert_eq!(
::std::mem::align_of::<fz_colorspace>(),
8usize,
concat!("Alignment of ", stringify!(fz_colorspace))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).key_storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(key_storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(u)
)
);
}
extern "C" {
pub fn fz_drop_colorspace_imp(ctx: *mut fz_context, cs_: *mut fz_storable);
}
pub const FZ_MAX_SEPARATIONS: _bindgen_ty_9 = 64;
#[doc = "A fz_separation structure holds details of a set of separations\n(such as might be used on within a page of the document).\n\nThe app might control the separations by enabling/disabling them,\nand subsequent renders would take this into account."]
pub type _bindgen_ty_9 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_separations {
_unused: [u8; 0],
}
pub const fz_separation_behavior_FZ_SEPARATION_COMPOSITE: fz_separation_behavior = 0;
pub const fz_separation_behavior_FZ_SEPARATION_SPOT: fz_separation_behavior = 1;
pub const fz_separation_behavior_FZ_SEPARATION_DISABLED: fz_separation_behavior = 2;
pub type fz_separation_behavior = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Create a new separations structure (initially empty)"]
pub fn fz_new_separations(
ctx: *mut fz_context,
controllable: ::std::os::raw::c_int,
) -> *mut fz_separations;
}
extern "C" {
#[doc = "Increment the reference count for a separations structure.\nReturns the same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_separations(
ctx: *mut fz_context,
sep: *mut fz_separations,
) -> *mut fz_separations;
}
extern "C" {
#[doc = "Decrement the reference count for a separations structure.\nWhen the reference count hits zero, the separations structure\nis freed.\n\nNever throws exceptions."]
pub fn fz_drop_separations(ctx: *mut fz_context, sep: *mut fz_separations);
}
extern "C" {
#[doc = "Add a separation (null terminated name, colorspace)"]
pub fn fz_add_separation(
ctx: *mut fz_context,
sep: *mut fz_separations,
name: *const ::std::os::raw::c_char,
cs: *mut fz_colorspace,
cs_channel: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Add a separation with equivalents (null terminated name,\ncolorspace)\n\n(old, deprecated)"]
pub fn fz_add_separation_equivalents(
ctx: *mut fz_context,
sep: *mut fz_separations,
rgba: u32,
cmyk: u32,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Control the rendering of a given separation."]
pub fn fz_set_separation_behavior(
ctx: *mut fz_context,
sep: *mut fz_separations,
separation: ::std::os::raw::c_int,
behavior: fz_separation_behavior,
);
}
extern "C" {
#[doc = "Test for the current behavior of a separation."]
pub fn fz_separation_current_behavior(
ctx: *mut fz_context,
sep: *const fz_separations,
separation: ::std::os::raw::c_int,
) -> fz_separation_behavior;
}
extern "C" {
pub fn fz_separation_name(
ctx: *mut fz_context,
sep: *const fz_separations,
separation: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_count_separations(
ctx: *mut fz_context,
sep: *const fz_separations,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the number of active separations."]
pub fn fz_count_active_separations(
ctx: *mut fz_context,
seps: *const fz_separations,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return a separations object with all the spots in the input\nseparations object that are set to composite, reset to be\nenabled. If there ARE no spots in the object, this returns\nNULL. If the object already has all its spots enabled, then\njust returns another handle on the same object."]
pub fn fz_clone_separations_for_overprint(
ctx: *mut fz_context,
seps: *mut fz_separations,
) -> *mut fz_separations;
}
extern "C" {
#[doc = "Convert a color given in terms of one colorspace,\nto a color in terms of another colorspace/separations."]
pub fn fz_convert_separation_colors(
ctx: *mut fz_context,
src_cs: *mut fz_colorspace,
src_color: *const f32,
dst_seps: *mut fz_separations,
dst_cs: *mut fz_colorspace,
dst_color: *mut f32,
color_params: fz_color_params,
);
}
extern "C" {
#[doc = "Get the equivalent separation color in a given colorspace."]
pub fn fz_separation_equivalent(
ctx: *mut fz_context,
seps: *const fz_separations,
idx: ::std::os::raw::c_int,
dst_cs: *mut fz_colorspace,
dst_color: *mut f32,
prf: *mut fz_colorspace,
color_params: fz_color_params,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_overprint {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Return the bounding box for a pixmap."]
pub fn fz_pixmap_bbox(ctx: *mut fz_context, pix: *const fz_pixmap) -> fz_irect;
}
extern "C" {
#[doc = "Return the width of the pixmap in pixels."]
pub fn fz_pixmap_width(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the height of the pixmap in pixels."]
pub fn fz_pixmap_height(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the x value of the pixmap in pixels."]
pub fn fz_pixmap_x(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the y value of the pixmap in pixels."]
pub fn fz_pixmap_y(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Create a new pixmap, with its origin at (0,0)\n\ncs: The colorspace to use for the pixmap, or NULL for an alpha\nplane/mask.\n\nw: The width of the pixmap (in pixels)\n\nh: The height of the pixmap (in pixels)\n\nseps: Details of separations.\n\nalpha: 0 for no alpha, 1 for alpha.\n\nReturns a pointer to the new pixmap. Throws exception on failure\nto allocate."]
pub fn fz_new_pixmap(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Create a pixmap of a given size, location and pixel format.\n\nThe bounding box specifies the size of the created pixmap and\nwhere it will be located. The colorspace determines the number\nof components per pixel. Alpha is always present. Pixmaps are\nreference counted, so drop references using fz_drop_pixmap.\n\ncolorspace: Colorspace format used for the created pixmap. The\npixmap will keep a reference to the colorspace.\n\nbbox: Bounding box specifying location/size of created pixmap.\n\nseps: Details of separations.\n\nalpha: 0 for no alpha, 1 for alpha.\n\nReturns a pointer to the new pixmap. Throws exception on failure\nto allocate."]
pub fn fz_new_pixmap_with_bbox(
ctx: *mut fz_context,
colorspace: *mut fz_colorspace,
bbox: fz_irect,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Create a new pixmap, with its origin at\n(0,0) using the supplied data block.\n\ncs: The colorspace to use for the pixmap, or NULL for an alpha\nplane/mask.\n\nw: The width of the pixmap (in pixels)\n\nh: The height of the pixmap (in pixels)\n\nseps: Details of separations.\n\nalpha: 0 for no alpha, 1 for alpha.\n\nstride: The byte offset from the pixel data in a row to the\npixel data in the next row.\n\nsamples: The data block to keep the samples in.\n\nReturns a pointer to the new pixmap. Throws exception on failure to\nallocate."]
pub fn fz_new_pixmap_with_data(
ctx: *mut fz_context,
colorspace: *mut fz_colorspace,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
stride: ::std::os::raw::c_int,
samples: *mut ::std::os::raw::c_uchar,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Create a pixmap of a given size, location and pixel format,\nusing the supplied data block.\n\nThe bounding box specifies the size of the created pixmap and\nwhere it will be located. The colorspace determines the number\nof components per pixel. Alpha is always present. Pixmaps are\nreference counted, so drop references using fz_drop_pixmap.\n\ncolorspace: Colorspace format used for the created pixmap. The\npixmap will keep a reference to the colorspace.\n\nrect: Bounding box specifying location/size of created pixmap.\n\nseps: Details of separations.\n\nalpha: Number of alpha planes (0 or 1).\n\nsamples: The data block to keep the samples in.\n\nReturns a pointer to the new pixmap. Throws exception on failure\nto allocate."]
pub fn fz_new_pixmap_with_bbox_and_data(
ctx: *mut fz_context,
colorspace: *mut fz_colorspace,
rect: fz_irect,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
samples: *mut ::std::os::raw::c_uchar,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Create a new pixmap that represents a subarea of the specified\npixmap. A reference is taken to this pixmap that will be dropped\non destruction.\n\nThe supplied rectangle must be wholly contained within the\noriginal pixmap.\n\nReturns a pointer to the new pixmap. Throws exception on failure\nto allocate."]
pub fn fz_new_pixmap_from_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
rect: *const fz_irect,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Clone a pixmap, copying the pixels and associated data to new\nstorage.\n\nThe reference count of 'old' is unchanged."]
pub fn fz_clone_pixmap(ctx: *mut fz_context, old: *const fz_pixmap) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Increment the reference count for the pixmap. The same pointer\nis returned.\n\nNever throws exceptions."]
pub fn fz_keep_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Decrement the reference count for the pixmap. When the\nreference count hits 0, the pixmap is freed.\n\nNever throws exceptions."]
pub fn fz_drop_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Return the colorspace of a pixmap\n\nReturns colorspace."]
pub fn fz_pixmap_colorspace(ctx: *mut fz_context, pix: *const fz_pixmap) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Return the number of components in a pixmap.\n\nReturns the number of components (including spots and alpha)."]
pub fn fz_pixmap_components(
ctx: *mut fz_context,
pix: *const fz_pixmap,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the number of colorants in a pixmap.\n\nReturns the number of colorants (components, less any spots and\nalpha)."]
pub fn fz_pixmap_colorants(
ctx: *mut fz_context,
pix: *const fz_pixmap,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the number of spots in a pixmap.\n\nReturns the number of spots (components, less colorants and\nalpha). Does not throw exceptions."]
pub fn fz_pixmap_spots(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the number of alpha planes in a pixmap.\n\nReturns the number of alphas. Does not throw exceptions."]
pub fn fz_pixmap_alpha(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Returns a pointer to the pixel data of a pixmap.\n\nReturns the pointer."]
pub fn fz_pixmap_samples(
ctx: *mut fz_context,
pix: *const fz_pixmap,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Return the number of bytes in a row in the pixmap."]
pub fn fz_pixmap_stride(ctx: *mut fz_context, pix: *const fz_pixmap) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Set the pixels per inch resolution of the pixmap."]
pub fn fz_set_pixmap_resolution(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
xres: ::std::os::raw::c_int,
yres: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Clears a pixmap with the given value.\n\npix: The pixmap to clear.\n\nvalue: Values in the range 0 to 255 are valid. Each component\nsample for each pixel in the pixmap will be set to this value,\nwhile alpha will always be set to 255 (non-transparent).\n\nThis function is horrible, and should be removed from the\nAPI and replaced with a less magic one."]
pub fn fz_clear_pixmap_with_value(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
value: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Fill pixmap with solid color."]
pub fn fz_fill_pixmap_with_color(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
colorspace: *mut fz_colorspace,
color: *mut f32,
color_params: fz_color_params,
);
}
extern "C" {
#[doc = "Clears a subrect of a pixmap with the given value.\n\npix: The pixmap to clear.\n\nvalue: Values in the range 0 to 255 are valid. Each component\nsample for each pixel in the pixmap will be set to this value,\nwhile alpha will always be set to 255 (non-transparent).\n\nr: the rectangle."]
pub fn fz_clear_pixmap_rect_with_value(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
value: ::std::os::raw::c_int,
r: fz_irect,
);
}
extern "C" {
#[doc = "Sets all components (including alpha) of\nall pixels in a pixmap to 0.\n\npix: The pixmap to clear."]
pub fn fz_clear_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Invert all the pixels in a pixmap. All components (process and\nspots) of all pixels are inverted (except alpha, which is\nunchanged)."]
pub fn fz_invert_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Invert the alpha fo all the pixels in a pixmap."]
pub fn fz_invert_pixmap_alpha(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Transform the pixels in a pixmap so that luminance of each\npixel is inverted, and the chrominance remains unchanged (as\nmuch as accuracy allows).\n\nAll components of all pixels are inverted (except alpha, which\nis unchanged). Only supports Grey and RGB bitmaps."]
pub fn fz_invert_pixmap_luminance(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Tint all the pixels in an RGB, BGR, or Gray pixmap.\n\nblack: Map black to this hexadecimal RGB color.\n\nwhite: Map white to this hexadecimal RGB color."]
pub fn fz_tint_pixmap(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
black: ::std::os::raw::c_int,
white: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Invert all the pixels in a given rectangle of a (premultiplied)\npixmap. All components of all pixels in the rectangle are\ninverted (except alpha, which is unchanged)."]
pub fn fz_invert_pixmap_rect(ctx: *mut fz_context, image: *mut fz_pixmap, rect: fz_irect);
}
extern "C" {
#[doc = "Invert all the pixels in a non-premultiplied pixmap in a\nvery naive manner."]
pub fn fz_invert_pixmap_raw(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Apply gamma correction to a pixmap. All components\nof all pixels are modified (except alpha, which is unchanged).\n\ngamma: The gamma value to apply; 1.0 for no change."]
pub fn fz_gamma_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap, gamma: f32);
}
extern "C" {
#[doc = "Convert an existing pixmap to a desired\ncolorspace. Other properties of the pixmap, such as resolution\nand position are copied to the converted pixmap.\n\npix: The pixmap to convert.\n\ndefault_cs: If NULL pix->colorspace is used. It is possible that\nthe data may need to be interpreted as one of the color spaces\nin default_cs.\n\ncs_des: Desired colorspace, may be NULL to denote alpha-only.\n\nprf: Proofing color space through which we need to convert.\n\ncolor_params: Parameters that may be used in conversion (e.g.\nri).\n\nkeep_alpha: If 0 any alpha component is removed, otherwise\nalpha is kept if present in the pixmap."]
pub fn fz_convert_pixmap(
ctx: *mut fz_context,
pix: *const fz_pixmap,
cs_des: *mut fz_colorspace,
prf: *mut fz_colorspace,
default_cs: *mut fz_default_colorspaces,
color_params: fz_color_params,
keep_alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Check if the pixmap is a 1-channel image containing samples with\nonly values 0 and 255"]
pub fn fz_is_pixmap_monochrome(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_alpha_from_gray(ctx: *mut fz_context, gray: *mut fz_pixmap) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_decode_tile(ctx: *mut fz_context, pix: *mut fz_pixmap, decode: *const f32);
}
extern "C" {
pub fn fz_md5_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
digest: *mut ::std::os::raw::c_uchar,
);
}
extern "C" {
pub fn fz_unpack_stream(
ctx: *mut fz_context,
src: *mut fz_stream,
depth: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
indexed: ::std::os::raw::c_int,
pad: ::std::os::raw::c_int,
skip: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
#[doc = "Pixmaps represent a set of pixels for a 2 dimensional region of\na plane. Each pixel has n components per pixel. The components\nare in the order process-components, spot-colors, alpha, where\nthere can be 0 of any of those types. The data is in\npremultiplied alpha when rendering, but non-premultiplied for\ncolorspace conversions and rescaling.\n\nx, y: The minimum x and y coord of the region in pixels.\n\nw, h: The width and height of the region in pixels.\n\nn: The number of color components in the image.\nn = num composite colors + num spots + num alphas\n\ns: The number of spot channels in the image.\n\nalpha: 0 for no alpha, 1 for alpha present.\n\nflags: flag bits.\nBit 0: If set, draw the image with linear interpolation.\nBit 1: If set, free the samples buffer when the pixmap\nis destroyed.\n\nstride: The byte offset from the data for any given pixel\nto the data for the same pixel on the row below.\n\nseps: NULL, or a pointer to a separations structure. If NULL,\ns should be 0.\n\nxres, yres: Image resolution in dpi. Default is 96 dpi.\n\ncolorspace: Pointer to a colorspace object describing the\ncolorspace the pixmap is in. If NULL, the image is a mask.\n\nsamples: Pointer to the first byte of the pixmap sample data.\nThis is typically a simple block of memory w * h * n bytes of\nmemory in which the components are stored linearly, but with the\nuse of appropriate stride values, scanlines can be stored in\ndifferent orders, and have different amounts of padding. The\nfirst n bytes are components 0 to n-1 for the pixel at (x,y).\nEach successive n bytes gives another pixel in scanline order\nas we move across the line. The start of each scanline is offset\nthe start of the previous one by stride bytes."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pixmap {
pub storable: fz_storable,
pub x: ::std::os::raw::c_int,
pub y: ::std::os::raw::c_int,
pub w: ::std::os::raw::c_int,
pub h: ::std::os::raw::c_int,
pub n: ::std::os::raw::c_uchar,
pub s: ::std::os::raw::c_uchar,
pub alpha: ::std::os::raw::c_uchar,
pub flags: ::std::os::raw::c_uchar,
pub stride: isize,
pub seps: *mut fz_separations,
pub xres: ::std::os::raw::c_int,
pub yres: ::std::os::raw::c_int,
pub colorspace: *mut fz_colorspace,
pub samples: *mut ::std::os::raw::c_uchar,
pub underlying: *mut fz_pixmap,
}
#[test]
fn bindgen_test_layout_fz_pixmap() {
const UNINIT: ::std::mem::MaybeUninit<fz_pixmap> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_pixmap>(),
88usize,
concat!("Size of: ", stringify!(fz_pixmap))
);
assert_eq!(
::std::mem::align_of::<fz_pixmap>(),
8usize,
concat!("Alignment of ", stringify!(fz_pixmap))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(s)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
35usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(stride)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).seps) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(seps)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xres) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).yres) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).samples) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(samples)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).underlying) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(underlying)
)
);
}
pub const FZ_PIXMAP_FLAG_INTERPOLATE: _bindgen_ty_10 = 1;
pub const FZ_PIXMAP_FLAG_FREE_SAMPLES: _bindgen_ty_10 = 2;
pub type _bindgen_ty_10 = ::std::os::raw::c_uint;
extern "C" {
pub fn fz_warp_pixmap(
ctx: *mut fz_context,
src: *mut fz_pixmap,
points: *const fz_point,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_clone_pixmap_area_with_different_seps(
ctx: *mut fz_context,
src: *mut fz_pixmap,
bbox: *const fz_irect,
dcs: *mut fz_colorspace,
seps: *mut fz_separations,
color_params: fz_color_params,
default_cs: *mut fz_default_colorspaces,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_alpha_channel(
ctx: *mut fz_context,
src: *mut fz_pixmap,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_color_and_mask(
ctx: *mut fz_context,
color: *mut fz_pixmap,
mask: *mut fz_pixmap,
) -> *mut fz_pixmap;
}
#[doc = "Bitmaps have 1 bit per component. Only used for creating\nhalftoned versions of contone buffers, and saving out. Samples\nare stored msb first, akin to pbms.\n\nThe internals of this struct are considered implementation\ndetails and subject to change. Where possible, accessor\nfunctions should be used in preference."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_bitmap {
pub refs: ::std::os::raw::c_int,
pub w: ::std::os::raw::c_int,
pub h: ::std::os::raw::c_int,
pub stride: ::std::os::raw::c_int,
pub n: ::std::os::raw::c_int,
pub xres: ::std::os::raw::c_int,
pub yres: ::std::os::raw::c_int,
pub samples: *mut ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout_fz_bitmap() {
const UNINIT: ::std::mem::MaybeUninit<fz_bitmap> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_bitmap>(),
40usize,
concat!("Size of: ", stringify!(fz_bitmap))
);
assert_eq!(
::std::mem::align_of::<fz_bitmap>(),
8usize,
concat!("Alignment of ", stringify!(fz_bitmap))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(stride)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xres) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).yres) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).samples) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(samples)
)
);
}
extern "C" {
#[doc = "Take an additional reference to the bitmap. The same pointer\nis returned.\n\nNever throws exceptions."]
pub fn fz_keep_bitmap(ctx: *mut fz_context, bit: *mut fz_bitmap) -> *mut fz_bitmap;
}
extern "C" {
#[doc = "Drop a reference to the bitmap. When the reference count reaches\nzero, the bitmap will be destroyed.\n\nNever throws exceptions."]
pub fn fz_drop_bitmap(ctx: *mut fz_context, bit: *mut fz_bitmap);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_halftone {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Make a bitmap from a pixmap and a halftone.\n\npix: The pixmap to generate from. Currently must be a single\ncolor component with no alpha.\n\nht: The halftone to use. NULL implies the default halftone.\n\nReturns the resultant bitmap. Throws exceptions in the case of\nfailure to allocate."]
pub fn fz_new_bitmap_from_pixmap(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
ht: *mut fz_halftone,
) -> *mut fz_bitmap;
}
extern "C" {
#[doc = "Make a bitmap from a pixmap and a\nhalftone, allowing for the position of the pixmap within an\noverall banded rendering.\n\npix: The pixmap to generate from. Currently must be a single\ncolor component with no alpha.\n\nht: The halftone to use. NULL implies the default halftone.\n\nband_start: Vertical offset within the overall banded rendering\n(in pixels)\n\nReturns the resultant bitmap. Throws exceptions in the case of\nfailure to allocate."]
pub fn fz_new_bitmap_from_pixmap_band(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
ht: *mut fz_halftone,
band_start: ::std::os::raw::c_int,
) -> *mut fz_bitmap;
}
extern "C" {
#[doc = "Create a new bitmap.\n\nw, h: Width and Height for the bitmap\n\nn: Number of color components (assumed to be a divisor of 8)\n\nxres, yres: X and Y resolutions (in pixels per inch).\n\nReturns pointer to created bitmap structure. The bitmap\ndata is uninitialised."]
pub fn fz_new_bitmap(
ctx: *mut fz_context,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
xres: ::std::os::raw::c_int,
yres: ::std::os::raw::c_int,
) -> *mut fz_bitmap;
}
extern "C" {
#[doc = "Retrieve details of a given bitmap.\n\nbitmap: The bitmap to query.\n\nw: Pointer to storage to retrieve width (or NULL).\n\nh: Pointer to storage to retrieve height (or NULL).\n\nn: Pointer to storage to retrieve number of color components (or\nNULL).\n\nstride: Pointer to storage to retrieve bitmap stride (or NULL)."]
pub fn fz_bitmap_details(
bitmap: *mut fz_bitmap,
w: *mut ::std::os::raw::c_int,
h: *mut ::std::os::raw::c_int,
n: *mut ::std::os::raw::c_int,
stride: *mut ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Set the entire bitmap to 0.\n\nNever throws exceptions."]
pub fn fz_clear_bitmap(ctx: *mut fz_context, bit: *mut fz_bitmap);
}
extern "C" {
#[doc = "Create a 'default' halftone structure\nfor the given number of components.\n\nnum_comps: The number of components to use.\n\nReturns a simple default halftone. The default halftone uses\nthe same halftone tile for each plane, which may not be ideal\nfor all purposes."]
pub fn fz_default_halftone(
ctx: *mut fz_context,
num_comps: ::std::os::raw::c_int,
) -> *mut fz_halftone;
}
extern "C" {
#[doc = "Take an additional reference to the halftone. The same pointer\nis returned.\n\nNever throws exceptions."]
pub fn fz_keep_halftone(ctx: *mut fz_context, half: *mut fz_halftone) -> *mut fz_halftone;
}
extern "C" {
#[doc = "Drop a reference to the halftone. When the reference count\nreaches zero, the halftone is destroyed.\n\nNever throws exceptions."]
pub fn fz_drop_halftone(ctx: *mut fz_context, ht: *mut fz_halftone);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_compressed_image {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pixmap_image {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Called to get a handle to a pixmap from an image.\n\nimage: The image to retrieve a pixmap from.\n\nsubarea: The subarea of the image that we actually care about\n(or NULL to indicate the whole image).\n\nctm: Optional, unless subarea is given. If given, then on\nentry this is the transform that will be applied to the complete\nimage. It should be updated on exit to the transform to apply to\nthe given subarea of the image. This is used to calculate the\ndesired width/height for subsampling.\n\nw: If non-NULL, a pointer to an int to be updated on exit to the\nwidth (in pixels) that the scaled output will cover.\n\nh: If non-NULL, a pointer to an int to be updated on exit to the\nheight (in pixels) that the scaled output will cover.\n\nReturns a non NULL kept pixmap pointer. May throw exceptions."]
pub fn fz_get_pixmap_from_image(
ctx: *mut fz_context,
image: *mut fz_image,
subarea: *const fz_irect,
ctm: *mut fz_matrix,
w: *mut ::std::os::raw::c_int,
h: *mut ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Calls fz_get_pixmap_from_image() with ctm, subarea, w and h all set to NULL."]
pub fn fz_get_unscaled_pixmap_from_image(
ctx: *mut fz_context,
image: *mut fz_image,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Increment the (normal) reference count for an image. Returns the\nsame pointer.\n\nNever throws exceptions."]
pub fn fz_keep_image(ctx: *mut fz_context, image: *mut fz_image) -> *mut fz_image;
}
extern "C" {
#[doc = "Decrement the (normal) reference count for an image. When the\ntotal (normal + key) reference count reaches zero, the image and\nits resources are freed.\n\nNever throws exceptions."]
pub fn fz_drop_image(ctx: *mut fz_context, image: *mut fz_image);
}
extern "C" {
#[doc = "Increment the store key reference for an image. Returns the same\npointer. (This is the count of references for an image held by\nkeys in the image store).\n\nNever throws exceptions."]
pub fn fz_keep_image_store_key(ctx: *mut fz_context, image: *mut fz_image) -> *mut fz_image;
}
extern "C" {
#[doc = "Decrement the store key reference count for an image. When the\ntotal (normal + key) reference count reaches zero, the image and\nits resources are freed.\n\nNever throws exceptions."]
pub fn fz_drop_image_store_key(ctx: *mut fz_context, image: *mut fz_image);
}
#[doc = "Function type to destroy an images data\nwhen it's reference count reaches zero."]
pub type fz_drop_image_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, image: *mut fz_image)>;
#[doc = "Function type to get a decoded pixmap for an image.\n\nim: The image to decode.\n\nsubarea: NULL, or the subarea of the image required. Expressed\nin terms of a rectangle in the original width/height of the\nimage. If non NULL, this should be updated by the function to\nthe actual subarea decoded - which must include the requested\narea!\n\nw, h: The actual width and height that the whole image would\nneed to be decoded to.\n\nl2factor: On entry, the log 2 subsample factor required. If\npossible the decode process can take care of (all or some) of\nthis subsampling, and must then update the value so the caller\nknows what remains to be done.\n\nReturns a reference to a decoded pixmap that satisfies the\nrequirements of the request. The caller owns the returned\nreference."]
pub type fz_image_get_pixmap_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
im: *mut fz_image,
subarea: *mut fz_irect,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
l2factor: *mut ::std::os::raw::c_int,
) -> *mut fz_pixmap,
>;
#[doc = "Function type to get the given storage\nsize for an image.\n\nReturns the size in bytes used for a given image."]
pub type fz_image_get_size_fn = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_image) -> usize,
>;
extern "C" {
#[doc = "Internal function to make a new fz_image structure\nfor a derived class.\n\nw,h: Width and height of the created image.\n\nbpc: Bits per component.\n\ncolorspace: The colorspace (determines the number of components,\nand any color conversions required while decoding).\n\nxres, yres: The X and Y resolutions respectively.\n\ninterpolate: 1 if interpolation should be used when decoding\nthis image, 0 otherwise.\n\nimagemask: 1 if this is an imagemask (i.e. transparent), 0\notherwise.\n\ndecode: NULL, or a pointer to to a decode array. The default\ndecode array is [0 1] (repeated n times, for n color components).\n\ncolorkey: NULL, or a pointer to a colorkey array. The default\ncolorkey array is [0 255] (repeated n times, for n color\ncomponents).\n\nmask: NULL, or another image to use as a mask for this one.\nA new reference is taken to this image. Supplying a masked\nimage as a mask to another image is illegal!\n\nsize: The size of the required allocated structure (the size of\nthe derived structure).\n\nget: The function to be called to obtain a decoded pixmap.\n\nget_size: The function to be called to return the storage size\nused by this image.\n\ndrop: The function to be called to dispose of this image once\nthe last reference is dropped.\n\nReturns a pointer to an allocated structure of the required size,\nwith the first sizeof(fz_image) bytes initialised as appropriate\ngiven the supplied parameters, and the other bytes set to zero."]
pub fn fz_new_image_of_size(
ctx: *mut fz_context,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
bpc: ::std::os::raw::c_int,
colorspace: *mut fz_colorspace,
xres: ::std::os::raw::c_int,
yres: ::std::os::raw::c_int,
interpolate: ::std::os::raw::c_int,
imagemask: ::std::os::raw::c_int,
decode: *mut f32,
colorkey: *mut ::std::os::raw::c_int,
mask: *mut fz_image,
size: usize,
get_pixmap: fz_image_get_pixmap_fn,
get_size: fz_image_get_size_fn,
drop: fz_drop_image_fn,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Create an image based on\nthe data in the supplied compressed buffer.\n\nw,h: Width and height of the created image.\n\nbpc: Bits per component.\n\ncolorspace: The colorspace (determines the number of components,\nand any color conversions required while decoding).\n\nxres, yres: The X and Y resolutions respectively.\n\ninterpolate: 1 if interpolation should be used when decoding\nthis image, 0 otherwise.\n\nimagemask: 1 if this is an imagemask (i.e. transparency bitmap\nmask), 0 otherwise.\n\ndecode: NULL, or a pointer to to a decode array. The default\ndecode array is [0 1] (repeated n times, for n color components).\n\ncolorkey: NULL, or a pointer to a colorkey array. The default\ncolorkey array is [0 255] (repeated n times, for n color\ncomponents).\n\nbuffer: Buffer of compressed data and compression parameters.\nOwnership of this reference is passed in.\n\nmask: NULL, or another image to use as a mask for this one.\nA new reference is taken to this image. Supplying a masked\nimage as a mask to another image is illegal!"]
pub fn fz_new_image_from_compressed_buffer(
ctx: *mut fz_context,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
bpc: ::std::os::raw::c_int,
colorspace: *mut fz_colorspace,
xres: ::std::os::raw::c_int,
yres: ::std::os::raw::c_int,
interpolate: ::std::os::raw::c_int,
imagemask: ::std::os::raw::c_int,
decode: *mut f32,
colorkey: *mut ::std::os::raw::c_int,
buffer: *mut fz_compressed_buffer,
mask: *mut fz_image,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Create an image from the given\npixmap.\n\npixmap: The pixmap to base the image upon. A new reference\nto this is taken.\n\nmask: NULL, or another image to use as a mask for this one.\nA new reference is taken to this image. Supplying a masked\nimage as a mask to another image is illegal!"]
pub fn fz_new_image_from_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
mask: *mut fz_image,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Create a new image from a\nbuffer of data, inferring its type from the format\nof the data."]
pub fn fz_new_image_from_buffer(ctx: *mut fz_context, buffer: *mut fz_buffer) -> *mut fz_image;
}
extern "C" {
#[doc = "Create a new image from the contents\nof a file, inferring its type from the format of the\ndata."]
pub fn fz_new_image_from_file(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Internal destructor exposed for fz_store integration."]
pub fn fz_drop_image_imp(ctx: *mut fz_context, image: *mut fz_storable);
}
extern "C" {
#[doc = "Internal destructor for the base image class members.\n\nExposed to allow derived image classes to be written."]
pub fn fz_drop_image_base(ctx: *mut fz_context, image: *mut fz_image);
}
extern "C" {
#[doc = "Decode a subarea of a compressed image. l2factor is the amount\nof subsampling inbuilt to the stream (i.e. performed by the\ndecoder). If non NULL, l2extra is the extra amount of\nsubsampling that should be performed by this routine. This will\nbe updated on exit to the amount of subsampling that is still\nrequired to be done.\n\nReturns a kept reference."]
pub fn fz_decomp_image_from_stream(
ctx: *mut fz_context,
stm: *mut fz_stream,
image: *mut fz_compressed_image,
subarea: *mut fz_irect,
indexed: ::std::os::raw::c_int,
l2factor: ::std::os::raw::c_int,
l2extra: *mut ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Convert pixmap from indexed to base colorspace.\n\nThis creates a new bitmap containing the converted pixmap data."]
pub fn fz_convert_indexed_pixmap_to_base(
ctx: *mut fz_context,
src: *const fz_pixmap,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Convert pixmap from DeviceN/Separation to base colorspace.\n\nThis creates a new bitmap containing the converted pixmap data."]
pub fn fz_convert_separation_pixmap_to_base(
ctx: *mut fz_context,
src: *const fz_pixmap,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Return the size of the storage used by an image."]
pub fn fz_image_size(ctx: *mut fz_context, im: *mut fz_image) -> usize;
}
#[doc = "Structure is public to allow other structures to\nbe derived from it. Do not access members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_image {
pub key_storable: fz_key_storable,
pub w: ::std::os::raw::c_int,
pub h: ::std::os::raw::c_int,
pub n: u8,
pub bpc: u8,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub orientation: u8,
pub mask: *mut fz_image,
pub xres: ::std::os::raw::c_int,
pub yres: ::std::os::raw::c_int,
pub colorspace: *mut fz_colorspace,
pub drop_image: fz_drop_image_fn,
pub get_pixmap: fz_image_get_pixmap_fn,
pub get_size: fz_image_get_size_fn,
pub colorkey: [::std::os::raw::c_int; 64usize],
pub decode: [f32; 64usize],
}
#[test]
fn bindgen_test_layout_fz_image() {
const UNINIT: ::std::mem::MaybeUninit<fz_image> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_image>(),
600usize,
concat!("Size of: ", stringify!(fz_image))
);
assert_eq!(
::std::mem::align_of::<fz_image>(),
8usize,
concat!("Alignment of ", stringify!(fz_image))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).key_storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(key_storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpc) as usize - ptr as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(bpc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orientation) as usize - ptr as usize },
35usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xres) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).yres) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_image) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(drop_image)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).get_pixmap) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(get_pixmap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).get_size) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(get_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorkey) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(colorkey)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).decode) as usize - ptr as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(decode)
)
);
}
impl fz_image {
#[inline]
pub fn imagemask(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_imagemask(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn interpolate(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_interpolate(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn use_colorkey(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_use_colorkey(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn use_decode(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_use_decode(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn decoded(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_decoded(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn scalable(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
}
#[inline]
pub fn set_scalable(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
imagemask: ::std::os::raw::c_uint,
interpolate: ::std::os::raw::c_uint,
use_colorkey: ::std::os::raw::c_uint,
use_decode: ::std::os::raw::c_uint,
decoded: ::std::os::raw::c_uint,
scalable: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let imagemask: u32 = unsafe { ::std::mem::transmute(imagemask) };
imagemask as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let interpolate: u32 = unsafe { ::std::mem::transmute(interpolate) };
interpolate as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let use_colorkey: u32 = unsafe { ::std::mem::transmute(use_colorkey) };
use_colorkey as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let use_decode: u32 = unsafe { ::std::mem::transmute(use_decode) };
use_decode as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let decoded: u32 = unsafe { ::std::mem::transmute(decoded) };
decoded as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let scalable: u32 = unsafe { ::std::mem::transmute(scalable) };
scalable as u64
});
__bindgen_bitfield_unit
}
}
extern "C" {
#[doc = "Request the natural resolution\nof an image.\n\nxres, yres: Pointers to ints to be updated with the\nnatural resolution of an image (or a sensible default\nif not encoded)."]
pub fn fz_image_resolution(
image: *mut fz_image,
xres: *mut ::std::os::raw::c_int,
yres: *mut ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Request the natural orientation of an image.\n\nThis is for images (such as JPEG) that can contain internal\nspecifications of rotation/flips. This is ignored by all the\ninternal decode/rendering routines, but can be used by callers\n(such as the image document handler) to respect such\nspecifications.\n\nThe values used by MuPDF are as follows, with the equivalent\nExif specifications given for information:\n\n0: Undefined\n1: 0 degree ccw rotation. (Exif = 1)\n2: 90 degree ccw rotation. (Exif = 8)\n3: 180 degree ccw rotation. (Exif = 3)\n4: 270 degree ccw rotation. (Exif = 6)\n5: flip on X. (Exif = 2)\n6: flip on X, then rotate ccw by 90 degrees. (Exif = 5)\n7: flip on X, then rotate ccw by 180 degrees. (Exif = 4)\n8: flip on X, then rotate ccw by 270 degrees. (Exif = 7)"]
pub fn fz_image_orientation(ctx: *mut fz_context, image: *mut fz_image) -> u8;
}
extern "C" {
pub fn fz_image_orientation_matrix(ctx: *mut fz_context, image: *mut fz_image) -> fz_matrix;
}
extern "C" {
#[doc = "Retrieve the underlying compressed data for an image.\n\nReturns a pointer to the underlying data buffer for an image,\nor NULL if this image is not based upon a compressed data\nbuffer.\n\nThis is not a reference counted structure, so no reference is\nreturned. Lifespan is limited to that of the image itself."]
pub fn fz_compressed_image_buffer(
ctx: *mut fz_context,
image: *mut fz_image,
) -> *mut fz_compressed_buffer;
}
extern "C" {
pub fn fz_set_compressed_image_buffer(
ctx: *mut fz_context,
cimg: *mut fz_compressed_image,
buf: *mut fz_compressed_buffer,
);
}
extern "C" {
#[doc = "Retrieve the underlying fz_pixmap for an image.\n\nReturns a pointer to the underlying fz_pixmap for an image,\nor NULL if this image is not based upon an fz_pixmap.\n\nNo reference is returned. Lifespan is limited to that of\nthe image itself. If required, use fz_keep_pixmap to take\na reference to keep it longer."]
pub fn fz_pixmap_image_tile(ctx: *mut fz_context, cimg: *mut fz_pixmap_image)
-> *mut fz_pixmap;
}
extern "C" {
pub fn fz_set_pixmap_image_tile(
ctx: *mut fz_context,
cimg: *mut fz_pixmap_image,
pix: *mut fz_pixmap,
);
}
extern "C" {
#[doc = "Exposed for PDF."]
pub fn fz_load_jpx(
ctx: *mut fz_context,
data: *const ::std::os::raw::c_uchar,
size: usize,
cs: *mut fz_colorspace,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Exposed for CBZ."]
pub fn fz_load_tiff_subimage_count(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_load_tiff_subimage(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
subimage: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_load_pnm_subimage_count(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_load_pnm_subimage(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
subimage: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_load_jbig2_subimage_count(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_load_jbig2_subimage(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
subimage: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_load_bmp_subimage_count(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_load_bmp_subimage(
ctx: *mut fz_context,
buf: *const ::std::os::raw::c_uchar,
len: usize,
subimage: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
pub const FZ_FUNCTION_BASED: _bindgen_ty_11 = 1;
pub const FZ_LINEAR: _bindgen_ty_11 = 2;
pub const FZ_RADIAL: _bindgen_ty_11 = 3;
pub const FZ_MESH_TYPE4: _bindgen_ty_11 = 4;
pub const FZ_MESH_TYPE5: _bindgen_ty_11 = 5;
pub const FZ_MESH_TYPE6: _bindgen_ty_11 = 6;
pub const FZ_MESH_TYPE7: _bindgen_ty_11 = 7;
#[doc = " The shading code uses gouraud shaded triangle meshes."]
pub type _bindgen_ty_11 = ::std::os::raw::c_uint;
#[doc = "Structure is public to allow derived classes. Do not\naccess the members directly."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_shade {
pub storable: fz_storable,
pub bbox: fz_rect,
pub colorspace: *mut fz_colorspace,
pub matrix: fz_matrix,
pub use_background: ::std::os::raw::c_int,
pub background: [f32; 32usize],
pub use_function: ::std::os::raw::c_int,
pub function: [[f32; 33usize]; 256usize],
pub type_: ::std::os::raw::c_int,
pub u: fz_shade__bindgen_ty_1,
pub buffer: *mut fz_compressed_buffer,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_shade__bindgen_ty_1 {
pub l_or_r: fz_shade__bindgen_ty_1__bindgen_ty_1,
pub m: fz_shade__bindgen_ty_1__bindgen_ty_2,
pub f: fz_shade__bindgen_ty_1__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_shade__bindgen_ty_1__bindgen_ty_1 {
pub extend: [::std::os::raw::c_int; 2usize],
pub coords: [[f32; 3usize]; 2usize],
}
#[test]
fn bindgen_test_layout_fz_shade__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_shade__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shade__bindgen_ty_1__bindgen_ty_1>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<fz_shade__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).extend) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(extend)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).coords) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(coords)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_shade__bindgen_ty_1__bindgen_ty_2 {
pub vprow: ::std::os::raw::c_int,
pub bpflag: ::std::os::raw::c_int,
pub bpcoord: ::std::os::raw::c_int,
pub bpcomp: ::std::os::raw::c_int,
pub x0: f32,
pub x1: f32,
pub y0: f32,
pub y1: f32,
pub c0: [f32; 32usize],
pub c1: [f32; 32usize],
}
#[test]
fn bindgen_test_layout_fz_shade__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<fz_shade__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shade__bindgen_ty_1__bindgen_ty_2>(),
288usize,
concat!(
"Size of: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<fz_shade__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vprow) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(vprow)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpflag) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpflag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpcoord) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpcoord)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpcomp) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpcomp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x0) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x1) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y0) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y1) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(y1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c0) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(c0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c1) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(c1)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_shade__bindgen_ty_1__bindgen_ty_3 {
pub matrix: fz_matrix,
pub xdivs: ::std::os::raw::c_int,
pub ydivs: ::std::os::raw::c_int,
pub domain: [[f32; 2usize]; 2usize],
pub fn_vals: *mut f32,
}
#[test]
fn bindgen_test_layout_fz_shade__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<fz_shade__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shade__bindgen_ty_1__bindgen_ty_3>(),
56usize,
concat!(
"Size of: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<fz_shade__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matrix) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdivs) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(xdivs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ydivs) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(ydivs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).domain) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(domain)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fn_vals) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(fn_vals)
)
);
}
#[test]
fn bindgen_test_layout_fz_shade__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_shade__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shade__bindgen_ty_1>(),
288usize,
concat!("Size of: ", stringify!(fz_shade__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_shade__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(fz_shade__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).l_or_r) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(l_or_r)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(m)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(f)
)
);
}
#[test]
fn bindgen_test_layout_fz_shade() {
const UNINIT: ::std::mem::MaybeUninit<fz_shade> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shade>(),
34296usize,
concat!("Size of: ", stringify!(fz_shade))
);
assert_eq!(
::std::mem::align_of::<fz_shade>(),
8usize,
concat!("Alignment of ", stringify!(fz_shade))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matrix) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).use_background) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(use_background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).background) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).use_function) as usize - ptr as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(use_function)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).function) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(function)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
33992usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
34000usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
34288usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "Increment the reference count for the shade structure. The\nsame pointer is returned.\n\nNever throws exceptions."]
pub fn fz_keep_shade(ctx: *mut fz_context, shade: *mut fz_shade) -> *mut fz_shade;
}
extern "C" {
#[doc = "Decrement the reference count for the shade structure. When\nthe reference count hits zero, the structure is freed.\n\nNever throws exceptions."]
pub fn fz_drop_shade(ctx: *mut fz_context, shade: *mut fz_shade);
}
extern "C" {
#[doc = "Bound a given shading.\n\nshade: The shade to bound.\n\nctm: The transform to apply to the shade before bounding.\n\nr: Pointer to storage to put the bounds in.\n\nReturns r, updated to contain the bounds for the shading."]
pub fn fz_bound_shade(ctx: *mut fz_context, shade: *mut fz_shade, ctm: fz_matrix) -> fz_rect;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_shade_color_cache {
_unused: [u8; 0],
}
extern "C" {
pub fn fz_drop_shade_color_cache(ctx: *mut fz_context, cache: *mut fz_shade_color_cache);
}
extern "C" {
#[doc = "Render a shade to a given pixmap.\n\nshade: The shade to paint.\n\noverride_cs: NULL, or colorspace to override the shades\ninbuilt colorspace.\n\nctm: The transform to apply.\n\ndest: The pixmap to render into.\n\ncolor_params: The color rendering settings\n\nbbox: Pointer to a bounding box to limit the rendering\nof the shade.\n\neop: NULL, or pointer to overprint bitmap.\n\ncache: *cache is used to cache color information. If *cache is NULL it\nis set to point to a new fz_shade_color_cache. If cache is NULL it is\nignored."]
pub fn fz_paint_shade(
ctx: *mut fz_context,
shade: *mut fz_shade,
override_cs: *mut fz_colorspace,
ctm: fz_matrix,
dest: *mut fz_pixmap,
color_params: fz_color_params,
bbox: fz_irect,
eop: *const fz_overprint,
cache: *mut *mut fz_shade_color_cache,
);
}
#[doc = "\tHandy routine for processing mesh based shades"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_vertex {
pub p: fz_point,
pub c: [f32; 32usize],
}
#[test]
fn bindgen_test_layout_fz_vertex() {
const UNINIT: ::std::mem::MaybeUninit<fz_vertex> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_vertex>(),
136usize,
concat!("Size of: ", stringify!(fz_vertex))
);
assert_eq!(
::std::mem::align_of::<fz_vertex>(),
4usize,
concat!("Alignment of ", stringify!(fz_vertex))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_vertex),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_vertex),
"::",
stringify!(c)
)
);
}
#[doc = "Callback function type for use with\nfz_process_shade.\n\narg: Opaque pointer from fz_process_shade caller.\n\nv: Pointer to a fz_vertex structure to populate.\n\nc: Pointer to an array of floats used to populate v."]
pub type fz_shade_prepare_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
v: *mut fz_vertex,
c: *const f32,
),
>;
#[doc = "Callback function type for use with\nfz_process_shade.\n\narg: Opaque pointer from fz_process_shade caller.\n\nav, bv, cv: Pointers to a fz_vertex structure describing\nthe corner locations and colors of a triangle to be\nfilled."]
pub type fz_shade_process_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
av: *mut fz_vertex,
bv: *mut fz_vertex,
cv: *mut fz_vertex,
),
>;
extern "C" {
#[doc = "Process a shade, using supplied callback functions. This\ndecomposes the shading to a mesh (even ones that are not\nnatively meshes, such as linear or radial shadings), and\nprocesses triangles from those meshes.\n\nshade: The shade to process.\n\nctm: The transform to use\n\nprepare: Callback function to 'prepare' each vertex.\nThis function is passed an array of floats, and populates\na fz_vertex structure.\n\nprocess: This function is passed 3 pointers to vertex\nstructures, and actually performs the processing (typically\nfilling the area between the vertexes).\n\nprocess_arg: An opaque argument passed through from caller\nto callback functions."]
pub fn fz_process_shade(
ctx: *mut fz_context,
shade: *mut fz_shade,
ctm: fz_matrix,
scissor: fz_rect,
prepare: fz_shade_prepare_fn,
process: fz_shade_process_fn,
process_arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Internal function to destroy a\nshade. Only exposed for use with the fz_store.\n\nshade: The reference to destroy."]
pub fn fz_drop_shade_imp(ctx: *mut fz_context, shade: *mut fz_storable);
}
extern "C" {
pub static mut fz_glyph_name_from_adobe_standard: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_iso8859_7: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_koi8u: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_mac_expert: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_mac_roman: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_win_ansi: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static mut fz_glyph_name_from_windows_1252: [*const ::std::os::raw::c_char; 256usize];
}
extern "C" {
pub static fz_unicode_from_iso8859_1: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_iso8859_7: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_koi8u: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_pdf_doc_encoding: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_windows_1250: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_windows_1251: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub static fz_unicode_from_windows_1252: [::std::os::raw::c_ushort; 256usize];
}
extern "C" {
pub fn fz_iso8859_1_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_iso8859_7_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_koi8u_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_windows_1250_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_windows_1251_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_windows_1252_from_unicode(u: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_unicode_from_glyph_name(name: *const ::std::os::raw::c_char)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_unicode_from_glyph_name_strict(
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_duplicate_glyph_names_from_unicode(
unicode: ::std::os::raw::c_int,
) -> *mut *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_glyph_name_from_unicode_sc(
unicode: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Retrieve the FT_Face handle\nfor the font.\n\nfont: The font to query\n\nReturns the FT_Face handle for the font, or NULL\nif not a freetype handled font. (Cast to void *\nto avoid nasty header exposure)."]
pub fn fz_font_ft_face(ctx: *mut fz_context, font: *mut fz_font)
-> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Retrieve the Type3 procs\nfor a font.\n\nfont: The font to query\n\nReturns the t3_procs pointer. Will be NULL for a\nnon type-3 font."]
pub fn fz_font_t3_procs(ctx: *mut fz_context, font: *mut fz_font) -> *mut *mut fz_buffer;
}
pub const FZ_ADOBE_CNS: _bindgen_ty_12 = 0;
pub const FZ_ADOBE_GB: _bindgen_ty_12 = 1;
pub const FZ_ADOBE_JAPAN: _bindgen_ty_12 = 2;
pub const FZ_ADOBE_KOREA: _bindgen_ty_12 = 3;
pub type _bindgen_ty_12 = ::std::os::raw::c_uint;
#[doc = "Every fz_font carries a set of flags\nwithin it, in a fz_font_flags_t structure."]
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct fz_font_flags_t {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub __bindgen_padding_0: u16,
}
#[test]
fn bindgen_test_layout_fz_font_flags_t() {
assert_eq!(
::std::mem::size_of::<fz_font_flags_t>(),
4usize,
concat!("Size of: ", stringify!(fz_font_flags_t))
);
assert_eq!(
::std::mem::align_of::<fz_font_flags_t>(),
4usize,
concat!("Alignment of ", stringify!(fz_font_flags_t))
);
}
impl fz_font_flags_t {
#[inline]
pub fn is_mono(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_is_mono(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn is_serif(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_is_serif(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn is_bold(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_is_bold(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn is_italic(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
}
#[inline]
pub fn set_is_italic(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn ft_substitute(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_ft_substitute(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn ft_stretch(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
}
#[inline]
pub fn set_ft_stretch(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn fake_bold(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
}
#[inline]
pub fn set_fake_bold(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(6usize, 1u8, val as u64)
}
}
#[inline]
pub fn fake_italic(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
}
#[inline]
pub fn set_fake_italic(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(7usize, 1u8, val as u64)
}
}
#[inline]
pub fn has_opentype(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
}
#[inline]
pub fn set_has_opentype(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 1u8, val as u64)
}
}
#[inline]
pub fn invalid_bbox(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
}
#[inline]
pub fn set_invalid_bbox(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(9usize, 1u8, val as u64)
}
}
#[inline]
pub fn cjk(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
}
#[inline]
pub fn set_cjk(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 1u8, val as u64)
}
}
#[inline]
pub fn cjk_lang(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 2u8) as u32) }
}
#[inline]
pub fn set_cjk_lang(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(11usize, 2u8, val as u64)
}
}
#[inline]
pub fn embed(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
}
#[inline]
pub fn set_embed(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(13usize, 1u8, val as u64)
}
}
#[inline]
pub fn never_embed(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
}
#[inline]
pub fn set_never_embed(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(14usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
is_mono: ::std::os::raw::c_uint,
is_serif: ::std::os::raw::c_uint,
is_bold: ::std::os::raw::c_uint,
is_italic: ::std::os::raw::c_uint,
ft_substitute: ::std::os::raw::c_uint,
ft_stretch: ::std::os::raw::c_uint,
fake_bold: ::std::os::raw::c_uint,
fake_italic: ::std::os::raw::c_uint,
has_opentype: ::std::os::raw::c_uint,
invalid_bbox: ::std::os::raw::c_uint,
cjk: ::std::os::raw::c_uint,
cjk_lang: ::std::os::raw::c_uint,
embed: ::std::os::raw::c_uint,
never_embed: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let is_mono: u32 = unsafe { ::std::mem::transmute(is_mono) };
is_mono as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let is_serif: u32 = unsafe { ::std::mem::transmute(is_serif) };
is_serif as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let is_bold: u32 = unsafe { ::std::mem::transmute(is_bold) };
is_bold as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let is_italic: u32 = unsafe { ::std::mem::transmute(is_italic) };
is_italic as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let ft_substitute: u32 = unsafe { ::std::mem::transmute(ft_substitute) };
ft_substitute as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let ft_stretch: u32 = unsafe { ::std::mem::transmute(ft_stretch) };
ft_stretch as u64
});
__bindgen_bitfield_unit.set(6usize, 1u8, {
let fake_bold: u32 = unsafe { ::std::mem::transmute(fake_bold) };
fake_bold as u64
});
__bindgen_bitfield_unit.set(7usize, 1u8, {
let fake_italic: u32 = unsafe { ::std::mem::transmute(fake_italic) };
fake_italic as u64
});
__bindgen_bitfield_unit.set(8usize, 1u8, {
let has_opentype: u32 = unsafe { ::std::mem::transmute(has_opentype) };
has_opentype as u64
});
__bindgen_bitfield_unit.set(9usize, 1u8, {
let invalid_bbox: u32 = unsafe { ::std::mem::transmute(invalid_bbox) };
invalid_bbox as u64
});
__bindgen_bitfield_unit.set(10usize, 1u8, {
let cjk: u32 = unsafe { ::std::mem::transmute(cjk) };
cjk as u64
});
__bindgen_bitfield_unit.set(11usize, 2u8, {
let cjk_lang: u32 = unsafe { ::std::mem::transmute(cjk_lang) };
cjk_lang as u64
});
__bindgen_bitfield_unit.set(13usize, 1u8, {
let embed: u32 = unsafe { ::std::mem::transmute(embed) };
embed as u64
});
__bindgen_bitfield_unit.set(14usize, 1u8, {
let never_embed: u32 = unsafe { ::std::mem::transmute(never_embed) };
never_embed as u64
});
__bindgen_bitfield_unit
}
}
extern "C" {
#[doc = "Retrieve a pointer to the font flags\nfor a given font. These can then be updated as required.\n\nfont: The font to query\n\nReturns a pointer to the flags structure (or NULL, if\nthe font is NULL)."]
pub fn fz_font_flags(font: *mut fz_font) -> *mut fz_font_flags_t;
}
#[doc = "In order to shape a given font, we need to\ndeclare it to a shaper library (harfbuzz, by default, but others\nare possible). To avoid redeclaring it every time we need to\nshape, we hold a shaper handle and the destructor for it within\nthe font itself. The handle is initialised by the caller when\nfirst required and the destructor is called when the fz_font is\ndestroyed."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_shaper_data_t {
pub shaper_handle: *mut ::std::os::raw::c_void,
pub destroy: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, arg1: *mut ::std::os::raw::c_void),
>,
}
#[test]
fn bindgen_test_layout_fz_shaper_data_t() {
const UNINIT: ::std::mem::MaybeUninit<fz_shaper_data_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_shaper_data_t>(),
16usize,
concat!("Size of: ", stringify!(fz_shaper_data_t))
);
assert_eq!(
::std::mem::align_of::<fz_shaper_data_t>(),
8usize,
concat!("Alignment of ", stringify!(fz_shaper_data_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).shaper_handle) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shaper_data_t),
"::",
stringify!(shaper_handle)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).destroy) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_shaper_data_t),
"::",
stringify!(destroy)
)
);
}
extern "C" {
#[doc = "Retrieve a pointer to the shaper data\nstructure for the given font.\n\nfont: The font to query.\n\nReturns a pointer to the shaper data structure (or NULL if\nfont is NULL)."]
pub fn fz_font_shaper_data(ctx: *mut fz_context, font: *mut fz_font) -> *mut fz_shaper_data_t;
}
extern "C" {
#[doc = "Retrieve a pointer to the name of the font.\n\nfont: The font to query.\n\nReturns a pointer to an internal copy of the font name.\nWill never be NULL, but may be the empty string."]
pub fn fz_font_name(ctx: *mut fz_context, font: *mut fz_font) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Query whether the font flags say that this font is bold."]
pub fn fz_font_is_bold(ctx: *mut fz_context, font: *mut fz_font) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Query whether the font flags say that this font is italic."]
pub fn fz_font_is_italic(ctx: *mut fz_context, font: *mut fz_font) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Query whether the font flags say that this font is serif."]
pub fn fz_font_is_serif(ctx: *mut fz_context, font: *mut fz_font) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Query whether the font flags say that this font is monospaced."]
pub fn fz_font_is_monospaced(ctx: *mut fz_context, font: *mut fz_font)
-> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Retrieve the font bbox.\n\nfont: The font to query.\n\nReturns the font bbox by value; it is valid only if\nfz_font_flags(font)->invalid_bbox is zero."]
pub fn fz_font_bbox(ctx: *mut fz_context, font: *mut fz_font) -> fz_rect;
}
#[doc = "Type for user supplied system font loading hook.\n\nname: The name of the font to load.\n\nbold: 1 if a bold font desired, 0 otherwise.\n\nitalic: 1 if an italic font desired, 0 otherwise.\nneeds_exact_metrics: 1 if an exact metric match is required for\nthe font requested.\n\nReturns a new font handle, or NULL if no font found (or on error)."]
pub type fz_load_system_font_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
needs_exact_metrics: ::std::os::raw::c_int,
) -> *mut fz_font,
>;
#[doc = "Type for user supplied cjk font loading hook.\n\nname: The name of the font to load.\n\nordering: The ordering for which to load the font (e.g.\nFZ_ADOBE_KOREA)\n\nserif: 1 if a serif font is desired, 0 otherwise.\n\nReturns a new font handle, or NULL if no font found (or on error)."]
pub type fz_load_system_cjk_font_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
ordering: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
) -> *mut fz_font,
>;
#[doc = "Type for user supplied fallback font loading hook.\n\nname: The name of the font to load.\n\nscript: UCDN script enum.\n\nlanguage: FZ_LANG enum.\n\nserif, bold, italic: boolean style flags.\n\nReturns a new font handle, or NULL if no font found (or on error)."]
pub type fz_load_system_fallback_font_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
script: ::std::os::raw::c_int,
language: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
) -> *mut fz_font,
>;
extern "C" {
#[doc = "Install functions to allow MuPDF to request fonts from the\nsystem.\n\nOnly one set of hooks can be in use at a time."]
pub fn fz_install_load_system_font_funcs(
ctx: *mut fz_context,
f: fz_load_system_font_fn,
f_cjk: fz_load_system_cjk_font_fn,
f_fallback: fz_load_system_fallback_font_fn,
);
}
extern "C" {
#[doc = "Attempt to load a given font from the system.\n\nname: The name of the desired font.\n\nbold: 1 if bold desired, 0 otherwise.\n\nitalic: 1 if italic desired, 0 otherwise.\n\nneeds_exact_metrics: 1 if an exact metrical match is required,\n0 otherwise.\n\nReturns a new font handle, or NULL if no matching font was found\n(or on error)."]
pub fn fz_load_system_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
needs_exact_metrics: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Attempt to load a given font from\nthe system.\n\nname: The name of the desired font.\n\nordering: The ordering to load the font from (e.g. FZ_ADOBE_KOREA)\n\nserif: 1 if serif desired, 0 otherwise.\n\nReturns a new font handle, or NULL if no matching font was found\n(or on error)."]
pub fn fz_load_system_cjk_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
ordering: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Search the builtin fonts for a match.\nWhether a given font is present or not will depend on the\nconfiguration in which MuPDF is built.\n\nname: The name of the font desired.\n\nbold: 1 if bold desired, 0 otherwise.\n\nitalic: 1 if italic desired, 0 otherwise.\n\nlen: Pointer to a place to receive the length of the discovered\nfont buffer.\n\nReturns a pointer to the font file data, or NULL if not present."]
pub fn fz_lookup_builtin_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Search the builtin base14 fonts for a match.\nWhether a given font is present or not will depend on the\nconfiguration in which MuPDF is built.\n\nname: The name of the font desired.\n\nlen: Pointer to a place to receive the length of the discovered\nfont buffer.\n\nReturns a pointer to the font file data, or NULL if not present."]
pub fn fz_lookup_base14_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Search the builtin cjk fonts for a match.\nWhether a font is present or not will depend on the\nconfiguration in which MuPDF is built.\n\nordering: The desired ordering of the font (e.g. FZ_ADOBE_KOREA).\n\nlen: Pointer to a place to receive the length of the discovered\nfont buffer.\n\nReturns a pointer to the font file data, or NULL if not present."]
pub fn fz_lookup_cjk_font(
ctx: *mut fz_context,
ordering: ::std::os::raw::c_int,
len: *mut ::std::os::raw::c_int,
index: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Search the builtin cjk fonts for a match for a given language.\nWhether a font is present or not will depend on the\nconfiguration in which MuPDF is built.\n\nlang: Pointer to a (case sensitive) language string (e.g.\n\"ja\", \"ko\", \"zh-Hant\" etc).\n\nlen: Pointer to a place to receive the length of the discovered\nfont buffer.\n\nsubfont: Pointer to a place to store the subfont index of the\ndiscovered font.\n\nReturns a pointer to the font file data, or NULL if not present."]
pub fn fz_lookup_cjk_font_by_language(
ctx: *mut fz_context,
lang: *const ::std::os::raw::c_char,
len: *mut ::std::os::raw::c_int,
subfont: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Return the matching FZ_ADOBE_* ordering\nfor the given language tag, such as \"zh-Hant\", \"zh-Hans\", \"ja\", or \"ko\"."]
pub fn fz_lookup_cjk_ordering_by_language(
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Search the builtin noto fonts for a match.\nWhether a font is present or not will depend on the\nconfiguration in which MuPDF is built.\n\nscript: The script desired (e.g. UCDN_SCRIPT_KATAKANA).\n\nlang: The language desired (e.g. FZ_LANG_ja).\n\nlen: Pointer to a place to receive the length of the discovered\nfont buffer.\n\nReturns a pointer to the font file data, or NULL if not present."]
pub fn fz_lookup_noto_font(
ctx: *mut fz_context,
script: ::std::os::raw::c_int,
lang: ::std::os::raw::c_int,
len: *mut ::std::os::raw::c_int,
subfont: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Search the builtin noto fonts specific symbol fonts.\nWhether a font is present or not will depend on the\nconfiguration in which MuPDF is built."]
pub fn fz_lookup_noto_math_font(
ctx: *mut fz_context,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn fz_lookup_noto_music_font(
ctx: *mut fz_context,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn fz_lookup_noto_symbol1_font(
ctx: *mut fz_context,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn fz_lookup_noto_symbol2_font(
ctx: *mut fz_context,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn fz_lookup_noto_emoji_font(
ctx: *mut fz_context,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = "Try to load a fallback font for the\ngiven combination of font attributes. Whether a font is\npresent or not will depend on the configuration in which\nMuPDF is built.\n\nscript: The script desired (e.g. UCDN_SCRIPT_KATAKANA).\n\nlanguage: The language desired (e.g. FZ_LANG_ja).\n\nserif: 1 if serif desired, 0 otherwise.\n\nbold: 1 if bold desired, 0 otherwise.\n\nitalic: 1 if italic desired, 0 otherwise.\n\nReturns a new font handle, or NULL if not available."]
pub fn fz_load_fallback_font(
ctx: *mut fz_context,
script: ::std::os::raw::c_int,
language: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Create a new (empty) type3 font.\n\nname: Name of font (or NULL).\n\nmatrix: Font matrix.\n\nReturns a new font handle, or throws exception on\nallocation failure."]
pub fn fz_new_type3_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
matrix: fz_matrix,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Create a new font from a font file in memory.\n\nFonts created in this way, will be eligible for embedding by default.\n\nname: Name of font (leave NULL to use name from font).\n\ndata: Pointer to the font file data.\n\nlen: Length of the font file data.\n\nindex: Which font from the file to load (0 for default).\n\nuse_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.\n\nReturns new font handle, or throws exception on error."]
pub fn fz_new_font_from_memory(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
data: *const ::std::os::raw::c_uchar,
len: ::std::os::raw::c_int,
index: ::std::os::raw::c_int,
use_glyph_bbox: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Create a new font from a font file in a fz_buffer.\n\nFonts created in this way, will be eligible for embedding by default.\n\nname: Name of font (leave NULL to use name from font).\n\nbuffer: Buffer to load from.\n\nindex: Which font from the file to load (0 for default).\n\nuse_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.\n\nReturns new font handle, or throws exception on error."]
pub fn fz_new_font_from_buffer(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
buffer: *mut fz_buffer,
index: ::std::os::raw::c_int,
use_glyph_bbox: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Create a new font from a font file.\n\nFonts created in this way, will be eligible for embedding by default.\n\nname: Name of font (leave NULL to use name from font).\n\npath: File path to load from.\n\nindex: Which font from the file to load (0 for default).\n\nuse_glyph_box: 1 if we should use the glyph bbox, 0 otherwise.\n\nReturns new font handle, or throws exception on error."]
pub fn fz_new_font_from_file(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
path: *const ::std::os::raw::c_char,
index: ::std::os::raw::c_int,
use_glyph_bbox: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Create a new font from one of the built-in fonts."]
pub fn fz_new_base14_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
) -> *mut fz_font;
}
extern "C" {
pub fn fz_new_cjk_font(ctx: *mut fz_context, ordering: ::std::os::raw::c_int) -> *mut fz_font;
}
extern "C" {
pub fn fz_new_builtin_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
is_bold: ::std::os::raw::c_int,
is_italic: ::std::os::raw::c_int,
) -> *mut fz_font;
}
extern "C" {
#[doc = "Control whether a given font should be embedded or not when writing."]
pub fn fz_set_font_embedding(
ctx: *mut fz_context,
font: *mut fz_font,
embed: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Add a reference to an existing fz_font.\n\nfont: The font to add a reference to.\n\nReturns the same font."]
pub fn fz_keep_font(ctx: *mut fz_context, font: *mut fz_font) -> *mut fz_font;
}
extern "C" {
#[doc = "Drop a reference to a fz_font, destroying the\nfont when the last reference is dropped.\n\nfont: The font to drop a reference to."]
pub fn fz_drop_font(ctx: *mut fz_context, font: *mut fz_font);
}
extern "C" {
#[doc = "Set the font bbox.\n\nfont: The font to set the bbox for.\n\nxmin, ymin, xmax, ymax: The bounding box."]
pub fn fz_set_font_bbox(
ctx: *mut fz_context,
font: *mut fz_font,
xmin: f32,
ymin: f32,
xmax: f32,
ymax: f32,
);
}
extern "C" {
#[doc = "Return a bbox for a given glyph in a font.\n\nfont: The font to look for the glyph in.\n\ngid: The glyph to bound.\n\ntrm: The matrix to apply to the glyph before bounding.\n\nReturns rectangle by value containing the bounds of the given\nglyph."]
pub fn fz_bound_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
trm: fz_matrix,
) -> fz_rect;
}
extern "C" {
#[doc = "Determine if a given glyph in a font\nis cacheable. Certain glyphs in a type 3 font cannot safely\nbe cached, as their appearance depends on the enclosing\ngraphic state.\n\nfont: The font to look for the glyph in.\n\ngif: The glyph to query.\n\nReturns non-zero if cacheable, 0 if not."]
pub fn fz_glyph_cacheable(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Run a glyph from a Type3 font to\na given device.\n\nfont: The font to find the glyph in.\n\ngid: The glyph to run.\n\ntrm: The transform to apply.\n\ndev: The device to render onto."]
pub fn fz_run_t3_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
trm: fz_matrix,
dev: *mut fz_device,
);
}
extern "C" {
#[doc = "Return the advance for a given glyph.\n\nfont: The font to look for the glyph in.\n\nglyph: The glyph to find the advance for.\n\nwmode: 1 for vertical mode, 0 for horizontal.\n\nReturns the advance for the glyph."]
pub fn fz_advance_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
glyph: ::std::os::raw::c_int,
wmode: ::std::os::raw::c_int,
) -> f32;
}
extern "C" {
#[doc = "Find the glyph id for a given unicode\ncharacter within a font.\n\nfont: The font to look for the unicode character in.\n\nunicode: The unicode character to encode.\n\nReturns the glyph id for the given unicode value, or 0 if\nunknown."]
pub fn fz_encode_character(
ctx: *mut fz_context,
font: *mut fz_font,
unicode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Encode character, preferring small-caps variant if available.\n\nfont: The font to look for the unicode character in.\n\nunicode: The unicode character to encode.\n\nReturns the glyph id for the given unicode value, or 0 if\nunknown."]
pub fn fz_encode_character_sc(
ctx: *mut fz_context,
font: *mut fz_font,
unicode: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Encode character.\n\nEither by direct lookup of glyphname within a font, or, failing\nthat, by mapping glyphname to unicode and thence to the glyph\nindex within the given font.\n\nReturns zero for type3 fonts."]
pub fn fz_encode_character_by_glyph_name(
ctx: *mut fz_context,
font: *mut fz_font,
glyphname: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Find the glyph id for\na given unicode character within a font, falling back to\nan alternative if not found.\n\nfont: The font to look for the unicode character in.\n\nunicode: The unicode character to encode.\n\nscript: The script in use.\n\nlanguage: The language in use.\n\nout_font: The font handle in which the given glyph represents\nthe requested unicode character. The caller does not own the\nreference it is passed, so should call fz_keep_font if it is\nnot simply to be used immediately.\n\nReturns the glyph id for the given unicode value in the supplied\nfont (and sets *out_font to font) if it is present. Otherwise\nan alternative fallback font (based on script/language) is\nsearched for. If the glyph is found therein, *out_font is set\nto this reference, and the glyph reference is returned. If it\ncannot be found anywhere, the function returns 0."]
pub fn fz_encode_character_with_fallback(
ctx: *mut fz_context,
font: *mut fz_font,
unicode: ::std::os::raw::c_int,
script: ::std::os::raw::c_int,
language: ::std::os::raw::c_int,
out_font: *mut *mut fz_font,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Find the name of a glyph\n\nfont: The font to look for the glyph in.\n\nglyph: The glyph id to look for.\n\nbuf: Pointer to a buffer for the name to be inserted into.\n\nsize: The size of the buffer.\n\nIf a font contains a name table, then the name of the glyph\nwill be returned in the supplied buffer. Otherwise a name\nis synthesised. The name will be truncated to fit in\nthe buffer."]
pub fn fz_get_glyph_name(
ctx: *mut fz_context,
font: *mut fz_font,
glyph: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Retrieve font ascender in ems."]
pub fn fz_font_ascender(ctx: *mut fz_context, font: *mut fz_font) -> f32;
}
extern "C" {
#[doc = "Retrieve font descender in ems."]
pub fn fz_font_descender(ctx: *mut fz_context, font: *mut fz_font) -> f32;
}
extern "C" {
#[doc = "Retrieve the MD5 digest for the font's data."]
pub fn fz_font_digest(
ctx: *mut fz_context,
font: *mut fz_font,
digest: *mut ::std::os::raw::c_uchar,
);
}
extern "C" {
pub fn fz_decouple_type3_font(
ctx: *mut fz_context,
font: *mut fz_font,
t3doc: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Lock against Harfbuzz being called\nsimultaneously in several threads. This reuses\nFZ_LOCK_FREETYPE."]
pub fn fz_hb_lock(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Unlock after a Harfbuzz call. This reuses\nFZ_LOCK_FREETYPE."]
pub fn fz_hb_unlock(ctx: *mut fz_context);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_font {
pub refs: ::std::os::raw::c_int,
pub name: [::std::os::raw::c_char; 32usize],
pub buffer: *mut fz_buffer,
pub flags: fz_font_flags_t,
pub ft_face: *mut ::std::os::raw::c_void,
pub shaper_data: fz_shaper_data_t,
pub t3matrix: fz_matrix,
pub t3resources: *mut ::std::os::raw::c_void,
pub t3procs: *mut *mut fz_buffer,
pub t3lists: *mut *mut fz_display_list,
pub t3widths: *mut f32,
pub t3flags: *mut ::std::os::raw::c_ushort,
pub t3doc: *mut ::std::os::raw::c_void,
pub t3run: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut ::std::os::raw::c_void,
resources: *mut ::std::os::raw::c_void,
contents: *mut fz_buffer,
dev: *mut fz_device,
ctm: fz_matrix,
gstate: *mut ::std::os::raw::c_void,
default_cs: *mut fz_default_colorspaces,
),
>,
pub t3freeres: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut ::std::os::raw::c_void,
resources: *mut ::std::os::raw::c_void,
),
>,
pub bbox: fz_rect,
pub glyph_count: ::std::os::raw::c_int,
pub bbox_table: *mut *mut fz_rect,
pub use_glyph_bbox: ::std::os::raw::c_int,
pub width_count: ::std::os::raw::c_int,
pub width_default: ::std::os::raw::c_short,
pub width_table: *mut ::std::os::raw::c_short,
pub advance_cache: *mut *mut f32,
pub encoding_cache: [*mut u16; 256usize],
pub has_digest: ::std::os::raw::c_int,
pub digest: [::std::os::raw::c_uchar; 16usize],
pub subfont: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_font() {
const UNINIT: ::std::mem::MaybeUninit<fz_font> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_font>(),
2304usize,
concat!("Size of: ", stringify!(fz_font))
);
assert_eq!(
::std::mem::align_of::<fz_font>(),
8usize,
concat!("Alignment of ", stringify!(fz_font))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ft_face) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(ft_face)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).shaper_data) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(shaper_data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3matrix) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3resources) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3resources)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3procs) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3procs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3lists) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3lists)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3widths) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3widths)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3flags) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3doc) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3doc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3run) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3run)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3freeres) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3freeres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).glyph_count) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(glyph_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox_table) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(bbox_table)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).use_glyph_bbox) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(use_glyph_bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).width_count) as usize - ptr as usize },
204usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).width_default) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_default)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).width_table) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_table)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).advance_cache) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(advance_cache)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).encoding_cache) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(encoding_cache)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_digest) as usize - ptr as usize },
2280usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(has_digest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
2284usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(digest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).subfont) as usize - ptr as usize },
2300usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(subfont)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_path {
_unused: [u8; 0],
}
pub const fz_linecap_FZ_LINECAP_BUTT: fz_linecap = 0;
pub const fz_linecap_FZ_LINECAP_ROUND: fz_linecap = 1;
pub const fz_linecap_FZ_LINECAP_SQUARE: fz_linecap = 2;
pub const fz_linecap_FZ_LINECAP_TRIANGLE: fz_linecap = 3;
pub type fz_linecap = ::std::os::raw::c_uint;
pub const fz_linejoin_FZ_LINEJOIN_MITER: fz_linejoin = 0;
pub const fz_linejoin_FZ_LINEJOIN_ROUND: fz_linejoin = 1;
pub const fz_linejoin_FZ_LINEJOIN_BEVEL: fz_linejoin = 2;
pub const fz_linejoin_FZ_LINEJOIN_MITER_XPS: fz_linejoin = 3;
pub type fz_linejoin = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stroke_state {
pub refs: ::std::os::raw::c_int,
pub start_cap: fz_linecap,
pub dash_cap: fz_linecap,
pub end_cap: fz_linecap,
pub linejoin: fz_linejoin,
pub linewidth: f32,
pub miterlimit: f32,
pub dash_phase: f32,
pub dash_len: ::std::os::raw::c_int,
pub dash_list: [f32; 32usize],
}
#[test]
fn bindgen_test_layout_fz_stroke_state() {
const UNINIT: ::std::mem::MaybeUninit<fz_stroke_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stroke_state>(),
164usize,
concat!("Size of: ", stringify!(fz_stroke_state))
);
assert_eq!(
::std::mem::align_of::<fz_stroke_state>(),
4usize,
concat!("Alignment of ", stringify!(fz_stroke_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).start_cap) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(start_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dash_cap) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_cap) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(end_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linejoin) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(linejoin)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linewidth) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(linewidth)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).miterlimit) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(miterlimit)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dash_phase) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_phase)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dash_len) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dash_list) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_list)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_path_walker {
pub moveto: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x: f32,
y: f32,
),
>,
pub lineto: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x: f32,
y: f32,
),
>,
pub curveto: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
),
>,
pub closepath: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, arg: *mut ::std::os::raw::c_void),
>,
pub quadto: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
),
>,
pub curvetov: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
),
>,
pub curvetoy: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x1: f32,
y1: f32,
x3: f32,
y3: f32,
),
>,
pub rectto: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
),
>,
}
#[test]
fn bindgen_test_layout_fz_path_walker() {
const UNINIT: ::std::mem::MaybeUninit<fz_path_walker> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_path_walker>(),
64usize,
concat!("Size of: ", stringify!(fz_path_walker))
);
assert_eq!(
::std::mem::align_of::<fz_path_walker>(),
8usize,
concat!("Alignment of ", stringify!(fz_path_walker))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).moveto) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(moveto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lineto) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(lineto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).curveto) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curveto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).closepath) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(closepath)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quadto) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(quadto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).curvetov) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curvetov)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).curvetoy) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curvetoy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rectto) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(rectto)
)
);
}
extern "C" {
#[doc = "Walk the segments of a path, calling the\nappropriate callback function from a given set for each\nsegment of the path.\n\npath: The path to walk.\n\nwalker: The set of callback functions to use. The first\n4 callback pointers in the set must be non-NULL. The\nsubsequent ones can either be supplied, or can be left\nas NULL, in which case the top 4 functions will be\ncalled as appropriate to simulate them.\n\narg: An opaque argument passed in to each callback.\n\nExceptions will only be thrown if the underlying callback\nfunctions throw them."]
pub fn fz_walk_path(
ctx: *mut fz_context,
path: *const fz_path,
walker: *const fz_path_walker,
arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Create a new (empty) path structure."]
pub fn fz_new_path(ctx: *mut fz_context) -> *mut fz_path;
}
extern "C" {
#[doc = "Increment the reference count. Returns the same pointer.\n\nAll paths can be kept, regardless of their packing type.\n\nNever throws exceptions."]
pub fn fz_keep_path(ctx: *mut fz_context, path: *const fz_path) -> *mut fz_path;
}
extern "C" {
#[doc = "Decrement the reference count. When the reference count hits\nzero, free the path.\n\nAll paths can be dropped, regardless of their packing type.\nPacked paths do not own the blocks into which they are packed\nso dropping them does not free those blocks.\n\nNever throws exceptions."]
pub fn fz_drop_path(ctx: *mut fz_context, path: *const fz_path);
}
extern "C" {
#[doc = "Minimise the internal storage used by a path.\n\nAs paths are constructed, the internal buffers\ngrow. To avoid repeated reallocations they\ngrow with some spare space. Once a path has\nbeen fully constructed, this call allows the\nexcess space to be trimmed."]
pub fn fz_trim_path(ctx: *mut fz_context, path: *mut fz_path);
}
extern "C" {
#[doc = "Return the number of bytes required to pack a path."]
pub fn fz_packed_path_size(path: *const fz_path) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Pack a path into the given block.\nTo minimise the size of paths, this function allows them to be\npacked into a buffer with other information. Paths can be used\ninterchangeably regardless of how they are packed.\n\npack: Pointer to a block of data to pack the path into. Should\nbe aligned by the caller to the same alignment as required for\na fz_path pointer.\n\nmax: The number of bytes available in the block.\nIf max < sizeof(fz_path) then an exception will\nbe thrown. If max >= the value returned by\nfz_packed_path_size, then this call will never\nfail, except in low memory situations with large\npaths.\n\npath: The path to pack.\n\nReturns the number of bytes within the block used. Callers can\naccess the packed path data by casting the value of pack on\nentry to be a fz_path *.\n\nThrows exceptions on failure to allocate, or if\nmax < sizeof(fz_path).\n\nImplementation details: Paths can be 'unpacked', 'flat', or\n'open'. Standard paths, as created are 'unpacked'. Paths that\nwill pack into less than max bytes will be packed as 'flat',\nunless they are too large (where large indicates that they\nexceed some private implementation defined limits, currently\nincluding having more than 256 coordinates or commands).\n\nLarge paths are 'open' packed as a header into the given block,\nplus pointers to other data blocks.\n\nUsers should not have to care about whether paths are 'open'\nor 'flat' packed. Simply pack a path (if required), and then\nforget about the details."]
pub fn fz_pack_path(
ctx: *mut fz_context,
pack: *mut u8,
max: usize,
path: *const fz_path,
) -> usize;
}
extern "C" {
#[doc = "Clone the data for a path.\n\nThis is used in preference to fz_keep_path when a whole\nnew copy of a path is required, rather than just a shared\npointer. This probably indicates that the path is about to\nbe modified.\n\npath: path to clone.\n\nThrows exceptions on failure to allocate."]
pub fn fz_clone_path(ctx: *mut fz_context, path: *mut fz_path) -> *mut fz_path;
}
extern "C" {
#[doc = "Return the current point that a path has\nreached or (0,0) if empty.\n\npath: path to return the current point of."]
pub fn fz_currentpoint(ctx: *mut fz_context, path: *mut fz_path) -> fz_point;
}
extern "C" {
#[doc = "Append a 'moveto' command to a path.\nThis 'opens' a path.\n\npath: The path to modify.\n\nx, y: The coordinate to move to.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_moveto(ctx: *mut fz_context, path: *mut fz_path, x: f32, y: f32);
}
extern "C" {
#[doc = "Append a 'lineto' command to an open path.\n\npath: The path to modify.\n\nx, y: The coordinate to line to.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_lineto(ctx: *mut fz_context, path: *mut fz_path, x: f32, y: f32);
}
extern "C" {
#[doc = "Append a 'rectto' command to an open path.\n\nThe rectangle is equivalent to:\nmoveto x0 y0\nlineto x1 y0\nlineto x1 y1\nlineto x0 y1\nclosepath\n\npath: The path to modify.\n\nx0, y0: First corner of the rectangle.\n\nx1, y1: Second corner of the rectangle.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_rectto(ctx: *mut fz_context, path: *mut fz_path, x0: f32, y0: f32, x1: f32, y1: f32);
}
extern "C" {
#[doc = "Append a 'quadto' command to an open path. (For a\nquadratic bezier).\n\npath: The path to modify.\n\nx0, y0: The control coordinates for the quadratic curve.\n\nx1, y1: The end coordinates for the quadratic curve.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_quadto(ctx: *mut fz_context, path: *mut fz_path, x0: f32, y0: f32, x1: f32, y1: f32);
}
extern "C" {
#[doc = "Append a 'curveto' command to an open path. (For a\ncubic bezier).\n\npath: The path to modify.\n\nx0, y0: The coordinates of the first control point for the\ncurve.\n\nx1, y1: The coordinates of the second control point for the\ncurve.\n\nx2, y2: The end coordinates for the curve.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_curveto(
ctx: *mut fz_context,
path: *mut fz_path,
x0: f32,
y0: f32,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
);
}
extern "C" {
#[doc = "Append a 'curvetov' command to an open path. (For a\ncubic bezier with the first control coordinate equal to\nthe start point).\n\npath: The path to modify.\n\nx1, y1: The coordinates of the second control point for the\ncurve.\n\nx2, y2: The end coordinates for the curve.\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_curvetov(
ctx: *mut fz_context,
path: *mut fz_path,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
);
}
extern "C" {
#[doc = "Append a 'curvetoy' command to an open path. (For a\ncubic bezier with the second control coordinate equal to\nthe end point).\n\npath: The path to modify.\n\nx0, y0: The coordinates of the first control point for the\ncurve.\n\nx2, y2: The end coordinates for the curve (and the second\ncontrol coordinate).\n\nThrows exceptions on failure to allocate, or attempting to\nmodify a packed path."]
pub fn fz_curvetoy(
ctx: *mut fz_context,
path: *mut fz_path,
x0: f32,
y0: f32,
x2: f32,
y2: f32,
);
}
extern "C" {
#[doc = "Close the current subpath.\n\npath: The path to modify.\n\nThrows exceptions on failure to allocate, attempting to modify\na packed path, and illegal path closes (i.e. closing a non open\npath)."]
pub fn fz_closepath(ctx: *mut fz_context, path: *mut fz_path);
}
extern "C" {
#[doc = "Transform a path by a given\nmatrix.\n\npath: The path to modify (must not be a packed path).\n\ntransform: The transform to apply.\n\nThrows exceptions if the path is packed, or on failure\nto allocate."]
pub fn fz_transform_path(ctx: *mut fz_context, path: *mut fz_path, transform: fz_matrix);
}
extern "C" {
#[doc = "Return a bounding rectangle for a path.\n\npath: The path to bound.\n\nstroke: If NULL, the bounding rectangle given is for\nthe filled path. If non-NULL the bounding rectangle\ngiven is for the path stroked with the given attributes.\n\nctm: The matrix to apply to the path during stroking.\n\nr: Pointer to a fz_rect which will be used to hold\nthe result.\n\nReturns r, updated to contain the bounding rectangle."]
pub fn fz_bound_path(
ctx: *mut fz_context,
path: *const fz_path,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
) -> fz_rect;
}
extern "C" {
#[doc = "Given a rectangle (assumed to be the bounding box for a path),\nexpand it to allow for the expansion of the bbox that would be\nseen by stroking the path with the given stroke state and\ntransform."]
pub fn fz_adjust_rect_for_stroke(
ctx: *mut fz_context,
rect: fz_rect,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
) -> fz_rect;
}
extern "C" {
#[doc = "A sane 'default' stroke state."]
pub static fz_default_stroke_state: fz_stroke_state;
}
extern "C" {
#[doc = "Create a new (empty) stroke state structure (with no dash\ndata) and return a reference to it.\n\nThrows exception on failure to allocate."]
pub fn fz_new_stroke_state(ctx: *mut fz_context) -> *mut fz_stroke_state;
}
extern "C" {
#[doc = "Create a new (empty) stroke state structure, with room for\ndash data of the given length, and return a reference to it.\n\nlen: The number of dash elements to allow room for.\n\nThrows exception on failure to allocate."]
pub fn fz_new_stroke_state_with_dash_len(
ctx: *mut fz_context,
len: ::std::os::raw::c_int,
) -> *mut fz_stroke_state;
}
extern "C" {
#[doc = "Take an additional reference to a stroke state structure.\n\nNo modifications should be carried out on a stroke\nstate to which more than one reference is held, as\nthis can cause race conditions."]
pub fn fz_keep_stroke_state(
ctx: *mut fz_context,
stroke: *const fz_stroke_state,
) -> *mut fz_stroke_state;
}
extern "C" {
#[doc = "Drop a reference to a stroke state structure, destroying the\nstructure if it is the last reference."]
pub fn fz_drop_stroke_state(ctx: *mut fz_context, stroke: *const fz_stroke_state);
}
extern "C" {
#[doc = "Given a reference to a (possibly) shared stroke_state structure,\nreturn a reference to an equivalent stroke_state structure\nthat is guaranteed to be unshared (i.e. one that can\nsafely be modified).\n\nshared: The reference to a (possibly) shared structure\nto unshare. Ownership of this reference is passed in\nto this function, even in the case of exceptions being\nthrown.\n\nExceptions may be thrown in the event of failure to\nallocate if required."]
pub fn fz_unshare_stroke_state(
ctx: *mut fz_context,
shared: *mut fz_stroke_state,
) -> *mut fz_stroke_state;
}
extern "C" {
#[doc = "Given a reference to a (possibly) shared stroke_state structure,\nreturn a reference to a stroke_state structure (with room for a\ngiven amount of dash data) that is guaranteed to be unshared\n(i.e. one that can safely be modified).\n\nshared: The reference to a (possibly) shared structure\nto unshare. Ownership of this reference is passed in\nto this function, even in the case of exceptions being\nthrown.\n\nExceptions may be thrown in the event of failure to\nallocate if required."]
pub fn fz_unshare_stroke_state_with_dash_len(
ctx: *mut fz_context,
shared: *mut fz_stroke_state,
len: ::std::os::raw::c_int,
) -> *mut fz_stroke_state;
}
extern "C" {
#[doc = "Create an identical stroke_state structure and return a\nreference to it.\n\nstroke: The stroke state reference to clone.\n\nExceptions may be thrown in the event of a failure to\nallocate."]
pub fn fz_clone_stroke_state(
ctx: *mut fz_context,
stroke: *mut fz_stroke_state,
) -> *mut fz_stroke_state;
}
#[doc = "Text buffer.\n\nThe trm field contains the a, b, c and d coefficients.\nThe e and f coefficients come from the individual elements,\ntogether they form the transform matrix for the glyph.\n\nGlyphs are referenced by glyph ID.\nThe Unicode text equivalent is kept in a separate array\nwith indexes into the glyph array."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_text_item {
pub x: f32,
pub y: f32,
pub gid: ::std::os::raw::c_int,
pub ucs: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_text_item() {
const UNINIT: ::std::mem::MaybeUninit<fz_text_item> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_text_item>(),
16usize,
concat!("Size of: ", stringify!(fz_text_item))
);
assert_eq!(
::std::mem::align_of::<fz_text_item>(),
4usize,
concat!("Alignment of ", stringify!(fz_text_item))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ucs) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(ucs)
)
);
}
pub const fz_text_language_FZ_LANG_UNSET: fz_text_language = 0;
pub const fz_text_language_FZ_LANG_ur: fz_text_language = 507;
pub const fz_text_language_FZ_LANG_urd: fz_text_language = 3423;
pub const fz_text_language_FZ_LANG_ko: fz_text_language = 416;
pub const fz_text_language_FZ_LANG_ja: fz_text_language = 37;
pub const fz_text_language_FZ_LANG_zh: fz_text_language = 242;
pub const fz_text_language_FZ_LANG_zh_Hans: fz_text_language = 14093;
pub const fz_text_language_FZ_LANG_zh_Hant: fz_text_language = 14822;
pub type fz_text_language = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_text_span {
pub font: *mut fz_font,
pub trm: fz_matrix,
pub _bitfield_align_1: [u16; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub len: ::std::os::raw::c_int,
pub cap: ::std::os::raw::c_int,
pub items: *mut fz_text_item,
pub next: *mut fz_text_span,
}
#[test]
fn bindgen_test_layout_fz_text_span() {
const UNINIT: ::std::mem::MaybeUninit<fz_text_span> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_text_span>(),
64usize,
concat!("Size of: ", stringify!(fz_text_span))
);
assert_eq!(
::std::mem::align_of::<fz_text_span>(),
8usize,
concat!("Alignment of ", stringify!(fz_text_span))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).trm) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(trm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).items) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(items)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(next)
)
);
}
impl fz_text_span {
#[inline]
pub fn wmode(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_wmode(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn bidi_level(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u32) }
}
#[inline]
pub fn set_bidi_level(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 7u8, val as u64)
}
}
#[inline]
pub fn markup_dir(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) }
}
#[inline]
pub fn set_markup_dir(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 2u8, val as u64)
}
}
#[inline]
pub fn language(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 15u8) as u32) }
}
#[inline]
pub fn set_language(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 15u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
wmode: ::std::os::raw::c_uint,
bidi_level: ::std::os::raw::c_uint,
markup_dir: ::std::os::raw::c_uint,
language: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let wmode: u32 = unsafe { ::std::mem::transmute(wmode) };
wmode as u64
});
__bindgen_bitfield_unit.set(1usize, 7u8, {
let bidi_level: u32 = unsafe { ::std::mem::transmute(bidi_level) };
bidi_level as u64
});
__bindgen_bitfield_unit.set(8usize, 2u8, {
let markup_dir: u32 = unsafe { ::std::mem::transmute(markup_dir) };
markup_dir as u64
});
__bindgen_bitfield_unit.set(10usize, 15u8, {
let language: u32 = unsafe { ::std::mem::transmute(language) };
language as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_text {
pub refs: ::std::os::raw::c_int,
pub head: *mut fz_text_span,
pub tail: *mut fz_text_span,
}
#[test]
fn bindgen_test_layout_fz_text() {
const UNINIT: ::std::mem::MaybeUninit<fz_text> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_text>(),
24usize,
concat!("Size of: ", stringify!(fz_text))
);
assert_eq!(
::std::mem::align_of::<fz_text>(),
8usize,
concat!("Alignment of ", stringify!(fz_text))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(head)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tail) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(tail)
)
);
}
extern "C" {
#[doc = "Create a new empty fz_text object.\n\nThrows exception on failure to allocate."]
pub fn fz_new_text(ctx: *mut fz_context) -> *mut fz_text;
}
extern "C" {
#[doc = "Increment the reference count for the text object. The same\npointer is returned.\n\nNever throws exceptions."]
pub fn fz_keep_text(ctx: *mut fz_context, text: *const fz_text) -> *mut fz_text;
}
extern "C" {
#[doc = "Decrement the reference count for the text object. When the\nreference count hits zero, the text object is freed.\n\nNever throws exceptions."]
pub fn fz_drop_text(ctx: *mut fz_context, text: *const fz_text);
}
extern "C" {
#[doc = "Add a glyph/unicode value to a text object.\n\ntext: Text object to add to.\n\nfont: The font the glyph should be added in.\n\ntrm: The transform to use for the glyph.\n\nglyph: The glyph id to add.\n\nunicode: The unicode character for the glyph.\n\nwmode: 1 for vertical mode, 0 for horizontal.\n\nbidi_level: The bidirectional level for this glyph.\n\nmarkup_dir: The direction of the text as specified in the\nmarkup.\n\nlanguage: The language in use (if known, 0 otherwise)\n(e.g. FZ_LANG_zh_Hans).\n\nThrows exception on failure to allocate."]
pub fn fz_show_glyph(
ctx: *mut fz_context,
text: *mut fz_text,
font: *mut fz_font,
trm: fz_matrix,
glyph: ::std::os::raw::c_int,
unicode: ::std::os::raw::c_int,
wmode: ::std::os::raw::c_int,
bidi_level: ::std::os::raw::c_int,
markup_dir: fz_bidi_direction,
language: fz_text_language,
);
}
extern "C" {
#[doc = "Add a UTF8 string to a text object.\n\ntext: Text object to add to.\n\nfont: The font the string should be added in.\n\ntrm: The transform to use.\n\ns: The utf-8 string to add.\n\nwmode: 1 for vertical mode, 0 for horizontal.\n\nbidi_level: The bidirectional level for this glyph.\n\nmarkup_dir: The direction of the text as specified in the markup.\n\nlanguage: The language in use (if known, 0 otherwise)\n(e.g. FZ_LANG_zh_Hans).\n\nReturns the transform updated with the advance width of the\nstring."]
pub fn fz_show_string(
ctx: *mut fz_context,
text: *mut fz_text,
font: *mut fz_font,
trm: fz_matrix,
s: *const ::std::os::raw::c_char,
wmode: ::std::os::raw::c_int,
bidi_level: ::std::os::raw::c_int,
markup_dir: fz_bidi_direction,
language: fz_text_language,
) -> fz_matrix;
}
extern "C" {
#[doc = "Measure the advance width of a UTF8 string should it be added to a text object.\n\nThis uses the same layout algorithms as fz_show_string, and can be used\nto calculate text alignment adjustments."]
pub fn fz_measure_string(
ctx: *mut fz_context,
user_font: *mut fz_font,
trm: fz_matrix,
s: *const ::std::os::raw::c_char,
wmode: ::std::os::raw::c_int,
bidi_level: ::std::os::raw::c_int,
markup_dir: fz_bidi_direction,
language: fz_text_language,
) -> fz_matrix;
}
extern "C" {
#[doc = "Find the bounds of a given text object.\n\ntext: The text object to find the bounds of.\n\nstroke: Pointer to the stroke attributes (for stroked\ntext), or NULL (for filled text).\n\nctm: The matrix in use.\n\nr: pointer to storage for the bounds.\n\nReturns a pointer to r, which is updated to contain the\nbounding box for the text object."]
pub fn fz_bound_text(
ctx: *mut fz_context,
text: *const fz_text,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
) -> fz_rect;
}
extern "C" {
#[doc = "Convert ISO 639 (639-{1,2,3,5}) language specification\nstrings losslessly to a 15 bit fz_text_language code.\n\nNo validation is carried out. Obviously invalid (out\nof spec) codes will be mapped to FZ_LANG_UNSET, but\nwell-formed (but undefined) codes will be blithely\naccepted."]
pub fn fz_text_language_from_string(str_: *const ::std::os::raw::c_char) -> fz_text_language;
}
extern "C" {
#[doc = "Recover ISO 639 (639-{1,2,3,5}) language specification\nstrings losslessly from a 15 bit fz_text_language code.\n\nNo validation is carried out. See note above."]
pub fn fz_string_from_text_language(
str_: *mut ::std::os::raw::c_char,
lang: fz_text_language,
) -> *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_glyph {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Return the bounding box of the glyph in pixels."]
pub fn fz_glyph_bbox(ctx: *mut fz_context, glyph: *mut fz_glyph) -> fz_irect;
}
extern "C" {
pub fn fz_glyph_bbox_no_ctx(src: *mut fz_glyph) -> fz_irect;
}
extern "C" {
#[doc = "Return the width of the glyph in pixels."]
pub fn fz_glyph_width(ctx: *mut fz_context, glyph: *mut fz_glyph) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the height of the glyph in pixels."]
pub fn fz_glyph_height(ctx: *mut fz_context, glyph: *mut fz_glyph) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Take a reference to a glyph.\n\npix: The glyph to increment the reference for.\n\nReturns pix."]
pub fn fz_keep_glyph(ctx: *mut fz_context, pix: *mut fz_glyph) -> *mut fz_glyph;
}
extern "C" {
#[doc = "Drop a reference and free a glyph.\n\nDecrement the reference count for the glyph. When no\nreferences remain the glyph will be freed."]
pub fn fz_drop_glyph(ctx: *mut fz_context, pix: *mut fz_glyph);
}
extern "C" {
#[doc = "Look a glyph up from a font, and return the outline of the\nglyph using the given transform.\n\nThe caller owns the returned path, and so is responsible for\nensuring that it eventually gets dropped."]
pub fn fz_outline_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
ctm: fz_matrix,
) -> *mut fz_path;
}
pub const FZ_DEVFLAG_MASK: _bindgen_ty_13 = 1;
pub const FZ_DEVFLAG_COLOR: _bindgen_ty_13 = 2;
pub const FZ_DEVFLAG_UNCACHEABLE: _bindgen_ty_13 = 4;
pub const FZ_DEVFLAG_FILLCOLOR_UNDEFINED: _bindgen_ty_13 = 8;
pub const FZ_DEVFLAG_STROKECOLOR_UNDEFINED: _bindgen_ty_13 = 16;
pub const FZ_DEVFLAG_STARTCAP_UNDEFINED: _bindgen_ty_13 = 32;
pub const FZ_DEVFLAG_DASHCAP_UNDEFINED: _bindgen_ty_13 = 64;
pub const FZ_DEVFLAG_ENDCAP_UNDEFINED: _bindgen_ty_13 = 128;
pub const FZ_DEVFLAG_LINEJOIN_UNDEFINED: _bindgen_ty_13 = 256;
pub const FZ_DEVFLAG_MITERLIMIT_UNDEFINED: _bindgen_ty_13 = 512;
pub const FZ_DEVFLAG_LINEWIDTH_UNDEFINED: _bindgen_ty_13 = 1024;
pub const FZ_DEVFLAG_BBOX_DEFINED: _bindgen_ty_13 = 2048;
pub const FZ_DEVFLAG_GRIDFIT_AS_TILED: _bindgen_ty_13 = 4096;
pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
pub const FZ_BLEND_NORMAL: _bindgen_ty_14 = 0;
pub const FZ_BLEND_MULTIPLY: _bindgen_ty_14 = 1;
pub const FZ_BLEND_SCREEN: _bindgen_ty_14 = 2;
pub const FZ_BLEND_OVERLAY: _bindgen_ty_14 = 3;
pub const FZ_BLEND_DARKEN: _bindgen_ty_14 = 4;
pub const FZ_BLEND_LIGHTEN: _bindgen_ty_14 = 5;
pub const FZ_BLEND_COLOR_DODGE: _bindgen_ty_14 = 6;
pub const FZ_BLEND_COLOR_BURN: _bindgen_ty_14 = 7;
pub const FZ_BLEND_HARD_LIGHT: _bindgen_ty_14 = 8;
pub const FZ_BLEND_SOFT_LIGHT: _bindgen_ty_14 = 9;
pub const FZ_BLEND_DIFFERENCE: _bindgen_ty_14 = 10;
pub const FZ_BLEND_EXCLUSION: _bindgen_ty_14 = 11;
pub const FZ_BLEND_HUE: _bindgen_ty_14 = 12;
pub const FZ_BLEND_SATURATION: _bindgen_ty_14 = 13;
pub const FZ_BLEND_COLOR: _bindgen_ty_14 = 14;
pub const FZ_BLEND_LUMINOSITY: _bindgen_ty_14 = 15;
pub const FZ_BLEND_MODEMASK: _bindgen_ty_14 = 15;
pub const FZ_BLEND_ISOLATED: _bindgen_ty_14 = 16;
pub const FZ_BLEND_KNOCKOUT: _bindgen_ty_14 = 32;
pub type _bindgen_ty_14 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Map from (case sensitive) blend mode string to enumeration."]
pub fn fz_lookup_blendmode(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Map from enumeration to blend mode string.\n\nThe string is static, with arbitrary lifespan."]
pub fn fz_blendmode_name(blendmode: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
#[doc = "Devices can keep track of containers (clips/masks/groups/tiles)\nas they go to save callers having to do it."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_device_container_stack {
pub scissor: fz_rect,
pub type_: ::std::os::raw::c_int,
pub user: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_device_container_stack() {
const UNINIT: ::std::mem::MaybeUninit<fz_device_container_stack> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_device_container_stack>(),
24usize,
concat!("Size of: ", stringify!(fz_device_container_stack))
);
assert_eq!(
::std::mem::align_of::<fz_device_container_stack>(),
4usize,
concat!("Alignment of ", stringify!(fz_device_container_stack))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scissor) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(scissor)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(user)
)
);
}
pub const fz_device_container_stack_is_clip: _bindgen_ty_15 = 0;
pub const fz_device_container_stack_is_mask: _bindgen_ty_15 = 1;
pub const fz_device_container_stack_is_group: _bindgen_ty_15 = 2;
pub const fz_device_container_stack_is_tile: _bindgen_ty_15 = 3;
pub type _bindgen_ty_15 = ::std::os::raw::c_uint;
pub const fz_structure_FZ_STRUCTURE_INVALID: fz_structure = -1;
pub const fz_structure_FZ_STRUCTURE_DOCUMENT: fz_structure = 0;
pub const fz_structure_FZ_STRUCTURE_PART: fz_structure = 1;
pub const fz_structure_FZ_STRUCTURE_ART: fz_structure = 2;
pub const fz_structure_FZ_STRUCTURE_SECT: fz_structure = 3;
pub const fz_structure_FZ_STRUCTURE_DIV: fz_structure = 4;
pub const fz_structure_FZ_STRUCTURE_BLOCKQUOTE: fz_structure = 5;
pub const fz_structure_FZ_STRUCTURE_CAPTION: fz_structure = 6;
pub const fz_structure_FZ_STRUCTURE_TOC: fz_structure = 7;
pub const fz_structure_FZ_STRUCTURE_TOCI: fz_structure = 8;
pub const fz_structure_FZ_STRUCTURE_INDEX: fz_structure = 9;
pub const fz_structure_FZ_STRUCTURE_NONSTRUCT: fz_structure = 10;
pub const fz_structure_FZ_STRUCTURE_PRIVATE: fz_structure = 11;
pub const fz_structure_FZ_STRUCTURE_DOCUMENTFRAGMENT: fz_structure = 12;
pub const fz_structure_FZ_STRUCTURE_ASIDE: fz_structure = 13;
pub const fz_structure_FZ_STRUCTURE_TITLE: fz_structure = 14;
pub const fz_structure_FZ_STRUCTURE_FENOTE: fz_structure = 15;
pub const fz_structure_FZ_STRUCTURE_SUB: fz_structure = 16;
pub const fz_structure_FZ_STRUCTURE_P: fz_structure = 17;
pub const fz_structure_FZ_STRUCTURE_H: fz_structure = 18;
pub const fz_structure_FZ_STRUCTURE_H1: fz_structure = 19;
pub const fz_structure_FZ_STRUCTURE_H2: fz_structure = 20;
pub const fz_structure_FZ_STRUCTURE_H3: fz_structure = 21;
pub const fz_structure_FZ_STRUCTURE_H4: fz_structure = 22;
pub const fz_structure_FZ_STRUCTURE_H5: fz_structure = 23;
pub const fz_structure_FZ_STRUCTURE_H6: fz_structure = 24;
pub const fz_structure_FZ_STRUCTURE_LIST: fz_structure = 25;
pub const fz_structure_FZ_STRUCTURE_LISTITEM: fz_structure = 26;
pub const fz_structure_FZ_STRUCTURE_LABEL: fz_structure = 27;
pub const fz_structure_FZ_STRUCTURE_LISTBODY: fz_structure = 28;
pub const fz_structure_FZ_STRUCTURE_TABLE: fz_structure = 29;
pub const fz_structure_FZ_STRUCTURE_TR: fz_structure = 30;
pub const fz_structure_FZ_STRUCTURE_TH: fz_structure = 31;
pub const fz_structure_FZ_STRUCTURE_TD: fz_structure = 32;
pub const fz_structure_FZ_STRUCTURE_THEAD: fz_structure = 33;
pub const fz_structure_FZ_STRUCTURE_TBODY: fz_structure = 34;
pub const fz_structure_FZ_STRUCTURE_TFOOT: fz_structure = 35;
pub const fz_structure_FZ_STRUCTURE_SPAN: fz_structure = 36;
pub const fz_structure_FZ_STRUCTURE_QUOTE: fz_structure = 37;
pub const fz_structure_FZ_STRUCTURE_NOTE: fz_structure = 38;
pub const fz_structure_FZ_STRUCTURE_REFERENCE: fz_structure = 39;
pub const fz_structure_FZ_STRUCTURE_BIBENTRY: fz_structure = 40;
pub const fz_structure_FZ_STRUCTURE_CODE: fz_structure = 41;
pub const fz_structure_FZ_STRUCTURE_LINK: fz_structure = 42;
pub const fz_structure_FZ_STRUCTURE_ANNOT: fz_structure = 43;
pub const fz_structure_FZ_STRUCTURE_EM: fz_structure = 44;
pub const fz_structure_FZ_STRUCTURE_STRONG: fz_structure = 45;
pub const fz_structure_FZ_STRUCTURE_RUBY: fz_structure = 46;
pub const fz_structure_FZ_STRUCTURE_RB: fz_structure = 47;
pub const fz_structure_FZ_STRUCTURE_RT: fz_structure = 48;
pub const fz_structure_FZ_STRUCTURE_RP: fz_structure = 49;
pub const fz_structure_FZ_STRUCTURE_WARICHU: fz_structure = 50;
pub const fz_structure_FZ_STRUCTURE_WT: fz_structure = 51;
pub const fz_structure_FZ_STRUCTURE_WP: fz_structure = 52;
pub const fz_structure_FZ_STRUCTURE_FIGURE: fz_structure = 53;
pub const fz_structure_FZ_STRUCTURE_FORMULA: fz_structure = 54;
pub const fz_structure_FZ_STRUCTURE_FORM: fz_structure = 55;
pub const fz_structure_FZ_STRUCTURE_ARTIFACT: fz_structure = 56;
pub type fz_structure = ::std::os::raw::c_int;
extern "C" {
pub fn fz_structure_to_string(type_: fz_structure) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_structure_from_string(str_: *const ::std::os::raw::c_char) -> fz_structure;
}
pub const fz_metatext_FZ_METATEXT_ACTUALTEXT: fz_metatext = 0;
pub const fz_metatext_FZ_METATEXT_ALT: fz_metatext = 1;
pub const fz_metatext_FZ_METATEXT_ABBREVIATION: fz_metatext = 2;
pub const fz_metatext_FZ_METATEXT_TITLE: fz_metatext = 3;
pub type fz_metatext = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_device {
pub refs: ::std::os::raw::c_int,
pub hints: ::std::os::raw::c_int,
pub flags: ::std::os::raw::c_int,
pub close_device:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub drop_device:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub fill_path: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_path,
even_odd: ::std::os::raw::c_int,
arg4: fz_matrix,
arg5: *mut fz_colorspace,
color: *const f32,
alpha: f32,
arg6: fz_color_params,
),
>,
pub stroke_path: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_path,
arg4: *const fz_stroke_state,
arg5: fz_matrix,
arg6: *mut fz_colorspace,
color: *const f32,
alpha: f32,
arg7: fz_color_params,
),
>,
pub clip_path: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_path,
even_odd: ::std::os::raw::c_int,
arg4: fz_matrix,
scissor: fz_rect,
),
>,
pub clip_stroke_path: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_path,
arg4: *const fz_stroke_state,
arg5: fz_matrix,
scissor: fz_rect,
),
>,
pub fill_text: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_text,
arg4: fz_matrix,
arg5: *mut fz_colorspace,
color: *const f32,
alpha: f32,
arg6: fz_color_params,
),
>,
pub stroke_text: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_text,
arg4: *const fz_stroke_state,
arg5: fz_matrix,
arg6: *mut fz_colorspace,
color: *const f32,
alpha: f32,
arg7: fz_color_params,
),
>,
pub clip_text: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_text,
arg4: fz_matrix,
scissor: fz_rect,
),
>,
pub clip_stroke_text: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_text,
arg4: *const fz_stroke_state,
arg5: fz_matrix,
scissor: fz_rect,
),
>,
pub ignore_text: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *const fz_text,
arg4: fz_matrix,
),
>,
pub fill_shade: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
shd: *mut fz_shade,
ctm: fz_matrix,
alpha: f32,
color_params: fz_color_params,
),
>,
pub fill_image: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
img: *mut fz_image,
ctm: fz_matrix,
alpha: f32,
color_params: fz_color_params,
),
>,
pub fill_image_mask: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
img: *mut fz_image,
ctm: fz_matrix,
arg3: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
),
>,
pub clip_image_mask: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
img: *mut fz_image,
ctm: fz_matrix,
scissor: fz_rect,
),
>,
pub pop_clip:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub begin_mask: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
area: fz_rect,
luminosity: ::std::os::raw::c_int,
arg3: *mut fz_colorspace,
bc: *const f32,
arg4: fz_color_params,
),
>,
pub end_mask:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub begin_group: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
area: fz_rect,
cs: *mut fz_colorspace,
isolated: ::std::os::raw::c_int,
knockout: ::std::os::raw::c_int,
blendmode: ::std::os::raw::c_int,
alpha: f32,
),
>,
pub end_group:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub begin_tile: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
area: fz_rect,
view: fz_rect,
xstep: f32,
ystep: f32,
ctm: fz_matrix,
id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
pub end_tile:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub render_flags: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
set: ::std::os::raw::c_int,
clear: ::std::os::raw::c_int,
),
>,
pub set_default_colorspaces: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
arg3: *mut fz_default_colorspaces,
),
>,
pub begin_layer: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
layer_name: *const ::std::os::raw::c_char,
),
>,
pub end_layer:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub begin_structure: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
standard: fz_structure,
raw: *const ::std::os::raw::c_char,
uid: ::std::os::raw::c_int,
),
>,
pub end_structure:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub begin_metatext: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut fz_device,
meta: fz_metatext,
text: *const ::std::os::raw::c_char,
),
>,
pub end_metatext:
::std::option::Option<unsafe extern "C" fn(arg1: *mut fz_context, arg2: *mut fz_device)>,
pub d1_rect: fz_rect,
pub container_len: ::std::os::raw::c_int,
pub container_cap: ::std::os::raw::c_int,
pub container: *mut fz_device_container_stack,
}
#[test]
fn bindgen_test_layout_fz_device() {
const UNINIT: ::std::mem::MaybeUninit<fz_device> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_device>(),
288usize,
concat!("Size of: ", stringify!(fz_device))
);
assert_eq!(
::std::mem::align_of::<fz_device>(),
8usize,
concat!("Alignment of ", stringify!(fz_device))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hints) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(hints)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).close_device) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(close_device)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_device) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(drop_device)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_path) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stroke_path) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(stroke_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clip_path) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clip_stroke_path) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_stroke_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_text) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stroke_text) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(stroke_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clip_text) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clip_stroke_text) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_stroke_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ignore_text) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(ignore_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_shade) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_shade)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_image) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_image)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_image_mask) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_image_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clip_image_mask) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_image_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pop_clip) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(pop_clip)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_mask) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_mask) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_group) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_group)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_group) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_group)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_tile) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_tile)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_tile) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_tile)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).render_flags) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(render_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).set_default_colorspaces) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(set_default_colorspaces)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_layer) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_layer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_layer) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_layer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_structure) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_structure)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_structure) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_structure)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_metatext) as usize - ptr as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_metatext)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_metatext) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_metatext)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).d1_rect) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(d1_rect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).container_len) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(container_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).container_cap) as usize - ptr as usize },
276usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(container_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).container) as usize - ptr as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(container)
)
);
}
extern "C" {
#[doc = "Device calls; graphics primitives and containers."]
pub fn fz_fill_path(
ctx: *mut fz_context,
dev: *mut fz_device,
path: *const fz_path,
even_odd: ::std::os::raw::c_int,
ctm: fz_matrix,
colorspace: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_stroke_path(
ctx: *mut fz_context,
dev: *mut fz_device,
path: *const fz_path,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
colorspace: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_clip_path(
ctx: *mut fz_context,
dev: *mut fz_device,
path: *const fz_path,
even_odd: ::std::os::raw::c_int,
ctm: fz_matrix,
scissor: fz_rect,
);
}
extern "C" {
pub fn fz_clip_stroke_path(
ctx: *mut fz_context,
dev: *mut fz_device,
path: *const fz_path,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
scissor: fz_rect,
);
}
extern "C" {
pub fn fz_fill_text(
ctx: *mut fz_context,
dev: *mut fz_device,
text: *const fz_text,
ctm: fz_matrix,
colorspace: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_stroke_text(
ctx: *mut fz_context,
dev: *mut fz_device,
text: *const fz_text,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
colorspace: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_clip_text(
ctx: *mut fz_context,
dev: *mut fz_device,
text: *const fz_text,
ctm: fz_matrix,
scissor: fz_rect,
);
}
extern "C" {
pub fn fz_clip_stroke_text(
ctx: *mut fz_context,
dev: *mut fz_device,
text: *const fz_text,
stroke: *const fz_stroke_state,
ctm: fz_matrix,
scissor: fz_rect,
);
}
extern "C" {
pub fn fz_ignore_text(
ctx: *mut fz_context,
dev: *mut fz_device,
text: *const fz_text,
ctm: fz_matrix,
);
}
extern "C" {
pub fn fz_pop_clip(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_fill_shade(
ctx: *mut fz_context,
dev: *mut fz_device,
shade: *mut fz_shade,
ctm: fz_matrix,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_fill_image(
ctx: *mut fz_context,
dev: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_fill_image_mask(
ctx: *mut fz_context,
dev: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
colorspace: *mut fz_colorspace,
color: *const f32,
alpha: f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_clip_image_mask(
ctx: *mut fz_context,
dev: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
scissor: fz_rect,
);
}
extern "C" {
pub fn fz_begin_mask(
ctx: *mut fz_context,
dev: *mut fz_device,
area: fz_rect,
luminosity: ::std::os::raw::c_int,
colorspace: *mut fz_colorspace,
bc: *const f32,
color_params: fz_color_params,
);
}
extern "C" {
pub fn fz_end_mask(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_begin_group(
ctx: *mut fz_context,
dev: *mut fz_device,
area: fz_rect,
cs: *mut fz_colorspace,
isolated: ::std::os::raw::c_int,
knockout: ::std::os::raw::c_int,
blendmode: ::std::os::raw::c_int,
alpha: f32,
);
}
extern "C" {
pub fn fz_end_group(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_begin_tile(
ctx: *mut fz_context,
dev: *mut fz_device,
area: fz_rect,
view: fz_rect,
xstep: f32,
ystep: f32,
ctm: fz_matrix,
);
}
extern "C" {
pub fn fz_begin_tile_id(
ctx: *mut fz_context,
dev: *mut fz_device,
area: fz_rect,
view: fz_rect,
xstep: f32,
ystep: f32,
ctm: fz_matrix,
id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_end_tile(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_render_flags(
ctx: *mut fz_context,
dev: *mut fz_device,
set: ::std::os::raw::c_int,
clear: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_set_default_colorspaces(
ctx: *mut fz_context,
dev: *mut fz_device,
default_cs: *mut fz_default_colorspaces,
);
}
extern "C" {
pub fn fz_begin_layer(
ctx: *mut fz_context,
dev: *mut fz_device,
layer_name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn fz_end_layer(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_begin_structure(
ctx: *mut fz_context,
dev: *mut fz_device,
standard: fz_structure,
raw: *const ::std::os::raw::c_char,
uid: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_end_structure(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
pub fn fz_begin_metatext(
ctx: *mut fz_context,
dev: *mut fz_device,
meta: fz_metatext,
text: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn fz_end_metatext(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
#[doc = "Devices are created by calls to device implementations, for\ninstance: foo_new_device(). These will be implemented by calling\nfz_new_derived_device(ctx, foo_device) where foo_device is a\nstructure \"derived from\" fz_device, for instance\ntypedef struct { fz_device base; ...extras...} foo_device;"]
pub fn fz_new_device_of_size(
ctx: *mut fz_context,
size: ::std::os::raw::c_int,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Signal the end of input, and flush any buffered output.\nThis is NOT called implicitly on fz_drop_device. This\nmay throw exceptions."]
pub fn fz_close_device(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
#[doc = "Reduce the reference count on a device. When the reference count\nreaches zero, the device and its resources will be freed.\nDon't forget to call fz_close_device before dropping the device,\nor you may get incomplete output!\n\nNever throws exceptions."]
pub fn fz_drop_device(ctx: *mut fz_context, dev: *mut fz_device);
}
extern "C" {
#[doc = "Increment the reference count for a device. Returns the same\npointer.\n\nNever throws exceptions."]
pub fn fz_keep_device(ctx: *mut fz_context, dev: *mut fz_device) -> *mut fz_device;
}
extern "C" {
#[doc = "Enable (set) hint bits within the hint bitfield for a device."]
pub fn fz_enable_device_hints(
ctx: *mut fz_context,
dev: *mut fz_device,
hints: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Disable (clear) hint bits within the hint bitfield for a device."]
pub fn fz_disable_device_hints(
ctx: *mut fz_context,
dev: *mut fz_device,
hints: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Find current scissor region as tracked by the device."]
pub fn fz_device_current_scissor(ctx: *mut fz_context, dev: *mut fz_device) -> fz_rect;
}
pub const FZ_DONT_INTERPOLATE_IMAGES: _bindgen_ty_16 = 1;
pub const FZ_NO_CACHE: _bindgen_ty_16 = 2;
pub type _bindgen_ty_16 = ::std::os::raw::c_uint;
#[doc = "Provide two-way communication between application and library.\nIntended for multi-threaded applications where one thread is\nrendering pages and another thread wants to read progress\nfeedback or abort a job that takes a long time to finish. The\ncommunication is unsynchronized without locking.\n\nabort: The application should set this field to 0 before\ncalling fz_run_page to render a page. At any point when the\npage is being rendered the application my set this field to 1\nwhich will cause the rendering to finish soon. This field is\nchecked periodically when the page is rendered, but exactly\nwhen is not known, therefore there is no upper bound on\nexactly when the rendering will abort. If the application\ndid not provide a set of locks to fz_new_context, it must also\nawait the completion of fz_run_page before issuing another\ncall to fz_run_page. Note that once the application has set\nthis field to 1 after it called fz_run_page it may not change\nthe value again.\n\nprogress: Communicates rendering progress back to the\napplication and is read only. Increments as a page is being\nrendered. The value starts out at 0 and is limited to less\nthan or equal to progress_max, unless progress_max is -1.\n\nprogress_max: Communicates the known upper bound of rendering\nback to the application and is read only. The maximum value\nthat the progress field may take. If there is no known upper\nbound on how long the rendering may take this value is -1 and\nprogress is not limited. Note that the value of progress_max\nmay change from -1 to a positive value once an upper bound is\nknown, so take this into consideration when comparing the\nvalue of progress to that of progress_max.\n\nerrors: count of errors during current rendering.\n\nincomplete: Initially should be set to 0. Will be set to\nnon-zero if a TRYLATER error is thrown during rendering."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_cookie {
pub abort: ::std::os::raw::c_int,
pub progress: ::std::os::raw::c_int,
pub progress_max: usize,
pub errors: ::std::os::raw::c_int,
pub incomplete: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_cookie() {
const UNINIT: ::std::mem::MaybeUninit<fz_cookie> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_cookie>(),
24usize,
concat!("Size of: ", stringify!(fz_cookie))
);
assert_eq!(
::std::mem::align_of::<fz_cookie>(),
8usize,
concat!("Alignment of ", stringify!(fz_cookie))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).abort) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(abort)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).progress) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(progress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).progress_max) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(progress_max)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).errors) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).incomplete) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(incomplete)
)
);
}
extern "C" {
#[doc = "Create a device to print a debug trace of all device calls."]
pub fn fz_new_trace_device(ctx: *mut fz_context, out: *mut fz_output) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to output raw information."]
pub fn fz_new_xmltext_device(ctx: *mut fz_context, out: *mut fz_output) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to compute the bounding\nbox of all marks on a page.\n\nThe returned bounding box will be the union of all bounding\nboxes of all objects on a page."]
pub fn fz_new_bbox_device(ctx: *mut fz_context, rectp: *mut fz_rect) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to test for features.\n\nCurrently only tests for the presence of non-grayscale colors.\n\nis_color: Possible values returned:\n0: Definitely greyscale\n1: Probably color (all colors were grey, but there\nwere images or shadings in a non grey colorspace).\n2: Definitely color\n\nthreshold: The difference from grayscale that will be tolerated.\nTypical values to use are either 0 (be exact) and 0.02 (allow an\nimperceptible amount of slop).\n\noptions: A set of bitfield options, from the FZ_TEST_OPT set.\n\npassthrough: A device to pass all calls through to, or NULL.\nIf set, then the test device can both test and pass through to\nan underlying device (like, say, the display list device). This\nmeans that a display list can be created and at the end we'll\nknow if it's colored or not.\n\nIn the absence of a passthrough device, the device will throw\nan exception to stop page interpretation when color is found."]
pub fn fz_new_test_device(
ctx: *mut fz_context,
is_color: *mut ::std::os::raw::c_int,
threshold: f32,
options: ::std::os::raw::c_int,
passthrough: *mut fz_device,
) -> *mut fz_device;
}
pub const FZ_TEST_OPT_IMAGES: _bindgen_ty_17 = 1;
pub const FZ_TEST_OPT_SHADINGS: _bindgen_ty_17 = 2;
pub type _bindgen_ty_17 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Create a device to draw on a pixmap.\n\ndest: Target pixmap for the draw device. See fz_new_pixmap*\nfor how to obtain a pixmap. The pixmap is not cleared by the\ndraw device, see fz_clear_pixmap* for how to clear it prior to\ncalling fz_new_draw_device. Free the device by calling\nfz_drop_device.\n\ntransform: Transform from user space in points to device space\nin pixels."]
pub fn fz_new_draw_device(
ctx: *mut fz_context,
transform: fz_matrix,
dest: *mut fz_pixmap,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to draw on a pixmap.\n\ndest: Target pixmap for the draw device. See fz_new_pixmap*\nfor how to obtain a pixmap. The pixmap is not cleared by the\ndraw device, see fz_clear_pixmap* for how to clear it prior to\ncalling fz_new_draw_device. Free the device by calling\nfz_drop_device.\n\ntransform: Transform from user space in points to device space\nin pixels.\n\nclip: Bounding box to restrict any marking operations of the\ndraw device."]
pub fn fz_new_draw_device_with_bbox(
ctx: *mut fz_context,
transform: fz_matrix,
dest: *mut fz_pixmap,
clip: *const fz_irect,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to draw on a pixmap.\n\ndest: Target pixmap for the draw device. See fz_new_pixmap*\nfor how to obtain a pixmap. The pixmap is not cleared by the\ndraw device, see fz_clear_pixmap* for how to clear it prior to\ncalling fz_new_draw_device. Free the device by calling\nfz_drop_device.\n\ntransform: Transform from user space in points to device space\nin pixels.\n\nproof_cs: Intermediate color space to map though when mapping to\ncolor space defined by pixmap."]
pub fn fz_new_draw_device_with_proof(
ctx: *mut fz_context,
transform: fz_matrix,
dest: *mut fz_pixmap,
proof_cs: *mut fz_colorspace,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to draw on a pixmap.\n\ndest: Target pixmap for the draw device. See fz_new_pixmap*\nfor how to obtain a pixmap. The pixmap is not cleared by the\ndraw device, see fz_clear_pixmap* for how to clear it prior to\ncalling fz_new_draw_device. Free the device by calling\nfz_drop_device.\n\ntransform: Transform from user space in points to device space\nin pixels.\n\nclip: Bounding box to restrict any marking operations of the\ndraw device.\n\nproof_cs: Color space to render to prior to mapping to color\nspace defined by pixmap."]
pub fn fz_new_draw_device_with_bbox_proof(
ctx: *mut fz_context,
transform: fz_matrix,
dest: *mut fz_pixmap,
clip: *const fz_irect,
cs: *mut fz_colorspace,
) -> *mut fz_device;
}
extern "C" {
pub fn fz_new_draw_device_type3(
ctx: *mut fz_context,
transform: fz_matrix,
dest: *mut fz_pixmap,
) -> *mut fz_device;
}
#[doc = "struct fz_draw_options: Options for creating a pixmap and draw\ndevice."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_draw_options {
pub rotate: ::std::os::raw::c_int,
pub x_resolution: ::std::os::raw::c_int,
pub y_resolution: ::std::os::raw::c_int,
pub width: ::std::os::raw::c_int,
pub height: ::std::os::raw::c_int,
pub colorspace: *mut fz_colorspace,
pub alpha: ::std::os::raw::c_int,
pub graphics: ::std::os::raw::c_int,
pub text: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_draw_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_draw_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_draw_options>(),
48usize,
concat!("Size of: ", stringify!(fz_draw_options))
);
assert_eq!(
::std::mem::align_of::<fz_draw_options>(),
8usize,
concat!("Alignment of ", stringify!(fz_draw_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rotate) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(rotate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x_resolution) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(x_resolution)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y_resolution) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(y_resolution)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(height)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).graphics) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(graphics)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(text)
)
);
}
extern "C" {
pub static mut fz_draw_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Parse draw device options from a comma separated key-value string."]
pub fn fz_parse_draw_options(
ctx: *mut fz_context,
options: *mut fz_draw_options,
string: *const ::std::os::raw::c_char,
) -> *mut fz_draw_options;
}
extern "C" {
#[doc = "Create a new pixmap and draw device, using the specified options.\n\noptions: Options to configure the draw device, and choose the\nresolution and colorspace.\n\nmediabox: The bounds of the page in points.\n\npixmap: An out parameter containing the newly created pixmap."]
pub fn fz_new_draw_device_with_options(
ctx: *mut fz_context,
options: *const fz_draw_options,
mediabox: fz_rect,
pixmap: *mut *mut fz_pixmap,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create an empty display list.\n\nA display list contains drawing commands (text, images, etc.).\nUse fz_new_list_device for populating the list.\n\nmediabox: Bounds of the page (in points) represented by the\ndisplay list."]
pub fn fz_new_display_list(ctx: *mut fz_context, mediabox: fz_rect) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Create a rendering device for a display list.\n\nWhen the device is rendering a page it will populate the\ndisplay list with drawing commands (text, images, etc.). The\ndisplay list can later be reused to render a page many times\nwithout having to re-interpret the page from the document file\nfor each rendering. Once the device is no longer needed, free\nit with fz_drop_device.\n\nlist: A display list that the list device takes a reference to."]
pub fn fz_new_list_device(ctx: *mut fz_context, list: *mut fz_display_list) -> *mut fz_device;
}
extern "C" {
#[doc = "(Re)-run a display list through a device.\n\nlist: A display list, created by fz_new_display_list and\npopulated with objects from a page by running fz_run_page on a\ndevice obtained from fz_new_list_device.\n\nctm: Transform to apply to display list contents. May include\nfor example scaling and rotation, see fz_scale, fz_rotate and\nfz_concat. Set to fz_identity if no transformation is desired.\n\nscissor: Only the part of the contents of the display list\nvisible within this area will be considered when the list is\nrun through the device. This does not imply for tile objects\ncontained in the display list.\n\ncookie: Communication mechanism between caller and library\nrunning the page. Intended for multi-threaded applications,\nwhile single-threaded applications set cookie to NULL. The\ncaller may abort an ongoing page run. Cookie also communicates\nprogress information back to the caller. The fields inside\ncookie are continually updated while the page is being run."]
pub fn fz_run_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
dev: *mut fz_device,
ctm: fz_matrix,
scissor: fz_rect,
cookie: *mut fz_cookie,
);
}
extern "C" {
#[doc = "Increment the reference count for a display list. Returns the\nsame pointer.\n\nNever throws exceptions."]
pub fn fz_keep_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Decrement the reference count for a display list. When the\nreference count reaches zero, all the references in the display\nlist itself are dropped, and the display list is freed.\n\nNever throws exceptions."]
pub fn fz_drop_display_list(ctx: *mut fz_context, list: *mut fz_display_list);
}
extern "C" {
#[doc = "Return the bounding box of the page recorded in a display list."]
pub fn fz_bound_display_list(ctx: *mut fz_context, list: *mut fz_display_list) -> fz_rect;
}
extern "C" {
#[doc = "Create a new image from a display list.\n\nw, h: The conceptual width/height of the image.\n\ntransform: The matrix that needs to be applied to the given\nlist to make it render to the unit square.\n\nlist: The display list."]
pub fn fz_new_image_from_display_list(
ctx: *mut fz_context,
w: f32,
h: f32,
list: *mut fz_display_list,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Check for a display list being empty\n\nlist: The list to check.\n\nReturns true if empty, false otherwise."]
pub fn fz_display_list_is_empty(
ctx: *mut fz_context,
list: *const fz_display_list,
) -> ::std::os::raw::c_int;
}
#[doc = "Locations within the document are referred to in terms of\nchapter and page, rather than just a page number. For some\ndocuments (such as epub documents with large numbers of pages\nbroken into many chapters) this can make navigation much faster\nas only the required chapter needs to be decoded at a time."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_location {
pub chapter: ::std::os::raw::c_int,
pub page: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_location() {
const UNINIT: ::std::mem::MaybeUninit<fz_location> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_location>(),
8usize,
concat!("Size of: ", stringify!(fz_location))
);
assert_eq!(
::std::mem::align_of::<fz_location>(),
4usize,
concat!("Alignment of ", stringify!(fz_location))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).chapter) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_location),
"::",
stringify!(chapter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_location),
"::",
stringify!(page)
)
);
}
#[doc = "Simple text layout (for use with annotation editing primarily)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_layout_char {
pub x: f32,
pub advance: f32,
pub p: *const ::std::os::raw::c_char,
pub next: *mut fz_layout_char,
}
#[test]
fn bindgen_test_layout_fz_layout_char() {
const UNINIT: ::std::mem::MaybeUninit<fz_layout_char> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_layout_char>(),
24usize,
concat!("Size of: ", stringify!(fz_layout_char))
);
assert_eq!(
::std::mem::align_of::<fz_layout_char>(),
8usize,
concat!("Alignment of ", stringify!(fz_layout_char))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).advance) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(advance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_layout_line {
pub x: f32,
pub y: f32,
pub font_size: f32,
pub p: *const ::std::os::raw::c_char,
pub text: *mut fz_layout_char,
pub next: *mut fz_layout_line,
}
#[test]
fn bindgen_test_layout_fz_layout_line() {
const UNINIT: ::std::mem::MaybeUninit<fz_layout_line> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_layout_line>(),
40usize,
concat!("Size of: ", stringify!(fz_layout_line))
);
assert_eq!(
::std::mem::align_of::<fz_layout_line>(),
8usize,
concat!("Alignment of ", stringify!(fz_layout_line))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(font_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_layout_block {
pub pool: *mut fz_pool,
pub matrix: fz_matrix,
pub inv_matrix: fz_matrix,
pub head: *mut fz_layout_line,
pub tailp: *mut *mut fz_layout_line,
pub text_tailp: *mut *mut fz_layout_char,
}
#[test]
fn bindgen_test_layout_fz_layout_block() {
const UNINIT: ::std::mem::MaybeUninit<fz_layout_block> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_layout_block>(),
80usize,
concat!("Size of: ", stringify!(fz_layout_block))
);
assert_eq!(
::std::mem::align_of::<fz_layout_block>(),
8usize,
concat!("Alignment of ", stringify!(fz_layout_block))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pool) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(pool)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matrix) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).inv_matrix) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(inv_matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(head)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tailp) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(tailp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text_tailp) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(text_tailp)
)
);
}
extern "C" {
#[doc = "Create a new layout block, with new allocation pool, zero\nmatrices, and initialise linked pointers."]
pub fn fz_new_layout(ctx: *mut fz_context) -> *mut fz_layout_block;
}
extern "C" {
#[doc = "Drop layout block. Free the pool, and linked blocks.\n\nNever throws exceptions."]
pub fn fz_drop_layout(ctx: *mut fz_context, block: *mut fz_layout_block);
}
extern "C" {
#[doc = "Add a new line to the end of the layout block."]
pub fn fz_add_layout_line(
ctx: *mut fz_context,
block: *mut fz_layout_block,
x: f32,
y: f32,
h: f32,
p: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Add a new char to the line at the end of the layout block."]
pub fn fz_add_layout_char(
ctx: *mut fz_context,
block: *mut fz_layout_block,
x: f32,
w: f32,
p: *const ::std::os::raw::c_char,
);
}
pub const FZ_STEXT_PRESERVE_LIGATURES: _bindgen_ty_18 = 1;
pub const FZ_STEXT_PRESERVE_WHITESPACE: _bindgen_ty_18 = 2;
pub const FZ_STEXT_PRESERVE_IMAGES: _bindgen_ty_18 = 4;
pub const FZ_STEXT_INHIBIT_SPACES: _bindgen_ty_18 = 8;
pub const FZ_STEXT_DEHYPHENATE: _bindgen_ty_18 = 16;
pub const FZ_STEXT_PRESERVE_SPANS: _bindgen_ty_18 = 32;
pub const FZ_STEXT_MEDIABOX_CLIP: _bindgen_ty_18 = 64;
#[doc = "FZ_STEXT_PRESERVE_LIGATURES: If this option is activated\nligatures are passed through to the application in their\noriginal form. If this option is deactivated ligatures are\nexpanded into their constituent parts, e.g. the ligature ffi is\nexpanded into three separate characters f, f and i.\n\nFZ_STEXT_PRESERVE_WHITESPACE: If this option is activated\nwhitespace is passed through to the application in its original\nform. If this option is deactivated any type of horizontal\nwhitespace (including horizontal tabs) will be replaced with\nspace characters of variable width.\n\nFZ_STEXT_PRESERVE_IMAGES: If this option is set, then images\nwill be stored in the structured text structure. The default is\nto ignore all images.\n\nFZ_STEXT_INHIBIT_SPACES: If this option is set, we will not try\nto add missing space characters where there are large gaps\nbetween characters.\n\nFZ_STEXT_DEHYPHENATE: If this option is set, hyphens at the\nend of a line will be removed and the lines will be merged.\n\nFZ_STEXT_PRESERVE_SPANS: If this option is set, spans on the same line\nwill not be merged. Each line will thus be a span of text with the same\nfont, colour, and size.\n\nFZ_STEXT_MEDIABOX_CLIP: If this option is set, characters entirely\noutside each page's mediabox will be ignored."]
pub type _bindgen_ty_18 = ::std::os::raw::c_uint;
#[doc = "A text page is a list of blocks, together with an overall\nbounding box."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_page {
pub pool: *mut fz_pool,
pub mediabox: fz_rect,
pub first_block: *mut fz_stext_block,
pub last_block: *mut fz_stext_block,
}
#[test]
fn bindgen_test_layout_fz_stext_page() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_page>(),
40usize,
concat!("Size of: ", stringify!(fz_stext_page))
);
assert_eq!(
::std::mem::align_of::<fz_stext_page>(),
8usize,
concat!("Alignment of ", stringify!(fz_stext_page))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pool) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(pool)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mediabox) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(mediabox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).first_block) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(first_block)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).last_block) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(last_block)
)
);
}
pub const FZ_STEXT_BLOCK_TEXT: _bindgen_ty_19 = 0;
pub const FZ_STEXT_BLOCK_IMAGE: _bindgen_ty_19 = 1;
pub type _bindgen_ty_19 = ::std::os::raw::c_uint;
#[doc = "A text block is a list of lines of text (typically a paragraph),\nor an image."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_stext_block {
pub type_: ::std::os::raw::c_int,
pub bbox: fz_rect,
pub u: fz_stext_block__bindgen_ty_1,
pub prev: *mut fz_stext_block,
pub next: *mut fz_stext_block,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union fz_stext_block__bindgen_ty_1 {
pub t: fz_stext_block__bindgen_ty_1__bindgen_ty_1,
pub i: fz_stext_block__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_block__bindgen_ty_1__bindgen_ty_1 {
pub first_line: *mut fz_stext_line,
pub last_line: *mut fz_stext_line,
}
#[test]
fn bindgen_test_layout_fz_stext_block__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_block__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).first_line) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(first_line)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).last_line) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(last_line)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_block__bindgen_ty_1__bindgen_ty_2 {
pub transform: fz_matrix,
pub image: *mut fz_image,
}
#[test]
fn bindgen_test_layout_fz_stext_block__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_block__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).transform) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(transform)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).image) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(image)
)
);
}
#[test]
fn bindgen_test_layout_fz_stext_block__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_block__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(fz_stext_block__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_stext_block__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(fz_stext_block__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1),
"::",
stringify!(t)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1),
"::",
stringify!(i)
)
);
}
#[test]
fn bindgen_test_layout_fz_stext_block() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_block> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_block>(),
72usize,
concat!("Size of: ", stringify!(fz_stext_block))
);
assert_eq!(
::std::mem::align_of::<fz_stext_block>(),
8usize,
concat!("Alignment of ", stringify!(fz_stext_block))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(next)
)
);
}
#[doc = "A text line is a list of characters that share a common baseline."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_line {
pub wmode: ::std::os::raw::c_int,
pub dir: fz_point,
pub bbox: fz_rect,
pub first_char: *mut fz_stext_char,
pub last_char: *mut fz_stext_char,
pub prev: *mut fz_stext_line,
pub next: *mut fz_stext_line,
}
#[test]
fn bindgen_test_layout_fz_stext_line() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_line> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_line>(),
64usize,
concat!("Size of: ", stringify!(fz_stext_line))
);
assert_eq!(
::std::mem::align_of::<fz_stext_line>(),
8usize,
concat!("Alignment of ", stringify!(fz_stext_line))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wmode) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dir) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(dir)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).first_char) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(first_char)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).last_char) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(last_char)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(next)
)
);
}
#[doc = "A text char is a unicode character, the style in which is\nappears, and the point at which it is positioned."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_char {
pub c: ::std::os::raw::c_int,
pub color: ::std::os::raw::c_int,
pub origin: fz_point,
pub quad: fz_quad,
pub size: f32,
pub font: *mut fz_font,
pub next: *mut fz_stext_char,
}
#[test]
fn bindgen_test_layout_fz_stext_char() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_char> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_char>(),
72usize,
concat!("Size of: ", stringify!(fz_stext_char))
);
assert_eq!(
::std::mem::align_of::<fz_stext_char>(),
8usize,
concat!("Alignment of ", stringify!(fz_stext_char))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(c)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(color)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).origin) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(origin)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quad) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(quad)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(next)
)
);
}
extern "C" {
pub static mut fz_stext_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Create an empty text page.\n\nThe text page is filled out by the text device to contain the\nblocks and lines of text on the page.\n\nmediabox: optional mediabox information."]
pub fn fz_new_stext_page(ctx: *mut fz_context, mediabox: fz_rect) -> *mut fz_stext_page;
}
extern "C" {
pub fn fz_drop_stext_page(ctx: *mut fz_context, page: *mut fz_stext_page);
}
extern "C" {
#[doc = "Output structured text to a file in HTML (visual) format."]
pub fn fz_print_stext_page_as_html(
ctx: *mut fz_context,
out: *mut fz_output,
page: *mut fz_stext_page,
id: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_print_stext_header_as_html(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
pub fn fz_print_stext_trailer_as_html(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Output structured text to a file in XHTML (semantic) format."]
pub fn fz_print_stext_page_as_xhtml(
ctx: *mut fz_context,
out: *mut fz_output,
page: *mut fz_stext_page,
id: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn fz_print_stext_header_as_xhtml(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
pub fn fz_print_stext_trailer_as_xhtml(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Output structured text to a file in XML format."]
pub fn fz_print_stext_page_as_xml(
ctx: *mut fz_context,
out: *mut fz_output,
page: *mut fz_stext_page,
id: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Output structured text to a file in JSON format."]
pub fn fz_print_stext_page_as_json(
ctx: *mut fz_context,
out: *mut fz_output,
page: *mut fz_stext_page,
scale: f32,
);
}
extern "C" {
#[doc = "Output structured text to a file in plain-text UTF-8 format."]
pub fn fz_print_stext_page_as_text(
ctx: *mut fz_context,
out: *mut fz_output,
page: *mut fz_stext_page,
);
}
extern "C" {
#[doc = "Search for occurrence of 'needle' in text page.\n\nReturn the number of hits and store hit quads in the passed in\narray.\n\nNOTE: This is an experimental interface and subject to change\nwithout notice."]
pub fn fz_search_stext_page(
ctx: *mut fz_context,
text: *mut fz_stext_page,
needle: *const ::std::os::raw::c_char,
hit_mark: *mut ::std::os::raw::c_int,
hit_bbox: *mut fz_quad,
hit_max: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return a list of quads to highlight lines inside the selection\npoints."]
pub fn fz_highlight_selection(
ctx: *mut fz_context,
page: *mut fz_stext_page,
a: fz_point,
b: fz_point,
quads: *mut fz_quad,
max_quads: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
pub const FZ_SELECT_CHARS: _bindgen_ty_20 = 0;
pub const FZ_SELECT_WORDS: _bindgen_ty_20 = 1;
pub const FZ_SELECT_LINES: _bindgen_ty_20 = 2;
pub type _bindgen_ty_20 = ::std::os::raw::c_uint;
extern "C" {
pub fn fz_snap_selection(
ctx: *mut fz_context,
page: *mut fz_stext_page,
ap: *mut fz_point,
bp: *mut fz_point,
mode: ::std::os::raw::c_int,
) -> fz_quad;
}
extern "C" {
#[doc = "Return a newly allocated UTF-8 string with the text for a given\nselection.\n\ncrlf: If true, write \"\\r\\n\" style line endings (otherwise \"\\n\"\nonly)."]
pub fn fz_copy_selection(
ctx: *mut fz_context,
page: *mut fz_stext_page,
a: fz_point,
b: fz_point,
crlf: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Return a newly allocated UTF-8 string with the text for a given\nselection rectangle.\n\ncrlf: If true, write \"\\r\\n\" style line endings (otherwise \"\\n\"\nonly)."]
pub fn fz_copy_rectangle(
ctx: *mut fz_context,
page: *mut fz_stext_page,
area: fz_rect,
crlf: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
#[doc = "Options for creating a pixmap and draw device."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_stext_options {
pub flags: ::std::os::raw::c_int,
pub scale: f32,
}
#[test]
fn bindgen_test_layout_fz_stext_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_stext_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_stext_options>(),
8usize,
concat!("Size of: ", stringify!(fz_stext_options))
);
assert_eq!(
::std::mem::align_of::<fz_stext_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_options),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_options),
"::",
stringify!(scale)
)
);
}
extern "C" {
#[doc = "Parse stext device options from a comma separated key-value\nstring."]
pub fn fz_parse_stext_options(
ctx: *mut fz_context,
opts: *mut fz_stext_options,
string: *const ::std::os::raw::c_char,
) -> *mut fz_stext_options;
}
extern "C" {
#[doc = "Create a device to extract the text on a page.\n\nGather the text on a page into blocks and lines.\n\nThe reading order is taken from the order the text is drawn in\nthe source file, so may not be accurate.\n\npage: The text page to which content should be added. This will\nusually be a newly created (empty) text page, but it can be one\ncontaining data already (for example when merging multiple\npages, or watermarking).\n\noptions: Options to configure the stext device."]
pub fn fz_new_stext_device(
ctx: *mut fz_context,
page: *mut fz_stext_page,
options: *const fz_stext_options,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device to OCR the text on the page.\n\nRenders the page internally to a bitmap that is then OCRd. Text\nis then forwarded onto the target device.\n\ntarget: The target device to receive the OCRd text.\n\nctm: The transform to apply to the mediabox to get the size for\nthe rendered page image. Also used to calculate the resolution\nfor the page image. In general, this will be the same as the CTM\nthat you pass to fz_run_page (or fz_run_display_list) to feed\nthis device.\n\nmediabox: The mediabox (in points). Combined with the CTM to get\nthe bounds of the pixmap used internally for the rendered page\nimage.\n\nwith_list: If with_list is false, then all non-text operations\nare forwarded instantly to the target device. This results in\nthe target device seeing all NON-text operations, followed by\nall the text operations (derived from OCR).\n\nIf with_list is true, then all the marking operations are\ncollated into a display list which is then replayed to the\ntarget device at the end.\n\nlanguage: NULL (for \"eng\"), or a pointer to a string to describe\nthe languages/scripts that should be used for OCR (e.g.\n\"eng,ara\").\n\ndatadir: NULL (for \"\"), or a pointer to a path string otherwise\nprovided to Tesseract in the TESSDATA_PREFIX environment variable.\n\nprogress: NULL, or function to be called periodically to indicate\nprogress. Return 0 to continue, or 1 to cancel. progress_arg is\nreturned as the void *. The int is a value between 0 and 100 to\nindicate progress.\n\nprogress_arg: A void * value to be parrotted back to the progress\nfunction."]
pub fn fz_new_ocr_device(
ctx: *mut fz_context,
target: *mut fz_device,
ctm: fz_matrix,
mediabox: fz_rect,
with_list: ::std::os::raw::c_int,
language: *const ::std::os::raw::c_char,
datadir: *const ::std::os::raw::c_char,
progress: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut ::std::os::raw::c_void,
arg3: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>,
progress_arg: *mut ::std::os::raw::c_void,
) -> *mut fz_device;
}
extern "C" {
pub fn fz_open_reflowed_document(
ctx: *mut fz_context,
underdoc: *mut fz_document,
opts: *const fz_stext_options,
) -> *mut fz_document;
}
pub const FZ_TRANSITION_NONE: _bindgen_ty_21 = 0;
pub const FZ_TRANSITION_SPLIT: _bindgen_ty_21 = 1;
pub const FZ_TRANSITION_BLINDS: _bindgen_ty_21 = 2;
pub const FZ_TRANSITION_BOX: _bindgen_ty_21 = 3;
pub const FZ_TRANSITION_WIPE: _bindgen_ty_21 = 4;
pub const FZ_TRANSITION_DISSOLVE: _bindgen_ty_21 = 5;
pub const FZ_TRANSITION_GLITTER: _bindgen_ty_21 = 6;
pub const FZ_TRANSITION_FLY: _bindgen_ty_21 = 7;
pub const FZ_TRANSITION_PUSH: _bindgen_ty_21 = 8;
pub const FZ_TRANSITION_COVER: _bindgen_ty_21 = 9;
pub const FZ_TRANSITION_UNCOVER: _bindgen_ty_21 = 10;
pub const FZ_TRANSITION_FADE: _bindgen_ty_21 = 11;
pub type _bindgen_ty_21 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_transition {
pub type_: ::std::os::raw::c_int,
pub duration: f32,
pub vertical: ::std::os::raw::c_int,
pub outwards: ::std::os::raw::c_int,
pub direction: ::std::os::raw::c_int,
pub state0: ::std::os::raw::c_int,
pub state1: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_transition() {
const UNINIT: ::std::mem::MaybeUninit<fz_transition> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_transition>(),
28usize,
concat!("Size of: ", stringify!(fz_transition))
);
assert_eq!(
::std::mem::align_of::<fz_transition>(),
4usize,
concat!("Alignment of ", stringify!(fz_transition))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vertical) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(vertical)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).outwards) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(outwards)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state0) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(state0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state1) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(state1)
)
);
}
extern "C" {
#[doc = "Generate a frame of a transition.\n\ntpix: Target pixmap\nopix: Old pixmap\nnpix: New pixmap\ntime: Position within the transition (0 to 256)\ntrans: Transition details\n\nReturns 1 if successfully generated a frame.\n\nNote: Pixmaps must include alpha."]
pub fn fz_generate_transition(
ctx: *mut fz_context,
tpix: *mut fz_pixmap,
opix: *mut fz_pixmap,
npix: *mut fz_pixmap,
time: ::std::os::raw::c_int,
trans: *mut fz_transition,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Purge all the glyphs from the cache."]
pub fn fz_purge_glyph_cache(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Create a pixmap containing a rendered glyph.\n\nLookup gid from font, clip it with scissor, and rendering it\nwith aa bits of antialiasing into a new pixmap.\n\nThe caller takes ownership of the pixmap and so must free it.\n\nNote: This function is no longer used for normal rendering\noperations, and is kept around just because we use it in the\napp. It should be considered \"at risk\" of removal from the API."]
pub fn fz_render_glyph_pixmap(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
ctm: *mut fz_matrix,
scissor: *const fz_irect,
aa: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Nasty PDF interpreter specific hernia, required to allow the\ninterpreter to replay glyphs from a type3 font directly into\nthe target device.\n\nThis is only used in exceptional circumstances (such as type3\nglyphs that inherit current graphics state, or nested type3\nglyphs)."]
pub fn fz_render_t3_glyph_direct(
ctx: *mut fz_context,
dev: *mut fz_device,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
trm: fz_matrix,
gstate: *mut ::std::os::raw::c_void,
def_cs: *mut fz_default_colorspaces,
);
}
extern "C" {
#[doc = "Force a type3 font to cache the displaylist for a given glyph\nid.\n\nThis caching can involve reading the underlying file, so must\nhappen ahead of time, so we aren't suddenly forced to read the\nfile while playing a displaylist back."]
pub fn fz_prepare_t3_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
gid: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Dump debug statistics for the glyph cache."]
pub fn fz_dump_glyph_cache_stats(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Perform subpixel quantisation and adjustment on a glyph matrix.\n\nctm: On entry, the desired 'ideal' transformation for a glyph.\nOn exit, adjusted to a (very similar) transformation quantised\nfor subpixel caching.\n\nsubpix_ctm: Initialised by the routine to the transform that\nshould be used to render the glyph.\n\nqe, qf: which subpixel position we quantised to.\n\nReturns: the size of the glyph.\n\nNote: This is currently only exposed for use in our app. It\nshould be considered \"at risk\" of removal from the API."]
pub fn fz_subpixel_adjust(
ctx: *mut fz_context,
ctm: *mut fz_matrix,
subpix_ctm: *mut fz_matrix,
qe: *mut ::std::os::raw::c_uchar,
qf: *mut ::std::os::raw::c_uchar,
) -> f32;
}
pub type fz_link_set_rect_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, link: *mut fz_link, rect: fz_rect),
>;
pub type fz_link_set_uri_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
link: *mut fz_link,
uri: *const ::std::os::raw::c_char,
),
>;
pub type fz_link_drop_link_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, link: *mut fz_link)>;
#[doc = "fz_link is a list of interactive links on a page.\n\nThere is no relation between the order of the links in the\nlist and the order they appear on the page. The list of links\nfor a given page can be obtained from fz_load_links.\n\nA link is reference counted. Dropping a reference to a link is\ndone by calling fz_drop_link.\n\nrect: The hot zone. The area that can be clicked in\nuntransformed coordinates.\n\nuri: Link destinations come in two forms: internal and external.\nInternal links refer to other pages in the same document.\nExternal links are URLs to other documents.\n\nnext: A pointer to the next link on the same page."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_link {
pub refs: ::std::os::raw::c_int,
pub next: *mut fz_link,
pub rect: fz_rect,
pub uri: *mut ::std::os::raw::c_char,
pub set_rect_fn: fz_link_set_rect_fn,
pub set_uri_fn: fz_link_set_uri_fn,
pub drop: fz_link_drop_link_fn,
}
#[test]
fn bindgen_test_layout_fz_link() {
const UNINIT: ::std::mem::MaybeUninit<fz_link> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_link>(),
64usize,
concat!("Size of: ", stringify!(fz_link))
);
assert_eq!(
::std::mem::align_of::<fz_link>(),
8usize,
concat!("Alignment of ", stringify!(fz_link))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(rect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uri) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(uri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).set_rect_fn) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(set_rect_fn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).set_uri_fn) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(set_uri_fn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(drop)
)
);
}
pub const fz_link_dest_type_FZ_LINK_DEST_FIT: fz_link_dest_type = 0;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_B: fz_link_dest_type = 1;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_H: fz_link_dest_type = 2;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_BH: fz_link_dest_type = 3;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_V: fz_link_dest_type = 4;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_BV: fz_link_dest_type = 5;
pub const fz_link_dest_type_FZ_LINK_DEST_FIT_R: fz_link_dest_type = 6;
pub const fz_link_dest_type_FZ_LINK_DEST_XYZ: fz_link_dest_type = 7;
pub type fz_link_dest_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_link_dest {
pub loc: fz_location,
pub type_: fz_link_dest_type,
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
pub zoom: f32,
}
#[test]
fn bindgen_test_layout_fz_link_dest() {
const UNINIT: ::std::mem::MaybeUninit<fz_link_dest> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_link_dest>(),
32usize,
concat!("Size of: ", stringify!(fz_link_dest))
);
assert_eq!(
::std::mem::align_of::<fz_link_dest>(),
4usize,
concat!("Alignment of ", stringify!(fz_link_dest))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).loc) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(loc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).zoom) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_link_dest),
"::",
stringify!(zoom)
)
);
}
extern "C" {
pub fn fz_make_link_dest_none() -> fz_link_dest;
}
extern "C" {
pub fn fz_make_link_dest_xyz(
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
x: f32,
y: f32,
z: f32,
) -> fz_link_dest;
}
extern "C" {
#[doc = "Create a new link record.\n\nnext is set to NULL with the expectation that the caller will\nhandle the linked list setup. Internal function.\n\nDifferent document types will be implemented by deriving from\nfz_link. This macro allocates such derived structures, and\ninitialises the base sections."]
pub fn fz_new_link_of_size(
ctx: *mut fz_context,
size: ::std::os::raw::c_int,
rect: fz_rect,
uri: *const ::std::os::raw::c_char,
) -> *mut fz_link;
}
extern "C" {
#[doc = "Increment the reference count for a link. The same pointer is\nreturned.\n\nNever throws exceptions."]
pub fn fz_keep_link(ctx: *mut fz_context, link: *mut fz_link) -> *mut fz_link;
}
extern "C" {
#[doc = "Decrement the reference count for a link. When the reference\ncount reaches zero, the link is destroyed.\n\nWhen a link is freed, the reference for any linked link (next)\nis dropped too, thus an entire linked list of fz_link's can be\nfreed by just dropping the head."]
pub fn fz_drop_link(ctx: *mut fz_context, link: *mut fz_link);
}
extern "C" {
#[doc = "Query whether a link is external to a document (determined by\nuri containing a ':', intended to match with '://' which\nseparates the scheme from the scheme specific parts in URIs)."]
pub fn fz_is_external_link(
ctx: *mut fz_context,
uri: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_set_link_rect(ctx: *mut fz_context, link: *mut fz_link, rect: fz_rect);
}
extern "C" {
pub fn fz_set_link_uri(
ctx: *mut fz_context,
link: *mut fz_link,
uri: *const ::std::os::raw::c_char,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_outline_item {
pub title: *mut ::std::os::raw::c_char,
pub uri: *mut ::std::os::raw::c_char,
pub is_open: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_outline_item() {
const UNINIT: ::std::mem::MaybeUninit<fz_outline_item> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_outline_item>(),
24usize,
concat!("Size of: ", stringify!(fz_outline_item))
);
assert_eq!(
::std::mem::align_of::<fz_outline_item>(),
8usize,
concat!("Alignment of ", stringify!(fz_outline_item))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).title) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_item),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uri) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_item),
"::",
stringify!(uri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_open) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_item),
"::",
stringify!(is_open)
)
);
}
extern "C" {
#[doc = "Call to get the current outline item.\n\nCan return NULL. The item is only valid until the next call."]
pub fn fz_outline_iterator_item(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> *mut fz_outline_item;
}
extern "C" {
#[doc = "Calls to move the iterator position.\n\nA negative return value means we could not move as requested. Otherwise:\n0 = the final position has a valid item.\n1 = not a valid item, but we can insert an item here."]
pub fn fz_outline_iterator_next(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_outline_iterator_prev(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_outline_iterator_up(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_outline_iterator_down(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Call to insert a new item BEFORE the current point.\n\nOwnership of pointers are retained by the caller. The item data will be copied.\n\nAfter an insert, we do not change where we are pointing.\nThe return code is the same as for next, it indicates the current iterator position."]
pub fn fz_outline_iterator_insert(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
item: *mut fz_outline_item,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Delete the current item.\n\nThis implicitly moves us to the 'next' item, and the return code is as for fz_outline_iterator_next."]
pub fn fz_outline_iterator_delete(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Update the current item properties according to the given item."]
pub fn fz_outline_iterator_update(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
item: *mut fz_outline_item,
);
}
extern "C" {
#[doc = "Drop the current iterator."]
pub fn fz_drop_outline_iterator(ctx: *mut fz_context, iter: *mut fz_outline_iterator);
}
#[doc = "fz_outline is a tree of the outline of a document (also known\nas table of contents).\n\ntitle: Title of outline item using UTF-8 encoding. May be NULL\nif the outline item has no text string.\n\nuri: Destination in the document to be displayed when this\noutline item is activated. May be an internal or external\nlink, or NULL if the outline item does not have a destination.\n\npage: The page number of an internal link, or -1 for external\nlinks or links with no destination.\n\nnext: The next outline item at the same level as this outline\nitem. May be NULL if no more outline items exist at this level.\n\ndown: The outline items immediate children in the hierarchy.\nMay be NULL if no children exist."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_outline {
pub refs: ::std::os::raw::c_int,
pub title: *mut ::std::os::raw::c_char,
pub uri: *mut ::std::os::raw::c_char,
pub page: fz_location,
pub x: f32,
pub y: f32,
pub next: *mut fz_outline,
pub down: *mut fz_outline,
pub is_open: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_outline() {
const UNINIT: ::std::mem::MaybeUninit<fz_outline> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_outline>(),
64usize,
concat!("Size of: ", stringify!(fz_outline))
);
assert_eq!(
::std::mem::align_of::<fz_outline>(),
8usize,
concat!("Alignment of ", stringify!(fz_outline))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).title) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uri) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(uri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).down) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(down)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_open) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(is_open)
)
);
}
extern "C" {
#[doc = "Create a new outline entry with zeroed fields for the caller\nto fill in."]
pub fn fz_new_outline(ctx: *mut fz_context) -> *mut fz_outline;
}
extern "C" {
#[doc = "Increment the reference count. Returns the same pointer.\n\nNever throws exceptions."]
pub fn fz_keep_outline(ctx: *mut fz_context, outline: *mut fz_outline) -> *mut fz_outline;
}
extern "C" {
#[doc = "Decrements the reference count. When the reference point\nreaches zero, the outline is freed.\n\nWhen freed, it will drop linked\toutline entries (next and down)\ntoo, thus a whole outline structure can be dropped by dropping\nthe top entry.\n\nNever throws exceptions."]
pub fn fz_drop_outline(ctx: *mut fz_context, outline: *mut fz_outline);
}
extern "C" {
#[doc = "Routine to implement the old Structure based API from an iterator."]
pub fn fz_load_outline_from_iterator(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> *mut fz_outline;
}
#[doc = "Function type for getting the current item.\n\nCan return NULL. The item is only valid until the next call."]
pub type fz_outline_iterator_item_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> *mut fz_outline_item,
>;
#[doc = "Function types for moving the iterator position.\n\nA negative return value means we could not move as requested. Otherwise:\n0 = the final position has a valid item.\n1 = not a valid item, but we can insert an item here."]
pub type fz_outline_iterator_next_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int,
>;
pub type fz_outline_iterator_prev_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int,
>;
pub type fz_outline_iterator_up_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int,
>;
pub type fz_outline_iterator_down_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int,
>;
#[doc = "Function type for inserting a new item BEFORE the current point.\n\nOwnership of pointers are retained by the caller. The item data will be copied.\n\nAfter an insert, we implicitly do a next, so that a successive insert operation\nwould insert after the item inserted here. The return code is therefore as for next."]
pub type fz_outline_iterator_insert_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
item: *mut fz_outline_item,
) -> ::std::os::raw::c_int,
>;
#[doc = "Function type for deleting the current item.\n\nThis implicitly moves us to the 'next' item, and the return code is as for fz_outline_iterator_next."]
pub type fz_outline_iterator_delete_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
) -> ::std::os::raw::c_int,
>;
#[doc = "Function type for updating the current item properties according to the given item."]
pub type fz_outline_iterator_update_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
iter: *mut fz_outline_iterator,
item: *mut fz_outline_item,
),
>;
#[doc = "Function type for dropping the current iterator."]
pub type fz_outline_iterator_drop_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, iter: *mut fz_outline_iterator),
>;
extern "C" {
pub fn fz_new_outline_iterator_of_size(
ctx: *mut fz_context,
size: usize,
doc: *mut fz_document,
) -> *mut fz_outline_iterator;
}
extern "C" {
pub fn fz_outline_iterator_from_outline(
ctx: *mut fz_context,
outline: *mut fz_outline,
) -> *mut fz_outline_iterator;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_outline_iterator {
pub drop: fz_outline_iterator_drop_fn,
pub item: fz_outline_iterator_item_fn,
pub next: fz_outline_iterator_next_fn,
pub prev: fz_outline_iterator_prev_fn,
pub up: fz_outline_iterator_up_fn,
pub down: fz_outline_iterator_down_fn,
pub insert: fz_outline_iterator_insert_fn,
pub update: fz_outline_iterator_update_fn,
pub del: fz_outline_iterator_delete_fn,
pub doc: *mut fz_document,
}
#[test]
fn bindgen_test_layout_fz_outline_iterator() {
const UNINIT: ::std::mem::MaybeUninit<fz_outline_iterator> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_outline_iterator>(),
80usize,
concat!("Size of: ", stringify!(fz_outline_iterator))
);
assert_eq!(
::std::mem::align_of::<fz_outline_iterator>(),
8usize,
concat!("Alignment of ", stringify!(fz_outline_iterator))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).item) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(item)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(up)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).down) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(down)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insert) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(insert)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).update) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(update)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).del) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(del)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).doc) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_outline_iterator),
"::",
stringify!(doc)
)
);
}
pub type fz_bookmark = isize;
pub const FZ_LAYOUT_KINDLE_W: _bindgen_ty_22 = 260;
pub const FZ_LAYOUT_KINDLE_H: _bindgen_ty_22 = 346;
pub const FZ_LAYOUT_KINDLE_EM: _bindgen_ty_22 = 9;
pub const FZ_LAYOUT_US_POCKET_W: _bindgen_ty_22 = 306;
pub const FZ_LAYOUT_US_POCKET_H: _bindgen_ty_22 = 495;
pub const FZ_LAYOUT_US_POCKET_EM: _bindgen_ty_22 = 10;
pub const FZ_LAYOUT_US_TRADE_W: _bindgen_ty_22 = 396;
pub const FZ_LAYOUT_US_TRADE_H: _bindgen_ty_22 = 612;
pub const FZ_LAYOUT_US_TRADE_EM: _bindgen_ty_22 = 11;
pub const FZ_LAYOUT_UK_A_FORMAT_W: _bindgen_ty_22 = 312;
pub const FZ_LAYOUT_UK_A_FORMAT_H: _bindgen_ty_22 = 504;
pub const FZ_LAYOUT_UK_A_FORMAT_EM: _bindgen_ty_22 = 10;
pub const FZ_LAYOUT_UK_B_FORMAT_W: _bindgen_ty_22 = 366;
pub const FZ_LAYOUT_UK_B_FORMAT_H: _bindgen_ty_22 = 561;
pub const FZ_LAYOUT_UK_B_FORMAT_EM: _bindgen_ty_22 = 10;
pub const FZ_LAYOUT_UK_C_FORMAT_W: _bindgen_ty_22 = 382;
pub const FZ_LAYOUT_UK_C_FORMAT_H: _bindgen_ty_22 = 612;
pub const FZ_LAYOUT_UK_C_FORMAT_EM: _bindgen_ty_22 = 11;
pub const FZ_LAYOUT_A5_W: _bindgen_ty_22 = 420;
pub const FZ_LAYOUT_A5_H: _bindgen_ty_22 = 595;
pub const FZ_LAYOUT_A5_EM: _bindgen_ty_22 = 11;
pub const FZ_DEFAULT_LAYOUT_W: _bindgen_ty_22 = 420;
pub const FZ_DEFAULT_LAYOUT_H: _bindgen_ty_22 = 595;
pub const FZ_DEFAULT_LAYOUT_EM: _bindgen_ty_22 = 11;
pub type _bindgen_ty_22 = ::std::os::raw::c_uint;
pub const fz_permission_FZ_PERMISSION_PRINT: fz_permission = 112;
pub const fz_permission_FZ_PERMISSION_COPY: fz_permission = 99;
pub const fz_permission_FZ_PERMISSION_EDIT: fz_permission = 101;
pub const fz_permission_FZ_PERMISSION_ANNOTATE: fz_permission = 110;
pub type fz_permission = ::std::os::raw::c_uint;
#[doc = "Type for a function to be called when\nthe reference count for the fz_document drops to 0. The\nimplementation should release any resources held by the\ndocument. The actual document pointer will be freed by the\ncaller."]
pub type fz_document_drop_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document)>;
#[doc = "Type for a function to be\ncalled to enquire whether the document needs a password\nor not. See fz_needs_password for more information."]
pub type fz_document_needs_password_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to be\ncalled to attempt to authenticate a password. See\nfz_authenticate_password for more information."]
pub type fz_document_authenticate_password_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
password: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to be\ncalled to see if a document grants a certain permission. See\nfz_document_has_permission for more information."]
pub type fz_document_has_permission_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
permission: fz_permission,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to be called to\nload the outlines for a document. See fz_document_load_outline\nfor more information."]
pub type fz_document_load_outline_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document) -> *mut fz_outline,
>;
#[doc = "Type for a function to be called to obtain an outline iterator\nfor a document. See fz_document_outline_iterator for more information."]
pub type fz_document_outline_iterator_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document) -> *mut fz_outline_iterator,
>;
#[doc = "Type for a function to be called to lay\nout a document. See fz_layout_document for more information."]
pub type fz_document_layout_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document, w: f32, h: f32, em: f32),
>;
#[doc = "Type for a function to be called to\nresolve an internal link to a location (chapter/page number\ntuple). See fz_resolve_link_dest for more information."]
pub type fz_document_resolve_link_dest_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
uri: *const ::std::os::raw::c_char,
) -> fz_link_dest,
>;
#[doc = "Type for a function to be called to\ncreate an internal link to a destination (chapter/page/x/y/w/h/zoom/type\ntuple). See fz_resolve_link_dest for more information."]
pub type fz_document_format_link_uri_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
dest: fz_link_dest,
) -> *mut ::std::os::raw::c_char,
>;
#[doc = "Type for a function to be called to\ncount the number of chapters in a document. See\nfz_count_chapters for more information."]
pub type fz_document_count_chapters_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to be called to\ncount the number of pages in a document. See fz_count_pages for\nmore information."]
pub type fz_document_count_pages_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to load a given\npage from a document. See fz_load_page for more information."]
pub type fz_document_load_page_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
) -> *mut fz_page,
>;
#[doc = "Type for a function to get the page label of a page in the document.\nSee fz_page_label for more information."]
pub type fz_document_page_label_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
),
>;
#[doc = "Type for a function to query\na document's metadata. See fz_lookup_metadata for more\ninformation."]
pub type fz_document_lookup_metadata_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
key: *const ::std::os::raw::c_char,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to set\na document's metadata. See fz_set_metadata for more\ninformation."]
pub type fz_document_set_metadata_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
key: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>;
#[doc = "Return output intent color space if it exists"]
pub type fz_document_output_intent_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document) -> *mut fz_colorspace,
>;
#[doc = "Write document accelerator data"]
pub type fz_document_output_accelerator_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, doc: *mut fz_document, out: *mut fz_output),
>;
#[doc = "Type for a function to make\na bookmark. See fz_make_bookmark for more information."]
pub type fz_document_make_bookmark_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> fz_bookmark,
>;
#[doc = "Type for a function to lookup a bookmark.\nSee fz_lookup_bookmark for more information."]
pub type fz_document_lookup_bookmark_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
mark: fz_bookmark,
) -> fz_location,
>;
#[doc = "Type for a function to release all the\nresources held by a page. Called automatically when the\nreference count for that page reaches zero."]
pub type fz_page_drop_page_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page)>;
#[doc = "Type for a function to return the\nbounding box of a page. See fz_bound_page for more\ninformation."]
pub type fz_page_bound_page_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page) -> fz_rect,
>;
#[doc = "Type for a function to run the\ncontents of a page. See fz_run_page_contents for more\ninformation."]
pub type fz_page_run_page_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
dev: *mut fz_device,
transform: fz_matrix,
cookie: *mut fz_cookie,
),
>;
#[doc = "Type for a function to load the links\nfrom a page. See fz_load_links for more information."]
pub type fz_page_load_links_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_link,
>;
#[doc = "Type for a function to\nobtain the details of how this page should be presented when\nin presentation mode. See fz_page_presentation for more\ninformation."]
pub type fz_page_page_presentation_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
transition: *mut fz_transition,
duration: *mut f32,
) -> *mut fz_transition,
>;
#[doc = "Type for a function to enable/\ndisable separations on a page. See fz_control_separation for\nmore information."]
pub type fz_page_control_separation_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
separation: ::std::os::raw::c_int,
disable: ::std::os::raw::c_int,
),
>;
#[doc = "Type for a function to detect\nwhether a given separation is enabled or disabled on a page.\nSee FZ_SEPARATION_DISABLED for more information."]
pub type fz_page_separation_disabled_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
separation: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to retrieve\ndetails of separations on a page. See fz_get_separations\nfor more information."]
pub type fz_page_separations_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_separations,
>;
#[doc = "Type for a function to retrieve\nwhether or not a given page uses overprint."]
pub type fz_page_uses_overprint_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to create a link on a page."]
pub type fz_page_create_link_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
bbox: fz_rect,
uri: *const ::std::os::raw::c_char,
) -> *mut fz_link,
>;
#[doc = "Type for a function to delete a link on a page."]
pub type fz_page_delete_link_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, page: *mut fz_page, link: *mut fz_link),
>;
#[doc = "Function type to open a document from a file.\n\nfilename: file to open\n\nPointer to opened document. Throws exception in case of error."]
pub type fz_document_open_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_document,
>;
#[doc = "Function type to open a\ndocument from a file.\n\nstream: fz_stream to read document data from. Must be\nseekable for formats that require it.\n\nPointer to opened document. Throws exception in case of error."]
pub type fz_document_open_with_stream_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, stream: *mut fz_stream) -> *mut fz_document,
>;
#[doc = "Function type to open a document from a\nfile, with accelerator data.\n\nfilename: file to open\n\naccel: accelerator file\n\nPointer to opened document. Throws exception in case of error."]
pub type fz_document_open_accel_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
accel: *const ::std::os::raw::c_char,
) -> *mut fz_document,
>;
#[doc = "Function type to open a document from a file,\nwith accelerator data.\n\nstream: fz_stream to read document data from. Must be\nseekable for formats that require it.\n\naccel: fz_stream to read accelerator data from. Must be\nseekable for formats that require it.\n\nPointer to opened document. Throws exception in case of error."]
pub type fz_document_open_accel_with_stream_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
stream: *mut fz_stream,
accel: *mut fz_stream,
) -> *mut fz_document,
>;
#[doc = "Recognize a document type from\na magic string.\n\nmagic: string to recognise - typically a filename or mime\ntype.\n\nReturns a number between 0 (not recognized) and 100\n(fully recognized) based on how certain the recognizer\nis that this is of the required type."]
pub type fz_document_recognize_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int,
>;
#[doc = "Type for a function to be called when processing an already opened page.\nSee fz_process_opened_pages."]
pub type fz_process_opened_page_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
page: *mut fz_page,
state: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void,
>;
extern "C" {
#[doc = "Register a handler for a document type.\n\nhandler: The handler to register."]
pub fn fz_register_document_handler(ctx: *mut fz_context, handler: *const fz_document_handler);
}
extern "C" {
#[doc = "Register handlers\nfor all the standard document types supported in\nthis build."]
pub fn fz_register_document_handlers(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Given a magic find a document handler that can handle a\ndocument of this type.\n\nmagic: Can be a filename extension (including initial period) or\na mimetype."]
pub fn fz_recognize_document(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
) -> *const fz_document_handler;
}
extern "C" {
#[doc = "Open a document file and read its basic structure so pages and\nobjects can be located. MuPDF will try to repair broken\ndocuments (without actually changing the file contents).\n\nThe returned fz_document is used when calling most other\ndocument related functions.\n\nfilename: a path to a file as it would be given to open(2)."]
pub fn fz_open_document(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Open a document file and read its basic structure so pages and\nobjects can be located. MuPDF will try to repair broken\ndocuments (without actually changing the file contents).\n\nThe returned fz_document is used when calling most other\ndocument related functions.\n\nfilename: a path to a file as it would be given to open(2)."]
pub fn fz_open_accelerated_document(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
accel: *const ::std::os::raw::c_char,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Open a document using the specified stream object rather than\nopening a file on disk.\n\nmagic: a string used to detect document type; either a file name\nor mime-type."]
pub fn fz_open_document_with_stream(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
stream: *mut fz_stream,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Open a document using a buffer rather than opening a file on disk."]
pub fn fz_open_document_with_buffer(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
buffer: *mut fz_buffer,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Open a document using the specified stream object rather than\nopening a file on disk.\n\nmagic: a string used to detect document type; either a file name\nor mime-type."]
pub fn fz_open_accelerated_document_with_stream(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
stream: *mut fz_stream,
accel: *mut fz_stream,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Query if the document supports the saving of accelerator data."]
pub fn fz_document_supports_accelerator(
ctx: *mut fz_context,
doc: *mut fz_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Save accelerator data for the document to a given file."]
pub fn fz_save_accelerator(
ctx: *mut fz_context,
doc: *mut fz_document,
accel: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Output accelerator data for the document to a given output\nstream."]
pub fn fz_output_accelerator(
ctx: *mut fz_context,
doc: *mut fz_document,
accel: *mut fz_output,
);
}
extern "C" {
#[doc = "New documents are typically created by calls like\nfoo_new_document(fz_context *ctx, ...). These work by\nderiving a new document type from fz_document, for instance:\ntypedef struct { fz_document base; ...extras... } foo_document;\nThese are allocated by calling\nfz_new_derived_document(ctx, foo_document)"]
pub fn fz_new_document_of_size(
ctx: *mut fz_context,
size: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = "Increment the document reference count. The same pointer is\nreturned.\n\nNever throws exceptions."]
pub fn fz_keep_document(ctx: *mut fz_context, doc: *mut fz_document) -> *mut fz_document;
}
extern "C" {
#[doc = "Decrement the document reference count. When the reference\ncount reaches 0, the document and all it's references are\nfreed.\n\nNever throws exceptions."]
pub fn fz_drop_document(ctx: *mut fz_context, doc: *mut fz_document);
}
extern "C" {
#[doc = "Check if a document is encrypted with a\nnon-blank password."]
pub fn fz_needs_password(ctx: *mut fz_context, doc: *mut fz_document) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Test if the given password can decrypt the document.\n\npassword: The password string to be checked. Some document\nspecifications do not specify any particular text encoding, so\nneither do we.\n\nReturns 0 for failure to authenticate, non-zero for success.\n\nFor PDF documents, further information can be given by examining\nthe bits in the return code.\n\nBit 0 => No password required\nBit 1 => User password authenticated\nBit 2 => Owner password authenticated"]
pub fn fz_authenticate_password(
ctx: *mut fz_context,
doc: *mut fz_document,
password: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Load the hierarchical document outline.\n\nShould be freed by fz_drop_outline."]
pub fn fz_load_outline(ctx: *mut fz_context, doc: *mut fz_document) -> *mut fz_outline;
}
extern "C" {
#[doc = "Get an iterator for the document outline.\n\nShould be freed by fz_drop_outline_iterator."]
pub fn fz_new_outline_iterator(
ctx: *mut fz_context,
doc: *mut fz_document,
) -> *mut fz_outline_iterator;
}
extern "C" {
#[doc = "Is the document reflowable.\n\nReturns 1 to indicate reflowable documents, otherwise 0."]
pub fn fz_is_document_reflowable(
ctx: *mut fz_context,
doc: *mut fz_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Layout reflowable document types.\n\nw, h: Page size in points.\nem: Default font size in points."]
pub fn fz_layout_document(ctx: *mut fz_context, doc: *mut fz_document, w: f32, h: f32, em: f32);
}
extern "C" {
#[doc = "Create a bookmark for the given page, which can be used to find\nthe same location after the document has been laid out with\ndifferent parameters."]
pub fn fz_make_bookmark(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> fz_bookmark;
}
extern "C" {
#[doc = "Find a bookmark and return its page number."]
pub fn fz_lookup_bookmark(
ctx: *mut fz_context,
doc: *mut fz_document,
mark: fz_bookmark,
) -> fz_location;
}
extern "C" {
#[doc = "Return the number of pages in document\n\nMay return 0 for documents with no pages."]
pub fn fz_count_pages(ctx: *mut fz_context, doc: *mut fz_document) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Resolve an internal link to a page number, location, and possible viewing parameters.\n\nReturns location (-1,-1) if the URI cannot be resolved."]
pub fn fz_resolve_link_dest(
ctx: *mut fz_context,
doc: *mut fz_document,
uri: *const ::std::os::raw::c_char,
) -> fz_link_dest;
}
extern "C" {
#[doc = "Format an internal link to a page number, location, and possible viewing parameters,\nsuitable for use with fz_create_link.\n\nReturns a newly allocated string that the caller must free."]
pub fn fz_format_link_uri(
ctx: *mut fz_context,
doc: *mut fz_document,
dest: fz_link_dest,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Resolve an internal link to a page number.\n\nxp, yp: Pointer to store coordinate of destination on the page.\n\nReturns (-1,-1) if the URI cannot be resolved."]
pub fn fz_resolve_link(
ctx: *mut fz_context,
doc: *mut fz_document,
uri: *const ::std::os::raw::c_char,
xp: *mut f32,
yp: *mut f32,
) -> fz_location;
}
extern "C" {
#[doc = "Function to get the location for the last page in the document.\nUsing this can be far more efficient in some cases than calling\nfz_count_pages and using the page number."]
pub fn fz_last_page(ctx: *mut fz_context, doc: *mut fz_document) -> fz_location;
}
extern "C" {
#[doc = "Function to get the location of the next page (allowing for the\nend of chapters etc). If at the end of the document, returns the\ncurrent location."]
pub fn fz_next_page(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> fz_location;
}
extern "C" {
#[doc = "Function to get the location of the previous page (allowing for\nthe end of chapters etc). If already at the start of the\ndocument, returns the current page."]
pub fn fz_previous_page(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> fz_location;
}
extern "C" {
#[doc = "Clamps a location into valid chapter/page range. (First clamps\nthe chapter into range, then the page into range)."]
pub fn fz_clamp_location(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> fz_location;
}
extern "C" {
#[doc = "Converts from page number to chapter+page. This may cause many\nchapters to be laid out in order to calculate the number of\npages within those chapters."]
pub fn fz_location_from_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
) -> fz_location;
}
extern "C" {
#[doc = "Converts from chapter+page to page number. This may cause many\nchapters to be laid out in order to calculate the number of\npages within those chapters."]
pub fn fz_page_number_from_location(
ctx: *mut fz_context,
doc: *mut fz_document,
loc: fz_location,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Load a given page number from a document. This may be much less\nefficient than loading by location (chapter+page) for some\ndocument types."]
pub fn fz_load_page(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
) -> *mut fz_page;
}
extern "C" {
#[doc = "Return the number of chapters in the document.\nAt least 1."]
pub fn fz_count_chapters(ctx: *mut fz_context, doc: *mut fz_document) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return the number of pages in a chapter.\nMay return 0."]
pub fn fz_count_chapter_pages(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Load a page.\n\nAfter fz_load_page is it possible to retrieve the size of the\npage using fz_bound_page, or to render the page using\nfz_run_page_*. Free the page by calling fz_drop_page.\n\nchapter: chapter number, 0 is the first chapter of the document.\nnumber: page number, 0 is the first page of the chapter."]
pub fn fz_load_chapter_page(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
) -> *mut fz_page;
}
extern "C" {
#[doc = "Load the list of links for a page.\n\nReturns a linked list of all the links on the page, each with\nits clickable region and link destination. Each link is\nreference counted so drop and free the list of links by\ncalling fz_drop_link on the pointer return from fz_load_links.\n\npage: Page obtained from fz_load_page."]
pub fn fz_load_links(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_link;
}
extern "C" {
#[doc = "Different document types will be implemented by deriving from\nfz_page. This macro allocates such derived structures, and\ninitialises the base sections."]
pub fn fz_new_page_of_size(
ctx: *mut fz_context,
size: ::std::os::raw::c_int,
doc: *mut fz_document,
) -> *mut fz_page;
}
extern "C" {
#[doc = "Determine the size of a page at 72 dpi."]
pub fn fz_bound_page(ctx: *mut fz_context, page: *mut fz_page) -> fz_rect;
}
extern "C" {
#[doc = "Run a page through a device.\n\npage: Page obtained from fz_load_page.\n\ndev: Device obtained from fz_new_*_device.\n\ntransform: Transform to apply to page. May include for example\nscaling and rotation, see fz_scale, fz_rotate and fz_concat.\nSet to fz_identity if no transformation is desired.\n\ncookie: Communication mechanism between caller and library\nrendering the page. Intended for multi-threaded applications,\nwhile single-threaded applications set cookie to NULL. The\ncaller may abort an ongoing rendering of a page. Cookie also\ncommunicates progress information back to the caller. The\nfields inside cookie are continually updated while the page is\nrendering."]
pub fn fz_run_page(
ctx: *mut fz_context,
page: *mut fz_page,
dev: *mut fz_device,
transform: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
#[doc = "Run a page through a device. Just the main\npage content, without the annotations, if any.\n\npage: Page obtained from fz_load_page.\n\ndev: Device obtained from fz_new_*_device.\n\ntransform: Transform to apply to page. May include for example\nscaling and rotation, see fz_scale, fz_rotate and fz_concat.\nSet to fz_identity if no transformation is desired.\n\ncookie: Communication mechanism between caller and library\nrendering the page. Intended for multi-threaded applications,\nwhile single-threaded applications set cookie to NULL. The\ncaller may abort an ongoing rendering of a page. Cookie also\ncommunicates progress information back to the caller. The\nfields inside cookie are continually updated while the page is\nrendering."]
pub fn fz_run_page_contents(
ctx: *mut fz_context,
page: *mut fz_page,
dev: *mut fz_device,
transform: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
#[doc = "Run the annotations on a page through a device."]
pub fn fz_run_page_annots(
ctx: *mut fz_context,
page: *mut fz_page,
dev: *mut fz_device,
transform: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
#[doc = "Run the widgets on a page through a device."]
pub fn fz_run_page_widgets(
ctx: *mut fz_context,
page: *mut fz_page,
dev: *mut fz_device,
transform: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
#[doc = "Increment the reference count for the page. Returns the same\npointer.\n\nNever throws exceptions."]
pub fn fz_keep_page(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_page;
}
extern "C" {
#[doc = "Increment the reference count for the page. Returns the same\npointer. Must only be used when the alloc lock is already taken.\n\nNever throws exceptions."]
pub fn fz_keep_page_locked(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_page;
}
extern "C" {
#[doc = "Decrements the reference count for the page. When the reference\ncount hits 0, the page and its references are freed.\n\nNever throws exceptions."]
pub fn fz_drop_page(ctx: *mut fz_context, page: *mut fz_page);
}
extern "C" {
#[doc = "Get the presentation details for a given page.\n\ntransition: A pointer to a transition struct to fill out.\n\nduration: A pointer to a place to set the page duration in\nseconds. Will be set to 0 if no transition is specified for the\npage.\n\nReturns: a pointer to the transition structure, or NULL if there\nis no transition specified for the page."]
pub fn fz_page_presentation(
ctx: *mut fz_context,
page: *mut fz_page,
transition: *mut fz_transition,
duration: *mut f32,
) -> *mut fz_transition;
}
extern "C" {
#[doc = "Get page label for a given page."]
pub fn fz_page_label(
ctx: *mut fz_context,
page: *mut fz_page,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = "Check permission flags on document."]
pub fn fz_has_permission(
ctx: *mut fz_context,
doc: *mut fz_document,
p: fz_permission,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Retrieve document meta data strings.\n\ndoc: The document to query.\n\nkey: Which meta data key to retrieve...\n\nBasic information:\n'format'\t-- Document format and version.\n'encryption'\t-- Description of the encryption used.\n\nFrom the document information dictionary:\n'info:Title'\n'info:Author'\n'info:Subject'\n'info:Keywords'\n'info:Creator'\n'info:Producer'\n'info:CreationDate'\n'info:ModDate'\n\nbuf: The buffer to hold the results (a nul-terminated UTF-8\nstring).\n\nsize: Size of 'buf'.\n\nReturns the number of bytes need to store the string plus terminator\n(will be larger than 'size' if the output was truncated), or -1 if the\nkey is not recognized or found."]
pub fn fz_lookup_metadata(
ctx: *mut fz_context,
doc: *mut fz_document,
key: *const ::std::os::raw::c_char,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_set_metadata(
ctx: *mut fz_context,
doc: *mut fz_document,
key: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Find the output intent colorspace if the document has defined\none.\n\nReturns a borrowed reference that should not be dropped, unless\nit is kept first."]
pub fn fz_document_output_intent(
ctx: *mut fz_context,
doc: *mut fz_document,
) -> *mut fz_colorspace;
}
extern "C" {
#[doc = "Get the separations details for a page.\nThis will be NULL, unless the format specifically supports\nseparations (such as PDF files). May be NULL even\nso, if there are no separations on a page.\n\nReturns a reference that must be dropped."]
pub fn fz_page_separations(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_separations;
}
extern "C" {
#[doc = "Query if a given page requires overprint."]
pub fn fz_page_uses_overprint(
ctx: *mut fz_context,
page: *mut fz_page,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Create a new link on a page."]
pub fn fz_create_link(
ctx: *mut fz_context,
page: *mut fz_page,
bbox: fz_rect,
uri: *const ::std::os::raw::c_char,
) -> *mut fz_link;
}
extern "C" {
#[doc = "Delete an existing link on a page."]
pub fn fz_delete_link(ctx: *mut fz_context, page: *mut fz_page, link: *mut fz_link);
}
extern "C" {
#[doc = "Iterates over all opened pages of the document, calling the\nprovided callback for each page for processing. If the callback\nreturns non-NULL then the iteration stops and that value is returned\nto the called of fz_process_opened_pages().\n\nThe state pointer provided to fz_process_opened_pages() is\npassed on to the callback but is owned by the caller.\n\nReturns the first non-NULL value returned by the callback,\nor NULL if the callback returned NULL for all opened pages."]
pub fn fz_process_opened_pages(
ctx: *mut fz_context,
doc: *mut fz_document,
process_openend_page: fz_process_opened_page_fn,
state: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void;
}
#[doc = "Structure definition is public so other classes can\nderive from it. Do not access the members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_page {
pub refs: ::std::os::raw::c_int,
pub doc: *mut fz_document,
pub chapter: ::std::os::raw::c_int,
pub number: ::std::os::raw::c_int,
pub incomplete: ::std::os::raw::c_int,
pub drop_page: fz_page_drop_page_fn,
pub bound_page: fz_page_bound_page_fn,
pub run_page_contents: fz_page_run_page_fn,
pub run_page_annots: fz_page_run_page_fn,
pub run_page_widgets: fz_page_run_page_fn,
pub load_links: fz_page_load_links_fn,
pub page_presentation: fz_page_page_presentation_fn,
pub control_separation: fz_page_control_separation_fn,
pub separation_disabled: fz_page_separation_disabled_fn,
pub separations: fz_page_separations_fn,
pub overprint: fz_page_uses_overprint_fn,
pub create_link: fz_page_create_link_fn,
pub delete_link: fz_page_delete_link_fn,
pub prev: *mut *mut fz_page,
pub next: *mut fz_page,
}
#[test]
fn bindgen_test_layout_fz_page() {
const UNINIT: ::std::mem::MaybeUninit<fz_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_page>(),
152usize,
concat!("Size of: ", stringify!(fz_page))
);
assert_eq!(
::std::mem::align_of::<fz_page>(),
8usize,
concat!("Alignment of ", stringify!(fz_page))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).doc) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).chapter) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(chapter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).number) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).incomplete) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(incomplete)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_page) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(drop_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bound_page) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(bound_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_page_contents) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_contents)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_page_annots) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_annots)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_page_widgets) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_widgets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).load_links) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(load_links)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_presentation) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(page_presentation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).control_separation) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(control_separation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).separation_disabled) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(separation_disabled)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).separations) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(separations)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).overprint) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(overprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).create_link) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(create_link)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).delete_link) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(delete_link)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(next)
)
);
}
#[doc = "Structure definition is public so other classes can\nderive from it. Callers should not access the members\ndirectly, though implementations will need initialize\nfunctions directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_document {
pub refs: ::std::os::raw::c_int,
pub drop_document: fz_document_drop_fn,
pub needs_password: fz_document_needs_password_fn,
pub authenticate_password: fz_document_authenticate_password_fn,
pub has_permission: fz_document_has_permission_fn,
pub load_outline: fz_document_load_outline_fn,
pub outline_iterator: fz_document_outline_iterator_fn,
pub layout: fz_document_layout_fn,
pub make_bookmark: fz_document_make_bookmark_fn,
pub lookup_bookmark: fz_document_lookup_bookmark_fn,
pub resolve_link_dest: fz_document_resolve_link_dest_fn,
pub format_link_uri: fz_document_format_link_uri_fn,
pub count_chapters: fz_document_count_chapters_fn,
pub count_pages: fz_document_count_pages_fn,
pub load_page: fz_document_load_page_fn,
pub page_label: fz_document_page_label_fn,
pub lookup_metadata: fz_document_lookup_metadata_fn,
pub set_metadata: fz_document_set_metadata_fn,
pub get_output_intent: fz_document_output_intent_fn,
pub output_accelerator: fz_document_output_accelerator_fn,
pub did_layout: ::std::os::raw::c_int,
pub is_reflowable: ::std::os::raw::c_int,
pub open: *mut fz_page,
}
#[test]
fn bindgen_test_layout_fz_document() {
const UNINIT: ::std::mem::MaybeUninit<fz_document> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_document>(),
176usize,
concat!("Size of: ", stringify!(fz_document))
);
assert_eq!(
::std::mem::align_of::<fz_document>(),
8usize,
concat!("Alignment of ", stringify!(fz_document))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_document) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(drop_document)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).needs_password) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(needs_password)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).authenticate_password) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(authenticate_password)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_permission) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(has_permission)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).load_outline) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(load_outline)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).outline_iterator) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(outline_iterator)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).layout) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(layout)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).make_bookmark) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(make_bookmark)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lookup_bookmark) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(lookup_bookmark)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resolve_link_dest) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(resolve_link_dest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).format_link_uri) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(format_link_uri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count_chapters) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(count_chapters)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count_pages) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(count_pages)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).load_page) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(load_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_label) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(page_label)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lookup_metadata) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(lookup_metadata)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).set_metadata) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(set_metadata)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).get_output_intent) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(get_output_intent)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).output_accelerator) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(output_accelerator)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).did_layout) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(did_layout)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_reflowable) as usize - ptr as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(is_reflowable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(open)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_document_handler {
pub recognize: fz_document_recognize_fn,
pub open: fz_document_open_fn,
pub open_with_stream: fz_document_open_with_stream_fn,
pub extensions: *mut *const ::std::os::raw::c_char,
pub mimetypes: *mut *const ::std::os::raw::c_char,
pub open_accel: fz_document_open_accel_fn,
pub open_accel_with_stream: fz_document_open_accel_with_stream_fn,
}
#[test]
fn bindgen_test_layout_fz_document_handler() {
const UNINIT: ::std::mem::MaybeUninit<fz_document_handler> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_document_handler>(),
56usize,
concat!("Size of: ", stringify!(fz_document_handler))
);
assert_eq!(
::std::mem::align_of::<fz_document_handler>(),
8usize,
concat!("Alignment of ", stringify!(fz_document_handler))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).recognize) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(recognize)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_with_stream) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_with_stream)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).extensions) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(extensions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mimetypes) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(mimetypes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_accel) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_accel)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_accel_with_stream) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_accel_with_stream)
)
);
}
extern "C" {
#[doc = "Create a display list.\n\nOwnership of the display list is returned to the caller."]
pub fn fz_new_display_list_from_page(
ctx: *mut fz_context,
page: *mut fz_page,
) -> *mut fz_display_list;
}
extern "C" {
pub fn fz_new_display_list_from_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Create a display list from page contents (no annotations).\n\nOwnership of the display list is returned to the caller."]
pub fn fz_new_display_list_from_page_contents(
ctx: *mut fz_context,
page: *mut fz_page,
) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Render the page to a pixmap using the transform and colorspace.\n\nOwnership of the pixmap is returned to the caller."]
pub fn fz_new_pixmap_from_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_page(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Render the page contents without annotations.\n\nOwnership of the pixmap is returned to the caller."]
pub fn fz_new_pixmap_from_page_contents(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Render the page contents with control over spot colors.\n\nOwnership of the pixmap is returned to the caller."]
pub fn fz_new_pixmap_from_display_list_with_separations(
ctx: *mut fz_context,
list: *mut fz_display_list,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_page_with_separations(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_page_number_with_separations(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn fz_new_pixmap_from_page_contents_with_separations(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Extract text from page.\n\nOwnership of the fz_stext_page is returned to the caller."]
pub fn fz_new_stext_page_from_page(
ctx: *mut fz_context,
page: *mut fz_page,
options: *const fz_stext_options,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn fz_new_stext_page_from_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
options: *const fz_stext_options,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn fz_new_stext_page_from_chapter_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
number: ::std::os::raw::c_int,
options: *const fz_stext_options,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn fz_new_stext_page_from_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
options: *const fz_stext_options,
) -> *mut fz_stext_page;
}
extern "C" {
#[doc = "Convert structured text into plain text."]
pub fn fz_new_buffer_from_stext_page(
ctx: *mut fz_context,
text: *mut fz_stext_page,
) -> *mut fz_buffer;
}
extern "C" {
pub fn fz_new_buffer_from_page(
ctx: *mut fz_context,
page: *mut fz_page,
options: *const fz_stext_options,
) -> *mut fz_buffer;
}
extern "C" {
pub fn fz_new_buffer_from_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
options: *const fz_stext_options,
) -> *mut fz_buffer;
}
extern "C" {
pub fn fz_new_buffer_from_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
options: *const fz_stext_options,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Search for the 'needle' text on the page.\nRecord the hits in the hit_bbox array and return the number of\nhits. Will stop looking once it has filled hit_max rectangles."]
pub fn fz_search_page(
ctx: *mut fz_context,
page: *mut fz_page,
needle: *const ::std::os::raw::c_char,
hit_mark: *mut ::std::os::raw::c_int,
hit_bbox: *mut fz_quad,
hit_max: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_search_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
number: ::std::os::raw::c_int,
needle: *const ::std::os::raw::c_char,
hit_mark: *mut ::std::os::raw::c_int,
hit_bbox: *mut fz_quad,
hit_max: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_search_chapter_page_number(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
needle: *const ::std::os::raw::c_char,
hit_mark: *mut ::std::os::raw::c_int,
hit_bbox: *mut fz_quad,
hit_max: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_search_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
needle: *const ::std::os::raw::c_char,
hit_mark: *mut ::std::os::raw::c_int,
hit_bbox: *mut fz_quad,
hit_max: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Parse an SVG document into a display-list."]
pub fn fz_new_display_list_from_svg(
ctx: *mut fz_context,
buf: *mut fz_buffer,
base_uri: *const ::std::os::raw::c_char,
zip: *mut fz_archive,
w: *mut f32,
h: *mut f32,
) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Create a scalable image from an SVG document."]
pub fn fz_new_image_from_svg(
ctx: *mut fz_context,
buf: *mut fz_buffer,
base_uri: *const ::std::os::raw::c_char,
zip: *mut fz_archive,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Parse an SVG document into a display-list."]
pub fn fz_new_display_list_from_svg_xml(
ctx: *mut fz_context,
xmldoc: *mut fz_xml_doc,
xml: *mut fz_xml,
base_uri: *const ::std::os::raw::c_char,
zip: *mut fz_archive,
w: *mut f32,
h: *mut f32,
) -> *mut fz_display_list;
}
extern "C" {
#[doc = "Create a scalable image from an SVG document."]
pub fn fz_new_image_from_svg_xml(
ctx: *mut fz_context,
xmldoc: *mut fz_xml_doc,
xml: *mut fz_xml,
base_uri: *const ::std::os::raw::c_char,
zip: *mut fz_archive,
) -> *mut fz_image;
}
extern "C" {
#[doc = "Write image as a data URI (for HTML and SVG output)."]
pub fn fz_write_image_as_data_uri(
ctx: *mut fz_context,
out: *mut fz_output,
image: *mut fz_image,
);
}
extern "C" {
pub fn fz_write_pixmap_as_data_uri(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *mut fz_pixmap,
);
}
extern "C" {
pub fn fz_append_image_as_data_uri(
ctx: *mut fz_context,
out: *mut fz_buffer,
image: *mut fz_image,
);
}
extern "C" {
pub fn fz_append_pixmap_as_data_uri(
ctx: *mut fz_context,
out: *mut fz_buffer,
pixmap: *mut fz_pixmap,
);
}
extern "C" {
#[doc = "Use text extraction to convert the input document into XHTML,\nthen open the result as a new document that can be reflowed."]
pub fn fz_new_xhtml_document_from_document(
ctx: *mut fz_context,
old_doc: *mut fz_document,
opts: *const fz_stext_options,
) -> *mut fz_document;
}
extern "C" {
#[doc = "Returns an fz_buffer containing a page after conversion to specified format.\n\npage: The page to convert.\nformat, options: Passed to fz_new_document_writer_with_output() internally.\ntransform, cookie: Passed to fz_run_page() internally."]
pub fn fz_new_buffer_from_page_with_format(
ctx: *mut fz_context,
page: *mut fz_page,
format: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
transform: fz_matrix,
cookie: *mut fz_cookie,
) -> *mut fz_buffer;
}
#[doc = "Function type to start\nthe process of writing a page to a document.\n\nmediabox: page size rectangle in points.\n\nReturns a fz_device to write page contents to."]
pub type fz_document_writer_begin_page_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
wri: *mut fz_document_writer,
mediabox: fz_rect,
) -> *mut fz_device,
>;
#[doc = "Function type to end the\nprocess of writing a page to a document.\n\ndev: The device created by the begin_page function."]
pub type fz_document_writer_end_page_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, wri: *mut fz_document_writer, dev: *mut fz_device),
>;
#[doc = "Function type to end\nthe process of writing pages to a document.\n\nThis writes any file level trailers required. After this\ncompletes successfully the file is up to date and complete."]
pub type fz_document_writer_close_writer_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, wri: *mut fz_document_writer)>;
#[doc = "Function type to discard\nan fz_document_writer. This may be called at any time during\nthe process to release all the resources owned by the writer.\n\nCalling drop without having previously called close may leave\nthe file in an inconsistent state and the user of the\nfz_document_writer would need to do any cleanup required."]
pub type fz_document_writer_drop_writer_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, wri: *mut fz_document_writer)>;
extern "C" {
#[doc = "Look for a given option (key) in the opts string. Return 1 if\nit has it, and update *val to point to the value within opts."]
pub fn fz_has_option(
ctx: *mut fz_context,
opts: *const ::std::os::raw::c_char,
key: *const ::std::os::raw::c_char,
val: *mut *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Check to see if an option, a, from a string matches a reference\noption, b.\n\n(i.e. a could be 'foo' or 'foo,bar...' etc, but b can only be\n'foo'.)"]
pub fn fz_option_eq(
a: *const ::std::os::raw::c_char,
b: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Copy an option (val) into a destination buffer (dest), of maxlen\nbytes.\n\nReturns the number of bytes (including terminator) that did not\nfit. If val is maxlen or greater bytes in size, it will be left\nunterminated."]
pub fn fz_copy_option(
ctx: *mut fz_context,
val: *const ::std::os::raw::c_char,
dest: *mut ::std::os::raw::c_char,
maxlen: usize,
) -> usize;
}
extern "C" {
#[doc = "Create a new fz_document_writer, for a\nfile of the given type.\n\npath: The document name to write (or NULL for default)\n\nformat: Which format to write (currently cbz, html, pdf, pam,\npbm, pgm, pkm, png, ppm, pnm, svg, text, xhtml, docx, odt)\n\noptions: NULL, or pointer to comma separated string to control\nfile generation."]
pub fn fz_new_document_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
#[doc = "Like fz_new_document_writer but takes a fz_output for writing\nthe result. Only works for multi-page formats."]
pub fn fz_new_document_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
format: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_document_writer_with_buffer(
ctx: *mut fz_context,
buf: *mut fz_buffer,
format: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
#[doc = "Document writers for various possible output formats.\n\nAll of the \"_with_output\" variants pass the ownership of out in\nimmediately upon calling. The writers are responsible for\ndropping the fz_output when they are finished with it (even\nif they throw an exception during creation)."]
pub fn fz_new_pdf_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pdf_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_svg_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_text_writer(
ctx: *mut fz_context,
format: *const ::std::os::raw::c_char,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_text_writer_with_output(
ctx: *mut fz_context,
format: *const ::std::os::raw::c_char,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_odt_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_odt_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_docx_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_docx_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_ps_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_ps_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pcl_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pcl_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pclm_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pclm_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pwg_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pwg_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_cbz_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_cbz_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
#[doc = "Used to report progress of the OCR operation.\n\npage: Current page being processed.\n\npercent: Progress of the OCR operation for the\ncurrent page in percent. Whether it reaches 100\nonce a page is finished, depends on the OCR engine.\n\nReturn 0 to continue progress, return 1 to cancel the\noperation."]
pub type fz_pdfocr_progress_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
progress_arg: *mut ::std::os::raw::c_void,
page: ::std::os::raw::c_int,
percent: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn fz_new_pdfocr_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pdfocr_writer_with_output(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_pdfocr_writer_set_progress(
ctx: *mut fz_context,
writer: *mut fz_document_writer,
progress: fz_pdfocr_progress_fn,
arg1: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn fz_new_jpeg_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_png_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pam_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pnm_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pgm_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_ppm_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pbm_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn fz_new_pkm_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
) -> *mut fz_document_writer;
}
extern "C" {
#[doc = "Called to start the process of writing a page to\na document.\n\nmediabox: page size rectangle in points.\n\nReturns a borrowed fz_device to write page contents to. This\nshould be kept if required, and only dropped if it was kept."]
pub fn fz_begin_page(
ctx: *mut fz_context,
wri: *mut fz_document_writer,
mediabox: fz_rect,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Called to end the process of writing a page to a\ndocument."]
pub fn fz_end_page(ctx: *mut fz_context, wri: *mut fz_document_writer);
}
extern "C" {
#[doc = "Convenience function to feed all the pages of a document to\nfz_begin_page/fz_run_page/fz_end_page."]
pub fn fz_write_document(
ctx: *mut fz_context,
wri: *mut fz_document_writer,
doc: *mut fz_document,
);
}
extern "C" {
#[doc = "Called to end the process of writing\npages to a document.\n\nThis writes any file level trailers required. After this\ncompletes successfully the file is up to date and complete."]
pub fn fz_close_document_writer(ctx: *mut fz_context, wri: *mut fz_document_writer);
}
extern "C" {
#[doc = "Called to discard a fz_document_writer.\nThis may be called at any time during the process to release all\nthe resources owned by the writer.\n\nCalling drop without having previously called close may leave\nthe file in an inconsistent state."]
pub fn fz_drop_document_writer(ctx: *mut fz_context, wri: *mut fz_document_writer);
}
extern "C" {
pub fn fz_new_pixmap_writer(
ctx: *mut fz_context,
path: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
default_path: *const ::std::os::raw::c_char,
n: ::std::os::raw::c_int,
save: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
pix: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
),
>,
) -> *mut fz_document_writer;
}
extern "C" {
pub static mut fz_pdf_write_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
pub static mut fz_svg_write_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
pub static mut fz_pcl_write_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
pub static mut fz_pclm_write_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
pub static mut fz_pwg_write_options_usage: *const ::std::os::raw::c_char;
}
extern "C" {
pub static mut fz_pdfocr_write_options_usage: *const ::std::os::raw::c_char;
}
#[doc = "Structure is public to allow other structures to\nbe derived from it. Do not access members directly."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_document_writer {
pub begin_page: fz_document_writer_begin_page_fn,
pub end_page: fz_document_writer_end_page_fn,
pub close_writer: fz_document_writer_close_writer_fn,
pub drop_writer: fz_document_writer_drop_writer_fn,
pub dev: *mut fz_device,
}
#[test]
fn bindgen_test_layout_fz_document_writer() {
const UNINIT: ::std::mem::MaybeUninit<fz_document_writer> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_document_writer>(),
40usize,
concat!("Size of: ", stringify!(fz_document_writer))
);
assert_eq!(
::std::mem::align_of::<fz_document_writer>(),
8usize,
concat!("Alignment of ", stringify!(fz_document_writer))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).begin_page) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(begin_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_page) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(end_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).close_writer) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(close_writer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_writer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(drop_writer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dev) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(dev)
)
);
}
extern "C" {
#[doc = "Internal function to allocate a\nblock for a derived document_writer structure, with the base\nstructure's function pointers populated correctly, and the extra\nspace zero initialised."]
pub fn fz_new_document_writer_of_size(
ctx: *mut fz_context,
size: usize,
begin_page: fz_document_writer_begin_page_fn,
end_page: fz_document_writer_end_page_fn,
close: fz_document_writer_close_writer_fn,
drop: fz_document_writer_drop_writer_fn,
) -> *mut fz_document_writer;
}
extern "C" {
#[doc = "Cause a band writer to write the header for\na banded image with the given properties/dimensions etc. This\nalso configures the bandwriter for the format of the data to be\npassed in future calls.\n\nw, h: Width and Height of the entire page.\n\nn: Number of components (including spots and alphas).\n\nalpha: Number of alpha components.\n\nxres, yres: X and Y resolutions in dpi.\n\ncs: Colorspace (NULL for bitmaps)\n\nseps: Separation details (or NULL)."]
pub fn fz_write_header(
ctx: *mut fz_context,
writer: *mut fz_band_writer,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
n: ::std::os::raw::c_int,
alpha: ::std::os::raw::c_int,
xres: ::std::os::raw::c_int,
yres: ::std::os::raw::c_int,
pagenum: ::std::os::raw::c_int,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
);
}
extern "C" {
#[doc = "Cause a band writer to write the next band\nof data for an image.\n\nstride: The byte offset from the first byte of the data\nfor a pixel to the first byte of the data for the same pixel\non the row below.\n\nband_height: The number of lines in this band.\n\nsamples: Pointer to first byte of the data."]
pub fn fz_write_band(
ctx: *mut fz_context,
writer: *mut fz_band_writer,
stride: ::std::os::raw::c_int,
band_height: ::std::os::raw::c_int,
samples: *const ::std::os::raw::c_uchar,
);
}
extern "C" {
#[doc = "Finishes up the output and closes the band writer. After this\ncall no more headers or bands may be written."]
pub fn fz_close_band_writer(ctx: *mut fz_context, writer: *mut fz_band_writer);
}
extern "C" {
#[doc = "Drop the reference to the band writer, causing it to be\ndestroyed.\n\nNever throws an exception."]
pub fn fz_drop_band_writer(ctx: *mut fz_context, writer: *mut fz_band_writer);
}
pub type fz_write_header_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, writer: *mut fz_band_writer, cs: *mut fz_colorspace),
>;
pub type fz_write_band_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
writer: *mut fz_band_writer,
stride: ::std::os::raw::c_int,
band_start: ::std::os::raw::c_int,
band_height: ::std::os::raw::c_int,
samples: *const ::std::os::raw::c_uchar,
),
>;
pub type fz_write_trailer_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, writer: *mut fz_band_writer)>;
pub type fz_close_band_writer_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, writer: *mut fz_band_writer)>;
pub type fz_drop_band_writer_fn =
::std::option::Option<unsafe extern "C" fn(ctx: *mut fz_context, writer: *mut fz_band_writer)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_band_writer {
pub drop: fz_drop_band_writer_fn,
pub close: fz_close_band_writer_fn,
pub header: fz_write_header_fn,
pub band: fz_write_band_fn,
pub trailer: fz_write_trailer_fn,
pub out: *mut fz_output,
pub w: ::std::os::raw::c_int,
pub h: ::std::os::raw::c_int,
pub n: ::std::os::raw::c_int,
pub s: ::std::os::raw::c_int,
pub alpha: ::std::os::raw::c_int,
pub xres: ::std::os::raw::c_int,
pub yres: ::std::os::raw::c_int,
pub pagenum: ::std::os::raw::c_int,
pub line: ::std::os::raw::c_int,
pub seps: *mut fz_separations,
}
#[test]
fn bindgen_test_layout_fz_band_writer() {
const UNINIT: ::std::mem::MaybeUninit<fz_band_writer> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_band_writer>(),
96usize,
concat!("Size of: ", stringify!(fz_band_writer))
);
assert_eq!(
::std::mem::align_of::<fz_band_writer>(),
8usize,
concat!("Alignment of ", stringify!(fz_band_writer))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(close)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).band) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(band)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).trailer) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(trailer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).out) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(s)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xres) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).yres) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pagenum) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(pagenum)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(line)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).seps) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(seps)
)
);
}
extern "C" {
pub fn fz_new_band_writer_of_size(
ctx: *mut fz_context,
size: usize,
out: *mut fz_output,
) -> *mut fz_band_writer;
}
#[doc = "PCL output"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pcl_options {
pub features: ::std::os::raw::c_int,
pub odd_page_init: *const ::std::os::raw::c_char,
pub even_page_init: *const ::std::os::raw::c_char,
pub tumble: ::std::os::raw::c_int,
pub duplex_set: ::std::os::raw::c_int,
pub duplex: ::std::os::raw::c_int,
pub paper_size: ::std::os::raw::c_int,
pub manual_feed_set: ::std::os::raw::c_int,
pub manual_feed: ::std::os::raw::c_int,
pub media_position_set: ::std::os::raw::c_int,
pub media_position: ::std::os::raw::c_int,
pub orientation: ::std::os::raw::c_int,
pub page_count: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_pcl_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_pcl_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_pcl_options>(),
64usize,
concat!("Size of: ", stringify!(fz_pcl_options))
);
assert_eq!(
::std::mem::align_of::<fz_pcl_options>(),
8usize,
concat!("Alignment of ", stringify!(fz_pcl_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).features) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(features)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).odd_page_init) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(odd_page_init)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).even_page_init) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(even_page_init)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tumble) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(tumble)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duplex_set) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(duplex_set)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duplex) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(duplex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).paper_size) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(paper_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).manual_feed_set) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(manual_feed_set)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).manual_feed) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(manual_feed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_position_set) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(media_position_set)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_position) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(media_position)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orientation) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Initialize PCL option struct for a given preset.\n\nCurrently defined presets include:\n\ngeneric\tGeneric PCL printer\nljet4\tHP DeskJet\ndj500\tHP DeskJet 500\nfs600\tKyocera FS-600\nlj\tHP LaserJet, HP LaserJet Plus\nlj2\tHP LaserJet IIp, HP LaserJet IId\nlj3\tHP LaserJet III\nlj3d\tHP LaserJet IIId\nlj4\tHP LaserJet 4\nlj4pl\tHP LaserJet 4 PL\nlj4d\tHP LaserJet 4d\nlp2563b\tHP 2563B line printer\noce9050\tOce 9050 Line printer"]
pub fn fz_pcl_preset(
ctx: *mut fz_context,
opts: *mut fz_pcl_options,
preset: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Parse PCL options.\n\nCurrently defined options and values are as follows:\n\npreset=X\tEither \"generic\" or one of the presets as for fz_pcl_preset.\nspacing=0\tNo vertical spacing capability\nspacing=1\tPCL 3 spacing (<ESC>*p+<n>Y)\nspacing=2\tPCL 4 spacing (<ESC>*b<n>Y)\nspacing=3\tPCL 5 spacing (<ESC>*b<n>Y and clear seed row)\nmode2\t\tDisable/Enable mode 2 graphics compression\nmode3\t\tDisable/Enable mode 3 graphics compression\neog_reset\tEnd of graphics (<ESC>*rB) resets all parameters\nhas_duplex\tDuplex supported (<ESC>&l<duplex>S)\nhas_papersize\tPapersize setting supported (<ESC>&l<sizecode>A)\nhas_copies\tNumber of copies supported (<ESC>&l<copies>X)\nis_ljet4pjl\tDisable/Enable HP 4PJL model-specific output\nis_oce9050\tDisable/Enable Oce 9050 model-specific output"]
pub fn fz_parse_pcl_options(
ctx: *mut fz_context,
opts: *mut fz_pcl_options,
args: *const ::std::os::raw::c_char,
) -> *mut fz_pcl_options;
}
extern "C" {
#[doc = "Create a new band writer, outputing monochrome pcl."]
pub fn fz_new_mono_pcl_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const fz_pcl_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Write a bitmap as mono PCL."]
pub fn fz_write_bitmap_as_pcl(
ctx: *mut fz_context,
out: *mut fz_output,
bitmap: *const fz_bitmap,
pcl: *const fz_pcl_options,
);
}
extern "C" {
#[doc = "Save a bitmap as mono PCL."]
pub fn fz_save_bitmap_as_pcl(
ctx: *mut fz_context,
bitmap: *mut fz_bitmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
pcl: *const fz_pcl_options,
);
}
extern "C" {
#[doc = "Create a new band writer, outputing color pcl."]
pub fn fz_new_color_pcl_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const fz_pcl_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Write an (RGB) pixmap as color PCL."]
pub fn fz_write_pixmap_as_pcl(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
pcl: *const fz_pcl_options,
);
}
extern "C" {
#[doc = "Save an (RGB) pixmap as color PCL."]
pub fn fz_save_pixmap_as_pcl(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
pcl: *const fz_pcl_options,
);
}
#[doc = "PCLm output"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pclm_options {
pub compress: ::std::os::raw::c_int,
pub strip_height: ::std::os::raw::c_int,
pub page_count: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_pclm_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_pclm_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_pclm_options>(),
12usize,
concat!("Size of: ", stringify!(fz_pclm_options))
);
assert_eq!(
::std::mem::align_of::<fz_pclm_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_pclm_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).compress) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(compress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).strip_height) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(strip_height)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Parse PCLm options.\n\nCurrently defined options and values are as follows:\n\ncompression=none: No compression\ncompression=flate: Flate compression\nstrip-height=n: Strip height (default 16)"]
pub fn fz_parse_pclm_options(
ctx: *mut fz_context,
opts: *mut fz_pclm_options,
args: *const ::std::os::raw::c_char,
) -> *mut fz_pclm_options;
}
extern "C" {
#[doc = "Create a new band writer, outputing pclm"]
pub fn fz_new_pclm_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const fz_pclm_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Write a (Greyscale or RGB) pixmap as pclm."]
pub fn fz_write_pixmap_as_pclm(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
options: *const fz_pclm_options,
);
}
extern "C" {
#[doc = "Save a (Greyscale or RGB) pixmap as pclm."]
pub fn fz_save_pixmap_as_pclm(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
options: *const fz_pclm_options,
);
}
#[doc = "PDFOCR output"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pdfocr_options {
pub compress: ::std::os::raw::c_int,
pub strip_height: ::std::os::raw::c_int,
pub language: [::std::os::raw::c_char; 256usize],
pub datadir: [::std::os::raw::c_char; 1024usize],
pub page_count: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_pdfocr_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_pdfocr_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_pdfocr_options>(),
1292usize,
concat!("Size of: ", stringify!(fz_pdfocr_options))
);
assert_eq!(
::std::mem::align_of::<fz_pdfocr_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_pdfocr_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).compress) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(compress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).strip_height) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(strip_height)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).language) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(language)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).datadir) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(datadir)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
1288usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Parse PDFOCR options.\n\nCurrently defined options and values are as follows:\n\ncompression=none: No compression\ncompression=flate: Flate compression\nstrip-height=n: Strip height (default 16)\nocr-language=<lang>: OCR Language (default eng)\nocr-datadir=<datadir>: OCR data path (default rely on TESSDATA_PREFIX)"]
pub fn fz_parse_pdfocr_options(
ctx: *mut fz_context,
opts: *mut fz_pdfocr_options,
args: *const ::std::os::raw::c_char,
) -> *mut fz_pdfocr_options;
}
extern "C" {
#[doc = "Create a new band writer, outputing pdfocr.\n\nOwnership of output stays with the caller, the band writer\nborrows the reference. The caller must keep the output around\nfor the duration of the band writer, and then close/drop as\nappropriate."]
pub fn fz_new_pdfocr_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
options: *const fz_pdfocr_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Set the progress callback for a pdfocr bandwriter."]
pub fn fz_pdfocr_band_writer_set_progress(
ctx: *mut fz_context,
writer: *mut fz_band_writer,
progress_fn: fz_pdfocr_progress_fn,
progress_arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Write a (Greyscale or RGB) pixmap as pdfocr."]
pub fn fz_write_pixmap_as_pdfocr(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
options: *const fz_pdfocr_options,
);
}
extern "C" {
#[doc = "Save a (Greyscale or RGB) pixmap as pdfocr."]
pub fn fz_save_pixmap_as_pdfocr(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
options: *const fz_pdfocr_options,
);
}
extern "C" {
#[doc = "Save a (Greyscale or RGB) pixmap as a png."]
pub fn fz_save_pixmap_as_png(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Save a pixmap as a JPEG."]
pub fn fz_save_pixmap_as_jpeg(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
quality: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Write a (Greyscale or RGB) pixmap as a png."]
pub fn fz_write_pixmap_as_png(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
);
}
extern "C" {
#[doc = "Create a new png band writer (greyscale or RGB, with or without\nalpha)."]
pub fn fz_new_png_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
extern "C" {
#[doc = "Reencode a given image as a PNG into a buffer.\n\nOwnership of the buffer is returned."]
pub fn fz_new_buffer_from_image_as_png(
ctx: *mut fz_context,
image: *mut fz_image,
color_params: fz_color_params,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Reencode a given pixmap as a PNG into a buffer.\n\nOwnership of the buffer is returned."]
pub fn fz_new_buffer_from_pixmap_as_png(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
color_params: fz_color_params,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Save a pixmap as a pnm (greyscale or rgb, no alpha)."]
pub fn fz_save_pixmap_as_pnm(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a pixmap as a pnm (greyscale or rgb, no alpha)."]
pub fn fz_write_pixmap_as_pnm(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *mut fz_pixmap,
);
}
extern "C" {
#[doc = "Create a band writer targetting pnm (greyscale or rgb, no\nalpha)."]
pub fn fz_new_pnm_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
extern "C" {
#[doc = "Save a pixmap as a pnm (greyscale, rgb or cmyk, with or without\nalpha)."]
pub fn fz_save_pixmap_as_pam(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a pixmap as a pnm (greyscale, rgb or cmyk, with or without\nalpha)."]
pub fn fz_write_pixmap_as_pam(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *mut fz_pixmap,
);
}
extern "C" {
#[doc = "Create a band writer targetting pnm (greyscale, rgb or cmyk,\nwith or without alpha)."]
pub fn fz_new_pam_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
extern "C" {
#[doc = "Save a bitmap as a pbm."]
pub fn fz_save_bitmap_as_pbm(
ctx: *mut fz_context,
bitmap: *mut fz_bitmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a bitmap as a pbm."]
pub fn fz_write_bitmap_as_pbm(
ctx: *mut fz_context,
out: *mut fz_output,
bitmap: *mut fz_bitmap,
);
}
extern "C" {
#[doc = "Create a new band writer, targetting pbm."]
pub fn fz_new_pbm_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
extern "C" {
#[doc = "Save a pixmap as a pbm. (Performing halftoning)."]
pub fn fz_save_pixmap_as_pbm(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Save a CMYK bitmap as a pkm."]
pub fn fz_save_bitmap_as_pkm(
ctx: *mut fz_context,
bitmap: *mut fz_bitmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a CMYK bitmap as a pkm."]
pub fn fz_write_bitmap_as_pkm(
ctx: *mut fz_context,
out: *mut fz_output,
bitmap: *mut fz_bitmap,
);
}
extern "C" {
#[doc = "Create a new pkm band writer for CMYK pixmaps."]
pub fn fz_new_pkm_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
extern "C" {
#[doc = "Save a CMYK pixmap as a pkm. (Performing halftoning)."]
pub fn fz_save_pixmap_as_pkm(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a (gray, rgb, or cmyk, no alpha) pixmap out as postscript."]
pub fn fz_write_pixmap_as_ps(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
);
}
extern "C" {
#[doc = "Save a (gray, rgb, or cmyk, no alpha) pixmap out as postscript."]
pub fn fz_save_pixmap_as_ps(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Create a postscript band writer for gray, rgb, or cmyk, no\nalpha."]
pub fn fz_new_ps_band_writer(ctx: *mut fz_context, out: *mut fz_output) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Write the file level header for ps band writer output."]
pub fn fz_write_ps_file_header(ctx: *mut fz_context, out: *mut fz_output);
}
extern "C" {
#[doc = "Write the file level trailer for ps band writer output."]
pub fn fz_write_ps_file_trailer(
ctx: *mut fz_context,
out: *mut fz_output,
pages: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = "Save a pixmap as a PSD file."]
pub fn fz_save_pixmap_as_psd(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = "Write a pixmap as a PSD file."]
pub fn fz_write_pixmap_as_psd(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
);
}
extern "C" {
#[doc = "Open a PSD band writer."]
pub fn fz_new_psd_band_writer(ctx: *mut fz_context, out: *mut fz_output)
-> *mut fz_band_writer;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_pwg_options {
pub media_class: [::std::os::raw::c_char; 64usize],
pub media_color: [::std::os::raw::c_char; 64usize],
pub media_type: [::std::os::raw::c_char; 64usize],
pub output_type: [::std::os::raw::c_char; 64usize],
pub advance_distance: ::std::os::raw::c_uint,
pub advance_media: ::std::os::raw::c_int,
pub collate: ::std::os::raw::c_int,
pub cut_media: ::std::os::raw::c_int,
pub duplex: ::std::os::raw::c_int,
pub insert_sheet: ::std::os::raw::c_int,
pub jog: ::std::os::raw::c_int,
pub leading_edge: ::std::os::raw::c_int,
pub manual_feed: ::std::os::raw::c_int,
pub media_position: ::std::os::raw::c_uint,
pub media_weight: ::std::os::raw::c_uint,
pub mirror_print: ::std::os::raw::c_int,
pub negative_print: ::std::os::raw::c_int,
pub num_copies: ::std::os::raw::c_uint,
pub orientation: ::std::os::raw::c_int,
pub output_face_up: ::std::os::raw::c_int,
pub PageSize: [::std::os::raw::c_uint; 2usize],
pub separations: ::std::os::raw::c_int,
pub tray_switch: ::std::os::raw::c_int,
pub tumble: ::std::os::raw::c_int,
pub media_type_num: ::std::os::raw::c_int,
pub compression: ::std::os::raw::c_int,
pub row_count: ::std::os::raw::c_uint,
pub row_feed: ::std::os::raw::c_uint,
pub row_step: ::std::os::raw::c_uint,
pub rendering_intent: [::std::os::raw::c_char; 64usize],
pub page_size_name: [::std::os::raw::c_char; 64usize],
}
#[test]
fn bindgen_test_layout_fz_pwg_options() {
const UNINIT: ::std::mem::MaybeUninit<fz_pwg_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_pwg_options>(),
488usize,
concat!("Size of: ", stringify!(fz_pwg_options))
);
assert_eq!(
::std::mem::align_of::<fz_pwg_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_pwg_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_class) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_class)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_color) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_color)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_type) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).output_type) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(output_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).advance_distance) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(advance_distance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).advance_media) as usize - ptr as usize },
260usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(advance_media)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).collate) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(collate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cut_media) as usize - ptr as usize },
268usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(cut_media)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duplex) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(duplex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insert_sheet) as usize - ptr as usize },
276usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(insert_sheet)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jog) as usize - ptr as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(jog)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).leading_edge) as usize - ptr as usize },
284usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(leading_edge)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).manual_feed) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(manual_feed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_position) as usize - ptr as usize },
292usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_position)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_weight) as usize - ptr as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_weight)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mirror_print) as usize - ptr as usize },
300usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(mirror_print)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).negative_print) as usize - ptr as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(negative_print)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_copies) as usize - ptr as usize },
308usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(num_copies)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orientation) as usize - ptr as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).output_face_up) as usize - ptr as usize },
316usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(output_face_up)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).PageSize) as usize - ptr as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(PageSize)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).separations) as usize - ptr as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(separations)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tray_switch) as usize - ptr as usize },
332usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(tray_switch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tumble) as usize - ptr as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(tumble)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).media_type_num) as usize - ptr as usize },
340usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_type_num)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).compression) as usize - ptr as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(compression)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).row_count) as usize - ptr as usize },
348usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).row_feed) as usize - ptr as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_feed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).row_step) as usize - ptr as usize },
356usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_step)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rendering_intent) as usize - ptr as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(rendering_intent)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_size_name) as usize - ptr as usize },
424usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(page_size_name)
)
);
}
extern "C" {
#[doc = "Save a pixmap as a PWG."]
pub fn fz_save_pixmap_as_pwg(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Save a bitmap as a PWG."]
pub fn fz_save_bitmap_as_pwg(
ctx: *mut fz_context,
bitmap: *mut fz_bitmap,
filename: *mut ::std::os::raw::c_char,
append: ::std::os::raw::c_int,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Write a pixmap as a PWG."]
pub fn fz_write_pixmap_as_pwg(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Write a bitmap as a PWG."]
pub fn fz_write_bitmap_as_pwg(
ctx: *mut fz_context,
out: *mut fz_output,
bitmap: *const fz_bitmap,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Write a pixmap as a PWG page.\n\nCaller should provide a file header by calling\nfz_write_pwg_file_header, but can then write several pages to\nthe same file."]
pub fn fz_write_pixmap_as_pwg_page(
ctx: *mut fz_context,
out: *mut fz_output,
pixmap: *const fz_pixmap,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Write a bitmap as a PWG page.\n\nCaller should provide a file header by calling\nfz_write_pwg_file_header, but can then write several pages to\nthe same file."]
pub fn fz_write_bitmap_as_pwg_page(
ctx: *mut fz_context,
out: *mut fz_output,
bitmap: *const fz_bitmap,
pwg: *const fz_pwg_options,
);
}
extern "C" {
#[doc = "Create a new monochrome pwg band writer."]
pub fn fz_new_mono_pwg_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
pwg: *const fz_pwg_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Create a new color pwg band writer."]
pub fn fz_new_pwg_band_writer(
ctx: *mut fz_context,
out: *mut fz_output,
pwg: *const fz_pwg_options,
) -> *mut fz_band_writer;
}
extern "C" {
#[doc = "Output the file header to a pwg stream, ready for pages to follow it."]
pub fn fz_write_pwg_file_header(ctx: *mut fz_context, out: *mut fz_output);
}
pub const FZ_SVG_TEXT_AS_PATH: _bindgen_ty_23 = 0;
pub const FZ_SVG_TEXT_AS_TEXT: _bindgen_ty_23 = 1;
pub type _bindgen_ty_23 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Create a device that outputs (single page) SVG files to\nthe given output stream.\n\nEquivalent to fz_new_svg_device_with_id passing id = NULL."]
pub fn fz_new_svg_device(
ctx: *mut fz_context,
out: *mut fz_output,
page_width: f32,
page_height: f32,
text_format: ::std::os::raw::c_int,
reuse_images: ::std::os::raw::c_int,
) -> *mut fz_device;
}
extern "C" {
#[doc = "Create a device that outputs (single page) SVG files to\nthe given output stream.\n\noutput: The output stream to send the constructed SVG page to.\n\npage_width, page_height: The page dimensions to use (in points).\n\ntext_format: How to emit text. One of the following values:\nFZ_SVG_TEXT_AS_TEXT: As <text> elements with possible\nlayout errors and mismatching fonts.\nFZ_SVG_TEXT_AS_PATH: As <path> elements with exact\nvisual appearance.\n\nreuse_images: Share image resources using <symbol> definitions.\n\nid: ID parameter to keep generated IDs unique across SVG files."]
pub fn fz_new_svg_device_with_id(
ctx: *mut fz_context,
out: *mut fz_output,
page_width: f32,
page_height: f32,
text_format: ::std::os::raw::c_int,
reuse_images: ::std::os::raw::c_int,
id: *mut ::std::os::raw::c_int,
) -> *mut fz_device;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_story {
_unused: [u8; 0],
}
extern "C" {
pub fn fz_new_story(
ctx: *mut fz_context,
buf: *mut fz_buffer,
user_css: *const ::std::os::raw::c_char,
em: f32,
archive: *mut fz_archive,
) -> *mut fz_story;
}
extern "C" {
pub fn fz_story_warnings(
ctx: *mut fz_context,
story: *mut fz_story,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn fz_place_story(
ctx: *mut fz_context,
story: *mut fz_story,
where_: fz_rect,
filled: *mut fz_rect,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_draw_story(
ctx: *mut fz_context,
story: *mut fz_story,
dev: *mut fz_device,
ctm: fz_matrix,
);
}
extern "C" {
pub fn fz_reset_story(ctx: *mut fz_context, story: *mut fz_story);
}
extern "C" {
pub fn fz_drop_story(ctx: *mut fz_context, story: *mut fz_story);
}
extern "C" {
pub fn fz_story_document(ctx: *mut fz_context, story: *mut fz_story) -> *mut fz_xml;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_story_element_position {
pub depth: ::std::os::raw::c_int,
pub heading: ::std::os::raw::c_int,
pub id: *const ::std::os::raw::c_char,
pub href: *const ::std::os::raw::c_char,
pub rect: fz_rect,
pub text: *const ::std::os::raw::c_char,
pub open_close: ::std::os::raw::c_int,
pub rectangle_num: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_story_element_position() {
const UNINIT: ::std::mem::MaybeUninit<fz_story_element_position> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_story_element_position>(),
56usize,
concat!("Size of: ", stringify!(fz_story_element_position))
);
assert_eq!(
::std::mem::align_of::<fz_story_element_position>(),
8usize,
concat!("Alignment of ", stringify!(fz_story_element_position))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(depth)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).heading) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(heading)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).href) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(href)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rect) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(rect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_close) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(open_close)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rectangle_num) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_story_element_position),
"::",
stringify!(rectangle_num)
)
);
}
pub type fz_story_position_callback = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
arg: *mut ::std::os::raw::c_void,
arg1: *const fz_story_element_position,
),
>;
extern "C" {
pub fn fz_story_positions(
ctx: *mut fz_context,
story: *mut fz_story,
cb: fz_story_position_callback,
arg: *mut ::std::os::raw::c_void,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_write_story_position {
pub element: fz_story_element_position,
pub page_num: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_write_story_position() {
const UNINIT: ::std::mem::MaybeUninit<fz_write_story_position> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_write_story_position>(),
64usize,
concat!("Size of: ", stringify!(fz_write_story_position))
);
assert_eq!(
::std::mem::align_of::<fz_write_story_position>(),
8usize,
concat!("Alignment of ", stringify!(fz_write_story_position))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_write_story_position),
"::",
stringify!(element)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_num) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_write_story_position),
"::",
stringify!(page_num)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_write_story_positions {
pub positions: *mut fz_write_story_position,
pub num: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_write_story_positions() {
const UNINIT: ::std::mem::MaybeUninit<fz_write_story_positions> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fz_write_story_positions>(),
16usize,
concat!("Size of: ", stringify!(fz_write_story_positions))
);
assert_eq!(
::std::mem::align_of::<fz_write_story_positions>(),
8usize,
concat!("Alignment of ", stringify!(fz_write_story_positions))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).positions) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_write_story_positions),
"::",
stringify!(positions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_write_story_positions),
"::",
stringify!(num)
)
);
}
pub type fz_write_story_rectfn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
ref_: *mut ::std::os::raw::c_void,
num: ::std::os::raw::c_int,
filled: fz_rect,
rect: *mut fz_rect,
ctm: *mut fz_matrix,
mediabox: *mut fz_rect,
) -> ::std::os::raw::c_int,
>;
pub type fz_write_story_positionfn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
ref_: *mut ::std::os::raw::c_void,
position: *const fz_write_story_position,
),
>;
pub type fz_write_story_pagefn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
ref_: *mut ::std::os::raw::c_void,
page_num: ::std::os::raw::c_int,
mediabox: fz_rect,
dev: *mut fz_device,
after: ::std::os::raw::c_int,
),
>;
pub type fz_write_story_contentfn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
ref_: *mut ::std::os::raw::c_void,
positions: *const fz_write_story_positions,
buffer: *mut fz_buffer,
),
>;
extern "C" {
pub fn fz_write_story(
ctx: *mut fz_context,
writer: *mut fz_document_writer,
story: *mut fz_story,
rectfn: fz_write_story_rectfn,
rectfn_ref: *mut ::std::os::raw::c_void,
positionfn: fz_write_story_positionfn,
positionfn_ref: *mut ::std::os::raw::c_void,
pagefn: fz_write_story_pagefn,
pagefn_ref: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn fz_write_stabilized_story(
ctx: *mut fz_context,
writer: *mut fz_document_writer,
user_css: *const ::std::os::raw::c_char,
em: f32,
contentfn: fz_write_story_contentfn,
contentfn_ref: *mut ::std::os::raw::c_void,
rectfn: fz_write_story_rectfn,
rectfn_ref: *mut ::std::os::raw::c_void,
pagefn: fz_write_story_pagefn,
pagefn_ref: *mut ::std::os::raw::c_void,
archive: *mut fz_archive,
);
}
extern "C" {
#[doc = " Return version of the Unicode database.\n\n @return Unicode database version"]
pub fn ucdn_get_unicode_version() -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Get combining class of a codepoint.\n\n @param code Unicode codepoint\n @return combining class value, as defined in UAX#44"]
pub fn ucdn_get_combining_class(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get east-asian width of a codepoint.\n\n @param code Unicode codepoint\n @return value according to UCDN_EAST_ASIAN_* and as defined in UAX#11."]
pub fn ucdn_get_east_asian_width(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get general category of a codepoint.\n\n @param code Unicode codepoint\n @return value according to UCDN_GENERAL_CATEGORY_* and as defined in\n UAX#44."]
pub fn ucdn_get_general_category(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get bidirectional class of a codepoint.\n\n @param code Unicode codepoint\n @return value according to UCDN_BIDI_CLASS_* and as defined in UAX#44."]
pub fn ucdn_get_bidi_class(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get script of a codepoint.\n\n @param code Unicode codepoint\n @return value according to UCDN_SCRIPT_* and as defined in UAX#24."]
pub fn ucdn_get_script(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get unresolved linebreak class of a codepoint. This does not take\n rule LB1 of UAX#14 into account. See ucdn_get_resolved_linebreak_class()\n for resolved linebreak classes.\n\n @param code Unicode codepoint\n @return value according to UCDN_LINEBREAK_* and as defined in UAX#14."]
pub fn ucdn_get_linebreak_class(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get resolved linebreak class of a codepoint. This resolves characters\n in the AI, SG, XX, SA and CJ classes according to rule LB1 of UAX#14.\n In addition the CB class is resolved as the equivalent B2 class and\n the NL class is resolved as the equivalent BK class.\n\n @param code Unicode codepoint\n @return value according to UCDN_LINEBREAK_* and as defined in UAX#14."]
pub fn ucdn_get_resolved_linebreak_class(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Check if codepoint can be mirrored.\n\n @param code Unicode codepoint\n @return 1 if mirrored character exists, otherwise 0"]
pub fn ucdn_get_mirrored(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Mirror a codepoint.\n\n @param code Unicode codepoint\n @return mirrored codepoint or the original codepoint if no\n mirrored character exists"]
pub fn ucdn_mirror(code: u32) -> u32;
}
extern "C" {
#[doc = " Get paired bracket for a codepoint.\n\n @param code Unicode codepoint\n @return paired bracket codepoint or the original codepoint if no\n paired bracket character exists"]
pub fn ucdn_paired_bracket(code: u32) -> u32;
}
extern "C" {
#[doc = " Get paired bracket type for a codepoint.\n\n @param code Unicode codepoint\n @return value according to UCDN_BIDI_PAIRED_BRACKET_TYPE_* and as defined\n in UAX#9.\n"]
pub fn ucdn_paired_bracket_type(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Pairwise canonical decomposition of a codepoint. This includes\n Hangul Jamo decomposition (see chapter 3.12 of the Unicode core\n specification).\n\n Hangul is decomposed into L and V jamos for LV forms, and an\n LV precomposed syllable and a T jamo for LVT forms.\n\n @param code Unicode codepoint\n @param a filled with first codepoint of decomposition\n @param b filled with second codepoint of decomposition, or 0\n @return success"]
pub fn ucdn_decompose(code: u32, a: *mut u32, b: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Compatibility decomposition of a codepoint.\n\n @param code Unicode codepoint\n @param decomposed filled with decomposition, must be able to hold 18\n characters\n @return length of decomposition or 0 in case none exists"]
pub fn ucdn_compat_decompose(code: u32, decomposed: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Pairwise canonical composition of two codepoints. This includes\n Hangul Jamo composition (see chapter 3.12 of the Unicode core\n specification).\n\n Hangul composition expects either L and V jamos, or an LV\n precomposed syllable and a T jamo. This is exactly the inverse\n of pairwise Hangul decomposition.\n\n @param code filled with composition\n @param a first codepoint\n @param b second codepoint\n @return success"]
pub fn ucdn_compose(code: *mut u32, a: u32, b: u32) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_crypt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_journal {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_obj {
_unused: [u8; 0],
}
extern "C" {
pub fn pdf_new_int(ctx: *mut fz_context, i: i64) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_real(ctx: *mut fz_context, f: f32) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_name(ctx: *mut fz_context, str_: *const ::std::os::raw::c_char) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_string(
ctx: *mut fz_context,
str_: *const ::std::os::raw::c_char,
len: usize,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_text_string(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_indirect(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_array(
ctx: *mut fz_context,
doc: *mut pdf_document,
initialcap: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_dict(
ctx: *mut fz_context,
doc: *mut pdf_document,
initialcap: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_rect(
ctx: *mut fz_context,
doc: *mut pdf_document,
rect: fz_rect,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_matrix(
ctx: *mut fz_context,
doc: *mut pdf_document,
mtx: fz_matrix,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_date(ctx: *mut fz_context, doc: *mut pdf_document, time: i64) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_copy_array(ctx: *mut fz_context, array: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_copy_dict(ctx: *mut fz_context, dict: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_deep_copy_obj(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_keep_obj(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_drop_obj(ctx: *mut fz_context, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_is_null(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_bool(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_int(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_real(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_number(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_name(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_string(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_array(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_dict(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_indirect(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_obj_num_is_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_is_stream(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_objcmp(
ctx: *mut fz_context,
a: *mut pdf_obj,
b: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_objcmp_resolve(
ctx: *mut fz_context,
a: *mut pdf_obj,
b: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_objcmp_deep(
ctx: *mut fz_context,
a: *mut pdf_obj,
b: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_name_eq(
ctx: *mut fz_context,
a: *mut pdf_obj,
b: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_obj_marked(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_mark_obj(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_unmark_obj(ctx: *mut fz_context, obj: *mut pdf_obj);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_cycle_list {
pub up: *mut pdf_cycle_list,
pub num: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_cycle_list() {
const UNINIT: ::std::mem::MaybeUninit<pdf_cycle_list> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_cycle_list>(),
16usize,
concat!("Size of: ", stringify!(pdf_cycle_list))
);
assert_eq!(
::std::mem::align_of::<pdf_cycle_list>(),
8usize,
concat!("Alignment of ", stringify!(pdf_cycle_list))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).up) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_cycle_list),
"::",
stringify!(up)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_cycle_list),
"::",
stringify!(num)
)
);
}
extern "C" {
pub fn pdf_cycle(
ctx: *mut fz_context,
here: *mut pdf_cycle_list,
prev: *mut pdf_cycle_list,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_mark_bits {
pub len: ::std::os::raw::c_int,
pub bits: [::std::os::raw::c_uchar; 1usize],
}
#[test]
fn bindgen_test_layout_pdf_mark_bits() {
const UNINIT: ::std::mem::MaybeUninit<pdf_mark_bits> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_mark_bits>(),
8usize,
concat!("Size of: ", stringify!(pdf_mark_bits))
);
assert_eq!(
::std::mem::align_of::<pdf_mark_bits>(),
4usize,
concat!("Alignment of ", stringify!(pdf_mark_bits))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_bits),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_bits),
"::",
stringify!(bits)
)
);
}
extern "C" {
pub fn pdf_new_mark_bits(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_mark_bits;
}
extern "C" {
pub fn pdf_drop_mark_bits(ctx: *mut fz_context, marks: *mut pdf_mark_bits);
}
extern "C" {
pub fn pdf_mark_bits_reset(ctx: *mut fz_context, marks: *mut pdf_mark_bits);
}
extern "C" {
pub fn pdf_mark_bits_set(
ctx: *mut fz_context,
marks: *mut pdf_mark_bits,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_mark_list {
pub len: ::std::os::raw::c_int,
pub max: ::std::os::raw::c_int,
pub list: *mut ::std::os::raw::c_int,
pub local_list: [::std::os::raw::c_int; 8usize],
}
#[test]
fn bindgen_test_layout_pdf_mark_list() {
const UNINIT: ::std::mem::MaybeUninit<pdf_mark_list> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_mark_list>(),
48usize,
concat!("Size of: ", stringify!(pdf_mark_list))
);
assert_eq!(
::std::mem::align_of::<pdf_mark_list>(),
8usize,
concat!("Alignment of ", stringify!(pdf_mark_list))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_list),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_list),
"::",
stringify!(max)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).list) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_list),
"::",
stringify!(list)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_list) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_mark_list),
"::",
stringify!(local_list)
)
);
}
extern "C" {
pub fn pdf_mark_list_push(
ctx: *mut fz_context,
list: *mut pdf_mark_list,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_mark_list_pop(ctx: *mut fz_context, list: *mut pdf_mark_list);
}
extern "C" {
pub fn pdf_mark_list_init(ctx: *mut fz_context, list: *mut pdf_mark_list);
}
extern "C" {
pub fn pdf_mark_list_free(ctx: *mut fz_context, list: *mut pdf_mark_list);
}
extern "C" {
pub fn pdf_set_obj_memo(
ctx: *mut fz_context,
obj: *mut pdf_obj,
bit: ::std::os::raw::c_int,
memo: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_obj_memo(
ctx: *mut fz_context,
obj: *mut pdf_obj,
bit: ::std::os::raw::c_int,
memo: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_obj_is_dirty(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_dirty_obj(ctx: *mut fz_context, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_clean_obj(ctx: *mut fz_context, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_to_bool(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_to_int(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_to_int64(ctx: *mut fz_context, obj: *mut pdf_obj) -> i64;
}
extern "C" {
pub fn pdf_to_real(ctx: *mut fz_context, obj: *mut pdf_obj) -> f32;
}
extern "C" {
pub fn pdf_to_name(ctx: *mut fz_context, obj: *mut pdf_obj) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_to_text_string(
ctx: *mut fz_context,
obj: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_to_string(
ctx: *mut fz_context,
obj: *mut pdf_obj,
sizep: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_to_str_buf(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_to_str_len(ctx: *mut fz_context, obj: *mut pdf_obj) -> usize;
}
extern "C" {
pub fn pdf_to_num(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_to_gen(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_array_len(ctx: *mut fz_context, array: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_array_get(
ctx: *mut fz_context,
array: *mut pdf_obj,
i: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_array_put(
ctx: *mut fz_context,
array: *mut pdf_obj,
i: ::std::os::raw::c_int,
obj: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_array_put_drop(
ctx: *mut fz_context,
array: *mut pdf_obj,
i: ::std::os::raw::c_int,
obj: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_array_push(ctx: *mut fz_context, array: *mut pdf_obj, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_array_push_drop(ctx: *mut fz_context, array: *mut pdf_obj, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_array_insert(
ctx: *mut fz_context,
array: *mut pdf_obj,
obj: *mut pdf_obj,
index: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_array_insert_drop(
ctx: *mut fz_context,
array: *mut pdf_obj,
obj: *mut pdf_obj,
index: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_array_delete(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_array_find(
ctx: *mut fz_context,
array: *mut pdf_obj,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_array_contains(
ctx: *mut fz_context,
array: *mut pdf_obj,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_dict_len(ctx: *mut fz_context, dict: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_dict_get_key(
ctx: *mut fz_context,
dict: *mut pdf_obj,
idx: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_get_val(
ctx: *mut fz_context,
dict: *mut pdf_obj,
idx: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_put_val_null(
ctx: *mut fz_context,
obj: *mut pdf_obj,
idx: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_dict_get(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_getp(
ctx: *mut fz_context,
dict: *mut pdf_obj,
path: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_getl(ctx: *mut fz_context, dict: *mut pdf_obj, ...) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_geta(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
abbrev: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_gets(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_getsa(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
abbrev: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_get_inheritable(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_getp_inheritable(
ctx: *mut fz_context,
dict: *mut pdf_obj,
path: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_put(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_put_drop(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_get_put_drop(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
val: *mut pdf_obj,
old_val: *mut *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_puts(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_puts_drop(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_putp(
ctx: *mut fz_context,
dict: *mut pdf_obj,
path: *const ::std::os::raw::c_char,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_putp_drop(
ctx: *mut fz_context,
dict: *mut pdf_obj,
path: *const ::std::os::raw::c_char,
val: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_dict_putl(ctx: *mut fz_context, dict: *mut pdf_obj, val: *mut pdf_obj, ...);
}
extern "C" {
pub fn pdf_dict_putl_drop(ctx: *mut fz_context, dict: *mut pdf_obj, val: *mut pdf_obj, ...);
}
extern "C" {
pub fn pdf_dict_del(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj);
}
extern "C" {
pub fn pdf_dict_dels(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_sort_dict(ctx: *mut fz_context, dict: *mut pdf_obj);
}
extern "C" {
pub fn pdf_dict_put_bool(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_dict_put_int(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj, x: i64);
}
extern "C" {
pub fn pdf_dict_put_real(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj, x: f64);
}
extern "C" {
pub fn pdf_dict_put_name(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_dict_put_string(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
n: usize,
);
}
extern "C" {
pub fn pdf_dict_put_text_string(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_dict_put_rect(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: fz_rect,
);
}
extern "C" {
pub fn pdf_dict_put_matrix(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
x: fz_matrix,
);
}
extern "C" {
pub fn pdf_dict_put_date(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
time: i64,
);
}
extern "C" {
pub fn pdf_dict_put_array(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_put_dict(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_puts_dict(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *const ::std::os::raw::c_char,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_dict_get_bool(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_dict_get_int(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_dict_get_int64(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj) -> i64;
}
extern "C" {
pub fn pdf_dict_get_real(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj) -> f32;
}
extern "C" {
pub fn pdf_dict_get_name(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_dict_get_string(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
sizep: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_dict_get_text_string(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_dict_get_rect(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> fz_rect;
}
extern "C" {
pub fn pdf_dict_get_matrix(
ctx: *mut fz_context,
dict: *mut pdf_obj,
key: *mut pdf_obj,
) -> fz_matrix;
}
extern "C" {
pub fn pdf_dict_get_date(ctx: *mut fz_context, dict: *mut pdf_obj, key: *mut pdf_obj) -> i64;
}
extern "C" {
pub fn pdf_array_push_bool(ctx: *mut fz_context, array: *mut pdf_obj, x: ::std::os::raw::c_int);
}
extern "C" {
pub fn pdf_array_push_int(ctx: *mut fz_context, array: *mut pdf_obj, x: i64);
}
extern "C" {
pub fn pdf_array_push_real(ctx: *mut fz_context, array: *mut pdf_obj, x: f64);
}
extern "C" {
pub fn pdf_array_push_name(
ctx: *mut fz_context,
array: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_array_push_string(
ctx: *mut fz_context,
array: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
n: usize,
);
}
extern "C" {
pub fn pdf_array_push_text_string(
ctx: *mut fz_context,
array: *mut pdf_obj,
x: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_array_push_array(
ctx: *mut fz_context,
array: *mut pdf_obj,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_array_push_dict(
ctx: *mut fz_context,
array: *mut pdf_obj,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_array_get_bool(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_array_get_int(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_array_get_real(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> f32;
}
extern "C" {
pub fn pdf_array_get_name(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_array_get_string(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
sizep: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_array_get_text_string(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_array_get_rect(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> fz_rect;
}
extern "C" {
pub fn pdf_array_get_matrix(
ctx: *mut fz_context,
array: *mut pdf_obj,
index: ::std::os::raw::c_int,
) -> fz_matrix;
}
extern "C" {
pub fn pdf_set_obj_parent(ctx: *mut fz_context, obj: *mut pdf_obj, num: ::std::os::raw::c_int);
}
extern "C" {
pub fn pdf_obj_refs(ctx: *mut fz_context, ref_: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_obj_parent_num(ctx: *mut fz_context, obj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_sprint_obj(
ctx: *mut fz_context,
buf: *mut ::std::os::raw::c_char,
cap: usize,
len: *mut usize,
obj: *mut pdf_obj,
tight: ::std::os::raw::c_int,
ascii: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_print_obj(
ctx: *mut fz_context,
out: *mut fz_output,
obj: *mut pdf_obj,
tight: ::std::os::raw::c_int,
ascii: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_print_encrypted_obj(
ctx: *mut fz_context,
out: *mut fz_output,
obj: *mut pdf_obj,
tight: ::std::os::raw::c_int,
ascii: ::std::os::raw::c_int,
crypt: *mut pdf_crypt,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_debug_obj(ctx: *mut fz_context, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_debug_ref(ctx: *mut fz_context, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_new_utf8_from_pdf_string(
ctx: *mut fz_context,
srcptr: *const ::std::os::raw::c_char,
srclen: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_new_utf8_from_pdf_string_obj(
ctx: *mut fz_context,
src: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_new_utf8_from_pdf_stream_obj(
ctx: *mut fz_context,
src: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_load_stream_or_string_as_utf8(
ctx: *mut fz_context,
src: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_to_quad(
ctx: *mut fz_context,
array: *mut pdf_obj,
offset: ::std::os::raw::c_int,
) -> fz_quad;
}
extern "C" {
pub fn pdf_to_rect(ctx: *mut fz_context, array: *mut pdf_obj) -> fz_rect;
}
extern "C" {
pub fn pdf_to_matrix(ctx: *mut fz_context, array: *mut pdf_obj) -> fz_matrix;
}
extern "C" {
pub fn pdf_to_date(ctx: *mut fz_context, time: *mut pdf_obj) -> i64;
}
extern "C" {
pub fn pdf_get_indirect_document(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_get_bound_document(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_pin_document(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_set_int(ctx: *mut fz_context, obj: *mut pdf_obj, i: i64);
}
pub const PDF_ENUM_NULL: _bindgen_ty_24 = 0;
pub const PDF_ENUM_TRUE: _bindgen_ty_24 = 1;
pub const PDF_ENUM_FALSE: _bindgen_ty_24 = 2;
pub const PDF_ENUM_NAME_1_2: _bindgen_ty_24 = 3;
pub const PDF_ENUM_NAME_3D: _bindgen_ty_24 = 4;
pub const PDF_ENUM_NAME_A: _bindgen_ty_24 = 5;
pub const PDF_ENUM_NAME_A85: _bindgen_ty_24 = 6;
pub const PDF_ENUM_NAME_AA: _bindgen_ty_24 = 7;
pub const PDF_ENUM_NAME_AC: _bindgen_ty_24 = 8;
pub const PDF_ENUM_NAME_AESV2: _bindgen_ty_24 = 9;
pub const PDF_ENUM_NAME_AESV3: _bindgen_ty_24 = 10;
pub const PDF_ENUM_NAME_AHx: _bindgen_ty_24 = 11;
pub const PDF_ENUM_NAME_AP: _bindgen_ty_24 = 12;
pub const PDF_ENUM_NAME_AS: _bindgen_ty_24 = 13;
pub const PDF_ENUM_NAME_ASCII85Decode: _bindgen_ty_24 = 14;
pub const PDF_ENUM_NAME_ASCIIHexDecode: _bindgen_ty_24 = 15;
pub const PDF_ENUM_NAME_AcroForm: _bindgen_ty_24 = 16;
pub const PDF_ENUM_NAME_Action: _bindgen_ty_24 = 17;
pub const PDF_ENUM_NAME_ActualText: _bindgen_ty_24 = 18;
pub const PDF_ENUM_NAME_Adobe_PPKLite: _bindgen_ty_24 = 19;
pub const PDF_ENUM_NAME_All: _bindgen_ty_24 = 20;
pub const PDF_ENUM_NAME_AllOff: _bindgen_ty_24 = 21;
pub const PDF_ENUM_NAME_AllOn: _bindgen_ty_24 = 22;
pub const PDF_ENUM_NAME_Alpha: _bindgen_ty_24 = 23;
pub const PDF_ENUM_NAME_Alt: _bindgen_ty_24 = 24;
pub const PDF_ENUM_NAME_Alternate: _bindgen_ty_24 = 25;
pub const PDF_ENUM_NAME_Annot: _bindgen_ty_24 = 26;
pub const PDF_ENUM_NAME_Annots: _bindgen_ty_24 = 27;
pub const PDF_ENUM_NAME_AnyOff: _bindgen_ty_24 = 28;
pub const PDF_ENUM_NAME_App: _bindgen_ty_24 = 29;
pub const PDF_ENUM_NAME_Approved: _bindgen_ty_24 = 30;
pub const PDF_ENUM_NAME_Art: _bindgen_ty_24 = 31;
pub const PDF_ENUM_NAME_ArtBox: _bindgen_ty_24 = 32;
pub const PDF_ENUM_NAME_Artifact: _bindgen_ty_24 = 33;
pub const PDF_ENUM_NAME_AsIs: _bindgen_ty_24 = 34;
pub const PDF_ENUM_NAME_Ascent: _bindgen_ty_24 = 35;
pub const PDF_ENUM_NAME_Aside: _bindgen_ty_24 = 36;
pub const PDF_ENUM_NAME_AuthEvent: _bindgen_ty_24 = 37;
pub const PDF_ENUM_NAME_Author: _bindgen_ty_24 = 38;
pub const PDF_ENUM_NAME_B: _bindgen_ty_24 = 39;
pub const PDF_ENUM_NAME_BBox: _bindgen_ty_24 = 40;
pub const PDF_ENUM_NAME_BC: _bindgen_ty_24 = 41;
pub const PDF_ENUM_NAME_BE: _bindgen_ty_24 = 42;
pub const PDF_ENUM_NAME_BG: _bindgen_ty_24 = 43;
pub const PDF_ENUM_NAME_BM: _bindgen_ty_24 = 44;
pub const PDF_ENUM_NAME_BPC: _bindgen_ty_24 = 45;
pub const PDF_ENUM_NAME_BS: _bindgen_ty_24 = 46;
pub const PDF_ENUM_NAME_Background: _bindgen_ty_24 = 47;
pub const PDF_ENUM_NAME_BaseEncoding: _bindgen_ty_24 = 48;
pub const PDF_ENUM_NAME_BaseFont: _bindgen_ty_24 = 49;
pub const PDF_ENUM_NAME_BaseState: _bindgen_ty_24 = 50;
pub const PDF_ENUM_NAME_BibEntry: _bindgen_ty_24 = 51;
pub const PDF_ENUM_NAME_BitsPerComponent: _bindgen_ty_24 = 52;
pub const PDF_ENUM_NAME_BitsPerCoordinate: _bindgen_ty_24 = 53;
pub const PDF_ENUM_NAME_BitsPerFlag: _bindgen_ty_24 = 54;
pub const PDF_ENUM_NAME_BitsPerSample: _bindgen_ty_24 = 55;
pub const PDF_ENUM_NAME_BlackIs1: _bindgen_ty_24 = 56;
pub const PDF_ENUM_NAME_BlackPoint: _bindgen_ty_24 = 57;
pub const PDF_ENUM_NAME_BleedBox: _bindgen_ty_24 = 58;
pub const PDF_ENUM_NAME_Blinds: _bindgen_ty_24 = 59;
pub const PDF_ENUM_NAME_BlockQuote: _bindgen_ty_24 = 60;
pub const PDF_ENUM_NAME_Border: _bindgen_ty_24 = 61;
pub const PDF_ENUM_NAME_Bounds: _bindgen_ty_24 = 62;
pub const PDF_ENUM_NAME_Box: _bindgen_ty_24 = 63;
pub const PDF_ENUM_NAME_Bt: _bindgen_ty_24 = 64;
pub const PDF_ENUM_NAME_Btn: _bindgen_ty_24 = 65;
pub const PDF_ENUM_NAME_Butt: _bindgen_ty_24 = 66;
pub const PDF_ENUM_NAME_ByteRange: _bindgen_ty_24 = 67;
pub const PDF_ENUM_NAME_C: _bindgen_ty_24 = 68;
pub const PDF_ENUM_NAME_C0: _bindgen_ty_24 = 69;
pub const PDF_ENUM_NAME_C1: _bindgen_ty_24 = 70;
pub const PDF_ENUM_NAME_CA: _bindgen_ty_24 = 71;
pub const PDF_ENUM_NAME_CCF: _bindgen_ty_24 = 72;
pub const PDF_ENUM_NAME_CCITTFaxDecode: _bindgen_ty_24 = 73;
pub const PDF_ENUM_NAME_CF: _bindgen_ty_24 = 74;
pub const PDF_ENUM_NAME_CFM: _bindgen_ty_24 = 75;
pub const PDF_ENUM_NAME_CI: _bindgen_ty_24 = 76;
pub const PDF_ENUM_NAME_CIDFontType0: _bindgen_ty_24 = 77;
pub const PDF_ENUM_NAME_CIDFontType0C: _bindgen_ty_24 = 78;
pub const PDF_ENUM_NAME_CIDFontType2: _bindgen_ty_24 = 79;
pub const PDF_ENUM_NAME_CIDSystemInfo: _bindgen_ty_24 = 80;
pub const PDF_ENUM_NAME_CIDToGIDMap: _bindgen_ty_24 = 81;
pub const PDF_ENUM_NAME_CMYK: _bindgen_ty_24 = 82;
pub const PDF_ENUM_NAME_CS: _bindgen_ty_24 = 83;
pub const PDF_ENUM_NAME_CalCMYK: _bindgen_ty_24 = 84;
pub const PDF_ENUM_NAME_CalGray: _bindgen_ty_24 = 85;
pub const PDF_ENUM_NAME_CalRGB: _bindgen_ty_24 = 86;
pub const PDF_ENUM_NAME_CapHeight: _bindgen_ty_24 = 87;
pub const PDF_ENUM_NAME_Caption: _bindgen_ty_24 = 88;
pub const PDF_ENUM_NAME_Caret: _bindgen_ty_24 = 89;
pub const PDF_ENUM_NAME_Catalog: _bindgen_ty_24 = 90;
pub const PDF_ENUM_NAME_Cert: _bindgen_ty_24 = 91;
pub const PDF_ENUM_NAME_Ch: _bindgen_ty_24 = 92;
pub const PDF_ENUM_NAME_Changes: _bindgen_ty_24 = 93;
pub const PDF_ENUM_NAME_CharProcs: _bindgen_ty_24 = 94;
pub const PDF_ENUM_NAME_CheckSum: _bindgen_ty_24 = 95;
pub const PDF_ENUM_NAME_Circle: _bindgen_ty_24 = 96;
pub const PDF_ENUM_NAME_ClosedArrow: _bindgen_ty_24 = 97;
pub const PDF_ENUM_NAME_Code: _bindgen_ty_24 = 98;
pub const PDF_ENUM_NAME_Collection: _bindgen_ty_24 = 99;
pub const PDF_ENUM_NAME_ColorSpace: _bindgen_ty_24 = 100;
pub const PDF_ENUM_NAME_ColorTransform: _bindgen_ty_24 = 101;
pub const PDF_ENUM_NAME_Colorants: _bindgen_ty_24 = 102;
pub const PDF_ENUM_NAME_Colors: _bindgen_ty_24 = 103;
pub const PDF_ENUM_NAME_Columns: _bindgen_ty_24 = 104;
pub const PDF_ENUM_NAME_Confidential: _bindgen_ty_24 = 105;
pub const PDF_ENUM_NAME_Configs: _bindgen_ty_24 = 106;
pub const PDF_ENUM_NAME_ContactInfo: _bindgen_ty_24 = 107;
pub const PDF_ENUM_NAME_Contents: _bindgen_ty_24 = 108;
pub const PDF_ENUM_NAME_Coords: _bindgen_ty_24 = 109;
pub const PDF_ENUM_NAME_Count: _bindgen_ty_24 = 110;
pub const PDF_ENUM_NAME_Cover: _bindgen_ty_24 = 111;
pub const PDF_ENUM_NAME_CreationDate: _bindgen_ty_24 = 112;
pub const PDF_ENUM_NAME_Creator: _bindgen_ty_24 = 113;
pub const PDF_ENUM_NAME_CropBox: _bindgen_ty_24 = 114;
pub const PDF_ENUM_NAME_Crypt: _bindgen_ty_24 = 115;
pub const PDF_ENUM_NAME_D: _bindgen_ty_24 = 116;
pub const PDF_ENUM_NAME_DA: _bindgen_ty_24 = 117;
pub const PDF_ENUM_NAME_DC: _bindgen_ty_24 = 118;
pub const PDF_ENUM_NAME_DCT: _bindgen_ty_24 = 119;
pub const PDF_ENUM_NAME_DCTDecode: _bindgen_ty_24 = 120;
pub const PDF_ENUM_NAME_DL: _bindgen_ty_24 = 121;
pub const PDF_ENUM_NAME_DOS: _bindgen_ty_24 = 122;
pub const PDF_ENUM_NAME_DP: _bindgen_ty_24 = 123;
pub const PDF_ENUM_NAME_DR: _bindgen_ty_24 = 124;
pub const PDF_ENUM_NAME_DS: _bindgen_ty_24 = 125;
pub const PDF_ENUM_NAME_DV: _bindgen_ty_24 = 126;
pub const PDF_ENUM_NAME_DW: _bindgen_ty_24 = 127;
pub const PDF_ENUM_NAME_DW2: _bindgen_ty_24 = 128;
pub const PDF_ENUM_NAME_DamagedRowsBeforeError: _bindgen_ty_24 = 129;
pub const PDF_ENUM_NAME_Data: _bindgen_ty_24 = 130;
pub const PDF_ENUM_NAME_Date: _bindgen_ty_24 = 131;
pub const PDF_ENUM_NAME_Decode: _bindgen_ty_24 = 132;
pub const PDF_ENUM_NAME_DecodeParms: _bindgen_ty_24 = 133;
pub const PDF_ENUM_NAME_Default: _bindgen_ty_24 = 134;
pub const PDF_ENUM_NAME_DefaultCMYK: _bindgen_ty_24 = 135;
pub const PDF_ENUM_NAME_DefaultGray: _bindgen_ty_24 = 136;
pub const PDF_ENUM_NAME_DefaultRGB: _bindgen_ty_24 = 137;
pub const PDF_ENUM_NAME_Departmental: _bindgen_ty_24 = 138;
pub const PDF_ENUM_NAME_Desc: _bindgen_ty_24 = 139;
pub const PDF_ENUM_NAME_DescendantFonts: _bindgen_ty_24 = 140;
pub const PDF_ENUM_NAME_Descent: _bindgen_ty_24 = 141;
pub const PDF_ENUM_NAME_Design: _bindgen_ty_24 = 142;
pub const PDF_ENUM_NAME_Dest: _bindgen_ty_24 = 143;
pub const PDF_ENUM_NAME_DestOutputProfile: _bindgen_ty_24 = 144;
pub const PDF_ENUM_NAME_Dests: _bindgen_ty_24 = 145;
pub const PDF_ENUM_NAME_DeviceCMYK: _bindgen_ty_24 = 146;
pub const PDF_ENUM_NAME_DeviceGray: _bindgen_ty_24 = 147;
pub const PDF_ENUM_NAME_DeviceN: _bindgen_ty_24 = 148;
pub const PDF_ENUM_NAME_DeviceRGB: _bindgen_ty_24 = 149;
pub const PDF_ENUM_NAME_Di: _bindgen_ty_24 = 150;
pub const PDF_ENUM_NAME_Diamond: _bindgen_ty_24 = 151;
pub const PDF_ENUM_NAME_Differences: _bindgen_ty_24 = 152;
pub const PDF_ENUM_NAME_DigestLocation: _bindgen_ty_24 = 153;
pub const PDF_ENUM_NAME_DigestMethod: _bindgen_ty_24 = 154;
pub const PDF_ENUM_NAME_DigestValue: _bindgen_ty_24 = 155;
pub const PDF_ENUM_NAME_Dissolve: _bindgen_ty_24 = 156;
pub const PDF_ENUM_NAME_Div: _bindgen_ty_24 = 157;
pub const PDF_ENUM_NAME_Dm: _bindgen_ty_24 = 158;
pub const PDF_ENUM_NAME_DocMDP: _bindgen_ty_24 = 159;
pub const PDF_ENUM_NAME_Document: _bindgen_ty_24 = 160;
pub const PDF_ENUM_NAME_DocumentFragment: _bindgen_ty_24 = 161;
pub const PDF_ENUM_NAME_Domain: _bindgen_ty_24 = 162;
pub const PDF_ENUM_NAME_Draft: _bindgen_ty_24 = 163;
pub const PDF_ENUM_NAME_Dur: _bindgen_ty_24 = 164;
pub const PDF_ENUM_NAME_E: _bindgen_ty_24 = 165;
pub const PDF_ENUM_NAME_EF: _bindgen_ty_24 = 166;
pub const PDF_ENUM_NAME_EarlyChange: _bindgen_ty_24 = 167;
pub const PDF_ENUM_NAME_Em: _bindgen_ty_24 = 168;
pub const PDF_ENUM_NAME_EmbeddedFile: _bindgen_ty_24 = 169;
pub const PDF_ENUM_NAME_EmbeddedFiles: _bindgen_ty_24 = 170;
pub const PDF_ENUM_NAME_Encode: _bindgen_ty_24 = 171;
pub const PDF_ENUM_NAME_EncodedByteAlign: _bindgen_ty_24 = 172;
pub const PDF_ENUM_NAME_Encoding: _bindgen_ty_24 = 173;
pub const PDF_ENUM_NAME_Encrypt: _bindgen_ty_24 = 174;
pub const PDF_ENUM_NAME_EncryptMetadata: _bindgen_ty_24 = 175;
pub const PDF_ENUM_NAME_EndOfBlock: _bindgen_ty_24 = 176;
pub const PDF_ENUM_NAME_EndOfLine: _bindgen_ty_24 = 177;
pub const PDF_ENUM_NAME_Exclude: _bindgen_ty_24 = 178;
pub const PDF_ENUM_NAME_Experimental: _bindgen_ty_24 = 179;
pub const PDF_ENUM_NAME_Expired: _bindgen_ty_24 = 180;
pub const PDF_ENUM_NAME_ExtGState: _bindgen_ty_24 = 181;
pub const PDF_ENUM_NAME_Extend: _bindgen_ty_24 = 182;
pub const PDF_ENUM_NAME_F: _bindgen_ty_24 = 183;
pub const PDF_ENUM_NAME_FENote: _bindgen_ty_24 = 184;
pub const PDF_ENUM_NAME_FL: _bindgen_ty_24 = 185;
pub const PDF_ENUM_NAME_FRM: _bindgen_ty_24 = 186;
pub const PDF_ENUM_NAME_FS: _bindgen_ty_24 = 187;
pub const PDF_ENUM_NAME_FT: _bindgen_ty_24 = 188;
pub const PDF_ENUM_NAME_Fade: _bindgen_ty_24 = 189;
pub const PDF_ENUM_NAME_Ff: _bindgen_ty_24 = 190;
pub const PDF_ENUM_NAME_FieldMDP: _bindgen_ty_24 = 191;
pub const PDF_ENUM_NAME_Fields: _bindgen_ty_24 = 192;
pub const PDF_ENUM_NAME_Figure: _bindgen_ty_24 = 193;
pub const PDF_ENUM_NAME_FileAttachment: _bindgen_ty_24 = 194;
pub const PDF_ENUM_NAME_FileSize: _bindgen_ty_24 = 195;
pub const PDF_ENUM_NAME_Filespec: _bindgen_ty_24 = 196;
pub const PDF_ENUM_NAME_Filter: _bindgen_ty_24 = 197;
pub const PDF_ENUM_NAME_Final: _bindgen_ty_24 = 198;
pub const PDF_ENUM_NAME_Fingerprint: _bindgen_ty_24 = 199;
pub const PDF_ENUM_NAME_First: _bindgen_ty_24 = 200;
pub const PDF_ENUM_NAME_FirstChar: _bindgen_ty_24 = 201;
pub const PDF_ENUM_NAME_FirstPage: _bindgen_ty_24 = 202;
pub const PDF_ENUM_NAME_Fit: _bindgen_ty_24 = 203;
pub const PDF_ENUM_NAME_FitB: _bindgen_ty_24 = 204;
pub const PDF_ENUM_NAME_FitBH: _bindgen_ty_24 = 205;
pub const PDF_ENUM_NAME_FitBV: _bindgen_ty_24 = 206;
pub const PDF_ENUM_NAME_FitH: _bindgen_ty_24 = 207;
pub const PDF_ENUM_NAME_FitR: _bindgen_ty_24 = 208;
pub const PDF_ENUM_NAME_FitV: _bindgen_ty_24 = 209;
pub const PDF_ENUM_NAME_Fl: _bindgen_ty_24 = 210;
pub const PDF_ENUM_NAME_Flags: _bindgen_ty_24 = 211;
pub const PDF_ENUM_NAME_FlateDecode: _bindgen_ty_24 = 212;
pub const PDF_ENUM_NAME_Fly: _bindgen_ty_24 = 213;
pub const PDF_ENUM_NAME_Font: _bindgen_ty_24 = 214;
pub const PDF_ENUM_NAME_FontBBox: _bindgen_ty_24 = 215;
pub const PDF_ENUM_NAME_FontDescriptor: _bindgen_ty_24 = 216;
pub const PDF_ENUM_NAME_FontFile: _bindgen_ty_24 = 217;
pub const PDF_ENUM_NAME_FontFile2: _bindgen_ty_24 = 218;
pub const PDF_ENUM_NAME_FontFile3: _bindgen_ty_24 = 219;
pub const PDF_ENUM_NAME_FontMatrix: _bindgen_ty_24 = 220;
pub const PDF_ENUM_NAME_FontName: _bindgen_ty_24 = 221;
pub const PDF_ENUM_NAME_ForComment: _bindgen_ty_24 = 222;
pub const PDF_ENUM_NAME_ForPublicRelease: _bindgen_ty_24 = 223;
pub const PDF_ENUM_NAME_Form: _bindgen_ty_24 = 224;
pub const PDF_ENUM_NAME_FormEx: _bindgen_ty_24 = 225;
pub const PDF_ENUM_NAME_FormType: _bindgen_ty_24 = 226;
pub const PDF_ENUM_NAME_Formula: _bindgen_ty_24 = 227;
pub const PDF_ENUM_NAME_FreeText: _bindgen_ty_24 = 228;
pub const PDF_ENUM_NAME_Function: _bindgen_ty_24 = 229;
pub const PDF_ENUM_NAME_FunctionType: _bindgen_ty_24 = 230;
pub const PDF_ENUM_NAME_Functions: _bindgen_ty_24 = 231;
pub const PDF_ENUM_NAME_G: _bindgen_ty_24 = 232;
pub const PDF_ENUM_NAME_GTS_PDFX: _bindgen_ty_24 = 233;
pub const PDF_ENUM_NAME_Gamma: _bindgen_ty_24 = 234;
pub const PDF_ENUM_NAME_Glitter: _bindgen_ty_24 = 235;
pub const PDF_ENUM_NAME_GoTo: _bindgen_ty_24 = 236;
pub const PDF_ENUM_NAME_GoToR: _bindgen_ty_24 = 237;
pub const PDF_ENUM_NAME_Group: _bindgen_ty_24 = 238;
pub const PDF_ENUM_NAME_H: _bindgen_ty_24 = 239;
pub const PDF_ENUM_NAME_H1: _bindgen_ty_24 = 240;
pub const PDF_ENUM_NAME_H2: _bindgen_ty_24 = 241;
pub const PDF_ENUM_NAME_H3: _bindgen_ty_24 = 242;
pub const PDF_ENUM_NAME_H4: _bindgen_ty_24 = 243;
pub const PDF_ENUM_NAME_H5: _bindgen_ty_24 = 244;
pub const PDF_ENUM_NAME_H6: _bindgen_ty_24 = 245;
pub const PDF_ENUM_NAME_Height: _bindgen_ty_24 = 246;
pub const PDF_ENUM_NAME_Helv: _bindgen_ty_24 = 247;
pub const PDF_ENUM_NAME_Highlight: _bindgen_ty_24 = 248;
pub const PDF_ENUM_NAME_HistoryPos: _bindgen_ty_24 = 249;
pub const PDF_ENUM_NAME_I: _bindgen_ty_24 = 250;
pub const PDF_ENUM_NAME_IC: _bindgen_ty_24 = 251;
pub const PDF_ENUM_NAME_ICCBased: _bindgen_ty_24 = 252;
pub const PDF_ENUM_NAME_ID: _bindgen_ty_24 = 253;
pub const PDF_ENUM_NAME_IM: _bindgen_ty_24 = 254;
pub const PDF_ENUM_NAME_IRT: _bindgen_ty_24 = 255;
pub const PDF_ENUM_NAME_Identity: _bindgen_ty_24 = 256;
pub const PDF_ENUM_NAME_Identity_H: _bindgen_ty_24 = 257;
pub const PDF_ENUM_NAME_Identity_V: _bindgen_ty_24 = 258;
pub const PDF_ENUM_NAME_Image: _bindgen_ty_24 = 259;
pub const PDF_ENUM_NAME_ImageB: _bindgen_ty_24 = 260;
pub const PDF_ENUM_NAME_ImageC: _bindgen_ty_24 = 261;
pub const PDF_ENUM_NAME_ImageI: _bindgen_ty_24 = 262;
pub const PDF_ENUM_NAME_ImageMask: _bindgen_ty_24 = 263;
pub const PDF_ENUM_NAME_Include: _bindgen_ty_24 = 264;
pub const PDF_ENUM_NAME_Index: _bindgen_ty_24 = 265;
pub const PDF_ENUM_NAME_Indexed: _bindgen_ty_24 = 266;
pub const PDF_ENUM_NAME_Info: _bindgen_ty_24 = 267;
pub const PDF_ENUM_NAME_Ink: _bindgen_ty_24 = 268;
pub const PDF_ENUM_NAME_InkList: _bindgen_ty_24 = 269;
pub const PDF_ENUM_NAME_Intent: _bindgen_ty_24 = 270;
pub const PDF_ENUM_NAME_Interpolate: _bindgen_ty_24 = 271;
pub const PDF_ENUM_NAME_IsMap: _bindgen_ty_24 = 272;
pub const PDF_ENUM_NAME_ItalicAngle: _bindgen_ty_24 = 273;
pub const PDF_ENUM_NAME_JBIG2Decode: _bindgen_ty_24 = 274;
pub const PDF_ENUM_NAME_JBIG2Globals: _bindgen_ty_24 = 275;
pub const PDF_ENUM_NAME_JPXDecode: _bindgen_ty_24 = 276;
pub const PDF_ENUM_NAME_JS: _bindgen_ty_24 = 277;
pub const PDF_ENUM_NAME_JavaScript: _bindgen_ty_24 = 278;
pub const PDF_ENUM_NAME_K: _bindgen_ty_24 = 279;
pub const PDF_ENUM_NAME_Keywords: _bindgen_ty_24 = 280;
pub const PDF_ENUM_NAME_Kids: _bindgen_ty_24 = 281;
pub const PDF_ENUM_NAME_L: _bindgen_ty_24 = 282;
pub const PDF_ENUM_NAME_LBody: _bindgen_ty_24 = 283;
pub const PDF_ENUM_NAME_LC: _bindgen_ty_24 = 284;
pub const PDF_ENUM_NAME_LE: _bindgen_ty_24 = 285;
pub const PDF_ENUM_NAME_LI: _bindgen_ty_24 = 286;
pub const PDF_ENUM_NAME_LJ: _bindgen_ty_24 = 287;
pub const PDF_ENUM_NAME_LW: _bindgen_ty_24 = 288;
pub const PDF_ENUM_NAME_LZ: _bindgen_ty_24 = 289;
pub const PDF_ENUM_NAME_LZW: _bindgen_ty_24 = 290;
pub const PDF_ENUM_NAME_LZWDecode: _bindgen_ty_24 = 291;
pub const PDF_ENUM_NAME_Lab: _bindgen_ty_24 = 292;
pub const PDF_ENUM_NAME_Label: _bindgen_ty_24 = 293;
pub const PDF_ENUM_NAME_Lang: _bindgen_ty_24 = 294;
pub const PDF_ENUM_NAME_Last: _bindgen_ty_24 = 295;
pub const PDF_ENUM_NAME_LastChar: _bindgen_ty_24 = 296;
pub const PDF_ENUM_NAME_LastPage: _bindgen_ty_24 = 297;
pub const PDF_ENUM_NAME_Launch: _bindgen_ty_24 = 298;
pub const PDF_ENUM_NAME_Layer: _bindgen_ty_24 = 299;
pub const PDF_ENUM_NAME_Lbl: _bindgen_ty_24 = 300;
pub const PDF_ENUM_NAME_Length: _bindgen_ty_24 = 301;
pub const PDF_ENUM_NAME_Length1: _bindgen_ty_24 = 302;
pub const PDF_ENUM_NAME_Length2: _bindgen_ty_24 = 303;
pub const PDF_ENUM_NAME_Length3: _bindgen_ty_24 = 304;
pub const PDF_ENUM_NAME_Limits: _bindgen_ty_24 = 305;
pub const PDF_ENUM_NAME_Line: _bindgen_ty_24 = 306;
pub const PDF_ENUM_NAME_Linearized: _bindgen_ty_24 = 307;
pub const PDF_ENUM_NAME_Link: _bindgen_ty_24 = 308;
pub const PDF_ENUM_NAME_List: _bindgen_ty_24 = 309;
pub const PDF_ENUM_NAME_Location: _bindgen_ty_24 = 310;
pub const PDF_ENUM_NAME_Lock: _bindgen_ty_24 = 311;
pub const PDF_ENUM_NAME_Locked: _bindgen_ty_24 = 312;
pub const PDF_ENUM_NAME_Luminosity: _bindgen_ty_24 = 313;
pub const PDF_ENUM_NAME_M: _bindgen_ty_24 = 314;
pub const PDF_ENUM_NAME_MCID: _bindgen_ty_24 = 315;
pub const PDF_ENUM_NAME_MK: _bindgen_ty_24 = 316;
pub const PDF_ENUM_NAME_ML: _bindgen_ty_24 = 317;
pub const PDF_ENUM_NAME_MMType1: _bindgen_ty_24 = 318;
pub const PDF_ENUM_NAME_Mac: _bindgen_ty_24 = 319;
pub const PDF_ENUM_NAME_Mask: _bindgen_ty_24 = 320;
pub const PDF_ENUM_NAME_Matrix: _bindgen_ty_24 = 321;
pub const PDF_ENUM_NAME_Matte: _bindgen_ty_24 = 322;
pub const PDF_ENUM_NAME_MaxLen: _bindgen_ty_24 = 323;
pub const PDF_ENUM_NAME_MediaBox: _bindgen_ty_24 = 324;
pub const PDF_ENUM_NAME_Metadata: _bindgen_ty_24 = 325;
pub const PDF_ENUM_NAME_MissingWidth: _bindgen_ty_24 = 326;
pub const PDF_ENUM_NAME_ModDate: _bindgen_ty_24 = 327;
pub const PDF_ENUM_NAME_Movie: _bindgen_ty_24 = 328;
pub const PDF_ENUM_NAME_Msg: _bindgen_ty_24 = 329;
pub const PDF_ENUM_NAME_Multiply: _bindgen_ty_24 = 330;
pub const PDF_ENUM_NAME_N: _bindgen_ty_24 = 331;
pub const PDF_ENUM_NAME_Name: _bindgen_ty_24 = 332;
pub const PDF_ENUM_NAME_Named: _bindgen_ty_24 = 333;
pub const PDF_ENUM_NAME_Names: _bindgen_ty_24 = 334;
pub const PDF_ENUM_NAME_NewWindow: _bindgen_ty_24 = 335;
pub const PDF_ENUM_NAME_Next: _bindgen_ty_24 = 336;
pub const PDF_ENUM_NAME_NextPage: _bindgen_ty_24 = 337;
pub const PDF_ENUM_NAME_NonEFontNoWarn: _bindgen_ty_24 = 338;
pub const PDF_ENUM_NAME_NonStruct: _bindgen_ty_24 = 339;
pub const PDF_ENUM_NAME_None: _bindgen_ty_24 = 340;
pub const PDF_ENUM_NAME_Normal: _bindgen_ty_24 = 341;
pub const PDF_ENUM_NAME_NotApproved: _bindgen_ty_24 = 342;
pub const PDF_ENUM_NAME_NotForPublicRelease: _bindgen_ty_24 = 343;
pub const PDF_ENUM_NAME_Note: _bindgen_ty_24 = 344;
pub const PDF_ENUM_NAME_NumSections: _bindgen_ty_24 = 345;
pub const PDF_ENUM_NAME_Nums: _bindgen_ty_24 = 346;
pub const PDF_ENUM_NAME_O: _bindgen_ty_24 = 347;
pub const PDF_ENUM_NAME_OC: _bindgen_ty_24 = 348;
pub const PDF_ENUM_NAME_OCG: _bindgen_ty_24 = 349;
pub const PDF_ENUM_NAME_OCGs: _bindgen_ty_24 = 350;
pub const PDF_ENUM_NAME_OCMD: _bindgen_ty_24 = 351;
pub const PDF_ENUM_NAME_OCProperties: _bindgen_ty_24 = 352;
pub const PDF_ENUM_NAME_OE: _bindgen_ty_24 = 353;
pub const PDF_ENUM_NAME_OFF: _bindgen_ty_24 = 354;
pub const PDF_ENUM_NAME_ON: _bindgen_ty_24 = 355;
pub const PDF_ENUM_NAME_OP: _bindgen_ty_24 = 356;
pub const PDF_ENUM_NAME_OPM: _bindgen_ty_24 = 357;
pub const PDF_ENUM_NAME_OS: _bindgen_ty_24 = 358;
pub const PDF_ENUM_NAME_ObjStm: _bindgen_ty_24 = 359;
pub const PDF_ENUM_NAME_Of: _bindgen_ty_24 = 360;
pub const PDF_ENUM_NAME_Off: _bindgen_ty_24 = 361;
pub const PDF_ENUM_NAME_Open: _bindgen_ty_24 = 362;
pub const PDF_ENUM_NAME_OpenArrow: _bindgen_ty_24 = 363;
pub const PDF_ENUM_NAME_OpenType: _bindgen_ty_24 = 364;
pub const PDF_ENUM_NAME_Opt: _bindgen_ty_24 = 365;
pub const PDF_ENUM_NAME_Order: _bindgen_ty_24 = 366;
pub const PDF_ENUM_NAME_Ordering: _bindgen_ty_24 = 367;
pub const PDF_ENUM_NAME_Outlines: _bindgen_ty_24 = 368;
pub const PDF_ENUM_NAME_OutputCondition: _bindgen_ty_24 = 369;
pub const PDF_ENUM_NAME_OutputConditionIdentifier: _bindgen_ty_24 = 370;
pub const PDF_ENUM_NAME_OutputIntent: _bindgen_ty_24 = 371;
pub const PDF_ENUM_NAME_OutputIntents: _bindgen_ty_24 = 372;
pub const PDF_ENUM_NAME_P: _bindgen_ty_24 = 373;
pub const PDF_ENUM_NAME_PDF: _bindgen_ty_24 = 374;
pub const PDF_ENUM_NAME_PS: _bindgen_ty_24 = 375;
pub const PDF_ENUM_NAME_Page: _bindgen_ty_24 = 376;
pub const PDF_ENUM_NAME_PageLabels: _bindgen_ty_24 = 377;
pub const PDF_ENUM_NAME_PageMode: _bindgen_ty_24 = 378;
pub const PDF_ENUM_NAME_Pages: _bindgen_ty_24 = 379;
pub const PDF_ENUM_NAME_PaintType: _bindgen_ty_24 = 380;
pub const PDF_ENUM_NAME_Params: _bindgen_ty_24 = 381;
pub const PDF_ENUM_NAME_Parent: _bindgen_ty_24 = 382;
pub const PDF_ENUM_NAME_ParentTree: _bindgen_ty_24 = 383;
pub const PDF_ENUM_NAME_Part: _bindgen_ty_24 = 384;
pub const PDF_ENUM_NAME_Pattern: _bindgen_ty_24 = 385;
pub const PDF_ENUM_NAME_PatternType: _bindgen_ty_24 = 386;
pub const PDF_ENUM_NAME_Perms: _bindgen_ty_24 = 387;
pub const PDF_ENUM_NAME_PolyLine: _bindgen_ty_24 = 388;
pub const PDF_ENUM_NAME_Polygon: _bindgen_ty_24 = 389;
pub const PDF_ENUM_NAME_Popup: _bindgen_ty_24 = 390;
pub const PDF_ENUM_NAME_PreRelease: _bindgen_ty_24 = 391;
pub const PDF_ENUM_NAME_Predictor: _bindgen_ty_24 = 392;
pub const PDF_ENUM_NAME_Prev: _bindgen_ty_24 = 393;
pub const PDF_ENUM_NAME_PrevPage: _bindgen_ty_24 = 394;
pub const PDF_ENUM_NAME_Preview: _bindgen_ty_24 = 395;
pub const PDF_ENUM_NAME_Print: _bindgen_ty_24 = 396;
pub const PDF_ENUM_NAME_PrinterMark: _bindgen_ty_24 = 397;
pub const PDF_ENUM_NAME_Private: _bindgen_ty_24 = 398;
pub const PDF_ENUM_NAME_ProcSet: _bindgen_ty_24 = 399;
pub const PDF_ENUM_NAME_Producer: _bindgen_ty_24 = 400;
pub const PDF_ENUM_NAME_Prop_AuthTime: _bindgen_ty_24 = 401;
pub const PDF_ENUM_NAME_Prop_AuthType: _bindgen_ty_24 = 402;
pub const PDF_ENUM_NAME_Prop_Build: _bindgen_ty_24 = 403;
pub const PDF_ENUM_NAME_Properties: _bindgen_ty_24 = 404;
pub const PDF_ENUM_NAME_PubSec: _bindgen_ty_24 = 405;
pub const PDF_ENUM_NAME_Push: _bindgen_ty_24 = 406;
pub const PDF_ENUM_NAME_Q: _bindgen_ty_24 = 407;
pub const PDF_ENUM_NAME_QuadPoints: _bindgen_ty_24 = 408;
pub const PDF_ENUM_NAME_Quote: _bindgen_ty_24 = 409;
pub const PDF_ENUM_NAME_R: _bindgen_ty_24 = 410;
pub const PDF_ENUM_NAME_RB: _bindgen_ty_24 = 411;
pub const PDF_ENUM_NAME_RBGroups: _bindgen_ty_24 = 412;
pub const PDF_ENUM_NAME_RC: _bindgen_ty_24 = 413;
pub const PDF_ENUM_NAME_RClosedArrow: _bindgen_ty_24 = 414;
pub const PDF_ENUM_NAME_RD: _bindgen_ty_24 = 415;
pub const PDF_ENUM_NAME_REx: _bindgen_ty_24 = 416;
pub const PDF_ENUM_NAME_RGB: _bindgen_ty_24 = 417;
pub const PDF_ENUM_NAME_RI: _bindgen_ty_24 = 418;
pub const PDF_ENUM_NAME_RL: _bindgen_ty_24 = 419;
pub const PDF_ENUM_NAME_ROpenArrow: _bindgen_ty_24 = 420;
pub const PDF_ENUM_NAME_RP: _bindgen_ty_24 = 421;
pub const PDF_ENUM_NAME_RT: _bindgen_ty_24 = 422;
pub const PDF_ENUM_NAME_Range: _bindgen_ty_24 = 423;
pub const PDF_ENUM_NAME_Reason: _bindgen_ty_24 = 424;
pub const PDF_ENUM_NAME_Rect: _bindgen_ty_24 = 425;
pub const PDF_ENUM_NAME_Redact: _bindgen_ty_24 = 426;
pub const PDF_ENUM_NAME_Ref: _bindgen_ty_24 = 427;
pub const PDF_ENUM_NAME_Reference: _bindgen_ty_24 = 428;
pub const PDF_ENUM_NAME_Registry: _bindgen_ty_24 = 429;
pub const PDF_ENUM_NAME_ResetForm: _bindgen_ty_24 = 430;
pub const PDF_ENUM_NAME_Resources: _bindgen_ty_24 = 431;
pub const PDF_ENUM_NAME_RoleMap: _bindgen_ty_24 = 432;
pub const PDF_ENUM_NAME_Root: _bindgen_ty_24 = 433;
pub const PDF_ENUM_NAME_Rotate: _bindgen_ty_24 = 434;
pub const PDF_ENUM_NAME_Rows: _bindgen_ty_24 = 435;
pub const PDF_ENUM_NAME_Ruby: _bindgen_ty_24 = 436;
pub const PDF_ENUM_NAME_RunLengthDecode: _bindgen_ty_24 = 437;
pub const PDF_ENUM_NAME_S: _bindgen_ty_24 = 438;
pub const PDF_ENUM_NAME_SMask: _bindgen_ty_24 = 439;
pub const PDF_ENUM_NAME_SMaskInData: _bindgen_ty_24 = 440;
pub const PDF_ENUM_NAME_Schema: _bindgen_ty_24 = 441;
pub const PDF_ENUM_NAME_Screen: _bindgen_ty_24 = 442;
pub const PDF_ENUM_NAME_Sect: _bindgen_ty_24 = 443;
pub const PDF_ENUM_NAME_Separation: _bindgen_ty_24 = 444;
pub const PDF_ENUM_NAME_Shading: _bindgen_ty_24 = 445;
pub const PDF_ENUM_NAME_ShadingType: _bindgen_ty_24 = 446;
pub const PDF_ENUM_NAME_Si: _bindgen_ty_24 = 447;
pub const PDF_ENUM_NAME_Sig: _bindgen_ty_24 = 448;
pub const PDF_ENUM_NAME_SigFlags: _bindgen_ty_24 = 449;
pub const PDF_ENUM_NAME_SigQ: _bindgen_ty_24 = 450;
pub const PDF_ENUM_NAME_SigRef: _bindgen_ty_24 = 451;
pub const PDF_ENUM_NAME_Size: _bindgen_ty_24 = 452;
pub const PDF_ENUM_NAME_Slash: _bindgen_ty_24 = 453;
pub const PDF_ENUM_NAME_Sold: _bindgen_ty_24 = 454;
pub const PDF_ENUM_NAME_Sound: _bindgen_ty_24 = 455;
pub const PDF_ENUM_NAME_Span: _bindgen_ty_24 = 456;
pub const PDF_ENUM_NAME_Split: _bindgen_ty_24 = 457;
pub const PDF_ENUM_NAME_Square: _bindgen_ty_24 = 458;
pub const PDF_ENUM_NAME_Squiggly: _bindgen_ty_24 = 459;
pub const PDF_ENUM_NAME_St: _bindgen_ty_24 = 460;
pub const PDF_ENUM_NAME_Stamp: _bindgen_ty_24 = 461;
pub const PDF_ENUM_NAME_Standard: _bindgen_ty_24 = 462;
pub const PDF_ENUM_NAME_StdCF: _bindgen_ty_24 = 463;
pub const PDF_ENUM_NAME_StemV: _bindgen_ty_24 = 464;
pub const PDF_ENUM_NAME_StmF: _bindgen_ty_24 = 465;
pub const PDF_ENUM_NAME_StrF: _bindgen_ty_24 = 466;
pub const PDF_ENUM_NAME_StrikeOut: _bindgen_ty_24 = 467;
pub const PDF_ENUM_NAME_Strong: _bindgen_ty_24 = 468;
pub const PDF_ENUM_NAME_StructParent: _bindgen_ty_24 = 469;
pub const PDF_ENUM_NAME_StructParents: _bindgen_ty_24 = 470;
pub const PDF_ENUM_NAME_StructTreeRoot: _bindgen_ty_24 = 471;
pub const PDF_ENUM_NAME_Sub: _bindgen_ty_24 = 472;
pub const PDF_ENUM_NAME_SubFilter: _bindgen_ty_24 = 473;
pub const PDF_ENUM_NAME_Subject: _bindgen_ty_24 = 474;
pub const PDF_ENUM_NAME_Subtype: _bindgen_ty_24 = 475;
pub const PDF_ENUM_NAME_Subtype2: _bindgen_ty_24 = 476;
pub const PDF_ENUM_NAME_Supplement: _bindgen_ty_24 = 477;
pub const PDF_ENUM_NAME_Symb: _bindgen_ty_24 = 478;
pub const PDF_ENUM_NAME_T: _bindgen_ty_24 = 479;
pub const PDF_ENUM_NAME_TBody: _bindgen_ty_24 = 480;
pub const PDF_ENUM_NAME_TD: _bindgen_ty_24 = 481;
pub const PDF_ENUM_NAME_TFoot: _bindgen_ty_24 = 482;
pub const PDF_ENUM_NAME_TH: _bindgen_ty_24 = 483;
pub const PDF_ENUM_NAME_THead: _bindgen_ty_24 = 484;
pub const PDF_ENUM_NAME_TI: _bindgen_ty_24 = 485;
pub const PDF_ENUM_NAME_TOC: _bindgen_ty_24 = 486;
pub const PDF_ENUM_NAME_TOCI: _bindgen_ty_24 = 487;
pub const PDF_ENUM_NAME_TR: _bindgen_ty_24 = 488;
pub const PDF_ENUM_NAME_TR2: _bindgen_ty_24 = 489;
pub const PDF_ENUM_NAME_TU: _bindgen_ty_24 = 490;
pub const PDF_ENUM_NAME_Table: _bindgen_ty_24 = 491;
pub const PDF_ENUM_NAME_Text: _bindgen_ty_24 = 492;
pub const PDF_ENUM_NAME_TilingType: _bindgen_ty_24 = 493;
pub const PDF_ENUM_NAME_Times: _bindgen_ty_24 = 494;
pub const PDF_ENUM_NAME_Title: _bindgen_ty_24 = 495;
pub const PDF_ENUM_NAME_ToUnicode: _bindgen_ty_24 = 496;
pub const PDF_ENUM_NAME_TopSecret: _bindgen_ty_24 = 497;
pub const PDF_ENUM_NAME_Trans: _bindgen_ty_24 = 498;
pub const PDF_ENUM_NAME_TransformMethod: _bindgen_ty_24 = 499;
pub const PDF_ENUM_NAME_TransformParams: _bindgen_ty_24 = 500;
pub const PDF_ENUM_NAME_Transparency: _bindgen_ty_24 = 501;
pub const PDF_ENUM_NAME_TrapNet: _bindgen_ty_24 = 502;
pub const PDF_ENUM_NAME_TrimBox: _bindgen_ty_24 = 503;
pub const PDF_ENUM_NAME_TrueType: _bindgen_ty_24 = 504;
pub const PDF_ENUM_NAME_TrustedMode: _bindgen_ty_24 = 505;
pub const PDF_ENUM_NAME_Tx: _bindgen_ty_24 = 506;
pub const PDF_ENUM_NAME_Type: _bindgen_ty_24 = 507;
pub const PDF_ENUM_NAME_Type0: _bindgen_ty_24 = 508;
pub const PDF_ENUM_NAME_Type1: _bindgen_ty_24 = 509;
pub const PDF_ENUM_NAME_Type1C: _bindgen_ty_24 = 510;
pub const PDF_ENUM_NAME_Type3: _bindgen_ty_24 = 511;
pub const PDF_ENUM_NAME_U: _bindgen_ty_24 = 512;
pub const PDF_ENUM_NAME_UE: _bindgen_ty_24 = 513;
pub const PDF_ENUM_NAME_UF: _bindgen_ty_24 = 514;
pub const PDF_ENUM_NAME_URI: _bindgen_ty_24 = 515;
pub const PDF_ENUM_NAME_URL: _bindgen_ty_24 = 516;
pub const PDF_ENUM_NAME_Unchanged: _bindgen_ty_24 = 517;
pub const PDF_ENUM_NAME_Uncover: _bindgen_ty_24 = 518;
pub const PDF_ENUM_NAME_Underline: _bindgen_ty_24 = 519;
pub const PDF_ENUM_NAME_Unix: _bindgen_ty_24 = 520;
pub const PDF_ENUM_NAME_Usage: _bindgen_ty_24 = 521;
pub const PDF_ENUM_NAME_UseBlackPtComp: _bindgen_ty_24 = 522;
pub const PDF_ENUM_NAME_UseCMap: _bindgen_ty_24 = 523;
pub const PDF_ENUM_NAME_UseOutlines: _bindgen_ty_24 = 524;
pub const PDF_ENUM_NAME_UserUnit: _bindgen_ty_24 = 525;
pub const PDF_ENUM_NAME_V: _bindgen_ty_24 = 526;
pub const PDF_ENUM_NAME_V2: _bindgen_ty_24 = 527;
pub const PDF_ENUM_NAME_VE: _bindgen_ty_24 = 528;
pub const PDF_ENUM_NAME_Version: _bindgen_ty_24 = 529;
pub const PDF_ENUM_NAME_Vertices: _bindgen_ty_24 = 530;
pub const PDF_ENUM_NAME_VerticesPerRow: _bindgen_ty_24 = 531;
pub const PDF_ENUM_NAME_View: _bindgen_ty_24 = 532;
pub const PDF_ENUM_NAME_W: _bindgen_ty_24 = 533;
pub const PDF_ENUM_NAME_W2: _bindgen_ty_24 = 534;
pub const PDF_ENUM_NAME_WMode: _bindgen_ty_24 = 535;
pub const PDF_ENUM_NAME_WP: _bindgen_ty_24 = 536;
pub const PDF_ENUM_NAME_WT: _bindgen_ty_24 = 537;
pub const PDF_ENUM_NAME_Warichu: _bindgen_ty_24 = 538;
pub const PDF_ENUM_NAME_Watermark: _bindgen_ty_24 = 539;
pub const PDF_ENUM_NAME_WhitePoint: _bindgen_ty_24 = 540;
pub const PDF_ENUM_NAME_Widget: _bindgen_ty_24 = 541;
pub const PDF_ENUM_NAME_Width: _bindgen_ty_24 = 542;
pub const PDF_ENUM_NAME_Widths: _bindgen_ty_24 = 543;
pub const PDF_ENUM_NAME_WinAnsiEncoding: _bindgen_ty_24 = 544;
pub const PDF_ENUM_NAME_Wipe: _bindgen_ty_24 = 545;
pub const PDF_ENUM_NAME_XFA: _bindgen_ty_24 = 546;
pub const PDF_ENUM_NAME_XHeight: _bindgen_ty_24 = 547;
pub const PDF_ENUM_NAME_XML: _bindgen_ty_24 = 548;
pub const PDF_ENUM_NAME_XObject: _bindgen_ty_24 = 549;
pub const PDF_ENUM_NAME_XRef: _bindgen_ty_24 = 550;
pub const PDF_ENUM_NAME_XRefStm: _bindgen_ty_24 = 551;
pub const PDF_ENUM_NAME_XStep: _bindgen_ty_24 = 552;
pub const PDF_ENUM_NAME_XYZ: _bindgen_ty_24 = 553;
pub const PDF_ENUM_NAME_YStep: _bindgen_ty_24 = 554;
pub const PDF_ENUM_NAME_Yes: _bindgen_ty_24 = 555;
pub const PDF_ENUM_NAME_ZaDb: _bindgen_ty_24 = 556;
pub const PDF_ENUM_NAME_a: _bindgen_ty_24 = 557;
pub const PDF_ENUM_NAME_adbe_pkcs7_detached: _bindgen_ty_24 = 558;
pub const PDF_ENUM_NAME_ca: _bindgen_ty_24 = 559;
pub const PDF_ENUM_NAME_n0: _bindgen_ty_24 = 560;
pub const PDF_ENUM_NAME_n1: _bindgen_ty_24 = 561;
pub const PDF_ENUM_NAME_n2: _bindgen_ty_24 = 562;
pub const PDF_ENUM_NAME_op: _bindgen_ty_24 = 563;
pub const PDF_ENUM_NAME_r: _bindgen_ty_24 = 564;
pub const PDF_ENUM_LIMIT: _bindgen_ty_24 = 565;
pub type _bindgen_ty_24 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_set_str_len(ctx: *mut fz_context, obj: *mut pdf_obj, newlen: usize);
}
extern "C" {
pub fn pdf_enable_journal(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_begin_operation(
ctx: *mut fz_context,
doc: *mut pdf_document,
operation: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_begin_implicit_operation(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_end_operation(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_undoredo_state(
ctx: *mut fz_context,
doc: *mut pdf_document,
steps: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_undoredo_step(
ctx: *mut fz_context,
doc: *mut pdf_document,
step: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_can_undo(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_can_redo(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_undo(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_redo(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_discard_journal(ctx: *mut fz_context, journal: *mut pdf_journal);
}
extern "C" {
pub fn pdf_drop_journal(ctx: *mut fz_context, journal: *mut pdf_journal);
}
extern "C" {
pub fn pdf_serialise_journal(ctx: *mut fz_context, doc: *mut pdf_document, out: *mut fz_output);
}
extern "C" {
pub fn pdf_deserialise_journal(
ctx: *mut fz_context,
doc: *mut pdf_document,
stm: *mut fz_stream,
);
}
extern "C" {
pub fn pdf_add_journal_fragment(
ctx: *mut fz_context,
doc: *mut pdf_document,
parent: ::std::os::raw::c_int,
copy: *mut pdf_obj,
copy_stream: *mut fz_buffer,
newobj: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_format_date(
ctx: *mut fz_context,
time: i64,
s: *mut ::std::os::raw::c_char,
n: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_parse_date(ctx: *mut fz_context, s: *const ::std::os::raw::c_char) -> i64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_ocg_descriptor {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_annot {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_js {
_unused: [u8; 0],
}
pub const PDF_LEXBUF_SMALL: _bindgen_ty_25 = 256;
pub const PDF_LEXBUF_LARGE: _bindgen_ty_25 = 65536;
pub type _bindgen_ty_25 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_lexbuf {
pub size: usize,
pub base_size: usize,
pub len: usize,
pub i: i64,
pub f: f32,
pub scratch: *mut ::std::os::raw::c_char,
pub buffer: [::std::os::raw::c_char; 256usize],
}
#[test]
fn bindgen_test_layout_pdf_lexbuf() {
const UNINIT: ::std::mem::MaybeUninit<pdf_lexbuf> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_lexbuf>(),
304usize,
concat!("Size of: ", stringify!(pdf_lexbuf))
);
assert_eq!(
::std::mem::align_of::<pdf_lexbuf>(),
8usize,
concat!("Alignment of ", stringify!(pdf_lexbuf))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).base_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(base_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).i) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(i)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(f)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scratch) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(scratch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(buffer)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_lexbuf_large {
pub base: pdf_lexbuf,
pub buffer: [::std::os::raw::c_char; 65280usize],
}
#[test]
fn bindgen_test_layout_pdf_lexbuf_large() {
const UNINIT: ::std::mem::MaybeUninit<pdf_lexbuf_large> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_lexbuf_large>(),
65584usize,
concat!("Size of: ", stringify!(pdf_lexbuf_large))
);
assert_eq!(
::std::mem::align_of::<pdf_lexbuf_large>(),
8usize,
concat!("Alignment of ", stringify!(pdf_lexbuf_large))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf_large),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf_large),
"::",
stringify!(buffer)
)
);
}
pub type pdf_doc_event_cb = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut pdf_document,
evt: *mut pdf_doc_event,
data: *mut ::std::os::raw::c_void,
),
>;
pub type pdf_free_doc_event_data_cb = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, data: *mut ::std::os::raw::c_void),
>;
pub type pdf_js_console_drop_cb = ::std::option::Option<
unsafe extern "C" fn(console: *mut pdf_js_console, user: *mut ::std::os::raw::c_void),
>;
pub type pdf_js_console_show_cb =
::std::option::Option<unsafe extern "C" fn(user: *mut ::std::os::raw::c_void)>;
pub type pdf_js_console_hide_cb =
::std::option::Option<unsafe extern "C" fn(user: *mut ::std::os::raw::c_void)>;
pub type pdf_js_console_clear_cb =
::std::option::Option<unsafe extern "C" fn(user: *mut ::std::os::raw::c_void)>;
pub type pdf_js_console_write_cb = ::std::option::Option<
unsafe extern "C" fn(user: *mut ::std::os::raw::c_void, msg: *const ::std::os::raw::c_char),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_js_console {
pub drop: pdf_js_console_drop_cb,
pub show: pdf_js_console_show_cb,
pub hide: pdf_js_console_hide_cb,
pub clear: pdf_js_console_clear_cb,
pub write: pdf_js_console_write_cb,
}
#[test]
fn bindgen_test_layout_pdf_js_console() {
const UNINIT: ::std::mem::MaybeUninit<pdf_js_console> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_js_console>(),
40usize,
concat!("Size of: ", stringify!(pdf_js_console))
);
assert_eq!(
::std::mem::align_of::<pdf_js_console>(),
8usize,
concat!("Alignment of ", stringify!(pdf_js_console))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_js_console),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).show) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_js_console),
"::",
stringify!(show)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hide) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_js_console),
"::",
stringify!(hide)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).clear) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_js_console),
"::",
stringify!(clear)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).write) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_js_console),
"::",
stringify!(write)
)
);
}
extern "C" {
pub fn pdf_js_get_console(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_js_console;
}
extern "C" {
pub fn pdf_js_set_console(
ctx: *mut fz_context,
doc: *mut pdf_document,
console: *mut pdf_js_console,
user: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn pdf_open_document(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_open_document_with_stream(
ctx: *mut fz_context,
file: *mut fz_stream,
) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_drop_document(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_keep_document(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_specifics(ctx: *mut fz_context, doc: *mut fz_document) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_document_from_fz_document(
ctx: *mut fz_context,
ptr: *mut fz_document,
) -> *mut pdf_document;
}
extern "C" {
pub fn pdf_page_from_fz_page(ctx: *mut fz_context, ptr: *mut fz_page) -> *mut pdf_page;
}
extern "C" {
pub fn pdf_needs_password(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_authenticate_password(
ctx: *mut fz_context,
doc: *mut pdf_document,
pw: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_has_permission(
ctx: *mut fz_context,
doc: *mut pdf_document,
p: fz_permission,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_lookup_metadata(
ctx: *mut fz_context,
doc: *mut pdf_document,
key: *const ::std::os::raw::c_char,
ptr: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_load_outline(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut fz_outline;
}
extern "C" {
pub fn pdf_new_outline_iterator(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> *mut fz_outline_iterator;
}
extern "C" {
pub fn pdf_invalidate_xfa(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_count_layer_configs(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_count_layers(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_layer_name(
ctx: *mut fz_context,
doc: *mut pdf_document,
layer: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_layer_is_enabled(
ctx: *mut fz_context,
doc: *mut pdf_document,
layer: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_enable_layer(
ctx: *mut fz_context,
doc: *mut pdf_document,
layer: ::std::os::raw::c_int,
enabled: ::std::os::raw::c_int,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_layer_config {
pub name: *const ::std::os::raw::c_char,
pub creator: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_pdf_layer_config() {
const UNINIT: ::std::mem::MaybeUninit<pdf_layer_config> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_layer_config>(),
16usize,
concat!("Size of: ", stringify!(pdf_layer_config))
);
assert_eq!(
::std::mem::align_of::<pdf_layer_config>(),
8usize,
concat!("Alignment of ", stringify!(pdf_layer_config))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).creator) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config),
"::",
stringify!(creator)
)
);
}
extern "C" {
pub fn pdf_layer_config_info(
ctx: *mut fz_context,
doc: *mut pdf_document,
config_num: ::std::os::raw::c_int,
info: *mut pdf_layer_config,
);
}
extern "C" {
pub fn pdf_select_layer_config(
ctx: *mut fz_context,
doc: *mut pdf_document,
config_num: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_count_layer_config_ui(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_select_layer_config_ui(
ctx: *mut fz_context,
doc: *mut pdf_document,
ui: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_deselect_layer_config_ui(
ctx: *mut fz_context,
doc: *mut pdf_document,
ui: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_toggle_layer_config_ui(
ctx: *mut fz_context,
doc: *mut pdf_document,
ui: ::std::os::raw::c_int,
);
}
pub const pdf_layer_config_ui_type_PDF_LAYER_UI_LABEL: pdf_layer_config_ui_type = 0;
pub const pdf_layer_config_ui_type_PDF_LAYER_UI_CHECKBOX: pdf_layer_config_ui_type = 1;
pub const pdf_layer_config_ui_type_PDF_LAYER_UI_RADIOBOX: pdf_layer_config_ui_type = 2;
pub type pdf_layer_config_ui_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_layer_config_ui {
pub text: *const ::std::os::raw::c_char,
pub depth: ::std::os::raw::c_int,
pub type_: pdf_layer_config_ui_type,
pub selected: ::std::os::raw::c_int,
pub locked: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_layer_config_ui() {
const UNINIT: ::std::mem::MaybeUninit<pdf_layer_config_ui> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_layer_config_ui>(),
24usize,
concat!("Size of: ", stringify!(pdf_layer_config_ui))
);
assert_eq!(
::std::mem::align_of::<pdf_layer_config_ui>(),
8usize,
concat!("Alignment of ", stringify!(pdf_layer_config_ui))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(depth)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).selected) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(selected)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).locked) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(locked)
)
);
}
extern "C" {
pub fn pdf_layer_config_ui_info(
ctx: *mut fz_context,
doc: *mut pdf_document,
ui: ::std::os::raw::c_int,
info: *mut pdf_layer_config_ui,
);
}
extern "C" {
pub fn pdf_set_layer_config_as_default(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_has_unsaved_changes(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_was_repaired(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_unsaved_sig {
pub field: *mut pdf_obj,
pub byte_range_start: usize,
pub byte_range_end: usize,
pub contents_start: usize,
pub contents_end: usize,
pub signer: *mut pdf_pkcs7_signer,
pub next: *mut pdf_unsaved_sig,
}
#[test]
fn bindgen_test_layout_pdf_unsaved_sig() {
const UNINIT: ::std::mem::MaybeUninit<pdf_unsaved_sig> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_unsaved_sig>(),
56usize,
concat!("Size of: ", stringify!(pdf_unsaved_sig))
);
assert_eq!(
::std::mem::align_of::<pdf_unsaved_sig>(),
8usize,
concat!("Alignment of ", stringify!(pdf_unsaved_sig))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(field)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).byte_range_start) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(byte_range_start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).byte_range_end) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(byte_range_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).contents_start) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(contents_start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).contents_end) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(contents_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).signer) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(signer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_rev_page_map {
pub page: ::std::os::raw::c_int,
pub object: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_rev_page_map() {
const UNINIT: ::std::mem::MaybeUninit<pdf_rev_page_map> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_rev_page_map>(),
8usize,
concat!("Size of: ", stringify!(pdf_rev_page_map))
);
assert_eq!(
::std::mem::align_of::<pdf_rev_page_map>(),
4usize,
concat!("Alignment of ", stringify!(pdf_rev_page_map))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_rev_page_map),
"::",
stringify!(page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).object) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_rev_page_map),
"::",
stringify!(object)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_hint_page {
pub number: ::std::os::raw::c_int,
pub offset: i64,
pub index: i64,
}
#[test]
fn bindgen_test_layout_pdf_hint_page() {
const UNINIT: ::std::mem::MaybeUninit<pdf_hint_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_hint_page>(),
24usize,
concat!("Size of: ", stringify!(pdf_hint_page))
);
assert_eq!(
::std::mem::align_of::<pdf_hint_page>(),
8usize,
concat!("Alignment of ", stringify!(pdf_hint_page))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).number) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_page),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_page),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_page),
"::",
stringify!(index)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_hint_shared {
pub number: ::std::os::raw::c_int,
pub offset: i64,
}
#[test]
fn bindgen_test_layout_pdf_hint_shared() {
const UNINIT: ::std::mem::MaybeUninit<pdf_hint_shared> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_hint_shared>(),
16usize,
concat!("Size of: ", stringify!(pdf_hint_shared))
);
assert_eq!(
::std::mem::align_of::<pdf_hint_shared>(),
8usize,
concat!("Alignment of ", stringify!(pdf_hint_shared))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).number) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_shared),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_shared),
"::",
stringify!(offset)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_document {
pub super_: fz_document,
pub file: *mut fz_stream,
pub version: ::std::os::raw::c_int,
pub startxref: i64,
pub file_size: i64,
pub crypt: *mut pdf_crypt,
pub ocg: *mut pdf_ocg_descriptor,
pub oi: *mut fz_colorspace,
pub max_xref_len: ::std::os::raw::c_int,
pub num_xref_sections: ::std::os::raw::c_int,
pub saved_num_xref_sections: ::std::os::raw::c_int,
pub num_incremental_sections: ::std::os::raw::c_int,
pub xref_base: ::std::os::raw::c_int,
pub disallow_new_increments: ::std::os::raw::c_int,
pub local_xref: *mut pdf_xref,
pub local_xref_nesting: ::std::os::raw::c_int,
pub xref_sections: *mut pdf_xref,
pub saved_xref_sections: *mut pdf_xref,
pub xref_index: *mut ::std::os::raw::c_int,
pub save_in_progress: ::std::os::raw::c_int,
pub last_xref_was_old_style: ::std::os::raw::c_int,
pub has_linearization_object: ::std::os::raw::c_int,
pub map_page_count: ::std::os::raw::c_int,
pub rev_page_map: *mut pdf_rev_page_map,
pub fwd_page_map: *mut *mut pdf_obj,
pub page_tree_broken: ::std::os::raw::c_int,
pub repair_attempted: ::std::os::raw::c_int,
pub repair_in_progress: ::std::os::raw::c_int,
pub non_structural_change: ::std::os::raw::c_int,
pub file_reading_linearly: ::std::os::raw::c_int,
pub file_length: i64,
pub linear_page_count: ::std::os::raw::c_int,
pub linear_obj: *mut pdf_obj,
pub linear_page_refs: *mut *mut pdf_obj,
pub linear_page1_obj_num: ::std::os::raw::c_int,
pub linear_pos: i64,
pub linear_page_num: ::std::os::raw::c_int,
pub hint_object_offset: ::std::os::raw::c_int,
pub hint_object_length: ::std::os::raw::c_int,
pub hints_loaded: ::std::os::raw::c_int,
pub hint_page: *mut pdf_hint_page,
pub hint_shared_ref: *mut ::std::os::raw::c_int,
pub hint_shared: *mut pdf_hint_shared,
pub hint_obj_offsets_max: ::std::os::raw::c_int,
pub hint_obj_offsets: *mut i64,
pub resources_localised: ::std::os::raw::c_int,
pub lexbuf: pdf_lexbuf_large,
pub js: *mut pdf_js,
pub recalculate: ::std::os::raw::c_int,
pub redacted: ::std::os::raw::c_int,
pub resynth_required: ::std::os::raw::c_int,
pub event_cb: pdf_doc_event_cb,
pub free_event_data_cb: pdf_free_doc_event_data_cb,
pub event_cb_data: *mut ::std::os::raw::c_void,
pub num_type3_fonts: ::std::os::raw::c_int,
pub max_type3_fonts: ::std::os::raw::c_int,
pub type3_fonts: *mut *mut fz_font,
pub resources: pdf_document__bindgen_ty_1,
pub orphans_max: ::std::os::raw::c_int,
pub orphans_count: ::std::os::raw::c_int,
pub orphans: *mut *mut pdf_obj,
pub xfa: *mut fz_xml_doc,
pub journal: *mut pdf_journal,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_document__bindgen_ty_1 {
pub fonts: *mut fz_hash_table,
}
#[test]
fn bindgen_test_layout_pdf_document__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<pdf_document__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_document__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(pdf_document__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<pdf_document__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(pdf_document__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fonts) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_document__bindgen_ty_1),
"::",
stringify!(fonts)
)
);
}
#[test]
fn bindgen_test_layout_pdf_document() {
const UNINIT: ::std::mem::MaybeUninit<pdf_document> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_document>(),
66152usize,
concat!("Size of: ", stringify!(pdf_document))
);
assert_eq!(
::std::mem::align_of::<pdf_document>(),
8usize,
concat!("Alignment of ", stringify!(pdf_document))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).super_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(super_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).startxref) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(startxref)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_size) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).crypt) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(crypt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ocg) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(ocg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).oi) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(oi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_xref_len) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(max_xref_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_xref_sections) as usize - ptr as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_xref_sections)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).saved_num_xref_sections) as usize - ptr as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(saved_num_xref_sections)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_incremental_sections) as usize - ptr as usize },
244usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_incremental_sections)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xref_base) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).disallow_new_increments) as usize - ptr as usize },
252usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(disallow_new_increments)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_xref) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(local_xref)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_xref_nesting) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(local_xref_nesting)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xref_sections) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_sections)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).saved_xref_sections) as usize - ptr as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(saved_xref_sections)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xref_index) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).save_in_progress) as usize - ptr as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(save_in_progress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).last_xref_was_old_style) as usize - ptr as usize },
300usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(last_xref_was_old_style)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_linearization_object) as usize - ptr as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(has_linearization_object)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_page_count) as usize - ptr as usize },
308usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(map_page_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rev_page_map) as usize - ptr as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(rev_page_map)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fwd_page_map) as usize - ptr as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(fwd_page_map)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_tree_broken) as usize - ptr as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(page_tree_broken)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).repair_attempted) as usize - ptr as usize },
332usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(repair_attempted)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).repair_in_progress) as usize - ptr as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(repair_in_progress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).non_structural_change) as usize - ptr as usize },
340usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(non_structural_change)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_reading_linearly) as usize - ptr as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_reading_linearly)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_length) as usize - ptr as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_length)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_page_count) as usize - ptr as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_obj) as usize - ptr as usize },
368usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_page_refs) as usize - ptr as usize },
376usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_page1_obj_num) as usize - ptr as usize },
384usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page1_obj_num)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_pos) as usize - ptr as usize },
392usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_pos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).linear_page_num) as usize - ptr as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_num)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_object_offset) as usize - ptr as usize },
404usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_object_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_object_length) as usize - ptr as usize },
408usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_object_length)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hints_loaded) as usize - ptr as usize },
412usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hints_loaded)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_page) as usize - ptr as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_page)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_shared_ref) as usize - ptr as usize },
424usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_shared_ref)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_shared) as usize - ptr as usize },
432usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_shared)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_obj_offsets_max) as usize - ptr as usize },
440usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_obj_offsets_max)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hint_obj_offsets) as usize - ptr as usize },
448usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_obj_offsets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resources_localised) as usize - ptr as usize },
456usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(resources_localised)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lexbuf) as usize - ptr as usize },
464usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(lexbuf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).js) as usize - ptr as usize },
66048usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(js)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).recalculate) as usize - ptr as usize },
66056usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(recalculate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).redacted) as usize - ptr as usize },
66060usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(redacted)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resynth_required) as usize - ptr as usize },
66064usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(resynth_required)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).event_cb) as usize - ptr as usize },
66072usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(event_cb)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).free_event_data_cb) as usize - ptr as usize },
66080usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(free_event_data_cb)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).event_cb_data) as usize - ptr as usize },
66088usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(event_cb_data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_type3_fonts) as usize - ptr as usize },
66096usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_type3_fonts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_type3_fonts) as usize - ptr as usize },
66100usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(max_type3_fonts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type3_fonts) as usize - ptr as usize },
66104usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(type3_fonts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resources) as usize - ptr as usize },
66112usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(resources)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orphans_max) as usize - ptr as usize },
66120usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans_max)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orphans_count) as usize - ptr as usize },
66124usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).orphans) as usize - ptr as usize },
66128usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xfa) as usize - ptr as usize },
66136usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xfa)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).journal) as usize - ptr as usize },
66144usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(journal)
)
);
}
extern "C" {
pub fn pdf_create_document(ctx: *mut fz_context) -> *mut pdf_document;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_graft_map {
_unused: [u8; 0],
}
extern "C" {
pub fn pdf_graft_object(
ctx: *mut fz_context,
dst: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_graft_map(ctx: *mut fz_context, dst: *mut pdf_document) -> *mut pdf_graft_map;
}
extern "C" {
pub fn pdf_keep_graft_map(ctx: *mut fz_context, map: *mut pdf_graft_map) -> *mut pdf_graft_map;
}
extern "C" {
pub fn pdf_drop_graft_map(ctx: *mut fz_context, map: *mut pdf_graft_map);
}
extern "C" {
pub fn pdf_graft_mapped_object(
ctx: *mut fz_context,
map: *mut pdf_graft_map,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_graft_page(
ctx: *mut fz_context,
dst: *mut pdf_document,
page_to: ::std::os::raw::c_int,
src: *mut pdf_document,
page_from: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_graft_mapped_page(
ctx: *mut fz_context,
map: *mut pdf_graft_map,
page_to: ::std::os::raw::c_int,
src: *mut pdf_document,
page_from: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_page_write(
ctx: *mut fz_context,
doc: *mut pdf_document,
mediabox: fz_rect,
presources: *mut *mut pdf_obj,
pcontents: *mut *mut fz_buffer,
) -> *mut fz_device;
}
extern "C" {
pub fn pdf_new_pdf_device(
ctx: *mut fz_context,
doc: *mut pdf_document,
topctm: fz_matrix,
resources: *mut pdf_obj,
contents: *mut fz_buffer,
) -> *mut fz_device;
}
extern "C" {
pub fn pdf_add_page(
ctx: *mut fz_context,
doc: *mut pdf_document,
mediabox: fz_rect,
rotate: ::std::os::raw::c_int,
resources: *mut pdf_obj,
contents: *mut fz_buffer,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_insert_page(
ctx: *mut fz_context,
doc: *mut pdf_document,
at: ::std::os::raw::c_int,
page: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_delete_page(
ctx: *mut fz_context,
doc: *mut pdf_document,
number: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_delete_page_range(
ctx: *mut fz_context,
doc: *mut pdf_document,
start: ::std::os::raw::c_int,
end: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_page_label(
ctx: *mut fz_context,
doc: *mut pdf_document,
page: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_page_label_imp(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
page: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: ::std::os::raw::c_int,
);
}
pub const pdf_page_label_style_PDF_PAGE_LABEL_NONE: pdf_page_label_style = 0;
pub const pdf_page_label_style_PDF_PAGE_LABEL_DECIMAL: pdf_page_label_style = 68;
pub const pdf_page_label_style_PDF_PAGE_LABEL_ROMAN_UC: pdf_page_label_style = 82;
pub const pdf_page_label_style_PDF_PAGE_LABEL_ROMAN_LC: pdf_page_label_style = 114;
pub const pdf_page_label_style_PDF_PAGE_LABEL_ALPHA_UC: pdf_page_label_style = 65;
pub const pdf_page_label_style_PDF_PAGE_LABEL_ALPHA_LC: pdf_page_label_style = 97;
pub type pdf_page_label_style = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_set_page_labels(
ctx: *mut fz_context,
doc: *mut pdf_document,
index: ::std::os::raw::c_int,
style: pdf_page_label_style,
prefix: *const ::std::os::raw::c_char,
start: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_delete_page_labels(
ctx: *mut fz_context,
doc: *mut pdf_document,
index: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_document_language(ctx: *mut fz_context, doc: *mut pdf_document) -> fz_text_language;
}
extern "C" {
pub fn pdf_set_document_language(
ctx: *mut fz_context,
doc: *mut pdf_document,
lang: fz_text_language,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_write_options {
pub do_incremental: ::std::os::raw::c_int,
pub do_pretty: ::std::os::raw::c_int,
pub do_ascii: ::std::os::raw::c_int,
pub do_compress: ::std::os::raw::c_int,
pub do_compress_images: ::std::os::raw::c_int,
pub do_compress_fonts: ::std::os::raw::c_int,
pub do_decompress: ::std::os::raw::c_int,
pub do_garbage: ::std::os::raw::c_int,
pub do_linear: ::std::os::raw::c_int,
pub do_clean: ::std::os::raw::c_int,
pub do_sanitize: ::std::os::raw::c_int,
pub do_appearance: ::std::os::raw::c_int,
pub do_encrypt: ::std::os::raw::c_int,
pub dont_regenerate_id: ::std::os::raw::c_int,
pub permissions: ::std::os::raw::c_int,
pub opwd_utf8: [::std::os::raw::c_char; 128usize],
pub upwd_utf8: [::std::os::raw::c_char; 128usize],
pub do_snapshot: ::std::os::raw::c_int,
pub do_preserve_metadata: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_write_options() {
const UNINIT: ::std::mem::MaybeUninit<pdf_write_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_write_options>(),
324usize,
concat!("Size of: ", stringify!(pdf_write_options))
);
assert_eq!(
::std::mem::align_of::<pdf_write_options>(),
4usize,
concat!("Alignment of ", stringify!(pdf_write_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_incremental) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_incremental)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_pretty) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_pretty)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_ascii) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_ascii)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_compress) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_compress_images) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress_images)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_compress_fonts) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress_fonts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_decompress) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_decompress)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_garbage) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_garbage)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_linear) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_linear)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_clean) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_clean)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_sanitize) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_sanitize)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_appearance) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_appearance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_encrypt) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_encrypt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dont_regenerate_id) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(dont_regenerate_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).permissions) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(permissions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opwd_utf8) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(opwd_utf8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).upwd_utf8) as usize - ptr as usize },
188usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(upwd_utf8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_snapshot) as usize - ptr as usize },
316usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_snapshot)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).do_preserve_metadata) as usize - ptr as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_preserve_metadata)
)
);
}
extern "C" {
pub static pdf_default_write_options: pdf_write_options;
}
extern "C" {
pub fn pdf_parse_write_options(
ctx: *mut fz_context,
opts: *mut pdf_write_options,
args: *const ::std::os::raw::c_char,
) -> *mut pdf_write_options;
}
extern "C" {
pub fn pdf_has_unsaved_sigs(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_write_document(
ctx: *mut fz_context,
doc: *mut pdf_document,
out: *mut fz_output,
opts: *const pdf_write_options,
);
}
extern "C" {
pub fn pdf_save_document(
ctx: *mut fz_context,
doc: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
opts: *const pdf_write_options,
);
}
extern "C" {
pub fn pdf_save_snapshot(
ctx: *mut fz_context,
doc: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_write_snapshot(ctx: *mut fz_context, doc: *mut pdf_document, out: *mut fz_output);
}
extern "C" {
pub fn pdf_format_write_options(
ctx: *mut fz_context,
buffer: *mut ::std::os::raw::c_char,
buffer_len: usize,
opts: *const pdf_write_options,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_can_be_saved_incrementally(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_write_journal(ctx: *mut fz_context, doc: *mut pdf_document, out: *mut fz_output);
}
extern "C" {
pub fn pdf_save_journal(
ctx: *mut fz_context,
doc: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_load_journal(
ctx: *mut fz_context,
doc: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_read_journal(ctx: *mut fz_context, doc: *mut pdf_document, stm: *mut fz_stream);
}
pub const pdf_token_PDF_TOK_ERROR: pdf_token = 0;
pub const pdf_token_PDF_TOK_EOF: pdf_token = 1;
pub const pdf_token_PDF_TOK_OPEN_ARRAY: pdf_token = 2;
pub const pdf_token_PDF_TOK_CLOSE_ARRAY: pdf_token = 3;
pub const pdf_token_PDF_TOK_OPEN_DICT: pdf_token = 4;
pub const pdf_token_PDF_TOK_CLOSE_DICT: pdf_token = 5;
pub const pdf_token_PDF_TOK_OPEN_BRACE: pdf_token = 6;
pub const pdf_token_PDF_TOK_CLOSE_BRACE: pdf_token = 7;
pub const pdf_token_PDF_TOK_NAME: pdf_token = 8;
pub const pdf_token_PDF_TOK_INT: pdf_token = 9;
pub const pdf_token_PDF_TOK_REAL: pdf_token = 10;
pub const pdf_token_PDF_TOK_STRING: pdf_token = 11;
pub const pdf_token_PDF_TOK_KEYWORD: pdf_token = 12;
pub const pdf_token_PDF_TOK_R: pdf_token = 13;
pub const pdf_token_PDF_TOK_TRUE: pdf_token = 14;
pub const pdf_token_PDF_TOK_FALSE: pdf_token = 15;
pub const pdf_token_PDF_TOK_NULL: pdf_token = 16;
pub const pdf_token_PDF_TOK_OBJ: pdf_token = 17;
pub const pdf_token_PDF_TOK_ENDOBJ: pdf_token = 18;
pub const pdf_token_PDF_TOK_STREAM: pdf_token = 19;
pub const pdf_token_PDF_TOK_ENDSTREAM: pdf_token = 20;
pub const pdf_token_PDF_TOK_XREF: pdf_token = 21;
pub const pdf_token_PDF_TOK_TRAILER: pdf_token = 22;
pub const pdf_token_PDF_TOK_STARTXREF: pdf_token = 23;
pub const pdf_token_PDF_TOK_NEWOBJ: pdf_token = 24;
pub const pdf_token_PDF_NUM_TOKENS: pdf_token = 25;
pub type pdf_token = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_lexbuf_init(
ctx: *mut fz_context,
lexbuf: *mut pdf_lexbuf,
size: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_lexbuf_fin(ctx: *mut fz_context, lexbuf: *mut pdf_lexbuf);
}
extern "C" {
pub fn pdf_lexbuf_grow(ctx: *mut fz_context, lexbuf: *mut pdf_lexbuf) -> isize;
}
extern "C" {
pub fn pdf_lex(ctx: *mut fz_context, f: *mut fz_stream, lexbuf: *mut pdf_lexbuf) -> pdf_token;
}
extern "C" {
pub fn pdf_lex_no_string(
ctx: *mut fz_context,
f: *mut fz_stream,
lexbuf: *mut pdf_lexbuf,
) -> pdf_token;
}
extern "C" {
pub fn pdf_parse_array(
ctx: *mut fz_context,
doc: *mut pdf_document,
f: *mut fz_stream,
buf: *mut pdf_lexbuf,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_parse_dict(
ctx: *mut fz_context,
doc: *mut pdf_document,
f: *mut fz_stream,
buf: *mut pdf_lexbuf,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_parse_stm_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
f: *mut fz_stream,
buf: *mut pdf_lexbuf,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_parse_ind_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
f: *mut fz_stream,
num: *mut ::std::os::raw::c_int,
gen: *mut ::std::os::raw::c_int,
stm_ofs: *mut i64,
try_repair: *mut ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_parse_journal_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
stm: *mut fz_stream,
onum: *mut ::std::os::raw::c_int,
ostm: *mut *mut fz_buffer,
newobj: *mut ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_append_token(
ctx: *mut fz_context,
buf: *mut fz_buffer,
tok: ::std::os::raw::c_int,
lex: *mut pdf_lexbuf,
);
}
extern "C" {
pub fn pdf_create_object(ctx: *mut fz_context, doc: *mut pdf_document)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_delete_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_update_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
obj: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_update_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
ref_: *mut pdf_obj,
buf: *mut fz_buffer,
compressed: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_is_local_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_add_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_object_drop(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
buf: *mut fz_buffer,
obj: *mut pdf_obj,
compressed: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_new_dict(
ctx: *mut fz_context,
doc: *mut pdf_document,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_new_array(
ctx: *mut fz_context,
doc: *mut pdf_document,
initial: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xref_entry {
pub type_: ::std::os::raw::c_char,
pub marked: ::std::os::raw::c_uchar,
pub gen: ::std::os::raw::c_ushort,
pub num: ::std::os::raw::c_int,
pub ofs: i64,
pub stm_ofs: i64,
pub stm_buf: *mut fz_buffer,
pub obj: *mut pdf_obj,
}
#[test]
fn bindgen_test_layout_pdf_xref_entry() {
const UNINIT: ::std::mem::MaybeUninit<pdf_xref_entry> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_xref_entry>(),
40usize,
concat!("Size of: ", stringify!(pdf_xref_entry))
);
assert_eq!(
::std::mem::align_of::<pdf_xref_entry>(),
8usize,
concat!("Alignment of ", stringify!(pdf_xref_entry))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).marked) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(marked)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gen) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(gen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(num)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ofs) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(ofs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stm_ofs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(stm_ofs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stm_buf) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(stm_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(obj)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xref_subsec {
pub next: *mut pdf_xref_subsec,
pub len: ::std::os::raw::c_int,
pub start: ::std::os::raw::c_int,
pub table: *mut pdf_xref_entry,
}
#[test]
fn bindgen_test_layout_pdf_xref_subsec() {
const UNINIT: ::std::mem::MaybeUninit<pdf_xref_subsec> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_xref_subsec>(),
24usize,
concat!("Size of: ", stringify!(pdf_xref_subsec))
);
assert_eq!(
::std::mem::align_of::<pdf_xref_subsec>(),
8usize,
concat!("Alignment of ", stringify!(pdf_xref_subsec))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).table) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(table)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xref {
pub num_objects: ::std::os::raw::c_int,
pub subsec: *mut pdf_xref_subsec,
pub trailer: *mut pdf_obj,
pub pre_repair_trailer: *mut pdf_obj,
pub unsaved_sigs: *mut pdf_unsaved_sig,
pub unsaved_sigs_end: *mut *mut pdf_unsaved_sig,
pub end_ofs: i64,
}
#[test]
fn bindgen_test_layout_pdf_xref() {
const UNINIT: ::std::mem::MaybeUninit<pdf_xref> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_xref>(),
56usize,
concat!("Size of: ", stringify!(pdf_xref))
);
assert_eq!(
::std::mem::align_of::<pdf_xref>(),
8usize,
concat!("Alignment of ", stringify!(pdf_xref))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_objects) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(num_objects)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).subsec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(subsec)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).trailer) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(trailer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pre_repair_trailer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(pre_repair_trailer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).unsaved_sigs) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(unsaved_sigs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).unsaved_sigs_end) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(unsaved_sigs_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).end_ofs) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(end_ofs)
)
);
}
extern "C" {
#[doc = "Retrieve the pdf_xref_entry for a given object.\n\nThis can cause xref reorganisations (solidifications etc) due to\nrepairs, so all held pdf_xref_entries should be considered\ninvalid after this call (other than the returned one)."]
pub fn pdf_cache_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_count_objects(ctx: *mut fz_context, doc: *mut pdf_document)
-> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Resolve an indirect object (or chain of objects).\n\nThis can cause xref reorganisations (solidifications etc) due to\nrepairs, so all held pdf_xref_entries should be considered\ninvalid after this call (other than the returned one)."]
pub fn pdf_resolve_indirect(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_resolve_indirect_chain(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
#[doc = "Load a given object.\n\nThis can cause xref reorganisations (solidifications etc) due to\nrepairs, so all held pdf_xref_entries should be considered\ninvalid after this call (other than the returned one)."]
pub fn pdf_load_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_unencrypted_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_raw_stream_number(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_load_raw_stream(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_load_stream_number(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_load_stream(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_open_raw_stream_number(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_raw_stream(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_stream_number(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_stream(ctx: *mut fz_context, ref_: *mut pdf_obj) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_inline_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
stmobj: *mut pdf_obj,
length: ::std::os::raw::c_int,
chain: *mut fz_stream,
params: *mut fz_compression_params,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_load_compressed_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
worst_case: usize,
) -> *mut fz_compressed_buffer;
}
extern "C" {
pub fn pdf_load_compressed_inline_image(
ctx: *mut fz_context,
doc: *mut pdf_document,
dict: *mut pdf_obj,
length: ::std::os::raw::c_int,
cstm: *mut fz_stream,
indexed: ::std::os::raw::c_int,
image: *mut fz_compressed_image,
);
}
extern "C" {
pub fn pdf_open_stream_with_offset(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
dict: *mut pdf_obj,
stm_ofs: i64,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_contents_stream(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_version(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_trailer(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_set_populating_xref_trailer(
ctx: *mut fz_context,
doc: *mut pdf_document,
trailer: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_xref_len(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_metadata(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_get_populating_xref_entry(
ctx: *mut fz_context,
doc: *mut pdf_document,
i: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_get_xref_entry(
ctx: *mut fz_context,
doc: *mut pdf_document,
i: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_xref_entry_map(
ctx: *mut fz_context,
doc: *mut pdf_document,
fn_: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut pdf_xref_entry,
i: ::std::os::raw::c_int,
doc: *mut pdf_document,
arg3: *mut ::std::os::raw::c_void,
),
>,
arg: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn pdf_get_xref_entry_no_change(
ctx: *mut fz_context,
doc: *mut pdf_document,
i: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_get_xref_entry_no_null(
ctx: *mut fz_context,
doc: *mut pdf_document,
i: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_replace_xref(
ctx: *mut fz_context,
doc: *mut pdf_document,
entries: *mut pdf_xref_entry,
n: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_forget_xref(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_get_incremental_xref_entry(
ctx: *mut fz_context,
doc: *mut pdf_document,
i: ::std::os::raw::c_int,
) -> *mut pdf_xref_entry;
}
extern "C" {
pub fn pdf_xref_ensure_incremental_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xref_is_incremental(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xref_store_unsaved_signature(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
signer: *mut pdf_pkcs7_signer,
);
}
extern "C" {
pub fn pdf_xref_remove_unsaved_signature(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_xref_obj_is_unsaved_signature(
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xref_ensure_local_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_obj_is_incremental(ctx: *mut fz_context, obj: *mut pdf_obj)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_repair_xref(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_repair_obj_stms(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_repair_trailer(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_ensure_solid_xref(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_mark_xref(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_clear_xref(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_clear_xref_to_mark(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_repair_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
buf: *mut pdf_lexbuf,
stmofsp: *mut i64,
stmlenp: *mut ::std::os::raw::c_int,
encrypt: *mut *mut pdf_obj,
id: *mut *mut pdf_obj,
page: *mut *mut pdf_obj,
tmpofs: *mut i64,
root: *mut *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_progressive_advance(
ctx: *mut fz_context,
doc: *mut pdf_document,
pagenum: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_count_versions(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_count_unsaved_versions(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_validate_changes(
ctx: *mut fz_context,
doc: *mut pdf_document,
version: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_doc_was_linearized(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_locked_fields {
_unused: [u8; 0],
}
extern "C" {
pub fn pdf_is_field_locked(
ctx: *mut fz_context,
locked: *mut pdf_locked_fields,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_drop_locked_fields(ctx: *mut fz_context, locked: *mut pdf_locked_fields);
}
extern "C" {
pub fn pdf_find_locked_fields(
ctx: *mut fz_context,
doc: *mut pdf_document,
version: ::std::os::raw::c_int,
) -> *mut pdf_locked_fields;
}
extern "C" {
pub fn pdf_find_locked_fields_for_sig(
ctx: *mut fz_context,
doc: *mut pdf_document,
sig: *mut pdf_obj,
) -> *mut pdf_locked_fields;
}
extern "C" {
pub fn pdf_validate_change_history(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_find_version_for_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_validate_signature(
ctx: *mut fz_context,
widget: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_was_pure_xfa(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_new_local_xref(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_xref;
}
extern "C" {
pub fn pdf_drop_local_xref(ctx: *mut fz_context, xref: *mut pdf_xref);
}
extern "C" {
pub fn pdf_drop_local_xref_and_resources(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_debug_doc_changes(ctx: *mut fz_context, doc: *mut pdf_document);
}
pub const PDF_ENCRYPT_KEEP: _bindgen_ty_26 = 0;
pub const PDF_ENCRYPT_NONE: _bindgen_ty_26 = 1;
pub const PDF_ENCRYPT_RC4_40: _bindgen_ty_26 = 2;
pub const PDF_ENCRYPT_RC4_128: _bindgen_ty_26 = 3;
pub const PDF_ENCRYPT_AES_128: _bindgen_ty_26 = 4;
pub const PDF_ENCRYPT_AES_256: _bindgen_ty_26 = 5;
pub const PDF_ENCRYPT_UNKNOWN: _bindgen_ty_26 = 6;
pub type _bindgen_ty_26 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_new_crypt(
ctx: *mut fz_context,
enc: *mut pdf_obj,
id: *mut pdf_obj,
) -> *mut pdf_crypt;
}
extern "C" {
pub fn pdf_new_encrypt(
ctx: *mut fz_context,
opwd_utf8: *const ::std::os::raw::c_char,
upwd_utf8: *const ::std::os::raw::c_char,
id: *mut pdf_obj,
permissions: ::std::os::raw::c_int,
algorithm: ::std::os::raw::c_int,
) -> *mut pdf_crypt;
}
extern "C" {
pub fn pdf_drop_crypt(ctx: *mut fz_context, crypt: *mut pdf_crypt);
}
extern "C" {
pub fn pdf_crypt_obj(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
obj: *mut pdf_obj,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_open_crypt(
ctx: *mut fz_context,
chain: *mut fz_stream,
crypt: *mut pdf_crypt,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_open_crypt_with_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
crypt: *mut pdf_crypt,
name: *mut pdf_obj,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_crypt_version(ctx: *mut fz_context, crypt: *mut pdf_crypt) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_crypt_revision(ctx: *mut fz_context, crypt: *mut pdf_crypt)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_crypt_method(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_crypt_string_method(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_crypt_stream_method(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_crypt_length(ctx: *mut fz_context, crypt: *mut pdf_crypt) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_crypt_permissions(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_crypt_encrypt_metadata(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_crypt_owner_password(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_crypt_user_password(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_crypt_owner_encryption(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_crypt_user_encryption(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_crypt_permissions_encryption(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_crypt_key(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_print_crypt(ctx: *mut fz_context, out: *mut fz_output, crypt: *mut pdf_crypt);
}
extern "C" {
pub fn pdf_write_digest(
ctx: *mut fz_context,
out: *mut fz_output,
byte_range: *mut pdf_obj,
field: *mut pdf_obj,
digest_offset: usize,
digest_length: usize,
signer: *mut pdf_pkcs7_signer,
);
}
pub const PDF_PERM_PRINT: _bindgen_ty_27 = 4;
pub const PDF_PERM_MODIFY: _bindgen_ty_27 = 8;
pub const PDF_PERM_COPY: _bindgen_ty_27 = 16;
pub const PDF_PERM_ANNOTATE: _bindgen_ty_27 = 32;
pub const PDF_PERM_FORM: _bindgen_ty_27 = 256;
pub const PDF_PERM_ACCESSIBILITY: _bindgen_ty_27 = 512;
pub const PDF_PERM_ASSEMBLE: _bindgen_ty_27 = 1024;
pub const PDF_PERM_PRINT_HQ: _bindgen_ty_27 = 2048;
pub type _bindgen_ty_27 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_document_permissions(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_signature_byte_range(
ctx: *mut fz_context,
doc: *mut pdf_document,
signature: *mut pdf_obj,
byte_range: *mut fz_range,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_signature_hash_bytes(
ctx: *mut fz_context,
doc: *mut pdf_document,
signature: *mut pdf_obj,
) -> *mut fz_stream;
}
extern "C" {
pub fn pdf_signature_incremental_change_since_signing(
ctx: *mut fz_context,
doc: *mut pdf_document,
signature: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_signature_contents(
ctx: *mut fz_context,
doc: *mut pdf_document,
signature: *mut pdf_obj,
contents: *mut *mut ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn pdf_encrypt_data(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
fmt_str_out: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut ::std::os::raw::c_void,
arg3: *const ::std::os::raw::c_uchar,
arg4: usize,
),
>,
arg: *mut ::std::os::raw::c_void,
s: *const ::std::os::raw::c_uchar,
n: usize,
);
}
extern "C" {
pub fn pdf_encrypted_len(
ctx: *mut fz_context,
crypt: *mut pdf_crypt,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
len: usize,
) -> usize;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_range {
pub low: ::std::os::raw::c_ushort,
pub high: ::std::os::raw::c_ushort,
pub out: ::std::os::raw::c_ushort,
}
#[test]
fn bindgen_test_layout_pdf_range() {
const UNINIT: ::std::mem::MaybeUninit<pdf_range> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_range>(),
6usize,
concat!("Size of: ", stringify!(pdf_range))
);
assert_eq!(
::std::mem::align_of::<pdf_range>(),
2usize,
concat!("Alignment of ", stringify!(pdf_range))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_range),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_range),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).out) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_range),
"::",
stringify!(out)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xrange {
pub low: ::std::os::raw::c_uint,
pub high: ::std::os::raw::c_uint,
pub out: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_pdf_xrange() {
const UNINIT: ::std::mem::MaybeUninit<pdf_xrange> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_xrange>(),
12usize,
concat!("Size of: ", stringify!(pdf_xrange))
);
assert_eq!(
::std::mem::align_of::<pdf_xrange>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xrange))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xrange),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xrange),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).out) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xrange),
"::",
stringify!(out)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_mrange {
pub low: ::std::os::raw::c_uint,
pub out: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_pdf_mrange() {
const UNINIT: ::std::mem::MaybeUninit<pdf_mrange> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_mrange>(),
8usize,
concat!("Size of: ", stringify!(pdf_mrange))
);
assert_eq!(
::std::mem::align_of::<pdf_mrange>(),
4usize,
concat!("Alignment of ", stringify!(pdf_mrange))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mrange),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).out) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_mrange),
"::",
stringify!(out)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cmap_splay {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_cmap {
pub storable: fz_storable,
pub cmap_name: [::std::os::raw::c_char; 32usize],
pub usecmap_name: [::std::os::raw::c_char; 32usize],
pub usecmap: *mut pdf_cmap,
pub wmode: ::std::os::raw::c_int,
pub codespace_len: ::std::os::raw::c_int,
pub codespace: [pdf_cmap__bindgen_ty_1; 40usize],
pub rlen: ::std::os::raw::c_int,
pub rcap: ::std::os::raw::c_int,
pub ranges: *mut pdf_range,
pub xlen: ::std::os::raw::c_int,
pub xcap: ::std::os::raw::c_int,
pub xranges: *mut pdf_xrange,
pub mlen: ::std::os::raw::c_int,
pub mcap: ::std::os::raw::c_int,
pub mranges: *mut pdf_mrange,
pub dlen: ::std::os::raw::c_int,
pub dcap: ::std::os::raw::c_int,
pub dict: *mut ::std::os::raw::c_int,
pub tlen: ::std::os::raw::c_int,
pub tcap: ::std::os::raw::c_int,
pub ttop: ::std::os::raw::c_int,
pub tree: *mut cmap_splay,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_cmap__bindgen_ty_1 {
pub n: ::std::os::raw::c_int,
pub low: ::std::os::raw::c_uint,
pub high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_pdf_cmap__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<pdf_cmap__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_cmap__bindgen_ty_1>(),
12usize,
concat!("Size of: ", stringify!(pdf_cmap__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<pdf_cmap__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(pdf_cmap__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(high)
)
);
}
#[test]
fn bindgen_test_layout_pdf_cmap() {
const UNINIT: ::std::mem::MaybeUninit<pdf_cmap> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_cmap>(),
664usize,
concat!("Size of: ", stringify!(pdf_cmap))
);
assert_eq!(
::std::mem::align_of::<pdf_cmap>(),
8usize,
concat!("Alignment of ", stringify!(pdf_cmap))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cmap_name) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(cmap_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).usecmap_name) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(usecmap_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).usecmap) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(usecmap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wmode) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).codespace_len) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(codespace_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).codespace) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(codespace)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rlen) as usize - ptr as usize },
576usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(rlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcap) as usize - ptr as usize },
580usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(rcap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ranges) as usize - ptr as usize },
584usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(ranges)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xlen) as usize - ptr as usize },
592usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xcap) as usize - ptr as usize },
596usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xcap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xranges) as usize - ptr as usize },
600usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xranges)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mlen) as usize - ptr as usize },
608usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mcap) as usize - ptr as usize },
612usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mcap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mranges) as usize - ptr as usize },
616usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mranges)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dlen) as usize - ptr as usize },
624usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dcap) as usize - ptr as usize },
628usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dcap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dict) as usize - ptr as usize },
632usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dict)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tlen) as usize - ptr as usize },
640usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(tlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tcap) as usize - ptr as usize },
644usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(tcap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ttop) as usize - ptr as usize },
648usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(ttop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tree) as usize - ptr as usize },
656usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(tree)
)
);
}
extern "C" {
pub fn pdf_new_cmap(ctx: *mut fz_context) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_keep_cmap(ctx: *mut fz_context, cmap: *mut pdf_cmap) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_drop_cmap(ctx: *mut fz_context, cmap: *mut pdf_cmap);
}
extern "C" {
pub fn pdf_drop_cmap_imp(ctx: *mut fz_context, cmap: *mut fz_storable);
}
extern "C" {
pub fn pdf_cmap_size(ctx: *mut fz_context, cmap: *mut pdf_cmap) -> usize;
}
extern "C" {
pub fn pdf_cmap_wmode(ctx: *mut fz_context, cmap: *mut pdf_cmap) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_cmap_wmode(
ctx: *mut fz_context,
cmap: *mut pdf_cmap,
wmode: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_usecmap(ctx: *mut fz_context, cmap: *mut pdf_cmap, usecmap: *mut pdf_cmap);
}
extern "C" {
pub fn pdf_add_codespace(
ctx: *mut fz_context,
cmap: *mut pdf_cmap,
low: ::std::os::raw::c_uint,
high: ::std::os::raw::c_uint,
n: usize,
);
}
extern "C" {
pub fn pdf_map_range_to_range(
ctx: *mut fz_context,
cmap: *mut pdf_cmap,
srclo: ::std::os::raw::c_uint,
srchi: ::std::os::raw::c_uint,
dstlo: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_map_one_to_many(
ctx: *mut fz_context,
cmap: *mut pdf_cmap,
one: ::std::os::raw::c_uint,
many: *mut ::std::os::raw::c_int,
len: usize,
);
}
extern "C" {
pub fn pdf_sort_cmap(ctx: *mut fz_context, cmap: *mut pdf_cmap);
}
extern "C" {
pub fn pdf_lookup_cmap(
cmap: *mut pdf_cmap,
cpt: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_lookup_cmap_full(
cmap: *mut pdf_cmap,
cpt: ::std::os::raw::c_uint,
out: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_decode_cmap(
cmap: *mut pdf_cmap,
s: *mut ::std::os::raw::c_uchar,
e: *mut ::std::os::raw::c_uchar,
cpt: *mut ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_new_identity_cmap(
ctx: *mut fz_context,
wmode: ::std::os::raw::c_int,
bytes: ::std::os::raw::c_int,
) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_load_cmap(ctx: *mut fz_context, file: *mut fz_stream) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_load_system_cmap(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_load_builtin_cmap(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
) -> *mut pdf_cmap;
}
extern "C" {
pub fn pdf_load_embedded_cmap(
ctx: *mut fz_context,
doc: *mut pdf_document,
ref_: *mut pdf_obj,
) -> *mut pdf_cmap;
}
pub const PDF_FD_FIXED_PITCH: _bindgen_ty_28 = 1;
pub const PDF_FD_SERIF: _bindgen_ty_28 = 2;
pub const PDF_FD_SYMBOLIC: _bindgen_ty_28 = 4;
pub const PDF_FD_SCRIPT: _bindgen_ty_28 = 8;
pub const PDF_FD_NONSYMBOLIC: _bindgen_ty_28 = 32;
pub const PDF_FD_ITALIC: _bindgen_ty_28 = 64;
pub const PDF_FD_ALL_CAP: _bindgen_ty_28 = 65536;
pub const PDF_FD_SMALL_CAP: _bindgen_ty_28 = 131072;
pub const PDF_FD_FORCE_BOLD: _bindgen_ty_28 = 262144;
pub type _bindgen_ty_28 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_load_encoding(
estrings: *mut *const ::std::os::raw::c_char,
encoding: *const ::std::os::raw::c_char,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_hmtx {
pub lo: ::std::os::raw::c_ushort,
pub hi: ::std::os::raw::c_ushort,
pub w: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_hmtx() {
const UNINIT: ::std::mem::MaybeUninit<pdf_hmtx> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_hmtx>(),
8usize,
concat!("Size of: ", stringify!(pdf_hmtx))
);
assert_eq!(
::std::mem::align_of::<pdf_hmtx>(),
4usize,
concat!("Alignment of ", stringify!(pdf_hmtx))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lo) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hmtx),
"::",
stringify!(lo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hi) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_hmtx),
"::",
stringify!(hi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_hmtx),
"::",
stringify!(w)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_vmtx {
pub lo: ::std::os::raw::c_ushort,
pub hi: ::std::os::raw::c_ushort,
pub x: ::std::os::raw::c_short,
pub y: ::std::os::raw::c_short,
pub w: ::std::os::raw::c_short,
}
#[test]
fn bindgen_test_layout_pdf_vmtx() {
const UNINIT: ::std::mem::MaybeUninit<pdf_vmtx> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_vmtx>(),
10usize,
concat!("Size of: ", stringify!(pdf_vmtx))
);
assert_eq!(
::std::mem::align_of::<pdf_vmtx>(),
2usize,
concat!("Alignment of ", stringify!(pdf_vmtx))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lo) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(lo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hi) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(hi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(w)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_font_desc {
pub storable: fz_storable,
pub size: usize,
pub font: *mut fz_font,
pub flags: ::std::os::raw::c_int,
pub italic_angle: f32,
pub ascent: f32,
pub descent: f32,
pub cap_height: f32,
pub x_height: f32,
pub missing_width: f32,
pub encoding: *mut pdf_cmap,
pub to_ttf_cmap: *mut pdf_cmap,
pub cid_to_gid_len: usize,
pub cid_to_gid: *mut ::std::os::raw::c_ushort,
pub to_unicode: *mut pdf_cmap,
pub cid_to_ucs_len: usize,
pub cid_to_ucs: *mut ::std::os::raw::c_ushort,
pub wmode: ::std::os::raw::c_int,
pub hmtx_len: ::std::os::raw::c_int,
pub hmtx_cap: ::std::os::raw::c_int,
pub dhmtx: pdf_hmtx,
pub hmtx: *mut pdf_hmtx,
pub vmtx_len: ::std::os::raw::c_int,
pub vmtx_cap: ::std::os::raw::c_int,
pub dvmtx: pdf_vmtx,
pub vmtx: *mut pdf_vmtx,
pub is_embedded: ::std::os::raw::c_int,
pub t3loading: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_font_desc() {
const UNINIT: ::std::mem::MaybeUninit<pdf_font_desc> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_font_desc>(),
192usize,
concat!("Size of: ", stringify!(pdf_font_desc))
);
assert_eq!(
::std::mem::align_of::<pdf_font_desc>(),
8usize,
concat!("Alignment of ", stringify!(pdf_font_desc))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).italic_angle) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(italic_angle)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ascent) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(ascent)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).descent) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(descent)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cap_height) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cap_height)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).x_height) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(x_height)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).missing_width) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(missing_width)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).encoding) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(encoding)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).to_ttf_cmap) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(to_ttf_cmap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cid_to_gid_len) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_gid_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cid_to_gid) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_gid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).to_unicode) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(to_unicode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cid_to_ucs_len) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_ucs_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cid_to_ucs) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_ucs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wmode) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmtx_len) as usize - ptr as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmtx_cap) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dhmtx) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(dhmtx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hmtx) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vmtx_len) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vmtx_cap) as usize - ptr as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx_cap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dvmtx) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(dvmtx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vmtx) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_embedded) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(is_embedded)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).t3loading) as usize - ptr as usize },
188usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(t3loading)
)
);
}
extern "C" {
pub fn pdf_set_font_wmode(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
wmode: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_default_hmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
w: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_default_vmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
y: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_add_hmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
lo: ::std::os::raw::c_int,
hi: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_add_vmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
lo: ::std::os::raw::c_int,
hi: ::std::os::raw::c_int,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_end_hmtx(ctx: *mut fz_context, font: *mut pdf_font_desc);
}
extern "C" {
pub fn pdf_end_vmtx(ctx: *mut fz_context, font: *mut pdf_font_desc);
}
extern "C" {
pub fn pdf_lookup_hmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
cid: ::std::os::raw::c_int,
) -> pdf_hmtx;
}
extern "C" {
pub fn pdf_lookup_vmtx(
ctx: *mut fz_context,
font: *mut pdf_font_desc,
cid: ::std::os::raw::c_int,
) -> pdf_vmtx;
}
extern "C" {
pub fn pdf_load_to_unicode(
ctx: *mut fz_context,
doc: *mut pdf_document,
font: *mut pdf_font_desc,
strings: *mut *const ::std::os::raw::c_char,
collection: *mut ::std::os::raw::c_char,
cmapstm: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_font_cid_to_gid(
ctx: *mut fz_context,
fontdesc: *mut pdf_font_desc,
cid: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_clean_font_name(
fontname: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_lookup_substitute_font(
ctx: *mut fz_context,
mono: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
bold: ::std::os::raw::c_int,
italic: ::std::os::raw::c_int,
len: *mut ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn pdf_load_type3_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
rdb: *mut pdf_obj,
obj: *mut pdf_obj,
) -> *mut pdf_font_desc;
}
extern "C" {
pub fn pdf_load_type3_glyphs(
ctx: *mut fz_context,
doc: *mut pdf_document,
fontdesc: *mut pdf_font_desc,
);
}
extern "C" {
pub fn pdf_load_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
rdb: *mut pdf_obj,
obj: *mut pdf_obj,
) -> *mut pdf_font_desc;
}
extern "C" {
pub fn pdf_load_hail_mary_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> *mut pdf_font_desc;
}
extern "C" {
pub fn pdf_new_font_desc(ctx: *mut fz_context) -> *mut pdf_font_desc;
}
extern "C" {
pub fn pdf_keep_font(ctx: *mut fz_context, fontdesc: *mut pdf_font_desc) -> *mut pdf_font_desc;
}
extern "C" {
pub fn pdf_drop_font(ctx: *mut fz_context, font: *mut pdf_font_desc);
}
extern "C" {
pub fn pdf_print_font(ctx: *mut fz_context, out: *mut fz_output, fontdesc: *mut pdf_font_desc);
}
extern "C" {
pub fn pdf_run_glyph(
ctx: *mut fz_context,
doc: *mut pdf_document,
resources: *mut pdf_obj,
contents: *mut fz_buffer,
dev: *mut fz_device,
ctm: fz_matrix,
gstate: *mut ::std::os::raw::c_void,
default_cs: *mut fz_default_colorspaces,
);
}
extern "C" {
pub fn pdf_add_simple_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
font: *mut fz_font,
encoding: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_cid_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
font: *mut fz_font,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_cjk_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
font: *mut fz_font,
script: ::std::os::raw::c_int,
wmode: ::std::os::raw::c_int,
serif: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_add_substitute_font(
ctx: *mut fz_context,
doc: *mut pdf_document,
font: *mut fz_font,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_font_writing_supported(font: *mut fz_font) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fz_extract_ttf_from_ttc(ctx: *mut fz_context, font: *mut fz_font) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_store_item(
ctx: *mut fz_context,
key: *mut pdf_obj,
val: *mut ::std::os::raw::c_void,
itemsize: usize,
);
}
extern "C" {
pub fn pdf_find_item(
ctx: *mut fz_context,
drop: fz_store_drop_fn,
key: *mut pdf_obj,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn pdf_remove_item(ctx: *mut fz_context, drop: fz_store_drop_fn, key: *mut pdf_obj);
}
extern "C" {
pub fn pdf_empty_store(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_purge_locals_from_store(ctx: *mut fz_context, doc: *mut pdf_document);
}
pub const PDF_SIMPLE_FONT_RESOURCE: _bindgen_ty_29 = 1;
pub const PDF_CID_FONT_RESOURCE: _bindgen_ty_29 = 2;
pub const PDF_CJK_FONT_RESOURCE: _bindgen_ty_29 = 3;
pub type _bindgen_ty_29 = ::std::os::raw::c_uint;
pub const PDF_SIMPLE_ENCODING_LATIN: _bindgen_ty_30 = 0;
pub const PDF_SIMPLE_ENCODING_GREEK: _bindgen_ty_30 = 1;
pub const PDF_SIMPLE_ENCODING_CYRILLIC: _bindgen_ty_30 = 2;
pub type _bindgen_ty_30 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_font_resource_key {
pub digest: [::std::os::raw::c_uchar; 16usize],
pub type_: ::std::os::raw::c_int,
pub encoding: ::std::os::raw::c_int,
pub local_xref: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_font_resource_key() {
const UNINIT: ::std::mem::MaybeUninit<pdf_font_resource_key> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_font_resource_key>(),
28usize,
concat!("Size of: ", stringify!(pdf_font_resource_key))
);
assert_eq!(
::std::mem::align_of::<pdf_font_resource_key>(),
4usize,
concat!("Alignment of ", stringify!(pdf_font_resource_key))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_resource_key),
"::",
stringify!(digest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_resource_key),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).encoding) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_resource_key),
"::",
stringify!(encoding)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_xref) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_resource_key),
"::",
stringify!(local_xref)
)
);
}
extern "C" {
pub fn pdf_find_font_resource(
ctx: *mut fz_context,
doc: *mut pdf_document,
type_: ::std::os::raw::c_int,
encoding: ::std::os::raw::c_int,
item: *mut fz_font,
key: *mut pdf_font_resource_key,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_insert_font_resource(
ctx: *mut fz_context,
doc: *mut pdf_document,
key: *mut pdf_font_resource_key,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_drop_resource_tables(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_purge_local_font_resources(ctx: *mut fz_context, doc: *mut pdf_document);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_function {
_unused: [u8; 0],
}
extern "C" {
pub fn pdf_eval_function(
ctx: *mut fz_context,
func: *mut pdf_function,
in_: *const f32,
inlen: ::std::os::raw::c_int,
out: *mut f32,
outlen: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_keep_function(ctx: *mut fz_context, func: *mut pdf_function) -> *mut pdf_function;
}
extern "C" {
pub fn pdf_drop_function(ctx: *mut fz_context, func: *mut pdf_function);
}
extern "C" {
pub fn pdf_function_size(ctx: *mut fz_context, func: *mut pdf_function) -> usize;
}
extern "C" {
pub fn pdf_load_function(
ctx: *mut fz_context,
ref_: *mut pdf_obj,
in_: ::std::os::raw::c_int,
out: ::std::os::raw::c_int,
) -> *mut pdf_function;
}
extern "C" {
pub fn pdf_document_output_intent(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> *mut fz_colorspace;
}
extern "C" {
pub fn pdf_load_colorspace(ctx: *mut fz_context, obj: *mut pdf_obj) -> *mut fz_colorspace;
}
extern "C" {
pub fn pdf_is_tint_colorspace(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_load_shading(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut fz_shade;
}
extern "C" {
pub fn pdf_sample_shade_function(
ctx: *mut fz_context,
shade: *mut [f32; 33usize],
n: ::std::os::raw::c_int,
funcs: ::std::os::raw::c_int,
func: *mut *mut pdf_function,
t0: f32,
t1: f32,
);
}
#[doc = "Function to recolor a single color from a shade."]
pub type pdf_recolor_vertex = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
dst_cs: *mut fz_colorspace,
d: *mut f32,
src_cs: *mut fz_colorspace,
src: *const f32,
),
>;
#[doc = "Function to handle recoloring a shade.\n\nCalled with src_cs from the shade. If no recoloring is required, return NULL. Otherwise\nfill in *dst_cs, and return a vertex recolorer."]
pub type pdf_shade_recolorer = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
src_cs: *mut fz_colorspace,
dst_cs: *mut *mut fz_colorspace,
) -> pdf_recolor_vertex,
>;
extern "C" {
#[doc = "Recolor a shade."]
pub fn pdf_recolor_shade(
ctx: *mut fz_context,
shade: *mut pdf_obj,
reshade: pdf_shade_recolorer,
opaque: *mut ::std::os::raw::c_void,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_inline_image(
ctx: *mut fz_context,
doc: *mut pdf_document,
rdb: *mut pdf_obj,
dict: *mut pdf_obj,
file: *mut fz_stream,
) -> *mut fz_image;
}
extern "C" {
pub fn pdf_is_jpx_image(ctx: *mut fz_context, dict: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_load_image(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut fz_image;
}
extern "C" {
pub fn pdf_add_image(
ctx: *mut fz_context,
doc: *mut pdf_document,
image: *mut fz_image,
) -> *mut pdf_obj;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_pattern {
pub storable: fz_storable,
pub ismask: ::std::os::raw::c_int,
pub xstep: f32,
pub ystep: f32,
pub matrix: fz_matrix,
pub bbox: fz_rect,
pub document: *mut pdf_document,
pub resources: *mut pdf_obj,
pub contents: *mut pdf_obj,
pub id: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_pattern() {
const UNINIT: ::std::mem::MaybeUninit<pdf_pattern> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_pattern>(),
104usize,
concat!("Size of: ", stringify!(pdf_pattern))
);
assert_eq!(
::std::mem::align_of::<pdf_pattern>(),
8usize,
concat!("Alignment of ", stringify!(pdf_pattern))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).storable) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ismask) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(ismask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xstep) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(xstep)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ystep) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(ystep)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matrix) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bbox) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).document) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(document)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resources) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(resources)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).contents) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(contents)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(id)
)
);
}
extern "C" {
pub fn pdf_load_pattern(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut pdf_pattern;
}
extern "C" {
pub fn pdf_keep_pattern(ctx: *mut fz_context, pat: *mut pdf_pattern) -> *mut pdf_pattern;
}
extern "C" {
pub fn pdf_drop_pattern(ctx: *mut fz_context, pat: *mut pdf_pattern);
}
extern "C" {
pub fn pdf_new_xobject(
ctx: *mut fz_context,
doc: *mut pdf_document,
bbox: fz_rect,
matrix: fz_matrix,
res: *mut pdf_obj,
buffer: *mut fz_buffer,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_update_xobject(
ctx: *mut fz_context,
doc: *mut pdf_document,
xobj: *mut pdf_obj,
bbox: fz_rect,
mat: fz_matrix,
res: *mut pdf_obj,
buffer: *mut fz_buffer,
);
}
extern "C" {
pub fn pdf_xobject_resources(ctx: *mut fz_context, xobj: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_xobject_bbox(ctx: *mut fz_context, xobj: *mut pdf_obj) -> fz_rect;
}
extern "C" {
pub fn pdf_xobject_matrix(ctx: *mut fz_context, xobj: *mut pdf_obj) -> fz_matrix;
}
extern "C" {
pub fn pdf_xobject_isolated(ctx: *mut fz_context, xobj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xobject_knockout(ctx: *mut fz_context, xobj: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xobject_transparency(
ctx: *mut fz_context,
xobj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_xobject_colorspace(ctx: *mut fz_context, xobj: *mut pdf_obj) -> *mut fz_colorspace;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_gstate {
_unused: [u8; 0],
}
extern "C" {
pub fn pdf_new_processor(
ctx: *mut fz_context,
size: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn pdf_keep_processor(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
) -> *mut pdf_processor;
}
extern "C" {
pub fn pdf_close_processor(ctx: *mut fz_context, proc_: *mut pdf_processor);
}
extern "C" {
pub fn pdf_drop_processor(ctx: *mut fz_context, proc_: *mut pdf_processor);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_processor {
pub refs: ::std::os::raw::c_int,
pub close_processor: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub drop_processor: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub push_resources: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, res: *mut pdf_obj),
>,
pub pop_resources: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor) -> *mut pdf_obj,
>,
pub op_w: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, linewidth: f32),
>,
pub op_j: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
linejoin: ::std::os::raw::c_int,
),
>,
pub op_J: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
linecap: ::std::os::raw::c_int,
),
>,
pub op_M: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, miterlimit: f32),
>,
pub op_d: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
array: *mut pdf_obj,
phase: f32,
),
>,
pub op_ri: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
intent: *const ::std::os::raw::c_char,
),
>,
pub op_i: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, flatness: f32),
>,
pub op_gs_begin: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
extgstate: *mut pdf_obj,
),
>,
pub op_gs_BM: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
blendmode: *const ::std::os::raw::c_char,
),
>,
pub op_gs_ca: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, alpha: f32),
>,
pub op_gs_CA: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, alpha: f32),
>,
pub op_gs_SMask: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
smask: *mut pdf_obj,
bc: *mut f32,
luminosity: ::std::os::raw::c_int,
),
>,
pub op_gs_end: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_q: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_Q: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_cm: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32,
),
>,
pub op_m: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, x: f32, y: f32),
>,
pub op_l: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, x: f32, y: f32),
>,
pub op_c: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
),
>,
pub op_v: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
x2: f32,
y2: f32,
x3: f32,
y3: f32,
),
>,
pub op_y: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
x1: f32,
y1: f32,
x3: f32,
y3: f32,
),
>,
pub op_h: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_re: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
x: f32,
y: f32,
w: f32,
h: f32,
),
>,
pub op_S: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_s: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_F: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_f: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_fstar: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_B: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_Bstar: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_b: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_bstar: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_n: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_W: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_Wstar: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_BT: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_ET: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_Tc: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, charspace: f32),
>,
pub op_Tw: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, wordspace: f32),
>,
pub op_Tz: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, scale: f32),
>,
pub op_TL: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, leading: f32),
>,
pub op_Tf: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
font: *mut pdf_font_desc,
size: f32,
),
>,
pub op_Tr: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
render: ::std::os::raw::c_int,
),
>,
pub op_Ts: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, rise: f32),
>,
pub op_Td: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, tx: f32, ty: f32),
>,
pub op_TD: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, tx: f32, ty: f32),
>,
pub op_Tm: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32,
),
>,
pub op_Tstar: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_TJ: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, array: *mut pdf_obj),
>,
pub op_Tj: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
str_: *mut ::std::os::raw::c_char,
len: usize,
),
>,
pub op_squote: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
str_: *mut ::std::os::raw::c_char,
len: usize,
),
>,
pub op_dquote: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
aw: f32,
ac: f32,
str_: *mut ::std::os::raw::c_char,
len: usize,
),
>,
pub op_d0: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, wx: f32, wy: f32),
>,
pub op_d1: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
wx: f32,
wy: f32,
llx: f32,
lly: f32,
urx: f32,
ury: f32,
),
>,
pub op_CS: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
cs: *mut fz_colorspace,
),
>,
pub op_cs: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
cs: *mut fz_colorspace,
),
>,
pub op_SC_pattern: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
pat: *mut pdf_pattern,
n: ::std::os::raw::c_int,
color: *mut f32,
),
>,
pub op_sc_pattern: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
pat: *mut pdf_pattern,
n: ::std::os::raw::c_int,
color: *mut f32,
),
>,
pub op_SC_shade: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
shade: *mut fz_shade,
),
>,
pub op_sc_shade: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
shade: *mut fz_shade,
),
>,
pub op_SC_color: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
n: ::std::os::raw::c_int,
color: *mut f32,
),
>,
pub op_sc_color: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
n: ::std::os::raw::c_int,
color: *mut f32,
),
>,
pub op_G: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, g: f32),
>,
pub op_g: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, g: f32),
>,
pub op_RG: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
r: f32,
g: f32,
b: f32,
),
>,
pub op_rg: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
r: f32,
g: f32,
b: f32,
),
>,
pub op_K: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
c: f32,
m: f32,
y: f32,
k: f32,
),
>,
pub op_k: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
c: f32,
m: f32,
y: f32,
k: f32,
),
>,
pub op_BI: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
image: *mut fz_image,
colorspace_name: *const ::std::os::raw::c_char,
),
>,
pub op_sh: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
shade: *mut fz_shade,
),
>,
pub op_Do_image: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
image: *mut fz_image,
),
>,
pub op_Do_form: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
name: *const ::std::os::raw::c_char,
form: *mut pdf_obj,
),
>,
pub op_MP: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
tag: *const ::std::os::raw::c_char,
),
>,
pub op_DP: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
tag: *const ::std::os::raw::c_char,
raw: *mut pdf_obj,
cooked: *mut pdf_obj,
),
>,
pub op_BMC: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
tag: *const ::std::os::raw::c_char,
),
>,
pub op_BDC: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
tag: *const ::std::os::raw::c_char,
raw: *mut pdf_obj,
cooked: *mut pdf_obj,
),
>,
pub op_EMC: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_BX: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_EX: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub op_gs_OP: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
b: ::std::os::raw::c_int,
),
>,
pub op_gs_op: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
b: ::std::os::raw::c_int,
),
>,
pub op_gs_OPM: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
i: ::std::os::raw::c_int,
),
>,
pub op_gs_UseBlackPtComp: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor, name: *mut pdf_obj),
>,
pub op_END: ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, proc_: *mut pdf_processor),
>,
pub usage: *const ::std::os::raw::c_char,
pub hidden: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_processor() {
const UNINIT: ::std::mem::MaybeUninit<pdf_processor> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_processor>(),
728usize,
concat!("Size of: ", stringify!(pdf_processor))
);
assert_eq!(
::std::mem::align_of::<pdf_processor>(),
8usize,
concat!("Alignment of ", stringify!(pdf_processor))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).refs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).close_processor) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(close_processor)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop_processor) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(drop_processor)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).push_resources) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(push_resources)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pop_resources) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(pop_resources)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_w) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_w)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_j) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_j)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_J) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_J)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_M) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_M)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_d) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_ri) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_ri)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_i) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_i)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_begin) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_begin)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_BM) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_BM)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_ca) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_ca)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_CA) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_CA)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_SMask) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_SMask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_end) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_q) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_q)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Q) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Q)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_cm) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_cm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_m) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_m)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_l) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_l)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_c) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_c)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_v) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_v)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_y) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_y)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_h) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_h)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_re) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_re)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_S) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_S)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_s) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_s)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_F) as usize - ptr as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_F)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_f) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_f)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_fstar) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_fstar)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_B) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_B)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Bstar) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Bstar)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_b) as usize - ptr as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_b)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_bstar) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_bstar)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_n) as usize - ptr as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_n)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_W) as usize - ptr as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_W)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Wstar) as usize - ptr as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Wstar)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_BT) as usize - ptr as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BT)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_ET) as usize - ptr as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_ET)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tc) as usize - ptr as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tw) as usize - ptr as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tw)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tz) as usize - ptr as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_TL) as usize - ptr as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TL)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tf) as usize - ptr as usize },
368usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tr) as usize - ptr as usize },
376usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Ts) as usize - ptr as usize },
384usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Ts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Td) as usize - ptr as usize },
392usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Td)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_TD) as usize - ptr as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TD)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tm) as usize - ptr as usize },
408usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tstar) as usize - ptr as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tstar)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_TJ) as usize - ptr as usize },
424usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TJ)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Tj) as usize - ptr as usize },
432usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_squote) as usize - ptr as usize },
440usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_squote)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_dquote) as usize - ptr as usize },
448usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_dquote)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_d0) as usize - ptr as usize },
456usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_d1) as usize - ptr as usize },
464usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_CS) as usize - ptr as usize },
472usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_CS)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_cs) as usize - ptr as usize },
480usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_cs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_SC_pattern) as usize - ptr as usize },
488usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_pattern)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_sc_pattern) as usize - ptr as usize },
496usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_pattern)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_SC_shade) as usize - ptr as usize },
504usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_shade)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_sc_shade) as usize - ptr as usize },
512usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_shade)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_SC_color) as usize - ptr as usize },
520usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_color)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_sc_color) as usize - ptr as usize },
528usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_color)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_G) as usize - ptr as usize },
536usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_G)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_g) as usize - ptr as usize },
544usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_g)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_RG) as usize - ptr as usize },
552usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_RG)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_rg) as usize - ptr as usize },
560usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_rg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_K) as usize - ptr as usize },
568usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_K)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_k) as usize - ptr as usize },
576usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_k)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_BI) as usize - ptr as usize },
584usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BI)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_sh) as usize - ptr as usize },
592usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sh)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Do_image) as usize - ptr as usize },
600usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Do_image)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_Do_form) as usize - ptr as usize },
608usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Do_form)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_MP) as usize - ptr as usize },
616usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_MP)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_DP) as usize - ptr as usize },
624usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_DP)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_BMC) as usize - ptr as usize },
632usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BMC)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_BDC) as usize - ptr as usize },
640usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BDC)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_EMC) as usize - ptr as usize },
648usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_EMC)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_BX) as usize - ptr as usize },
656usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BX)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_EX) as usize - ptr as usize },
664usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_EX)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_OP) as usize - ptr as usize },
672usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_OP)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_op) as usize - ptr as usize },
680usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_op)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_OPM) as usize - ptr as usize },
688usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_OPM)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_gs_UseBlackPtComp) as usize - ptr as usize },
696usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_UseBlackPtComp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).op_END) as usize - ptr as usize },
704usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_END)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize },
712usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(usage)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hidden) as usize - ptr as usize },
720usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(hidden)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_csi {
pub doc: *mut pdf_document,
pub rdb: *mut pdf_obj,
pub buf: *mut pdf_lexbuf,
pub cookie: *mut fz_cookie,
pub gstate: ::std::os::raw::c_int,
pub xbalance: ::std::os::raw::c_int,
pub in_text: ::std::os::raw::c_int,
pub d1_rect: fz_rect,
pub obj: *mut pdf_obj,
pub name: [::std::os::raw::c_char; 256usize],
pub string: [::std::os::raw::c_char; 256usize],
pub string_len: usize,
pub top: ::std::os::raw::c_int,
pub stack: [f32; 32usize],
}
#[test]
fn bindgen_test_layout_pdf_csi() {
const UNINIT: ::std::mem::MaybeUninit<pdf_csi> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_csi>(),
728usize,
concat!("Size of: ", stringify!(pdf_csi))
);
assert_eq!(
::std::mem::align_of::<pdf_csi>(),
8usize,
concat!("Alignment of ", stringify!(pdf_csi))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).doc) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdb) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(rdb)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookie) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(cookie)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gstate) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(gstate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xbalance) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(xbalance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).in_text) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(in_text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).d1_rect) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(d1_rect)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(string)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).string_len) as usize - ptr as usize },
584usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(string_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize },
592usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize },
596usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(stack)
)
);
}
extern "C" {
pub fn pdf_new_run_processor(
ctx: *mut fz_context,
doc: *mut pdf_document,
dev: *mut fz_device,
ctm: fz_matrix,
struct_parent: ::std::os::raw::c_int,
usage: *const ::std::os::raw::c_char,
gstate: *mut pdf_gstate,
default_cs: *mut fz_default_colorspaces,
cookie: *mut fz_cookie,
) -> *mut pdf_processor;
}
extern "C" {
pub fn pdf_new_buffer_processor(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
ahxencode: ::std::os::raw::c_int,
) -> *mut pdf_processor;
}
extern "C" {
pub fn pdf_new_output_processor(
ctx: *mut fz_context,
out: *mut fz_output,
ahxencode: ::std::os::raw::c_int,
) -> *mut pdf_processor;
}
pub type pdf_filter_factory_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut pdf_document,
chain: *mut pdf_processor,
struct_parents: ::std::os::raw::c_int,
transform: fz_matrix,
options: *mut pdf_filter_options,
factory_options: *mut ::std::os::raw::c_void,
) -> *mut pdf_processor,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_filter_factory {
pub filter: pdf_filter_factory_fn,
pub options: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_pdf_filter_factory() {
const UNINIT: ::std::mem::MaybeUninit<pdf_filter_factory> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_filter_factory>(),
16usize,
concat!("Size of: ", stringify!(pdf_filter_factory))
);
assert_eq!(
::std::mem::align_of::<pdf_filter_factory>(),
8usize,
concat!("Alignment of ", stringify!(pdf_filter_factory))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).filter) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_factory),
"::",
stringify!(filter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_factory),
"::",
stringify!(options)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_filter_options {
pub recurse: ::std::os::raw::c_int,
pub instance_forms: ::std::os::raw::c_int,
pub ascii: ::std::os::raw::c_int,
pub no_update: ::std::os::raw::c_int,
pub opaque: *mut ::std::os::raw::c_void,
pub complete: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
arg: *mut ::std::os::raw::c_void,
),
>,
pub filters: *mut pdf_filter_factory,
}
#[test]
fn bindgen_test_layout_pdf_filter_options() {
const UNINIT: ::std::mem::MaybeUninit<pdf_filter_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_filter_options>(),
40usize,
concat!("Size of: ", stringify!(pdf_filter_options))
);
assert_eq!(
::std::mem::align_of::<pdf_filter_options>(),
8usize,
concat!("Alignment of ", stringify!(pdf_filter_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).recurse) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(recurse)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instance_forms) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(instance_forms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ascii) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(ascii)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).no_update) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(no_update)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(opaque)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).complete) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(complete)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).filters) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(filters)
)
);
}
pub const fz_cull_type_FZ_CULL_PATH_FILL: fz_cull_type = 0;
pub const fz_cull_type_FZ_CULL_PATH_STROKE: fz_cull_type = 1;
pub const fz_cull_type_FZ_CULL_PATH_FILL_STROKE: fz_cull_type = 2;
pub const fz_cull_type_FZ_CULL_CLIP_PATH: fz_cull_type = 3;
pub const fz_cull_type_FZ_CULL_GLYPH: fz_cull_type = 4;
pub const fz_cull_type_FZ_CULL_IMAGE: fz_cull_type = 5;
pub const fz_cull_type_FZ_CULL_SHADING: fz_cull_type = 6;
pub type fz_cull_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_sanitize_filter_options {
pub opaque: *mut ::std::os::raw::c_void,
pub image_filter: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
ctm: fz_matrix,
name: *const ::std::os::raw::c_char,
image: *mut fz_image,
) -> *mut fz_image,
>,
pub text_filter: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
ucsbuf: *mut ::std::os::raw::c_int,
ucslen: ::std::os::raw::c_int,
trm: fz_matrix,
ctm: fz_matrix,
bbox: fz_rect,
) -> ::std::os::raw::c_int,
>,
pub after_text_object: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
doc: *mut pdf_document,
chain: *mut pdf_processor,
ctm: fz_matrix,
),
>,
pub culler: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
bbox: fz_rect,
type_: fz_cull_type,
) -> ::std::os::raw::c_int,
>,
}
#[test]
fn bindgen_test_layout_pdf_sanitize_filter_options() {
const UNINIT: ::std::mem::MaybeUninit<pdf_sanitize_filter_options> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_sanitize_filter_options>(),
40usize,
concat!("Size of: ", stringify!(pdf_sanitize_filter_options))
);
assert_eq!(
::std::mem::align_of::<pdf_sanitize_filter_options>(),
8usize,
concat!("Alignment of ", stringify!(pdf_sanitize_filter_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_sanitize_filter_options),
"::",
stringify!(opaque)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).image_filter) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_sanitize_filter_options),
"::",
stringify!(image_filter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text_filter) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_sanitize_filter_options),
"::",
stringify!(text_filter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).after_text_object) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_sanitize_filter_options),
"::",
stringify!(after_text_object)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).culler) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_sanitize_filter_options),
"::",
stringify!(culler)
)
);
}
extern "C" {
pub fn pdf_new_sanitize_filter(
ctx: *mut fz_context,
doc: *mut pdf_document,
chain: *mut pdf_processor,
struct_parents: ::std::os::raw::c_int,
transform: fz_matrix,
options: *mut pdf_filter_options,
sopts: *mut ::std::os::raw::c_void,
) -> *mut pdf_processor;
}
extern "C" {
pub fn pdf_filter_xobject_instance(
ctx: *mut fz_context,
old_xobj: *mut pdf_obj,
page_res: *mut pdf_obj,
ctm: fz_matrix,
options: *mut pdf_filter_options,
cycle_up: *mut pdf_cycle_list,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_processor_push_resources(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
res: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_processor_pop_resources(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
) -> *mut pdf_obj;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_color_filter_options {
pub opaque: *mut ::std::os::raw::c_void,
pub color_rewrite: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
cs: *mut *mut pdf_obj,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
),
>,
pub image_rewrite: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
opaque: *mut ::std::os::raw::c_void,
image: *mut *mut fz_image,
),
>,
pub shade_rewrite: pdf_shade_recolorer,
}
#[test]
fn bindgen_test_layout_pdf_color_filter_options() {
const UNINIT: ::std::mem::MaybeUninit<pdf_color_filter_options> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_color_filter_options>(),
32usize,
concat!("Size of: ", stringify!(pdf_color_filter_options))
);
assert_eq!(
::std::mem::align_of::<pdf_color_filter_options>(),
8usize,
concat!("Alignment of ", stringify!(pdf_color_filter_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opaque) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_color_filter_options),
"::",
stringify!(opaque)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).color_rewrite) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_color_filter_options),
"::",
stringify!(color_rewrite)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).image_rewrite) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_color_filter_options),
"::",
stringify!(image_rewrite)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).shade_rewrite) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_color_filter_options),
"::",
stringify!(shade_rewrite)
)
);
}
extern "C" {
pub fn pdf_new_color_filter(
ctx: *mut fz_context,
doc: *mut pdf_document,
chain: *mut pdf_processor,
struct_parents: ::std::os::raw::c_int,
transform: fz_matrix,
options: *mut pdf_filter_options,
copts: *mut ::std::os::raw::c_void,
) -> *mut pdf_processor;
}
extern "C" {
pub fn pdf_process_contents(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
doc: *mut pdf_document,
obj: *mut pdf_obj,
res: *mut pdf_obj,
cookie: *mut fz_cookie,
out_res: *mut *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_process_annot(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
annot: *mut pdf_annot,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_process_glyph(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
doc: *mut pdf_document,
resources: *mut pdf_obj,
contents: *mut fz_buffer,
);
}
extern "C" {
pub fn pdf_process_raw_contents(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
doc: *mut pdf_document,
rdb: *mut pdf_obj,
stmobj: *mut pdf_obj,
cookie: *mut fz_cookie,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_text_state {
pub char_space: f32,
pub word_space: f32,
pub scale: f32,
pub leading: f32,
pub font: *mut pdf_font_desc,
pub size: f32,
pub render: ::std::os::raw::c_int,
pub rise: f32,
}
#[test]
fn bindgen_test_layout_pdf_text_state() {
const UNINIT: ::std::mem::MaybeUninit<pdf_text_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_text_state>(),
40usize,
concat!("Size of: ", stringify!(pdf_text_state))
);
assert_eq!(
::std::mem::align_of::<pdf_text_state>(),
8usize,
concat!("Alignment of ", stringify!(pdf_text_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).char_space) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(char_space)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).word_space) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(word_space)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(scale)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).leading) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(leading)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).font) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).render) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(render)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rise) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(rise)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_text_object_state {
pub text: *mut fz_text,
pub text_bbox: fz_rect,
pub tlm: fz_matrix,
pub tm: fz_matrix,
pub text_mode: ::std::os::raw::c_int,
pub cid: ::std::os::raw::c_int,
pub gid: ::std::os::raw::c_int,
pub char_bbox: fz_rect,
pub fontdesc: *mut pdf_font_desc,
pub char_tx: f32,
pub char_ty: f32,
}
#[test]
fn bindgen_test_layout_pdf_text_object_state() {
const UNINIT: ::std::mem::MaybeUninit<pdf_text_object_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_text_object_state>(),
120usize,
concat!("Size of: ", stringify!(pdf_text_object_state))
);
assert_eq!(
::std::mem::align_of::<pdf_text_object_state>(),
8usize,
concat!("Alignment of ", stringify!(pdf_text_object_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text_bbox) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text_bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tlm) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(tlm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tm) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(tm)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).text_mode) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text_mode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cid) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(cid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).char_bbox) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(char_bbox)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fontdesc) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(fontdesc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).char_tx) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(char_tx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).char_ty) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(char_ty)
)
);
}
extern "C" {
pub fn pdf_tos_save(
ctx: *mut fz_context,
tos: *mut pdf_text_object_state,
save: *mut fz_matrix,
);
}
extern "C" {
pub fn pdf_tos_restore(
ctx: *mut fz_context,
tos: *mut pdf_text_object_state,
save: *mut fz_matrix,
);
}
extern "C" {
pub fn pdf_tos_get_text(ctx: *mut fz_context, tos: *mut pdf_text_object_state) -> *mut fz_text;
}
extern "C" {
pub fn pdf_tos_reset(
ctx: *mut fz_context,
tos: *mut pdf_text_object_state,
render: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_tos_make_trm(
ctx: *mut fz_context,
tos: *mut pdf_text_object_state,
text: *mut pdf_text_state,
fontdesc: *mut pdf_font_desc,
cid: ::std::os::raw::c_int,
trm: *mut fz_matrix,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_tos_move_after_char(ctx: *mut fz_context, tos: *mut pdf_text_object_state);
}
extern "C" {
pub fn pdf_tos_translate(tos: *mut pdf_text_object_state, tx: f32, ty: f32);
}
extern "C" {
pub fn pdf_tos_set_matrix(
tos: *mut pdf_text_object_state,
a: f32,
b: f32,
c: f32,
d: f32,
e: f32,
f: f32,
);
}
extern "C" {
pub fn pdf_tos_newline(tos: *mut pdf_text_object_state, leading: f32);
}
extern "C" {
pub fn pdf_lookup_page_number(
ctx: *mut fz_context,
doc: *mut pdf_document,
pageobj: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_count_pages(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_count_pages_imp(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_lookup_page_obj(
ctx: *mut fz_context,
doc: *mut pdf_document,
needle: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_page_tree(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_drop_page_tree(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_drop_page_tree_internal(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_lookup_anchor(
ctx: *mut fz_context,
doc: *mut pdf_document,
name: *const ::std::os::raw::c_char,
xp: *mut f32,
yp: *mut f32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_flatten_inheritable_page_items(ctx: *mut fz_context, page: *mut pdf_obj);
}
extern "C" {
pub fn pdf_load_page(
ctx: *mut fz_context,
doc: *mut pdf_document,
number: ::std::os::raw::c_int,
) -> *mut pdf_page;
}
extern "C" {
pub fn pdf_load_page_imp(
ctx: *mut fz_context,
doc: *mut fz_document,
chapter: ::std::os::raw::c_int,
number: ::std::os::raw::c_int,
) -> *mut fz_page;
}
extern "C" {
pub fn pdf_page_has_transparency(
ctx: *mut fz_context,
page: *mut pdf_page,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_page_obj_transform(
ctx: *mut fz_context,
pageobj: *mut pdf_obj,
page_mediabox: *mut fz_rect,
page_ctm: *mut fz_matrix,
);
}
extern "C" {
pub fn pdf_page_transform(
ctx: *mut fz_context,
page: *mut pdf_page,
mediabox: *mut fz_rect,
ctm: *mut fz_matrix,
);
}
extern "C" {
pub fn pdf_page_resources(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_page_contents(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_page_group(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_page_separations(ctx: *mut fz_context, page: *mut pdf_page) -> *mut fz_separations;
}
extern "C" {
pub fn pdf_read_ocg(ctx: *mut fz_context, doc: *mut pdf_document) -> *mut pdf_ocg_descriptor;
}
extern "C" {
pub fn pdf_drop_ocg(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_is_ocg_hidden(
ctx: *mut fz_context,
doc: *mut pdf_document,
rdb: *mut pdf_obj,
usage: *const ::std::os::raw::c_char,
ocg: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_load_links(ctx: *mut fz_context, page: *mut pdf_page) -> *mut fz_link;
}
extern "C" {
pub fn pdf_bound_page(ctx: *mut fz_context, page: *mut pdf_page) -> fz_rect;
}
extern "C" {
pub fn pdf_run_page(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
usage: *const ::std::os::raw::c_char,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_contents(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_annots(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_widgets(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_contents_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
usage: *const ::std::os::raw::c_char,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_annots_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
usage: *const ::std::os::raw::c_char,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_run_page_widgets_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
dev: *mut fz_device,
ctm: fz_matrix,
usage: *const ::std::os::raw::c_char,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_filter_page_contents(
ctx: *mut fz_context,
doc: *mut pdf_document,
page: *mut pdf_page,
options: *mut pdf_filter_options,
);
}
extern "C" {
pub fn pdf_filter_annot_contents(
ctx: *mut fz_context,
doc: *mut pdf_document,
annot: *mut pdf_annot,
options: *mut pdf_filter_options,
);
}
extern "C" {
pub fn pdf_new_pixmap_from_page_contents_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
usage: *const ::std::os::raw::c_char,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn pdf_new_pixmap_from_page_with_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: ::std::os::raw::c_int,
usage: *const ::std::os::raw::c_char,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn pdf_new_pixmap_from_page_contents_with_separations_and_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
usage: *const ::std::os::raw::c_char,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn pdf_new_pixmap_from_page_with_separations_and_usage(
ctx: *mut fz_context,
page: *mut pdf_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
usage: *const ::std::os::raw::c_char,
) -> *mut fz_pixmap;
}
pub const PDF_REDACT_IMAGE_NONE: _bindgen_ty_31 = 0;
pub const PDF_REDACT_IMAGE_REMOVE: _bindgen_ty_31 = 1;
pub const PDF_REDACT_IMAGE_PIXELS: _bindgen_ty_31 = 2;
pub type _bindgen_ty_31 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_redact_options {
pub black_boxes: ::std::os::raw::c_int,
pub image_method: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_redact_options() {
const UNINIT: ::std::mem::MaybeUninit<pdf_redact_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_redact_options>(),
8usize,
concat!("Size of: ", stringify!(pdf_redact_options))
);
assert_eq!(
::std::mem::align_of::<pdf_redact_options>(),
4usize,
concat!("Alignment of ", stringify!(pdf_redact_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).black_boxes) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_redact_options),
"::",
stringify!(black_boxes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).image_method) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_redact_options),
"::",
stringify!(image_method)
)
);
}
extern "C" {
pub fn pdf_redact_page(
ctx: *mut fz_context,
doc: *mut pdf_document,
page: *mut pdf_page,
opts: *mut pdf_redact_options,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_page_presentation(
ctx: *mut fz_context,
page: *mut pdf_page,
transition: *mut fz_transition,
duration: *mut f32,
) -> *mut fz_transition;
}
extern "C" {
pub fn pdf_load_default_colorspaces(
ctx: *mut fz_context,
doc: *mut pdf_document,
page: *mut pdf_page,
) -> *mut fz_default_colorspaces;
}
extern "C" {
pub fn pdf_update_default_colorspaces(
ctx: *mut fz_context,
old_cs: *mut fz_default_colorspaces,
res: *mut pdf_obj,
) -> *mut fz_default_colorspaces;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_page {
pub super_: fz_page,
pub doc: *mut pdf_document,
pub obj: *mut pdf_obj,
pub transparency: ::std::os::raw::c_int,
pub overprint: ::std::os::raw::c_int,
pub links: *mut fz_link,
pub annots: *mut pdf_annot,
pub annot_tailp: *mut *mut pdf_annot,
pub widgets: *mut pdf_annot,
pub widget_tailp: *mut *mut pdf_annot,
}
#[test]
fn bindgen_test_layout_pdf_page() {
const UNINIT: ::std::mem::MaybeUninit<pdf_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_page>(),
216usize,
concat!("Size of: ", stringify!(pdf_page))
);
assert_eq!(
::std::mem::align_of::<pdf_page>(),
8usize,
concat!("Alignment of ", stringify!(pdf_page))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).super_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(super_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).doc) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).transparency) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(transparency)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).overprint) as usize - ptr as usize },
172usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(overprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).links) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(links)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).annots) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(annots)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).annot_tailp) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(annot_tailp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).widgets) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(widgets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).widget_tailp) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(widget_tailp)
)
);
}
pub const pdf_annot_type_PDF_ANNOT_TEXT: pdf_annot_type = 0;
pub const pdf_annot_type_PDF_ANNOT_LINK: pdf_annot_type = 1;
pub const pdf_annot_type_PDF_ANNOT_FREE_TEXT: pdf_annot_type = 2;
pub const pdf_annot_type_PDF_ANNOT_LINE: pdf_annot_type = 3;
pub const pdf_annot_type_PDF_ANNOT_SQUARE: pdf_annot_type = 4;
pub const pdf_annot_type_PDF_ANNOT_CIRCLE: pdf_annot_type = 5;
pub const pdf_annot_type_PDF_ANNOT_POLYGON: pdf_annot_type = 6;
pub const pdf_annot_type_PDF_ANNOT_POLY_LINE: pdf_annot_type = 7;
pub const pdf_annot_type_PDF_ANNOT_HIGHLIGHT: pdf_annot_type = 8;
pub const pdf_annot_type_PDF_ANNOT_UNDERLINE: pdf_annot_type = 9;
pub const pdf_annot_type_PDF_ANNOT_SQUIGGLY: pdf_annot_type = 10;
pub const pdf_annot_type_PDF_ANNOT_STRIKE_OUT: pdf_annot_type = 11;
pub const pdf_annot_type_PDF_ANNOT_REDACT: pdf_annot_type = 12;
pub const pdf_annot_type_PDF_ANNOT_STAMP: pdf_annot_type = 13;
pub const pdf_annot_type_PDF_ANNOT_CARET: pdf_annot_type = 14;
pub const pdf_annot_type_PDF_ANNOT_INK: pdf_annot_type = 15;
pub const pdf_annot_type_PDF_ANNOT_POPUP: pdf_annot_type = 16;
pub const pdf_annot_type_PDF_ANNOT_FILE_ATTACHMENT: pdf_annot_type = 17;
pub const pdf_annot_type_PDF_ANNOT_SOUND: pdf_annot_type = 18;
pub const pdf_annot_type_PDF_ANNOT_MOVIE: pdf_annot_type = 19;
pub const pdf_annot_type_PDF_ANNOT_RICH_MEDIA: pdf_annot_type = 20;
pub const pdf_annot_type_PDF_ANNOT_WIDGET: pdf_annot_type = 21;
pub const pdf_annot_type_PDF_ANNOT_SCREEN: pdf_annot_type = 22;
pub const pdf_annot_type_PDF_ANNOT_PRINTER_MARK: pdf_annot_type = 23;
pub const pdf_annot_type_PDF_ANNOT_TRAP_NET: pdf_annot_type = 24;
pub const pdf_annot_type_PDF_ANNOT_WATERMARK: pdf_annot_type = 25;
pub const pdf_annot_type_PDF_ANNOT_3D: pdf_annot_type = 26;
pub const pdf_annot_type_PDF_ANNOT_PROJECTION: pdf_annot_type = 27;
pub const pdf_annot_type_PDF_ANNOT_UNKNOWN: pdf_annot_type = -1;
pub type pdf_annot_type = ::std::os::raw::c_int;
extern "C" {
pub fn pdf_string_from_annot_type(
ctx: *mut fz_context,
type_: pdf_annot_type,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_annot_type_from_string(
ctx: *mut fz_context,
subtype: *const ::std::os::raw::c_char,
) -> pdf_annot_type;
}
pub const PDF_ANNOT_IS_INVISIBLE: _bindgen_ty_32 = 1;
pub const PDF_ANNOT_IS_HIDDEN: _bindgen_ty_32 = 2;
pub const PDF_ANNOT_IS_PRINT: _bindgen_ty_32 = 4;
pub const PDF_ANNOT_IS_NO_ZOOM: _bindgen_ty_32 = 8;
pub const PDF_ANNOT_IS_NO_ROTATE: _bindgen_ty_32 = 16;
pub const PDF_ANNOT_IS_NO_VIEW: _bindgen_ty_32 = 32;
pub const PDF_ANNOT_IS_READ_ONLY: _bindgen_ty_32 = 64;
pub const PDF_ANNOT_IS_LOCKED: _bindgen_ty_32 = 128;
pub const PDF_ANNOT_IS_TOGGLE_NO_VIEW: _bindgen_ty_32 = 256;
pub const PDF_ANNOT_IS_LOCKED_CONTENTS: _bindgen_ty_32 = 512;
pub type _bindgen_ty_32 = ::std::os::raw::c_uint;
pub const pdf_line_ending_PDF_ANNOT_LE_NONE: pdf_line_ending = 0;
pub const pdf_line_ending_PDF_ANNOT_LE_SQUARE: pdf_line_ending = 1;
pub const pdf_line_ending_PDF_ANNOT_LE_CIRCLE: pdf_line_ending = 2;
pub const pdf_line_ending_PDF_ANNOT_LE_DIAMOND: pdf_line_ending = 3;
pub const pdf_line_ending_PDF_ANNOT_LE_OPEN_ARROW: pdf_line_ending = 4;
pub const pdf_line_ending_PDF_ANNOT_LE_CLOSED_ARROW: pdf_line_ending = 5;
pub const pdf_line_ending_PDF_ANNOT_LE_BUTT: pdf_line_ending = 6;
pub const pdf_line_ending_PDF_ANNOT_LE_R_OPEN_ARROW: pdf_line_ending = 7;
pub const pdf_line_ending_PDF_ANNOT_LE_R_CLOSED_ARROW: pdf_line_ending = 8;
pub const pdf_line_ending_PDF_ANNOT_LE_SLASH: pdf_line_ending = 9;
pub type pdf_line_ending = ::std::os::raw::c_uint;
pub const PDF_ANNOT_Q_LEFT: _bindgen_ty_33 = 0;
pub const PDF_ANNOT_Q_CENTER: _bindgen_ty_33 = 1;
pub const PDF_ANNOT_Q_RIGHT: _bindgen_ty_33 = 2;
pub type _bindgen_ty_33 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_line_ending_from_name(ctx: *mut fz_context, end: *mut pdf_obj) -> pdf_line_ending;
}
extern "C" {
pub fn pdf_line_ending_from_string(
ctx: *mut fz_context,
end: *const ::std::os::raw::c_char,
) -> pdf_line_ending;
}
extern "C" {
pub fn pdf_name_from_line_ending(ctx: *mut fz_context, end: pdf_line_ending) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_string_from_line_ending(
ctx: *mut fz_context,
end: pdf_line_ending,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_keep_annot(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_drop_annot(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_first_annot(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_next_annot(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_annot_obj(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_annot_page(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_page;
}
extern "C" {
pub fn pdf_bound_annot(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_rect;
}
extern "C" {
pub fn pdf_annot_type(ctx: *mut fz_context, annot: *mut pdf_annot) -> pdf_annot_type;
}
extern "C" {
pub fn pdf_run_annot(
ctx: *mut fz_context,
annot: *mut pdf_annot,
dev: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
);
}
extern "C" {
pub fn pdf_lookup_name(
ctx: *mut fz_context,
doc: *mut pdf_document,
which: *mut pdf_obj,
needle: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_name_tree(
ctx: *mut fz_context,
doc: *mut pdf_document,
which: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_lookup_number(
ctx: *mut fz_context,
root: *mut pdf_obj,
needle: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_walk_tree(
ctx: *mut fz_context,
tree: *mut pdf_obj,
kid_name: *mut pdf_obj,
arrive: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut pdf_obj,
arg3: *mut ::std::os::raw::c_void,
arg4: *mut *mut pdf_obj,
),
>,
leave: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut fz_context,
arg2: *mut pdf_obj,
arg3: *mut ::std::os::raw::c_void,
),
>,
arg: *mut ::std::os::raw::c_void,
names: *mut *mut pdf_obj,
values: *mut *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_resolve_link(
ctx: *mut fz_context,
doc: *mut pdf_document,
uri: *const ::std::os::raw::c_char,
xp: *mut f32,
yp: *mut f32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_resolve_link_dest(
ctx: *mut fz_context,
doc: *mut pdf_document,
uri: *const ::std::os::raw::c_char,
) -> fz_link_dest;
}
extern "C" {
pub fn pdf_new_destination_from_link(
ctx: *mut fz_context,
doc: *mut pdf_document,
uri: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_new_action_from_link(
ctx: *mut fz_context,
doc: *mut pdf_document,
uri: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_format_link_uri(
ctx: *mut fz_context,
dest: fz_link_dest,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_parse_link_uri(
ctx: *mut fz_context,
uri: *const ::std::os::raw::c_char,
) -> fz_link_dest;
}
extern "C" {
pub fn pdf_annot_transform(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_matrix;
}
extern "C" {
pub fn pdf_new_link(
ctx: *mut fz_context,
page: *mut pdf_page,
rect: fz_rect,
uri: *const ::std::os::raw::c_char,
obj: *mut pdf_obj,
) -> *mut fz_link;
}
extern "C" {
pub fn pdf_create_annot_raw(
ctx: *mut fz_context,
page: *mut pdf_page,
type_: pdf_annot_type,
) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_create_link(
ctx: *mut fz_context,
page: *mut pdf_page,
bbox: fz_rect,
uri: *const ::std::os::raw::c_char,
) -> *mut fz_link;
}
extern "C" {
pub fn pdf_delete_link(ctx: *mut fz_context, page: *mut pdf_page, link: *mut fz_link);
}
pub const pdf_border_style_PDF_BORDER_STYLE_SOLID: pdf_border_style = 0;
pub const pdf_border_style_PDF_BORDER_STYLE_DASHED: pdf_border_style = 1;
pub const pdf_border_style_PDF_BORDER_STYLE_BEVELED: pdf_border_style = 2;
pub const pdf_border_style_PDF_BORDER_STYLE_INSET: pdf_border_style = 3;
pub const pdf_border_style_PDF_BORDER_STYLE_UNDERLINE: pdf_border_style = 4;
pub type pdf_border_style = ::std::os::raw::c_uint;
pub const pdf_border_effect_PDF_BORDER_EFFECT_NONE: pdf_border_effect = 0;
pub const pdf_border_effect_PDF_BORDER_EFFECT_CLOUDY: pdf_border_effect = 1;
pub type pdf_border_effect = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_create_annot(
ctx: *mut fz_context,
page: *mut pdf_page,
type_: pdf_annot_type,
) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_delete_annot(ctx: *mut fz_context, page: *mut pdf_page, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_set_annot_popup(ctx: *mut fz_context, annot: *mut pdf_annot, rect: fz_rect);
}
extern "C" {
pub fn pdf_annot_popup(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_rect;
}
extern "C" {
pub fn pdf_annot_has_rect(ctx: *mut fz_context, annot: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_ink_list(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_quad_points(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_vertices(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_line(ctx: *mut fz_context, annot: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_interior_color(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_line_ending_styles(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_border(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_border_effect(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_icon_name(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_open(ctx: *mut fz_context, annot: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_has_author(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_flags(ctx: *mut fz_context, annot: *mut pdf_annot) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_rect(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_rect;
}
extern "C" {
pub fn pdf_annot_border(ctx: *mut fz_context, annot: *mut pdf_annot) -> f32;
}
extern "C" {
pub fn pdf_annot_border_style(ctx: *mut fz_context, annot: *mut pdf_annot) -> pdf_border_style;
}
extern "C" {
pub fn pdf_annot_border_width(ctx: *mut fz_context, annot: *mut pdf_annot) -> f32;
}
extern "C" {
pub fn pdf_annot_border_dash_count(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_border_dash_item(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
) -> f32;
}
extern "C" {
pub fn pdf_annot_border_effect(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> pdf_border_effect;
}
extern "C" {
pub fn pdf_annot_border_effect_intensity(ctx: *mut fz_context, annot: *mut pdf_annot) -> f32;
}
extern "C" {
pub fn pdf_annot_opacity(ctx: *mut fz_context, annot: *mut pdf_annot) -> f32;
}
extern "C" {
pub fn pdf_annot_color(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_annot_interior_color(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_annot_quadding(ctx: *mut fz_context, annot: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_language(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_text_language;
}
extern "C" {
pub fn pdf_annot_quad_point_count(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_quad_point(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
) -> fz_quad;
}
extern "C" {
pub fn pdf_annot_ink_list_count(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_ink_list_stroke_count(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_ink_list_stroke_vertex(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
k: ::std::os::raw::c_int,
) -> fz_point;
}
extern "C" {
pub fn pdf_set_annot_flags(
ctx: *mut fz_context,
annot: *mut pdf_annot,
flags: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_annot_stamp_image(
ctx: *mut fz_context,
annot: *mut pdf_annot,
image: *mut fz_image,
);
}
extern "C" {
pub fn pdf_set_annot_rect(ctx: *mut fz_context, annot: *mut pdf_annot, rect: fz_rect);
}
extern "C" {
pub fn pdf_set_annot_border(ctx: *mut fz_context, annot: *mut pdf_annot, width: f32);
}
extern "C" {
pub fn pdf_set_annot_border_style(
ctx: *mut fz_context,
annot: *mut pdf_annot,
style: pdf_border_style,
);
}
extern "C" {
pub fn pdf_set_annot_border_width(ctx: *mut fz_context, annot: *mut pdf_annot, width: f32);
}
extern "C" {
pub fn pdf_clear_annot_border_dash(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_add_annot_border_dash_item(ctx: *mut fz_context, annot: *mut pdf_annot, length: f32);
}
extern "C" {
pub fn pdf_set_annot_border_effect(
ctx: *mut fz_context,
annot: *mut pdf_annot,
effect: pdf_border_effect,
);
}
extern "C" {
pub fn pdf_set_annot_border_effect_intensity(
ctx: *mut fz_context,
annot: *mut pdf_annot,
intensity: f32,
);
}
extern "C" {
pub fn pdf_set_annot_opacity(ctx: *mut fz_context, annot: *mut pdf_annot, opacity: f32);
}
extern "C" {
pub fn pdf_set_annot_color(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
color: *const f32,
);
}
extern "C" {
pub fn pdf_set_annot_interior_color(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
color: *const f32,
);
}
extern "C" {
pub fn pdf_set_annot_quadding(
ctx: *mut fz_context,
annot: *mut pdf_annot,
q: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_annot_language(
ctx: *mut fz_context,
annot: *mut pdf_annot,
lang: fz_text_language,
);
}
extern "C" {
pub fn pdf_set_annot_quad_points(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
qv: *const fz_quad,
);
}
extern "C" {
pub fn pdf_clear_annot_quad_points(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_add_annot_quad_point(ctx: *mut fz_context, annot: *mut pdf_annot, quad: fz_quad);
}
extern "C" {
pub fn pdf_set_annot_ink_list(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
count: *const ::std::os::raw::c_int,
v: *const fz_point,
);
}
extern "C" {
pub fn pdf_clear_annot_ink_list(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_add_annot_ink_list_stroke(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_add_annot_ink_list_stroke_vertex(
ctx: *mut fz_context,
annot: *mut pdf_annot,
p: fz_point,
);
}
extern "C" {
pub fn pdf_add_annot_ink_list(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
stroke: *mut fz_point,
);
}
extern "C" {
pub fn pdf_set_annot_icon_name(
ctx: *mut fz_context,
annot: *mut pdf_annot,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_set_annot_is_open(
ctx: *mut fz_context,
annot: *mut pdf_annot,
is_open: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_annot_line_start_style(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> pdf_line_ending;
}
extern "C" {
pub fn pdf_annot_line_end_style(ctx: *mut fz_context, annot: *mut pdf_annot)
-> pdf_line_ending;
}
extern "C" {
pub fn pdf_annot_line_ending_styles(
ctx: *mut fz_context,
annot: *mut pdf_annot,
start_style: *mut pdf_line_ending,
end_style: *mut pdf_line_ending,
);
}
extern "C" {
pub fn pdf_set_annot_line_start_style(
ctx: *mut fz_context,
annot: *mut pdf_annot,
s: pdf_line_ending,
);
}
extern "C" {
pub fn pdf_set_annot_line_end_style(
ctx: *mut fz_context,
annot: *mut pdf_annot,
e: pdf_line_ending,
);
}
extern "C" {
pub fn pdf_set_annot_line_ending_styles(
ctx: *mut fz_context,
annot: *mut pdf_annot,
start_style: pdf_line_ending,
end_style: pdf_line_ending,
);
}
extern "C" {
pub fn pdf_annot_icon_name(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_annot_is_open(ctx: *mut fz_context, annot: *mut pdf_annot) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_is_standard_stamp(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_line(
ctx: *mut fz_context,
annot: *mut pdf_annot,
a: *mut fz_point,
b: *mut fz_point,
);
}
extern "C" {
pub fn pdf_set_annot_line(
ctx: *mut fz_context,
annot: *mut pdf_annot,
a: fz_point,
b: fz_point,
);
}
extern "C" {
pub fn pdf_annot_vertex_count(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_vertex(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
) -> fz_point;
}
extern "C" {
pub fn pdf_set_annot_vertices(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: ::std::os::raw::c_int,
v: *const fz_point,
);
}
extern "C" {
pub fn pdf_clear_annot_vertices(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_add_annot_vertex(ctx: *mut fz_context, annot: *mut pdf_annot, p: fz_point);
}
extern "C" {
pub fn pdf_set_annot_vertex(
ctx: *mut fz_context,
annot: *mut pdf_annot,
i: ::std::os::raw::c_int,
p: fz_point,
);
}
extern "C" {
pub fn pdf_annot_contents(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_set_annot_contents(
ctx: *mut fz_context,
annot: *mut pdf_annot,
text: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_annot_author(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_set_annot_author(
ctx: *mut fz_context,
annot: *mut pdf_annot,
author: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_annot_modification_date(ctx: *mut fz_context, annot: *mut pdf_annot) -> i64;
}
extern "C" {
pub fn pdf_set_annot_modification_date(ctx: *mut fz_context, annot: *mut pdf_annot, time: i64);
}
extern "C" {
pub fn pdf_annot_creation_date(ctx: *mut fz_context, annot: *mut pdf_annot) -> i64;
}
extern "C" {
pub fn pdf_set_annot_creation_date(ctx: *mut fz_context, annot: *mut pdf_annot, time: i64);
}
extern "C" {
pub fn pdf_parse_default_appearance(
ctx: *mut fz_context,
da: *const ::std::os::raw::c_char,
font: *mut *const ::std::os::raw::c_char,
size: *mut f32,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_print_default_appearance(
ctx: *mut fz_context,
buf: *mut ::std::os::raw::c_char,
nbuf: ::std::os::raw::c_int,
font: *const ::std::os::raw::c_char,
size: f32,
n: ::std::os::raw::c_int,
color: *const f32,
);
}
extern "C" {
pub fn pdf_annot_default_appearance(
ctx: *mut fz_context,
annot: *mut pdf_annot,
font: *mut *const ::std::os::raw::c_char,
size: *mut f32,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_set_annot_default_appearance(
ctx: *mut fz_context,
annot: *mut pdf_annot,
font: *const ::std::os::raw::c_char,
size: f32,
n: ::std::os::raw::c_int,
color: *const f32,
);
}
extern "C" {
pub fn pdf_annot_request_resynthesis(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_needs_resynthesis(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_annot_resynthesised(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_dirty_annot(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_field_flags(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_field_value(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_annot_field_label(
ctx: *mut fz_context,
widget: *mut pdf_annot,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_set_annot_field_value(
ctx: *mut fz_context,
doc: *mut pdf_document,
widget: *mut pdf_annot,
text: *const ::std::os::raw::c_char,
ignore_trigger_events: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_layout_fit_text(
ctx: *mut fz_context,
font: *mut fz_font,
lang: fz_text_language,
str_: *const ::std::os::raw::c_char,
bounds: fz_rect,
) -> *mut fz_text;
}
extern "C" {
pub fn pdf_annot_push_local_xref(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_pop_local_xref(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_ensure_local_xref(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_pop_and_discard_local_xref(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_update_annot(ctx: *mut fz_context, annot: *mut pdf_annot) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_update_page(ctx: *mut fz_context, page: *mut pdf_page) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_widget_editing_state(
ctx: *mut fz_context,
widget: *mut pdf_annot,
editing: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_get_widget_editing_state(
ctx: *mut fz_context,
widget: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_toggle_widget(ctx: *mut fz_context, widget: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_new_display_list_from_annot(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *mut fz_display_list;
}
extern "C" {
pub fn pdf_new_pixmap_from_annot(
ctx: *mut fz_context,
annot: *mut pdf_annot,
ctm: fz_matrix,
cs: *mut fz_colorspace,
seps: *mut fz_separations,
alpha: ::std::os::raw::c_int,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn pdf_new_stext_page_from_annot(
ctx: *mut fz_context,
annot: *mut pdf_annot,
options: *const fz_stext_options,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn pdf_layout_text_widget(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> *mut fz_layout_block;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_embedded_file_params {
pub filename: *const ::std::os::raw::c_char,
pub mimetype: *const ::std::os::raw::c_char,
pub size: ::std::os::raw::c_int,
pub created: i64,
pub modified: i64,
}
#[test]
fn bindgen_test_layout_pdf_embedded_file_params() {
const UNINIT: ::std::mem::MaybeUninit<pdf_embedded_file_params> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_embedded_file_params>(),
40usize,
concat!("Size of: ", stringify!(pdf_embedded_file_params))
);
assert_eq!(
::std::mem::align_of::<pdf_embedded_file_params>(),
8usize,
concat!("Alignment of ", stringify!(pdf_embedded_file_params))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).filename) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_embedded_file_params),
"::",
stringify!(filename)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mimetype) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_embedded_file_params),
"::",
stringify!(mimetype)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_embedded_file_params),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).created) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_embedded_file_params),
"::",
stringify!(created)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).modified) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_embedded_file_params),
"::",
stringify!(modified)
)
);
}
extern "C" {
pub fn pdf_is_embedded_file(ctx: *mut fz_context, fs: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_add_embedded_file(
ctx: *mut fz_context,
doc: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
mimetype: *const ::std::os::raw::c_char,
contents: *mut fz_buffer,
created: i64,
modifed: i64,
add_checksum: ::std::os::raw::c_int,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_get_embedded_file_params(
ctx: *mut fz_context,
fs: *mut pdf_obj,
out: *mut pdf_embedded_file_params,
);
}
extern "C" {
pub fn pdf_load_embedded_file_contents(
ctx: *mut fz_context,
fs: *mut pdf_obj,
) -> *mut fz_buffer;
}
extern "C" {
pub fn pdf_verify_embedded_file_checksum(
ctx: *mut fz_context,
fs: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_parse_link_dest(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_parse_link_action(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
pagenum: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_lookup_dest(
ctx: *mut fz_context,
doc: *mut pdf_document,
needle: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_load_link_annots(
ctx: *mut fz_context,
arg1: *mut pdf_document,
arg2: *mut pdf_page,
annots: *mut pdf_obj,
pagenum: ::std::os::raw::c_int,
page_ctm: fz_matrix,
) -> *mut fz_link;
}
extern "C" {
pub fn pdf_annot_MK_BG(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_annot_MK_BC(
ctx: *mut fz_context,
annot: *mut pdf_annot,
n: *mut ::std::os::raw::c_int,
color: *mut f32,
);
}
extern "C" {
pub fn pdf_annot_MK_BG_rgb(
ctx: *mut fz_context,
annot: *mut pdf_annot,
rgb: *mut f32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_MK_BC_rgb(
ctx: *mut fz_context,
annot: *mut pdf_annot,
rgb: *mut f32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_ap(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_annot_active(ctx: *mut fz_context, annot: *mut pdf_annot) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_annot_active(
ctx: *mut fz_context,
annot: *mut pdf_annot,
active: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_annot_hot(ctx: *mut fz_context, annot: *mut pdf_annot) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_annot_hot(
ctx: *mut fz_context,
annot: *mut pdf_annot,
hot: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_set_annot_appearance(
ctx: *mut fz_context,
annot: *mut pdf_annot,
appearance: *const ::std::os::raw::c_char,
state: *const ::std::os::raw::c_char,
ctm: fz_matrix,
bbox: fz_rect,
res: *mut pdf_obj,
contents: *mut fz_buffer,
);
}
extern "C" {
pub fn pdf_set_annot_appearance_from_display_list(
ctx: *mut fz_context,
annot: *mut pdf_annot,
appearance: *const ::std::os::raw::c_char,
state: *const ::std::os::raw::c_char,
ctm: fz_matrix,
list: *mut fz_display_list,
);
}
extern "C" {
pub fn pdf_annot_has_filespec(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_annot_filespec(ctx: *mut fz_context, annot: *mut pdf_annot) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_set_annot_filespec(ctx: *mut fz_context, annot: *mut pdf_annot, obj: *mut pdf_obj);
}
extern "C" {
pub fn pdf_annot_hidden_for_editing(
ctx: *mut fz_context,
annot: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_annot_hidden_for_editing(
ctx: *mut fz_context,
annot: *mut pdf_annot,
hidden: ::std::os::raw::c_int,
);
}
pub const pdf_widget_type_PDF_WIDGET_TYPE_UNKNOWN: pdf_widget_type = 0;
pub const pdf_widget_type_PDF_WIDGET_TYPE_BUTTON: pdf_widget_type = 1;
pub const pdf_widget_type_PDF_WIDGET_TYPE_CHECKBOX: pdf_widget_type = 2;
pub const pdf_widget_type_PDF_WIDGET_TYPE_COMBOBOX: pdf_widget_type = 3;
pub const pdf_widget_type_PDF_WIDGET_TYPE_LISTBOX: pdf_widget_type = 4;
pub const pdf_widget_type_PDF_WIDGET_TYPE_RADIOBUTTON: pdf_widget_type = 5;
pub const pdf_widget_type_PDF_WIDGET_TYPE_SIGNATURE: pdf_widget_type = 6;
pub const pdf_widget_type_PDF_WIDGET_TYPE_TEXT: pdf_widget_type = 7;
pub type pdf_widget_type = ::std::os::raw::c_uint;
pub const pdf_widget_tx_format_PDF_WIDGET_TX_FORMAT_NONE: pdf_widget_tx_format = 0;
pub const pdf_widget_tx_format_PDF_WIDGET_TX_FORMAT_NUMBER: pdf_widget_tx_format = 1;
pub const pdf_widget_tx_format_PDF_WIDGET_TX_FORMAT_SPECIAL: pdf_widget_tx_format = 2;
pub const pdf_widget_tx_format_PDF_WIDGET_TX_FORMAT_DATE: pdf_widget_tx_format = 3;
pub const pdf_widget_tx_format_PDF_WIDGET_TX_FORMAT_TIME: pdf_widget_tx_format = 4;
pub type pdf_widget_tx_format = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_keep_widget(ctx: *mut fz_context, widget: *mut pdf_annot) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_drop_widget(ctx: *mut fz_context, widget: *mut pdf_annot);
}
extern "C" {
pub fn pdf_first_widget(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_next_widget(ctx: *mut fz_context, previous: *mut pdf_annot) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_update_widget(ctx: *mut fz_context, widget: *mut pdf_annot)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_create_signature_widget(
ctx: *mut fz_context,
page: *mut pdf_page,
name: *mut ::std::os::raw::c_char,
) -> *mut pdf_annot;
}
extern "C" {
pub fn pdf_widget_type(ctx: *mut fz_context, widget: *mut pdf_annot) -> pdf_widget_type;
}
extern "C" {
pub fn pdf_bound_widget(ctx: *mut fz_context, widget: *mut pdf_annot) -> fz_rect;
}
extern "C" {
pub fn pdf_text_widget_max_len(
ctx: *mut fz_context,
tw: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_text_widget_format(
ctx: *mut fz_context,
tw: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_options(
ctx: *mut fz_context,
tw: *mut pdf_annot,
exportval: ::std::os::raw::c_int,
opts: *mut *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_is_multiselect(
ctx: *mut fz_context,
tw: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_value(
ctx: *mut fz_context,
tw: *mut pdf_annot,
opts: *mut *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_set_value(
ctx: *mut fz_context,
tw: *mut pdf_annot,
n: ::std::os::raw::c_int,
opts: *mut *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_choice_field_option_count(
ctx: *mut fz_context,
field: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_field_option(
ctx: *mut fz_context,
field: *mut pdf_obj,
exportval: ::std::os::raw::c_int,
i: ::std::os::raw::c_int,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_widget_is_signed(
ctx: *mut fz_context,
widget: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_widget_is_readonly(
ctx: *mut fz_context,
widget: *mut pdf_annot,
) -> ::std::os::raw::c_int;
}
pub const PDF_FIELD_IS_READ_ONLY: _bindgen_ty_34 = 1;
pub const PDF_FIELD_IS_REQUIRED: _bindgen_ty_34 = 2;
pub const PDF_FIELD_IS_NO_EXPORT: _bindgen_ty_34 = 4;
pub const PDF_TX_FIELD_IS_MULTILINE: _bindgen_ty_34 = 4096;
pub const PDF_TX_FIELD_IS_PASSWORD: _bindgen_ty_34 = 8192;
pub const PDF_TX_FIELD_IS_FILE_SELECT: _bindgen_ty_34 = 1048576;
pub const PDF_TX_FIELD_IS_DO_NOT_SPELL_CHECK: _bindgen_ty_34 = 4194304;
pub const PDF_TX_FIELD_IS_DO_NOT_SCROLL: _bindgen_ty_34 = 8388608;
pub const PDF_TX_FIELD_IS_COMB: _bindgen_ty_34 = 16777216;
pub const PDF_TX_FIELD_IS_RICH_TEXT: _bindgen_ty_34 = 33554432;
pub const PDF_BTN_FIELD_IS_NO_TOGGLE_TO_OFF: _bindgen_ty_34 = 16384;
pub const PDF_BTN_FIELD_IS_RADIO: _bindgen_ty_34 = 32768;
pub const PDF_BTN_FIELD_IS_PUSHBUTTON: _bindgen_ty_34 = 65536;
pub const PDF_BTN_FIELD_IS_RADIOS_IN_UNISON: _bindgen_ty_34 = 33554432;
pub const PDF_CH_FIELD_IS_COMBO: _bindgen_ty_34 = 131072;
pub const PDF_CH_FIELD_IS_EDIT: _bindgen_ty_34 = 262144;
pub const PDF_CH_FIELD_IS_SORT: _bindgen_ty_34 = 524288;
pub const PDF_CH_FIELD_IS_MULTI_SELECT: _bindgen_ty_34 = 2097152;
pub const PDF_CH_FIELD_IS_DO_NOT_SPELL_CHECK: _bindgen_ty_34 = 4194304;
pub const PDF_CH_FIELD_IS_COMMIT_ON_SEL_CHANGE: _bindgen_ty_34 = 33554432;
pub type _bindgen_ty_34 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_calculate_form(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_reset_form(
ctx: *mut fz_context,
doc: *mut pdf_document,
fields: *mut pdf_obj,
exclude: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_field_type(ctx: *mut fz_context, field: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_field_type_string(
ctx: *mut fz_context,
field: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_field_flags(ctx: *mut fz_context, field: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_field_name(ctx: *mut fz_context, field: *mut pdf_obj)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_field_value(
ctx: *mut fz_context,
field: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_create_field_name(
ctx: *mut fz_context,
doc: *mut pdf_document,
prefix: *const ::std::os::raw::c_char,
buf: *mut ::std::os::raw::c_char,
len: usize,
);
}
extern "C" {
pub fn pdf_field_border_style(
ctx: *mut fz_context,
field: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_field_set_border_style(
ctx: *mut fz_context,
field: *mut pdf_obj,
text: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_field_set_button_caption(
ctx: *mut fz_context,
field: *mut pdf_obj,
text: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_field_set_fill_color(ctx: *mut fz_context, field: *mut pdf_obj, col: *mut pdf_obj);
}
extern "C" {
pub fn pdf_field_set_text_color(ctx: *mut fz_context, field: *mut pdf_obj, col: *mut pdf_obj);
}
extern "C" {
pub fn pdf_field_display(ctx: *mut fz_context, field: *mut pdf_obj) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_field_set_display(
ctx: *mut fz_context,
field: *mut pdf_obj,
d: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_field_label(
ctx: *mut fz_context,
field: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_button_field_on_state(ctx: *mut fz_context, field: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_set_field_value(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
text: *const ::std::os::raw::c_char,
ignore_trigger_events: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_text_field_value(
ctx: *mut fz_context,
widget: *mut pdf_annot,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_set_choice_field_value(
ctx: *mut fz_context,
widget: *mut pdf_annot,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_edit_text_field_value(
ctx: *mut fz_context,
widget: *mut pdf_annot,
value: *const ::std::os::raw::c_char,
change: *const ::std::os::raw::c_char,
selStart: *mut ::std::os::raw::c_int,
selEnd: *mut ::std::os::raw::c_int,
newvalue: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_pkcs7_distinguished_name {
pub cn: *mut ::std::os::raw::c_char,
pub o: *mut ::std::os::raw::c_char,
pub ou: *mut ::std::os::raw::c_char,
pub email: *mut ::std::os::raw::c_char,
pub c: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_pdf_pkcs7_distinguished_name() {
const UNINIT: ::std::mem::MaybeUninit<pdf_pkcs7_distinguished_name> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_distinguished_name>(),
40usize,
concat!("Size of: ", stringify!(pdf_pkcs7_distinguished_name))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_distinguished_name>(),
8usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_distinguished_name))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cn) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_distinguished_name),
"::",
stringify!(cn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).o) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_distinguished_name),
"::",
stringify!(o)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ou) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_distinguished_name),
"::",
stringify!(ou)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).email) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_distinguished_name),
"::",
stringify!(email)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_distinguished_name),
"::",
stringify!(c)
)
);
}
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_OKAY: pdf_signature_error = 0;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_NO_SIGNATURES: pdf_signature_error = 1;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_NO_CERTIFICATE: pdf_signature_error = 2;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_DIGEST_FAILURE: pdf_signature_error = 3;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_SELF_SIGNED: pdf_signature_error = 4;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_SELF_SIGNED_IN_CHAIN: pdf_signature_error = 5;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_NOT_TRUSTED: pdf_signature_error = 6;
pub const pdf_signature_error_PDF_SIGNATURE_ERROR_UNKNOWN: pdf_signature_error = 7;
pub type pdf_signature_error = ::std::os::raw::c_uint;
pub type pdf_pkcs7_keep_signer_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
signer: *mut pdf_pkcs7_signer,
) -> *mut pdf_pkcs7_signer,
>;
pub type pdf_pkcs7_drop_signer_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, signer: *mut pdf_pkcs7_signer),
>;
pub type pdf_pkcs7_get_signing_name_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
signer: *mut pdf_pkcs7_signer,
) -> *mut pdf_pkcs7_distinguished_name,
>;
pub type pdf_pkcs7_max_digest_size_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, signer: *mut pdf_pkcs7_signer) -> usize,
>;
pub type pdf_pkcs7_create_digest_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
signer: *mut pdf_pkcs7_signer,
in_: *mut fz_stream,
digest: *mut ::std::os::raw::c_uchar,
digest_len: usize,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_pkcs7_signer {
pub keep: pdf_pkcs7_keep_signer_fn,
pub drop: pdf_pkcs7_drop_signer_fn,
pub get_signing_name: pdf_pkcs7_get_signing_name_fn,
pub max_digest_size: pdf_pkcs7_max_digest_size_fn,
pub create_digest: pdf_pkcs7_create_digest_fn,
}
#[test]
fn bindgen_test_layout_pdf_pkcs7_signer() {
const UNINIT: ::std::mem::MaybeUninit<pdf_pkcs7_signer> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_signer>(),
40usize,
concat!("Size of: ", stringify!(pdf_pkcs7_signer))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_signer>(),
8usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_signer))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).keep) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(keep)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).get_signing_name) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(get_signing_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_digest_size) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(max_digest_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).create_digest) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(create_digest)
)
);
}
pub type pdf_pkcs7_drop_verifier_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut fz_context, verifier: *mut pdf_pkcs7_verifier),
>;
pub type pdf_pkcs7_check_certificate_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
signature: *mut ::std::os::raw::c_uchar,
len: usize,
) -> pdf_signature_error,
>;
pub type pdf_pkcs7_check_digest_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
in_: *mut fz_stream,
signature: *mut ::std::os::raw::c_uchar,
len: usize,
) -> pdf_signature_error,
>;
pub type pdf_pkcs7_get_signatory_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
signature: *mut ::std::os::raw::c_uchar,
len: usize,
) -> *mut pdf_pkcs7_distinguished_name,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_pkcs7_verifier {
pub drop: pdf_pkcs7_drop_verifier_fn,
pub check_certificate: pdf_pkcs7_check_certificate_fn,
pub check_digest: pdf_pkcs7_check_digest_fn,
pub get_signatory: pdf_pkcs7_get_signatory_fn,
}
#[test]
fn bindgen_test_layout_pdf_pkcs7_verifier() {
const UNINIT: ::std::mem::MaybeUninit<pdf_pkcs7_verifier> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_verifier>(),
32usize,
concat!("Size of: ", stringify!(pdf_pkcs7_verifier))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_verifier>(),
8usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_verifier))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).check_certificate) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(check_certificate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).check_digest) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(check_digest)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).get_signatory) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(get_signatory)
)
);
}
extern "C" {
pub fn pdf_signature_is_signed(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_signature_set_value(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
signer: *mut pdf_pkcs7_signer,
stime: i64,
);
}
extern "C" {
pub fn pdf_count_signatures(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_signature_error_description(err: pdf_signature_error)
-> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_signature_get_signatory(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
doc: *mut pdf_document,
signature: *mut pdf_obj,
) -> *mut pdf_pkcs7_distinguished_name;
}
extern "C" {
pub fn pdf_signature_get_widget_signatory(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
widget: *mut pdf_annot,
) -> *mut pdf_pkcs7_distinguished_name;
}
extern "C" {
pub fn pdf_signature_drop_distinguished_name(
ctx: *mut fz_context,
name: *mut pdf_pkcs7_distinguished_name,
);
}
extern "C" {
pub fn pdf_signature_format_distinguished_name(
ctx: *mut fz_context,
name: *mut pdf_pkcs7_distinguished_name,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_signature_info(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
dn: *mut pdf_pkcs7_distinguished_name,
reason: *const ::std::os::raw::c_char,
location: *const ::std::os::raw::c_char,
date: i64,
include_labels: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_signature_appearance_signed(
ctx: *mut fz_context,
rect: fz_rect,
lang: fz_text_language,
img: *mut fz_image,
left_text: *const ::std::os::raw::c_char,
right_text: *const ::std::os::raw::c_char,
include_logo: ::std::os::raw::c_int,
) -> *mut fz_display_list;
}
extern "C" {
pub fn pdf_signature_appearance_unsigned(
ctx: *mut fz_context,
rect: fz_rect,
lang: fz_text_language,
) -> *mut fz_display_list;
}
extern "C" {
pub fn pdf_check_digest(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
doc: *mut pdf_document,
signature: *mut pdf_obj,
) -> pdf_signature_error;
}
extern "C" {
pub fn pdf_check_certificate(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
doc: *mut pdf_document,
signature: *mut pdf_obj,
) -> pdf_signature_error;
}
extern "C" {
pub fn pdf_check_widget_digest(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
widget: *mut pdf_annot,
) -> pdf_signature_error;
}
extern "C" {
pub fn pdf_check_widget_certificate(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
widget: *mut pdf_annot,
) -> pdf_signature_error;
}
extern "C" {
pub fn pdf_clear_signature(ctx: *mut fz_context, widget: *mut pdf_annot);
}
extern "C" {
pub fn pdf_sign_signature_with_appearance(
ctx: *mut fz_context,
widget: *mut pdf_annot,
signer: *mut pdf_pkcs7_signer,
date: i64,
disp_list: *mut fz_display_list,
);
}
pub const PDF_SIGNATURE_SHOW_LABELS: _bindgen_ty_35 = 1;
pub const PDF_SIGNATURE_SHOW_DN: _bindgen_ty_35 = 2;
pub const PDF_SIGNATURE_SHOW_DATE: _bindgen_ty_35 = 4;
pub const PDF_SIGNATURE_SHOW_TEXT_NAME: _bindgen_ty_35 = 8;
pub const PDF_SIGNATURE_SHOW_GRAPHIC_NAME: _bindgen_ty_35 = 16;
pub const PDF_SIGNATURE_SHOW_LOGO: _bindgen_ty_35 = 32;
pub type _bindgen_ty_35 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_sign_signature(
ctx: *mut fz_context,
widget: *mut pdf_annot,
signer: *mut pdf_pkcs7_signer,
appearance_flags: ::std::os::raw::c_int,
graphic: *mut fz_image,
reason: *const ::std::os::raw::c_char,
location: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_preview_signature_as_display_list(
ctx: *mut fz_context,
w: f32,
h: f32,
lang: fz_text_language,
signer: *mut pdf_pkcs7_signer,
appearance_flags: ::std::os::raw::c_int,
graphic: *mut fz_image,
reason: *const ::std::os::raw::c_char,
location: *const ::std::os::raw::c_char,
) -> *mut fz_display_list;
}
extern "C" {
pub fn pdf_preview_signature_as_pixmap(
ctx: *mut fz_context,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
lang: fz_text_language,
signer: *mut pdf_pkcs7_signer,
appearance_flags: ::std::os::raw::c_int,
graphic: *mut fz_image,
reason: *const ::std::os::raw::c_char,
location: *const ::std::os::raw::c_char,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn pdf_check_signature(
ctx: *mut fz_context,
verifier: *mut pdf_pkcs7_verifier,
doc: *mut pdf_document,
signature: *mut pdf_obj,
ebuf: *mut ::std::os::raw::c_char,
ebufsize: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_drop_signer(ctx: *mut fz_context, signer: *mut pdf_pkcs7_signer);
}
extern "C" {
pub fn pdf_drop_verifier(ctx: *mut fz_context, verifier: *mut pdf_pkcs7_verifier);
}
extern "C" {
pub fn pdf_field_reset(ctx: *mut fz_context, doc: *mut pdf_document, field: *mut pdf_obj);
}
extern "C" {
pub fn pdf_lookup_field(
ctx: *mut fz_context,
form: *mut pdf_obj,
name: *const ::std::os::raw::c_char,
) -> *mut pdf_obj;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_keystroke_event {
pub value: *const ::std::os::raw::c_char,
pub change: *const ::std::os::raw::c_char,
pub selStart: ::std::os::raw::c_int,
pub selEnd: ::std::os::raw::c_int,
pub willCommit: ::std::os::raw::c_int,
pub newChange: *mut ::std::os::raw::c_char,
pub newValue: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_pdf_keystroke_event() {
const UNINIT: ::std::mem::MaybeUninit<pdf_keystroke_event> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_keystroke_event>(),
48usize,
concat!("Size of: ", stringify!(pdf_keystroke_event))
);
assert_eq!(
::std::mem::align_of::<pdf_keystroke_event>(),
8usize,
concat!("Alignment of ", stringify!(pdf_keystroke_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).change) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(change)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).selStart) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(selStart)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).selEnd) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(selEnd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).willCommit) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(willCommit)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).newChange) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(newChange)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).newValue) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(newValue)
)
);
}
extern "C" {
pub fn pdf_field_event_keystroke(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
evt: *mut pdf_keystroke_event,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_field_event_validate(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
value: *const ::std::os::raw::c_char,
newvalue: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_field_event_calculate(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
);
}
extern "C" {
pub fn pdf_field_event_format(
ctx: *mut fz_context,
doc: *mut pdf_document,
field: *mut pdf_obj,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_annot_field_event_keystroke(
ctx: *mut fz_context,
doc: *mut pdf_document,
annot: *mut pdf_annot,
evt: *mut pdf_keystroke_event,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_document_event_will_close(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_document_event_will_save(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_document_event_did_save(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_document_event_will_print(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_document_event_did_print(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_page_event_open(ctx: *mut fz_context, page: *mut pdf_page);
}
extern "C" {
pub fn pdf_page_event_close(ctx: *mut fz_context, page: *mut pdf_page);
}
extern "C" {
pub fn pdf_annot_event_enter(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_exit(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_down(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_up(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_focus(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_blur(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_page_open(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_page_close(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_page_visible(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_annot_event_page_invisible(ctx: *mut fz_context, annot: *mut pdf_annot);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_doc_event {
pub type_: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_doc_event() {
const UNINIT: ::std::mem::MaybeUninit<pdf_doc_event> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_doc_event>(),
4usize,
concat!("Size of: ", stringify!(pdf_doc_event))
);
assert_eq!(
::std::mem::align_of::<pdf_doc_event>(),
4usize,
concat!("Alignment of ", stringify!(pdf_doc_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_doc_event),
"::",
stringify!(type_)
)
);
}
pub const PDF_DOCUMENT_EVENT_ALERT: _bindgen_ty_36 = 0;
pub const PDF_DOCUMENT_EVENT_PRINT: _bindgen_ty_36 = 1;
pub const PDF_DOCUMENT_EVENT_LAUNCH_URL: _bindgen_ty_36 = 2;
pub const PDF_DOCUMENT_EVENT_MAIL_DOC: _bindgen_ty_36 = 3;
pub const PDF_DOCUMENT_EVENT_SUBMIT: _bindgen_ty_36 = 4;
pub const PDF_DOCUMENT_EVENT_EXEC_MENU_ITEM: _bindgen_ty_36 = 5;
pub type _bindgen_ty_36 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_set_doc_event_callback(
ctx: *mut fz_context,
doc: *mut pdf_document,
event_cb: pdf_doc_event_cb,
free_event_data_cb: pdf_free_doc_event_data_cb,
data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn pdf_get_doc_event_callback_data(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> *mut ::std::os::raw::c_void;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_alert_event {
pub doc: *mut pdf_document,
pub message: *const ::std::os::raw::c_char,
pub icon_type: ::std::os::raw::c_int,
pub button_group_type: ::std::os::raw::c_int,
pub title: *const ::std::os::raw::c_char,
pub has_check_box: ::std::os::raw::c_int,
pub check_box_message: *const ::std::os::raw::c_char,
pub initially_checked: ::std::os::raw::c_int,
pub finally_checked: ::std::os::raw::c_int,
pub button_pressed: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_alert_event() {
const UNINIT: ::std::mem::MaybeUninit<pdf_alert_event> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_alert_event>(),
64usize,
concat!("Size of: ", stringify!(pdf_alert_event))
);
assert_eq!(
::std::mem::align_of::<pdf_alert_event>(),
8usize,
concat!("Alignment of ", stringify!(pdf_alert_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).doc) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).icon_type) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(icon_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).button_group_type) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(button_group_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).title) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).has_check_box) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(has_check_box)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).check_box_message) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(check_box_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).initially_checked) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(initially_checked)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).finally_checked) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(finally_checked)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).button_pressed) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(button_pressed)
)
);
}
pub const PDF_ALERT_ICON_ERROR: _bindgen_ty_37 = 0;
pub const PDF_ALERT_ICON_WARNING: _bindgen_ty_37 = 1;
pub const PDF_ALERT_ICON_QUESTION: _bindgen_ty_37 = 2;
pub const PDF_ALERT_ICON_STATUS: _bindgen_ty_37 = 3;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint;
pub const PDF_ALERT_BUTTON_GROUP_OK: _bindgen_ty_38 = 0;
pub const PDF_ALERT_BUTTON_GROUP_OK_CANCEL: _bindgen_ty_38 = 1;
pub const PDF_ALERT_BUTTON_GROUP_YES_NO: _bindgen_ty_38 = 2;
pub const PDF_ALERT_BUTTON_GROUP_YES_NO_CANCEL: _bindgen_ty_38 = 3;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
pub const PDF_ALERT_BUTTON_NONE: _bindgen_ty_39 = 0;
pub const PDF_ALERT_BUTTON_OK: _bindgen_ty_39 = 1;
pub const PDF_ALERT_BUTTON_CANCEL: _bindgen_ty_39 = 2;
pub const PDF_ALERT_BUTTON_NO: _bindgen_ty_39 = 3;
pub const PDF_ALERT_BUTTON_YES: _bindgen_ty_39 = 4;
pub type _bindgen_ty_39 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_access_alert_event(
ctx: *mut fz_context,
evt: *mut pdf_doc_event,
) -> *mut pdf_alert_event;
}
extern "C" {
pub fn pdf_access_exec_menu_item_event(
ctx: *mut fz_context,
evt: *mut pdf_doc_event,
) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_launch_url_event {
pub url: *const ::std::os::raw::c_char,
pub new_frame: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_launch_url_event() {
const UNINIT: ::std::mem::MaybeUninit<pdf_launch_url_event> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_launch_url_event>(),
16usize,
concat!("Size of: ", stringify!(pdf_launch_url_event))
);
assert_eq!(
::std::mem::align_of::<pdf_launch_url_event>(),
8usize,
concat!("Alignment of ", stringify!(pdf_launch_url_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).url) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_launch_url_event),
"::",
stringify!(url)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).new_frame) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_launch_url_event),
"::",
stringify!(new_frame)
)
);
}
extern "C" {
pub fn pdf_access_launch_url_event(
ctx: *mut fz_context,
evt: *mut pdf_doc_event,
) -> *mut pdf_launch_url_event;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_mail_doc_event {
pub ask_user: ::std::os::raw::c_int,
pub to: *const ::std::os::raw::c_char,
pub cc: *const ::std::os::raw::c_char,
pub bcc: *const ::std::os::raw::c_char,
pub subject: *const ::std::os::raw::c_char,
pub message: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_pdf_mail_doc_event() {
const UNINIT: ::std::mem::MaybeUninit<pdf_mail_doc_event> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pdf_mail_doc_event>(),
48usize,
concat!("Size of: ", stringify!(pdf_mail_doc_event))
);
assert_eq!(
::std::mem::align_of::<pdf_mail_doc_event>(),
8usize,
concat!("Alignment of ", stringify!(pdf_mail_doc_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ask_user) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(ask_user)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).to) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(to)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cc) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(cc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bcc) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(bcc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).subject) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(subject)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(message)
)
);
}
extern "C" {
pub fn pdf_access_mail_doc_event(
ctx: *mut fz_context,
evt: *mut pdf_doc_event,
) -> *mut pdf_mail_doc_event;
}
extern "C" {
pub fn pdf_event_issue_alert(
ctx: *mut fz_context,
doc: *mut pdf_document,
evt: *mut pdf_alert_event,
);
}
extern "C" {
pub fn pdf_event_issue_print(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_event_issue_exec_menu_item(
ctx: *mut fz_context,
doc: *mut pdf_document,
item: *const ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_event_issue_launch_url(
ctx: *mut fz_context,
doc: *mut pdf_document,
url: *const ::std::os::raw::c_char,
new_frame: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_event_issue_mail_doc(
ctx: *mut fz_context,
doc: *mut pdf_document,
evt: *mut pdf_mail_doc_event,
);
}
extern "C" {
pub fn pdf_enable_js(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_disable_js(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_js_supported(ctx: *mut fz_context, doc: *mut pdf_document) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_drop_js(ctx: *mut fz_context, js: *mut pdf_js);
}
extern "C" {
pub fn pdf_js_event_init(
js: *mut pdf_js,
target: *mut pdf_obj,
value: *const ::std::os::raw::c_char,
willCommit: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_js_event_result(js: *mut pdf_js) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_js_event_result_validate(
js: *mut pdf_js,
newvalue: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_js_event_value(js: *mut pdf_js) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_js_event_init_keystroke(
js: *mut pdf_js,
target: *mut pdf_obj,
evt: *mut pdf_keystroke_event,
);
}
extern "C" {
pub fn pdf_js_event_result_keystroke(
js: *mut pdf_js,
evt: *mut pdf_keystroke_event,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_js_execute(
js: *mut pdf_js,
name: *const ::std::os::raw::c_char,
code: *const ::std::os::raw::c_char,
result: *mut *mut ::std::os::raw::c_char,
);
}
extern "C" {
pub fn pdf_clean_file(
ctx: *mut fz_context,
infile: *mut ::std::os::raw::c_char,
outfile: *mut ::std::os::raw::c_char,
password: *mut ::std::os::raw::c_char,
opts: *mut pdf_write_options,
retainlen: ::std::os::raw::c_int,
retainlist: *mut *mut ::std::os::raw::c_char,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mupdf_error {
pub type_: ::std::os::raw::c_int,
pub message: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_mupdf_error() {
const UNINIT: ::std::mem::MaybeUninit<mupdf_error> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mupdf_error>(),
16usize,
concat!("Size of: ", stringify!(mupdf_error))
);
assert_eq!(
::std::mem::align_of::<mupdf_error>(),
8usize,
concat!("Alignment of ", stringify!(mupdf_error))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mupdf_error),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mupdf_error),
"::",
stringify!(message)
)
);
}
pub type mupdf_error_t = mupdf_error;
extern "C" {
pub fn mupdf_drop_error(err: *mut mupdf_error_t);
}
extern "C" {
pub fn mupdf_drop_str(s: *mut ::std::os::raw::c_char);
}
extern "C" {
pub fn mupdf_drop_base_context(ctx: *mut fz_context);
}
extern "C" {
pub fn mupdf_new_base_context() -> *mut fz_context;
}
extern "C" {
pub fn mupdf_adjust_rect_for_stroke(
ctx: *mut fz_context,
self_: fz_rect,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
) -> fz_rect;
}
extern "C" {
pub fn mupdf_new_pixmap(
ctx: *mut fz_context,
cs: *mut fz_colorspace,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
w: ::std::os::raw::c_int,
h: ::std::os::raw::c_int,
alpha: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn mupdf_clone_pixmap(
ctx: *mut fz_context,
self_: *mut fz_pixmap,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn mupdf_clear_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clear_pixmap_with_value(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
value: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_invert_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_gamma_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
gamma: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_tint_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
black: ::std::os::raw::c_int,
white: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_save_pixmap_as(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
filename: *const ::std::os::raw::c_char,
format: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pixmap_get_image_data(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
format: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_new_font(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
index: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_font;
}
extern "C" {
pub fn mupdf_new_font_from_buffer(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
index: ::std::os::raw::c_int,
buffer: *mut fz_buffer,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_font;
}
extern "C" {
pub fn mupdf_encode_character(
ctx: *mut fz_context,
font: *mut fz_font,
unicode: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_advance_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
glyph: ::std::os::raw::c_int,
wmode: bool,
errptr: *mut *mut mupdf_error_t,
) -> f32;
}
extern "C" {
pub fn mupdf_outline_glyph(
ctx: *mut fz_context,
font: *mut fz_font,
glyph: ::std::os::raw::c_int,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_path;
}
extern "C" {
pub fn mupdf_new_image_from_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_image;
}
extern "C" {
pub fn mupdf_new_image_from_file(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_image;
}
extern "C" {
pub fn mupdf_new_image_from_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
w: f32,
h: f32,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_image;
}
extern "C" {
pub fn mupdf_get_pixmap_from_image(
ctx: *mut fz_context,
image: *mut fz_image,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn mupdf_new_text(ctx: *mut fz_context, errptr: *mut *mut mupdf_error_t) -> *mut fz_text;
}
extern "C" {
pub fn mupdf_default_stroke_state(ctx: *mut fz_context) -> *mut fz_stroke_state;
}
extern "C" {
pub fn mupdf_new_stroke_state(
ctx: *mut fz_context,
start_cap: fz_linecap,
dash_cap: fz_linecap,
end_cap: fz_linecap,
line_join: fz_linejoin,
line_width: f32,
miter_limit: f32,
dash_phase: f32,
dash: *const f32,
dash_len: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_stroke_state;
}
extern "C" {
pub fn mupdf_bound_text(
ctx: *mut fz_context,
text: *mut fz_text,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
) -> fz_rect;
}
extern "C" {
pub fn mupdf_new_path(ctx: *mut fz_context, errptr: *mut *mut mupdf_error_t) -> *mut fz_path;
}
extern "C" {
pub fn mupdf_clone_path(
ctx: *mut fz_context,
old_path: *mut fz_path,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_path;
}
extern "C" {
pub fn mupdf_trim_path(
ctx: *mut fz_context,
path: *mut fz_path,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_moveto(
ctx: *mut fz_context,
path: *mut fz_path,
x: f32,
y: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_lineto(
ctx: *mut fz_context,
path: *mut fz_path,
x: f32,
y: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_closepath(
ctx: *mut fz_context,
path: *mut fz_path,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_rectto(
ctx: *mut fz_context,
path: *mut fz_path,
x1: ::std::os::raw::c_int,
y1: ::std::os::raw::c_int,
x2: ::std::os::raw::c_int,
y2: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_curveto(
ctx: *mut fz_context,
path: *mut fz_path,
cx1: f32,
cy1: f32,
cx2: f32,
cy2: f32,
ex: f32,
ey: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_curvetov(
ctx: *mut fz_context,
path: *mut fz_path,
cx: f32,
cy: f32,
ex: f32,
ey: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_curvetoy(
ctx: *mut fz_context,
path: *mut fz_path,
cx: f32,
cy: f32,
ex: f32,
ey: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_transform_path(
ctx: *mut fz_context,
path: *mut fz_path,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_bound_path(
ctx: *mut fz_context,
path: *mut fz_path,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
) -> fz_rect;
}
extern "C" {
pub fn mupdf_walk_path(
ctx: *mut fz_context,
path: *const fz_path,
walker: *const fz_path_walker,
arg: *mut ::std::os::raw::c_void,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_bound_page(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> fz_rect;
}
extern "C" {
pub fn mupdf_page_to_pixmap(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: f32,
show_extras: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn mupdf_page_to_svg(
ctx: *mut fz_context,
page: *mut fz_page,
ctm: fz_matrix,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_page_to_text_page(
ctx: *mut fz_context,
page: *mut fz_page,
flags: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn mupdf_page_to_display_list(
ctx: *mut fz_context,
page: *mut fz_page,
annots: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_display_list;
}
extern "C" {
pub fn mupdf_run_page(
ctx: *mut fz_context,
page: *mut fz_page,
device: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_run_page_contents(
ctx: *mut fz_context,
page: *mut fz_page,
device: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_run_page_annots(
ctx: *mut fz_context,
page: *mut fz_page,
device: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_run_page_widgets(
ctx: *mut fz_context,
page: *mut fz_page,
device: *mut fz_device,
ctm: fz_matrix,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_page_to_html(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_stext_page_as_json_from_page(
ctx: *mut fz_context,
page: *mut fz_page,
scale: f32,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_page_to_xhtml(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_page_to_xml(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_page_to_text(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_load_links(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_link;
}
extern "C" {
pub fn mupdf_stext_page_to_text(
ctx: *mut fz_context,
page: *mut fz_stext_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_page_separations(
ctx: *mut fz_context,
page: *mut fz_page,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_separations;
}
extern "C" {
pub fn mupdf_search_page(
ctx: *mut fz_context,
page: *mut fz_page,
needle: *const ::std::os::raw::c_char,
hit_max: ::std::os::raw::c_int,
hit_count: *mut ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_quad;
}
extern "C" {
pub fn mupdf_search_stext_page(
ctx: *mut fz_context,
page: *mut fz_stext_page,
needle: *const ::std::os::raw::c_char,
hit_max: ::std::os::raw::c_int,
hit_count: *mut ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_quad;
}
extern "C" {
pub fn mupdf_new_cookie(
ctx: *mut fz_context,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_cookie;
}
extern "C" {
pub fn mupdf_new_display_list(
ctx: *mut fz_context,
mediabox: fz_rect,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_display_list;
}
extern "C" {
pub fn mupdf_display_list_to_pixmap(
ctx: *mut fz_context,
list: *mut fz_display_list,
ctm: fz_matrix,
cs: *mut fz_colorspace,
alpha: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_pixmap;
}
extern "C" {
pub fn mupdf_display_list_to_text_page(
ctx: *mut fz_context,
list: *mut fz_display_list,
flags: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_stext_page;
}
extern "C" {
pub fn mupdf_display_list_run(
ctx: *mut fz_context,
list: *mut fz_display_list,
device: *mut fz_device,
ctm: fz_matrix,
area: fz_rect,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_search_display_list(
ctx: *mut fz_context,
list: *mut fz_display_list,
needle: *const ::std::os::raw::c_char,
hit_max: ::std::os::raw::c_int,
hit_count: *mut ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_quad;
}
extern "C" {
pub fn mupdf_pdf_clone_obj(
ctx: *mut fz_context,
self_: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_get_bound_document(
ctx: *mut fz_context,
obj: *mut pdf_obj,
) -> *mut pdf_document;
}
extern "C" {
pub fn mupdf_pdf_is_indirect(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_null(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_bool(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_int(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_real(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_number(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_string(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_name(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_array(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_dict(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_is_stream(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_new_null() -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_bool(b: bool) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_int(
ctx: *mut fz_context,
i: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_real(
ctx: *mut fz_context,
f: f32,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_string(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_name(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_indirect(
ctx: *mut fz_context,
pdf: *mut pdf_document,
num: ::std::os::raw::c_int,
gen: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_array(
ctx: *mut fz_context,
pdf: *mut pdf_document,
capacity: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_dict(
ctx: *mut fz_context,
pdf: *mut pdf_document,
capacity: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_obj_from_str(
ctx: *mut fz_context,
pdf: *mut pdf_document,
src: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_to_bool(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_to_int(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_to_float(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> f32;
}
extern "C" {
pub fn mupdf_pdf_to_indirect(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_to_string(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn mupdf_pdf_to_name(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn mupdf_pdf_to_bytes(
ctx: *mut fz_context,
obj: *mut pdf_obj,
len: *mut usize,
errptr: *mut *mut mupdf_error_t,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn mupdf_pdf_resolve_indirect(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_array_get(
ctx: *mut fz_context,
obj: *mut pdf_obj,
index: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_dict_get_val(
ctx: *mut fz_context,
obj: *mut pdf_obj,
idx: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_dict_get_key(
ctx: *mut fz_context,
obj: *mut pdf_obj,
idx: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_dict_get(
ctx: *mut fz_context,
obj: *mut pdf_obj,
key: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_dict_get_inheritable(
ctx: *mut fz_context,
obj: *mut pdf_obj,
key: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_read_stream(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_pdf_read_raw_stream(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_pdf_write_object(
ctx: *mut fz_context,
self_: *mut pdf_obj,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_write_stream_buffer(
ctx: *mut fz_context,
obj: *mut pdf_obj,
buf: *mut fz_buffer,
compressed: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_array_len(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_array_put(
ctx: *mut fz_context,
self_: *mut pdf_obj,
i: ::std::os::raw::c_int,
item: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_array_push(
ctx: *mut fz_context,
self_: *mut pdf_obj,
item: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_array_delete(
ctx: *mut fz_context,
self_: *mut pdf_obj,
i: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_dict_len(
ctx: *mut fz_context,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_dict_put(
ctx: *mut fz_context,
self_: *mut pdf_obj,
key: *mut pdf_obj,
value: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_dict_delete(
ctx: *mut fz_context,
self_: *mut pdf_obj,
key: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_obj_to_string(
ctx: *mut fz_context,
obj: *mut pdf_obj,
tight: bool,
ascii: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn mupdf_buffer_read_bytes(
ctx: *mut fz_context,
buf: *mut fz_buffer,
at: usize,
output: *mut ::std::os::raw::c_uchar,
buf_len: usize,
errptr: *mut *mut mupdf_error_t,
) -> usize;
}
extern "C" {
pub fn mupdf_buffer_write_bytes(
ctx: *mut fz_context,
buf: *mut fz_buffer,
bytes: *const ::std::os::raw::c_uchar,
len: usize,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_buffer_from_str(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_buffer_from_base64(
ctx: *mut fz_context,
s: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_open_document(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_document;
}
extern "C" {
pub fn mupdf_open_document_from_bytes(
ctx: *mut fz_context,
bytes: *mut fz_buffer,
magic: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_document;
}
extern "C" {
pub fn mupdf_recognize_document(
ctx: *mut fz_context,
magic: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_needs_password(
ctx: *mut fz_context,
doc: *mut fz_document,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_authenticate_password(
ctx: *mut fz_context,
doc: *mut fz_document,
password: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_document_page_count(
ctx: *mut fz_context,
doc: *mut fz_document,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_lookup_metadata(
ctx: *mut fz_context,
doc: *mut fz_document,
key: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn mupdf_is_document_reflowable(
ctx: *mut fz_context,
doc: *mut fz_document,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_layout_document(
ctx: *mut fz_context,
doc: *mut fz_document,
w: f32,
h: f32,
em: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_load_page(
ctx: *mut fz_context,
doc: *mut fz_document,
page_no: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_page;
}
extern "C" {
pub fn mupdf_convert_to_pdf(
ctx: *mut fz_context,
doc: *mut fz_document,
fp: ::std::os::raw::c_int,
tp: ::std::os::raw::c_int,
rotate: ::std::os::raw::c_int,
cookie: *mut fz_cookie,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_document;
}
extern "C" {
pub fn mupdf_resolve_link(
ctx: *mut fz_context,
doc: *mut fz_document,
uri: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> fz_location;
}
extern "C" {
pub fn mupdf_document_output_intent(
ctx: *mut fz_context,
doc: *mut fz_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_colorspace;
}
extern "C" {
pub fn mupdf_load_outline(
ctx: *mut fz_context,
doc: *mut fz_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_outline;
}
extern "C" {
pub fn mupdf_pdf_open_document_from_bytes(
ctx: *mut fz_context,
bytes: *mut fz_buffer,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_document;
}
extern "C" {
pub fn mupdf_pdf_add_object(
ctx: *mut fz_context,
pdf: *mut pdf_document,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_create_object(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_delete_object(
ctx: *mut fz_context,
pdf: *mut pdf_document,
num: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_add_image(
ctx: *mut fz_context,
pdf: *mut pdf_document,
image: *mut fz_image,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_add_font(
ctx: *mut fz_context,
pdf: *mut pdf_document,
font: *mut fz_font,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_add_cjk_font(
ctx: *mut fz_context,
pdf: *mut pdf_document,
font: *mut fz_font,
ordering: ::std::os::raw::c_int,
wmode: ::std::os::raw::c_int,
serif: bool,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_add_simple_font(
ctx: *mut fz_context,
pdf: *mut pdf_document,
font: *mut fz_font,
encoding: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_save_document(
ctx: *mut fz_context,
pdf: *mut pdf_document,
filename: *const ::std::os::raw::c_char,
pwo: pdf_write_options,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_write_document(
ctx: *mut fz_context,
pdf: *mut pdf_document,
pwo: pdf_write_options,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_buffer;
}
extern "C" {
pub fn mupdf_pdf_enable_js(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_disable_js(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_js_supported(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_calculate_form(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_trailer(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_catalog(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_count_objects(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_new_graft_map(
ctx: *mut fz_context,
pdf: *mut pdf_document,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_graft_map;
}
extern "C" {
pub fn mupdf_pdf_graft_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_graft_mapped_object(
ctx: *mut fz_context,
map: *mut pdf_graft_map,
obj: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_new_page(
ctx: *mut fz_context,
pdf: *mut pdf_document,
page_no: ::std::os::raw::c_int,
width: f32,
height: f32,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_page;
}
extern "C" {
pub fn mupdf_pdf_lookup_page_obj(
ctx: *mut fz_context,
pdf: *mut pdf_document,
page_no: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_obj;
}
extern "C" {
pub fn mupdf_pdf_insert_page(
ctx: *mut fz_context,
pdf: *mut pdf_document,
page_no: ::std::os::raw::c_int,
page: *mut pdf_obj,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_delete_page(
ctx: *mut fz_context,
pdf: *mut pdf_document,
page_no: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_new_draw_device(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
clip: fz_irect,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_device;
}
extern "C" {
pub fn mupdf_new_display_list_device(
ctx: *mut fz_context,
list: *mut fz_display_list,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_device;
}
extern "C" {
pub fn mupdf_new_stext_device(
ctx: *mut fz_context,
tp: *mut fz_stext_page,
flags: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_device;
}
extern "C" {
pub fn mupdf_fill_path(
ctx: *mut fz_context,
device: *mut fz_device,
path: *mut fz_path,
even_odd: bool,
ctm: fz_matrix,
cs: *mut fz_colorspace,
color: *const f32,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_stroke_path(
ctx: *mut fz_context,
device: *mut fz_device,
path: *mut fz_path,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
cs: *mut fz_colorspace,
color: *const f32,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clip_path(
ctx: *mut fz_context,
device: *mut fz_device,
path: *mut fz_path,
even_odd: bool,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clip_stroke_path(
ctx: *mut fz_context,
device: *mut fz_device,
path: *mut fz_path,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_fill_text(
ctx: *mut fz_context,
device: *mut fz_device,
text: *mut fz_text,
ctm: fz_matrix,
cs: *mut fz_colorspace,
color: *const f32,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_stroke_text(
ctx: *mut fz_context,
device: *mut fz_device,
text: *mut fz_text,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
cs: *mut fz_colorspace,
color: *const f32,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clip_text(
ctx: *mut fz_context,
device: *mut fz_device,
text: *mut fz_text,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clip_stroke_text(
ctx: *mut fz_context,
device: *mut fz_device,
text: *mut fz_text,
stroke: *mut fz_stroke_state,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_ignore_text(
ctx: *mut fz_context,
device: *mut fz_device,
text: *mut fz_text,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_fill_shade(
ctx: *mut fz_context,
device: *mut fz_device,
shade: *mut fz_shade,
ctm: fz_matrix,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_fill_image(
ctx: *mut fz_context,
device: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_fill_image_mask(
ctx: *mut fz_context,
device: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
cs: *mut fz_colorspace,
color: *const f32,
alpha: f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_clip_image_mask(
ctx: *mut fz_context,
device: *mut fz_device,
image: *mut fz_image,
ctm: fz_matrix,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pop_clip(
ctx: *mut fz_context,
device: *mut fz_device,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_begin_layer(
ctx: *mut fz_context,
device: *mut fz_device,
name: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_end_layer(
ctx: *mut fz_context,
device: *mut fz_device,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_begin_mask(
ctx: *mut fz_context,
device: *mut fz_device,
area: fz_rect,
luminosity: bool,
cs: *mut fz_colorspace,
color: *const f32,
cp: fz_color_params,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_end_mask(
ctx: *mut fz_context,
device: *mut fz_device,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_begin_group(
ctx: *mut fz_context,
device: *mut fz_device,
area: fz_rect,
cs: *mut fz_colorspace,
isolated: bool,
knockout: bool,
blendmode: ::std::os::raw::c_int,
alpha: f32,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_end_group(
ctx: *mut fz_context,
device: *mut fz_device,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_begin_tile(
ctx: *mut fz_context,
device: *mut fz_device,
area: fz_rect,
view: fz_rect,
xstep: f32,
ystep: f32,
ctm: fz_matrix,
id: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_end_tile(
ctx: *mut fz_context,
device: *mut fz_device,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_create_annot(
ctx: *mut fz_context,
page: *mut pdf_page,
subtype: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
) -> *mut pdf_annot;
}
extern "C" {
pub fn mupdf_pdf_delete_annot(
ctx: *mut fz_context,
page: *mut pdf_page,
annot: *mut pdf_annot,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_update_page(
ctx: *mut fz_context,
page: *mut pdf_page,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_redact_page(
ctx: *mut fz_context,
page: *mut pdf_page,
errptr: *mut *mut mupdf_error_t,
) -> bool;
}
extern "C" {
pub fn mupdf_pdf_filter_page_contents(
ctx: *mut fz_context,
page: *mut pdf_page,
filter: *mut pdf_filter_options,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_page_set_rotation(
ctx: *mut fz_context,
page: *mut pdf_page,
rotation: ::std::os::raw::c_int,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_page_set_crop_box(
ctx: *mut fz_context,
page: *mut pdf_page,
rect: fz_rect,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_page_crop_box_position(ctx: *mut fz_context, page: *mut pdf_page) -> fz_point;
}
extern "C" {
pub fn mupdf_pdf_page_media_box(ctx: *mut fz_context, page: *mut pdf_page) -> fz_rect;
}
extern "C" {
pub fn mupdf_pdf_page_transform(
ctx: *mut fz_context,
page: *mut pdf_page,
errptr: *mut *mut mupdf_error_t,
) -> fz_matrix;
}
extern "C" {
pub fn mupdf_pdf_annot_type(
ctx: *mut fz_context,
annot: *mut pdf_annot,
errptr: *mut *mut mupdf_error_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mupdf_pdf_annot_author(
ctx: *mut fz_context,
annot: *mut pdf_annot,
errptr: *mut *mut mupdf_error_t,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn mupdf_pdf_set_annot_author(
ctx: *mut fz_context,
annot: *mut pdf_annot,
author: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_pdf_filter_annot_contents(
ctx: *mut fz_context,
annot: *mut pdf_annot,
filter: *mut pdf_filter_options,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_new_document_writer(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
format: *const ::std::os::raw::c_char,
options: *const ::std::os::raw::c_char,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_document_writer;
}
extern "C" {
pub fn mupdf_document_writer_begin_page(
ctx: *mut fz_context,
writer: *mut fz_document_writer,
mediabox: fz_rect,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_device;
}
extern "C" {
pub fn mupdf_document_writer_end_page(
ctx: *mut fz_context,
writer: *mut fz_document_writer,
errptr: *mut *mut mupdf_error_t,
);
}
extern "C" {
pub fn mupdf_new_bitmap_from_pixmap(
ctx: *mut fz_context,
pixmap: *mut fz_pixmap,
errptr: *mut *mut mupdf_error_t,
) -> *mut fz_bitmap;
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,
pub overflow_arg_area: *mut ::std::os::raw::c_void,
pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__va_list_tag>(),
24usize,
concat!("Size of: ", stringify!(__va_list_tag))
);
assert_eq!(
::std::mem::align_of::<__va_list_tag>(),
8usize,
concat!("Alignment of ", stringify!(__va_list_tag))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(gp_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(fp_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(overflow_arg_area)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(reg_save_area)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_display_list {
pub _address: u8,
}