From 40eef5b5dd6066194b12fd2dfd9363d120c96b27 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 31 Jan 2022 20:35:12 -0700 Subject: [PATCH] harfbuzz: regenerate ffi bindings --- deps/harfbuzz/src/lib.rs | 101 +++++++++++++++++++++++---------------- 1 file changed, 59 insertions(+), 42 deletions(-) diff --git a/deps/harfbuzz/src/lib.rs b/deps/harfbuzz/src/lib.rs index 78ceaf265..5d3bed97d 100644 --- a/deps/harfbuzz/src/lib.rs +++ b/deps/harfbuzz/src/lib.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.59.2 */ #![allow(non_snake_case)] #![allow(non_camel_case_types)] @@ -6,12 +6,6 @@ #![allow(clippy::unreadable_literal)] #![allow(clippy::upper_case_acronyms)] -pub type __int8_t = ::std::os::raw::c_schar; -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 hb_bool_t = ::std::os::raw::c_int; pub type hb_codepoint_t = u32; pub type hb_position_t = i32; @@ -19,19 +13,18 @@ pub type hb_mask_t = u32; #[repr(C)] #[derive(Copy, Clone)] pub union _hb_var_int_t { - pub u32: u32, - pub i32: i32, - pub u16: [u16; 2usize], - pub i16: [i16; 2usize], - pub u8: [u8; 4usize], - pub i8: [i8; 4usize], - _bindgen_union_align: u32, + pub u32_: u32, + pub i32_: i32, + pub u16_: [u16; 2usize], + pub i16_: [i16; 2usize], + pub u8_: [u8; 4usize], + pub i8_: [i8; 4usize], } pub type hb_var_int_t = _hb_var_int_t; pub type hb_tag_t = u32; extern "C" { pub fn hb_tag_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> hb_tag_t; } @@ -39,7 +32,7 @@ extern "C" { pub fn hb_tag_to_string(tag: hb_tag_t, buf: *mut ::std::os::raw::c_char); } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_direction_t { HB_DIRECTION_INVALID = 0, HB_DIRECTION_LTR = 4, @@ -49,7 +42,7 @@ pub enum hb_direction_t { } extern "C" { pub fn hb_direction_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> hb_direction_t; } @@ -64,7 +57,7 @@ pub struct hb_language_impl_t { pub type hb_language_t = *const hb_language_impl_t; extern "C" { pub fn hb_language_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> hb_language_t; } @@ -78,7 +71,7 @@ impl hb_script_t { pub const _HB_SCRIPT_MAX_VALUE_SIGNED: hb_script_t = hb_script_t::_HB_SCRIPT_MAX_VALUE; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_script_t { HB_SCRIPT_COMMON = 1517910393, HB_SCRIPT_INHERITED = 1516858984, @@ -250,7 +243,7 @@ extern "C" { } extern "C" { pub fn hb_script_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> hb_script_t; } @@ -277,7 +270,7 @@ pub struct hb_feature_t { } extern "C" { pub fn hb_feature_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, feature: *mut hb_feature_t, ) -> hb_bool_t; @@ -297,7 +290,7 @@ pub struct hb_variation_t { } extern "C" { pub fn hb_variation_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, variation: *mut hb_variation_t, ) -> hb_bool_t; @@ -323,7 +316,7 @@ extern "C" { pub fn hb_color_get_blue(color: hb_color_t) -> u8; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_memory_mode_t { HB_MEMORY_MODE_DUPLICATE = 0, HB_MEMORY_MODE_READONLY = 1, @@ -417,7 +410,7 @@ extern "C" { ) -> *mut ::std::os::raw::c_char; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_unicode_general_category_t { HB_UNICODE_GENERAL_CATEGORY_CONTROL = 0, HB_UNICODE_GENERAL_CATEGORY_FORMAT = 1, @@ -451,7 +444,7 @@ pub enum hb_unicode_general_category_t { HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR = 29, } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_unicode_combining_class_t { HB_UNICODE_COMBINING_CLASS_NOT_REORDERED = 0, HB_UNICODE_COMBINING_CLASS_OVERLAY = 1, @@ -1560,6 +1553,12 @@ extern "C" { extern "C" { pub fn hb_font_get_ptem(font: *mut hb_font_t) -> f32; } +extern "C" { + pub fn hb_font_set_synthetic_slant(font: *mut hb_font_t, slant: f32); +} +extern "C" { + pub fn hb_font_get_synthetic_slant(font: *mut hb_font_t) -> f32; +} extern "C" { pub fn hb_font_set_variations( font: *mut hb_font_t, @@ -1574,6 +1573,12 @@ extern "C" { coords_length: ::std::os::raw::c_uint, ); } +extern "C" { + pub fn hb_font_get_var_coords_design( + font: *mut hb_font_t, + length: *mut ::std::os::raw::c_uint, + ) -> *const f32; +} extern "C" { pub fn hb_font_set_var_coords_normalized( font: *mut hb_font_t, @@ -1602,14 +1607,12 @@ pub struct hb_glyph_info_t { pub var1: hb_var_int_t, pub var2: hb_var_int_t, } -impl hb_glyph_flags_t { - pub const HB_GLYPH_FLAG_DEFINED: hb_glyph_flags_t = - hb_glyph_flags_t::HB_GLYPH_FLAG_UNSAFE_TO_BREAK; -} #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_glyph_flags_t { HB_GLYPH_FLAG_UNSAFE_TO_BREAK = 1, + HB_GLYPH_FLAG_UNSAFE_TO_CONCAT = 2, + HB_GLYPH_FLAG_DEFINED = 3, } extern "C" { pub fn hb_glyph_info_get_glyph_flags(info: *const hb_glyph_info_t) -> hb_glyph_flags_t; @@ -1641,6 +1644,12 @@ extern "C" { extern "C" { pub fn hb_segment_properties_hash(p: *const hb_segment_properties_t) -> ::std::os::raw::c_uint; } +extern "C" { + pub fn hb_segment_properties_overlay( + p: *mut hb_segment_properties_t, + src: *const hb_segment_properties_t, + ); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hb_buffer_t { @@ -1649,6 +1658,12 @@ pub struct hb_buffer_t { extern "C" { pub fn hb_buffer_create() -> *mut hb_buffer_t; } +extern "C" { + pub fn hb_buffer_create_similar(src: *const hb_buffer_t) -> *mut hb_buffer_t; +} +extern "C" { + pub fn hb_buffer_reset(buffer: *mut hb_buffer_t); +} extern "C" { pub fn hb_buffer_get_empty() -> *mut hb_buffer_t; } @@ -1674,7 +1689,7 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_content_type_t { HB_BUFFER_CONTENT_TYPE_INVALID = 0, HB_BUFFER_CONTENT_TYPE_UNICODE = 1, @@ -1732,7 +1747,7 @@ extern "C" { pub fn hb_buffer_guess_segment_properties(buffer: *mut hb_buffer_t); } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_flags_t { HB_BUFFER_FLAG_DEFAULT = 0, HB_BUFFER_FLAG_BOT = 1, @@ -1752,7 +1767,7 @@ impl hb_buffer_cluster_level_t { hb_buffer_cluster_level_t::HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_cluster_level_t { HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES = 0, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS = 1, @@ -1783,7 +1798,10 @@ extern "C" { pub fn hb_buffer_get_invisible_glyph(buffer: *mut hb_buffer_t) -> hb_codepoint_t; } extern "C" { - pub fn hb_buffer_reset(buffer: *mut hb_buffer_t); + pub fn hb_buffer_set_not_found_glyph(buffer: *mut hb_buffer_t, not_found: hb_codepoint_t); +} +extern "C" { + pub fn hb_buffer_get_not_found_glyph(buffer: *mut hb_buffer_t) -> hb_codepoint_t; } extern "C" { pub fn hb_buffer_clear_contents(buffer: *mut hb_buffer_t); @@ -1898,7 +1916,7 @@ extern "C" { pub fn hb_buffer_normalize_glyphs(buffer: *mut hb_buffer_t); } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_serialize_flags_t { HB_BUFFER_SERIALIZE_FLAG_DEFAULT = 0, HB_BUFFER_SERIALIZE_FLAG_NO_CLUSTERS = 1, @@ -1909,7 +1927,7 @@ pub enum hb_buffer_serialize_flags_t { HB_BUFFER_SERIALIZE_FLAG_NO_ADVANCES = 32, } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_serialize_format_t { HB_BUFFER_SERIALIZE_FORMAT_TEXT = 1413830740, HB_BUFFER_SERIALIZE_FORMAT_JSON = 1246973774, @@ -1917,7 +1935,7 @@ pub enum hb_buffer_serialize_format_t { } extern "C" { pub fn hb_buffer_serialize_format_from_string( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> hb_buffer_serialize_format_t; } @@ -1987,7 +2005,7 @@ extern "C" { ) -> hb_bool_t; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_buffer_diff_flags_t { HB_BUFFER_DIFF_FLAG_EQUAL = 0, HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH = 1, @@ -2261,7 +2279,7 @@ extern "C" { ) -> *const ::std::os::raw::c_char; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum hb_style_tag_t { HB_STYLE_TAG_ITALIC = 1769234796, HB_STYLE_TAG_OPTICAL_SIZE = 1869640570, @@ -2323,7 +2341,6 @@ pub type FT_Stream = *mut FT_StreamRec_; pub union FT_StreamDesc_ { pub value: ::std::os::raw::c_long, pub pointer: *mut ::std::os::raw::c_void, - _bindgen_union_align: u64, } pub type FT_StreamDesc = FT_StreamDesc_; pub type FT_Stream_IoFunc = ::std::option::Option< @@ -2391,7 +2408,7 @@ pub struct FT_Outline_ { } pub type FT_Outline = FT_Outline_; #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum FT_Glyph_Format_ { FT_GLYPH_FORMAT_NONE = 0, FT_GLYPH_FORMAT_COMPOSITE = 1668246896, @@ -2489,7 +2506,7 @@ impl FT_Encoding_ { pub const FT_ENCODING_MS_JOHAB: FT_Encoding_ = FT_Encoding_::FT_ENCODING_JOHAB; } #[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum FT_Encoding_ { FT_ENCODING_NONE = 0, FT_ENCODING_MS_SYMBOL = 1937337698,