#[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: &'static [u8; 7usize] = b"1.18.0\0";
pub const FZ_VERSION_MAJOR: u32 = 1;
pub const FZ_VERSION_MINOR: u32 = 18;
pub const FZ_VERSION_PATCH: u32 = 0;
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_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_REPLACEMENT_CHARACTER: u32 = 65533;
pub const FZ_AES_DECRYPT: u32 = 0;
pub const FZ_AES_ENCRYPT: u32 = 1;
pub const FZ_META_FORMAT: &'static [u8; 7usize] = b"format\0";
pub const FZ_META_ENCRYPTION: &'static [u8; 11usize] = b"encryption\0";
pub const FZ_META_INFO_AUTHOR: &'static [u8; 12usize] = b"info:Author\0";
pub const FZ_META_INFO_TITLE: &'static [u8; 11usize] = b"info:Title\0";
pub const FZ_META_INFO_CREATOR: &'static [u8; 13usize] = b"info:Creator\0";
pub const FZ_META_INFO_PRODUCER: &'static [u8; 14usize] = b"info:Producer\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_LAST_SCRIPT: u32 = 152;
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 = 8;
pub type va_list = __builtin_va_list;
pub type __jmp_buf = [::std::os::raw::c_int; 6usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::std::os::raw::c_ulong; 32usize],
}
#[test]
fn bindgen_test_layout___sigset_t() {
assert_eq!(
::std::mem::size_of::<__sigset_t>(),
128usize,
concat!("Size of: ", stringify!(__sigset_t))
);
assert_eq!(
::std::mem::align_of::<__sigset_t>(),
4usize,
concat!("Alignment of ", stringify!(__sigset_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ 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() {
assert_eq!(
::std::mem::size_of::<__jmp_buf_tag>(),
156usize,
concat!("Size of: ", stringify!(__jmp_buf_tag))
);
assert_eq!(
::std::mem::align_of::<__jmp_buf_tag>(),
4usize,
concat!("Alignment of ", stringify!(__jmp_buf_tag))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__jmpbuf as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__jmpbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__mask_was_saved as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__mask_was_saved)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__saved_mask as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__saved_mask)
)
);
}
pub type sigjmp_buf = [__jmp_buf_tag; 1usize];
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_longlong;
pub type __uint64_t = ::std::os::raw::c_ulonglong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = __int64_t;
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(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; 40usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
148usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
4usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
70usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
71usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
108usize,
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_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_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_info(addr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn Memento_listBlockInfo();
}
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" {
#[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() {
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::null::<fz_point>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_point),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_point>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_point),
"::",
stringify!(y)
)
);
}
#[doc = "fz_rect is a rectangle represented by two diagonally opposite"]
#[doc = "corners at arbitrary coordinates."]
#[doc = ""]
#[doc = "Rectangles are always axis-aligned with the X- and Y- axes."]
#[doc = "The relationship between the coordinates are that x0 <= x1 and"]
#[doc = "y0 <= y1 in all cases except for infinite rectangles. The area"]
#[doc = "of a rectangle is defined as (x1 - x0) * (y1 - y0). If either"]
#[doc = "x0 > x1 or y0 > y1 is true for a given rectangle then it is"]
#[doc = "defined to be infinite."]
#[doc = ""]
#[doc = "To check for empty or infinite rectangles use fz_is_empty_rect"]
#[doc = "and fz_is_infinite_rect."]
#[doc = ""]
#[doc = "x0, y0: The top left corner."]
#[doc = ""]
#[doc = "x1, y1: The bottom right corner."]
#[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() {
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::null::<fz_rect>())).x0 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_rect>())).y0 as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_rect>())).x1 as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_rect>())).y1 as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_rect),
"::",
stringify!(y1)
)
);
}
#[doc = "fz_irect is a rectangle using integers instead of floats."]
#[doc = ""]
#[doc = "It'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() {
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::null::<fz_irect>())).x0 as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_irect>())).y0 as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_irect>())).x1 as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_irect>())).y1 as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_irect),
"::",
stringify!(y1)
)
);
}
extern "C" {
pub static fz_unit_rect: fz_rect;
}
extern "C" {
pub static fz_empty_rect: fz_rect;
}
extern "C" {
pub static fz_empty_irect: fz_irect;
}
extern "C" {
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"]
#[doc = "transformations of coordinates throughout MuPDF."]
#[doc = ""]
#[doc = "Since all points reside in a two-dimensional space, one vector"]
#[doc = "is always a constant unit vector; hence only some elements may"]
#[doc = "vary in a matrix. Below is how the elements map between"]
#[doc = "different representations."]
#[doc = ""]
#[doc = "| c d 0 | normally represented as [ a b c d e f ]."]
#[doc = "\\ 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() {
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::null::<fz_matrix>())).a as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(a)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_matrix>())).b as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(b)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_matrix>())).c as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(c)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_matrix>())).d as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(d)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_matrix>())).e as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(e)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_matrix>())).f as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_matrix),
"::",
stringify!(f)
)
);
}
extern "C" {
pub static fz_identity: fz_matrix;
}
extern "C" {
#[doc = "Multiply two matrices."]
#[doc = ""]
#[doc = "The order of the two matrices are important since matrix"]
#[doc = "multiplication is not commutative."]
#[doc = ""]
#[doc = "Returns result."]
pub fn fz_concat(left: fz_matrix, right: fz_matrix) -> fz_matrix;
}
extern "C" {
#[doc = "Create a scaling matrix."]
#[doc = ""]
#[doc = "The returned matrix is of the form [ sx 0 0 sy 0 0 ]."]
#[doc = ""]
#[doc = "m: Pointer to the matrix to populate"]
#[doc = ""]
#[doc = "sx, sy: Scaling factors along the X- and Y-axes. A scaling"]
#[doc = "factor of 1.0 will not cause any scaling along the relevant"]
#[doc = "axis."]
#[doc = ""]
#[doc = "Returns m."]
pub fn fz_scale(sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Scale a matrix by premultiplication."]
#[doc = ""]
#[doc = "m: Pointer to the matrix to scale"]
#[doc = ""]
#[doc = "sx, sy: Scaling factors along the X- and Y-axes. A scaling"]
#[doc = "factor of 1.0 will not cause any scaling along the relevant"]
#[doc = "axis."]
#[doc = ""]
#[doc = "Returns m (updated)."]
pub fn fz_pre_scale(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Scale a matrix by postmultiplication."]
#[doc = ""]
#[doc = "m: Pointer to the matrix to scale"]
#[doc = ""]
#[doc = "sx, sy: Scaling factors along the X- and Y-axes. A scaling"]
#[doc = "factor of 1.0 will not cause any scaling along the relevant"]
#[doc = "axis."]
#[doc = ""]
#[doc = "Returns m (updated)."]
pub fn fz_post_scale(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a shearing matrix."]
#[doc = ""]
#[doc = "The returned matrix is of the form [ 1 sy sx 1 0 0 ]."]
#[doc = ""]
#[doc = "m: pointer to place to store returned matrix"]
#[doc = ""]
#[doc = "sx, sy: Shearing factors. A shearing factor of 0.0 will not"]
#[doc = "cause any shearing along the relevant axis."]
#[doc = ""]
#[doc = "Returns m."]
pub fn fz_shear(sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Premultiply a matrix with a shearing matrix."]
#[doc = ""]
#[doc = "The shearing matrix is of the form [ 1 sy sx 1 0 0 ]."]
#[doc = ""]
#[doc = "m: pointer to matrix to premultiply"]
#[doc = ""]
#[doc = "sx, sy: Shearing factors. A shearing factor of 0.0 will not"]
#[doc = "cause any shearing along the relevant axis."]
#[doc = ""]
#[doc = "Returns m (updated)."]
pub fn fz_pre_shear(m: fz_matrix, sx: f32, sy: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a rotation matrix."]
#[doc = ""]
#[doc = "The returned matrix is of the form"]
#[doc = "[ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ]."]
#[doc = ""]
#[doc = "m: Pointer to place to store matrix"]
#[doc = ""]
#[doc = "degrees: Degrees of counter clockwise rotation. Values less"]
#[doc = "than zero and greater than 360 are handled as expected."]
#[doc = ""]
#[doc = "Returns m."]
pub fn fz_rotate(degrees: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Rotate a transformation by premultiplying."]
#[doc = ""]
#[doc = "The premultiplied matrix is of the form"]
#[doc = "[ cos(deg) sin(deg) -sin(deg) cos(deg) 0 0 ]."]
#[doc = ""]
#[doc = "m: Pointer to matrix to premultiply."]
#[doc = ""]
#[doc = "degrees: Degrees of counter clockwise rotation. Values less"]
#[doc = "than zero and greater than 360 are handled as expected."]
#[doc = ""]
#[doc = "Returns m (updated)."]
pub fn fz_pre_rotate(m: fz_matrix, degrees: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create a translation matrix."]
#[doc = ""]
#[doc = "The returned matrix is of the form [ 1 0 0 1 tx ty ]."]
#[doc = ""]
#[doc = "m: A place to store the created matrix."]
#[doc = ""]
#[doc = "tx, ty: Translation distances along the X- and Y-axes. A"]
#[doc = "translation of 0 will not cause any translation along the"]
#[doc = "relevant axis."]
#[doc = ""]
#[doc = "Returns m."]
pub fn fz_translate(tx: f32, ty: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Translate a matrix by premultiplication."]
#[doc = ""]
#[doc = "m: The matrix to translate"]
#[doc = ""]
#[doc = "tx, ty: Translation distances along the X- and Y-axes. A"]
#[doc = "translation of 0 will not cause any translation along the"]
#[doc = "relevant axis."]
#[doc = ""]
#[doc = "Returns m."]
pub fn fz_pre_translate(m: fz_matrix, tx: f32, ty: f32) -> fz_matrix;
}
extern "C" {
#[doc = "Create transform matrix to draw page"]
#[doc = "at a given resolution and rotation. Adjusts the scaling"]
#[doc = "factors so that the page covers whole number of"]
#[doc = "pixels 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."]
#[doc = ""]
#[doc = "inverse: Place to store inverse matrix."]
#[doc = ""]
#[doc = "matrix: Matrix to invert. A degenerate matrix, where the"]
#[doc = "determinant is equal to zero, can not be inverted and the"]
#[doc = "original matrix is returned instead."]
#[doc = ""]
#[doc = "Returns inverse."]
pub fn fz_invert_matrix(matrix: fz_matrix) -> fz_matrix;
}
extern "C" {
#[doc = "Attempt to create an inverse matrix."]
#[doc = ""]
#[doc = "inverse: Place to store inverse matrix."]
#[doc = ""]
#[doc = "matrix: Matrix to invert. A degenerate matrix, where the"]
#[doc = "determinant is equal to zero, can not be inverted."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "Rectilinear means that no shearing is present and that any"]
#[doc = "rotations present are a multiple of 90 degrees. Usually this"]
#[doc = "is used to make sure that axis-aligned rectangles before the"]
#[doc = "transformation 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."]
#[doc = ""]
#[doc = "Given two rectangles, update the first to be the smallest"]
#[doc = "axis-aligned rectangle that covers the area covered by both"]
#[doc = "given rectangles. If either rectangle is empty then the"]
#[doc = "intersection is also empty. If either rectangle is infinite"]
#[doc = "then the intersection is simply the non-infinite rectangle."]
#[doc = "Should both rectangles be infinite, then the intersection is"]
#[doc = "also infinite."]
pub fn fz_intersect_rect(a: fz_rect, b: fz_rect) -> fz_rect;
}
extern "C" {
#[doc = "Compute intersection of two bounding boxes."]
#[doc = ""]
#[doc = "Similar to fz_intersect_rect but operates on two bounding"]
#[doc = "boxes 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."]
#[doc = ""]
#[doc = "Given two rectangles, update the first to be the smallest"]
#[doc = "axis-aligned rectangle that encompasses both given rectangles."]
#[doc = "If either rectangle is infinite then the union is also infinite."]
#[doc = "If either rectangle is empty then the union is simply the"]
#[doc = "non-empty rectangle. Should both rectangles be empty, then the"]
#[doc = "union 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"]
#[doc = "that covers the rectangle."]
#[doc = ""]
#[doc = "Coordinates in a bounding box are integers, so rounding of the"]
#[doc = "rects coordinates takes place. The top left corner is rounded"]
#[doc = "upwards and left while the bottom right corner is rounded"]
#[doc = "downwards and to the right."]
pub fn fz_irect_from_rect(rect: fz_rect) -> fz_irect;
}
extern "C" {
#[doc = "Round rectangle coordinates."]
#[doc = ""]
#[doc = "Coordinates in a bounding box are integers, so rounding of the"]
#[doc = "rects coordinates takes place. The top left corner is rounded"]
#[doc = "upwards and left while the bottom right corner is rounded"]
#[doc = "downwards and to the right."]
#[doc = ""]
#[doc = "This differs from fz_irect_from_rect, in that fz_irect_from_rect"]
#[doc = "slavishly follows the numbers (i.e any slight over/under"]
#[doc = "calculations can cause whole extra pixels to be added)."]
#[doc = "fz_round_rect allows for a small amount of rounding error when"]
#[doc = "calculating the bbox."]
pub fn fz_round_rect(rect: fz_rect) -> fz_irect;
}
extern "C" {
#[doc = "Convert a bbox into a rect."]
#[doc = ""]
#[doc = "For our purposes, a rect can represent all the values we meet in"]
#[doc = "a bbox, so nothing can go wrong."]
#[doc = ""]
#[doc = "rect: A place to store the generated rectangle."]
#[doc = ""]
#[doc = "bbox: The bbox to convert."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "To create a rectangle that encompasses a sequence of points, the"]
#[doc = "rectangle must first be set to be the empty rectangle at one of"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "Translate 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."]
#[doc = ""]
#[doc = "Return 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."]
#[doc = ""]
#[doc = "transform: Transformation matrix to apply. See fz_concat,"]
#[doc = "fz_scale, fz_rotate and fz_translate for how to create a"]
#[doc = "matrix."]
#[doc = ""]
#[doc = "point: Pointer to point to update."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "transform: Transformation matrix to apply. See fz_concat,"]
#[doc = "fz_scale and fz_rotate for how to create a matrix. Any"]
#[doc = "translation will be ignored."]
#[doc = ""]
#[doc = "vector: 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."]
#[doc = ""]
#[doc = "After the four corner points of the axis-aligned rectangle"]
#[doc = "have been transformed it may not longer be axis-aligned. So a"]
#[doc = "new axis-aligned rectangle is created covering at least the"]
#[doc = "area of the transformed rectangle."]
#[doc = ""]
#[doc = "transform: Transformation matrix to apply. See fz_concat,"]
#[doc = "fz_scale and fz_rotate for how to create a matrix."]
#[doc = ""]
#[doc = "rect: Rectangle to be transformed. The two special cases"]
#[doc = "fz_empty_rect and fz_infinite_rect, may be used but are"]
#[doc = "returned 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."]
#[doc = ""]
#[doc = "as_tiled = 0 => adjust the matrix so that the image of the unit"]
#[doc = "square completely covers any pixel that was touched by the"]
#[doc = "image of the unit square under the original matrix."]
#[doc = ""]
#[doc = "as_tiled = 1 => adjust the matrix so that the corners of the"]
#[doc = "image of the unit square align with the closest integer corner"]
#[doc = "of 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."]
#[doc = "(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."]
#[doc = ""]
#[doc = "The significant difference between quads and rects is that"]
#[doc = "the 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() {
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::null::<fz_quad>())).ul as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ul)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_quad>())).ur as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ur)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_quad>())).ll as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_quad),
"::",
stringify!(ll)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_quad>())).lr as *const _ 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."]
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."]
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."]
#[doc = ""]
#[doc = "This 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."]
#[doc = ""]
#[doc = "This 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() {
assert_eq!(
::std::mem::size_of::<fz_alloc_context>(),
16usize,
concat!("Size of: ", stringify!(fz_alloc_context))
);
assert_eq!(
::std::mem::align_of::<fz_alloc_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_alloc_context))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_alloc_context>())).user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_alloc_context>())).malloc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(malloc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_alloc_context>())).realloc as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_alloc_context),
"::",
stringify!(realloc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_alloc_context>())).free as *const _ as usize },
12usize,
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: va_list,
);
}
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_vwarn(ctx: *mut fz_context, fmt: *const ::std::os::raw::c_char, ap: va_list);
}
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);
}
pub const FZ_ERROR_NONE: ::std::os::raw::c_uint = 0;
pub const FZ_ERROR_MEMORY: ::std::os::raw::c_uint = 1;
pub const FZ_ERROR_GENERIC: ::std::os::raw::c_uint = 2;
pub const FZ_ERROR_SYNTAX: ::std::os::raw::c_uint = 3;
pub const FZ_ERROR_MINOR: ::std::os::raw::c_uint = 4;
pub const FZ_ERROR_TRYLATER: ::std::os::raw::c_uint = 5;
pub const FZ_ERROR_ABORT: ::std::os::raw::c_uint = 6;
pub const FZ_ERROR_COUNT: ::std::os::raw::c_uint = 7;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Flush any repeated warnings."]
#[doc = ""]
#[doc = "Repeated warnings are buffered, counted and eventually printed"]
#[doc = "along with the number of repetitions. Call fz_flush_warnings"]
#[doc = "to force printing of the latest buffered warning and the"]
#[doc = "number of repetitions, for example to make sure that all"]
#[doc = "warnings are printed before exiting an application."]
pub fn fz_flush_warnings(ctx: *mut fz_context);
}
#[doc = "Locking functions"]
#[doc = ""]
#[doc = "MuPDF is kept deliberately free of any knowledge of particular"]
#[doc = "threading systems. As such, in order for safe multi-threaded"]
#[doc = "operation, we rely on callbacks to client provided functions."]
#[doc = ""]
#[doc = "A client is expected to provide FZ_LOCK_MAX number of mutexes,"]
#[doc = "and a function to lock/unlock each of them. These may be"]
#[doc = "recursive mutexes, but do not have to be."]
#[doc = ""]
#[doc = "If a client does not intend to use multiple threads, then it"]
#[doc = "may pass NULL instead of a lock structure."]
#[doc = ""]
#[doc = "In order to avoid deadlocks, we have one simple rule"]
#[doc = "internally as to how we use locks: We can never take lock n"]
#[doc = "when we already hold any lock i, where 0 <= i <= n. In order"]
#[doc = "to verify this, we have some debugging code, that can be"]
#[doc = "enabled 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() {
assert_eq!(
::std::mem::size_of::<fz_locks_context>(),
12usize,
concat!("Size of: ", stringify!(fz_locks_context))
);
assert_eq!(
::std::mem::align_of::<fz_locks_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_locks_context))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_locks_context>())).user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_locks_context>())).lock as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_locks_context>())).unlock as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_locks_context),
"::",
stringify!(unlock)
)
);
}
pub const FZ_LOCK_ALLOC: ::std::os::raw::c_uint = 0;
pub const FZ_LOCK_FREETYPE: ::std::os::raw::c_uint = 1;
pub const FZ_LOCK_GLYPHCACHE: ::std::os::raw::c_uint = 2;
pub const FZ_LOCK_MAX: ::std::os::raw::c_uint = 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: ::std::os::raw::c_uint = 0;
pub const FZ_STORE_DEFAULT: ::std::os::raw::c_uint = 268435456;
#[doc = "Specifies the maximum size in bytes of the resource store in"]
#[doc = "fz_context. Given as argument to fz_new_context."]
#[doc = ""]
#[doc = "FZ_STORE_UNLIMITED: Let resource store grow unbounded."]
#[doc = ""]
#[doc = "FZ_STORE_DEFAULT: A reasonable upper bound on the size, for"]
#[doc = "devices 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."]
#[doc = ""]
#[doc = "This function is meant to be used in multi-threaded"]
#[doc = "applications where each thread requires its own context, yet"]
#[doc = "parts of the global state, for example caching, are shared."]
#[doc = ""]
#[doc = "ctx: Context obtained from fz_new_context to make a copy of."]
#[doc = "ctx must have had locks and lock/functions setup when created."]
#[doc = "The two contexts will share the memory allocator, resource"]
#[doc = "store, locks and lock/unlock functions. They will each have"]
#[doc = "their own exception stacks though."]
#[doc = ""]
#[doc = "May return NULL."]
pub fn fz_clone_context(ctx: *mut fz_context) -> *mut fz_context;
}
extern "C" {
#[doc = "Free a context and its global state."]
#[doc = ""]
#[doc = "The context and all of its global state is freed, and any"]
#[doc = "buffered warnings are flushed (see fz_flush_warnings). If NULL"]
#[doc = "is passed in nothing will happen."]
pub fn fz_drop_context(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Set the user field in the context."]
#[doc = ""]
#[doc = "NULL initially, this field can be set to any opaque value"]
#[doc = "required 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"]
#[doc = "fz_default_warning callback and to allow 'NULL' to be used"]
#[doc = "int fz_set_xxxx_callback to mean \"defaults\"."]
#[doc = ""]
#[doc = "FIXME: Do we need/want functions like"]
#[doc = "fz_error_callback(ctx, message) to allow callers to inject"]
#[doc = "stuff into the error/warning streams?"]
#[doc = "The default error callback. Declared publicly just so that the"]
#[doc = "error callback can be set back to this after it has been"]
#[doc = "overridden."]
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"]
#[doc = "the warning callback can be set back to this after it has been"]
#[doc = "overridden."]
pub fn fz_default_warning_callback(
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"]
#[doc = "exception handling."]
#[doc = ""]
#[doc = "The callback must not throw exceptions!"]
pub fn fz_set_error_callback(
ctx: *mut fz_context,
print: ::std::option::Option<
unsafe extern "C" fn(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
),
>,
user: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = "Set the warning callback. This will be called as part of the"]
#[doc = "exception handling."]
#[doc = ""]
#[doc = "The callback must not throw exceptions!"]
pub fn fz_set_warning_callback(
ctx: *mut fz_context,
print: ::std::option::Option<
unsafe extern "C" fn(
user: *mut ::std::os::raw::c_void,
message: *const ::std::os::raw::c_char,
),
>,
user: *mut ::std::os::raw::c_void,
);
}
#[doc = "Given the width and height of an image,"]
#[doc = "the subsample factor, and the subarea of the image actually"]
#[doc = "required, the caller can decide whether to decode the whole"]
#[doc = "image or just a subarea."]
#[doc = ""]
#[doc = "arg: The caller supplied opaque argument."]
#[doc = ""]
#[doc = "w, h: The width/height of the complete image."]
#[doc = ""]
#[doc = "l2factor: The log2 factor for subsampling (i.e. image will be"]
#[doc = "decoded to (w>>l2factor, h>>l2factor))."]
#[doc = ""]
#[doc = "subarea: The actual subarea required for the current operation."]
#[doc = "The tuning function is allowed to increase this in size if"]
#[doc = "required."]
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"]
#[doc = "image, together with the actual required width and height,"]
#[doc = "decide whether we should use mitchell scaling."]
#[doc = ""]
#[doc = "arg: The caller supplied opaque argument."]
#[doc = ""]
#[doc = "dst_w, dst_h: The actual width/height required on the target"]
#[doc = "device."]
#[doc = ""]
#[doc = "src_w, src_h: The source width/height of the image."]
#[doc = ""]
#[doc = "Return 0 not to use the Mitchell scaler, 1 to use the Mitchell"]
#[doc = "scaler. 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"]
#[doc = "image decode."]
#[doc = ""]
#[doc = "image_decode: Function to use."]
#[doc = ""]
#[doc = "arg: 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"]
#[doc = "image scaling."]
#[doc = ""]
#[doc = "image_scale: Function to use."]
#[doc = ""]
#[doc = "arg: 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"]
#[doc = "using (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"]
#[doc = "use (for both text and graphics)."]
#[doc = ""]
#[doc = "bits: The number of bits of antialiasing to use (values are"]
#[doc = "clamped 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"]
#[doc = "using 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"]
#[doc = "should use for text."]
#[doc = ""]
#[doc = "bits: The number of bits of antialiasing to use (values are"]
#[doc = "clamped 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"]
#[doc = "using 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"]
#[doc = "should use for graphics."]
#[doc = ""]
#[doc = "bits: The number of bits of antialiasing to use (values are"]
#[doc = "clamped 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"]
#[doc = "used for stroked lines."]
#[doc = ""]
#[doc = "min_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"]
#[doc = "used for stroked lines."]
#[doc = ""]
#[doc = "min_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."]
#[doc = "Does NOT clear the memory!"]
#[doc = ""]
#[doc = "May return NULL for size = 0."]
#[doc = ""]
#[doc = "Throws 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."]
#[doc = "Clears the memory to zero."]
#[doc = ""]
#[doc = "Throws 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"]
#[doc = "up to min(old_size,new_size) are maintained. The rest of the"]
#[doc = "block is uninitialised."]
#[doc = ""]
#[doc = "fz_realloc(ctx, NULL, size) behaves like fz_malloc(ctx, size)."]
#[doc = ""]
#[doc = "fz_realloc(ctx, p, 0); behaves like fz_free(ctx, p)."]
#[doc = ""]
#[doc = "Throws 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."]
#[doc = ""]
#[doc = "fz_free(ctx, NULL) does nothing."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "exceptions."]
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"]
#[doc = "exceptions."]
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"]
#[doc = "exceptions."]
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 sigjmp_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 state: ::std::os::raw::c_int,
pub code: ::std::os::raw::c_int,
pub buffer: sigjmp_buf,
}
#[test]
fn bindgen_test_layout_fz_error_stack_slot() {
assert_eq!(
::std::mem::size_of::<fz_error_stack_slot>(),
164usize,
concat!("Size of: ", stringify!(fz_error_stack_slot))
);
assert_eq!(
::std::mem::align_of::<fz_error_stack_slot>(),
4usize,
concat!("Alignment of ", stringify!(fz_error_stack_slot))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_stack_slot>())).state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_stack_slot>())).code as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_stack_slot>())).buffer as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_error_stack_slot),
"::",
stringify!(buffer)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_error_context {
pub top: *mut fz_error_stack_slot,
pub stack: [fz_error_stack_slot; 256usize],
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() {
assert_eq!(
::std::mem::size_of::<fz_error_context>(),
42256usize,
concat!("Size of: ", stringify!(fz_error_context))
);
assert_eq!(
::std::mem::align_of::<fz_error_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_error_context))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).top as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).stack as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(stack)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).errcode as *const _ as usize },
41988usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(errcode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).print_user as *const _ as usize },
41992usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(print_user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).print as *const _ as usize },
41996usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(print)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_error_context>())).message as *const _ as usize },
42000usize,
concat!(
"Offset of field: ",
stringify!(fz_error_context),
"::",
stringify!(message)
)
);
}
#[repr(C)]
#[derive(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() {
assert_eq!(
::std::mem::size_of::<fz_warn_context>(),
268usize,
concat!("Size of: ", stringify!(fz_warn_context))
);
assert_eq!(
::std::mem::align_of::<fz_warn_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_warn_context))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_warn_context>())).print_user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(print_user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_warn_context>())).print as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(print)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_warn_context>())).count as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_warn_context),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_warn_context>())).message as *const _ as usize },
12usize,
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() {
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::null::<fz_aa_context>())).hscale as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(hscale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aa_context>())).vscale as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(vscale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aa_context>())).scale as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aa_context>())).bits as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(bits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aa_context>())).text_bits as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(text_bits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aa_context>())).min_line_width as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_aa_context),
"::",
stringify!(min_line_width)
)
);
}
#[repr(C)]
#[derive(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 handler: *mut fz_document_handler_context,
pub style: *mut fz_style_context,
pub tuning: *mut fz_tuning_context,
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() {
assert_eq!(
::std::mem::size_of::<fz_context>(),
42628usize,
concat!("Size of: ", stringify!(fz_context))
);
assert_eq!(
::std::mem::align_of::<fz_context>(),
4usize,
concat!("Alignment of ", stringify!(fz_context))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).alloc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(alloc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).locks as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(locks)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).error as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).warn as *const _ as usize },
42288usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(warn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).aa as *const _ as usize },
42556usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(aa)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).seed48 as *const _ as usize },
42580usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(seed48)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).icc_enabled as *const _ as usize },
42596usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(icc_enabled)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).handler as *const _ as usize },
42600usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(handler)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).style as *const _ as usize },
42604usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(style)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).tuning as *const _ as usize },
42608usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(tuning)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).font as *const _ as usize },
42612usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).colorspace as *const _ as usize },
42616usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).store as *const _ as usize },
42620usize,
concat!(
"Offset of field: ",
stringify!(fz_context),
"::",
stringify!(store)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_context>())).glyph_cache as *const _ as usize },
42624usize,
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"]
#[doc = "bytes."]
#[doc = ""]
#[doc = "Buffers have a capacity (the number of bytes storage immediately"]
#[doc = "available) and a current size."]
#[doc = ""]
#[doc = "The contents of the structure are considered implementation"]
#[doc = "details and are subject to change. Users should use the accessor"]
#[doc = "functions 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() {
assert_eq!(
::std::mem::size_of::<fz_buffer>(),
24usize,
concat!("Size of: ", stringify!(fz_buffer))
);
assert_eq!(
::std::mem::align_of::<fz_buffer>(),
4usize,
concat!("Alignment of ", stringify!(fz_buffer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).data as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).cap as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).len as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).unused_bits as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(unused_bits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_buffer>())).shared as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_buffer),
"::",
stringify!(shared)
)
);
}
extern "C" {
#[doc = "Take an additional reference to the buffer. The same pointer"]
#[doc = "is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "zero, the buffer is destroyed."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_drop_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Retrieve internal memory of buffer."]
#[doc = ""]
#[doc = "datap: Output parameter that will be pointed to the data."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "0 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."]
#[doc = ""]
#[doc = "data: Pointer to existing data."]
#[doc = "size: Size of existing data."]
#[doc = ""]
#[doc = "Takes ownership of data. Does not make a copy. Calls fz_free on"]
#[doc = "the data when the buffer is deallocated. Do not use 'data' after"]
#[doc = "passing to this function."]
#[doc = ""]
#[doc = "Returns pointer to new buffer. Throws exception on allocation"]
#[doc = "failure."]
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 = "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,"]
#[doc = "truncating data if required."]
#[doc = ""]
#[doc = "capacity: The desired capacity for the buffer. If the current"]
#[doc = "size of the buffer contents is smaller than capacity, it is"]
#[doc = "truncated."]
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"]
#[doc = "capacity > 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"]
#[doc = "to be reused as the buffer is refilled."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_clear_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Append the contents of the source buffer onto the end of the"]
#[doc = "destination buffer, extending automatically as required."]
#[doc = ""]
#[doc = "Ownership 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 = "fz_append_*: Append data to a buffer."]
#[doc = ""]
#[doc = "The 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"]
#[doc = "escapes."]
#[doc = ""]
#[doc = "The 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"]
#[doc = "printf-like formatting (see fz_vsnprintf)."]
#[doc = ""]
#[doc = "The 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"]
#[doc = "printf-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: va_list,
);
}
extern "C" {
#[doc = "Zero-terminate buffer in order to use as a C string."]
#[doc = ""]
#[doc = "This byte is invisible and does not affect the length of the"]
#[doc = "buffer as returned by fz_buffer_storage. The zero byte is"]
#[doc = "written *after* the data, and subsequent writes will overwrite"]
#[doc = "the terminating byte."]
#[doc = ""]
#[doc = "Subsequent changes to the size of the buffer (such as by"]
#[doc = "fz_buffer_trim, fz_buffer_grow, fz_resize_buffer, etc) may"]
#[doc = "invalidate this."]
pub fn fz_terminate_buffer(ctx: *mut fz_context, buf: *mut fz_buffer);
}
extern "C" {
#[doc = "Create an MD5 digest from buffer contents."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "Performs the same task as fz_buffer_storage, but ownership of"]
#[doc = "the data buffer returns with this call. The buffer is left"]
#[doc = "empty."]
#[doc = ""]
#[doc = "Note: Bad things may happen if this is called on a buffer with"]
#[doc = "multiple references that is being used from multiple threads."]
#[doc = ""]
#[doc = "data: Pointer to place to retrieve data pointer."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "there 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"]
#[doc = "it at the first occurrence of a delimiter char (from a given"]
#[doc = "set)."]
#[doc = ""]
#[doc = "stringp: Pointer to a C string pointer (or NULL). Updated on"]
#[doc = "exit to point to the first char of the string after the"]
#[doc = "delimiter that was found. The string pointed to by stringp will"]
#[doc = "be corrupted by this call (as the found delimiter will be"]
#[doc = "overwritten by 0)."]
#[doc = ""]
#[doc = "delim: A C string of acceptable delimiter characters."]
#[doc = ""]
#[doc = "Returns a pointer to a C string containing the chars of stringp"]
#[doc = "up to the first delimiter char (or the end of the string), or"]
#[doc = "NULL."]
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"]
#[doc = "buffer with null termination, returning the real length of the"]
#[doc = "initial string (excluding terminator)."]
#[doc = ""]
#[doc = "dst: Destination buffer, at least n bytes long."]
#[doc = ""]
#[doc = "src: C string (non-NULL)."]
#[doc = ""]
#[doc = "n: Size of dst buffer in bytes."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "dst: pointer to first string in a buffer of n bytes."]
#[doc = ""]
#[doc = "src: pointer to string to concatenate."]
#[doc = ""]
#[doc = "n: Size (in bytes) of buffer that dst is in."]
#[doc = ""]
#[doc = "Returns the real length that a concatenated dst + src would have"]
#[doc = "been (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 = "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."]
#[doc = ""]
#[doc = "If the path contains %[0-9]*d, the first such pattern will be"]
#[doc = "replaced with the page number. If the template does not contain"]
#[doc = "such a pattern, the page number will be inserted before the"]
#[doc = "filename extension. If the template does not have a filename"]
#[doc = "extension, 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."]
#[doc = ""]
#[doc = "Eliminates multiple and trailing slashes, interprets \".\" and"]
#[doc = "\"..\". 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."]
#[doc = "The 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: ::std::os::raw::c_uint = 4;
#[doc = "FZ_UTFMAX: Maximum number of bytes in a decoded rune (maximum"]
#[doc = "length 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."]
#[doc = ""]
#[doc = "rune: Pointer to an int to assign the decoded 'rune' to."]
#[doc = ""]
#[doc = "str: Pointer to a UTF8 encoded string."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "str: Pointer to a place to put the UTF8 encoded character."]
#[doc = ""]
#[doc = "rune: Pointer to a 'rune'."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "rune: The rune to encode."]
#[doc = ""]
#[doc = "Returns the number of bytes required to represent this run in"]
#[doc = "UTF8."]
pub fn fz_runelen(rune: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Count how many runes the UTF-8 encoded string"]
#[doc = "consists of."]
#[doc = ""]
#[doc = "s: The UTF-8 encoded, NUL-terminated text string."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "return (-)INFINITY and set errno to ERANGE. On underflow return"]
#[doc = "0 and set errno to ERANGE. Special inputs (case insensitive):"]
#[doc = "\"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:"]
#[doc = "( ','? ([0-9]+|'N') ( '-' ([0-9]+|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 = "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."]
#[doc = ""]
#[doc = "filename: Path to a file. On non-Windows machines the filename"]
#[doc = "should be exactly as it would be passed to fopen(2). On Windows"]
#[doc = "machines, the path should be UTF-8 encoded so that non-ASCII"]
#[doc = "characters can be represented. Other platforms do the encoding"]
#[doc = "as standard anyway (and in most cases, particularly for MacOS"]
#[doc = "and 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."]
#[doc = ""]
#[doc = "data: Pointer to start of data block. Ownership of the data"]
#[doc = "block is NOT passed in."]
#[doc = ""]
#[doc = "len: Number of bytes in data block."]
#[doc = ""]
#[doc = "Returns pointer to newly created stream. May throw exceptions on"]
#[doc = "failure 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."]
#[doc = ""]
#[doc = "buf: The buffer to open. Ownership of the buffer is NOT passed"]
#[doc = "in (this function takes its own reference)."]
#[doc = ""]
#[doc = "Returns pointer to newly created stream. May throw exceptions on"]
#[doc = "failure 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"]
#[doc = "characters read from the stream into the supplied buffer."]
#[doc = ""]
#[doc = "chain: The underlying stream to leech from."]
#[doc = ""]
#[doc = "buf: The buffer into which the read data should be appended."]
#[doc = "The buffer will be resized as required."]
#[doc = ""]
#[doc = "Returns pointer to newly created stream. May throw exceptions on"]
#[doc = "failure 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"]
#[doc = "pointer."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "When the reference count for the stream hits zero, frees the"]
#[doc = "storage used for the fz_stream itself, and (usually)"]
#[doc = "releases the underlying resources that the stream is based upon"]
#[doc = "(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."]
#[doc = ""]
#[doc = "stm: The stream to seek within."]
#[doc = ""]
#[doc = "offset: The offset to seek to."]
#[doc = ""]
#[doc = "whence: 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."]
#[doc = ""]
#[doc = "stm: The stream to read from."]
#[doc = ""]
#[doc = "data: The data block to read into."]
#[doc = ""]
#[doc = "len: The length of the data block (in bytes)."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "stm: The stream to read from."]
#[doc = ""]
#[doc = "len: The number of bytes to read."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "stm: The stream to read from"]
#[doc = ""]
#[doc = "initial: Suggested initial size for the buffer."]
#[doc = ""]
#[doc = "Returns a buffer created from reading from the stream. May throw"]
#[doc = "exceptions 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)?"]
#[doc = ""]
#[doc = "Read a 16/32/64 bit signed/unsigned integer from stream,"]
#[doc = "in big or little-endian byte orders."]
#[doc = ""]
#[doc = "Throws 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"]
#[doc = "a buffer of a given length. The buffer will be null terminated."]
#[doc = "Throws on failure (including the failure to fit the entire"]
#[doc = "string 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"]
#[doc = "fz_streams. The supplied function of this type is called"]
#[doc = "whenever data is required, and the current buffer is empty."]
#[doc = ""]
#[doc = "stm: The stream to operate on."]
#[doc = ""]
#[doc = "max: a hint as to the maximum number of bytes that the caller"]
#[doc = "needs to be ready immediately. Can safely be ignored."]
#[doc = ""]
#[doc = "Returns -1 if there is no more data in the stream. Otherwise,"]
#[doc = "the function should find its internal state using stm->state,"]
#[doc = "refill its buffer, update stm->rp and stm->wp to point to the"]
#[doc = "start and end of the new data respectively, and then"]
#[doc = "\"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"]
#[doc = "fz_streams. The supplied function of this type is called"]
#[doc = "when the stream is dropped, to release the stream specific"]
#[doc = "state information."]
#[doc = ""]
#[doc = "state: 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"]
#[doc = "fz_streams. The supplied function of this type is called when"]
#[doc = "fz_seek is requested, and the arguments are as defined for"]
#[doc = "fz_seek."]
#[doc = ""]
#[doc = "The 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() {
assert_eq!(
::std::mem::size_of::<fz_stream>(),
56usize,
concat!("Size of: ", stringify!(fz_stream))
);
assert_eq!(
::std::mem::align_of::<fz_stream>(),
4usize,
concat!("Alignment of ", stringify!(fz_stream))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).error as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).eof as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(eof)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).progressive as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(progressive)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).pos as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(pos)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).avail as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(avail)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).bits as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(bits)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).rp as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(rp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).wp as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(wp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).state as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).next as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).drop as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stream>())).seek as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_stream),
"::",
stringify!(seek)
)
);
}
extern "C" {
#[doc = "Create a new stream object with the given"]
#[doc = "internal state and function pointers."]
#[doc = ""]
#[doc = "state: Internal state (opaque to everything but implementation)."]
#[doc = ""]
#[doc = "next: Should provide the next set of bytes (up to max) of stream"]
#[doc = "data. Return the number of bytes read, or EOF when there is no"]
#[doc = "more data."]
#[doc = ""]
#[doc = "drop: Should clean up and free the internal state. May not"]
#[doc = "throw 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"]
#[doc = "is NULL behaves as fz_read_all, sets a truncated flag in case of"]
#[doc = "error."]
#[doc = ""]
#[doc = "stm: The stream to read from."]
#[doc = ""]
#[doc = "initial: Suggested initial size for the buffer."]
#[doc = ""]
#[doc = "truncated: Flag to store success/failure indication in."]
#[doc = ""]
#[doc = "Returns 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,
) -> *mut fz_buffer;
}
extern "C" {
#[doc = "Read a line from stream into the buffer until either a"]
#[doc = "terminating newline or EOF, which it replaces with a null byte"]
#[doc = "('\\0')."]
#[doc = ""]
#[doc = "Returns buf on success, and NULL when end of file occurs while"]
#[doc = "no 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 = "Create a stream from a FILE * that will not be closed"]
#[doc = "when 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"]
#[doc = "fz_outputs. The supplied function of this type is called"]
#[doc = "whenever data is written to the output."]
#[doc = ""]
#[doc = "state: The state for the output stream."]
#[doc = ""]
#[doc = "data: a pointer to a buffer of data to write."]
#[doc = ""]
#[doc = "n: 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"]
#[doc = "fz_outputs. The supplied function of this type is called when"]
#[doc = "fz_seek_output is requested."]
#[doc = ""]
#[doc = "state: The output stream state to seek within."]
#[doc = ""]
#[doc = "offset, 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"]
#[doc = "fz_outputs. The supplied function of this type is called when"]
#[doc = "fz_tell_output is requested."]
#[doc = ""]
#[doc = "state: The output stream state to report on."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "fz_outputs. The supplied function of this type is called"]
#[doc = "when 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"]
#[doc = "fz_outputs. The supplied function of this type is called"]
#[doc = "when the output stream is dropped, to release the stream"]
#[doc = "specific 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"]
#[doc = "fz_outputs. The supplied function of this type is called"]
#[doc = "when 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"]
#[doc = "fz_outputs. The supplied function of this type is called"]
#[doc = "when fz_truncate_output is called to truncate the file"]
#[doc = "at 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,
}
#[test]
fn bindgen_test_layout_fz_output() {
assert_eq!(
::std::mem::size_of::<fz_output>(),
44usize,
concat!("Size of: ", stringify!(fz_output))
);
assert_eq!(
::std::mem::align_of::<fz_output>(),
4usize,
concat!("Alignment of ", stringify!(fz_output))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).write as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).seek as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(seek)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).tell as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(tell)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).close as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(close)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).drop as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).as_stream as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(as_stream)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).truncate as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(truncate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).bp as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(bp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).wp as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(wp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_output>())).ep as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_output),
"::",
stringify!(ep)
)
);
}
extern "C" {
#[doc = "Create a new output object with the given"]
#[doc = "internal state and function pointers."]
#[doc = ""]
#[doc = "state: Internal state (opaque to everything but implementation)."]
#[doc = ""]
#[doc = "write: Function to output a given buffer."]
#[doc = ""]
#[doc = "close: Cleanup function to destroy state when output closed."]
#[doc = "May 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"]
#[doc = "given path."]
#[doc = ""]
#[doc = "filename: The filename to write to (specified in UTF-8)."]
#[doc = ""]
#[doc = "append: non-zero if we should append to the file, rather than"]
#[doc = "overwriting 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"]
#[doc = "to a buffer."]
#[doc = ""]
#[doc = "buf: 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."]
#[doc = ""]
#[doc = "Should 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."]
#[doc = ""]
#[doc = "Should be fz_dropped when finished with."]
pub fn fz_stderr(ctx: *mut fz_context) -> *mut fz_output;
}
extern "C" {
#[doc = "Format and write data to an output stream."]
#[doc = "See 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: va_list,
);
}
extern "C" {
#[doc = "Seek to the specified file position."]
#[doc = "See fseek for arguments."]
#[doc = ""]
#[doc = "Throw 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."]
#[doc = ""]
#[doc = "Throw 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."]
#[doc = ""]
#[doc = "This allows data to be read back from some forms of fz_output"]
#[doc = "object. When finished reading, the fz_stream should be released"]
#[doc = "by calling fz_drop_stream. Until the fz_stream is dropped, no"]
#[doc = "further 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."]
#[doc = ""]
#[doc = "This allows output streams which have seeked back from the end"]
#[doc = "of 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."]
#[doc = ""]
#[doc = "data: Pointer to data to write."]
#[doc = "size: 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" {
#[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"]
#[doc = "newlines."]
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"]
#[doc = "newlines."]
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 = "Our customised 'printf'-like string formatter."]
#[doc = "Takes %c, %d, %s, %u, %x, as usual."]
#[doc = "Modifiers are not supported except for zero-padding ints (e.g."]
#[doc = "%02d, %03u, %04x, etc)."]
#[doc = "%g output in \"as short as possible hopefully lossless"]
#[doc = "non-exponent\" form, see fz_ftoa for specifics."]
#[doc = "%f and %e output as usual."]
#[doc = "%C outputs a utf8 encoded int."]
#[doc = "%M outputs a fz_matrix*."]
#[doc = "%R outputs a fz_rect*."]
#[doc = "%P outputs a fz_point*."]
#[doc = "%n outputs a PDF name (with appropriate escaping)."]
#[doc = "%q and %( output escaped strings in C/PDF syntax."]
#[doc = "%l{d,u,x} indicates that the values are int64_t."]
#[doc = "%z{d,u,x} indicates that the value is a size_t."]
#[doc = ""]
#[doc = "user: An opaque pointer that is passed to the emit function."]
#[doc = ""]
#[doc = "emit: A function pointer called to emit output bytes as the"]
#[doc = "string 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: va_list,
);
}
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: va_list,
) -> 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."]
#[doc = ""]
#[doc = "Returns a null terminated allocated block containing the"]
#[doc = "formatted 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."]
#[doc = ""]
#[doc = "These outputs write encoded data to another output. Create a"]
#[doc = "filter output with the destination, write to the filter, then"]
#[doc = "close and drop it when you're done. These can also be chained"]
#[doc = "together, for example to write ASCII Hex encoded, Deflate"]
#[doc = "compressed, and RC4 encrypted data to a buffer output."]
#[doc = ""]
#[doc = "Output streams don't use reference counting, so make sure to"]
#[doc = "close all of the filters in the reverse order of creation so"]
#[doc = "that data is flushed properly."]
#[doc = ""]
#[doc = "Accordingly, ownership of 'chain' is never passed into the"]
#[doc = "following functions, but remains with the caller, whose"]
#[doc = "responsibility it is to ensure they exist at least until"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "Caller 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"]
#[doc = "based allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_md5 {
pub state: [::std::os::raw::c_uint; 4usize],
pub count: [::std::os::raw::c_uint; 2usize],
pub buffer: [::std::os::raw::c_uchar; 64usize],
}
#[test]
fn bindgen_test_layout_fz_md5() {
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::null::<fz_md5>())).state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_md5>())).count as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_md5>())).buffer as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_md5),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "MD5 initialization. Begins an MD5 operation, writing a new"]
#[doc = "context."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_md5_init(state: *mut fz_md5);
}
extern "C" {
#[doc = "MD5 block update operation. Continues an MD5 message-digest"]
#[doc = "operation, processing another message block, and updating the"]
#[doc = "context."]
#[doc = ""]
#[doc = "Never 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 finalization. Ends an MD5 message-digest operation, writing"]
#[doc = "the message digest and zeroizing the context."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "based 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() {
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::null::<fz_sha256__bindgen_ty_1>())).u8_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256__bindgen_ty_1),
"::",
stringify!(u8_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha256__bindgen_ty_1>())).u32_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256__bindgen_ty_1),
"::",
stringify!(u32_)
)
);
}
#[test]
fn bindgen_test_layout_fz_sha256() {
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::null::<fz_sha256>())).state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha256>())).count as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha256>())).buffer as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_sha256),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "SHA256 initialization. Begins an SHA256 operation, initialising"]
#[doc = "the supplied context."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_sha256_init(state: *mut fz_sha256);
}
extern "C" {
#[doc = "SHA256 block update operation. Continues an SHA256 message-"]
#[doc = "digest operation, processing another message block, and updating"]
#[doc = "the context."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "the message digest and zeroizing the context."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "based 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() {
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>(),
4usize,
concat!("Alignment of ", stringify!(fz_sha512__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha512__bindgen_ty_1>())).u8_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512__bindgen_ty_1),
"::",
stringify!(u8_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha512__bindgen_ty_1>())).u64_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512__bindgen_ty_1),
"::",
stringify!(u64_)
)
);
}
#[test]
fn bindgen_test_layout_fz_sha512() {
assert_eq!(
::std::mem::size_of::<fz_sha512>(),
200usize,
concat!("Size of: ", stringify!(fz_sha512))
);
assert_eq!(
::std::mem::align_of::<fz_sha512>(),
4usize,
concat!("Alignment of ", stringify!(fz_sha512))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha512>())).state as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha512>())).count as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_sha512>())).buffer as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_sha512),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "SHA512 initialization. Begins an SHA512 operation, initialising"]
#[doc = "the supplied context."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_sha512_init(state: *mut fz_sha512);
}
extern "C" {
#[doc = "SHA512 block update operation. Continues an SHA512 message-"]
#[doc = "digest operation, processing another message block, and updating"]
#[doc = "the context."]
#[doc = ""]
#[doc = "Never 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,"]
#[doc = "writing the message digest and zeroizing the context."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_sha512_final(state: *mut fz_sha512, digest: *mut ::std::os::raw::c_uchar);
}
pub type fz_sha384 = fz_sha512;
extern "C" {
#[doc = "SHA384 initialization. Begins an SHA384 operation, initialising"]
#[doc = "the supplied context."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_sha384_init(state: *mut fz_sha384);
}
extern "C" {
#[doc = "SHA384 block update operation. Continues an SHA384 message-"]
#[doc = "digest operation, processing another message block, and updating"]
#[doc = "the context."]
#[doc = ""]
#[doc = "Never 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,"]
#[doc = "writing the message digest and zeroizing the context."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "based allocation. Do not access the members directly."]
#[repr(C)]
#[derive(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() {
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::null::<fz_arc4>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_arc4>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_arc4>())).state as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_arc4),
"::",
stringify!(state)
)
);
}
extern "C" {
#[doc = "RC4 initialization. Begins an RC4 operation, writing a new"]
#[doc = "context."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "length len) updating the RC4 state as we go."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "Never throws an exception."]
pub fn fz_arc4_final(state: *mut fz_arc4);
}
#[doc = "Structure definitions are public to enable stack"]
#[doc = "based allocation. Do not access the members directly."]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fz_aes {
pub nr: ::std::os::raw::c_int,
pub rk: *mut ::std::os::raw::c_ulong,
pub buf: [::std::os::raw::c_ulong; 68usize],
}
#[test]
fn bindgen_test_layout_fz_aes() {
assert_eq!(
::std::mem::size_of::<fz_aes>(),
280usize,
concat!("Size of: ", stringify!(fz_aes))
);
assert_eq!(
::std::mem::align_of::<fz_aes>(),
4usize,
concat!("Alignment of ", stringify!(fz_aes))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aes>())).nr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(nr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aes>())).rk as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(rk)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_aes>())).buf as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_aes),
"::",
stringify!(buf)
)
);
}
extern "C" {
#[doc = "AES encryption intialisation. Fills in the supplied context"]
#[doc = "and prepares for encryption using the given key."]
#[doc = ""]
#[doc = "Returns non-zero for error (key size other than 128/192/256)."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "and prepares for decryption using the given key."]
#[doc = ""]
#[doc = "Returns non-zero for error (key size other than 128/192/256)."]
#[doc = ""]
#[doc = "Never 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,"]
#[doc = "which must match what was initially set up) length bytes (which"]
#[doc = "must be a multiple of 16), using (and modifying) the insertion"]
#[doc = "vector iv, reading from input, and writing to output."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "Only 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."]
#[doc = ""]
#[doc = "initialsize: The initial size of the hashtable. The hashtable"]
#[doc = "may grow (double in size) if it starts to get crowded (80%"]
#[doc = "full)."]
#[doc = ""]
#[doc = "keylen: byte length for each key."]
#[doc = ""]
#[doc = "lock: -1 for no lock, otherwise the FZ_LOCK to use to protect"]
#[doc = "this table."]
#[doc = ""]
#[doc = "drop_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."]
#[doc = ""]
#[doc = "Values 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"]
#[doc = "associated 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."]
#[doc = ""]
#[doc = "If an existing entry with the same key is found, no change is"]
#[doc = "made to the hash table, and a pointer to the existing value is"]
#[doc = "returned."]
#[doc = ""]
#[doc = "If no existing entry with the same key is found, ownership of"]
#[doc = "val 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."]
#[doc = ""]
#[doc = "The value is NOT freed, so the caller is expected to take care"]
#[doc = "of 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"]
#[doc = "table, 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,
);
}
#[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."]
#[doc = ""]
#[doc = "The number of bytes of storage currently allocated to the pool."]
#[doc = "This is the total of the storage used for the blocks making"]
#[doc = "up the pool, rather then total of the allocated blocks so far,"]
#[doc = "so it will increase in 'lumps'."]
#[doc = "from 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"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "Simple pointer equivalence is used for key."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "Return the new root of the tree after inserting and rebalancing."]
#[doc = "May be called with a NULL root to create a new tree."]
#[doc = ""]
#[doc = "No data is copied into the tree structure; key and value are"]
#[doc = "merely 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."]
#[doc = ""]
#[doc = "The storage used by the tree is freed, and each value has"]
#[doc = "dropfunc 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."]
#[doc = ""]
#[doc = "@param\tfragment\tfirst character in fragment"]
#[doc = "@param\tfragmentLen\tnumber of characters in fragment"]
#[doc = "@param\tbidiLevel\tThe bidirectional level for this text."]
#[doc = "The bottom bit will be set iff block"]
#[doc = "should concatenate with other blocks as"]
#[doc = "right-to-left"]
#[doc = "@param\tscript\t\tthe script in use for this fragment (other"]
#[doc = "than common or inherited)"]
#[doc = "@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"]
#[doc = "unidirectional fragments and invokes the given callback"]
#[doc = "function for each fragment."]
#[doc = ""]
#[doc = "For example, if directionality of text is:"]
#[doc = "0123456789"]
#[doc = "rrlllrrrrr,"]
#[doc = "we'll invoke callback with:"]
#[doc = "&text[0], length == 2"]
#[doc = "&text[2], length == 3"]
#[doc = "&text[5], length == 5"]
#[doc = ""]
#[doc = "@param[in] text\tstart of Unicode sequence"]
#[doc = "@param[in] textlen number of Unicodes to analyse"]
#[doc = "@param[in] baseDir direction of paragraph (specify FZ_BIDI_NEUTRAL to force auto-detection)"]
#[doc = "@param[in] callback function to be called for each fragment"]
#[doc = "@param[in] arg\tdata to be passed to the callback function"]
#[doc = "@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_doc {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_xml {
_unused: [u8; 0],
}
extern "C" {
#[doc = "Parse the contents of buffer into a tree of xml nodes."]
#[doc = ""]
#[doc = "preserve_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_doc;
}
extern "C" {
#[doc = "Parse the contents of a buffer into a tree of XML nodes,"]
#[doc = "using the HTML5 parsing algorithm."]
pub fn fz_parse_xml_from_html5(ctx: *mut fz_context, buf: *mut fz_buffer) -> *mut fz_xml_doc;
}
extern "C" {
#[doc = "Free the XML node and all its children and siblings."]
pub fn fz_drop_xml(ctx: *mut fz_context, xml: *mut fz_xml_doc);
}
extern "C" {
#[doc = "Detach a node from the tree, unlinking it from its parent,"]
#[doc = "and setting the document root to the node."]
pub fn fz_detach_xml(ctx: *mut fz_context, xml: *mut fz_xml_doc, 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."]
#[doc = "NULL 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."]
#[doc = "If the first attribute doesn't exist, try the second."]
#[doc = "NULL 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."]
#[doc = ""]
#[doc = "If the node has the requested attribute (name), and the value"]
#[doc = "matches (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 = "Return the text content of an XML node."]
#[doc = "Return 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"]
#[doc = "the first with the given tag."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "of item looking for the first with the given tag."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "of item looking for the first with the given tag."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "the first with the given tag, and with a matching attribute."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "of item looking for the first with the given tag, and with a"]
#[doc = "matching attribute."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "of item looking for the first with the given tag, and with a"]
#[doc = "matching attribute."]
#[doc = ""]
#[doc = "Return 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;
}
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"]
#[doc = "size 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"]
#[doc = "at source, into a buffer of length *destLen, starting at dest."]
#[doc = "compressed_length will be updated on exit to contain the size"]
#[doc = "actually 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"]
#[doc = "at source, into a new memory block malloced for that purpose."]
#[doc = "compressed_length is updated on exit to contain the size used."]
#[doc = "Ownership of the block is returned from this function, and the"]
#[doc = "caller is therefore responsible for freeing it. The block may be"]
#[doc = "considerably larger than is actually required. The caller is"]
#[doc = "free 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"]
#[doc = "new block malloced for that purpose. *compressed_length is"]
#[doc = "updated on exit to contain the size used. Ownership of the block"]
#[doc = "is returned from this function, and the caller is therefore"]
#[doc = "responsible for freeing it. The block may be considerably larger"]
#[doc = "than is actually required. The caller is free to fz_realloc it"]
#[doc = "down 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."]
#[doc = "Creates a stream assuming the default PDF parameters,"]
#[doc = "except 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."]
#[doc = "Creates a stream assuming the default PDF parameters, except"]
#[doc = "K=-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."]
#[doc = ""]
#[doc = "Objects within the store are identified by type by comparing"]
#[doc = "their 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"]
#[doc = "at the start (by convention at least) of their structure."]
#[doc = "(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() {
assert_eq!(
::std::mem::size_of::<fz_storable>(),
8usize,
concat!("Size of: ", stringify!(fz_storable))
);
assert_eq!(
::std::mem::align_of::<fz_storable>(),
4usize,
concat!("Alignment of ", stringify!(fz_storable))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_storable>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_storable),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_storable>())).drop as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_storable),
"::",
stringify!(drop)
)
);
}
#[doc = "Any storable object that can appear in the key of another"]
#[doc = "storable object should include an fz_key_storable structure"]
#[doc = "at 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() {
assert_eq!(
::std::mem::size_of::<fz_key_storable>(),
12usize,
concat!("Size of: ", stringify!(fz_key_storable))
);
assert_eq!(
::std::mem::align_of::<fz_key_storable>(),
4usize,
concat!("Alignment of ", stringify!(fz_key_storable))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_key_storable>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_key_storable),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_key_storable>())).store_key_refs as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_key_storable),
"::",
stringify!(store_key_refs)
)
);
}
extern "C" {
#[doc = "Increment the reference count for a storable object."]
#[doc = "Returns the same pointer."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count hits zero, the drop function for that object"]
#[doc = "is called to free the object."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "object. Returns the same pointer."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = "When the total reference count hits zero, the drop function for"]
#[doc = "that object is called to free the object."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "object. Returns the same pointer."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = "When the total reference count hits zero, the drop function for"]
#[doc = "that object is called to free the object."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "fz_storable values. In order to allow keys of different types to"]
#[doc = "be stored, we have a structure full of functions for each key"]
#[doc = "'type'; this fz_store_type pointer is stored with each key, and"]
#[doc = "tells the store how to perform certain operations (like taking/"]
#[doc = "dropping a reference, comparing two keys, outputting details for"]
#[doc = "debugging etc)."]
#[doc = ""]
#[doc = "The store uses a hash table internally for speed where possible."]
#[doc = "In order for this to work, we need a mechanism for turning a"]
#[doc = "generic 'key' into 'a hashable string'. For this purpose the"]
#[doc = "type structure contains a make_hash_key function pointer that"]
#[doc = "maps from a void * to a fz_store_hash structure. If"]
#[doc = "make_hash_key function returns 0, then the key is determined not"]
#[doc = "to be hashable, and the value is not stored in the hash table."]
#[doc = ""]
#[doc = "Some objects can be used both as values within the store, and as"]
#[doc = "a component of keys within the store. We refer to these objects"]
#[doc = "as \"key storable\" objects. In this case, we need to take"]
#[doc = "additional care to ensure that we do not end up keeping an item"]
#[doc = "within the store, purely because its value is referred to by"]
#[doc = "another key in the store."]
#[doc = ""]
#[doc = "An example of this are fz_images in PDF files. Each fz_image is"]
#[doc = "placed into the\tstore to enable it to be easily reused. When the"]
#[doc = "image is rendered, a pixmap is generated from the image, and the"]
#[doc = "pixmap is placed into the store so it can be reused on"]
#[doc = "subsequent renders. The image forms part of the key for the"]
#[doc = "pixmap."]
#[doc = ""]
#[doc = "When we close the pdf document (and any associated pages/display"]
#[doc = "lists etc), we drop the images from the store. This may leave us"]
#[doc = "in the position of the images having non-zero reference counts"]
#[doc = "purely because they are used as part of the keys for the"]
#[doc = "pixmaps."]
#[doc = ""]
#[doc = "We therefore use special reference counting functions to keep"]
#[doc = "track of these \"key storable\" items, and hence store the number"]
#[doc = "of references to these items that are used in keys."]
#[doc = ""]
#[doc = "When the number of references to an object == the number of"]
#[doc = "references to an object from keys in the store, we know that we"]
#[doc = "can remove all the items which have that object as part of the"]
#[doc = "key. This is done by running a pass over the store, 'reaping'"]
#[doc = "those items."]
#[doc = ""]
#[doc = "Reap passes are slower than we would like as they touch every"]
#[doc = "item in the store. We therefore provide a way to 'batch' such"]
#[doc = "reap passes together, using fz_defer_reap_start/"]
#[doc = "fz_defer_reap_end to bracket a region in which many may be"]
#[doc = "triggered."]
#[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() {
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_1>(),
8usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_1>())).ptr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_1>())).i as *const _
as usize
},
4usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>(),
24usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>())).ptr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>())).i as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(i)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_2>())).r as *const _
as usize
},
8usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>(),
28usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>())).id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>())).has_shape
as *const _ 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::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>())).has_group_alpha
as *const _ 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::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>())).m as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(m)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_3>())).ptr as *const _
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() {
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::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_4>())).src_md5
as *const _ 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::null::<fz_store_hash__bindgen_ty_1__bindgen_ty_4>())).dst_md5
as *const _ 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() {
assert_eq!(
::std::mem::size_of::<fz_store_hash__bindgen_ty_1>(),
36usize,
concat!("Size of: ", stringify!(fz_store_hash__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_store_hash__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(fz_store_hash__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1>())).pi as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(pi)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1>())).pir as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(pir)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1>())).im as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(im)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_store_hash__bindgen_ty_1>())).link as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash__bindgen_ty_1),
"::",
stringify!(link)
)
);
}
#[test]
fn bindgen_test_layout_fz_store_hash() {
assert_eq!(
::std::mem::size_of::<fz_store_hash>(),
40usize,
concat!("Size of: ", stringify!(fz_store_hash))
);
assert_eq!(
::std::mem::align_of::<fz_store_hash>(),
4usize,
concat!("Alignment of ", stringify!(fz_store_hash))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_hash>())).drop as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_hash>())).u as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_store_hash),
"::",
stringify!(u)
)
);
}
#[doc = "Every type of object to be placed into the store defines an"]
#[doc = "fz_store_type. This contains the pointers to functions to"]
#[doc = "make 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() {
assert_eq!(
::std::mem::size_of::<fz_store_type>(),
28usize,
concat!("Size of: ", stringify!(fz_store_type))
);
assert_eq!(
::std::mem::align_of::<fz_store_type>(),
4usize,
concat!("Alignment of ", stringify!(fz_store_type))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).make_hash_key as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(make_hash_key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).keep_key as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(keep_key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).drop_key as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(drop_key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).cmp_key as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(cmp_key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).format_key as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(format_key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_store_type>())).needs_reap as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_store_type),
"::",
stringify!(needs_reap)
)
);
}
extern "C" {
#[doc = "Create a new store inside the context"]
#[doc = ""]
#[doc = "max: The maximum size (in bytes) that the store is allowed to"]
#[doc = "grow 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"]
#[doc = "the same pointer."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count hits zero, the store context is freed."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_drop_store_context(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Add an item to the store."]
#[doc = ""]
#[doc = "Add an item into the store, returning NULL for success. If an"]
#[doc = "item with the same key is found in the store, then our item will"]
#[doc = "not be inserted, and the function will return a pointer to that"]
#[doc = "value instead. This function takes its own reference to val, as"]
#[doc = "required (i.e. the caller maintains ownership of its own"]
#[doc = "reference)."]
#[doc = ""]
#[doc = "key: The key used to index the item."]
#[doc = ""]
#[doc = "val: The value to store."]
#[doc = ""]
#[doc = "itemsize: The size in bytes of the value (as counted towards the"]
#[doc = "store size)."]
#[doc = ""]
#[doc = "type: 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."]
#[doc = ""]
#[doc = "drop: The function used to free the value (to ensure we get a"]
#[doc = "value of the correct type)."]
#[doc = ""]
#[doc = "key: The key used to index the item."]
#[doc = ""]
#[doc = "type: Functions used to manipulate the key."]
#[doc = ""]
#[doc = "Returns NULL for not found, otherwise returns a pointer to the"]
#[doc = "value 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."]
#[doc = ""]
#[doc = "If an item indexed by the given key exists in the store, remove"]
#[doc = "it."]
#[doc = ""]
#[doc = "drop: The function used to free the value (to ensure we get a"]
#[doc = "value of the correct type)."]
#[doc = ""]
#[doc = "key: The key used to find the item to remove."]
#[doc = ""]
#[doc = "type: 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"]
#[doc = "allocator; when we fail to allocate memory, before returning a"]
#[doc = "failure to the caller, we try to scavenge space within the store"]
#[doc = "by evicting at least 'size' bytes. The allocator then retries."]
#[doc = ""]
#[doc = "size: The number of bytes we are trying to have free."]
#[doc = ""]
#[doc = "phase: What phase of the scavenge we are in. Updated on exit."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "to scavenge while trying allocations."]
#[doc = ""]
#[doc = "size: The number of bytes we are trying to have free."]
#[doc = ""]
#[doc = "phase: What phase of the scavenge we are in. Updated on exit."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "the objects in the store is reduced to a given percentage of its"]
#[doc = "current size."]
#[doc = ""]
#[doc = "percent: %age of current size to reduce the store to."]
#[doc = ""]
#[doc = "Returns non zero if we managed to free enough memory, zero"]
#[doc = "otherwise."]
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"]
#[doc = "the store."]
#[doc = ""]
#[doc = "Return 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"]
#[doc = "given function."]
#[doc = ""]
#[doc = "If 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"]
#[doc = "to 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."]
#[doc = ""]
#[doc = "No reap operations will take place (except for those"]
#[doc = "triggered by an immediate failed malloc) until the"]
#[doc = "defer reap count returns to 0."]
#[doc = ""]
#[doc = "Call this at the start of a process during which you"]
#[doc = "potentially might drop many reapable objects."]
#[doc = ""]
#[doc = "It is vital that every fz_defer_reap_start is matched"]
#[doc = "by a fz_defer_reap_end call."]
pub fn fz_defer_reap_start(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Decrement the defer reap count."]
#[doc = ""]
#[doc = "If the defer reap count returns to 0, and the store"]
#[doc = "has reapable objects in, a reap pass will begin."]
#[doc = ""]
#[doc = "Call this at the end of a process during which you"]
#[doc = "potentially might drop many reapable objects."]
#[doc = ""]
#[doc = "It is vital that every fz_defer_reap_start is matched"]
#[doc = "by 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: usize,
}
#[test]
fn bindgen_test_layout_fz_range() {
assert_eq!(
::std::mem::size_of::<fz_range>(),
12usize,
concat!("Size of: ", stringify!(fz_range))
);
assert_eq!(
::std::mem::align_of::<fz_range>(),
4usize,
concat!("Alignment of ", stringify!(fz_range))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_range>())).offset as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_range),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_range>())).length as *const _ 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"]
#[doc = "substream."]
pub fn fz_open_null_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
len: ::std::os::raw::c_int,
offset: i64,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "The range filter copies data from specified ranges of the"]
#[doc = "chained 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"]
#[doc = "for an 'endstream' token after the specified length."]
pub fn fz_open_endstream_filter(
ctx: *mut fz_context,
chain: *mut fz_stream,
len: ::std::os::raw::c_int,
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."]
#[doc = ""]
#[doc = "Ownership 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"]
#[doc = "filter 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"]
#[doc = "filter 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"]
#[doc = "from 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"]
#[doc = "from 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"]
#[doc = "from 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"]
#[doc = "from the chained filter."]
#[doc = ""]
#[doc = "color_transform implements the PDF color_transform option;"]
#[doc = "use -1 (unset) as a default."]
#[doc = ""]
#[doc = "For subsampling on decode, set l2factor to the log2 of the"]
#[doc = "reduction required (therefore 0 = full size decode)."]
#[doc = ""]
#[doc = "jpegtables is an optional stream from which the JPEG tables"]
#[doc = "can 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"]
#[doc = "the chained filter."]
#[doc = ""]
#[doc = "k: see fax specification (fax default is 0)."]
#[doc = ""]
#[doc = "end_of_line: whether we expect end of line markers (fax default"]
#[doc = "is 0)."]
#[doc = ""]
#[doc = "encoded_byte_align: whether we align to bytes after each line"]
#[doc = "(fax default is 0)."]
#[doc = ""]
#[doc = "columns: how many columns in the image (fax default is 1728)."]
#[doc = ""]
#[doc = "rows: 0 for unspecified or the number of rows of data to expect."]
#[doc = ""]
#[doc = "end_of_block: whether we expect end of block markers (fax"]
#[doc = "default is 1)."]
#[doc = ""]
#[doc = "black_is_1: determines the polarity of the image (fax default is"]
#[doc = "0)."]
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"]
#[doc = "from the chained filter."]
#[doc = ""]
#[doc = "window_bits: How large a decompression window to use. Typically"]
#[doc = "15. A negative number, -n, means to use n bits, but to expect"]
#[doc = "raw 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"]
#[doc = "filter."]
#[doc = ""]
#[doc = "early_change: (Default 1) specifies whether to change codes 1"]
#[doc = "bit early."]
#[doc = ""]
#[doc = "min_bits: (Default 9) specifies the minimum number of bits to"]
#[doc = "use."]
#[doc = ""]
#[doc = "reverse_bits: (Default 0) allows for compatibility with gif and"]
#[doc = "old style tiffs (1)."]
#[doc = ""]
#[doc = "old_tiff: (Default 0) allows for different handling of the clear"]
#[doc = "code, 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"]
#[doc = "the chained filter."]
#[doc = ""]
#[doc = "predictor: 1 = copy, 2 = tiff, other = inline PNG predictor"]
#[doc = ""]
#[doc = "columns: width of image in pixels"]
#[doc = ""]
#[doc = "colors: number of components."]
#[doc = ""]
#[doc = "bpc: 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"]
#[doc = "stream, using the optional globals record."]
pub fn fz_open_jbig2d(
ctx: *mut fz_context,
chain: *mut fz_stream,
globals: *mut fz_jbig2_globals,
) -> *mut fz_stream;
}
extern "C" {
#[doc = "Create a jbig2 globals record from a buffer."]
#[doc = ""]
#[doc = "Immutable 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."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = "When the reference count hits zero, the record is freed."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "store support."]
pub fn fz_drop_jbig2_globals_imp(ctx: *mut fz_context, globals: *mut fz_storable);
}
extern "C" {
#[doc = "SGI Log 16bit (greyscale) decode from the chained filter."]
#[doc = "Decodes 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."]
#[doc = "Decodes 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."]
#[doc = "Decodes 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."]
#[doc = "Decodes 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;"]
#[doc = "typically 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() {
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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_1>()))
.color_transform as *const _ 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() {
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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_2>()))
.smask_in_data as *const _ 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,
}
#[test]
fn bindgen_test_layout_fz_compression_params__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<fz_compression_params__bindgen_ty_1__bindgen_ty_3>(),
4usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_3>())).globals
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(globals)
)
);
}
#[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() {
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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>())).columns
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>())).rows
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(rows)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>())).k
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(k)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>()))
.end_of_line as *const _ 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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>()))
.encoded_byte_align as *const _ 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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>()))
.end_of_block as *const _ 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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>())).black_is_1
as *const _ 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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_4>()))
.damaged_rows_before_error as *const _ 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() {
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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>())).columns
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>())).colors
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(colors)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>())).predictor
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(predictor)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_5>())).bpc
as *const _ 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() {
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::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>())).columns
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(columns)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>())).colors
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(colors)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>())).predictor
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(predictor)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>())).bpc
as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(bpc)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1__bindgen_ty_6>()))
.early_change as *const _ 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() {
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_compression_params__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).jpeg as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jpeg)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).jpx as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jpx)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).jbig2 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(jbig2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).fax as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(fax)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).flate as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(flate)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_compression_params__bindgen_ty_1>())).lzw as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params__bindgen_ty_1),
"::",
stringify!(lzw)
)
);
}
#[test]
fn bindgen_test_layout_fz_compression_params() {
assert_eq!(
::std::mem::size_of::<fz_compression_params>(),
36usize,
concat!("Size of: ", stringify!(fz_compression_params))
);
assert_eq!(
::std::mem::align_of::<fz_compression_params>(),
4usize,
concat!("Alignment of ", stringify!(fz_compression_params))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_compression_params>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_compression_params>())).u as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_compression_params),
"::",
stringify!(u)
)
);
}
#[doc = "Buffers of compressed data; typically for the source data"]
#[doc = "for 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() {
assert_eq!(
::std::mem::size_of::<fz_compressed_buffer>(),
40usize,
concat!("Size of: ", stringify!(fz_compressed_buffer))
);
assert_eq!(
::std::mem::align_of::<fz_compressed_buffer>(),
4usize,
concat!("Alignment of ", stringify!(fz_compressed_buffer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_compressed_buffer>())).params as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_compressed_buffer),
"::",
stringify!(params)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_compressed_buffer>())).buffer as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_compressed_buffer),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "Return the storage size used for a buffer and its data."]
#[doc = "Used in implementing store handling."]
#[doc = ""]
#[doc = "Never 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,"]
#[doc = "with optional log2 subsampling."]
#[doc = ""]
#[doc = "l2factor = NULL for no subsampling, or a pointer to an integer"]
#[doc = "containing the maximum log2 subsample factor acceptable (0 ="]
#[doc = "none, 1 = halve dimensions, 2 = quarter dimensions etc). If"]
#[doc = "non-NULL, then *l2factor will be updated on exit with the actual"]
#[doc = "log2 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"]
#[doc = "with 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"]
#[doc = "data."]
pub fn fz_recognize_image_format(
ctx: *mut fz_context,
p: *mut ::std::os::raw::c_uchar,
) -> ::std::os::raw::c_int;
}
pub const FZ_IMAGE_UNKNOWN: ::std::os::raw::c_uint = 0;
pub const FZ_IMAGE_RAW: ::std::os::raw::c_uint = 1;
pub const FZ_IMAGE_FAX: ::std::os::raw::c_uint = 2;
pub const FZ_IMAGE_FLATE: ::std::os::raw::c_uint = 3;
pub const FZ_IMAGE_LZW: ::std::os::raw::c_uint = 4;
pub const FZ_IMAGE_RLD: ::std::os::raw::c_uint = 5;
pub const FZ_IMAGE_BMP: ::std::os::raw::c_uint = 6;
pub const FZ_IMAGE_GIF: ::std::os::raw::c_uint = 7;
pub const FZ_IMAGE_JBIG2: ::std::os::raw::c_uint = 8;
pub const FZ_IMAGE_JPEG: ::std::os::raw::c_uint = 9;
pub const FZ_IMAGE_JPX: ::std::os::raw::c_uint = 10;
pub const FZ_IMAGE_JXR: ::std::os::raw::c_uint = 11;
pub const FZ_IMAGE_PNG: ::std::os::raw::c_uint = 12;
pub const FZ_IMAGE_PNM: ::std::os::raw::c_uint = 13;
pub const FZ_IMAGE_TIFF: ::std::os::raw::c_uint = 14;
pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Drop a reference to a compressed buffer. Destroys the buffer"]
#[doc = "and frees any storage/other references held by it."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = ""]
#[doc = "Open a file and identify its archive type based on the archive"]
#[doc = "signature contained inside."]
#[doc = ""]
#[doc = "filename: 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."]
#[doc = ""]
#[doc = "Open an archive using a seekable stream object rather than"]
#[doc = "opening 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."]
#[doc = ""]
#[doc = "A special case where a directory is opened as if it was an"]
#[doc = "archive."]
#[doc = ""]
#[doc = "Note that for directories it is not possible to retrieve the"]
#[doc = "number of entries or list the entries. It is however possible"]
#[doc = "to check if the archive has a particular entry."]
#[doc = ""]
#[doc = "path: 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 the reference to an archive."]
#[doc = ""]
#[doc = "Closes and releases any memory or filehandles associated"]
#[doc = "with the archive."]
pub fn fz_drop_archive(ctx: *mut fz_context, arch: *mut fz_archive);
}
extern "C" {
#[doc = "Return a pointer to a string describing the format of the"]
#[doc = "archive."]
#[doc = ""]
#[doc = "The lifetime of the string is unspecified (in current"]
#[doc = "implementations the string will persist until the archive"]
#[doc = "is 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."]
#[doc = ""]
#[doc = "Will always return a value >= 0."]
#[doc = ""]
#[doc = "May throw an exception if this type of archive cannot count the"]
#[doc = "entries (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."]
#[doc = ""]
#[doc = "idx: Must be a value >= 0 < return value from"]
#[doc = "fz_count_archive_entries. If not in range NULL will be"]
#[doc = "returned."]
#[doc = ""]
#[doc = "May throw an exception if this type of archive cannot list the"]
#[doc = "entries (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."]
#[doc = ""]
#[doc = "If named entry does not exist 0 will be returned, if it does"]
#[doc = "exist 1 is returned."]
#[doc = ""]
#[doc = "name: Entry name to look for, this must be an exact match to"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "name: Entry name to look for, this must be an exact match to"]
#[doc = "the entry name in the archive."]
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"]
#[doc = "into a buffer."]
#[doc = ""]
#[doc = "name: Entry name to look for, this must be an exact match to"]
#[doc = "the entry name in the archive."]
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."]
#[doc = ""]
#[doc = "Assumes 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."]
#[doc = ""]
#[doc = "An exception is throw if the file is not a tar archive as"]
#[doc = "indicated by the presence of a tar signature."]
#[doc = ""]
#[doc = "filename: a path to a tar archive file as it would be given to"]
#[doc = "open(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."]
#[doc = ""]
#[doc = "Open an archive using a seekable stream object rather than"]
#[doc = "opening a file or directory on disk."]
#[doc = ""]
#[doc = "An exception is throw if the stream is not a tar archive as"]
#[doc = "indicated 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."]
#[doc = ""]
#[doc = "Assumes 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."]
#[doc = ""]
#[doc = "An exception is throw if the file is not a zip archive as"]
#[doc = "indicated by the presence of a zip signature."]
#[doc = ""]
#[doc = "filename: a path to a zip archive file as it would be given to"]
#[doc = "open(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."]
#[doc = ""]
#[doc = "Open an archive using a seekable stream object rather than"]
#[doc = "opening a file or directory on disk."]
#[doc = ""]
#[doc = "An exception is throw if the stream is not a zip archive as"]
#[doc = "indicated 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."]
#[doc = ""]
#[doc = "Open an archive using a seekable stream object rather than"]
#[doc = "opening 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."]
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"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "This flushes any pending data to the file. This can throw"]
#[doc = "exceptions."]
pub fn fz_close_zip_writer(ctx: *mut fz_context, zip: *mut fz_zip_writer);
}
extern "C" {
#[doc = "Drop the reference to the zipfile."]
#[doc = ""]
#[doc = "In common with other 'drop' methods, this will never throw an"]
#[doc = "exception."]
pub fn fz_drop_zip_writer(ctx: *mut fz_context, zip: *mut fz_zip_writer);
}
#[doc = "Implementation details: Subject to change."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_archive {
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() {
assert_eq!(
::std::mem::size_of::<fz_archive>(),
32usize,
concat!("Size of: ", stringify!(fz_archive))
);
assert_eq!(
::std::mem::align_of::<fz_archive>(),
4usize,
concat!("Alignment of ", stringify!(fz_archive))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).file as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).format as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(format)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).drop_archive as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(drop_archive)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).count_entries as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(count_entries)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).list_entry as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(list_entry)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).has_entry as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(has_entry)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).read_entry as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_archive),
"::",
stringify!(read_entry)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_archive>())).open_entry as *const _ as usize },
28usize,
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: ::std::os::raw::c_uint = 0;
pub const FZ_RI_RELATIVE_COLORIMETRIC: ::std::os::raw::c_uint = 1;
pub const FZ_RI_SATURATION: ::std::os::raw::c_uint = 2;
pub const FZ_RI_ABSOLUTE_COLORIMETRIC: ::std::os::raw::c_uint = 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() {
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::null::<fz_color_params>())).ri as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(ri)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_color_params>())).bp as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(bp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_color_params>())).op as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(fz_color_params),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_color_params>())).opm as *const _ 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"]
#[doc = "value."]
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."]
#[doc = ""]
#[doc = "The 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: ::std::os::raw::c_uint = 32;
#[doc = "The maximum number of colorants available in any given"]
#[doc = "color/colorspace (not including alpha)."]
#[doc = ""]
#[doc = "Changing this value will alter the amount of memory being used"]
#[doc = "(both stack and heap space), but not hugely. Speed should"]
#[doc = "(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: ::std::os::raw::c_uint = 1;
pub const FZ_COLORSPACE_IS_ICC: ::std::os::raw::c_uint = 2;
pub const FZ_COLORSPACE_HAS_CMYK: ::std::os::raw::c_uint = 4;
pub const FZ_COLORSPACE_HAS_SPOTS: ::std::os::raw::c_uint = 8;
pub const FZ_COLORSPACE_HAS_CMYK_AND_SPOTS: ::std::os::raw::c_uint = 12;
pub type _bindgen_ty_8 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Creates a new colorspace instance and returns a reference."]
#[doc = ""]
#[doc = "No internal checking is done that the colorspace type (e.g."]
#[doc = "CMYK) matches with the flags (e.g. FZ_COLORSPACE_HAS_CMYK) or"]
#[doc = "colorant count (n) or name."]
#[doc = ""]
#[doc = "The reference should be dropped when it is finished with."]
#[doc = ""]
#[doc = "Colorspaces are immutable once created (with the exception of"]
#[doc = "setting 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."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "When the reference count reaches zero, the colorspace is"]
#[doc = "destroyed."]
pub fn fz_drop_colorspace(ctx: *mut fz_context, colorspace: *mut fz_colorspace);
}
extern "C" {
#[doc = "Create an indexed colorspace."]
#[doc = ""]
#[doc = "The supplied lookup table is high palette entries long. Each"]
#[doc = "entry is n bytes long, where n is given by the number of"]
#[doc = "colorants in the base colorspace, one byte per colorant."]
#[doc = ""]
#[doc = "Ownership of lookup is passed it; it will be freed on"]
#[doc = "destruction, so must be heap allocated."]
#[doc = ""]
#[doc = "The colorspace will keep an additional reference to the base"]
#[doc = "colorspace that will be dropped on destruction."]
#[doc = ""]
#[doc = "The returned reference should be dropped when it is finished"]
#[doc = "with."]
#[doc = ""]
#[doc = "Colorspaces 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."]
#[doc = ""]
#[doc = "Limited checking is done to ensure that the colorspace type is"]
#[doc = "appropriate for the supplied ICC profile."]
#[doc = ""]
#[doc = "An additional reference is taken to buf, which will be dropped"]
#[doc = "on destruction. Ownership is NOT passed in."]
#[doc = ""]
#[doc = "The returned reference should be dropped when it is finished"]
#[doc = "with."]
#[doc = ""]
#[doc = "Colorspaces 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."]
#[doc = ""]
#[doc = "The returned reference should be dropped when it is finished"]
#[doc = "with."]
#[doc = ""]
#[doc = "Colorspaces 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."]
#[doc = ""]
#[doc = "The returned reference should be dropped when it is finished"]
#[doc = "with."]
#[doc = ""]
#[doc = "Colorspaces 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."]
#[doc = ""]
#[doc = "The returned string has the same lifespan as the colorspace"]
#[doc = "does. 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"]
#[doc = "one 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"]
#[doc = "a 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."]
#[doc = ""]
#[doc = "These return borrowed references that should not be dropped,"]
#[doc = "unless 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."]
#[doc = ""]
#[doc = "Used while initially setting up a colorspace. The string is"]
#[doc = "copied into local storage, so need not be retained by the"]
#[doc = "caller."]
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."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "given 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"]
#[doc = "for colorspace ds, via an optional intervening space is,"]
#[doc = "respecting 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() {
assert_eq!(
::std::mem::size_of::<fz_default_colorspaces>(),
20usize,
concat!("Size of: ", stringify!(fz_default_colorspaces))
);
assert_eq!(
::std::mem::align_of::<fz_default_colorspaces>(),
4usize,
concat!("Alignment of ", stringify!(fz_default_colorspaces))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_default_colorspaces>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_default_colorspaces>())).gray as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(gray)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_default_colorspaces>())).rgb as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(rgb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_default_colorspaces>())).cmyk as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(cmyk)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_default_colorspaces>())).oi as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_default_colorspaces),
"::",
stringify!(oi)
)
);
}
extern "C" {
#[doc = "Create a new default colorspace structure with values inherited"]
#[doc = "from the context, and return a reference to it."]
#[doc = ""]
#[doc = "These can be overridden using fz_set_default_xxxx."]
#[doc = ""]
#[doc = "These should not be overridden while more than one caller has"]
#[doc = "the reference for fear of race conditions."]
#[doc = ""]
#[doc = "The 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"]
#[doc = "structure."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count reaches 0, the references it holds internally"]
#[doc = "to the underlying colorspaces will be dropped, and the structure"]
#[doc = "will be destroyed."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "structure."]
#[doc = ""]
#[doc = "The new clone may safely be altered without fear of race"]
#[doc = "conditions 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)."]
#[doc = ""]
#[doc = "If default_cs is non NULL, the default is retrieved from there,"]
#[doc = "otherwise the global default is retrieved."]
#[doc = ""]
#[doc = "These return borrowed references that should not be dropped,"]
#[doc = "unless 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."]
#[doc = ""]
#[doc = "New references are taken to the new default, and references to"]
#[doc = "the old defaults dropped."]
#[doc = ""]
#[doc = "Never 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() {
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>(),
24usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>())).buffer as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>())).md5 as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(md5)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_1>())).profile
as *const _ as usize
},
20usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>(),
12usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>())).base as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>())).high as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_2>())).lookup as *const _
as usize
},
8usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>(),
144usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>())).base as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>())).eval as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(eval)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>())).drop as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>())).tint as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(tint)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1__bindgen_ty_3>())).colorant
as *const _ as usize
},
16usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_colorspace__bindgen_ty_1>(),
144usize,
concat!("Size of: ", stringify!(fz_colorspace__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_colorspace__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(fz_colorspace__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1>())).icc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(icc)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1>())).indexed as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(indexed)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_colorspace__bindgen_ty_1>())).separation as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace__bindgen_ty_1),
"::",
stringify!(separation)
)
);
}
#[test]
fn bindgen_test_layout_fz_colorspace() {
assert_eq!(
::std::mem::size_of::<fz_colorspace>(),
172usize,
concat!("Size of: ", stringify!(fz_colorspace))
);
assert_eq!(
::std::mem::align_of::<fz_colorspace>(),
4usize,
concat!("Alignment of ", stringify!(fz_colorspace))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).key_storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(key_storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).type_ as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).flags as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).n as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).name as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_colorspace),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_colorspace>())).u as *const _ as usize },
28usize,
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: ::std::os::raw::c_uint = 64;
#[doc = "A fz_separation structure holds details of a set of separations"]
#[doc = "(such as might be used on within a page of the document)."]
#[doc = ""]
#[doc = "The app might control the separations by enabling/disabling them,"]
#[doc = "and 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."]
#[doc = "Returns the same pointer."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = "When the reference count hits zero, the separations structure"]
#[doc = "is freed."]
#[doc = ""]
#[doc = "Never 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,"]
#[doc = "colorspace)"]
#[doc = ""]
#[doc = "(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"]
#[doc = "separations object that are set to composite, reset to be"]
#[doc = "enabled. If there ARE no spots in the object, this returns"]
#[doc = "NULL. If the object already has all its spots enabled, then"]
#[doc = "just 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,"]
#[doc = "to 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)"]
#[doc = ""]
#[doc = "cs: The colorspace to use for the pixmap, or NULL for an alpha"]
#[doc = "plane/mask."]
#[doc = ""]
#[doc = "w: The width of the pixmap (in pixels)"]
#[doc = ""]
#[doc = "h: The height of the pixmap (in pixels)"]
#[doc = ""]
#[doc = "seps: Details of separations."]
#[doc = ""]
#[doc = "alpha: 0 for no alpha, 1 for alpha."]
#[doc = ""]
#[doc = "Returns a pointer to the new pixmap. Throws exception on failure"]
#[doc = "to 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."]
#[doc = ""]
#[doc = "The bounding box specifies the size of the created pixmap and"]
#[doc = "where it will be located. The colorspace determines the number"]
#[doc = "of components per pixel. Alpha is always present. Pixmaps are"]
#[doc = "reference counted, so drop references using fz_drop_pixmap."]
#[doc = ""]
#[doc = "colorspace: Colorspace format used for the created pixmap. The"]
#[doc = "pixmap will keep a reference to the colorspace."]
#[doc = ""]
#[doc = "bbox: Bounding box specifying location/size of created pixmap."]
#[doc = ""]
#[doc = "seps: Details of separations."]
#[doc = ""]
#[doc = "alpha: 0 for no alpha, 1 for alpha."]
#[doc = ""]
#[doc = "Returns a pointer to the new pixmap. Throws exception on failure"]
#[doc = "to 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"]
#[doc = "(0,0) using the supplied data block."]
#[doc = ""]
#[doc = "cs: The colorspace to use for the pixmap, or NULL for an alpha"]
#[doc = "plane/mask."]
#[doc = ""]
#[doc = "w: The width of the pixmap (in pixels)"]
#[doc = ""]
#[doc = "h: The height of the pixmap (in pixels)"]
#[doc = ""]
#[doc = "seps: Details of separations."]
#[doc = ""]
#[doc = "alpha: 0 for no alpha, 1 for alpha."]
#[doc = ""]
#[doc = "stride: The byte offset from the pixel data in a row to the"]
#[doc = "pixel data in the next row."]
#[doc = ""]
#[doc = "samples: The data block to keep the samples in."]
#[doc = ""]
#[doc = "Returns a pointer to the new pixmap. Throws exception on failure to"]
#[doc = "allocate."]
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,"]
#[doc = "using the supplied data block."]
#[doc = ""]
#[doc = "The bounding box specifies the size of the created pixmap and"]
#[doc = "where it will be located. The colorspace determines the number"]
#[doc = "of components per pixel. Alpha is always present. Pixmaps are"]
#[doc = "reference counted, so drop references using fz_drop_pixmap."]
#[doc = ""]
#[doc = "colorspace: Colorspace format used for the created pixmap. The"]
#[doc = "pixmap will keep a reference to the colorspace."]
#[doc = ""]
#[doc = "rect: Bounding box specifying location/size of created pixmap."]
#[doc = ""]
#[doc = "seps: Details of separations."]
#[doc = ""]
#[doc = "alpha: Number of alpha planes (0 or 1)."]
#[doc = ""]
#[doc = "samples: The data block to keep the samples in."]
#[doc = ""]
#[doc = "Returns a pointer to the new pixmap. Throws exception on failure"]
#[doc = "to 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"]
#[doc = "pixmap. A reference is taken to this pixmap that will be dropped"]
#[doc = "on destruction."]
#[doc = ""]
#[doc = "The supplied rectangle must be wholly contained within the"]
#[doc = "original pixmap."]
#[doc = ""]
#[doc = "Returns a pointer to the new pixmap. Throws exception on failure"]
#[doc = "to 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"]
#[doc = "storage."]
#[doc = ""]
#[doc = "The 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"]
#[doc = "is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count hits 0, the pixmap is freed."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_drop_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Return the colorspace of a pixmap"]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "Returns the number of colorants (components, less any spots and"]
#[doc = "alpha)."]
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."]
#[doc = ""]
#[doc = "Returns the number of spots (components, less colorants and"]
#[doc = "alpha). 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."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "pix: The pixmap to clear."]
#[doc = ""]
#[doc = "value: Values in the range 0 to 255 are valid. Each component"]
#[doc = "sample for each pixel in the pixmap will be set to this value,"]
#[doc = "while alpha will always be set to 255 (non-transparent)."]
#[doc = ""]
#[doc = "This function is horrible, and should be removed from the"]
#[doc = "API 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."]
#[doc = ""]
#[doc = "pix: The pixmap to clear."]
#[doc = ""]
#[doc = "value: Values in the range 0 to 255 are valid. Each component"]
#[doc = "sample for each pixel in the pixmap will be set to this value,"]
#[doc = "while alpha will always be set to 255 (non-transparent)."]
#[doc = ""]
#[doc = "r: 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"]
#[doc = "all pixels in a pixmap to 0."]
#[doc = ""]
#[doc = "pix: 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"]
#[doc = "spots) of all pixels are inverted (except alpha, which is"]
#[doc = "unchanged)."]
pub fn fz_invert_pixmap(ctx: *mut fz_context, pix: *mut fz_pixmap);
}
extern "C" {
#[doc = "Transform the pixels in a pixmap so that luminance of each"]
#[doc = "pixel is inverted, and the chrominance remains unchanged (as"]
#[doc = "much as accuracy allows)."]
#[doc = ""]
#[doc = "All components of all pixels are inverted (except alpha, which"]
#[doc = "is 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."]
#[doc = ""]
#[doc = "black: Map black to this hexadecimal RGB color."]
#[doc = ""]
#[doc = "white: 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"]
#[doc = "pixmap. All components of all pixels in the rectangle are"]
#[doc = "inverted (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 = "Apply gamma correction to a pixmap. All components"]
#[doc = "of all pixels are modified (except alpha, which is unchanged)."]
#[doc = ""]
#[doc = "gamma: 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"]
#[doc = "colorspace. Other properties of the pixmap, such as resolution"]
#[doc = "and position are copied to the converted pixmap."]
#[doc = ""]
#[doc = "pix: The pixmap to convert."]
#[doc = ""]
#[doc = "default_cs: If NULL pix->colorspace is used. It is possible that"]
#[doc = "the data may need to be interpreted as one of the color spaces"]
#[doc = "in default_cs."]
#[doc = ""]
#[doc = "cs_des: Desired colorspace, may be NULL to denote alpha-only."]
#[doc = ""]
#[doc = "prf: Proofing color space through which we need to convert."]
#[doc = ""]
#[doc = "color_params: Parameters that may be used in conversion (e.g."]
#[doc = "ri)."]
#[doc = ""]
#[doc = "keep_alpha: If 0 any alpha component is removed, otherwise"]
#[doc = "alpha 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"]
#[doc = "only 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,
);
}
#[doc = "Pixmaps represent a set of pixels for a 2 dimensional region of"]
#[doc = "a plane. Each pixel has n components per pixel. The components"]
#[doc = "are in the order process-components, spot-colors, alpha, where"]
#[doc = "there can be 0 of any of those types. The data is in"]
#[doc = "premultiplied alpha when rendering, but non-premultiplied for"]
#[doc = "colorspace conversions and rescaling."]
#[doc = ""]
#[doc = "x, y: The minimum x and y coord of the region in pixels."]
#[doc = ""]
#[doc = "w, h: The width and height of the region in pixels."]
#[doc = ""]
#[doc = "n: The number of color components in the image."]
#[doc = "n = num composite colors + num spots + num alphas"]
#[doc = ""]
#[doc = "s: The number of spot channels in the image."]
#[doc = ""]
#[doc = "alpha: 0 for no alpha, 1 for alpha present."]
#[doc = ""]
#[doc = "flags: flag bits."]
#[doc = "Bit 0: If set, draw the image with linear interpolation."]
#[doc = "Bit 1: If set, free the samples buffer when the pixmap"]
#[doc = "is destroyed."]
#[doc = ""]
#[doc = "stride: The byte offset from the data for any given pixel"]
#[doc = "to the data for the same pixel on the row below."]
#[doc = ""]
#[doc = "seps: NULL, or a pointer to a separations structure. If NULL,"]
#[doc = "s should be 0."]
#[doc = ""]
#[doc = "xres, yres: Image resolution in dpi. Default is 96 dpi."]
#[doc = ""]
#[doc = "colorspace: Pointer to a colorspace object describing the"]
#[doc = "colorspace the pixmap is in. If NULL, the image is a mask."]
#[doc = ""]
#[doc = "samples: Pointer to the first byte of the pixmap sample data."]
#[doc = "This is typically a simple block of memory w * h * n bytes of"]
#[doc = "memory in which the components are stored linearly, but with the"]
#[doc = "use of appropriate stride values, scanlines can be stored in"]
#[doc = "different orders, and have different amounts of padding. The"]
#[doc = "first n bytes are components 0 to n-1 for the pixel at (x,y)."]
#[doc = "Each successive n bytes gives another pixel in scanline order"]
#[doc = "as we move across the line. The start of each scanline is offset"]
#[doc = "the 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() {
assert_eq!(
::std::mem::size_of::<fz_pixmap>(),
56usize,
concat!("Size of: ", stringify!(fz_pixmap))
);
assert_eq!(
::std::mem::align_of::<fz_pixmap>(),
4usize,
concat!("Alignment of ", stringify!(fz_pixmap))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).x as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).y as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).w as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).h as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).n as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).s as *const _ as usize },
25usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(s)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).alpha as *const _ as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).flags as *const _ as usize },
27usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).stride as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(stride)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).seps as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(seps)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).xres as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).yres as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).colorspace as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).samples as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(samples)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pixmap>())).underlying as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_pixmap),
"::",
stringify!(underlying)
)
);
}
pub const FZ_PIXMAP_FLAG_INTERPOLATE: ::std::os::raw::c_uint = 1;
pub const FZ_PIXMAP_FLAG_FREE_SAMPLES: ::std::os::raw::c_uint = 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;
}
#[doc = "Bitmaps have 1 bit per component. Only used for creating"]
#[doc = "halftoned versions of contone buffers, and saving out. Samples"]
#[doc = "are stored msb first, akin to pbms."]
#[doc = ""]
#[doc = "The internals of this struct are considered implementation"]
#[doc = "details and subject to change. Where possible, accessor"]
#[doc = "functions 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() {
assert_eq!(
::std::mem::size_of::<fz_bitmap>(),
32usize,
concat!("Size of: ", stringify!(fz_bitmap))
);
assert_eq!(
::std::mem::align_of::<fz_bitmap>(),
4usize,
concat!("Alignment of ", stringify!(fz_bitmap))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).w as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).h as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).stride as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(stride)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).n as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).xres as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).yres as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_bitmap>())).samples as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_bitmap),
"::",
stringify!(samples)
)
);
}
extern "C" {
#[doc = "Take an additional reference to the bitmap. The same pointer"]
#[doc = "is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "zero, the bitmap will be destroyed."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "pix: The pixmap to generate from. Currently must be a single"]
#[doc = "color component with no alpha."]
#[doc = ""]
#[doc = "ht: The halftone to use. NULL implies the default halftone."]
#[doc = ""]
#[doc = "Returns the resultant bitmap. Throws exceptions in the case of"]
#[doc = "failure 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"]
#[doc = "halftone, allowing for the position of the pixmap within an"]
#[doc = "overall banded rendering."]
#[doc = ""]
#[doc = "pix: The pixmap to generate from. Currently must be a single"]
#[doc = "color component with no alpha."]
#[doc = ""]
#[doc = "ht: The halftone to use. NULL implies the default halftone."]
#[doc = ""]
#[doc = "band_start: Vertical offset within the overall banded rendering"]
#[doc = "(in pixels)"]
#[doc = ""]
#[doc = "Returns the resultant bitmap. Throws exceptions in the case of"]
#[doc = "failure 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."]
#[doc = ""]
#[doc = "w, h: Width and Height for the bitmap"]
#[doc = ""]
#[doc = "n: Number of color components (assumed to be a divisor of 8)"]
#[doc = ""]
#[doc = "xres, yres: X and Y resolutions (in pixels per inch)."]
#[doc = ""]
#[doc = "Returns pointer to created bitmap structure. The bitmap"]
#[doc = "data 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."]
#[doc = ""]
#[doc = "bitmap: The bitmap to query."]
#[doc = ""]
#[doc = "w: Pointer to storage to retrieve width (or NULL)."]
#[doc = ""]
#[doc = "h: Pointer to storage to retrieve height (or NULL)."]
#[doc = ""]
#[doc = "n: Pointer to storage to retrieve number of color components (or"]
#[doc = "NULL)."]
#[doc = ""]
#[doc = "stride: 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."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_clear_bitmap(ctx: *mut fz_context, bit: *mut fz_bitmap);
}
extern "C" {
#[doc = "Create a 'default' halftone structure"]
#[doc = "for the given number of components."]
#[doc = ""]
#[doc = "num_comps: The number of components to use."]
#[doc = ""]
#[doc = "Returns a simple default halftone. The default halftone uses"]
#[doc = "the same halftone tile for each plane, which may not be ideal"]
#[doc = "for 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"]
#[doc = "is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reaches zero, the halftone is destroyed."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "image: The image to retrieve a pixmap from."]
#[doc = ""]
#[doc = "color_params: The color parameters (or NULL for defaults)."]
#[doc = ""]
#[doc = "subarea: The subarea of the image that we actually care about"]
#[doc = "(or NULL to indicate the whole image)."]
#[doc = ""]
#[doc = "trans: Optional, unless subarea is given. If given, then on"]
#[doc = "entry this is the transform that will be applied to the complete"]
#[doc = "image. It should be updated on exit to the transform to apply to"]
#[doc = "the given subarea of the image. This is used to calculate the"]
#[doc = "desired width/height for subsampling."]
#[doc = ""]
#[doc = "w: If non-NULL, a pointer to an int to be updated on exit to the"]
#[doc = "width (in pixels) that the scaled output will cover."]
#[doc = ""]
#[doc = "h: If non-NULL, a pointer to an int to be updated on exit to the"]
#[doc = "height (in pixels) that the scaled output will cover."]
#[doc = ""]
#[doc = "Returns a non NULL 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 = "Increment the (normal) reference count for an image. Returns the"]
#[doc = "same pointer."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "total (normal + key) reference count reaches zero, the image and"]
#[doc = "its resources are freed."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "pointer. (This is the count of references for an image held by"]
#[doc = "keys in the image store)."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "total (normal + key) reference count reaches zero, the image and"]
#[doc = "its resources are freed."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "when 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."]
#[doc = ""]
#[doc = "im: The image to decode."]
#[doc = ""]
#[doc = "subarea: NULL, or the subarea of the image required. Expressed"]
#[doc = "in terms of a rectangle in the original width/height of the"]
#[doc = "image. If non NULL, this should be updated by the function to"]
#[doc = "the actual subarea decoded - which must include the requested"]
#[doc = "area!"]
#[doc = ""]
#[doc = "w, h: The actual width and height that the whole image would"]
#[doc = "need to be decoded to."]
#[doc = ""]
#[doc = "l2factor: On entry, the log 2 subsample factor required. If"]
#[doc = "possible the decode process can take care of (all or some) of"]
#[doc = "this subsampling, and must then update the value so the caller"]
#[doc = "knows what remains to be done."]
#[doc = ""]
#[doc = "Returns a reference to a decoded pixmap that satisfies the"]
#[doc = "requirements of the request. The caller owns the returned"]
#[doc = "reference."]
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"]
#[doc = "size for an image."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "for a derived class."]
#[doc = ""]
#[doc = "w,h: Width and height of the created image."]
#[doc = ""]
#[doc = "bpc: Bits per component."]
#[doc = ""]
#[doc = "colorspace: The colorspace (determines the number of components,"]
#[doc = "and any color conversions required while decoding)."]
#[doc = ""]
#[doc = "xres, yres: The X and Y resolutions respectively."]
#[doc = ""]
#[doc = "interpolate: 1 if interpolation should be used when decoding"]
#[doc = "this image, 0 otherwise."]
#[doc = ""]
#[doc = "imagemask: 1 if this is an imagemask (i.e. transparent), 0"]
#[doc = "otherwise."]
#[doc = ""]
#[doc = "decode: NULL, or a pointer to to a decode array. The default"]
#[doc = "decode array is [0 1] (repeated n times, for n color components)."]
#[doc = ""]
#[doc = "colorkey: NULL, or a pointer to a colorkey array. The default"]
#[doc = "colorkey array is [0 255] (repeated n times, for n color"]
#[doc = "components)."]
#[doc = ""]
#[doc = "mask: NULL, or another image to use as a mask for this one."]
#[doc = "A new reference is taken to this image. Supplying a masked"]
#[doc = "image as a mask to another image is illegal!"]
#[doc = ""]
#[doc = "size: The size of the required allocated structure (the size of"]
#[doc = "the derived structure)."]
#[doc = ""]
#[doc = "get: The function to be called to obtain a decoded pixmap."]
#[doc = ""]
#[doc = "get_size: The function to be called to return the storage size"]
#[doc = "used by this image."]
#[doc = ""]
#[doc = "drop: The function to be called to dispose of this image once"]
#[doc = "the last reference is dropped."]
#[doc = ""]
#[doc = "Returns a pointer to an allocated structure of the required size,"]
#[doc = "with the first sizeof(fz_image) bytes initialised as appropriate"]
#[doc = "given 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"]
#[doc = "the data in the supplied compressed buffer."]
#[doc = ""]
#[doc = "w,h: Width and height of the created image."]
#[doc = ""]
#[doc = "bpc: Bits per component."]
#[doc = ""]
#[doc = "colorspace: The colorspace (determines the number of components,"]
#[doc = "and any color conversions required while decoding)."]
#[doc = ""]
#[doc = "xres, yres: The X and Y resolutions respectively."]
#[doc = ""]
#[doc = "interpolate: 1 if interpolation should be used when decoding"]
#[doc = "this image, 0 otherwise."]
#[doc = ""]
#[doc = "imagemask: 1 if this is an imagemask (i.e. transparency bitmap"]
#[doc = "mask), 0 otherwise."]
#[doc = ""]
#[doc = "decode: NULL, or a pointer to to a decode array. The default"]
#[doc = "decode array is [0 1] (repeated n times, for n color components)."]
#[doc = ""]
#[doc = "colorkey: NULL, or a pointer to a colorkey array. The default"]
#[doc = "colorkey array is [0 255] (repeated n times, for n color"]
#[doc = "components)."]
#[doc = ""]
#[doc = "buffer: Buffer of compressed data and compression parameters."]
#[doc = "Ownership of this reference is passed in."]
#[doc = ""]
#[doc = "mask: NULL, or another image to use as a mask for this one."]
#[doc = "A new reference is taken to this image. Supplying a masked"]
#[doc = "image 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"]
#[doc = "pixmap."]
#[doc = ""]
#[doc = "pixmap: The pixmap to base the image upon. A new reference"]
#[doc = "to this is taken."]
#[doc = ""]
#[doc = "mask: NULL, or another image to use as a mask for this one."]
#[doc = "A new reference is taken to this image. Supplying a masked"]
#[doc = "image 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"]
#[doc = "buffer of data, inferring its type from the format"]
#[doc = "of 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"]
#[doc = "of a file, inferring its type from the format of the"]
#[doc = "data."]
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."]
#[doc = ""]
#[doc = "Exposed 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 at a given l2factor"]
#[doc = "from the given stream."]
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,
) -> *mut fz_pixmap;
}
extern "C" {
#[doc = "Convert pixmap from indexed to base colorspace."]
#[doc = ""]
#[doc = "This 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."]
#[doc = ""]
#[doc = "This 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"]
#[doc = "be derived from it. Do not access members directly."]
#[repr(C)]
#[derive(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 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() {
assert_eq!(
::std::mem::size_of::<fz_image>(),
564usize,
concat!("Size of: ", stringify!(fz_image))
);
assert_eq!(
::std::mem::align_of::<fz_image>(),
4usize,
concat!("Alignment of ", stringify!(fz_image))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).key_storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(key_storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).w as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).h as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).n as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).bpc as *const _ as usize },
21usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(bpc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).mask as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(mask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).xres as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).yres as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).colorspace as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).drop_image as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(drop_image)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).get_pixmap as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(get_pixmap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).get_size as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(get_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).colorkey as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_image),
"::",
stringify!(colorkey)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_image>())).decode as *const _ as usize },
308usize,
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 invert_cmyk_jpeg(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_invert_cmyk_jpeg(&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 decoded(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 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(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn scalable(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 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(6usize, 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,
invert_cmyk_jpeg: ::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 invert_cmyk_jpeg: u32 = unsafe { ::std::mem::transmute(invert_cmyk_jpeg) };
invert_cmyk_jpeg as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let decoded: u32 = unsafe { ::std::mem::transmute(decoded) };
decoded as u64
});
__bindgen_bitfield_unit.set(6usize, 1u8, {
let scalable: u32 = unsafe { ::std::mem::transmute(scalable) };
scalable as u64
});
__bindgen_bitfield_unit
}
}
extern "C" {
#[doc = "Request the natural resolution"]
#[doc = "of an image."]
#[doc = ""]
#[doc = "xres, yres: Pointers to ints to be updated with the"]
#[doc = "natural resolution of an image (or a sensible default"]
#[doc = "if 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 = "Retrieve the underlying compressed data for an image."]
#[doc = ""]
#[doc = "Returns a pointer to the underlying data buffer for an image,"]
#[doc = "or NULL if this image is not based upon a compressed data"]
#[doc = "buffer."]
#[doc = ""]
#[doc = "This is not a reference counted structure, so no reference is"]
#[doc = "returned. 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."]
#[doc = ""]
#[doc = "Returns a pointer to the underlying fz_pixmap for an image,"]
#[doc = "or NULL if this image is not based upon an fz_pixmap."]
#[doc = ""]
#[doc = "No reference is returned. Lifespan is limited to that of"]
#[doc = "the image itself. If required, use fz_keep_pixmap to take"]
#[doc = "a 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: ::std::os::raw::c_uint = 1;
pub const FZ_LINEAR: ::std::os::raw::c_uint = 2;
pub const FZ_RADIAL: ::std::os::raw::c_uint = 3;
pub const FZ_MESH_TYPE4: ::std::os::raw::c_uint = 4;
pub const FZ_MESH_TYPE5: ::std::os::raw::c_uint = 5;
pub const FZ_MESH_TYPE6: ::std::os::raw::c_uint = 6;
pub const FZ_MESH_TYPE7: ::std::os::raw::c_uint = 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"]
#[doc = "access 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() {
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::null::<fz_shade__bindgen_ty_1__bindgen_ty_1>())).extend as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(extend)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_1>())).coords as *const _
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() {
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::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).vprow as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(vprow)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).bpflag as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpflag)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).bpcoord as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpcoord)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).bpcomp as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(bpcomp)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).x0 as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(x0)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).x1 as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(x1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).y0 as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(y0)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).y1 as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(y1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).c0 as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(c0)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_2>())).c1 as *const _ 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() {
assert_eq!(
::std::mem::size_of::<fz_shade__bindgen_ty_1__bindgen_ty_3>(),
52usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_3>())).matrix as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_3>())).xdivs as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(xdivs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_3>())).ydivs as *const _
as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(ydivs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_3>())).domain as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(domain)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_shade__bindgen_ty_1__bindgen_ty_3>())).fn_vals as *const _
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() {
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>(),
4usize,
concat!("Alignment of ", stringify!(fz_shade__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade__bindgen_ty_1>())).l_or_r as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(l_or_r)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade__bindgen_ty_1>())).m as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(m)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade__bindgen_ty_1>())).f as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade__bindgen_ty_1),
"::",
stringify!(f)
)
);
}
#[test]
fn bindgen_test_layout_fz_shade() {
assert_eq!(
::std::mem::size_of::<fz_shade>(),
34276usize,
concat!("Size of: ", stringify!(fz_shade))
);
assert_eq!(
::std::mem::align_of::<fz_shade>(),
4usize,
concat!("Alignment of ", stringify!(fz_shade))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).bbox as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).colorspace as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).matrix as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).use_background as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(use_background)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).background as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(background)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).use_function as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(use_function)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).function as *const _ as usize },
188usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(function)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).type_ as *const _ as usize },
33980usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).u as *const _ as usize },
33984usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shade>())).buffer as *const _ as usize },
34272usize,
concat!(
"Offset of field: ",
stringify!(fz_shade),
"::",
stringify!(buffer)
)
);
}
extern "C" {
#[doc = "Increment the reference count for the shade structure. The"]
#[doc = "same pointer is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "the reference count hits zero, the structure is freed."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_drop_shade(ctx: *mut fz_context, shade: *mut fz_shade);
}
extern "C" {
#[doc = "Bound a given shading."]
#[doc = ""]
#[doc = "shade: The shade to bound."]
#[doc = ""]
#[doc = "ctm: The transform to apply to the shade before bounding."]
#[doc = ""]
#[doc = "r: Pointer to storage to put the bounds in."]
#[doc = ""]
#[doc = "Returns 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;
}
extern "C" {
#[doc = "Render a shade to a given pixmap."]
#[doc = ""]
#[doc = "shade: The shade to paint."]
#[doc = ""]
#[doc = "override_cs: NULL, or colorspace to override the shades"]
#[doc = "inbuilt colorspace."]
#[doc = ""]
#[doc = "ctm: The transform to apply."]
#[doc = ""]
#[doc = "dest: The pixmap to render into."]
#[doc = ""]
#[doc = "color_params: The color rendering settings"]
#[doc = ""]
#[doc = "bbox: Pointer to a bounding box to limit the rendering"]
#[doc = "of the shade."]
#[doc = ""]
#[doc = "op: NULL, or pointer to overprint bitmap."]
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,
);
}
#[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() {
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::null::<fz_vertex>())).p as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_vertex),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_vertex>())).c as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_vertex),
"::",
stringify!(c)
)
);
}
#[doc = "Callback function type for use with"]
#[doc = "fz_process_shade."]
#[doc = ""]
#[doc = "arg: Opaque pointer from fz_process_shade caller."]
#[doc = ""]
#[doc = "v: Pointer to a fz_vertex structure to populate."]
#[doc = ""]
#[doc = "c: 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"]
#[doc = "fz_process_shade."]
#[doc = ""]
#[doc = "arg: Opaque pointer from fz_process_shade caller."]
#[doc = ""]
#[doc = "av, bv, cv: Pointers to a fz_vertex structure describing"]
#[doc = "the corner locations and colors of a triangle to be"]
#[doc = "filled."]
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"]
#[doc = "decomposes the shading to a mesh (even ones that are not"]
#[doc = "natively meshes, such as linear or radial shadings), and"]
#[doc = "processes triangles from those meshes."]
#[doc = ""]
#[doc = "shade: The shade to process."]
#[doc = ""]
#[doc = "ctm: The transform to use"]
#[doc = ""]
#[doc = "prepare: Callback function to 'prepare' each vertex."]
#[doc = "This function is passed an array of floats, and populates"]
#[doc = "a fz_vertex structure."]
#[doc = ""]
#[doc = "process: This function is passed 3 pointers to vertex"]
#[doc = "structures, and actually performs the processing (typically"]
#[doc = "filling the area between the vertexes)."]
#[doc = ""]
#[doc = "process_arg: An opaque argument passed through from caller"]
#[doc = "to 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"]
#[doc = "shade. Only exposed for use with the fz_store."]
#[doc = ""]
#[doc = "shade: 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"]
#[doc = "for the font."]
#[doc = ""]
#[doc = "font: The font to query"]
#[doc = ""]
#[doc = "Returns the FT_Face handle for the font, or NULL"]
#[doc = "if not a freetype handled font. (Cast to void *"]
#[doc = "to 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"]
#[doc = "for a font."]
#[doc = ""]
#[doc = "font: The font to query"]
#[doc = ""]
#[doc = "Returns the t3_procs pointer. Will be NULL for a"]
#[doc = "non 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: ::std::os::raw::c_uint = 0;
pub const FZ_ADOBE_GB: ::std::os::raw::c_uint = 1;
pub const FZ_ADOBE_JAPAN: ::std::os::raw::c_uint = 2;
pub const FZ_ADOBE_KOREA: ::std::os::raw::c_uint = 3;
pub type _bindgen_ty_12 = ::std::os::raw::c_uint;
#[doc = "Every fz_font carries a set of flags"]
#[doc = "within 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 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,
) -> __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
}
}
extern "C" {
#[doc = "Retrieve a pointer to the font flags"]
#[doc = "for a given font. These can then be updated as required."]
#[doc = ""]
#[doc = "font: The font to query"]
#[doc = ""]
#[doc = "Returns a pointer to the flags structure (or NULL, if"]
#[doc = "the 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"]
#[doc = "declare it to a shaper library (harfbuzz, by default, but others"]
#[doc = "are possible). To avoid redeclaring it every time we need to"]
#[doc = "shape, we hold a shaper handle and the destructor for it within"]
#[doc = "the font itself. The handle is initialised by the caller when"]
#[doc = "first required and the destructor is called when the fz_font is"]
#[doc = "destroyed."]
#[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() {
assert_eq!(
::std::mem::size_of::<fz_shaper_data_t>(),
8usize,
concat!("Size of: ", stringify!(fz_shaper_data_t))
);
assert_eq!(
::std::mem::align_of::<fz_shaper_data_t>(),
4usize,
concat!("Alignment of ", stringify!(fz_shaper_data_t))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shaper_data_t>())).shaper_handle as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_shaper_data_t),
"::",
stringify!(shaper_handle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_shaper_data_t>())).destroy as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_shaper_data_t),
"::",
stringify!(destroy)
)
);
}
extern "C" {
#[doc = "Retrieve a pointer to the shaper data"]
#[doc = "structure for the given font."]
#[doc = ""]
#[doc = "font: The font to query."]
#[doc = ""]
#[doc = "Returns a pointer to the shaper data structure (or NULL if"]
#[doc = "font 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."]
#[doc = ""]
#[doc = "font: The font to query."]
#[doc = ""]
#[doc = "Returns a pointer to an internal copy of the font name."]
#[doc = "Will 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 a pointer to the font bbox."]
#[doc = ""]
#[doc = "font: The font to query."]
#[doc = ""]
#[doc = "Returns a pointer to the font bbox (or NULL if the"]
#[doc = "font is NULL)."]
pub fn fz_font_bbox(ctx: *mut fz_context, font: *mut fz_font) -> fz_rect;
}
#[doc = "Type for user supplied system font loading hook."]
#[doc = ""]
#[doc = "name: The name of the font to load."]
#[doc = ""]
#[doc = "bold: 1 if a bold font desired, 0 otherwise."]
#[doc = ""]
#[doc = "italic: 1 if an italic font desired, 0 otherwise."]
#[doc = "needs_exact_metrics: 1 if an exact metric match is required for"]
#[doc = "the font requested."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "name: The name of the font to load."]
#[doc = ""]
#[doc = "ordering: The ordering for which to load the font (e.g."]
#[doc = "FZ_ADOBE_KOREA)"]
#[doc = ""]
#[doc = "serif: 1 if a serif font is desired, 0 otherwise."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "name: The name of the font to load."]
#[doc = ""]
#[doc = "script: UCDN script enum."]
#[doc = ""]
#[doc = "language: FZ_LANG enum."]
#[doc = ""]
#[doc = "serif, bold, italic: boolean style flags."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "system."]
#[doc = ""]
#[doc = "Only 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."]
#[doc = ""]
#[doc = "name: The name of the desired font."]
#[doc = ""]
#[doc = "bold: 1 if bold desired, 0 otherwise."]
#[doc = ""]
#[doc = "italic: 1 if italic desired, 0 otherwise."]
#[doc = ""]
#[doc = "needs_exact_metrics: 1 if an exact metrical match is required,"]
#[doc = "0 otherwise."]
#[doc = ""]
#[doc = "Returns a new font handle, or NULL if no matching font was found"]
#[doc = "(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"]
#[doc = "the system."]
#[doc = ""]
#[doc = "name: The name of the desired font."]
#[doc = ""]
#[doc = "ordering: The ordering to load the font from (e.g. FZ_ADOBE_KOREA)"]
#[doc = ""]
#[doc = "serif: 1 if serif desired, 0 otherwise."]
#[doc = ""]
#[doc = "Returns a new font handle, or NULL if no matching font was found"]
#[doc = "(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."]
#[doc = "Whether a given font is present or not will depend on the"]
#[doc = "configuration in which MuPDF is built."]
#[doc = ""]
#[doc = "name: The name of the font desired."]
#[doc = ""]
#[doc = "bold: 1 if bold desired, 0 otherwise."]
#[doc = ""]
#[doc = "italic: 1 if italic desired, 0 otherwise."]
#[doc = ""]
#[doc = "len: Pointer to a place to receive the length of the discovered"]
#[doc = "font buffer."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "Whether a given font is present or not will depend on the"]
#[doc = "configuration in which MuPDF is built."]
#[doc = ""]
#[doc = "name: The name of the font desired."]
#[doc = ""]
#[doc = "len: Pointer to a place to receive the length of the discovered"]
#[doc = "font buffer."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "Whether a font is present or not will depend on the"]
#[doc = "configuration in which MuPDF is built."]
#[doc = ""]
#[doc = "ordering: The desired ordering of the font (e.g. FZ_ADOBE_KOREA)."]
#[doc = ""]
#[doc = "len: Pointer to a place to receive the length of the discovered"]
#[doc = "font buffer."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "Whether a font is present or not will depend on the"]
#[doc = "configuration in which MuPDF is built."]
#[doc = ""]
#[doc = "lang: Pointer to a (case sensitive) language string (e.g."]
#[doc = "\"ja\", \"ko\", \"zh-Hant\" etc)."]
#[doc = ""]
#[doc = "len: Pointer to a place to receive the length of the discovered"]
#[doc = "font buffer."]
#[doc = ""]
#[doc = "subfont: Pointer to a place to store the subfont index of the"]
#[doc = "discovered font."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "for 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."]
#[doc = "Whether a font is present or not will depend on the"]
#[doc = "configuration in which MuPDF is built."]
#[doc = ""]
#[doc = "script: The script desired (e.g. UCDN_SCRIPT_KATAKANA)."]
#[doc = ""]
#[doc = "lang: The language desired (e.g. FZ_LANG_ja)."]
#[doc = ""]
#[doc = "len: Pointer to a place to receive the length of the discovered"]
#[doc = "font buffer."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = "Whether a font is present or not will depend on the"]
#[doc = "configuration 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"]
#[doc = "given combination of font attributes. Whether a font is"]
#[doc = "present or not will depend on the configuration in which"]
#[doc = "MuPDF is built."]
#[doc = ""]
#[doc = "script: The script desired (e.g. UCDN_SCRIPT_KATAKANA)."]
#[doc = ""]
#[doc = "language: The language desired (e.g. FZ_LANG_ja)."]
#[doc = ""]
#[doc = "serif: 1 if serif desired, 0 otherwise."]
#[doc = ""]
#[doc = "bold: 1 if bold desired, 0 otherwise."]
#[doc = ""]
#[doc = "italic: 1 if italic desired, 0 otherwise."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "name: Name of font (or NULL)."]
#[doc = ""]
#[doc = "matrix: Font matrix."]
#[doc = ""]
#[doc = "Returns a new font handle, or throws exception on"]
#[doc = "allocation 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"]
#[doc = "file in memory."]
#[doc = ""]
#[doc = "name: Name of font (leave NULL to use name from font)."]
#[doc = ""]
#[doc = "data: Pointer to the font file data."]
#[doc = ""]
#[doc = "len: Length of the font file data."]
#[doc = ""]
#[doc = "index: Which font from the file to load (0 for default)."]
#[doc = ""]
#[doc = "use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "name: Name of font (leave NULL to use name from font)."]
#[doc = ""]
#[doc = "buffer: Buffer to load from."]
#[doc = ""]
#[doc = "index: Which font from the file to load (0 for default)."]
#[doc = ""]
#[doc = "use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "name: Name of font (leave NULL to use name from font)."]
#[doc = ""]
#[doc = "path: File path to load from."]
#[doc = ""]
#[doc = "index: Which font from the file to load (0 for default)."]
#[doc = ""]
#[doc = "use_glyph_box: 1 if we should use the glyph bbox, 0 otherwise."]
#[doc = ""]
#[doc = "Returns 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 = "Add a reference to an existing fz_font."]
#[doc = ""]
#[doc = "font: The font to add a reference to."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "font when the last reference is dropped."]
#[doc = ""]
#[doc = "font: 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."]
#[doc = ""]
#[doc = "font: The font to set the bbox for."]
#[doc = ""]
#[doc = "xmin, 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."]
#[doc = ""]
#[doc = "font: The font to look for the glyph in."]
#[doc = ""]
#[doc = "gid: The glyph to bound."]
#[doc = ""]
#[doc = "trm: The matrix to apply to the glyph before bounding."]
#[doc = ""]
#[doc = "r: Pointer to a fz_rect to use for storage."]
#[doc = ""]
#[doc = "Returns r, after filling it in with the bounds of the given"]
#[doc = "glyph."]
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"]
#[doc = "is cacheable. Certain glyphs in a type 3 font cannot safely"]
#[doc = "be cached, as their appearance depends on the enclosing"]
#[doc = "graphic state."]
#[doc = ""]
#[doc = "font: The font to look for the glyph in."]
#[doc = ""]
#[doc = "gif: The glyph to query."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "a given device."]
#[doc = ""]
#[doc = "font: The font to find the glyph in."]
#[doc = ""]
#[doc = "gid: The glyph to run."]
#[doc = ""]
#[doc = "trm: The transform to apply."]
#[doc = ""]
#[doc = "dev: 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."]
#[doc = ""]
#[doc = "font: The font to look for the glyph in."]
#[doc = ""]
#[doc = "glyph: The glyph to find the advance for."]
#[doc = ""]
#[doc = "wmode: 1 for vertical mode, 0 for horizontal."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "character within a font."]
#[doc = ""]
#[doc = "font: The font to look for the unicode character in."]
#[doc = ""]
#[doc = "unicode: The unicode character to encode."]
#[doc = ""]
#[doc = "Returns the glyph id for the given unicode value, or 0 if"]
#[doc = "unknown."]
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."]
#[doc = ""]
#[doc = "font: The font to look for the unicode character in."]
#[doc = ""]
#[doc = "unicode: The unicode character to encode."]
#[doc = ""]
#[doc = "Returns the glyph id for the given unicode value, or 0 if"]
#[doc = "unknown."]
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."]
#[doc = ""]
#[doc = "Either by direct lookup of glyphname within a font, or, failing"]
#[doc = "that, by mapping glyphname to unicode and thence to the glyph"]
#[doc = "index within the given font."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "a given unicode character within a font, falling back to"]
#[doc = "an alternative if not found."]
#[doc = ""]
#[doc = "font: The font to look for the unicode character in."]
#[doc = ""]
#[doc = "unicode: The unicode character to encode."]
#[doc = ""]
#[doc = "script: The script in use."]
#[doc = ""]
#[doc = "language: The language in use."]
#[doc = ""]
#[doc = "out_font: The font handle in which the given glyph represents"]
#[doc = "the requested unicode character. The caller does not own the"]
#[doc = "reference it is passed, so should call fz_keep_font if it is"]
#[doc = "not simply to be used immediately."]
#[doc = ""]
#[doc = "Returns the glyph id for the given unicode value in the supplied"]
#[doc = "font (and sets *out_font to font) if it is present. Otherwise"]
#[doc = "an alternative fallback font (based on script/language) is"]
#[doc = "searched for. If the glyph is found therein, *out_font is set"]
#[doc = "to this reference, and the glyph reference is returned. If it"]
#[doc = "cannot 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"]
#[doc = ""]
#[doc = "font: The font to look for the glyph in."]
#[doc = ""]
#[doc = "glyph: The glyph id to look for."]
#[doc = ""]
#[doc = "buf: Pointer to a buffer for the name to be inserted into."]
#[doc = ""]
#[doc = "size: The size of the buffer."]
#[doc = ""]
#[doc = "If a font contains a name table, then the name of the glyph"]
#[doc = "will be returned in the supplied buffer. Otherwise a name"]
#[doc = "is synthesised. The name will be truncated to fit in"]
#[doc = "the 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"]
#[doc = "simultaneously in several threads. This reuses"]
#[doc = "FZ_LOCK_FREETYPE."]
pub fn fz_hb_lock(ctx: *mut fz_context);
}
extern "C" {
#[doc = "Unlock after a Harfbuzz call. This reuses"]
#[doc = "FZ_LOCK_FREETYPE."]
pub fn fz_hb_unlock(ctx: *mut fz_context);
}
#[repr(C)]
#[derive(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 fz_rect,
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 f32,
pub encoding_cache: [*mut u16; 256usize],
pub has_digest: ::std::os::raw::c_int,
pub digest: [::std::os::raw::c_uchar; 16usize],
}
#[test]
fn bindgen_test_layout_fz_font() {
assert_eq!(
::std::mem::size_of::<fz_font>(),
1196usize,
concat!("Size of: ", stringify!(fz_font))
);
assert_eq!(
::std::mem::align_of::<fz_font>(),
4usize,
concat!("Alignment of ", stringify!(fz_font))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).name as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).buffer as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(buffer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).flags as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).ft_face as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(ft_face)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).shaper_data as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(shaper_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3matrix as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3resources as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3resources)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3procs as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3procs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3lists as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3lists)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3widths as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3widths)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3flags as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3doc as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3doc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3run as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3run)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).t3freeres as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(t3freeres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).bbox as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).glyph_count as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(glyph_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).bbox_table as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(bbox_table)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).width_count as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).width_default as *const _ as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_default)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).width_table as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(width_table)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).advance_cache as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(advance_cache)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).encoding_cache as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(encoding_cache)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).has_digest as *const _ as usize },
1176usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(has_digest)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_font>())).digest as *const _ as usize },
1180usize,
concat!(
"Offset of field: ",
stringify!(fz_font),
"::",
stringify!(digest)
)
);
}
#[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() {
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::null::<fz_stroke_state>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).start_cap as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(start_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).dash_cap as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).end_cap as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(end_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).linejoin as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(linejoin)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).linewidth as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(linewidth)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).miterlimit as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(miterlimit)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).dash_phase as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_phase)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).dash_len as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stroke_state),
"::",
stringify!(dash_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stroke_state>())).dash_list as *const _ 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() {
assert_eq!(
::std::mem::size_of::<fz_path_walker>(),
32usize,
concat!("Size of: ", stringify!(fz_path_walker))
);
assert_eq!(
::std::mem::align_of::<fz_path_walker>(),
4usize,
concat!("Alignment of ", stringify!(fz_path_walker))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).moveto as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(moveto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).lineto as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(lineto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).curveto as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curveto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).closepath as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(closepath)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).quadto as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(quadto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).curvetov as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curvetov)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).curvetoy as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(curvetoy)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_path_walker>())).rectto as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_path_walker),
"::",
stringify!(rectto)
)
);
}
extern "C" {
#[doc = "Walk the segments of a path, calling the"]
#[doc = "appropriate callback function from a given set for each"]
#[doc = "segment of the path."]
#[doc = ""]
#[doc = "path: The path to walk."]
#[doc = ""]
#[doc = "walker: The set of callback functions to use. The first"]
#[doc = "4 callback pointers in the set must be non-NULL. The"]
#[doc = "subsequent ones can either be supplied, or can be left"]
#[doc = "as NULL, in which case the top 4 functions will be"]
#[doc = "called as appropriate to simulate them."]
#[doc = ""]
#[doc = "arg: An opaque argument passed in to each callback."]
#[doc = ""]
#[doc = "Exceptions will only be thrown if the underlying callback"]
#[doc = "functions 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."]
#[doc = ""]
#[doc = "All paths can be kept, regardless of their packing type."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "zero, free the path."]
#[doc = ""]
#[doc = "All paths can be dropped, regardless of their packing type."]
#[doc = "Packed paths do not own the blocks into which they are packed"]
#[doc = "so dropping them does not free those blocks."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "As paths are constructed, the internal buffers"]
#[doc = "grow. To avoid repeated reallocations they"]
#[doc = "grow with some spare space. Once a path has"]
#[doc = "been fully constructed, this call allows the"]
#[doc = "excess 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."]
#[doc = "To minimise the size of paths, this function allows them to be"]
#[doc = "packed into a buffer with other information. Paths can be used"]
#[doc = "interchangeably regardless of how they are packed."]
#[doc = ""]
#[doc = "pack: Pointer to a block of data to pack the path into. Should"]
#[doc = "be aligned by the caller to the same alignment as required for"]
#[doc = "a fz_path pointer."]
#[doc = ""]
#[doc = "max: The number of bytes available in the block."]
#[doc = "If max < sizeof(fz_path) then an exception will"]
#[doc = "be thrown. If max >= the value returned by"]
#[doc = "fz_packed_path_size, then this call will never"]
#[doc = "fail, except in low memory situations with large"]
#[doc = "paths."]
#[doc = ""]
#[doc = "path: The path to pack."]
#[doc = ""]
#[doc = "Returns the number of bytes within the block used. Callers can"]
#[doc = "access the packed path data by casting the value of pack on"]
#[doc = "entry to be a fz_path *."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or if"]
#[doc = "max < sizeof(fz_path)."]
#[doc = ""]
#[doc = "Implementation details: Paths can be 'unpacked', 'flat', or"]
#[doc = "'open'. Standard paths, as created are 'unpacked'. Paths that"]
#[doc = "will pack into less than max bytes will be packed as 'flat',"]
#[doc = "unless they are too large (where large indicates that they"]
#[doc = "exceed some private implementation defined limits, currently"]
#[doc = "including having more than 256 coordinates or commands)."]
#[doc = ""]
#[doc = "Large paths are 'open' packed as a header into the given block,"]
#[doc = "plus pointers to other data blocks."]
#[doc = ""]
#[doc = "Users should not have to care about whether paths are 'open'"]
#[doc = "or 'flat' packed. Simply pack a path (if required), and then"]
#[doc = "forget 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."]
#[doc = ""]
#[doc = "This is used in preference to fz_keep_path when a whole"]
#[doc = "new copy of a path is required, rather than just a shared"]
#[doc = "pointer. This probably indicates that the path is about to"]
#[doc = "be modified."]
#[doc = ""]
#[doc = "path: path to clone."]
#[doc = ""]
#[doc = "Throws 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"]
#[doc = "reached or (0,0) if empty."]
#[doc = ""]
#[doc = "path: 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."]
#[doc = "This 'opens' a path."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x, y: The coordinate to move to."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x, y: The coordinate to line to."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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."]
#[doc = ""]
#[doc = "The rectangle is equivalent to:"]
#[doc = "moveto x0 y0"]
#[doc = "lineto x1 y0"]
#[doc = "lineto x1 y1"]
#[doc = "lineto x0 y1"]
#[doc = "closepath"]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x0, y0: First corner of the rectangle."]
#[doc = ""]
#[doc = "x1, y1: Second corner of the rectangle."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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"]
#[doc = "quadratic bezier)."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x0, y0: The control coordinates for the quadratic curve."]
#[doc = ""]
#[doc = "x1, y1: The end coordinates for the quadratic curve."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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"]
#[doc = "cubic bezier)."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x0, y0: The coordinates of the first control point for the"]
#[doc = "curve."]
#[doc = ""]
#[doc = "x1, y1: The coordinates of the second control point for the"]
#[doc = "curve."]
#[doc = ""]
#[doc = "x2, y2: The end coordinates for the curve."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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"]
#[doc = "cubic bezier with the first control coordinate equal to"]
#[doc = "the start point)."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x1, y1: The coordinates of the second control point for the"]
#[doc = "curve."]
#[doc = ""]
#[doc = "x2, y2: The end coordinates for the curve."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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"]
#[doc = "cubic bezier with the second control coordinate equal to"]
#[doc = "the end point)."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "x0, y0: The coordinates of the first control point for the"]
#[doc = "curve."]
#[doc = ""]
#[doc = "x2, y2: The end coordinates for the curve (and the second"]
#[doc = "control coordinate)."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, or attempting to"]
#[doc = "modify 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."]
#[doc = ""]
#[doc = "path: The path to modify."]
#[doc = ""]
#[doc = "Throws exceptions on failure to allocate, attempting to modify"]
#[doc = "a packed path, and illegal path closes (i.e. closing a non open"]
#[doc = "path)."]
pub fn fz_closepath(ctx: *mut fz_context, path: *mut fz_path);
}
extern "C" {
#[doc = "Transform a path by a given"]
#[doc = "matrix."]
#[doc = ""]
#[doc = "path: The path to modify (must not be a packed path)."]
#[doc = ""]
#[doc = "transform: The transform to apply."]
#[doc = ""]
#[doc = "Throws exceptions if the path is packed, or on failure"]
#[doc = "to 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."]
#[doc = ""]
#[doc = "path: The path to bound."]
#[doc = ""]
#[doc = "stroke: If NULL, the bounding rectangle given is for"]
#[doc = "the filled path. If non-NULL the bounding rectangle"]
#[doc = "given is for the path stroked with the given attributes."]
#[doc = ""]
#[doc = "ctm: The matrix to apply to the path during stroking."]
#[doc = ""]
#[doc = "r: Pointer to a fz_rect which will be used to hold"]
#[doc = "the result."]
#[doc = ""]
#[doc = "Returns 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),"]
#[doc = "expand it to allow for the expansion of the bbox that would be"]
#[doc = "seen by stroking the path with the given stroke state and"]
#[doc = "transform."]
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" {
pub static fz_default_stroke_state: fz_stroke_state;
}
extern "C" {
#[doc = "Create a new (empty) stroke state structure (with no dash"]
#[doc = "data) and return a reference to it."]
#[doc = ""]
#[doc = "Throws 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"]
#[doc = "dash data of the given length, and return a reference to it."]
#[doc = ""]
#[doc = "len: The number of dash elements to allow room for."]
#[doc = ""]
#[doc = "Throws 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."]
#[doc = ""]
#[doc = "No modifications should be carried out on a stroke"]
#[doc = "state to which more than one reference is held, as"]
#[doc = "this 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"]
#[doc = "structure 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,"]
#[doc = "return a reference to an equivalent stroke_state structure"]
#[doc = "that is guaranteed to be unshared (i.e. one that can"]
#[doc = "safely be modified)."]
#[doc = ""]
#[doc = "shared: The reference to a (possibly) shared structure"]
#[doc = "to unshare. Ownership of this reference is passed in"]
#[doc = "to this function, even in the case of exceptions being"]
#[doc = "thrown."]
#[doc = ""]
#[doc = "Exceptions may be thrown in the event of failure to"]
#[doc = "allocate 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,"]
#[doc = "return a reference to a stroke_state structure (with room for a"]
#[doc = "given amount of dash data) that is guaranteed to be unshared"]
#[doc = "(i.e. one that can safely be modified)."]
#[doc = ""]
#[doc = "shared: The reference to a (possibly) shared structure"]
#[doc = "to unshare. Ownership of this reference is passed in"]
#[doc = "to this function, even in the case of exceptions being"]
#[doc = "thrown."]
#[doc = ""]
#[doc = "Exceptions may be thrown in the event of failure to"]
#[doc = "allocate 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"]
#[doc = "reference to it."]
#[doc = ""]
#[doc = "stroke: The stroke state reference to clone."]
#[doc = ""]
#[doc = "Exceptions may be thrown in the event of a failure to"]
#[doc = "allocate."]
pub fn fz_clone_stroke_state(
ctx: *mut fz_context,
stroke: *mut fz_stroke_state,
) -> *mut fz_stroke_state;
}
#[doc = "Text buffer."]
#[doc = ""]
#[doc = "The trm field contains the a, b, c and d coefficients."]
#[doc = "The e and f coefficients come from the individual elements,"]
#[doc = "together they form the transform matrix for the glyph."]
#[doc = ""]
#[doc = "Glyphs are referenced by glyph ID."]
#[doc = "The Unicode text equivalent is kept in a separate array"]
#[doc = "with 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() {
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::null::<fz_text_item>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_item>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_item>())).gid as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_text_item),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_item>())).ucs as *const _ 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() {
assert_eq!(
::std::mem::size_of::<fz_text_span>(),
48usize,
concat!("Size of: ", stringify!(fz_text_span))
);
assert_eq!(
::std::mem::align_of::<fz_text_span>(),
4usize,
concat!("Alignment of ", stringify!(fz_text_span))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).font as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).trm as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(trm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).len as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).cap as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).items as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_text_span),
"::",
stringify!(items)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text_span>())).next as *const _ as usize },
44usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_text>(),
12usize,
concat!("Size of: ", stringify!(fz_text))
);
assert_eq!(
::std::mem::align_of::<fz_text>(),
4usize,
concat!("Alignment of ", stringify!(fz_text))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text>())).head as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(head)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_text>())).tail as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_text),
"::",
stringify!(tail)
)
);
}
extern "C" {
#[doc = "Create a new empty fz_text object."]
#[doc = ""]
#[doc = "Throws 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"]
#[doc = "pointer is returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count hits zero, the text object is freed."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "text: Text object to add to."]
#[doc = ""]
#[doc = "font: The font the glyph should be added in."]
#[doc = ""]
#[doc = "trm: The transform to use for the glyph."]
#[doc = ""]
#[doc = "glyph: The glyph id to add."]
#[doc = ""]
#[doc = "unicode: The unicode character for the glyph."]
#[doc = ""]
#[doc = "wmode: 1 for vertical mode, 0 for horizontal."]
#[doc = ""]
#[doc = "bidi_level: The bidirectional level for this glyph."]
#[doc = ""]
#[doc = "markup_dir: The direction of the text as specified in the"]
#[doc = "markup."]
#[doc = ""]
#[doc = "language: The language in use (if known, 0 otherwise)"]
#[doc = "(e.g. FZ_LANG_zh_Hans)."]
#[doc = ""]
#[doc = "Throws 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."]
#[doc = ""]
#[doc = "text: Text object to add to."]
#[doc = ""]
#[doc = "font: The font the string should be added in."]
#[doc = ""]
#[doc = "trm: The transform to use."]
#[doc = ""]
#[doc = "s: The utf-8 string to add."]
#[doc = ""]
#[doc = "wmode: 1 for vertical mode, 0 for horizontal."]
#[doc = ""]
#[doc = "bidi_level: The bidirectional level for this glyph."]
#[doc = ""]
#[doc = "markup_dir: The direction of the text as specified in the markup."]
#[doc = ""]
#[doc = "language: The language in use (if known, 0 otherwise)"]
#[doc = "(e.g. FZ_LANG_zh_Hans)."]
#[doc = ""]
#[doc = "Returns the transform updated with the advance width of the"]
#[doc = "string."]
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."]
#[doc = ""]
#[doc = "This uses the same layout algorithms as fz_show_string, and can be used"]
#[doc = "to 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."]
#[doc = ""]
#[doc = "text: The text object to find the bounds of."]
#[doc = ""]
#[doc = "stroke: Pointer to the stroke attributes (for stroked"]
#[doc = "text), or NULL (for filled text)."]
#[doc = ""]
#[doc = "ctm: The matrix in use."]
#[doc = ""]
#[doc = "r: pointer to storage for the bounds."]
#[doc = ""]
#[doc = "Returns a pointer to r, which is updated to contain the"]
#[doc = "bounding 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"]
#[doc = "strings losslessly to a 15 bit fz_text_language code."]
#[doc = ""]
#[doc = "No validation is carried out. Obviously invalid (out"]
#[doc = "of spec) codes will be mapped to FZ_LANG_UNSET, but"]
#[doc = "well-formed (but undefined) codes will be blithely"]
#[doc = "accepted."]
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"]
#[doc = "strings losslessly from a 15 bit fz_text_language code."]
#[doc = ""]
#[doc = "No 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."]
#[doc = ""]
#[doc = "pix: The glyph to increment the reference for."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "Decrement the reference count for the glyph. When no"]
#[doc = "references 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"]
#[doc = "glyph using the given transform."]
#[doc = ""]
#[doc = "The caller owns the returned path, and so is responsible for"]
#[doc = "ensuring 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: ::std::os::raw::c_uint = 1;
pub const FZ_DEVFLAG_COLOR: ::std::os::raw::c_uint = 2;
pub const FZ_DEVFLAG_UNCACHEABLE: ::std::os::raw::c_uint = 4;
pub const FZ_DEVFLAG_FILLCOLOR_UNDEFINED: ::std::os::raw::c_uint = 8;
pub const FZ_DEVFLAG_STROKECOLOR_UNDEFINED: ::std::os::raw::c_uint = 16;
pub const FZ_DEVFLAG_STARTCAP_UNDEFINED: ::std::os::raw::c_uint = 32;
pub const FZ_DEVFLAG_DASHCAP_UNDEFINED: ::std::os::raw::c_uint = 64;
pub const FZ_DEVFLAG_ENDCAP_UNDEFINED: ::std::os::raw::c_uint = 128;
pub const FZ_DEVFLAG_LINEJOIN_UNDEFINED: ::std::os::raw::c_uint = 256;
pub const FZ_DEVFLAG_MITERLIMIT_UNDEFINED: ::std::os::raw::c_uint = 512;
pub const FZ_DEVFLAG_LINEWIDTH_UNDEFINED: ::std::os::raw::c_uint = 1024;
pub const FZ_DEVFLAG_BBOX_DEFINED: ::std::os::raw::c_uint = 2048;
pub const FZ_DEVFLAG_GRIDFIT_AS_TILED: ::std::os::raw::c_uint = 4096;
pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
pub const FZ_BLEND_NORMAL: ::std::os::raw::c_uint = 0;
pub const FZ_BLEND_MULTIPLY: ::std::os::raw::c_uint = 1;
pub const FZ_BLEND_SCREEN: ::std::os::raw::c_uint = 2;
pub const FZ_BLEND_OVERLAY: ::std::os::raw::c_uint = 3;
pub const FZ_BLEND_DARKEN: ::std::os::raw::c_uint = 4;
pub const FZ_BLEND_LIGHTEN: ::std::os::raw::c_uint = 5;
pub const FZ_BLEND_COLOR_DODGE: ::std::os::raw::c_uint = 6;
pub const FZ_BLEND_COLOR_BURN: ::std::os::raw::c_uint = 7;
pub const FZ_BLEND_HARD_LIGHT: ::std::os::raw::c_uint = 8;
pub const FZ_BLEND_SOFT_LIGHT: ::std::os::raw::c_uint = 9;
pub const FZ_BLEND_DIFFERENCE: ::std::os::raw::c_uint = 10;
pub const FZ_BLEND_EXCLUSION: ::std::os::raw::c_uint = 11;
pub const FZ_BLEND_HUE: ::std::os::raw::c_uint = 12;
pub const FZ_BLEND_SATURATION: ::std::os::raw::c_uint = 13;
pub const FZ_BLEND_COLOR: ::std::os::raw::c_uint = 14;
pub const FZ_BLEND_LUMINOSITY: ::std::os::raw::c_uint = 15;
pub const FZ_BLEND_MODEMASK: ::std::os::raw::c_uint = 15;
pub const FZ_BLEND_ISOLATED: ::std::os::raw::c_uint = 16;
pub const FZ_BLEND_KNOCKOUT: ::std::os::raw::c_uint = 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."]
#[doc = ""]
#[doc = "The 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)"]
#[doc = "as 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() {
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::null::<fz_device_container_stack>())).scissor as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(scissor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device_container_stack>())).type_ as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device_container_stack>())).user as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_device_container_stack),
"::",
stringify!(user)
)
);
}
pub const fz_device_container_stack_is_clip: ::std::os::raw::c_uint = 0;
pub const fz_device_container_stack_is_mask: ::std::os::raw::c_uint = 1;
pub const fz_device_container_stack_is_group: ::std::os::raw::c_uint = 2;
pub const fz_device_container_stack_is_tile: ::std::os::raw::c_uint = 3;
pub type _bindgen_ty_15 = ::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 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() {
assert_eq!(
::std::mem::size_of::<fz_device>(),
144usize,
concat!("Size of: ", stringify!(fz_device))
);
assert_eq!(
::std::mem::align_of::<fz_device>(),
4usize,
concat!("Alignment of ", stringify!(fz_device))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).hints as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(hints)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).flags as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).close_device as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(close_device)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).drop_device as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(drop_device)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).fill_path as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).stroke_path as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(stroke_path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).clip_path as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).clip_stroke_path as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_stroke_path)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).fill_text as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).stroke_text as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(stroke_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).clip_text as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).clip_stroke_text as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_stroke_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).ignore_text as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(ignore_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).fill_shade as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_shade)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).fill_image as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_image)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).fill_image_mask as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(fill_image_mask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).clip_image_mask as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(clip_image_mask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).pop_clip as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(pop_clip)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).begin_mask as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_mask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).end_mask as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_mask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).begin_group as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_group)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).end_group as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_group)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).begin_tile as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_tile)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).end_tile as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_tile)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).render_flags as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(render_flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_device>())).set_default_colorspaces as *const _ as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(set_default_colorspaces)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).begin_layer as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(begin_layer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).end_layer as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(end_layer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).d1_rect as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(d1_rect)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).container_len as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(container_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).container_cap as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(fz_device),
"::",
stringify!(container_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_device>())).container as *const _ as usize },
140usize,
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" {
#[doc = "Devices are created by calls to device implementations, for"]
#[doc = "instance: foo_new_device(). These will be implemented by calling"]
#[doc = "fz_new_derived_device(ctx, foo_device) where foo_device is a"]
#[doc = "structure \"derived from\" fz_device, for instance"]
#[doc = "typedef 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."]
#[doc = "This is NOT called implicitly on fz_drop_device. This"]
#[doc = "may 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"]
#[doc = "reaches zero, the device and its resources will be freed."]
#[doc = "Don't forget to call fz_close_device before dropping the device,"]
#[doc = "or you may get incomplete output!"]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "pointer."]
#[doc = ""]
#[doc = "Never 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: ::std::os::raw::c_uint = 1;
pub const FZ_NO_CACHE: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_16 = ::std::os::raw::c_uint;
#[doc = "Provide two-way communication between application and library."]
#[doc = "Intended for multi-threaded applications where one thread is"]
#[doc = "rendering pages and another thread wants to read progress"]
#[doc = "feedback or abort a job that takes a long time to finish. The"]
#[doc = "communication is unsynchronized without locking."]
#[doc = ""]
#[doc = "abort: The application should set this field to 0 before"]
#[doc = "calling fz_run_page to render a page. At any point when the"]
#[doc = "page is being rendered the application my set this field to 1"]
#[doc = "which will cause the rendering to finish soon. This field is"]
#[doc = "checked periodically when the page is rendered, but exactly"]
#[doc = "when is not known, therefore there is no upper bound on"]
#[doc = "exactly when the rendering will abort. If the application"]
#[doc = "did not provide a set of locks to fz_new_context, it must also"]
#[doc = "await the completion of fz_run_page before issuing another"]
#[doc = "call to fz_run_page. Note that once the application has set"]
#[doc = "this field to 1 after it called fz_run_page it may not change"]
#[doc = "the value again."]
#[doc = ""]
#[doc = "progress: Communicates rendering progress back to the"]
#[doc = "application and is read only. Increments as a page is being"]
#[doc = "rendered. The value starts out at 0 and is limited to less"]
#[doc = "than or equal to progress_max, unless progress_max is -1."]
#[doc = ""]
#[doc = "progress_max: Communicates the known upper bound of rendering"]
#[doc = "back to the application and is read only. The maximum value"]
#[doc = "that the progress field may take. If there is no known upper"]
#[doc = "bound on how long the rendering may take this value is -1 and"]
#[doc = "progress is not limited. Note that the value of progress_max"]
#[doc = "may change from -1 to a positive value once an upper bound is"]
#[doc = "known, so take this into consideration when comparing the"]
#[doc = "value of progress to that of progress_max."]
#[doc = ""]
#[doc = "errors: count of errors during current rendering."]
#[doc = ""]
#[doc = "incomplete: Initially should be set to 0. Will be set to"]
#[doc = "non-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() {
assert_eq!(
::std::mem::size_of::<fz_cookie>(),
20usize,
concat!("Size of: ", stringify!(fz_cookie))
);
assert_eq!(
::std::mem::align_of::<fz_cookie>(),
4usize,
concat!("Alignment of ", stringify!(fz_cookie))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_cookie>())).abort as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(abort)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_cookie>())).progress as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(progress)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_cookie>())).progress_max as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(progress_max)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_cookie>())).errors as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_cookie),
"::",
stringify!(errors)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_cookie>())).incomplete as *const _ as usize },
16usize,
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"]
#[doc = "box of all marks on a page."]
#[doc = ""]
#[doc = "The returned bounding box will be the union of all bounding"]
#[doc = "boxes 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."]
#[doc = ""]
#[doc = "Currently only tests for the presence of non-grayscale colors."]
#[doc = ""]
#[doc = "is_color: Possible values returned:"]
#[doc = "0: Definitely greyscale"]
#[doc = "1: Probably color (all colors were grey, but there"]
#[doc = "were images or shadings in a non grey colorspace)."]
#[doc = "2: Definitely color"]
#[doc = ""]
#[doc = "threshold: The difference from grayscale that will be tolerated."]
#[doc = "Typical values to use are either 0 (be exact) and 0.02 (allow an"]
#[doc = "imperceptible amount of slop)."]
#[doc = ""]
#[doc = "options: A set of bitfield options, from the FZ_TEST_OPT set."]
#[doc = ""]
#[doc = "passthrough: A device to pass all calls through to, or NULL."]
#[doc = "If set, then the test device can both test and pass through to"]
#[doc = "an underlying device (like, say, the display list device). This"]
#[doc = "means that a display list can be created and at the end we'll"]
#[doc = "know if it's colored or not."]
#[doc = ""]
#[doc = "In the absence of a passthrough device, the device will throw"]
#[doc = "an 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: ::std::os::raw::c_uint = 1;
pub const FZ_TEST_OPT_SHADINGS: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_17 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Create a device to draw on a pixmap."]
#[doc = ""]
#[doc = "dest: Target pixmap for the draw device. See fz_new_pixmap*"]
#[doc = "for how to obtain a pixmap. The pixmap is not cleared by the"]
#[doc = "draw device, see fz_clear_pixmap* for how to clear it prior to"]
#[doc = "calling fz_new_draw_device. Free the device by calling"]
#[doc = "fz_drop_device."]
#[doc = ""]
#[doc = "transform: Transform from user space in points to device space"]
#[doc = "in 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."]
#[doc = ""]
#[doc = "dest: Target pixmap for the draw device. See fz_new_pixmap*"]
#[doc = "for how to obtain a pixmap. The pixmap is not cleared by the"]
#[doc = "draw device, see fz_clear_pixmap* for how to clear it prior to"]
#[doc = "calling fz_new_draw_device. Free the device by calling"]
#[doc = "fz_drop_device."]
#[doc = ""]
#[doc = "transform: Transform from user space in points to device space"]
#[doc = "in pixels."]
#[doc = ""]
#[doc = "clip: Bounding box to restrict any marking operations of the"]
#[doc = "draw 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."]
#[doc = ""]
#[doc = "dest: Target pixmap for the draw device. See fz_new_pixmap*"]
#[doc = "for how to obtain a pixmap. The pixmap is not cleared by the"]
#[doc = "draw device, see fz_clear_pixmap* for how to clear it prior to"]
#[doc = "calling fz_new_draw_device. Free the device by calling"]
#[doc = "fz_drop_device."]
#[doc = ""]
#[doc = "transform: Transform from user space in points to device space"]
#[doc = "in pixels."]
#[doc = ""]
#[doc = "proof_cs: Intermediate color space to map though when mapping to"]
#[doc = "color 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."]
#[doc = ""]
#[doc = "dest: Target pixmap for the draw device. See fz_new_pixmap*"]
#[doc = "for how to obtain a pixmap. The pixmap is not cleared by the"]
#[doc = "draw device, see fz_clear_pixmap* for how to clear it prior to"]
#[doc = "calling fz_new_draw_device. Free the device by calling"]
#[doc = "fz_drop_device."]
#[doc = ""]
#[doc = "transform: Transform from user space in points to device space"]
#[doc = "in pixels."]
#[doc = ""]
#[doc = "clip: Bounding box to restrict any marking operations of the"]
#[doc = "draw device."]
#[doc = ""]
#[doc = "proof_cs: Color space to render to prior to mapping to color"]
#[doc = "space 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"]
#[doc = "device."]
#[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() {
assert_eq!(
::std::mem::size_of::<fz_draw_options>(),
36usize,
concat!("Size of: ", stringify!(fz_draw_options))
);
assert_eq!(
::std::mem::align_of::<fz_draw_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_draw_options))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).rotate as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(rotate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).x_resolution as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(x_resolution)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).y_resolution as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(y_resolution)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).width as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).height as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).colorspace as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(colorspace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).alpha as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).graphics as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_draw_options),
"::",
stringify!(graphics)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_draw_options>())).text as *const _ as usize },
32usize,
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."]
#[doc = ""]
#[doc = "options: Options to configure the draw device, and choose the"]
#[doc = "resolution and colorspace."]
#[doc = ""]
#[doc = "mediabox: The bounds of the page in points."]
#[doc = ""]
#[doc = "pixmap: 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."]
#[doc = ""]
#[doc = "A display list contains drawing commands (text, images, etc.)."]
#[doc = "Use fz_new_list_device for populating the list."]
#[doc = ""]
#[doc = "mediabox: Bounds of the page (in points) represented by the"]
#[doc = "display 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."]
#[doc = ""]
#[doc = "When the device is rendering a page it will populate the"]
#[doc = "display list with drawing commands (text, images, etc.). The"]
#[doc = "display list can later be reused to render a page many times"]
#[doc = "without having to re-interpret the page from the document file"]
#[doc = "for each rendering. Once the device is no longer needed, free"]
#[doc = "it with fz_drop_device."]
#[doc = ""]
#[doc = "list: 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."]
#[doc = ""]
#[doc = "list: A display list, created by fz_new_display_list and"]
#[doc = "populated with objects from a page by running fz_run_page on a"]
#[doc = "device obtained from fz_new_list_device."]
#[doc = ""]
#[doc = "ctm: Transform to apply to display list contents. May include"]
#[doc = "for example scaling and rotation, see fz_scale, fz_rotate and"]
#[doc = "fz_concat. Set to fz_identity if no transformation is desired."]
#[doc = ""]
#[doc = "scissor: Only the part of the contents of the display list"]
#[doc = "visible within this area will be considered when the list is"]
#[doc = "run through the device. This does not imply for tile objects"]
#[doc = "contained in the display list."]
#[doc = ""]
#[doc = "cookie: Communication mechanism between caller and library"]
#[doc = "running the page. Intended for multi-threaded applications,"]
#[doc = "while single-threaded applications set cookie to NULL. The"]
#[doc = "caller may abort an ongoing page run. Cookie also communicates"]
#[doc = "progress information back to the caller. The fields inside"]
#[doc = "cookie 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"]
#[doc = "same pointer."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reference count reaches zero, all the references in the display"]
#[doc = "list itself are dropped, and the display list is freed."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "w, h: The conceptual width/height of the image."]
#[doc = ""]
#[doc = "transform: The matrix that needs to be applied to the given"]
#[doc = "list to make it render to the unit square."]
#[doc = ""]
#[doc = "list: 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"]
#[doc = ""]
#[doc = "list: The list to check."]
#[doc = ""]
#[doc = "Returns 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 = "Simple text layout (for use with annotation editing primarily)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_layout_char {
pub x: f32,
pub w: f32,
pub p: *const ::std::os::raw::c_char,
pub next: *mut fz_layout_char,
}
#[test]
fn bindgen_test_layout_fz_layout_char() {
assert_eq!(
::std::mem::size_of::<fz_layout_char>(),
16usize,
concat!("Size of: ", stringify!(fz_layout_char))
);
assert_eq!(
::std::mem::align_of::<fz_layout_char>(),
4usize,
concat!("Alignment of ", stringify!(fz_layout_char))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_char>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_char>())).w as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_char>())).p as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_char),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_char>())).next as *const _ as usize },
12usize,
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 h: 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() {
assert_eq!(
::std::mem::size_of::<fz_layout_line>(),
24usize,
concat!("Size of: ", stringify!(fz_layout_line))
);
assert_eq!(
::std::mem::align_of::<fz_layout_line>(),
4usize,
concat!("Alignment of ", stringify!(fz_layout_line))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).h as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).p as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(p)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).text as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_line),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_line>())).next as *const _ as usize },
20usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_layout_block>(),
64usize,
concat!("Size of: ", stringify!(fz_layout_block))
);
assert_eq!(
::std::mem::align_of::<fz_layout_block>(),
4usize,
concat!("Alignment of ", stringify!(fz_layout_block))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).pool as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(pool)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).matrix as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).inv_matrix as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(inv_matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).head as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(head)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).tailp as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(tailp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_layout_block>())).text_tailp as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_layout_block),
"::",
stringify!(text_tailp)
)
);
}
extern "C" {
#[doc = "Create a new layout block, with new allocation pool, zero"]
#[doc = "matrices, 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."]
#[doc = ""]
#[doc = "Never 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: ::std::os::raw::c_uint = 1;
pub const FZ_STEXT_PRESERVE_WHITESPACE: ::std::os::raw::c_uint = 2;
pub const FZ_STEXT_PRESERVE_IMAGES: ::std::os::raw::c_uint = 4;
pub const FZ_STEXT_INHIBIT_SPACES: ::std::os::raw::c_uint = 8;
pub const FZ_STEXT_DEHYPHENATE: ::std::os::raw::c_uint = 16;
pub const FZ_STEXT_PRESERVE_SPANS: ::std::os::raw::c_uint = 32;
#[doc = "FZ_STEXT_PRESERVE_LIGATURES: If this option is activated"]
#[doc = "ligatures are passed through to the application in their"]
#[doc = "original form. If this option is deactivated ligatures are"]
#[doc = "expanded into their constituent parts, e.g. the ligature ffi is"]
#[doc = "expanded into three separate characters f, f and i."]
#[doc = ""]
#[doc = "FZ_STEXT_PRESERVE_WHITESPACE: If this option is activated"]
#[doc = "whitespace is passed through to the application in its original"]
#[doc = "form. If this option is deactivated any type of horizontal"]
#[doc = "whitespace (including horizontal tabs) will be replaced with"]
#[doc = "space characters of variable width."]
#[doc = ""]
#[doc = "FZ_STEXT_PRESERVE_IMAGES: If this option is set, then images"]
#[doc = "will be stored in the structured text structure. The default is"]
#[doc = "to ignore all images."]
#[doc = ""]
#[doc = "FZ_STEXT_INHIBIT_SPACES: If this option is set, we will not try"]
#[doc = "to add missing space characters where there are large gaps"]
#[doc = "between characters."]
#[doc = ""]
#[doc = "FZ_STEXT_DEHYPHENATE: If this option is set, hyphens at the"]
#[doc = "end of a line will be removed and the lines will be merged."]
#[doc = ""]
#[doc = "FZ_STEXT_PRESERVE_SPANS: If this option is set, spans on the same line"]
#[doc = "will not be merged. Each line will thus be a span of text with the same"]
#[doc = "font, colour, and size."]
pub type _bindgen_ty_18 = ::std::os::raw::c_uint;
#[doc = "A text page is a list of blocks, together with an overall"]
#[doc = "bounding 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() {
assert_eq!(
::std::mem::size_of::<fz_stext_page>(),
28usize,
concat!("Size of: ", stringify!(fz_stext_page))
);
assert_eq!(
::std::mem::align_of::<fz_stext_page>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_page))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_page>())).pool as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(pool)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_page>())).mediabox as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(mediabox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_page>())).first_block as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(first_block)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_page>())).last_block as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_page),
"::",
stringify!(last_block)
)
);
}
pub const FZ_STEXT_BLOCK_TEXT: ::std::os::raw::c_uint = 0;
pub const FZ_STEXT_BLOCK_IMAGE: ::std::os::raw::c_uint = 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),"]
#[doc = "or 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() {
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_1>(),
8usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_stext_block__bindgen_ty_1__bindgen_ty_1>())).first_line
as *const _ 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::null::<fz_stext_block__bindgen_ty_1__bindgen_ty_1>())).last_line
as *const _ as usize
},
4usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1__bindgen_ty_2>(),
28usize,
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>(),
4usize,
concat!(
"Alignment of ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_stext_block__bindgen_ty_1__bindgen_ty_2>())).transform
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(transform)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_stext_block__bindgen_ty_1__bindgen_ty_2>())).image as *const _
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() {
assert_eq!(
::std::mem::size_of::<fz_stext_block__bindgen_ty_1>(),
28usize,
concat!("Size of: ", stringify!(fz_stext_block__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<fz_stext_block__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_block__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block__bindgen_ty_1>())).t as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1),
"::",
stringify!(t)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block__bindgen_ty_1>())).i as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block__bindgen_ty_1),
"::",
stringify!(i)
)
);
}
#[test]
fn bindgen_test_layout_fz_stext_block() {
assert_eq!(
::std::mem::size_of::<fz_stext_block>(),
56usize,
concat!("Size of: ", stringify!(fz_stext_block))
);
assert_eq!(
::std::mem::align_of::<fz_stext_block>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_block))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block>())).bbox as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block>())).u as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(u)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block>())).prev as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_block),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_block>())).next as *const _ as usize },
52usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_stext_line>(),
44usize,
concat!("Size of: ", stringify!(fz_stext_line))
);
assert_eq!(
::std::mem::align_of::<fz_stext_line>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_line))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).wmode as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).dir as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(dir)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).bbox as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).first_char as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(first_char)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).last_char as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(last_char)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).prev as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_line>())).next as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_line),
"::",
stringify!(next)
)
);
}
#[doc = "A text char is a unicode character, the style in which is"]
#[doc = "appears, 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() {
assert_eq!(
::std::mem::size_of::<fz_stext_char>(),
60usize,
concat!("Size of: ", stringify!(fz_stext_char))
);
assert_eq!(
::std::mem::align_of::<fz_stext_char>(),
4usize,
concat!("Alignment of ", stringify!(fz_stext_char))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).c as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(c)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).color as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(color)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).origin as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(origin)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).quad as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(quad)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).size as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).font as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_char),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_stext_char>())).next as *const _ as usize },
56usize,
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."]
#[doc = ""]
#[doc = "The text page is filled out by the text device to contain the"]
#[doc = "blocks and lines of text on the page."]
#[doc = ""]
#[doc = "mediabox: 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."]
#[doc = ""]
#[doc = "Return the number of hits and store hit quads in the passed in"]
#[doc = "array."]
#[doc = ""]
#[doc = "NOTE: This is an experimental interface and subject to change"]
#[doc = "without notice."]
pub fn fz_search_stext_page(
ctx: *mut fz_context,
text: *mut fz_stext_page,
needle: *const ::std::os::raw::c_char,
quads: *mut fz_quad,
max_quads: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = "Return a list of quads to highlight lines inside the selection"]
#[doc = "points."]
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: ::std::os::raw::c_uint = 0;
pub const FZ_SELECT_WORDS: ::std::os::raw::c_uint = 1;
pub const FZ_SELECT_LINES: ::std::os::raw::c_uint = 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"]
#[doc = "selection."]
#[doc = ""]
#[doc = "crlf: If true, write \"\\r\\n\" style line endings (otherwise \"\\n\""]
#[doc = "only)."]
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"]
#[doc = "selection rectangle."]
#[doc = ""]
#[doc = "crlf: If true, write \"\\r\\n\" style line endings (otherwise \"\\n\""]
#[doc = "only)."]
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,
}
#[test]
fn bindgen_test_layout_fz_stext_options() {
assert_eq!(
::std::mem::size_of::<fz_stext_options>(),
4usize,
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::null::<fz_stext_options>())).flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_stext_options),
"::",
stringify!(flags)
)
);
}
extern "C" {
#[doc = "Parse stext device options from a comma separated key-value"]
#[doc = "string."]
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."]
#[doc = ""]
#[doc = "Gather the text on a page into blocks and lines."]
#[doc = ""]
#[doc = "The reading order is taken from the order the text is drawn in"]
#[doc = "the source file, so may not be accurate."]
#[doc = ""]
#[doc = "page: The text page to which content should be added. This will"]
#[doc = "usually be a newly created (empty) text page, but it can be one"]
#[doc = "containing data already (for example when merging multiple"]
#[doc = "pages, or watermarking)."]
#[doc = ""]
#[doc = "options: 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."]
#[doc = ""]
#[doc = "Renders the page internally to a bitmap that is then OCRd. Text"]
#[doc = "is then forwarded onto the target device."]
#[doc = ""]
#[doc = "target: The target device to receive the OCRd text."]
#[doc = ""]
#[doc = "ctm: The transform to apply to the mediabox to get the size for"]
#[doc = "the rendered page image. Also used to calculate the resolution"]
#[doc = "for the page image. In general, this will be the same as the CTM"]
#[doc = "that you pass to fz_run_page (or fz_run_display_list) to feed"]
#[doc = "this device."]
#[doc = ""]
#[doc = "mediabox: The mediabox (in points). Combined with the CTM to get"]
#[doc = "the bounds of the pixmap used internally for the rendered page"]
#[doc = "image."]
#[doc = ""]
#[doc = "with_list: If with_list is false, then all non-text operations"]
#[doc = "are forwarded instantly to the target device. This results in"]
#[doc = "the target device seeing all NON-text operations, followed by"]
#[doc = "all the text operations (derived from OCR)."]
#[doc = ""]
#[doc = "If with_list is true, then all the marking operations are"]
#[doc = "collated into a display list which is then replayed to the"]
#[doc = "target device at the end."]
#[doc = ""]
#[doc = "language: NULL (for \"eng\"), or a pointer to a string to describe"]
#[doc = "the languages/scripts that should be used for OCR (e.g."]
#[doc = "\"eng,ara\")."]
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,
) -> *mut fz_device;
}
pub const FZ_TRANSITION_NONE: ::std::os::raw::c_uint = 0;
pub const FZ_TRANSITION_SPLIT: ::std::os::raw::c_uint = 1;
pub const FZ_TRANSITION_BLINDS: ::std::os::raw::c_uint = 2;
pub const FZ_TRANSITION_BOX: ::std::os::raw::c_uint = 3;
pub const FZ_TRANSITION_WIPE: ::std::os::raw::c_uint = 4;
pub const FZ_TRANSITION_DISSOLVE: ::std::os::raw::c_uint = 5;
pub const FZ_TRANSITION_GLITTER: ::std::os::raw::c_uint = 6;
pub const FZ_TRANSITION_FLY: ::std::os::raw::c_uint = 7;
pub const FZ_TRANSITION_PUSH: ::std::os::raw::c_uint = 8;
pub const FZ_TRANSITION_COVER: ::std::os::raw::c_uint = 9;
pub const FZ_TRANSITION_UNCOVER: ::std::os::raw::c_uint = 10;
pub const FZ_TRANSITION_FADE: ::std::os::raw::c_uint = 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() {
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::null::<fz_transition>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).duration as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).vertical as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(vertical)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).outwards as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(outwards)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).direction as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(direction)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).state0 as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(state0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_transition>())).state1 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_transition),
"::",
stringify!(state1)
)
);
}
extern "C" {
#[doc = "Generate a frame of a transition."]
#[doc = ""]
#[doc = "tpix: Target pixmap"]
#[doc = "opix: Old pixmap"]
#[doc = "npix: New pixmap"]
#[doc = "time: Position within the transition (0 to 256)"]
#[doc = "trans: Transition details"]
#[doc = ""]
#[doc = "Returns 1 if successfully generated a frame."]
#[doc = ""]
#[doc = "Note: 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."]
#[doc = ""]
#[doc = "Lookup gid from font, clip it with scissor, and rendering it"]
#[doc = "with aa bits of antialiasing into a new pixmap."]
#[doc = ""]
#[doc = "The caller takes ownership of the pixmap and so must free it."]
#[doc = ""]
#[doc = "Note: This function is no longer used for normal rendering"]
#[doc = "operations, and is kept around just because we use it in the"]
#[doc = "app. 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"]
#[doc = "interpreter to replay glyphs from a type3 font directly into"]
#[doc = "the target device."]
#[doc = ""]
#[doc = "This is only used in exceptional circumstances (such as type3"]
#[doc = "glyphs that inherit current graphics state, or nested type3"]
#[doc = "glyphs)."]
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"]
#[doc = "id."]
#[doc = ""]
#[doc = "This caching can involve reading the underlying file, so must"]
#[doc = "happen ahead of time, so we aren't suddenly forced to read the"]
#[doc = "file 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."]
#[doc = ""]
#[doc = "ctm: On entry, the desired 'ideal' transformation for a glyph."]
#[doc = "On exit, adjusted to a (very similar) transformation quantised"]
#[doc = "for subpixel caching."]
#[doc = ""]
#[doc = "subpix_ctm: Initialised by the routine to the transform that"]
#[doc = "should be used to render the glyph."]
#[doc = ""]
#[doc = "qe, qf: which subpixel position we quantised to."]
#[doc = ""]
#[doc = "Returns: the size of the glyph."]
#[doc = ""]
#[doc = "Note: This is currently only exposed for use in our app. It"]
#[doc = "should 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;
}
#[doc = "fz_link is a list of interactive links on a page."]
#[doc = ""]
#[doc = "There is no relation between the order of the links in the"]
#[doc = "list and the order they appear on the page. The list of links"]
#[doc = "for a given page can be obtained from fz_load_links."]
#[doc = ""]
#[doc = "A link is reference counted. Dropping a reference to a link is"]
#[doc = "done by calling fz_drop_link."]
#[doc = ""]
#[doc = "rect: The hot zone. The area that can be clicked in"]
#[doc = "untransformed coordinates."]
#[doc = ""]
#[doc = "uri: Link destinations come in two forms: internal and external."]
#[doc = "Internal links refer to other pages in the same document."]
#[doc = "External links are URLs to other documents."]
#[doc = ""]
#[doc = "doc: Typically a pointer to the enclosing document. Note that"]
#[doc = "this pointer is opaque, and NOT a counted reference. Beware of"]
#[doc = "lifespan issues."]
#[doc = ""]
#[doc = "next: 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 doc: *mut ::std::os::raw::c_void,
pub uri: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_fz_link() {
assert_eq!(
::std::mem::size_of::<fz_link>(),
32usize,
concat!("Size of: ", stringify!(fz_link))
);
assert_eq!(
::std::mem::align_of::<fz_link>(),
4usize,
concat!("Alignment of ", stringify!(fz_link))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_link>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_link>())).next as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_link>())).rect as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(rect)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_link>())).doc as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_link>())).uri as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_link),
"::",
stringify!(uri)
)
);
}
extern "C" {
#[doc = "Create a new link record."]
#[doc = ""]
#[doc = "next is set to NULL with the expectation that the caller will"]
#[doc = "handle the linked list setup."]
pub fn fz_new_link(
ctx: *mut fz_context,
bbox: fz_rect,
doc: *mut ::std::os::raw::c_void,
uri: *const ::std::os::raw::c_char,
) -> *mut fz_link;
}
extern "C" {
#[doc = "Increment the reference count for a link. The same pointer is"]
#[doc = "returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "count reaches zero, the link is destroyed."]
#[doc = ""]
#[doc = "When a link is freed, the reference for any linked link (next)"]
#[doc = "is dropped too, thus an entire linked list of fz_link's can be"]
#[doc = "freed 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"]
#[doc = "uri containing a ':', intended to match with '://' which"]
#[doc = "separates 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;
}
#[doc = "fz_outline is a tree of the outline of a document (also known"]
#[doc = "as table of contents)."]
#[doc = ""]
#[doc = "title: Title of outline item using UTF-8 encoding. May be NULL"]
#[doc = "if the outline item has no text string."]
#[doc = ""]
#[doc = "uri: Destination in the document to be displayed when this"]
#[doc = "outline item is activated. May be an internal or external"]
#[doc = "link, or NULL if the outline item does not have a destination."]
#[doc = ""]
#[doc = "page: The page number of an internal link, or -1 for external"]
#[doc = "links or links with no destination."]
#[doc = ""]
#[doc = "next: The next outline item at the same level as this outline"]
#[doc = "item. May be NULL if no more outline items exist at this level."]
#[doc = ""]
#[doc = "down: The outline items immediate children in the hierarchy."]
#[doc = "May 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: ::std::os::raw::c_int,
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() {
assert_eq!(
::std::mem::size_of::<fz_outline>(),
36usize,
concat!("Size of: ", stringify!(fz_outline))
);
assert_eq!(
::std::mem::align_of::<fz_outline>(),
4usize,
concat!("Alignment of ", stringify!(fz_outline))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).title as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).uri as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(uri)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).page as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).x as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).y as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).next as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).down as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(down)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_outline>())).is_open as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_outline),
"::",
stringify!(is_open)
)
);
}
extern "C" {
#[doc = "Create a new outline entry with zeroed fields for the caller"]
#[doc = "to 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."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "reaches zero, the outline is freed."]
#[doc = ""]
#[doc = "When freed, it will drop linked\toutline entries (next and down)"]
#[doc = "too, thus a whole outline structure can be dropped by dropping"]
#[doc = "the top entry."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_drop_outline(ctx: *mut fz_context, outline: *mut fz_outline);
}
pub type fz_bookmark = isize;
#[doc = "Locations within the document are referred to in terms of"]
#[doc = "chapter and page, rather than just a page number. For some"]
#[doc = "documents (such as epub documents with large numbers of pages"]
#[doc = "broken into many chapters) this can make navigation much faster"]
#[doc = "as 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() {
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::null::<fz_location>())).chapter as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_location),
"::",
stringify!(chapter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_location>())).page as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_location),
"::",
stringify!(page)
)
);
}
pub const FZ_LAYOUT_KINDLE_W: ::std::os::raw::c_uint = 260;
pub const FZ_LAYOUT_KINDLE_H: ::std::os::raw::c_uint = 346;
pub const FZ_LAYOUT_KINDLE_EM: ::std::os::raw::c_uint = 9;
pub const FZ_LAYOUT_US_POCKET_W: ::std::os::raw::c_uint = 306;
pub const FZ_LAYOUT_US_POCKET_H: ::std::os::raw::c_uint = 495;
pub const FZ_LAYOUT_US_POCKET_EM: ::std::os::raw::c_uint = 10;
pub const FZ_LAYOUT_US_TRADE_W: ::std::os::raw::c_uint = 396;
pub const FZ_LAYOUT_US_TRADE_H: ::std::os::raw::c_uint = 612;
pub const FZ_LAYOUT_US_TRADE_EM: ::std::os::raw::c_uint = 11;
pub const FZ_LAYOUT_UK_A_FORMAT_W: ::std::os::raw::c_uint = 312;
pub const FZ_LAYOUT_UK_A_FORMAT_H: ::std::os::raw::c_uint = 504;
pub const FZ_LAYOUT_UK_A_FORMAT_EM: ::std::os::raw::c_uint = 10;
pub const FZ_LAYOUT_UK_B_FORMAT_W: ::std::os::raw::c_uint = 366;
pub const FZ_LAYOUT_UK_B_FORMAT_H: ::std::os::raw::c_uint = 561;
pub const FZ_LAYOUT_UK_B_FORMAT_EM: ::std::os::raw::c_uint = 10;
pub const FZ_LAYOUT_UK_C_FORMAT_W: ::std::os::raw::c_uint = 382;
pub const FZ_LAYOUT_UK_C_FORMAT_H: ::std::os::raw::c_uint = 612;
pub const FZ_LAYOUT_UK_C_FORMAT_EM: ::std::os::raw::c_uint = 11;
pub const FZ_LAYOUT_A5_W: ::std::os::raw::c_uint = 420;
pub const FZ_LAYOUT_A5_H: ::std::os::raw::c_uint = 595;
pub const FZ_LAYOUT_A5_EM: ::std::os::raw::c_uint = 11;
pub const FZ_DEFAULT_LAYOUT_W: ::std::os::raw::c_uint = 420;
pub const FZ_DEFAULT_LAYOUT_H: ::std::os::raw::c_uint = 595;
pub const FZ_DEFAULT_LAYOUT_EM: ::std::os::raw::c_uint = 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"]
#[doc = "the reference count for the fz_document drops to 0. The"]
#[doc = "implementation should release any resources held by the"]
#[doc = "document. The actual document pointer will be freed by the"]
#[doc = "caller."]
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"]
#[doc = "called to enquire whether the document needs a password"]
#[doc = "or 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"]
#[doc = "called to attempt to authenticate a password. See"]
#[doc = "fz_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"]
#[doc = "called to see if a document grants a certain permission. See"]
#[doc = "fz_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"]
#[doc = "load the outlines for a document. See fz_document_load_outline"]
#[doc = "for 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 lay"]
#[doc = "out 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"]
#[doc = "resolve an internal link to a location (chapter/page number"]
#[doc = "tuple). See fz_resolve_link for more information."]
pub type fz_document_resolve_link_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
doc: *mut fz_document,
uri: *const ::std::os::raw::c_char,
xp: *mut f32,
yp: *mut f32,
) -> fz_location,
>;
#[doc = "Type for a function to be called to"]
#[doc = "count the number of chapters in a document. See"]
#[doc = "fz_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"]
#[doc = "count the number of pages in a document. See fz_count_pages for"]
#[doc = "more 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"]
#[doc = "page 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 query"]
#[doc = "a documents metadata. See fz_lookup_metadata for more"]
#[doc = "information."]
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 = "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"]
#[doc = "a 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."]
#[doc = "See 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"]
#[doc = "resources held by a page. Called automatically when the"]
#[doc = "reference 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"]
#[doc = "bounding box of a page. See fz_bound_page for more"]
#[doc = "information."]
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"]
#[doc = "contents of a page. See fz_run_page_contents for more"]
#[doc = "information."]
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"]
#[doc = "from 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"]
#[doc = "obtain the details of how this page should be presented when"]
#[doc = "in presentation mode. See fz_page_presentation for more"]
#[doc = "information."]
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/"]
#[doc = "disable separations on a page. See fz_control_separation for"]
#[doc = "more 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"]
#[doc = "whether a given separation is enabled or disabled on a page."]
#[doc = "See 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"]
#[doc = "details of separations on a page. See fz_get_separations"]
#[doc = "for 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"]
#[doc = "whether 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 = "Function type to open a document from a file."]
#[doc = ""]
#[doc = "filename: file to open"]
#[doc = ""]
#[doc = "Pointer 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"]
#[doc = "document from a file."]
#[doc = ""]
#[doc = "stream: fz_stream to read document data from. Must be"]
#[doc = "seekable for formats that require it."]
#[doc = ""]
#[doc = "Pointer 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"]
#[doc = "file, with accelerator data."]
#[doc = ""]
#[doc = "filename: file to open"]
#[doc = ""]
#[doc = "accel: accelerator file"]
#[doc = ""]
#[doc = "Pointer 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,"]
#[doc = "with accelerator data."]
#[doc = ""]
#[doc = "stream: fz_stream to read document data from. Must be"]
#[doc = "seekable for formats that require it."]
#[doc = ""]
#[doc = "accel: fz_stream to read accelerator data from. Must be"]
#[doc = "seekable for formats that require it."]
#[doc = ""]
#[doc = "Pointer 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"]
#[doc = "a magic string."]
#[doc = ""]
#[doc = "magic: string to recognise - typically a filename or mime"]
#[doc = "type."]
#[doc = ""]
#[doc = "Returns a number between 0 (not recognized) and 100"]
#[doc = "(fully recognized) based on how certain the recognizer"]
#[doc = "is 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,
>;
extern "C" {
#[doc = "Register a handler for a document type."]
#[doc = ""]
#[doc = "handler: The handler to register."]
pub fn fz_register_document_handler(ctx: *mut fz_context, handler: *const fz_document_handler);
}
extern "C" {
#[doc = "Register handlers"]
#[doc = "for all the standard document types supported in"]
#[doc = "this 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"]
#[doc = "document of this type."]
#[doc = ""]
#[doc = "magic: Can be a filename extension (including initial period) or"]
#[doc = "a 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"]
#[doc = "objects can be located. MuPDF will try to repair broken"]
#[doc = "documents (without actually changing the file contents)."]
#[doc = ""]
#[doc = "The returned fz_document is used when calling most other"]
#[doc = "document related functions."]
#[doc = ""]
#[doc = "filename: 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"]
#[doc = "objects can be located. MuPDF will try to repair broken"]
#[doc = "documents (without actually changing the file contents)."]
#[doc = ""]
#[doc = "The returned fz_document is used when calling most other"]
#[doc = "document related functions."]
#[doc = ""]
#[doc = "filename: 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"]
#[doc = "opening a file on disk."]
#[doc = ""]
#[doc = "magic: a string used to detect document type; either a file name"]
#[doc = "or 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 the specified stream object rather than"]
#[doc = "opening a file on disk."]
#[doc = ""]
#[doc = "magic: a string used to detect document type; either a file name"]
#[doc = "or 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"]
#[doc = "stream."]
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"]
#[doc = "foo_new_document(fz_context *ctx, ...). These work by"]
#[doc = "deriving a new document type from fz_document, for instance:"]
#[doc = "typedef struct { fz_document base; ...extras... } foo_document;"]
#[doc = "These are allocated by calling"]
#[doc = "fz_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"]
#[doc = "returned."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "count reaches 0, the document and all it's references are"]
#[doc = "freed."]
#[doc = ""]
#[doc = "Never 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"]
#[doc = "non-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."]
#[doc = ""]
#[doc = "password: The password string to be checked. Some document"]
#[doc = "specifications do not specify any particular text encoding, so"]
#[doc = "neither do we."]
#[doc = ""]
#[doc = "Returns 0 for failure to authenticate, non-zero for success."]
#[doc = ""]
#[doc = "For PDF documents, further information can be given by examining"]
#[doc = "the bits in the return code."]
#[doc = ""]
#[doc = "Bit 0 => No password required"]
#[doc = "Bit 1 => User password authenticated"]
#[doc = "Bit 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."]
#[doc = ""]
#[doc = "Should 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 = "Is the document reflowable."]
#[doc = ""]
#[doc = "Returns 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."]
#[doc = ""]
#[doc = "w, h: Page size in points."]
#[doc = "em: 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"]
#[doc = "the same location after the document has been laid out with"]
#[doc = "different 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"]
#[doc = ""]
#[doc = "May 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."]
#[doc = ""]
#[doc = "xp, yp: Pointer to store coordinate of destination on the page."]
#[doc = ""]
#[doc = "Returns (-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."]
#[doc = "Using this can be far more efficient in some cases than calling"]
#[doc = "fz_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"]
#[doc = "end of chapters etc). If at the end of the document, returns the"]
#[doc = "current 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"]
#[doc = "the end of chapters etc). If already at the start of the"]
#[doc = "document, 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"]
#[doc = "the 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"]
#[doc = "chapters to be laid out in order to calculate the number of"]
#[doc = "pages 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"]
#[doc = "chapters to be laid out in order to calculate the number of"]
#[doc = "pages 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"]
#[doc = "efficient than loading by location (chapter+page) for some"]
#[doc = "document 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."]
#[doc = "At 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."]
#[doc = "May 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."]
#[doc = ""]
#[doc = "After fz_load_page is it possible to retrieve the size of the"]
#[doc = "page using fz_bound_page, or to render the page using"]
#[doc = "fz_run_page_*. Free the page by calling fz_drop_page."]
#[doc = ""]
#[doc = "chapter: chapter number, 0 is the first chapter of the document."]
#[doc = "number: 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."]
#[doc = ""]
#[doc = "Returns a linked list of all the links on the page, each with"]
#[doc = "its clickable region and link destination. Each link is"]
#[doc = "reference counted so drop and free the list of links by"]
#[doc = "calling fz_drop_link on the pointer return from fz_load_links."]
#[doc = ""]
#[doc = "page: 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"]
#[doc = "fz_page. This macro allocates such derived structures, and"]
#[doc = "initialises the base sections."]
pub fn fz_new_page_of_size(ctx: *mut fz_context, size: ::std::os::raw::c_int) -> *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."]
#[doc = ""]
#[doc = "page: Page obtained from fz_load_page."]
#[doc = ""]
#[doc = "dev: Device obtained from fz_new_*_device."]
#[doc = ""]
#[doc = "transform: Transform to apply to page. May include for example"]
#[doc = "scaling and rotation, see fz_scale, fz_rotate and fz_concat."]
#[doc = "Set to fz_identity if no transformation is desired."]
#[doc = ""]
#[doc = "cookie: Communication mechanism between caller and library"]
#[doc = "rendering the page. Intended for multi-threaded applications,"]
#[doc = "while single-threaded applications set cookie to NULL. The"]
#[doc = "caller may abort an ongoing rendering of a page. Cookie also"]
#[doc = "communicates progress information back to the caller. The"]
#[doc = "fields inside cookie are continually updated while the page is"]
#[doc = "rendering."]
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"]
#[doc = "page content, without the annotations, if any."]
#[doc = ""]
#[doc = "page: Page obtained from fz_load_page."]
#[doc = ""]
#[doc = "dev: Device obtained from fz_new_*_device."]
#[doc = ""]
#[doc = "transform: Transform to apply to page. May include for example"]
#[doc = "scaling and rotation, see fz_scale, fz_rotate and fz_concat."]
#[doc = "Set to fz_identity if no transformation is desired."]
#[doc = ""]
#[doc = "cookie: Communication mechanism between caller and library"]
#[doc = "rendering the page. Intended for multi-threaded applications,"]
#[doc = "while single-threaded applications set cookie to NULL. The"]
#[doc = "caller may abort an ongoing rendering of a page. Cookie also"]
#[doc = "communicates progress information back to the caller. The"]
#[doc = "fields inside cookie are continually updated while the page is"]
#[doc = "rendering."]
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"]
#[doc = "pointer."]
#[doc = ""]
#[doc = "Never throws exceptions."]
pub fn fz_keep_page(ctx: *mut fz_context, page: *mut fz_page) -> *mut fz_page;
}
extern "C" {
#[doc = "Decrements the reference count for the page. When the reference"]
#[doc = "count hits 0, the page and its references are freed."]
#[doc = ""]
#[doc = "Never 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."]
#[doc = ""]
#[doc = "transition: A pointer to a transition struct to fill out."]
#[doc = ""]
#[doc = "duration: A pointer to a place to set the page duration in"]
#[doc = "seconds. Will be set to 0 if no transition is specified for the"]
#[doc = "page."]
#[doc = ""]
#[doc = "Returns: a pointer to the transition structure, or NULL if there"]
#[doc = "is 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 = "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."]
#[doc = ""]
#[doc = "doc: The document to query."]
#[doc = ""]
#[doc = "key: Which meta data key to retrieve..."]
#[doc = ""]
#[doc = "Basic information:"]
#[doc = "'format'\t-- Document format and version."]
#[doc = "'encryption'\t-- Description of the encryption used."]
#[doc = ""]
#[doc = "From the document information dictionary:"]
#[doc = "'info:Title'"]
#[doc = "'info:Author'"]
#[doc = "'info:Subject'"]
#[doc = "'info:Keywords'"]
#[doc = "'info:Creator'"]
#[doc = "'info:Producer'"]
#[doc = "'info:CreationDate'"]
#[doc = "'info:ModDate'"]
#[doc = ""]
#[doc = "buf: The buffer to hold the results (a nul-terminated UTF-8"]
#[doc = "string)."]
#[doc = ""]
#[doc = "size: Size of 'buf'."]
#[doc = ""]
#[doc = "Returns the number of bytes need to store the string plus terminator"]
#[doc = "(will be larger than 'size' if the output was truncated), or -1 if the"]
#[doc = "key 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" {
#[doc = "Find the output intent colorspace if the document has defined"]
#[doc = "one."]
#[doc = ""]
#[doc = "Returns a borrowed reference that should not be dropped, unless"]
#[doc = "it 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."]
#[doc = "This will be NULL, unless the format specifically supports"]
#[doc = "separations (such as PDF files). May be NULL even"]
#[doc = "so, if there are no separations on a page."]
#[doc = ""]
#[doc = "Returns 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;
}
#[doc = "Structure definition is public so other classes can"]
#[doc = "derive 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 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 prev: *mut *mut fz_page,
pub next: *mut fz_page,
}
#[test]
fn bindgen_test_layout_fz_page() {
assert_eq!(
::std::mem::size_of::<fz_page>(),
68usize,
concat!("Size of: ", stringify!(fz_page))
);
assert_eq!(
::std::mem::align_of::<fz_page>(),
4usize,
concat!("Alignment of ", stringify!(fz_page))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).chapter as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(chapter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).number as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).incomplete as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(incomplete)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).drop_page as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(drop_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).bound_page as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(bound_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).run_page_contents as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_contents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).run_page_annots as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_annots)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).run_page_widgets as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(run_page_widgets)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).load_links as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(load_links)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).page_presentation as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(page_presentation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).control_separation as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(control_separation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).separation_disabled as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(separation_disabled)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).separations as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(separations)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).overprint as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(overprint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).prev as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(prev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_page>())).next as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_page),
"::",
stringify!(next)
)
);
}
#[doc = "Structure definition is public so other classes can"]
#[doc = "derive from it. Callers should not access the members"]
#[doc = "directly, though implementations will need initialize"]
#[doc = "functions 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 layout: fz_document_layout_fn,
pub make_bookmark: fz_document_make_bookmark_fn,
pub lookup_bookmark: fz_document_lookup_bookmark_fn,
pub resolve_link: fz_document_resolve_link_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 lookup_metadata: fz_document_lookup_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() {
assert_eq!(
::std::mem::size_of::<fz_document>(),
76usize,
concat!("Size of: ", stringify!(fz_document))
);
assert_eq!(
::std::mem::align_of::<fz_document>(),
4usize,
concat!("Alignment of ", stringify!(fz_document))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).drop_document as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(drop_document)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).needs_password as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(needs_password)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_document>())).authenticate_password as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(authenticate_password)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).has_permission as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(has_permission)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).load_outline as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(load_outline)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).layout as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(layout)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).make_bookmark as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(make_bookmark)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).lookup_bookmark as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(lookup_bookmark)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).resolve_link as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(resolve_link)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).count_chapters as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(count_chapters)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).count_pages as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(count_pages)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).load_page as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(load_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).lookup_metadata as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(lookup_metadata)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).get_output_intent as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(get_output_intent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).output_accelerator as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(output_accelerator)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).did_layout as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(did_layout)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).is_reflowable as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(fz_document),
"::",
stringify!(is_reflowable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document>())).open as *const _ as usize },
72usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_document_handler>(),
28usize,
concat!("Size of: ", stringify!(fz_document_handler))
);
assert_eq!(
::std::mem::align_of::<fz_document_handler>(),
4usize,
concat!("Alignment of ", stringify!(fz_document_handler))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_handler>())).recognize as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(recognize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_handler>())).open as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_document_handler>())).open_with_stream as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_with_stream)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_handler>())).extensions as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(extensions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_handler>())).mimetypes as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(mimetypes)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_handler>())).open_accel as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_accel)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_document_handler>())).open_accel_with_stream as *const _
as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(fz_document_handler),
"::",
stringify!(open_accel_with_stream)
)
);
}
extern "C" {
#[doc = "Create a display list."]
#[doc = ""]
#[doc = "Ownership 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)."]
#[doc = ""]
#[doc = "Ownership 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."]
#[doc = ""]
#[doc = "Ownership 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."]
#[doc = ""]
#[doc = "Ownership 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."]
#[doc = ""]
#[doc = "Ownership 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."]
#[doc = ""]
#[doc = "Ownership 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_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."]
#[doc = "Record the hits in the hit_bbox array and return the number of"]
#[doc = "hits. 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_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_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_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_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,
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,
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" {
#[doc = "Use text extraction to convert the input document into XHTML,"]
#[doc = "then 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,
) -> *mut fz_document;
}
#[doc = "Function type to start"]
#[doc = "the process of writing a page to a document."]
#[doc = ""]
#[doc = "mediabox: page size rectangle in points."]
#[doc = ""]
#[doc = "Returns 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"]
#[doc = "process of writing a page to a document."]
#[doc = ""]
#[doc = "dev: 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"]
#[doc = "the process of writing pages to a document."]
#[doc = ""]
#[doc = "This writes any file level trailers required. After this"]
#[doc = "completes 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"]
#[doc = "an fz_document_writer. This may be called at any time during"]
#[doc = "the process to release all the resources owned by the writer."]
#[doc = ""]
#[doc = "Calling drop without having previously called close may leave"]
#[doc = "the file in an inconsistent state and the user of the"]
#[doc = "fz_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"]
#[doc = "it 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"]
#[doc = "option, b."]
#[doc = ""]
#[doc = "(i.e. a could be 'foo' or 'foo,bar...' etc, but b can only be"]
#[doc = "'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"]
#[doc = "bytes."]
#[doc = ""]
#[doc = "Returns the number of bytes (including terminator) that did not"]
#[doc = "fit. If val is maxlen or greater bytes in size, it will be left"]
#[doc = "unterminated."]
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"]
#[doc = "file of the given type."]
#[doc = ""]
#[doc = "path: The document name to write (or NULL for default)"]
#[doc = ""]
#[doc = "format: Which format to write (currently cbz, html, pdf, pam,"]
#[doc = "pbm, pgm, pkm, png, ppm, pnm, svg, text, xhtml)"]
#[doc = ""]
#[doc = "options: NULL, or pointer to comma separated string to control"]
#[doc = "file 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"]
#[doc = "the 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" {
#[doc = "Document writers for various possible output formats."]
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_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;
}
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_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"]
#[doc = "a document."]
#[doc = ""]
#[doc = "mediabox: page size rectangle in points."]
#[doc = ""]
#[doc = "Returns a borrowed fz_device to write page contents to. This"]
#[doc = "should 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"]
#[doc = "document."]
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"]
#[doc = "fz_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"]
#[doc = "pages to a document."]
#[doc = ""]
#[doc = "This writes any file level trailers required. After this"]
#[doc = "completes 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."]
#[doc = "This may be called at any time during the process to release all"]
#[doc = "the resources owned by the writer."]
#[doc = ""]
#[doc = "Calling drop without having previously called close may leave"]
#[doc = "the 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"]
#[doc = "be 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() {
assert_eq!(
::std::mem::size_of::<fz_document_writer>(),
20usize,
concat!("Size of: ", stringify!(fz_document_writer))
);
assert_eq!(
::std::mem::align_of::<fz_document_writer>(),
4usize,
concat!("Alignment of ", stringify!(fz_document_writer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_writer>())).begin_page as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(begin_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_writer>())).end_page as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(end_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_writer>())).close_writer as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(close_writer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_writer>())).drop_writer as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(drop_writer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_document_writer>())).dev as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_document_writer),
"::",
stringify!(dev)
)
);
}
extern "C" {
#[doc = "Internal function to allocate a"]
#[doc = "block for a derived document_writer structure, with the base"]
#[doc = "structure's function pointers populated correctly, and the extra"]
#[doc = "space 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"]
#[doc = "a banded image with the given properties/dimensions etc. This"]
#[doc = "also configures the bandwriter for the format of the data to be"]
#[doc = "passed in future calls."]
#[doc = ""]
#[doc = "w, h: Width and Height of the entire page."]
#[doc = ""]
#[doc = "n: Number of components (including spots and alphas)."]
#[doc = ""]
#[doc = "alpha: Number of alpha components."]
#[doc = ""]
#[doc = "xres, yres: X and Y resolutions in dpi."]
#[doc = ""]
#[doc = "cs: Colorspace (NULL for bitmaps)"]
#[doc = ""]
#[doc = "seps: 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"]
#[doc = "of data for an image."]
#[doc = ""]
#[doc = "stride: The byte offset from the first byte of the data"]
#[doc = "for a pixel to the first byte of the data for the same pixel"]
#[doc = "on the row below."]
#[doc = ""]
#[doc = "band_height: The number of lines in this band."]
#[doc = ""]
#[doc = "samples: 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 = "Drop the reference to the band writer, causing it to be"]
#[doc = "destroyed."]
#[doc = ""]
#[doc = "Never 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_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 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() {
assert_eq!(
::std::mem::size_of::<fz_band_writer>(),
60usize,
concat!("Size of: ", stringify!(fz_band_writer))
);
assert_eq!(
::std::mem::align_of::<fz_band_writer>(),
4usize,
concat!("Alignment of ", stringify!(fz_band_writer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).drop as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).header as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).band as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(band)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).trailer as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(trailer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).out as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).w as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).h as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).n as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).s as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(s)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).alpha as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(alpha)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).xres as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(xres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).yres as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(yres)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).pagenum as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(pagenum)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).line as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(fz_band_writer),
"::",
stringify!(line)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_band_writer>())).seps as *const _ as usize },
56usize,
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() {
assert_eq!(
::std::mem::size_of::<fz_pcl_options>(),
52usize,
concat!("Size of: ", stringify!(fz_pcl_options))
);
assert_eq!(
::std::mem::align_of::<fz_pcl_options>(),
4usize,
concat!("Alignment of ", stringify!(fz_pcl_options))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).features as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(features)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).odd_page_init as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(odd_page_init)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).even_page_init as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(even_page_init)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).tumble as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(tumble)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).duplex_set as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(duplex_set)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).duplex as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(duplex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).paper_size as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(paper_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).manual_feed_set as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(manual_feed_set)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).manual_feed as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(manual_feed)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<fz_pcl_options>())).media_position_set as *const _ as usize
},
36usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(media_position_set)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).media_position as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(media_position)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).orientation as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pcl_options>())).page_count as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(fz_pcl_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Initialize PCL option struct for a given preset."]
#[doc = ""]
#[doc = "Currently defined presets include:"]
#[doc = ""]
#[doc = "generic\tGeneric PCL printer"]
#[doc = "ljet4\tHP DeskJet"]
#[doc = "dj500\tHP DeskJet 500"]
#[doc = "fs600\tKyocera FS-600"]
#[doc = "lj\tHP LaserJet, HP LaserJet Plus"]
#[doc = "lj2\tHP LaserJet IIp, HP LaserJet IId"]
#[doc = "lj3\tHP LaserJet III"]
#[doc = "lj3d\tHP LaserJet IIId"]
#[doc = "lj4\tHP LaserJet 4"]
#[doc = "lj4pl\tHP LaserJet 4 PL"]
#[doc = "lj4d\tHP LaserJet 4d"]
#[doc = "lp2563b\tHP 2563B line printer"]
#[doc = "oce9050\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."]
#[doc = ""]
#[doc = "Currently defined options and values are as follows:"]
#[doc = ""]
#[doc = "preset=X\tEither \"generic\" or one of the presets as for fz_pcl_preset."]
#[doc = "spacing=0\tNo vertical spacing capability"]
#[doc = "spacing=1\tPCL 3 spacing (<ESC>*p+<n>Y)"]
#[doc = "spacing=2\tPCL 4 spacing (<ESC>*b<n>Y)"]
#[doc = "spacing=3\tPCL 5 spacing (<ESC>*b<n>Y and clear seed row)"]
#[doc = "mode2\t\tDisable/Enable mode 2 graphics compression"]
#[doc = "mode3\t\tDisable/Enable mode 3 graphics compression"]
#[doc = "eog_reset\tEnd of graphics (<ESC>*rB) resets all parameters"]
#[doc = "has_duplex\tDuplex supported (<ESC>&l<duplex>S)"]
#[doc = "has_papersize\tPapersize setting supported (<ESC>&l<sizecode>A)"]
#[doc = "has_copies\tNumber of copies supported (<ESC>&l<copies>X)"]
#[doc = "is_ljet4pjl\tDisable/Enable HP 4PJL model-specific output"]
#[doc = "is_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() {
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::null::<fz_pclm_options>())).compress as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(compress)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pclm_options>())).strip_height as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(strip_height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pclm_options>())).page_count as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pclm_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Parse PCLm options."]
#[doc = ""]
#[doc = "Currently defined options and values are as follows:"]
#[doc = ""]
#[doc = "compression=none: No compression"]
#[doc = "compression=flate: Flate compression"]
#[doc = "strip-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(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 page_count: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_fz_pdfocr_options() {
assert_eq!(
::std::mem::size_of::<fz_pdfocr_options>(),
268usize,
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::null::<fz_pdfocr_options>())).compress as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(compress)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pdfocr_options>())).strip_height as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(strip_height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pdfocr_options>())).language as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(language)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pdfocr_options>())).page_count as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(fz_pdfocr_options),
"::",
stringify!(page_count)
)
);
}
extern "C" {
#[doc = "Parse PDFOCR options."]
#[doc = ""]
#[doc = "Currently defined options and values are as follows:"]
#[doc = ""]
#[doc = "compression=none: No compression"]
#[doc = "compression=flate: Flate compression"]
#[doc = "strip-height=n: Strip height (default 16)"]
#[doc = "ocr-language=<lang>: OCR Language (default eng)"]
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"]
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 = "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 = "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"]
#[doc = "alpha)."]
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."]
#[doc = ""]
#[doc = "Ownership 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."]
#[doc = ""]
#[doc = "Ownership 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"]
#[doc = "alpha)."]
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"]
#[doc = "alpha)."]
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"]
#[doc = "alpha)."]
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,"]
#[doc = "with 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"]
#[doc = "alpha."]
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(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() {
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::null::<fz_pwg_options>())).media_class as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_class)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).media_color as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_color)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).media_type as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).output_type as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(output_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).advance_distance as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(advance_distance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).advance_media as *const _ as usize },
260usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(advance_media)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).collate as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(collate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).cut_media as *const _ as usize },
268usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(cut_media)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).duplex as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(duplex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).insert_sheet as *const _ as usize },
276usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(insert_sheet)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).jog as *const _ as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(jog)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).leading_edge as *const _ as usize },
284usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(leading_edge)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).manual_feed as *const _ as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(manual_feed)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).media_position as *const _ as usize },
292usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_position)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).media_weight as *const _ as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_weight)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).mirror_print as *const _ as usize },
300usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(mirror_print)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).negative_print as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(negative_print)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).num_copies as *const _ as usize },
308usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(num_copies)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).orientation as *const _ as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(orientation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).output_face_up as *const _ as usize },
316usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(output_face_up)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).PageSize as *const _ as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(PageSize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).separations as *const _ as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(separations)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).tray_switch as *const _ as usize },
332usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(tray_switch)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).tumble as *const _ as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(tumble)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).media_type_num as *const _ as usize },
340usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(media_type_num)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).compression as *const _ as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(compression)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).row_count as *const _ as usize },
348usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).row_feed as *const _ as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_feed)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).row_step as *const _ as usize },
356usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(row_step)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).rendering_intent as *const _ as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(fz_pwg_options),
"::",
stringify!(rendering_intent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<fz_pwg_options>())).page_size_name as *const _ 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."]
#[doc = ""]
#[doc = "Caller should provide a file header by calling"]
#[doc = "fz_write_pwg_file_header, but can then write several pages to"]
#[doc = "the 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."]
#[doc = ""]
#[doc = "Caller should provide a file header by calling"]
#[doc = "fz_write_pwg_file_header, but can then write several pages to"]
#[doc = "the 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: ::std::os::raw::c_uint = 0;
pub const FZ_SVG_TEXT_AS_TEXT: ::std::os::raw::c_uint = 1;
pub type _bindgen_ty_23 = ::std::os::raw::c_uint;
extern "C" {
#[doc = "Create a device that outputs (single page) SVG files to"]
#[doc = "the given output stream."]
#[doc = ""]
#[doc = "Equivalent 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"]
#[doc = "the given output stream."]
#[doc = ""]
#[doc = "output: The output stream to send the constructed SVG page to."]
#[doc = ""]
#[doc = "page_width, page_height: The page dimensions to use (in points)."]
#[doc = ""]
#[doc = "text_format: How to emit text. One of the following values:"]
#[doc = "FZ_SVG_TEXT_AS_TEXT: As <text> elements with possible"]
#[doc = "layout errors and mismatching fonts."]
#[doc = "FZ_SVG_TEXT_AS_PATH: As <path> elements with exact"]
#[doc = "visual appearance."]
#[doc = ""]
#[doc = "reuse_images: Share image resources using <symbol> definitions."]
#[doc = ""]
#[doc = "id: 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;
}
extern "C" {
#[doc = " Return version of the Unicode database."]
#[doc = ""]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @return value according to UCDN_GENERAL_CATEGORY_* and as defined in"]
#[doc = " UAX#44."]
pub fn ucdn_get_general_category(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Get bidirectional class of a codepoint."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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"]
#[doc = " rule LB1 of UAX#14 into account. See ucdn_get_resolved_linebreak_class()"]
#[doc = " for resolved linebreak classes."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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"]
#[doc = " in the AI, SG, XX, SA and CJ classes according to rule LB1 of UAX#14."]
#[doc = " In addition the CB class is resolved as the equivalent B2 class and"]
#[doc = " the NL class is resolved as the equivalent BK class."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @return mirrored codepoint or the original codepoint if no"]
#[doc = " mirrored character exists"]
pub fn ucdn_mirror(code: u32) -> u32;
}
extern "C" {
#[doc = " Get paired bracket for a codepoint."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @return paired bracket codepoint or the original codepoint if no"]
#[doc = " paired bracket character exists"]
pub fn ucdn_paired_bracket(code: u32) -> u32;
}
extern "C" {
#[doc = " Get paired bracket type for a codepoint."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @return value according to UCDN_BIDI_PAIRED_BRACKET_TYPE_* and as defined"]
#[doc = " in UAX#9."]
#[doc = ""]
pub fn ucdn_paired_bracket_type(code: u32) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Pairwise canonical decomposition of a codepoint. This includes"]
#[doc = " Hangul Jamo decomposition (see chapter 3.12 of the Unicode core"]
#[doc = " specification)."]
#[doc = ""]
#[doc = " Hangul is decomposed into L and V jamos for LV forms, and an"]
#[doc = " LV precomposed syllable and a T jamo for LVT forms."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @param a filled with first codepoint of decomposition"]
#[doc = " @param b filled with second codepoint of decomposition, or 0"]
#[doc = " @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."]
#[doc = ""]
#[doc = " @param code Unicode codepoint"]
#[doc = " @param decomposed filled with decomposition, must be able to hold 18"]
#[doc = " characters"]
#[doc = " @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"]
#[doc = " Hangul Jamo composition (see chapter 3.12 of the Unicode core"]
#[doc = " specification)."]
#[doc = ""]
#[doc = " Hangul composition expects either L and V jamos, or an LV"]
#[doc = " precomposed syllable and a T jamo. This is exactly the inverse"]
#[doc = " of pairwise Hangul decomposition."]
#[doc = ""]
#[doc = " @param code filled with composition"]
#[doc = " @param a first codepoint"]
#[doc = " @param b second codepoint"]
#[doc = " @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_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_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);
}
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_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_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_set_int(ctx: *mut fz_context, obj: *mut pdf_obj, i: i64);
}
pub const PDF_ENUM_NULL: ::std::os::raw::c_uint = 0;
pub const PDF_ENUM_TRUE: ::std::os::raw::c_uint = 1;
pub const PDF_ENUM_FALSE: ::std::os::raw::c_uint = 2;
pub const PDF_ENUM_NAME_1_2: ::std::os::raw::c_uint = 3;
pub const PDF_ENUM_NAME_3D: ::std::os::raw::c_uint = 4;
pub const PDF_ENUM_NAME_A: ::std::os::raw::c_uint = 5;
pub const PDF_ENUM_NAME_A85: ::std::os::raw::c_uint = 6;
pub const PDF_ENUM_NAME_AA: ::std::os::raw::c_uint = 7;
pub const PDF_ENUM_NAME_AC: ::std::os::raw::c_uint = 8;
pub const PDF_ENUM_NAME_AESV2: ::std::os::raw::c_uint = 9;
pub const PDF_ENUM_NAME_AESV3: ::std::os::raw::c_uint = 10;
pub const PDF_ENUM_NAME_AHx: ::std::os::raw::c_uint = 11;
pub const PDF_ENUM_NAME_AP: ::std::os::raw::c_uint = 12;
pub const PDF_ENUM_NAME_AS: ::std::os::raw::c_uint = 13;
pub const PDF_ENUM_NAME_ASCII85Decode: ::std::os::raw::c_uint = 14;
pub const PDF_ENUM_NAME_ASCIIHexDecode: ::std::os::raw::c_uint = 15;
pub const PDF_ENUM_NAME_AcroForm: ::std::os::raw::c_uint = 16;
pub const PDF_ENUM_NAME_Action: ::std::os::raw::c_uint = 17;
pub const PDF_ENUM_NAME_ActualText: ::std::os::raw::c_uint = 18;
pub const PDF_ENUM_NAME_Adobe_PPKLite: ::std::os::raw::c_uint = 19;
pub const PDF_ENUM_NAME_All: ::std::os::raw::c_uint = 20;
pub const PDF_ENUM_NAME_AllOff: ::std::os::raw::c_uint = 21;
pub const PDF_ENUM_NAME_AllOn: ::std::os::raw::c_uint = 22;
pub const PDF_ENUM_NAME_Alpha: ::std::os::raw::c_uint = 23;
pub const PDF_ENUM_NAME_Alt: ::std::os::raw::c_uint = 24;
pub const PDF_ENUM_NAME_Alternate: ::std::os::raw::c_uint = 25;
pub const PDF_ENUM_NAME_Annot: ::std::os::raw::c_uint = 26;
pub const PDF_ENUM_NAME_Annots: ::std::os::raw::c_uint = 27;
pub const PDF_ENUM_NAME_AnyOff: ::std::os::raw::c_uint = 28;
pub const PDF_ENUM_NAME_App: ::std::os::raw::c_uint = 29;
pub const PDF_ENUM_NAME_Approved: ::std::os::raw::c_uint = 30;
pub const PDF_ENUM_NAME_ArtBox: ::std::os::raw::c_uint = 31;
pub const PDF_ENUM_NAME_AsIs: ::std::os::raw::c_uint = 32;
pub const PDF_ENUM_NAME_Ascent: ::std::os::raw::c_uint = 33;
pub const PDF_ENUM_NAME_AuthEvent: ::std::os::raw::c_uint = 34;
pub const PDF_ENUM_NAME_B: ::std::os::raw::c_uint = 35;
pub const PDF_ENUM_NAME_BBox: ::std::os::raw::c_uint = 36;
pub const PDF_ENUM_NAME_BC: ::std::os::raw::c_uint = 37;
pub const PDF_ENUM_NAME_BE: ::std::os::raw::c_uint = 38;
pub const PDF_ENUM_NAME_BG: ::std::os::raw::c_uint = 39;
pub const PDF_ENUM_NAME_BM: ::std::os::raw::c_uint = 40;
pub const PDF_ENUM_NAME_BPC: ::std::os::raw::c_uint = 41;
pub const PDF_ENUM_NAME_BS: ::std::os::raw::c_uint = 42;
pub const PDF_ENUM_NAME_Background: ::std::os::raw::c_uint = 43;
pub const PDF_ENUM_NAME_BaseEncoding: ::std::os::raw::c_uint = 44;
pub const PDF_ENUM_NAME_BaseFont: ::std::os::raw::c_uint = 45;
pub const PDF_ENUM_NAME_BaseState: ::std::os::raw::c_uint = 46;
pub const PDF_ENUM_NAME_BitsPerComponent: ::std::os::raw::c_uint = 47;
pub const PDF_ENUM_NAME_BitsPerCoordinate: ::std::os::raw::c_uint = 48;
pub const PDF_ENUM_NAME_BitsPerFlag: ::std::os::raw::c_uint = 49;
pub const PDF_ENUM_NAME_BitsPerSample: ::std::os::raw::c_uint = 50;
pub const PDF_ENUM_NAME_BlackIs1: ::std::os::raw::c_uint = 51;
pub const PDF_ENUM_NAME_BlackPoint: ::std::os::raw::c_uint = 52;
pub const PDF_ENUM_NAME_BleedBox: ::std::os::raw::c_uint = 53;
pub const PDF_ENUM_NAME_Blinds: ::std::os::raw::c_uint = 54;
pub const PDF_ENUM_NAME_Border: ::std::os::raw::c_uint = 55;
pub const PDF_ENUM_NAME_Bounds: ::std::os::raw::c_uint = 56;
pub const PDF_ENUM_NAME_Box: ::std::os::raw::c_uint = 57;
pub const PDF_ENUM_NAME_Bt: ::std::os::raw::c_uint = 58;
pub const PDF_ENUM_NAME_Btn: ::std::os::raw::c_uint = 59;
pub const PDF_ENUM_NAME_Butt: ::std::os::raw::c_uint = 60;
pub const PDF_ENUM_NAME_ByteRange: ::std::os::raw::c_uint = 61;
pub const PDF_ENUM_NAME_C: ::std::os::raw::c_uint = 62;
pub const PDF_ENUM_NAME_C0: ::std::os::raw::c_uint = 63;
pub const PDF_ENUM_NAME_C1: ::std::os::raw::c_uint = 64;
pub const PDF_ENUM_NAME_CA: ::std::os::raw::c_uint = 65;
pub const PDF_ENUM_NAME_CCF: ::std::os::raw::c_uint = 66;
pub const PDF_ENUM_NAME_CCITTFaxDecode: ::std::os::raw::c_uint = 67;
pub const PDF_ENUM_NAME_CF: ::std::os::raw::c_uint = 68;
pub const PDF_ENUM_NAME_CFM: ::std::os::raw::c_uint = 69;
pub const PDF_ENUM_NAME_CI: ::std::os::raw::c_uint = 70;
pub const PDF_ENUM_NAME_CIDFontType0: ::std::os::raw::c_uint = 71;
pub const PDF_ENUM_NAME_CIDFontType0C: ::std::os::raw::c_uint = 72;
pub const PDF_ENUM_NAME_CIDFontType2: ::std::os::raw::c_uint = 73;
pub const PDF_ENUM_NAME_CIDSystemInfo: ::std::os::raw::c_uint = 74;
pub const PDF_ENUM_NAME_CIDToGIDMap: ::std::os::raw::c_uint = 75;
pub const PDF_ENUM_NAME_CMYK: ::std::os::raw::c_uint = 76;
pub const PDF_ENUM_NAME_CS: ::std::os::raw::c_uint = 77;
pub const PDF_ENUM_NAME_CalCMYK: ::std::os::raw::c_uint = 78;
pub const PDF_ENUM_NAME_CalGray: ::std::os::raw::c_uint = 79;
pub const PDF_ENUM_NAME_CalRGB: ::std::os::raw::c_uint = 80;
pub const PDF_ENUM_NAME_CapHeight: ::std::os::raw::c_uint = 81;
pub const PDF_ENUM_NAME_Caret: ::std::os::raw::c_uint = 82;
pub const PDF_ENUM_NAME_Catalog: ::std::os::raw::c_uint = 83;
pub const PDF_ENUM_NAME_Cert: ::std::os::raw::c_uint = 84;
pub const PDF_ENUM_NAME_Ch: ::std::os::raw::c_uint = 85;
pub const PDF_ENUM_NAME_Changes: ::std::os::raw::c_uint = 86;
pub const PDF_ENUM_NAME_CharProcs: ::std::os::raw::c_uint = 87;
pub const PDF_ENUM_NAME_Circle: ::std::os::raw::c_uint = 88;
pub const PDF_ENUM_NAME_ClosedArrow: ::std::os::raw::c_uint = 89;
pub const PDF_ENUM_NAME_Collection: ::std::os::raw::c_uint = 90;
pub const PDF_ENUM_NAME_ColorSpace: ::std::os::raw::c_uint = 91;
pub const PDF_ENUM_NAME_ColorTransform: ::std::os::raw::c_uint = 92;
pub const PDF_ENUM_NAME_Colorants: ::std::os::raw::c_uint = 93;
pub const PDF_ENUM_NAME_Colors: ::std::os::raw::c_uint = 94;
pub const PDF_ENUM_NAME_Columns: ::std::os::raw::c_uint = 95;
pub const PDF_ENUM_NAME_Confidential: ::std::os::raw::c_uint = 96;
pub const PDF_ENUM_NAME_Configs: ::std::os::raw::c_uint = 97;
pub const PDF_ENUM_NAME_ContactInfo: ::std::os::raw::c_uint = 98;
pub const PDF_ENUM_NAME_Contents: ::std::os::raw::c_uint = 99;
pub const PDF_ENUM_NAME_Coords: ::std::os::raw::c_uint = 100;
pub const PDF_ENUM_NAME_Count: ::std::os::raw::c_uint = 101;
pub const PDF_ENUM_NAME_Cover: ::std::os::raw::c_uint = 102;
pub const PDF_ENUM_NAME_CreationDate: ::std::os::raw::c_uint = 103;
pub const PDF_ENUM_NAME_Creator: ::std::os::raw::c_uint = 104;
pub const PDF_ENUM_NAME_CropBox: ::std::os::raw::c_uint = 105;
pub const PDF_ENUM_NAME_Crypt: ::std::os::raw::c_uint = 106;
pub const PDF_ENUM_NAME_D: ::std::os::raw::c_uint = 107;
pub const PDF_ENUM_NAME_DA: ::std::os::raw::c_uint = 108;
pub const PDF_ENUM_NAME_DC: ::std::os::raw::c_uint = 109;
pub const PDF_ENUM_NAME_DCT: ::std::os::raw::c_uint = 110;
pub const PDF_ENUM_NAME_DCTDecode: ::std::os::raw::c_uint = 111;
pub const PDF_ENUM_NAME_DL: ::std::os::raw::c_uint = 112;
pub const PDF_ENUM_NAME_DOS: ::std::os::raw::c_uint = 113;
pub const PDF_ENUM_NAME_DP: ::std::os::raw::c_uint = 114;
pub const PDF_ENUM_NAME_DR: ::std::os::raw::c_uint = 115;
pub const PDF_ENUM_NAME_DS: ::std::os::raw::c_uint = 116;
pub const PDF_ENUM_NAME_DV: ::std::os::raw::c_uint = 117;
pub const PDF_ENUM_NAME_DW: ::std::os::raw::c_uint = 118;
pub const PDF_ENUM_NAME_DW2: ::std::os::raw::c_uint = 119;
pub const PDF_ENUM_NAME_DamagedRowsBeforeError: ::std::os::raw::c_uint = 120;
pub const PDF_ENUM_NAME_Data: ::std::os::raw::c_uint = 121;
pub const PDF_ENUM_NAME_Date: ::std::os::raw::c_uint = 122;
pub const PDF_ENUM_NAME_Decode: ::std::os::raw::c_uint = 123;
pub const PDF_ENUM_NAME_DecodeParms: ::std::os::raw::c_uint = 124;
pub const PDF_ENUM_NAME_Default: ::std::os::raw::c_uint = 125;
pub const PDF_ENUM_NAME_DefaultCMYK: ::std::os::raw::c_uint = 126;
pub const PDF_ENUM_NAME_DefaultGray: ::std::os::raw::c_uint = 127;
pub const PDF_ENUM_NAME_DefaultRGB: ::std::os::raw::c_uint = 128;
pub const PDF_ENUM_NAME_Departmental: ::std::os::raw::c_uint = 129;
pub const PDF_ENUM_NAME_Desc: ::std::os::raw::c_uint = 130;
pub const PDF_ENUM_NAME_DescendantFonts: ::std::os::raw::c_uint = 131;
pub const PDF_ENUM_NAME_Descent: ::std::os::raw::c_uint = 132;
pub const PDF_ENUM_NAME_Design: ::std::os::raw::c_uint = 133;
pub const PDF_ENUM_NAME_Dest: ::std::os::raw::c_uint = 134;
pub const PDF_ENUM_NAME_DestOutputProfile: ::std::os::raw::c_uint = 135;
pub const PDF_ENUM_NAME_Dests: ::std::os::raw::c_uint = 136;
pub const PDF_ENUM_NAME_DeviceCMYK: ::std::os::raw::c_uint = 137;
pub const PDF_ENUM_NAME_DeviceGray: ::std::os::raw::c_uint = 138;
pub const PDF_ENUM_NAME_DeviceN: ::std::os::raw::c_uint = 139;
pub const PDF_ENUM_NAME_DeviceRGB: ::std::os::raw::c_uint = 140;
pub const PDF_ENUM_NAME_Di: ::std::os::raw::c_uint = 141;
pub const PDF_ENUM_NAME_Diamond: ::std::os::raw::c_uint = 142;
pub const PDF_ENUM_NAME_Differences: ::std::os::raw::c_uint = 143;
pub const PDF_ENUM_NAME_DigestLocation: ::std::os::raw::c_uint = 144;
pub const PDF_ENUM_NAME_DigestMethod: ::std::os::raw::c_uint = 145;
pub const PDF_ENUM_NAME_DigestValue: ::std::os::raw::c_uint = 146;
pub const PDF_ENUM_NAME_Dissolve: ::std::os::raw::c_uint = 147;
pub const PDF_ENUM_NAME_Dm: ::std::os::raw::c_uint = 148;
pub const PDF_ENUM_NAME_DocMDP: ::std::os::raw::c_uint = 149;
pub const PDF_ENUM_NAME_Document: ::std::os::raw::c_uint = 150;
pub const PDF_ENUM_NAME_Domain: ::std::os::raw::c_uint = 151;
pub const PDF_ENUM_NAME_Draft: ::std::os::raw::c_uint = 152;
pub const PDF_ENUM_NAME_Dur: ::std::os::raw::c_uint = 153;
pub const PDF_ENUM_NAME_E: ::std::os::raw::c_uint = 154;
pub const PDF_ENUM_NAME_EF: ::std::os::raw::c_uint = 155;
pub const PDF_ENUM_NAME_EarlyChange: ::std::os::raw::c_uint = 156;
pub const PDF_ENUM_NAME_EmbeddedFile: ::std::os::raw::c_uint = 157;
pub const PDF_ENUM_NAME_EmbeddedFiles: ::std::os::raw::c_uint = 158;
pub const PDF_ENUM_NAME_Encode: ::std::os::raw::c_uint = 159;
pub const PDF_ENUM_NAME_EncodedByteAlign: ::std::os::raw::c_uint = 160;
pub const PDF_ENUM_NAME_Encoding: ::std::os::raw::c_uint = 161;
pub const PDF_ENUM_NAME_Encrypt: ::std::os::raw::c_uint = 162;
pub const PDF_ENUM_NAME_EncryptMetadata: ::std::os::raw::c_uint = 163;
pub const PDF_ENUM_NAME_EndOfBlock: ::std::os::raw::c_uint = 164;
pub const PDF_ENUM_NAME_EndOfLine: ::std::os::raw::c_uint = 165;
pub const PDF_ENUM_NAME_Exclude: ::std::os::raw::c_uint = 166;
pub const PDF_ENUM_NAME_Experimental: ::std::os::raw::c_uint = 167;
pub const PDF_ENUM_NAME_Expired: ::std::os::raw::c_uint = 168;
pub const PDF_ENUM_NAME_ExtGState: ::std::os::raw::c_uint = 169;
pub const PDF_ENUM_NAME_Extend: ::std::os::raw::c_uint = 170;
pub const PDF_ENUM_NAME_F: ::std::os::raw::c_uint = 171;
pub const PDF_ENUM_NAME_FL: ::std::os::raw::c_uint = 172;
pub const PDF_ENUM_NAME_FRM: ::std::os::raw::c_uint = 173;
pub const PDF_ENUM_NAME_FS: ::std::os::raw::c_uint = 174;
pub const PDF_ENUM_NAME_FT: ::std::os::raw::c_uint = 175;
pub const PDF_ENUM_NAME_Fade: ::std::os::raw::c_uint = 176;
pub const PDF_ENUM_NAME_Ff: ::std::os::raw::c_uint = 177;
pub const PDF_ENUM_NAME_FieldMDP: ::std::os::raw::c_uint = 178;
pub const PDF_ENUM_NAME_Fields: ::std::os::raw::c_uint = 179;
pub const PDF_ENUM_NAME_FileAttachment: ::std::os::raw::c_uint = 180;
pub const PDF_ENUM_NAME_Filespec: ::std::os::raw::c_uint = 181;
pub const PDF_ENUM_NAME_Filter: ::std::os::raw::c_uint = 182;
pub const PDF_ENUM_NAME_Final: ::std::os::raw::c_uint = 183;
pub const PDF_ENUM_NAME_First: ::std::os::raw::c_uint = 184;
pub const PDF_ENUM_NAME_FirstChar: ::std::os::raw::c_uint = 185;
pub const PDF_ENUM_NAME_FirstPage: ::std::os::raw::c_uint = 186;
pub const PDF_ENUM_NAME_Fit: ::std::os::raw::c_uint = 187;
pub const PDF_ENUM_NAME_FitB: ::std::os::raw::c_uint = 188;
pub const PDF_ENUM_NAME_FitBH: ::std::os::raw::c_uint = 189;
pub const PDF_ENUM_NAME_FitBV: ::std::os::raw::c_uint = 190;
pub const PDF_ENUM_NAME_FitH: ::std::os::raw::c_uint = 191;
pub const PDF_ENUM_NAME_FitR: ::std::os::raw::c_uint = 192;
pub const PDF_ENUM_NAME_FitV: ::std::os::raw::c_uint = 193;
pub const PDF_ENUM_NAME_Fl: ::std::os::raw::c_uint = 194;
pub const PDF_ENUM_NAME_Flags: ::std::os::raw::c_uint = 195;
pub const PDF_ENUM_NAME_FlateDecode: ::std::os::raw::c_uint = 196;
pub const PDF_ENUM_NAME_Fly: ::std::os::raw::c_uint = 197;
pub const PDF_ENUM_NAME_Font: ::std::os::raw::c_uint = 198;
pub const PDF_ENUM_NAME_FontBBox: ::std::os::raw::c_uint = 199;
pub const PDF_ENUM_NAME_FontDescriptor: ::std::os::raw::c_uint = 200;
pub const PDF_ENUM_NAME_FontFile: ::std::os::raw::c_uint = 201;
pub const PDF_ENUM_NAME_FontFile2: ::std::os::raw::c_uint = 202;
pub const PDF_ENUM_NAME_FontFile3: ::std::os::raw::c_uint = 203;
pub const PDF_ENUM_NAME_FontMatrix: ::std::os::raw::c_uint = 204;
pub const PDF_ENUM_NAME_FontName: ::std::os::raw::c_uint = 205;
pub const PDF_ENUM_NAME_ForComment: ::std::os::raw::c_uint = 206;
pub const PDF_ENUM_NAME_ForPublicRelease: ::std::os::raw::c_uint = 207;
pub const PDF_ENUM_NAME_Form: ::std::os::raw::c_uint = 208;
pub const PDF_ENUM_NAME_FormEx: ::std::os::raw::c_uint = 209;
pub const PDF_ENUM_NAME_FormType: ::std::os::raw::c_uint = 210;
pub const PDF_ENUM_NAME_FreeText: ::std::os::raw::c_uint = 211;
pub const PDF_ENUM_NAME_Function: ::std::os::raw::c_uint = 212;
pub const PDF_ENUM_NAME_FunctionType: ::std::os::raw::c_uint = 213;
pub const PDF_ENUM_NAME_Functions: ::std::os::raw::c_uint = 214;
pub const PDF_ENUM_NAME_G: ::std::os::raw::c_uint = 215;
pub const PDF_ENUM_NAME_Gamma: ::std::os::raw::c_uint = 216;
pub const PDF_ENUM_NAME_Glitter: ::std::os::raw::c_uint = 217;
pub const PDF_ENUM_NAME_GoTo: ::std::os::raw::c_uint = 218;
pub const PDF_ENUM_NAME_GoToR: ::std::os::raw::c_uint = 219;
pub const PDF_ENUM_NAME_Group: ::std::os::raw::c_uint = 220;
pub const PDF_ENUM_NAME_H: ::std::os::raw::c_uint = 221;
pub const PDF_ENUM_NAME_Height: ::std::os::raw::c_uint = 222;
pub const PDF_ENUM_NAME_Helv: ::std::os::raw::c_uint = 223;
pub const PDF_ENUM_NAME_Highlight: ::std::os::raw::c_uint = 224;
pub const PDF_ENUM_NAME_I: ::std::os::raw::c_uint = 225;
pub const PDF_ENUM_NAME_IC: ::std::os::raw::c_uint = 226;
pub const PDF_ENUM_NAME_ICCBased: ::std::os::raw::c_uint = 227;
pub const PDF_ENUM_NAME_ID: ::std::os::raw::c_uint = 228;
pub const PDF_ENUM_NAME_IM: ::std::os::raw::c_uint = 229;
pub const PDF_ENUM_NAME_IRT: ::std::os::raw::c_uint = 230;
pub const PDF_ENUM_NAME_Identity: ::std::os::raw::c_uint = 231;
pub const PDF_ENUM_NAME_Identity_H: ::std::os::raw::c_uint = 232;
pub const PDF_ENUM_NAME_Identity_V: ::std::os::raw::c_uint = 233;
pub const PDF_ENUM_NAME_Image: ::std::os::raw::c_uint = 234;
pub const PDF_ENUM_NAME_ImageMask: ::std::os::raw::c_uint = 235;
pub const PDF_ENUM_NAME_Include: ::std::os::raw::c_uint = 236;
pub const PDF_ENUM_NAME_Index: ::std::os::raw::c_uint = 237;
pub const PDF_ENUM_NAME_Indexed: ::std::os::raw::c_uint = 238;
pub const PDF_ENUM_NAME_Info: ::std::os::raw::c_uint = 239;
pub const PDF_ENUM_NAME_Ink: ::std::os::raw::c_uint = 240;
pub const PDF_ENUM_NAME_InkList: ::std::os::raw::c_uint = 241;
pub const PDF_ENUM_NAME_Intent: ::std::os::raw::c_uint = 242;
pub const PDF_ENUM_NAME_Interpolate: ::std::os::raw::c_uint = 243;
pub const PDF_ENUM_NAME_IsMap: ::std::os::raw::c_uint = 244;
pub const PDF_ENUM_NAME_ItalicAngle: ::std::os::raw::c_uint = 245;
pub const PDF_ENUM_NAME_JBIG2Decode: ::std::os::raw::c_uint = 246;
pub const PDF_ENUM_NAME_JBIG2Globals: ::std::os::raw::c_uint = 247;
pub const PDF_ENUM_NAME_JPXDecode: ::std::os::raw::c_uint = 248;
pub const PDF_ENUM_NAME_JS: ::std::os::raw::c_uint = 249;
pub const PDF_ENUM_NAME_JavaScript: ::std::os::raw::c_uint = 250;
pub const PDF_ENUM_NAME_K: ::std::os::raw::c_uint = 251;
pub const PDF_ENUM_NAME_Kids: ::std::os::raw::c_uint = 252;
pub const PDF_ENUM_NAME_L: ::std::os::raw::c_uint = 253;
pub const PDF_ENUM_NAME_LC: ::std::os::raw::c_uint = 254;
pub const PDF_ENUM_NAME_LE: ::std::os::raw::c_uint = 255;
pub const PDF_ENUM_NAME_LJ: ::std::os::raw::c_uint = 256;
pub const PDF_ENUM_NAME_LW: ::std::os::raw::c_uint = 257;
pub const PDF_ENUM_NAME_LZ: ::std::os::raw::c_uint = 258;
pub const PDF_ENUM_NAME_LZW: ::std::os::raw::c_uint = 259;
pub const PDF_ENUM_NAME_LZWDecode: ::std::os::raw::c_uint = 260;
pub const PDF_ENUM_NAME_Lab: ::std::os::raw::c_uint = 261;
pub const PDF_ENUM_NAME_Lang: ::std::os::raw::c_uint = 262;
pub const PDF_ENUM_NAME_Last: ::std::os::raw::c_uint = 263;
pub const PDF_ENUM_NAME_LastChar: ::std::os::raw::c_uint = 264;
pub const PDF_ENUM_NAME_LastPage: ::std::os::raw::c_uint = 265;
pub const PDF_ENUM_NAME_Launch: ::std::os::raw::c_uint = 266;
pub const PDF_ENUM_NAME_Length: ::std::os::raw::c_uint = 267;
pub const PDF_ENUM_NAME_Length1: ::std::os::raw::c_uint = 268;
pub const PDF_ENUM_NAME_Length2: ::std::os::raw::c_uint = 269;
pub const PDF_ENUM_NAME_Length3: ::std::os::raw::c_uint = 270;
pub const PDF_ENUM_NAME_Limits: ::std::os::raw::c_uint = 271;
pub const PDF_ENUM_NAME_Line: ::std::os::raw::c_uint = 272;
pub const PDF_ENUM_NAME_Linearized: ::std::os::raw::c_uint = 273;
pub const PDF_ENUM_NAME_Link: ::std::os::raw::c_uint = 274;
pub const PDF_ENUM_NAME_Location: ::std::os::raw::c_uint = 275;
pub const PDF_ENUM_NAME_Lock: ::std::os::raw::c_uint = 276;
pub const PDF_ENUM_NAME_Locked: ::std::os::raw::c_uint = 277;
pub const PDF_ENUM_NAME_Luminosity: ::std::os::raw::c_uint = 278;
pub const PDF_ENUM_NAME_M: ::std::os::raw::c_uint = 279;
pub const PDF_ENUM_NAME_MCID: ::std::os::raw::c_uint = 280;
pub const PDF_ENUM_NAME_MK: ::std::os::raw::c_uint = 281;
pub const PDF_ENUM_NAME_ML: ::std::os::raw::c_uint = 282;
pub const PDF_ENUM_NAME_MMType1: ::std::os::raw::c_uint = 283;
pub const PDF_ENUM_NAME_Mac: ::std::os::raw::c_uint = 284;
pub const PDF_ENUM_NAME_Mask: ::std::os::raw::c_uint = 285;
pub const PDF_ENUM_NAME_Matrix: ::std::os::raw::c_uint = 286;
pub const PDF_ENUM_NAME_Matte: ::std::os::raw::c_uint = 287;
pub const PDF_ENUM_NAME_MaxLen: ::std::os::raw::c_uint = 288;
pub const PDF_ENUM_NAME_MediaBox: ::std::os::raw::c_uint = 289;
pub const PDF_ENUM_NAME_Metadata: ::std::os::raw::c_uint = 290;
pub const PDF_ENUM_NAME_MissingWidth: ::std::os::raw::c_uint = 291;
pub const PDF_ENUM_NAME_ModDate: ::std::os::raw::c_uint = 292;
pub const PDF_ENUM_NAME_Movie: ::std::os::raw::c_uint = 293;
pub const PDF_ENUM_NAME_Msg: ::std::os::raw::c_uint = 294;
pub const PDF_ENUM_NAME_Multiply: ::std::os::raw::c_uint = 295;
pub const PDF_ENUM_NAME_N: ::std::os::raw::c_uint = 296;
pub const PDF_ENUM_NAME_Name: ::std::os::raw::c_uint = 297;
pub const PDF_ENUM_NAME_Named: ::std::os::raw::c_uint = 298;
pub const PDF_ENUM_NAME_Names: ::std::os::raw::c_uint = 299;
pub const PDF_ENUM_NAME_NewWindow: ::std::os::raw::c_uint = 300;
pub const PDF_ENUM_NAME_Next: ::std::os::raw::c_uint = 301;
pub const PDF_ENUM_NAME_NextPage: ::std::os::raw::c_uint = 302;
pub const PDF_ENUM_NAME_NonEFontNoWarn: ::std::os::raw::c_uint = 303;
pub const PDF_ENUM_NAME_None: ::std::os::raw::c_uint = 304;
pub const PDF_ENUM_NAME_Normal: ::std::os::raw::c_uint = 305;
pub const PDF_ENUM_NAME_NotApproved: ::std::os::raw::c_uint = 306;
pub const PDF_ENUM_NAME_NotForPublicRelease: ::std::os::raw::c_uint = 307;
pub const PDF_ENUM_NAME_Nums: ::std::os::raw::c_uint = 308;
pub const PDF_ENUM_NAME_O: ::std::os::raw::c_uint = 309;
pub const PDF_ENUM_NAME_OC: ::std::os::raw::c_uint = 310;
pub const PDF_ENUM_NAME_OCG: ::std::os::raw::c_uint = 311;
pub const PDF_ENUM_NAME_OCGs: ::std::os::raw::c_uint = 312;
pub const PDF_ENUM_NAME_OCMD: ::std::os::raw::c_uint = 313;
pub const PDF_ENUM_NAME_OCProperties: ::std::os::raw::c_uint = 314;
pub const PDF_ENUM_NAME_OE: ::std::os::raw::c_uint = 315;
pub const PDF_ENUM_NAME_OFF: ::std::os::raw::c_uint = 316;
pub const PDF_ENUM_NAME_ON: ::std::os::raw::c_uint = 317;
pub const PDF_ENUM_NAME_OP: ::std::os::raw::c_uint = 318;
pub const PDF_ENUM_NAME_OPM: ::std::os::raw::c_uint = 319;
pub const PDF_ENUM_NAME_OS: ::std::os::raw::c_uint = 320;
pub const PDF_ENUM_NAME_ObjStm: ::std::os::raw::c_uint = 321;
pub const PDF_ENUM_NAME_Of: ::std::os::raw::c_uint = 322;
pub const PDF_ENUM_NAME_Off: ::std::os::raw::c_uint = 323;
pub const PDF_ENUM_NAME_Open: ::std::os::raw::c_uint = 324;
pub const PDF_ENUM_NAME_OpenArrow: ::std::os::raw::c_uint = 325;
pub const PDF_ENUM_NAME_OpenType: ::std::os::raw::c_uint = 326;
pub const PDF_ENUM_NAME_Opt: ::std::os::raw::c_uint = 327;
pub const PDF_ENUM_NAME_Order: ::std::os::raw::c_uint = 328;
pub const PDF_ENUM_NAME_Ordering: ::std::os::raw::c_uint = 329;
pub const PDF_ENUM_NAME_Outlines: ::std::os::raw::c_uint = 330;
pub const PDF_ENUM_NAME_OutputIntents: ::std::os::raw::c_uint = 331;
pub const PDF_ENUM_NAME_P: ::std::os::raw::c_uint = 332;
pub const PDF_ENUM_NAME_PDF: ::std::os::raw::c_uint = 333;
pub const PDF_ENUM_NAME_PS: ::std::os::raw::c_uint = 334;
pub const PDF_ENUM_NAME_Page: ::std::os::raw::c_uint = 335;
pub const PDF_ENUM_NAME_PageMode: ::std::os::raw::c_uint = 336;
pub const PDF_ENUM_NAME_Pages: ::std::os::raw::c_uint = 337;
pub const PDF_ENUM_NAME_PaintType: ::std::os::raw::c_uint = 338;
pub const PDF_ENUM_NAME_Params: ::std::os::raw::c_uint = 339;
pub const PDF_ENUM_NAME_Parent: ::std::os::raw::c_uint = 340;
pub const PDF_ENUM_NAME_Pattern: ::std::os::raw::c_uint = 341;
pub const PDF_ENUM_NAME_PatternType: ::std::os::raw::c_uint = 342;
pub const PDF_ENUM_NAME_Perms: ::std::os::raw::c_uint = 343;
pub const PDF_ENUM_NAME_PolyLine: ::std::os::raw::c_uint = 344;
pub const PDF_ENUM_NAME_Polygon: ::std::os::raw::c_uint = 345;
pub const PDF_ENUM_NAME_Popup: ::std::os::raw::c_uint = 346;
pub const PDF_ENUM_NAME_PreRelease: ::std::os::raw::c_uint = 347;
pub const PDF_ENUM_NAME_Predictor: ::std::os::raw::c_uint = 348;
pub const PDF_ENUM_NAME_Prev: ::std::os::raw::c_uint = 349;
pub const PDF_ENUM_NAME_PrevPage: ::std::os::raw::c_uint = 350;
pub const PDF_ENUM_NAME_Preview: ::std::os::raw::c_uint = 351;
pub const PDF_ENUM_NAME_Print: ::std::os::raw::c_uint = 352;
pub const PDF_ENUM_NAME_PrinterMark: ::std::os::raw::c_uint = 353;
pub const PDF_ENUM_NAME_ProcSet: ::std::os::raw::c_uint = 354;
pub const PDF_ENUM_NAME_Producer: ::std::os::raw::c_uint = 355;
pub const PDF_ENUM_NAME_Properties: ::std::os::raw::c_uint = 356;
pub const PDF_ENUM_NAME_Prop_AuthTime: ::std::os::raw::c_uint = 357;
pub const PDF_ENUM_NAME_Prop_AuthType: ::std::os::raw::c_uint = 358;
pub const PDF_ENUM_NAME_Prop_Build: ::std::os::raw::c_uint = 359;
pub const PDF_ENUM_NAME_PubSec: ::std::os::raw::c_uint = 360;
pub const PDF_ENUM_NAME_Push: ::std::os::raw::c_uint = 361;
pub const PDF_ENUM_NAME_Q: ::std::os::raw::c_uint = 362;
pub const PDF_ENUM_NAME_QuadPoints: ::std::os::raw::c_uint = 363;
pub const PDF_ENUM_NAME_R: ::std::os::raw::c_uint = 364;
pub const PDF_ENUM_NAME_RBGroups: ::std::os::raw::c_uint = 365;
pub const PDF_ENUM_NAME_RC: ::std::os::raw::c_uint = 366;
pub const PDF_ENUM_NAME_RClosedArrow: ::std::os::raw::c_uint = 367;
pub const PDF_ENUM_NAME_REx: ::std::os::raw::c_uint = 368;
pub const PDF_ENUM_NAME_RGB: ::std::os::raw::c_uint = 369;
pub const PDF_ENUM_NAME_RI: ::std::os::raw::c_uint = 370;
pub const PDF_ENUM_NAME_RL: ::std::os::raw::c_uint = 371;
pub const PDF_ENUM_NAME_ROpenArrow: ::std::os::raw::c_uint = 372;
pub const PDF_ENUM_NAME_Range: ::std::os::raw::c_uint = 373;
pub const PDF_ENUM_NAME_Reason: ::std::os::raw::c_uint = 374;
pub const PDF_ENUM_NAME_Rect: ::std::os::raw::c_uint = 375;
pub const PDF_ENUM_NAME_Redact: ::std::os::raw::c_uint = 376;
pub const PDF_ENUM_NAME_Ref: ::std::os::raw::c_uint = 377;
pub const PDF_ENUM_NAME_Reference: ::std::os::raw::c_uint = 378;
pub const PDF_ENUM_NAME_Registry: ::std::os::raw::c_uint = 379;
pub const PDF_ENUM_NAME_ResetForm: ::std::os::raw::c_uint = 380;
pub const PDF_ENUM_NAME_Resources: ::std::os::raw::c_uint = 381;
pub const PDF_ENUM_NAME_Root: ::std::os::raw::c_uint = 382;
pub const PDF_ENUM_NAME_Rotate: ::std::os::raw::c_uint = 383;
pub const PDF_ENUM_NAME_Rows: ::std::os::raw::c_uint = 384;
pub const PDF_ENUM_NAME_RunLengthDecode: ::std::os::raw::c_uint = 385;
pub const PDF_ENUM_NAME_S: ::std::os::raw::c_uint = 386;
pub const PDF_ENUM_NAME_SMask: ::std::os::raw::c_uint = 387;
pub const PDF_ENUM_NAME_SMaskInData: ::std::os::raw::c_uint = 388;
pub const PDF_ENUM_NAME_Schema: ::std::os::raw::c_uint = 389;
pub const PDF_ENUM_NAME_Screen: ::std::os::raw::c_uint = 390;
pub const PDF_ENUM_NAME_Separation: ::std::os::raw::c_uint = 391;
pub const PDF_ENUM_NAME_Shading: ::std::os::raw::c_uint = 392;
pub const PDF_ENUM_NAME_ShadingType: ::std::os::raw::c_uint = 393;
pub const PDF_ENUM_NAME_Si: ::std::os::raw::c_uint = 394;
pub const PDF_ENUM_NAME_Sig: ::std::os::raw::c_uint = 395;
pub const PDF_ENUM_NAME_SigFlags: ::std::os::raw::c_uint = 396;
pub const PDF_ENUM_NAME_SigQ: ::std::os::raw::c_uint = 397;
pub const PDF_ENUM_NAME_SigRef: ::std::os::raw::c_uint = 398;
pub const PDF_ENUM_NAME_Size: ::std::os::raw::c_uint = 399;
pub const PDF_ENUM_NAME_Slash: ::std::os::raw::c_uint = 400;
pub const PDF_ENUM_NAME_Sold: ::std::os::raw::c_uint = 401;
pub const PDF_ENUM_NAME_Sound: ::std::os::raw::c_uint = 402;
pub const PDF_ENUM_NAME_Split: ::std::os::raw::c_uint = 403;
pub const PDF_ENUM_NAME_Square: ::std::os::raw::c_uint = 404;
pub const PDF_ENUM_NAME_Squiggly: ::std::os::raw::c_uint = 405;
pub const PDF_ENUM_NAME_Stamp: ::std::os::raw::c_uint = 406;
pub const PDF_ENUM_NAME_Standard: ::std::os::raw::c_uint = 407;
pub const PDF_ENUM_NAME_StdCF: ::std::os::raw::c_uint = 408;
pub const PDF_ENUM_NAME_StemV: ::std::os::raw::c_uint = 409;
pub const PDF_ENUM_NAME_StmF: ::std::os::raw::c_uint = 410;
pub const PDF_ENUM_NAME_StrF: ::std::os::raw::c_uint = 411;
pub const PDF_ENUM_NAME_StrikeOut: ::std::os::raw::c_uint = 412;
pub const PDF_ENUM_NAME_StructParent: ::std::os::raw::c_uint = 413;
pub const PDF_ENUM_NAME_StructParents: ::std::os::raw::c_uint = 414;
pub const PDF_ENUM_NAME_SubFilter: ::std::os::raw::c_uint = 415;
pub const PDF_ENUM_NAME_Subtype: ::std::os::raw::c_uint = 416;
pub const PDF_ENUM_NAME_Subtype2: ::std::os::raw::c_uint = 417;
pub const PDF_ENUM_NAME_Supplement: ::std::os::raw::c_uint = 418;
pub const PDF_ENUM_NAME_Symb: ::std::os::raw::c_uint = 419;
pub const PDF_ENUM_NAME_T: ::std::os::raw::c_uint = 420;
pub const PDF_ENUM_NAME_TI: ::std::os::raw::c_uint = 421;
pub const PDF_ENUM_NAME_TR: ::std::os::raw::c_uint = 422;
pub const PDF_ENUM_NAME_TR2: ::std::os::raw::c_uint = 423;
pub const PDF_ENUM_NAME_TU: ::std::os::raw::c_uint = 424;
pub const PDF_ENUM_NAME_Text: ::std::os::raw::c_uint = 425;
pub const PDF_ENUM_NAME_TilingType: ::std::os::raw::c_uint = 426;
pub const PDF_ENUM_NAME_Times: ::std::os::raw::c_uint = 427;
pub const PDF_ENUM_NAME_Title: ::std::os::raw::c_uint = 428;
pub const PDF_ENUM_NAME_ToUnicode: ::std::os::raw::c_uint = 429;
pub const PDF_ENUM_NAME_TopSecret: ::std::os::raw::c_uint = 430;
pub const PDF_ENUM_NAME_Trans: ::std::os::raw::c_uint = 431;
pub const PDF_ENUM_NAME_TransformMethod: ::std::os::raw::c_uint = 432;
pub const PDF_ENUM_NAME_TransformParams: ::std::os::raw::c_uint = 433;
pub const PDF_ENUM_NAME_Transparency: ::std::os::raw::c_uint = 434;
pub const PDF_ENUM_NAME_TrapNet: ::std::os::raw::c_uint = 435;
pub const PDF_ENUM_NAME_TrimBox: ::std::os::raw::c_uint = 436;
pub const PDF_ENUM_NAME_TrueType: ::std::os::raw::c_uint = 437;
pub const PDF_ENUM_NAME_TrustedMode: ::std::os::raw::c_uint = 438;
pub const PDF_ENUM_NAME_Tx: ::std::os::raw::c_uint = 439;
pub const PDF_ENUM_NAME_Type: ::std::os::raw::c_uint = 440;
pub const PDF_ENUM_NAME_Type0: ::std::os::raw::c_uint = 441;
pub const PDF_ENUM_NAME_Type1: ::std::os::raw::c_uint = 442;
pub const PDF_ENUM_NAME_Type1C: ::std::os::raw::c_uint = 443;
pub const PDF_ENUM_NAME_Type3: ::std::os::raw::c_uint = 444;
pub const PDF_ENUM_NAME_U: ::std::os::raw::c_uint = 445;
pub const PDF_ENUM_NAME_UE: ::std::os::raw::c_uint = 446;
pub const PDF_ENUM_NAME_UF: ::std::os::raw::c_uint = 447;
pub const PDF_ENUM_NAME_URI: ::std::os::raw::c_uint = 448;
pub const PDF_ENUM_NAME_URL: ::std::os::raw::c_uint = 449;
pub const PDF_ENUM_NAME_Unchanged: ::std::os::raw::c_uint = 450;
pub const PDF_ENUM_NAME_Uncover: ::std::os::raw::c_uint = 451;
pub const PDF_ENUM_NAME_Underline: ::std::os::raw::c_uint = 452;
pub const PDF_ENUM_NAME_Unix: ::std::os::raw::c_uint = 453;
pub const PDF_ENUM_NAME_Usage: ::std::os::raw::c_uint = 454;
pub const PDF_ENUM_NAME_UseBlackPtComp: ::std::os::raw::c_uint = 455;
pub const PDF_ENUM_NAME_UseCMap: ::std::os::raw::c_uint = 456;
pub const PDF_ENUM_NAME_UseOutlines: ::std::os::raw::c_uint = 457;
pub const PDF_ENUM_NAME_UserUnit: ::std::os::raw::c_uint = 458;
pub const PDF_ENUM_NAME_V: ::std::os::raw::c_uint = 459;
pub const PDF_ENUM_NAME_V2: ::std::os::raw::c_uint = 460;
pub const PDF_ENUM_NAME_VE: ::std::os::raw::c_uint = 461;
pub const PDF_ENUM_NAME_Version: ::std::os::raw::c_uint = 462;
pub const PDF_ENUM_NAME_Vertices: ::std::os::raw::c_uint = 463;
pub const PDF_ENUM_NAME_VerticesPerRow: ::std::os::raw::c_uint = 464;
pub const PDF_ENUM_NAME_View: ::std::os::raw::c_uint = 465;
pub const PDF_ENUM_NAME_W: ::std::os::raw::c_uint = 466;
pub const PDF_ENUM_NAME_W2: ::std::os::raw::c_uint = 467;
pub const PDF_ENUM_NAME_WMode: ::std::os::raw::c_uint = 468;
pub const PDF_ENUM_NAME_Watermark: ::std::os::raw::c_uint = 469;
pub const PDF_ENUM_NAME_WhitePoint: ::std::os::raw::c_uint = 470;
pub const PDF_ENUM_NAME_Widget: ::std::os::raw::c_uint = 471;
pub const PDF_ENUM_NAME_Width: ::std::os::raw::c_uint = 472;
pub const PDF_ENUM_NAME_Widths: ::std::os::raw::c_uint = 473;
pub const PDF_ENUM_NAME_WinAnsiEncoding: ::std::os::raw::c_uint = 474;
pub const PDF_ENUM_NAME_Wipe: ::std::os::raw::c_uint = 475;
pub const PDF_ENUM_NAME_XFA: ::std::os::raw::c_uint = 476;
pub const PDF_ENUM_NAME_XHeight: ::std::os::raw::c_uint = 477;
pub const PDF_ENUM_NAME_XML: ::std::os::raw::c_uint = 478;
pub const PDF_ENUM_NAME_XObject: ::std::os::raw::c_uint = 479;
pub const PDF_ENUM_NAME_XRef: ::std::os::raw::c_uint = 480;
pub const PDF_ENUM_NAME_XRefStm: ::std::os::raw::c_uint = 481;
pub const PDF_ENUM_NAME_XStep: ::std::os::raw::c_uint = 482;
pub const PDF_ENUM_NAME_XYZ: ::std::os::raw::c_uint = 483;
pub const PDF_ENUM_NAME_YStep: ::std::os::raw::c_uint = 484;
pub const PDF_ENUM_NAME_Yes: ::std::os::raw::c_uint = 485;
pub const PDF_ENUM_NAME_ZaDb: ::std::os::raw::c_uint = 486;
pub const PDF_ENUM_NAME_adbe_pkcs7_detached: ::std::os::raw::c_uint = 487;
pub const PDF_ENUM_NAME_ca: ::std::os::raw::c_uint = 488;
pub const PDF_ENUM_NAME_n0: ::std::os::raw::c_uint = 489;
pub const PDF_ENUM_NAME_n1: ::std::os::raw::c_uint = 490;
pub const PDF_ENUM_NAME_n2: ::std::os::raw::c_uint = 491;
pub const PDF_ENUM_NAME_op: ::std::os::raw::c_uint = 492;
pub const PDF_ENUM_LIMIT: ::std::os::raw::c_uint = 493;
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);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_ocg_descriptor {
_unused: [u8; 0],
}
pub type pdf_widget = pdf_annot;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_js {
_unused: [u8; 0],
}
pub const PDF_LEXBUF_SMALL: ::std::os::raw::c_uint = 256;
pub const PDF_LEXBUF_LARGE: ::std::os::raw::c_uint = 65536;
pub type _bindgen_ty_25 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(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() {
assert_eq!(
::std::mem::size_of::<pdf_lexbuf>(),
284usize,
concat!("Size of: ", stringify!(pdf_lexbuf))
);
assert_eq!(
::std::mem::align_of::<pdf_lexbuf>(),
4usize,
concat!("Alignment of ", stringify!(pdf_lexbuf))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).size as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).base_size as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(base_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).len as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).i as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(i)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).f as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(f)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).scratch as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(scratch)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf>())).buffer as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf),
"::",
stringify!(buffer)
)
);
}
#[repr(C)]
#[derive(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() {
assert_eq!(
::std::mem::size_of::<pdf_lexbuf_large>(),
65564usize,
concat!("Size of: ", stringify!(pdf_lexbuf_large))
);
assert_eq!(
::std::mem::align_of::<pdf_lexbuf_large>(),
4usize,
concat!("Alignment of ", stringify!(pdf_lexbuf_large))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf_large>())).base as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_lexbuf_large),
"::",
stringify!(base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_lexbuf_large>())).buffer as *const _ as usize },
284usize,
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,
event: *mut pdf_doc_event,
data: *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_count_layer_configs(
ctx: *mut fz_context,
doc: *mut pdf_document,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_invalidate_xfa(ctx: *mut fz_context, doc: *mut pdf_document);
}
#[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() {
assert_eq!(
::std::mem::size_of::<pdf_layer_config>(),
8usize,
concat!("Size of: ", stringify!(pdf_layer_config))
);
assert_eq!(
::std::mem::align_of::<pdf_layer_config>(),
4usize,
concat!("Alignment of ", stringify!(pdf_layer_config))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config>())).creator as *const _ as usize },
4usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_layer_config_ui>(),
20usize,
concat!("Size of: ", stringify!(pdf_layer_config_ui))
);
assert_eq!(
::std::mem::align_of::<pdf_layer_config_ui>(),
4usize,
concat!("Alignment of ", stringify!(pdf_layer_config_ui))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config_ui>())).text as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config_ui>())).depth as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(depth)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config_ui>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config_ui>())).selected as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_layer_config_ui),
"::",
stringify!(selected)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_layer_config_ui>())).locked as *const _ as usize },
16usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_unsaved_sig>(),
28usize,
concat!("Size of: ", stringify!(pdf_unsaved_sig))
);
assert_eq!(
::std::mem::align_of::<pdf_unsaved_sig>(),
4usize,
concat!("Alignment of ", stringify!(pdf_unsaved_sig))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).field as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(field)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_unsaved_sig>())).byte_range_start as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(byte_range_start)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).byte_range_end as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(byte_range_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).contents_start as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(contents_start)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).contents_end as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(contents_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).signer as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_unsaved_sig),
"::",
stringify!(signer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_unsaved_sig>())).next as *const _ as usize },
24usize,
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() {
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::null::<pdf_rev_page_map>())).page as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_rev_page_map),
"::",
stringify!(page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_rev_page_map>())).object as *const _ 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() {
assert_eq!(
::std::mem::size_of::<pdf_hint_page>(),
20usize,
concat!("Size of: ", stringify!(pdf_hint_page))
);
assert_eq!(
::std::mem::align_of::<pdf_hint_page>(),
4usize,
concat!("Alignment of ", stringify!(pdf_hint_page))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hint_page>())).number as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_page),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hint_page>())).offset as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_page),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hint_page>())).index as *const _ as usize },
12usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_hint_shared>(),
12usize,
concat!("Size of: ", stringify!(pdf_hint_shared))
);
assert_eq!(
::std::mem::align_of::<pdf_hint_shared>(),
4usize,
concat!("Alignment of ", stringify!(pdf_hint_shared))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hint_shared>())).number as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_shared),
"::",
stringify!(number)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hint_shared>())).offset as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_hint_shared),
"::",
stringify!(offset)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xfa_entry {
pub key: *mut ::std::os::raw::c_char,
pub value: *mut fz_xml_doc,
}
#[test]
fn bindgen_test_layout_pdf_xfa_entry() {
assert_eq!(
::std::mem::size_of::<pdf_xfa_entry>(),
8usize,
concat!("Size of: ", stringify!(pdf_xfa_entry))
);
assert_eq!(
::std::mem::align_of::<pdf_xfa_entry>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xfa_entry))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xfa_entry>())).key as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xfa_entry),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xfa_entry>())).value as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xfa_entry),
"::",
stringify!(value)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_xfa {
pub count: ::std::os::raw::c_int,
pub entries: *mut pdf_xfa_entry,
}
#[test]
fn bindgen_test_layout_pdf_xfa() {
assert_eq!(
::std::mem::size_of::<pdf_xfa>(),
8usize,
concat!("Size of: ", stringify!(pdf_xfa))
);
assert_eq!(
::std::mem::align_of::<pdf_xfa>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xfa))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xfa>())).count as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xfa),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xfa>())).entries as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xfa),
"::",
stringify!(entries)
)
);
}
#[repr(C)]
#[derive(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 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 has_xref_streams: ::std::os::raw::c_int,
pub has_old_style_xrefs: ::std::os::raw::c_int,
pub has_linearization_object: ::std::os::raw::c_int,
pub rev_page_count: ::std::os::raw::c_int,
pub rev_page_map: *mut pdf_rev_page_map,
pub repair_attempted: ::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 dirty: ::std::os::raw::c_int,
pub redacted: ::std::os::raw::c_int,
pub event_cb: pdf_doc_event_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: pdf_xfa,
}
#[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() {
assert_eq!(
::std::mem::size_of::<pdf_document__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(pdf_document__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<pdf_document__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(pdf_document__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document__bindgen_ty_1>())).fonts as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_document__bindgen_ty_1),
"::",
stringify!(fonts)
)
);
}
#[test]
fn bindgen_test_layout_pdf_document() {
assert_eq!(
::std::mem::size_of::<pdf_document>(),
65876usize,
concat!("Size of: ", stringify!(pdf_document))
);
assert_eq!(
::std::mem::align_of::<pdf_document>(),
4usize,
concat!("Alignment of ", stringify!(pdf_document))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).super_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(super_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).file as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).version as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).startxref as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(startxref)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).file_size as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).crypt as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(crypt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).ocg as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(ocg)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).oi as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(oi)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).max_xref_len as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(max_xref_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).num_xref_sections as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_xref_sections)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).saved_num_xref_sections as *const _ as usize
},
120usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(saved_num_xref_sections)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).num_incremental_sections as *const _ as usize
},
124usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_incremental_sections)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).xref_base as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_base)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).disallow_new_increments as *const _ as usize
},
132usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(disallow_new_increments)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).xref_sections as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_sections)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).saved_xref_sections as *const _ as usize
},
140usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(saved_xref_sections)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).xref_index as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xref_index)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).save_in_progress as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(save_in_progress)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).has_xref_streams as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(has_xref_streams)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).has_old_style_xrefs as *const _ as usize
},
156usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(has_old_style_xrefs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).has_linearization_object as *const _ as usize
},
160usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(has_linearization_object)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).rev_page_count as *const _ as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(rev_page_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).rev_page_map as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(rev_page_map)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).repair_attempted as *const _ as usize },
172usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(repair_attempted)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).file_reading_linearly as *const _ as usize
},
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_reading_linearly)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).file_length as *const _ as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(file_length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).linear_page_count as *const _ as usize },
188usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).linear_obj as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_obj)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).linear_page_refs as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_refs)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).linear_page1_obj_num as *const _ as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page1_obj_num)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).linear_pos as *const _ as usize },
204usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_pos)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).linear_page_num as *const _ as usize },
212usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(linear_page_num)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_object_offset as *const _ as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_object_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_object_length as *const _ as usize },
220usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_object_length)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hints_loaded as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hints_loaded)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_page as *const _ as usize },
228usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_shared_ref as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_shared_ref)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_shared as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_shared)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).hint_obj_offsets_max as *const _ as usize
},
240usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_obj_offsets_max)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).hint_obj_offsets as *const _ as usize },
244usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(hint_obj_offsets)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_document>())).resources_localised as *const _ as usize
},
248usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(resources_localised)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).lexbuf as *const _ as usize },
252usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(lexbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).js as *const _ as usize },
65816usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(js)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).recalculate as *const _ as usize },
65820usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(recalculate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).dirty as *const _ as usize },
65824usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(dirty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).redacted as *const _ as usize },
65828usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(redacted)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).event_cb as *const _ as usize },
65832usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(event_cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).event_cb_data as *const _ as usize },
65836usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(event_cb_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).num_type3_fonts as *const _ as usize },
65840usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(num_type3_fonts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).max_type3_fonts as *const _ as usize },
65844usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(max_type3_fonts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).type3_fonts as *const _ as usize },
65848usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(type3_fonts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).resources as *const _ as usize },
65852usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(resources)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).orphans_max as *const _ as usize },
65856usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans_max)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).orphans_count as *const _ as usize },
65860usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans_count)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).orphans as *const _ as usize },
65864usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(orphans)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_document>())).xfa as *const _ as usize },
65868usize,
concat!(
"Offset of field: ",
stringify!(pdf_document),
"::",
stringify!(xfa)
)
);
}
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_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_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(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 permissions: ::std::os::raw::c_int,
pub opwd_utf8: [::std::os::raw::c_char; 128usize],
pub upwd_utf8: [::std::os::raw::c_char; 128usize],
}
#[test]
fn bindgen_test_layout_pdf_write_options() {
assert_eq!(
::std::mem::size_of::<pdf_write_options>(),
312usize,
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::null::<pdf_write_options>())).do_incremental as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_incremental)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_pretty as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_pretty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_ascii as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_ascii)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_compress as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_write_options>())).do_compress_images as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress_images)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_write_options>())).do_compress_fonts as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_compress_fonts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_decompress as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_decompress)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_garbage as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_garbage)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_linear as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_linear)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_clean as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_clean)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_sanitize as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_sanitize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_appearance as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_appearance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).do_encrypt as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(do_encrypt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).permissions as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(permissions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).opwd_utf8 as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(opwd_utf8)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_write_options>())).upwd_utf8 as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_write_options),
"::",
stringify!(upwd_utf8)
)
);
}
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: *mut 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: *mut pdf_write_options,
);
}
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;
}
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_NUM_TOKENS: pdf_token = 24;
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,
buf: *mut pdf_lexbuf,
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_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_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() {
assert_eq!(
::std::mem::size_of::<pdf_xref_entry>(),
32usize,
concat!("Size of: ", stringify!(pdf_xref_entry))
);
assert_eq!(
::std::mem::align_of::<pdf_xref_entry>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xref_entry))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).marked as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(marked)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).gen as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(gen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).num as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(num)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).ofs as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(ofs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).stm_ofs as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(stm_ofs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).stm_buf as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_entry),
"::",
stringify!(stm_buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_entry>())).obj as *const _ as usize },
28usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_xref_subsec>(),
16usize,
concat!("Size of: ", stringify!(pdf_xref_subsec))
);
assert_eq!(
::std::mem::align_of::<pdf_xref_subsec>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xref_subsec))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_subsec>())).next as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_subsec>())).len as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_subsec>())).start as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref_subsec),
"::",
stringify!(start)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref_subsec>())).table as *const _ as usize },
12usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_xref>(),
32usize,
concat!("Size of: ", stringify!(pdf_xref))
);
assert_eq!(
::std::mem::align_of::<pdf_xref>(),
4usize,
concat!("Alignment of ", stringify!(pdf_xref))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).num_objects as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(num_objects)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).subsec as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(subsec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).trailer as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(trailer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).pre_repair_trailer as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(pre_repair_trailer)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).unsaved_sigs as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(unsaved_sigs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).unsaved_sigs_end as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(unsaved_sigs_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xref>())).end_ofs as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_xref),
"::",
stringify!(end_ofs)
)
);
}
extern "C" {
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" {
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" {
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,
) -> *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_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_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_xref_ensure_incremental_object(
ctx: *mut fz_context,
doc: *mut pdf_document,
num: ::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_obj_is_unsaved_signature(
doc: *mut pdf_document,
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_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_widget,
) -> ::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;
}
pub const PDF_ENCRYPT_KEEP: ::std::os::raw::c_uint = 0;
pub const PDF_ENCRYPT_NONE: ::std::os::raw::c_uint = 1;
pub const PDF_ENCRYPT_RC4_40: ::std::os::raw::c_uint = 2;
pub const PDF_ENCRYPT_RC4_128: ::std::os::raw::c_uint = 3;
pub const PDF_ENCRYPT_AES_128: ::std::os::raw::c_uint = 4;
pub const PDF_ENCRYPT_AES_256: ::std::os::raw::c_uint = 5;
pub const PDF_ENCRYPT_UNKNOWN: ::std::os::raw::c_uint = 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,
) -> *mut ::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,
digest_offset: usize,
digest_length: usize,
signer: *mut pdf_pkcs7_signer,
);
}
pub const PDF_PERM_PRINT: ::std::os::raw::c_uint = 4;
pub const PDF_PERM_MODIFY: ::std::os::raw::c_uint = 8;
pub const PDF_PERM_COPY: ::std::os::raw::c_uint = 16;
pub const PDF_PERM_ANNOTATE: ::std::os::raw::c_uint = 32;
pub const PDF_PERM_FORM: ::std::os::raw::c_uint = 256;
pub const PDF_PERM_ACCESSIBILITY: ::std::os::raw::c_uint = 512;
pub const PDF_PERM_ASSEMBLE: ::std::os::raw::c_uint = 1024;
pub const PDF_PERM_PRINT_HQ: ::std::os::raw::c_uint = 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_sign_signature(
ctx: *mut fz_context,
widget: *mut pdf_widget,
signer: *mut pdf_pkcs7_signer,
);
}
extern "C" {
pub fn pdf_clear_signature(ctx: *mut fz_context, widget: *mut pdf_widget);
}
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() {
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::null::<pdf_range>())).low as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_range),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_range>())).high as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_range),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_range>())).out as *const _ 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() {
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::null::<pdf_xrange>())).low as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_xrange),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xrange>())).high as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_xrange),
"::",
stringify!(high)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_xrange>())).out as *const _ 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() {
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::null::<pdf_mrange>())).low as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mrange),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mrange>())).out as *const _ 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(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() {
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::null::<pdf_cmap__bindgen_ty_1>())).n as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap__bindgen_ty_1>())).low as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap__bindgen_ty_1>())).high as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap__bindgen_ty_1),
"::",
stringify!(high)
)
);
}
#[test]
fn bindgen_test_layout_pdf_cmap() {
assert_eq!(
::std::mem::size_of::<pdf_cmap>(),
628usize,
concat!("Size of: ", stringify!(pdf_cmap))
);
assert_eq!(
::std::mem::align_of::<pdf_cmap>(),
4usize,
concat!("Alignment of ", stringify!(pdf_cmap))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).cmap_name as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(cmap_name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).usecmap_name as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(usecmap_name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).usecmap as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(usecmap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).wmode as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).codespace_len as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(codespace_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).codespace as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(codespace)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).rlen as *const _ as usize },
564usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(rlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).rcap as *const _ as usize },
568usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(rcap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).ranges as *const _ as usize },
572usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(ranges)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).xlen as *const _ as usize },
576usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).xcap as *const _ as usize },
580usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xcap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).xranges as *const _ as usize },
584usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(xranges)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).mlen as *const _ as usize },
588usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).mcap as *const _ as usize },
592usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mcap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).mranges as *const _ as usize },
596usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(mranges)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).dlen as *const _ as usize },
600usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).dcap as *const _ as usize },
604usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dcap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).dict as *const _ as usize },
608usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(dict)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).tlen as *const _ as usize },
612usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(tlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).tcap as *const _ as usize },
616usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(tcap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).ttop as *const _ as usize },
620usize,
concat!(
"Offset of field: ",
stringify!(pdf_cmap),
"::",
stringify!(ttop)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_cmap>())).tree as *const _ as usize },
624usize,
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: ::std::os::raw::c_uint = 1;
pub const PDF_FD_SERIF: ::std::os::raw::c_uint = 2;
pub const PDF_FD_SYMBOLIC: ::std::os::raw::c_uint = 4;
pub const PDF_FD_SCRIPT: ::std::os::raw::c_uint = 8;
pub const PDF_FD_NONSYMBOLIC: ::std::os::raw::c_uint = 32;
pub const PDF_FD_ITALIC: ::std::os::raw::c_uint = 64;
pub const PDF_FD_ALL_CAP: ::std::os::raw::c_uint = 65536;
pub const PDF_FD_SMALL_CAP: ::std::os::raw::c_uint = 131072;
pub const PDF_FD_FORCE_BOLD: ::std::os::raw::c_uint = 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() {
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::null::<pdf_hmtx>())).lo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_hmtx),
"::",
stringify!(lo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hmtx>())).hi as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_hmtx),
"::",
stringify!(hi)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_hmtx>())).w as *const _ 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() {
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::null::<pdf_vmtx>())).lo as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(lo)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_vmtx>())).hi as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(hi)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_vmtx>())).x as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_vmtx>())).y as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(pdf_vmtx),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_vmtx>())).w as *const _ 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,
}
#[test]
fn bindgen_test_layout_pdf_font_desc() {
assert_eq!(
::std::mem::size_of::<pdf_font_desc>(),
124usize,
concat!("Size of: ", stringify!(pdf_font_desc))
);
assert_eq!(
::std::mem::align_of::<pdf_font_desc>(),
4usize,
concat!("Alignment of ", stringify!(pdf_font_desc))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).font as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).flags as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).italic_angle as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(italic_angle)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).ascent as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(ascent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).descent as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(descent)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).cap_height as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cap_height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).x_height as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(x_height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).missing_width as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(missing_width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).encoding as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(encoding)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).to_ttf_cmap as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(to_ttf_cmap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).cid_to_gid_len as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_gid_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).cid_to_gid as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).to_unicode as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(to_unicode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).cid_to_ucs_len as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_ucs_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).cid_to_ucs as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(cid_to_ucs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).wmode as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(wmode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).hmtx_len as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).hmtx_cap as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).dhmtx as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(dhmtx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).hmtx as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(hmtx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).vmtx_len as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).vmtx_cap as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx_cap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).dvmtx as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(dvmtx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).vmtx as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(vmtx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_font_desc>())).is_embedded as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(pdf_font_desc),
"::",
stringify!(is_embedded)
)
);
}
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_font_writing_supported(font: *mut fz_font) -> ::std::os::raw::c_int;
}
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);
}
pub const PDF_SIMPLE_FONT_RESOURCE: ::std::os::raw::c_uint = 1;
pub const PDF_CID_FONT_RESOURCE: ::std::os::raw::c_uint = 2;
pub const PDF_CJK_FONT_RESOURCE: ::std::os::raw::c_uint = 3;
pub type _bindgen_ty_29 = ::std::os::raw::c_uint;
pub const PDF_SIMPLE_ENCODING_LATIN: ::std::os::raw::c_uint = 0;
pub const PDF_SIMPLE_ENCODING_GREEK: ::std::os::raw::c_uint = 1;
pub const PDF_SIMPLE_ENCODING_CYRILLIC: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_30 = ::std::os::raw::c_uint;
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,
md5: *mut ::std::os::raw::c_uchar,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_insert_font_resource(
ctx: *mut fz_context,
doc: *mut pdf_document,
md5: *mut ::std::os::raw::c_uchar,
obj: *mut pdf_obj,
) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_drop_resource_tables(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_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() {
assert_eq!(
::std::mem::size_of::<pdf_pattern>(),
76usize,
concat!("Size of: ", stringify!(pdf_pattern))
);
assert_eq!(
::std::mem::align_of::<pdf_pattern>(),
4usize,
concat!("Alignment of ", stringify!(pdf_pattern))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).storable as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(storable)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).ismask as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(ismask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).xstep as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(xstep)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).ystep as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(ystep)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).matrix as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(matrix)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).bbox as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).document as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(document)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).resources as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(resources)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).contents as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(pdf_pattern),
"::",
stringify!(contents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pattern>())).id as *const _ as usize },
72usize,
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_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 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 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,
page_resources: *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,
page_resources: *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() {
assert_eq!(
::std::mem::size_of::<pdf_processor>(),
352usize,
concat!("Size of: ", stringify!(pdf_processor))
);
assert_eq!(
::std::mem::align_of::<pdf_processor>(),
4usize,
concat!("Alignment of ", stringify!(pdf_processor))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).close_processor as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(close_processor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).drop_processor as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(drop_processor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_w as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_w)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_j as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_j)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_J as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_J)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_M as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_M)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_d as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_ri as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_ri)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_i as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_i)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_begin as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_begin)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_BM as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_BM)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_ca as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_ca)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_CA as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_CA)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_SMask as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_SMask)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_end as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_q as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_q)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Q as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Q)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_cm as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_cm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_m as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_m)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_l as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_l)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_c as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_c)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_v as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_v)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_y as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_h as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_h)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_re as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_re)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_S as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_S)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_s as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_s)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_F as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_F)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_f as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_f)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_fstar as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_fstar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_B as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_B)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Bstar as *const _ as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Bstar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_b as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_b)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_bstar as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_bstar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_n as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_n)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_W as *const _ as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_W)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Wstar as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Wstar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_BT as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BT)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_ET as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_ET)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tc as *const _ as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tw as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tw)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tz as *const _ as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tz)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_TL as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TL)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tf as *const _ as usize },
172usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tr as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Ts as *const _ as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Ts)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Td as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Td)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_TD as *const _ as usize },
188usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TD)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tm as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tstar as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tstar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_TJ as *const _ as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_TJ)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Tj as *const _ as usize },
204usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Tj)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_squote as *const _ as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_squote)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_dquote as *const _ as usize },
212usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_dquote)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_d0 as *const _ as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_d1 as *const _ as usize },
220usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_d1)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_CS as *const _ as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_CS)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_cs as *const _ as usize },
228usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_cs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_SC_pattern as *const _ as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_pattern)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_sc_pattern as *const _ as usize },
236usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_pattern)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_SC_shade as *const _ as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_shade)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_sc_shade as *const _ as usize },
244usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_shade)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_SC_color as *const _ as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_SC_color)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_sc_color as *const _ as usize },
252usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sc_color)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_G as *const _ as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_G)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_g as *const _ as usize },
260usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_g)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_RG as *const _ as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_RG)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_rg as *const _ as usize },
268usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_rg)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_K as *const _ as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_K)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_k as *const _ as usize },
276usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_k)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_BI as *const _ as usize },
280usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BI)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_sh as *const _ as usize },
284usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_sh)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Do_image as *const _ as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Do_image)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_Do_form as *const _ as usize },
292usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_Do_form)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_MP as *const _ as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_MP)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_DP as *const _ as usize },
300usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_DP)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_BMC as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BMC)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_BDC as *const _ as usize },
308usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BDC)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_EMC as *const _ as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_EMC)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_BX as *const _ as usize },
316usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_BX)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_EX as *const _ as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_EX)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_OP as *const _ as usize },
324usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_OP)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_op as *const _ as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_op)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_gs_OPM as *const _ as usize },
332usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_OPM)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_processor>())).op_gs_UseBlackPtComp as *const _ as usize
},
336usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_gs_UseBlackPtComp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).op_END as *const _ as usize },
340usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(op_END)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).usage as *const _ as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(usage)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_processor>())).hidden as *const _ as usize },
348usize,
concat!(
"Offset of field: ",
stringify!(pdf_processor),
"::",
stringify!(hidden)
)
);
}
#[repr(C)]
#[derive(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() {
assert_eq!(
::std::mem::size_of::<pdf_csi>(),
696usize,
concat!("Size of: ", stringify!(pdf_csi))
);
assert_eq!(
::std::mem::align_of::<pdf_csi>(),
4usize,
concat!("Alignment of ", stringify!(pdf_csi))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).doc as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).rdb as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(rdb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).buf as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).cookie as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(cookie)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).gstate as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(gstate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).xbalance as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(xbalance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).in_text as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(in_text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).d1_rect as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(d1_rect)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).obj as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).name as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).string as *const _ as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(string)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).string_len as *const _ as usize },
560usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(string_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).top as *const _ as usize },
564usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(top)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_csi>())).stack as *const _ as usize },
568usize,
concat!(
"Offset of field: ",
stringify!(pdf_csi),
"::",
stringify!(stack)
)
);
}
extern "C" {
pub fn pdf_new_run_processor(
ctx: *mut fz_context,
dev: *mut fz_device,
ctm: fz_matrix,
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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_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 end_page: ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut fz_context,
buffer: *mut fz_buffer,
arg: *mut ::std::os::raw::c_void,
),
>,
pub recurse: ::std::os::raw::c_int,
pub instance_forms: ::std::os::raw::c_int,
pub sanitize: ::std::os::raw::c_int,
pub ascii: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pdf_filter_options() {
assert_eq!(
::std::mem::size_of::<pdf_filter_options>(),
36usize,
concat!("Size of: ", stringify!(pdf_filter_options))
);
assert_eq!(
::std::mem::align_of::<pdf_filter_options>(),
4usize,
concat!("Alignment of ", stringify!(pdf_filter_options))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).opaque as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(opaque)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).image_filter as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(image_filter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).text_filter as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(text_filter)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_filter_options>())).after_text_object as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(after_text_object)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).end_page as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(end_page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).recurse as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(recurse)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_filter_options>())).instance_forms as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(instance_forms)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).sanitize as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(sanitize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_filter_options>())).ascii as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_filter_options),
"::",
stringify!(ascii)
)
);
}
extern "C" {
pub fn pdf_new_filter_processor(
ctx: *mut fz_context,
doc: *mut pdf_document,
chain: *mut pdf_processor,
old_res: *mut pdf_obj,
new_res: *mut pdf_obj,
struct_parents: ::std::os::raw::c_int,
transform: fz_matrix,
filter: *mut pdf_filter_options,
) -> *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,
filter: *mut pdf_filter_options,
) -> *mut pdf_obj;
}
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,
);
}
extern "C" {
pub fn pdf_process_annot(
ctx: *mut fz_context,
proc_: *mut pdf_processor,
doc: *mut pdf_document,
page: *mut pdf_page,
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,
);
}
#[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() {
assert_eq!(
::std::mem::size_of::<pdf_text_state>(),
32usize,
concat!("Size of: ", stringify!(pdf_text_state))
);
assert_eq!(
::std::mem::align_of::<pdf_text_state>(),
4usize,
concat!("Alignment of ", stringify!(pdf_text_state))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).char_space as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(char_space)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).word_space as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(word_space)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).scale as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).leading as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(leading)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).font as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(font)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).size as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).render as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_state),
"::",
stringify!(render)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_state>())).rise as *const _ as usize },
28usize,
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() {
assert_eq!(
::std::mem::size_of::<pdf_text_object_state>(),
108usize,
concat!("Size of: ", stringify!(pdf_text_object_state))
);
assert_eq!(
::std::mem::align_of::<pdf_text_object_state>(),
4usize,
concat!("Alignment of ", stringify!(pdf_text_object_state))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).text as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).text_bbox as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text_bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).tlm as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(tlm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).tm as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(tm)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).text_mode as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(text_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).cid as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(cid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).gid as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).char_bbox as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(char_bbox)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).fontdesc as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(fontdesc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).char_tx as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(pdf_text_object_state),
"::",
stringify!(char_tx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_text_object_state>())).char_ty as *const _ as usize },
104usize,
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_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_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);
}
extern "C" {
pub fn pdf_drop_ocg(ctx: *mut fz_context, doc: *mut pdf_document);
}
extern "C" {
pub fn pdf_is_hidden_ocg(
ctx: *mut fz_context,
desc: *mut pdf_ocg_descriptor,
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,
doc: *mut pdf_document,
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_filter_page_contents(
ctx: *mut fz_context,
doc: *mut pdf_document,
page: *mut pdf_page,
filter: *mut pdf_filter_options,
);
}
extern "C" {
pub fn pdf_filter_annot_contents(
ctx: *mut fz_context,
doc: *mut pdf_document,
annot: *mut pdf_annot,
filter: *mut pdf_filter_options,
);
}
pub const PDF_REDACT_IMAGE_NONE: ::std::os::raw::c_uint = 0;
pub const PDF_REDACT_IMAGE_REMOVE: ::std::os::raw::c_uint = 1;
pub const PDF_REDACT_IMAGE_PIXELS: ::std::os::raw::c_uint = 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() {
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::null::<pdf_redact_options>())).black_boxes as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_redact_options),
"::",
stringify!(black_boxes)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_redact_options>())).image_method as *const _ 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_widget,
pub widget_tailp: *mut *mut pdf_widget,
}
#[test]
fn bindgen_test_layout_pdf_page() {
assert_eq!(
::std::mem::size_of::<pdf_page>(),
104usize,
concat!("Size of: ", stringify!(pdf_page))
);
assert_eq!(
::std::mem::align_of::<pdf_page>(),
4usize,
concat!("Alignment of ", stringify!(pdf_page))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).super_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(super_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).doc as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(doc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).obj as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).transparency as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(transparency)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).overprint as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(overprint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).links as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(links)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).annots as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(annots)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).annot_tailp as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(annot_tailp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).widgets as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(pdf_page),
"::",
stringify!(widgets)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_page>())).widget_tailp as *const _ as usize },
100usize,
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: ::std::os::raw::c_uint = 1;
pub const PDF_ANNOT_IS_HIDDEN: ::std::os::raw::c_uint = 2;
pub const PDF_ANNOT_IS_PRINT: ::std::os::raw::c_uint = 4;
pub const PDF_ANNOT_IS_NO_ZOOM: ::std::os::raw::c_uint = 8;
pub const PDF_ANNOT_IS_NO_ROTATE: ::std::os::raw::c_uint = 16;
pub const PDF_ANNOT_IS_NO_VIEW: ::std::os::raw::c_uint = 32;
pub const PDF_ANNOT_IS_READ_ONLY: ::std::os::raw::c_uint = 64;
pub const PDF_ANNOT_IS_LOCKED: ::std::os::raw::c_uint = 128;
pub const PDF_ANNOT_IS_TOGGLE_NO_VIEW: ::std::os::raw::c_uint = 256;
pub const PDF_ANNOT_IS_LOCKED_CONTENTS: ::std::os::raw::c_uint = 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: ::std::os::raw::c_uint = 0;
pub const PDF_ANNOT_Q_CENTER: ::std::os::raw::c_uint = 1;
pub const PDF_ANNOT_Q_RIGHT: ::std::os::raw::c_uint = 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_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_annot_transform(ctx: *mut fz_context, annot: *mut pdf_annot) -> fz_matrix;
}
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_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_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_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_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_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_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_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,
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,
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,
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,
color: *const f32,
);
}
extern "C" {
pub fn pdf_dirty_annot(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_update_appearance(ctx: *mut fz_context, annot: *mut pdf_annot);
}
extern "C" {
pub fn pdf_update_signature_appearance(
ctx: *mut fz_context,
annot: *mut pdf_annot,
name: *const ::std::os::raw::c_char,
text: *const ::std::os::raw::c_char,
date: *const ::std::os::raw::c_char,
);
}
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_widget,
editing: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn pdf_get_widget_editing_state(
ctx: *mut fz_context,
widget: *mut pdf_widget,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_toggle_widget(
ctx: *mut fz_context,
widget: *mut pdf_widget,
) -> ::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;
}
extern "C" {
pub fn pdf_guess_mime_type_from_file_name(
ctx: *mut fz_context,
filename: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_embedded_file_stream(ctx: *mut fz_context, fs: *mut pdf_obj) -> *mut pdf_obj;
}
extern "C" {
pub fn pdf_embedded_file_name(
ctx: *mut fz_context,
fs: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn pdf_embedded_file_type(
ctx: *mut fz_context,
fs: *mut pdf_obj,
) -> *const ::std::os::raw::c_char;
}
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_load_embedded_file(ctx: *mut fz_context, fs: *mut pdf_obj) -> *mut fz_buffer;
}
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,
) -> *mut pdf_obj;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_annot {
pub refs: ::std::os::raw::c_int,
pub page: *mut pdf_page,
pub obj: *mut pdf_obj,
pub ap: *mut pdf_obj,
pub is_hot: ::std::os::raw::c_int,
pub is_active: ::std::os::raw::c_int,
pub needs_new_ap: ::std::os::raw::c_int,
pub has_new_ap: ::std::os::raw::c_int,
pub ignore_trigger_events: ::std::os::raw::c_int,
pub next: *mut pdf_annot,
}
#[test]
fn bindgen_test_layout_pdf_annot() {
assert_eq!(
::std::mem::size_of::<pdf_annot>(),
40usize,
concat!("Size of: ", stringify!(pdf_annot))
);
assert_eq!(
::std::mem::align_of::<pdf_annot>(),
4usize,
concat!("Alignment of ", stringify!(pdf_annot))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).refs as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(refs)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).page as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(page)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).obj as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).ap as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(ap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).is_hot as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(is_hot)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).is_active as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(is_active)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).needs_new_ap as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(needs_new_ap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).has_new_ap as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(has_new_ap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).ignore_trigger_events as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(ignore_trigger_events)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_annot>())).next as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(pdf_annot),
"::",
stringify!(next)
)
);
}
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,
annots: *mut pdf_obj,
pagenum: ::std::os::raw::c_int,
page_ctm: fz_matrix,
) -> *mut fz_link;
}
extern "C" {
pub fn pdf_load_annots(ctx: *mut fz_context, page: *mut pdf_page, annots: *mut pdf_obj);
}
extern "C" {
pub fn pdf_drop_annots(ctx: *mut fz_context, annot_list: *mut pdf_annot);
}
extern "C" {
pub fn pdf_drop_widgets(ctx: *mut fz_context, widget_list: *mut pdf_widget);
}
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;
}
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_widget) -> *mut pdf_widget;
}
extern "C" {
pub fn pdf_drop_widget(ctx: *mut fz_context, widget: *mut pdf_widget);
}
extern "C" {
pub fn pdf_first_widget(ctx: *mut fz_context, page: *mut pdf_page) -> *mut pdf_widget;
}
extern "C" {
pub fn pdf_next_widget(ctx: *mut fz_context, previous: *mut pdf_widget) -> *mut pdf_widget;
}
extern "C" {
pub fn pdf_update_widget(
ctx: *mut fz_context,
widget: *mut pdf_widget,
) -> ::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_widget;
}
extern "C" {
pub fn pdf_widget_type(ctx: *mut fz_context, widget: *mut pdf_widget) -> pdf_widget_type;
}
extern "C" {
pub fn pdf_bound_widget(ctx: *mut fz_context, widget: *mut pdf_widget) -> fz_rect;
}
extern "C" {
pub fn pdf_text_widget_max_len(
ctx: *mut fz_context,
tw: *mut pdf_widget,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_text_widget_format(
ctx: *mut fz_context,
tw: *mut pdf_widget,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_options(
ctx: *mut fz_context,
tw: *mut pdf_widget,
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_widget,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pdf_choice_widget_value(
ctx: *mut fz_context,
tw: *mut pdf_widget,
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_widget,
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_widget,
) -> ::std::os::raw::c_int;
}
pub const PDF_FIELD_IS_READ_ONLY: ::std::os::raw::c_uint = 1;
pub const PDF_FIELD_IS_REQUIRED: ::std::os::raw::c_uint = 2;
pub const PDF_FIELD_IS_NO_EXPORT: ::std::os::raw::c_uint = 4;
pub const PDF_TX_FIELD_IS_MULTILINE: ::std::os::raw::c_uint = 4096;
pub const PDF_TX_FIELD_IS_PASSWORD: ::std::os::raw::c_uint = 8192;
pub const PDF_TX_FIELD_IS_FILE_SELECT: ::std::os::raw::c_uint = 1048576;
pub const PDF_TX_FIELD_IS_DO_NOT_SPELL_CHECK: ::std::os::raw::c_uint = 4194304;
pub const PDF_TX_FIELD_IS_DO_NOT_SCROLL: ::std::os::raw::c_uint = 8388608;
pub const PDF_TX_FIELD_IS_COMB: ::std::os::raw::c_uint = 16777216;
pub const PDF_TX_FIELD_IS_RICH_TEXT: ::std::os::raw::c_uint = 33554432;
pub const PDF_BTN_FIELD_IS_NO_TOGGLE_TO_OFF: ::std::os::raw::c_uint = 16384;
pub const PDF_BTN_FIELD_IS_RADIO: ::std::os::raw::c_uint = 32768;
pub const PDF_BTN_FIELD_IS_PUSHBUTTON: ::std::os::raw::c_uint = 65536;
pub const PDF_BTN_FIELD_IS_RADIOS_IN_UNISON: ::std::os::raw::c_uint = 33554432;
pub const PDF_CH_FIELD_IS_COMBO: ::std::os::raw::c_uint = 131072;
pub const PDF_CH_FIELD_IS_EDIT: ::std::os::raw::c_uint = 262144;
pub const PDF_CH_FIELD_IS_SORT: ::std::os::raw::c_uint = 524288;
pub const PDF_CH_FIELD_IS_MULTI_SELECT: ::std::os::raw::c_uint = 2097152;
pub const PDF_CH_FIELD_IS_DO_NOT_SPELL_CHECK: ::std::os::raw::c_uint = 4194304;
pub const PDF_CH_FIELD_IS_COMMIT_ON_SEL_CHANGE: ::std::os::raw::c_uint = 67108864;
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_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_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_widget,
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_widget,
value: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pdf_pkcs7_designated_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_designated_name() {
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_designated_name>(),
20usize,
concat!("Size of: ", stringify!(pdf_pkcs7_designated_name))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_designated_name>(),
4usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_designated_name))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_designated_name>())).cn as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_designated_name),
"::",
stringify!(cn)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_designated_name>())).o as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_designated_name),
"::",
stringify!(o)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_designated_name>())).ou as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_designated_name),
"::",
stringify!(ou)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_designated_name>())).email as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_designated_name),
"::",
stringify!(email)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_designated_name>())).c as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_designated_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_designated_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() {
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_signer>(),
20usize,
concat!("Size of: ", stringify!(pdf_pkcs7_signer))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_signer>(),
4usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_signer))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_signer>())).keep as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(keep)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_signer>())).drop as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_pkcs7_signer>())).get_signing_name as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(get_signing_name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_pkcs7_signer>())).max_digest_size as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_signer),
"::",
stringify!(max_digest_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_signer>())).create_digest as *const _ as usize },
16usize,
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_designated_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() {
assert_eq!(
::std::mem::size_of::<pdf_pkcs7_verifier>(),
16usize,
concat!("Size of: ", stringify!(pdf_pkcs7_verifier))
);
assert_eq!(
::std::mem::align_of::<pdf_pkcs7_verifier>(),
4usize,
concat!("Alignment of ", stringify!(pdf_pkcs7_verifier))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_verifier>())).drop as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_pkcs7_verifier>())).check_certificate as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(check_certificate)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_pkcs7_verifier>())).check_digest as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_pkcs7_verifier),
"::",
stringify!(check_digest)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_pkcs7_verifier>())).get_signatory as *const _ as usize
},
12usize,
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_designated_name;
}
extern "C" {
pub fn pdf_signature_drop_designated_name(
ctx: *mut fz_context,
name: *mut pdf_pkcs7_designated_name,
);
}
extern "C" {
pub fn pdf_signature_format_designated_name(
ctx: *mut fz_context,
name: *mut pdf_pkcs7_designated_name,
) -> *mut ::std::os::raw::c_char;
}
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_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,
}
#[test]
fn bindgen_test_layout_pdf_keystroke_event() {
assert_eq!(
::std::mem::size_of::<pdf_keystroke_event>(),
24usize,
concat!("Size of: ", stringify!(pdf_keystroke_event))
);
assert_eq!(
::std::mem::align_of::<pdf_keystroke_event>(),
4usize,
concat!("Alignment of ", stringify!(pdf_keystroke_event))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).value as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).change as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(change)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).selStart as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(selStart)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).selEnd as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(selEnd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).willCommit as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(willCommit)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_keystroke_event>())).newChange as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_keystroke_event),
"::",
stringify!(newChange)
)
);
}
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,
) -> ::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_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() {
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::null::<pdf_doc_event>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_doc_event),
"::",
stringify!(type_)
)
);
}
pub const PDF_DOCUMENT_EVENT_ALERT: ::std::os::raw::c_uint = 0;
pub const PDF_DOCUMENT_EVENT_PRINT: ::std::os::raw::c_uint = 1;
pub const PDF_DOCUMENT_EVENT_LAUNCH_URL: ::std::os::raw::c_uint = 2;
pub const PDF_DOCUMENT_EVENT_MAIL_DOC: ::std::os::raw::c_uint = 3;
pub const PDF_DOCUMENT_EVENT_SUBMIT: ::std::os::raw::c_uint = 4;
pub const PDF_DOCUMENT_EVENT_EXEC_MENU_ITEM: ::std::os::raw::c_uint = 5;
pub type _bindgen_ty_35 = ::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,
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 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 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() {
assert_eq!(
::std::mem::size_of::<pdf_alert_event>(),
32usize,
concat!("Size of: ", stringify!(pdf_alert_event))
);
assert_eq!(
::std::mem::align_of::<pdf_alert_event>(),
4usize,
concat!("Alignment of ", stringify!(pdf_alert_event))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_alert_event>())).message as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(message)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_alert_event>())).icon_type as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(icon_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_alert_event>())).button_group_type as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(button_group_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_alert_event>())).title as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(title)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_alert_event>())).check_box_message as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(check_box_message)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<pdf_alert_event>())).initially_checked as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(initially_checked)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_alert_event>())).finally_checked as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(finally_checked)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_alert_event>())).button_pressed as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(pdf_alert_event),
"::",
stringify!(button_pressed)
)
);
}
pub const PDF_ALERT_ICON_ERROR: ::std::os::raw::c_uint = 0;
pub const PDF_ALERT_ICON_WARNING: ::std::os::raw::c_uint = 1;
pub const PDF_ALERT_ICON_QUESTION: ::std::os::raw::c_uint = 2;
pub const PDF_ALERT_ICON_STATUS: ::std::os::raw::c_uint = 3;
pub type _bindgen_ty_36 = ::std::os::raw::c_uint;
pub const PDF_ALERT_BUTTON_GROUP_OK: ::std::os::raw::c_uint = 0;
pub const PDF_ALERT_BUTTON_GROUP_OK_CANCEL: ::std::os::raw::c_uint = 1;
pub const PDF_ALERT_BUTTON_GROUP_YES_NO: ::std::os::raw::c_uint = 2;
pub const PDF_ALERT_BUTTON_GROUP_YES_NO_CANCEL: ::std::os::raw::c_uint = 3;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint;
pub const PDF_ALERT_BUTTON_NONE: ::std::os::raw::c_uint = 0;
pub const PDF_ALERT_BUTTON_OK: ::std::os::raw::c_uint = 1;
pub const PDF_ALERT_BUTTON_CANCEL: ::std::os::raw::c_uint = 2;
pub const PDF_ALERT_BUTTON_NO: ::std::os::raw::c_uint = 3;
pub const PDF_ALERT_BUTTON_YES: ::std::os::raw::c_uint = 4;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
extern "C" {
pub fn pdf_access_alert_event(
ctx: *mut fz_context,
event: *mut pdf_doc_event,
) -> *mut pdf_alert_event;
}
extern "C" {
pub fn pdf_access_exec_menu_item_event(
ctx: *mut fz_context,
event: *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() {
assert_eq!(
::std::mem::size_of::<pdf_launch_url_event>(),
8usize,
concat!("Size of: ", stringify!(pdf_launch_url_event))
);
assert_eq!(
::std::mem::align_of::<pdf_launch_url_event>(),
4usize,
concat!("Alignment of ", stringify!(pdf_launch_url_event))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_launch_url_event>())).url as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_launch_url_event),
"::",
stringify!(url)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_launch_url_event>())).new_frame as *const _ as usize },
4usize,
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,
event: *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() {
assert_eq!(
::std::mem::size_of::<pdf_mail_doc_event>(),
24usize,
concat!("Size of: ", stringify!(pdf_mail_doc_event))
);
assert_eq!(
::std::mem::align_of::<pdf_mail_doc_event>(),
4usize,
concat!("Alignment of ", stringify!(pdf_mail_doc_event))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).ask_user as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(ask_user)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).to as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(to)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).cc as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(cc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).bcc as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(bcc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).subject as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(subject)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<pdf_mail_doc_event>())).message as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(pdf_mail_doc_event),
"::",
stringify!(message)
)
);
}
extern "C" {
pub fn pdf_access_mail_doc_event(
ctx: *mut fz_context,
event: *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,
event: *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,
event: *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_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,
);
}
extern "C" {
pub fn pdf_new_pdf_device(
ctx: *mut fz_context,
doc: *mut pdf_document,
topctm: fz_matrix,
mediabox: fz_rect,
resources: *mut pdf_obj,
contents: *mut fz_buffer,
) -> *mut fz_device;
}
extern "C" {
pub fn pdf_localise_page_resources(ctx: *mut fz_context, doc: *mut pdf_document);
}
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() {
assert_eq!(
::std::mem::size_of::<mupdf_error>(),
8usize,
concat!("Size of: ", stringify!(mupdf_error))
);
assert_eq!(
::std::mem::align_of::<mupdf_error>(),
4usize,
concat!("Alignment of ", stringify!(mupdf_error))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mupdf_error>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mupdf_error),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mupdf_error>())).message as *const _ as usize },
4usize,
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_memory(
ctx: *mut fz_context,
name: *const ::std::os::raw::c_char,
index: ::std::os::raw::c_int,
data: *const ::std::os::raw::c_uchar,
data_len: ::std::os::raw::c_int,
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_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_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_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 = *mut ::std::os::raw::c_char;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fz_display_list {
pub _address: u8,
}