diff --git a/deps/freetype/regenerate.sh b/deps/freetype/regenerate.sh index 7a10d8545..4e864f0ff 100755 --- a/deps/freetype/regenerate.sh +++ b/deps/freetype/regenerate.sh @@ -1,6 +1,7 @@ #!/bin/bash bindgen bindings.h -o src/lib.rs \ + --no-layout-tests \ --no-doc-comments \ --blacklist-type "FT_(Int16|UInt16|Int32|UInt32|Int16|Int64|UInt64)" \ --raw-line "#![allow(non_snake_case)]" \ @@ -10,8 +11,8 @@ bindgen bindings.h -o src/lib.rs \ --raw-line "pub type FT_UInt16 = u16;" \ --raw-line "pub type FT_Int32 = i32;" \ --raw-line "pub type FT_UInt32 = u32;" \ - --raw-line "pub type FT_Int64= i64;" \ - --raw-line "pub type FT_UInt64= u64;" \ + --raw-line "pub type FT_Int64 = i64;" \ + --raw-line "pub type FT_UInt64 = u64;" \ --default-enum-style rust \ --generate=functions,types,vars \ --whitelist-function="FT_.*" \ diff --git a/deps/freetype/src/lib.rs b/deps/freetype/src/lib.rs index f1fc364aa..f11795f6d 100644 --- a/deps/freetype/src/lib.rs +++ b/deps/freetype/src/lib.rs @@ -132,59 +132,6 @@ pub struct FT_MemoryRec_ { pub free: FT_Free_Func, pub realloc: FT_Realloc_Func, } -#[test] -fn bindgen_test_layout_FT_MemoryRec_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_MemoryRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_MemoryRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).user as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(user) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alloc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(alloc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).free as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).realloc as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(realloc) - ) - ); -} pub type FT_Stream = *mut FT_StreamRec_; #[repr(C)] #[derive(Copy, Clone)] @@ -193,39 +140,6 @@ pub union FT_StreamDesc_ { pub pointer: *mut ::std::os::raw::c_void, _bindgen_union_align: u64, } -#[test] -fn bindgen_test_layout_FT_StreamDesc_() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(FT_StreamDesc_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_StreamDesc_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamDesc_), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pointer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamDesc_), - "::", - stringify!(pointer) - ) - ); -} pub type FT_StreamDesc = FT_StreamDesc_; pub type FT_Stream_IoFunc = ::std::option::Option< unsafe extern "C" fn( @@ -250,119 +164,6 @@ pub struct FT_StreamRec_ { pub cursor: *mut ::std::os::raw::c_uchar, pub limit: *mut ::std::os::raw::c_uchar, } -#[test] -fn bindgen_test_layout_FT_StreamRec_() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(FT_StreamRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_StreamRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descriptor as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(descriptor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pathname as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(pathname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).read as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(read) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).close as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cursor as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(cursor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).limit as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(limit) - ) - ); -} pub type FT_StreamRec = FT_StreamRec_; pub type FT_Pos = ::std::os::raw::c_long; #[repr(C)] @@ -371,39 +172,6 @@ pub struct FT_Vector_ { pub x: FT_Pos, pub y: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Vector_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Vector_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Vector_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Vector_), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Vector_), - "::", - stringify!(y) - ) - ); -} pub type FT_Vector = FT_Vector_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -413,59 +181,6 @@ pub struct FT_BBox_ { pub xMax: FT_Pos, pub yMax: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_BBox_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_BBox_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_BBox_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xMin as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(xMin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yMin as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(yMin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xMax as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(xMax) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yMax as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(yMax) - ) - ); -} pub type FT_BBox = FT_BBox_; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -493,99 +208,6 @@ pub struct FT_Bitmap_ { pub palette_mode: ::std::os::raw::c_uchar, pub palette: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_FT_Bitmap_() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(FT_Bitmap_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Bitmap_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rows as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(rows) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_grays as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(num_grays) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_mode as *const _ as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(pixel_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).palette_mode as *const _ as usize }, - 27usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(palette_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).palette as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(palette) - ) - ); -} pub type FT_Bitmap = FT_Bitmap_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -597,79 +219,6 @@ pub struct FT_Outline_ { pub contours: *mut ::std::os::raw::c_short, pub flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_FT_Outline_() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(FT_Outline_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Outline_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_contours as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(n_contours) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_points as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(n_points) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).points as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(points) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(tags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).contours as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(contours) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(flags) - ) - ); -} pub type FT_Outline = FT_Outline_; pub type FT_Outline_MoveToFunc = ::std::option::Option< unsafe extern "C" fn( @@ -708,79 +257,6 @@ pub struct FT_Outline_Funcs_ { pub shift: ::std::os::raw::c_int, pub delta: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Outline_Funcs_() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(FT_Outline_Funcs_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Outline_Funcs_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).move_to as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(move_to) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_to as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(line_to) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conic_to as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(conic_to) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cubic_to as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(cubic_to) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shift as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(shift) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).delta as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_Funcs_), - "::", - stringify!(delta) - ) - ); -} pub type FT_Outline_Funcs = FT_Outline_Funcs_; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -805,49 +281,6 @@ pub struct FT_Span_ { pub len: ::std::os::raw::c_ushort, pub coverage: ::std::os::raw::c_uchar, } -#[test] -fn bindgen_test_layout_FT_Span_() { - assert_eq!( - ::std::mem::size_of::(), - 6usize, - concat!("Size of: ", stringify!(FT_Span_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(FT_Span_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Span_), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).len as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Span_), - "::", - stringify!(len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).coverage as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FT_Span_), - "::", - stringify!(coverage) - ) - ); -} pub type FT_Span = FT_Span_; pub type FT_SpanFunc = ::std::option::Option< unsafe extern "C" fn( @@ -884,109 +317,6 @@ pub struct FT_Raster_Params_ { pub user: *mut ::std::os::raw::c_void, pub clip_box: FT_BBox, } -#[test] -fn bindgen_test_layout_FT_Raster_Params_() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(FT_Raster_Params_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Raster_Params_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).source as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gray_spans as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(gray_spans) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).black_spans as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(black_spans) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bit_test as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(bit_test) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bit_set as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(bit_set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).user as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(user) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clip_box as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Params_), - "::", - stringify!(clip_box) - ) - ); -} pub type FT_Raster_Params = FT_Raster_Params_; pub type FT_Raster_NewFunc = ::std::option::Option< unsafe extern "C" fn( @@ -1025,81 +355,6 @@ pub struct FT_Raster_Funcs_ { pub raster_render: FT_Raster_RenderFunc, pub raster_done: FT_Raster_DoneFunc, } -#[test] -fn bindgen_test_layout_FT_Raster_Funcs_() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(FT_Raster_Funcs_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Raster_Funcs_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).glyph_format as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(glyph_format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).raster_new as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(raster_new) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).raster_reset as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(raster_reset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raster_set_mode as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(raster_set_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).raster_render as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(raster_render) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).raster_done as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Raster_Funcs_), - "::", - stringify!(raster_done) - ) - ); -} pub type FT_Raster_Funcs = FT_Raster_Funcs_; pub type FT_Bool = ::std::os::raw::c_uchar; pub type FT_FWord = ::std::os::raw::c_short; @@ -1128,39 +383,6 @@ pub struct FT_UnitVector_ { pub x: FT_F2Dot14, pub y: FT_F2Dot14, } -#[test] -fn bindgen_test_layout_FT_UnitVector_() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(FT_UnitVector_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(FT_UnitVector_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_UnitVector_), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_UnitVector_), - "::", - stringify!(y) - ) - ); -} pub type FT_UnitVector = FT_UnitVector_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1170,59 +392,6 @@ pub struct FT_Matrix_ { pub yx: FT_Fixed, pub yy: FT_Fixed, } -#[test] -fn bindgen_test_layout_FT_Matrix_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_Matrix_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Matrix_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Matrix_), - "::", - stringify!(xx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xy as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Matrix_), - "::", - stringify!(xy) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yx as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Matrix_), - "::", - stringify!(yx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yy as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Matrix_), - "::", - stringify!(yy) - ) - ); -} pub type FT_Matrix = FT_Matrix_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1230,39 +399,6 @@ pub struct FT_Data_ { pub pointer: *const FT_Byte, pub length: FT_Int, } -#[test] -fn bindgen_test_layout_FT_Data_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Data_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Data_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pointer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Data_), - "::", - stringify!(pointer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Data_), - "::", - stringify!(length) - ) - ); -} pub type FT_Data = FT_Data_; pub type FT_Generic_Finalizer = ::std::option::Option; @@ -1272,39 +408,6 @@ pub struct FT_Generic_ { pub data: *mut ::std::os::raw::c_void, pub finalizer: FT_Generic_Finalizer, } -#[test] -fn bindgen_test_layout_FT_Generic_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Generic_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Generic_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Generic_), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finalizer as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Generic_), - "::", - stringify!(finalizer) - ) - ); -} pub type FT_Generic = FT_Generic_; pub type FT_ListNode = *mut FT_ListNodeRec_; pub type FT_List = *mut FT_ListRec_; @@ -1315,49 +418,6 @@ pub struct FT_ListNodeRec_ { pub next: FT_ListNode, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_FT_ListNodeRec_() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(FT_ListNodeRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_ListNodeRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(data) - ) - ); -} pub type FT_ListNodeRec = FT_ListNodeRec_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1365,39 +425,6 @@ pub struct FT_ListRec_ { pub head: FT_ListNode, pub tail: FT_ListNode, } -#[test] -fn bindgen_test_layout_FT_ListRec_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_ListRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_ListRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).head as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_ListRec_), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tail as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_ListRec_), - "::", - stringify!(tail) - ) - ); -} pub type FT_ListRec = FT_ListRec_; pub const FT_Mod_Err_Base: _bindgen_ty_1 = _bindgen_ty_1::FT_Mod_Err_Base; pub const FT_Mod_Err_Autofit: _bindgen_ty_1 = _bindgen_ty_1::FT_Mod_Err_Base; @@ -1651,99 +678,6 @@ pub struct FT_Glyph_Metrics_ { pub vertBearingY: FT_Pos, pub vertAdvance: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Glyph_Metrics_() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(FT_Glyph_Metrics_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Glyph_Metrics_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiBearingX as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiBearingX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiBearingY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiBearingY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiAdvance as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiAdvance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertBearingX as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertBearingX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertBearingY as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertBearingY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertAdvance as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertAdvance) - ) - ); -} pub type FT_Glyph_Metrics = FT_Glyph_Metrics_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1754,69 +688,6 @@ pub struct FT_Bitmap_Size_ { pub x_ppem: FT_Pos, pub y_ppem: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Bitmap_Size_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_Bitmap_Size_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Bitmap_Size_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_ppem as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(x_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_ppem as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(y_ppem) - ) - ); -} pub type FT_Bitmap_Size = FT_Bitmap_Size_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1891,59 +762,6 @@ pub struct FT_CharMapRec_ { pub platform_id: FT_UShort, pub encoding_id: FT_UShort, } -#[test] -fn bindgen_test_layout_FT_CharMapRec_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_CharMapRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_CharMapRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).encoding as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(encoding) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).platform_id as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(platform_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).encoding_id as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(encoding_id) - ) - ); -} pub type FT_CharMapRec = FT_CharMapRec_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1986,329 +804,6 @@ pub struct FT_FaceRec_ { pub extensions: *mut ::std::os::raw::c_void, pub internal: FT_Face_Internal, } -#[test] -fn bindgen_test_layout_FT_FaceRec_() { - assert_eq!( - ::std::mem::size_of::(), - 248usize, - concat!("Size of: ", stringify!(FT_FaceRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_FaceRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_faces as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_faces) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face_index as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(face_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face_flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(face_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).style_flags as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(style_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_glyphs as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_glyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).family_name as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(family_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).style_name as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(style_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_fixed_sizes as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_fixed_sizes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).available_sizes as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(available_sizes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_charmaps as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_charmaps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charmaps as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(charmaps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bbox as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(bbox) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).units_per_EM as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(units_per_EM) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascender as *const _ as usize }, - 138usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(ascender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descender as *const _ as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(descender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 142usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance_width as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(max_advance_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance_height as *const _ as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(max_advance_height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).underline_position as *const _ as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(underline_position) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).underline_thickness as *const _ as usize }, - 150usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(underline_thickness) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).glyph as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charmap as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(charmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).driver as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(driver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizes_list as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(sizes_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).autohint as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(autohint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extensions as *const _ as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(extensions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(internal) - ) - ); -} pub type FT_FaceRec = FT_FaceRec_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2328,99 +823,6 @@ pub struct FT_Size_Metrics_ { pub height: FT_Pos, pub max_advance: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Size_Metrics_() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(FT_Size_Metrics_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Size_Metrics_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_ppem as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(x_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_ppem as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(y_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_scale as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(x_scale) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_scale as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(y_scale) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascender as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(ascender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descender as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(descender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(max_advance) - ) - ); -} pub type FT_Size_Metrics = FT_Size_Metrics_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2430,59 +832,6 @@ pub struct FT_SizeRec_ { pub metrics: FT_Size_Metrics, pub internal: FT_Size_Internal, } -#[test] -fn bindgen_test_layout_FT_SizeRec_() { - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(FT_SizeRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_SizeRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).metrics as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(metrics) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(internal) - ) - ); -} pub type FT_SizeRec = FT_SizeRec_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2522,243 +871,6 @@ pub struct FT_GlyphSlotRec_ { pub other: *mut ::std::os::raw::c_void, pub internal: FT_Slot_Internal, } -#[test] -fn bindgen_test_layout_FT_GlyphSlotRec_() { - assert_eq!( - ::std::mem::size_of::(), - 304usize, - concat!("Size of: ", stringify!(FT_GlyphSlotRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_GlyphSlotRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).library as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(library) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).glyph_index as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(glyph_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).metrics as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(metrics) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linearHoriAdvance as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(linearHoriAdvance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linearVertAdvance as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(linearVertAdvance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).advance as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(advance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap_left as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap_left) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap_top as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap_top) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).outline as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(outline) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_subglyphs as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(num_subglyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subglyphs as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(subglyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).control_data as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(control_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).control_len as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(control_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lsb_delta as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(lsb_delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsb_delta as *const _ as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(rsb_delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).other as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(other) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(internal) - ) - ); -} pub type FT_GlyphSlotRec = FT_GlyphSlotRec_; extern "C" { pub fn FT_Init_FreeType(alibrary: *mut FT_Library) -> FT_Error; @@ -2772,39 +884,6 @@ pub struct FT_Parameter_ { pub tag: FT_ULong, pub data: FT_Pointer, } -#[test] -fn bindgen_test_layout_FT_Parameter_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Parameter_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Parameter_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Parameter_), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Parameter_), - "::", - stringify!(data) - ) - ); -} pub type FT_Parameter = FT_Parameter_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2818,99 +897,6 @@ pub struct FT_Open_Args_ { pub num_params: FT_Int, pub params: *mut FT_Parameter, } -#[test] -fn bindgen_test_layout_FT_Open_Args_() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(FT_Open_Args_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Open_Args_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory_base as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(memory_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory_size as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(memory_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pathname as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(pathname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).driver as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(driver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_params as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(num_params) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).params as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_Open_Args_), - "::", - stringify!(params) - ) - ); -} pub type FT_Open_Args = FT_Open_Args_; extern "C" { pub fn FT_New_Face( @@ -2972,73 +958,6 @@ pub struct FT_Size_RequestRec_ { pub horiResolution: FT_UInt, pub vertResolution: FT_UInt, } -#[test] -fn bindgen_test_layout_FT_Size_RequestRec_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_Size_RequestRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Size_RequestRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_RequestRec_), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_RequestRec_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_RequestRec_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).horiResolution as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_RequestRec_), - "::", - stringify!(horiResolution) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).vertResolution as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_RequestRec_), - "::", - stringify!(vertResolution) - ) - ); -} pub type FT_Size_RequestRec = FT_Size_RequestRec_; pub type FT_Size_Request = *mut FT_Size_RequestRec_; extern "C" { @@ -3165,49 +1084,6 @@ pub struct FT_LayerIterator_ { pub layer: FT_UInt, pub p: *mut FT_Byte, } -#[test] -fn bindgen_test_layout_FT_LayerIterator_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_LayerIterator_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_LayerIterator_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_layers as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_LayerIterator_), - "::", - stringify!(num_layers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).layer as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FT_LayerIterator_), - "::", - stringify!(layer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_LayerIterator_), - "::", - stringify!(p) - ) - ); -} pub type FT_LayerIterator = FT_LayerIterator_; extern "C" { pub fn FT_Get_Color_Glyph_Layer( @@ -3365,113 +1241,6 @@ pub struct FT_Module_Class_ { pub module_done: FT_Module_Destructor, pub get_interface: FT_Module_Requester, } -#[test] -fn bindgen_test_layout_FT_Module_Class_() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(FT_Module_Class_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Module_Class_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_name as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_version as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_version) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).module_requires as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_requires) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).module_interface as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_interface) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_init as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_init) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).module_done as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(module_done) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).get_interface as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_Module_Class_), - "::", - stringify!(get_interface) - ) - ); -} pub type FT_Module_Class = FT_Module_Class_; extern "C" { pub fn FT_Add_Module(library: FT_Library, clazz: *const FT_Module_Class) -> FT_Error; diff --git a/deps/harfbuzz/regenerate.sh b/deps/harfbuzz/regenerate.sh index 0ed506dbf..997b121c6 100755 --- a/deps/harfbuzz/regenerate.sh +++ b/deps/harfbuzz/regenerate.sh @@ -1,6 +1,7 @@ #!/bin/bash bindgen bindings.h -o src/lib.rs \ + --no-layout-tests \ --no-doc-comments \ --raw-line "#![allow(non_snake_case)]" \ --raw-line "#![allow(non_camel_case_types)]" \ diff --git a/deps/harfbuzz/src/lib.rs b/deps/harfbuzz/src/lib.rs index ae2f88f78..efd6ff3bb 100644 --- a/deps/harfbuzz/src/lib.rs +++ b/deps/harfbuzz/src/lib.rs @@ -25,79 +25,6 @@ pub union _hb_var_int_t { pub i8: [i8; 4usize], _bindgen_union_align: u32, } -#[test] -fn bindgen_test_layout__hb_var_int_t() { - assert_eq!( - ::std::mem::size_of::<_hb_var_int_t>(), - 4usize, - concat!("Size of: ", stringify!(_hb_var_int_t)) - ); - assert_eq!( - ::std::mem::align_of::<_hb_var_int_t>(), - 4usize, - concat!("Alignment of ", stringify!(_hb_var_int_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).u32 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(u32) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).i32 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(i32) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).u16 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(u16) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).i16 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(i16) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).u8 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(u8) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_hb_var_int_t>())).i8 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_hb_var_int_t), - "::", - stringify!(i8) - ) - ); -} pub type hb_var_int_t = _hb_var_int_t; pub type hb_tag_t = u32; extern "C" { @@ -327,29 +254,6 @@ extern "C" { pub struct hb_user_data_key_t { pub unused: ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_hb_user_data_key_t() { - assert_eq!( - ::std::mem::size_of::(), - 1usize, - concat!("Size of: ", stringify!(hb_user_data_key_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(hb_user_data_key_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unused as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_user_data_key_t), - "::", - stringify!(unused) - ) - ); -} pub type hb_destroy_func_t = ::std::option::Option; #[repr(C)] @@ -360,59 +264,6 @@ pub struct hb_feature_t { pub start: ::std::os::raw::c_uint, pub end: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout_hb_feature_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hb_feature_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_feature_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_feature_t), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_feature_t), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_feature_t), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hb_feature_t), - "::", - stringify!(end) - ) - ); -} extern "C" { pub fn hb_feature_from_string( str: *const ::std::os::raw::c_char, @@ -433,39 +284,6 @@ pub struct hb_variation_t { pub tag: hb_tag_t, pub value: f32, } -#[test] -fn bindgen_test_layout_hb_variation_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(hb_variation_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_variation_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_variation_t), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_variation_t), - "::", - stringify!(value) - ) - ); -} extern "C" { pub fn hb_variation_from_string( str: *const ::std::os::raw::c_char, @@ -1109,139 +927,6 @@ pub struct hb_font_extents_t { pub reserved2: hb_position_t, pub reserved1: hb_position_t, } -#[test] -fn bindgen_test_layout_hb_font_extents_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(hb_font_extents_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_font_extents_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascender as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(ascender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descender as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(descender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_gap as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(line_gap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved9 as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved9) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved8 as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved8) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved7 as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved7) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved6 as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved6) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved5 as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved4 as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved3 as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved2 as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved1 as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(hb_font_extents_t), - "::", - stringify!(reserved1) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hb_glyph_extents_t { @@ -1250,59 +935,6 @@ pub struct hb_glyph_extents_t { pub width: hb_position_t, pub height: hb_position_t, } -#[test] -fn bindgen_test_layout_hb_glyph_extents_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hb_glyph_extents_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_glyph_extents_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_bearing as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_extents_t), - "::", - stringify!(x_bearing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_bearing as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_extents_t), - "::", - stringify!(y_bearing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_extents_t), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_extents_t), - "::", - stringify!(height) - ) - ); -} pub type hb_font_get_font_extents_func_t = ::std::option::Option< unsafe extern "C" fn( font: *mut hb_font_t, @@ -1876,69 +1508,6 @@ pub struct hb_glyph_info_t { pub var1: hb_var_int_t, pub var2: hb_var_int_t, } -#[test] -fn bindgen_test_layout_hb_glyph_info_t() { - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(hb_glyph_info_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_glyph_info_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).codepoint as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_info_t), - "::", - stringify!(codepoint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_info_t), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cluster as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_info_t), - "::", - stringify!(cluster) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var1 as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_info_t), - "::", - stringify!(var1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var2 as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_info_t), - "::", - stringify!(var2) - ) - ); -} 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; @@ -1960,69 +1529,6 @@ pub struct hb_glyph_position_t { pub y_offset: hb_position_t, pub var: hb_var_int_t, } -#[test] -fn bindgen_test_layout_hb_glyph_position_t() { - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(hb_glyph_position_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hb_glyph_position_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_advance as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_position_t), - "::", - stringify!(x_advance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_advance as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_position_t), - "::", - stringify!(y_advance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_offset as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_position_t), - "::", - stringify!(x_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_offset as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_position_t), - "::", - stringify!(y_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hb_glyph_position_t), - "::", - stringify!(var) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hb_segment_properties_t { @@ -2032,77 +1538,6 @@ pub struct hb_segment_properties_t { pub reserved1: *mut ::std::os::raw::c_void, pub reserved2: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_hb_segment_properties_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hb_segment_properties_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hb_segment_properties_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).direction as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hb_segment_properties_t), - "::", - stringify!(direction) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).script as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hb_segment_properties_t), - "::", - stringify!(script) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).language as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hb_segment_properties_t), - "::", - stringify!(language) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved1 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hb_segment_properties_t), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved2 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hb_segment_properties_t), - "::", - stringify!(reserved2) - ) - ); -} extern "C" { pub fn hb_segment_properties_equal( a: *const hb_segment_properties_t, @@ -2775,59 +2210,6 @@ pub struct FT_MemoryRec_ { pub free: FT_Free_Func, pub realloc: FT_Realloc_Func, } -#[test] -fn bindgen_test_layout_FT_MemoryRec_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_MemoryRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_MemoryRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).user as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(user) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alloc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(alloc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).free as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).realloc as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_MemoryRec_), - "::", - stringify!(realloc) - ) - ); -} pub type FT_Stream = *mut FT_StreamRec_; #[repr(C)] #[derive(Copy, Clone)] @@ -2836,39 +2218,6 @@ pub union FT_StreamDesc_ { pub pointer: *mut ::std::os::raw::c_void, _bindgen_union_align: u64, } -#[test] -fn bindgen_test_layout_FT_StreamDesc_() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(FT_StreamDesc_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_StreamDesc_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamDesc_), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pointer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamDesc_), - "::", - stringify!(pointer) - ) - ); -} pub type FT_StreamDesc = FT_StreamDesc_; pub type FT_Stream_IoFunc = ::std::option::Option< unsafe extern "C" fn( @@ -2893,119 +2242,6 @@ pub struct FT_StreamRec_ { pub cursor: *mut ::std::os::raw::c_uchar, pub limit: *mut ::std::os::raw::c_uchar, } -#[test] -fn bindgen_test_layout_FT_StreamRec_() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(FT_StreamRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_StreamRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descriptor as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(descriptor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pathname as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(pathname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).read as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(read) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).close as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cursor as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(cursor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).limit as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(FT_StreamRec_), - "::", - stringify!(limit) - ) - ); -} pub type FT_Pos = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3013,39 +2249,6 @@ pub struct FT_Vector_ { pub x: FT_Pos, pub y: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Vector_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Vector_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Vector_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Vector_), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Vector_), - "::", - stringify!(y) - ) - ); -} pub type FT_Vector = FT_Vector_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3055,59 +2258,6 @@ pub struct FT_BBox_ { pub xMax: FT_Pos, pub yMax: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_BBox_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_BBox_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_BBox_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xMin as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(xMin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yMin as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(yMin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xMax as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(xMax) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yMax as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_BBox_), - "::", - stringify!(yMax) - ) - ); -} pub type FT_BBox = FT_BBox_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3121,99 +2271,6 @@ pub struct FT_Bitmap_ { pub palette_mode: ::std::os::raw::c_uchar, pub palette: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_FT_Bitmap_() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(FT_Bitmap_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Bitmap_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rows as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(rows) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_grays as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(num_grays) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_mode as *const _ as usize }, - 26usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(pixel_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).palette_mode as *const _ as usize }, - 27usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(palette_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).palette as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_), - "::", - stringify!(palette) - ) - ); -} pub type FT_Bitmap = FT_Bitmap_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3225,79 +2282,6 @@ pub struct FT_Outline_ { pub contours: *mut ::std::os::raw::c_short, pub flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_FT_Outline_() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(FT_Outline_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Outline_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_contours as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(n_contours) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_points as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(n_points) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).points as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(points) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(tags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).contours as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(contours) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Outline_), - "::", - stringify!(flags) - ) - ); -} pub type FT_Outline = FT_Outline_; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -3324,39 +2308,6 @@ pub struct FT_Generic_ { pub data: *mut ::std::os::raw::c_void, pub finalizer: FT_Generic_Finalizer, } -#[test] -fn bindgen_test_layout_FT_Generic_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_Generic_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Generic_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Generic_), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finalizer as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Generic_), - "::", - stringify!(finalizer) - ) - ); -} pub type FT_Generic = FT_Generic_; pub type FT_ListNode = *mut FT_ListNodeRec_; #[repr(C)] @@ -3366,88 +2317,12 @@ pub struct FT_ListNodeRec_ { pub next: FT_ListNode, pub data: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_FT_ListNodeRec_() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(FT_ListNodeRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_ListNodeRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_ListNodeRec_), - "::", - stringify!(data) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FT_ListRec_ { pub head: FT_ListNode, pub tail: FT_ListNode, } -#[test] -fn bindgen_test_layout_FT_ListRec_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_ListRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_ListRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).head as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_ListRec_), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tail as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_ListRec_), - "::", - stringify!(tail) - ) - ); -} pub type FT_ListRec = FT_ListRec_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3461,99 +2336,6 @@ pub struct FT_Glyph_Metrics_ { pub vertBearingY: FT_Pos, pub vertAdvance: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Glyph_Metrics_() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(FT_Glyph_Metrics_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Glyph_Metrics_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiBearingX as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiBearingX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiBearingY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiBearingY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).horiAdvance as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(horiAdvance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertBearingX as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertBearingX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertBearingY as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertBearingY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertAdvance as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_Glyph_Metrics_), - "::", - stringify!(vertAdvance) - ) - ); -} pub type FT_Glyph_Metrics = FT_Glyph_Metrics_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3564,69 +2346,6 @@ pub struct FT_Bitmap_Size_ { pub x_ppem: FT_Pos, pub y_ppem: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Bitmap_Size_() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(FT_Bitmap_Size_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Bitmap_Size_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_ppem as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(x_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_ppem as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Bitmap_Size_), - "::", - stringify!(y_ppem) - ) - ); -} pub type FT_Bitmap_Size = FT_Bitmap_Size_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3689,59 +2408,6 @@ pub struct FT_CharMapRec_ { pub platform_id: FT_UShort, pub encoding_id: FT_UShort, } -#[test] -fn bindgen_test_layout_FT_CharMapRec_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(FT_CharMapRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_CharMapRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).encoding as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(encoding) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).platform_id as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(platform_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).encoding_id as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(FT_CharMapRec_), - "::", - stringify!(encoding_id) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FT_Face_InternalRec_ { @@ -3783,329 +2449,6 @@ pub struct FT_FaceRec_ { pub extensions: *mut ::std::os::raw::c_void, pub internal: FT_Face_Internal, } -#[test] -fn bindgen_test_layout_FT_FaceRec_() { - assert_eq!( - ::std::mem::size_of::(), - 248usize, - concat!("Size of: ", stringify!(FT_FaceRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_FaceRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_faces as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_faces) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face_index as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(face_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face_flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(face_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).style_flags as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(style_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_glyphs as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_glyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).family_name as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(family_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).style_name as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(style_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_fixed_sizes as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_fixed_sizes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).available_sizes as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(available_sizes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_charmaps as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(num_charmaps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charmaps as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(charmaps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bbox as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(bbox) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).units_per_EM as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(units_per_EM) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascender as *const _ as usize }, - 138usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(ascender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descender as *const _ as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(descender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 142usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance_width as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(max_advance_width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance_height as *const _ as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(max_advance_height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).underline_position as *const _ as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(underline_position) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).underline_thickness as *const _ as usize }, - 150usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(underline_thickness) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).glyph as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(glyph) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charmap as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(charmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).driver as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(driver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizes_list as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(sizes_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).autohint as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(autohint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extensions as *const _ as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(extensions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(FT_FaceRec_), - "::", - stringify!(internal) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FT_Size_InternalRec_ { @@ -4124,99 +2467,6 @@ pub struct FT_Size_Metrics_ { pub height: FT_Pos, pub max_advance: FT_Pos, } -#[test] -fn bindgen_test_layout_FT_Size_Metrics_() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(FT_Size_Metrics_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_Size_Metrics_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_ppem as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(x_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_ppem as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(y_ppem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x_scale as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(x_scale) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y_scale as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(y_scale) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ascender as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(ascender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).descender as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(descender) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_advance as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_Size_Metrics_), - "::", - stringify!(max_advance) - ) - ); -} pub type FT_Size_Metrics = FT_Size_Metrics_; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -4226,59 +2476,6 @@ pub struct FT_SizeRec_ { pub metrics: FT_Size_Metrics, pub internal: FT_Size_Internal, } -#[test] -fn bindgen_test_layout_FT_SizeRec_() { - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(FT_SizeRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_SizeRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).metrics as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(metrics) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(FT_SizeRec_), - "::", - stringify!(internal) - ) - ); -} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct FT_SubGlyphRec_ { @@ -4317,243 +2514,6 @@ pub struct FT_GlyphSlotRec_ { pub other: *mut ::std::os::raw::c_void, pub internal: FT_Slot_Internal, } -#[test] -fn bindgen_test_layout_FT_GlyphSlotRec_() { - assert_eq!( - ::std::mem::size_of::(), - 304usize, - concat!("Size of: ", stringify!(FT_GlyphSlotRec_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(FT_GlyphSlotRec_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).library as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(library) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).face as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(face) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).glyph_index as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(glyph_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).generic as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(generic) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).metrics as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(metrics) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linearHoriAdvance as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(linearHoriAdvance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linearVertAdvance as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(linearVertAdvance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).advance as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(advance) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap_left as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap_left) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap_top as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(bitmap_top) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).outline as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(outline) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).num_subglyphs as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(num_subglyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).subglyphs as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(subglyphs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).control_data as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(control_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).control_len as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(control_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lsb_delta as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(lsb_delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rsb_delta as *const _ as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(rsb_delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).other as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(other) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).internal as *const _ as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(FT_GlyphSlotRec_), - "::", - stringify!(internal) - ) - ); -} extern "C" { pub fn hb_ft_face_create(ft_face: FT_Face, destroy: hb_destroy_func_t) -> *mut hb_face_t; }