From 5367c865e3514c20d02586a507de5887328ec024 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 31 Mar 2025 14:49:32 +0100 Subject: [PATCH] Re-generate bindings with rust-bindgen 0.71.1 --- .../src/game_activity/ffi_aarch64.rs | 3011 ++++-------- android-activity/src/game_activity/ffi_arm.rs | 3308 +++++-------- .../src/game_activity/ffi_i686.rs | 4258 ++++------------ .../src/game_activity/ffi_x86_64.rs | 4311 ++++------------- 4 files changed, 4152 insertions(+), 10736 deletions(-) diff --git a/android-activity/src/game_activity/ffi_aarch64.rs b/android-activity/src/game_activity/ffi_aarch64.rs index cd3fabd..461f377 100644 --- a/android-activity/src/game_activity/ffi_aarch64.rs +++ b/android-activity/src/game_activity/ffi_aarch64.rs @@ -1,5 +1,15 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ +#[doc = r" If Bindgen could only determine the size and alignment of a"] +#[doc = r" type, it is represented like this."] +#[derive(PartialEq, Copy, Clone, Debug, Hash)] +#[repr(C)] +pub struct __BindgenOpaqueArray(pub [T; N]); +impl Default for __BindgenOpaqueArray { + fn default() -> Self { + Self([::default(); N]) + } +} pub const __BIONIC__: u32 = 1; pub const __WORDSIZE: u32 = 64; pub const __bos_level: u32 = 0; @@ -24,11 +34,12 @@ pub const __ANDROID_API_R__: u32 = 30; pub const __ANDROID_API_S__: u32 = 31; pub const __ANDROID_API_T__: u32 = 33; pub const __ANDROID_API_U__: u32 = 34; +pub const __ANDROID_API_V__: u32 = 35; pub const __ANDROID_NDK__: u32 = 1; -pub const __NDK_MAJOR__: u32 = 25; -pub const __NDK_MINOR__: u32 = 2; +pub const __NDK_MAJOR__: u32 = 26; +pub const __NDK_MINOR__: u32 = 1; pub const __NDK_BETA__: u32 = 0; -pub const __NDK_BUILD__: u32 = 9519653; +pub const __NDK_BUILD__: u32 = 10909125; pub const __NDK_CANARY__: u32 = 0; pub const WCHAR_MIN: u8 = 0u8; pub const INT8_MIN: i32 = -128; @@ -61,11 +72,10 @@ pub const WINT_MAX: u32 = 4294967295; pub const WINT_MIN: u32 = 0; pub const __BITS_PER_LONG: u32 = 64; pub const __FD_SETSIZE: u32 = 1024; -pub const __GNUC_VA_LIST: u32 = 1; pub const AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT: u32 = 8; +pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; pub const __PRI_64_prefix: &[u8; 2] = b"l\0"; pub const __PRI_PTR_prefix: &[u8; 2] = b"l\0"; pub const __PRI_FAST_prefix: &[u8; 2] = b"l\0"; @@ -97,6 +107,34 @@ pub const PRIiFAST32: &[u8; 3] = b"li\0"; pub const PRIiFAST64: &[u8; 3] = b"li\0"; pub const PRIiMAX: &[u8; 3] = b"ji\0"; pub const PRIiPTR: &[u8; 3] = b"li\0"; +pub const PRIb8: &[u8; 2] = b"b\0"; +pub const PRIb16: &[u8; 2] = b"b\0"; +pub const PRIb32: &[u8; 2] = b"b\0"; +pub const PRIb64: &[u8; 3] = b"lb\0"; +pub const PRIbLEAST8: &[u8; 2] = b"b\0"; +pub const PRIbLEAST16: &[u8; 2] = b"b\0"; +pub const PRIbLEAST32: &[u8; 2] = b"b\0"; +pub const PRIbLEAST64: &[u8; 3] = b"lb\0"; +pub const PRIbFAST8: &[u8; 2] = b"b\0"; +pub const PRIbFAST16: &[u8; 3] = b"lb\0"; +pub const PRIbFAST32: &[u8; 3] = b"lb\0"; +pub const PRIbFAST64: &[u8; 3] = b"lb\0"; +pub const PRIbMAX: &[u8; 3] = b"jb\0"; +pub const PRIbPTR: &[u8; 3] = b"lb\0"; +pub const PRIB8: &[u8; 2] = b"B\0"; +pub const PRIB16: &[u8; 2] = b"B\0"; +pub const PRIB32: &[u8; 2] = b"B\0"; +pub const PRIB64: &[u8; 3] = b"lB\0"; +pub const PRIBLEAST8: &[u8; 2] = b"B\0"; +pub const PRIBLEAST16: &[u8; 2] = b"B\0"; +pub const PRIBLEAST32: &[u8; 2] = b"B\0"; +pub const PRIBLEAST64: &[u8; 3] = b"lB\0"; +pub const PRIBFAST8: &[u8; 2] = b"B\0"; +pub const PRIBFAST16: &[u8; 3] = b"lB\0"; +pub const PRIBFAST32: &[u8; 3] = b"lB\0"; +pub const PRIBFAST64: &[u8; 3] = b"lB\0"; +pub const PRIBMAX: &[u8; 3] = b"jB\0"; +pub const PRIBPTR: &[u8; 3] = b"lB\0"; pub const PRIo8: &[u8; 2] = b"o\0"; pub const PRIo16: &[u8; 2] = b"o\0"; pub const PRIo32: &[u8; 2] = b"o\0"; @@ -181,6 +219,34 @@ pub const SCNiFAST32: &[u8; 3] = b"li\0"; pub const SCNiFAST64: &[u8; 3] = b"li\0"; pub const SCNiMAX: &[u8; 3] = b"ji\0"; pub const SCNiPTR: &[u8; 3] = b"li\0"; +pub const SCNb8: &[u8; 4] = b"hhb\0"; +pub const SCNb16: &[u8; 3] = b"hb\0"; +pub const SCNb32: &[u8; 2] = b"b\0"; +pub const SCNb64: &[u8; 3] = b"lb\0"; +pub const SCNbLEAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbLEAST16: &[u8; 3] = b"hb\0"; +pub const SCNbLEAST32: &[u8; 2] = b"b\0"; +pub const SCNbLEAST64: &[u8; 3] = b"lb\0"; +pub const SCNbFAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbFAST16: &[u8; 3] = b"lb\0"; +pub const SCNbFAST32: &[u8; 3] = b"lb\0"; +pub const SCNbFAST64: &[u8; 3] = b"lb\0"; +pub const SCNbMAX: &[u8; 3] = b"jb\0"; +pub const SCNbPTR: &[u8; 3] = b"lb\0"; +pub const SCNB8: &[u8; 4] = b"hhB\0"; +pub const SCNB16: &[u8; 3] = b"hB\0"; +pub const SCNB32: &[u8; 2] = b"B\0"; +pub const SCNB64: &[u8; 3] = b"lB\0"; +pub const SCNBLEAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBLEAST16: &[u8; 3] = b"hB\0"; +pub const SCNBLEAST32: &[u8; 2] = b"B\0"; +pub const SCNBLEAST64: &[u8; 3] = b"lB\0"; +pub const SCNBFAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBFAST16: &[u8; 3] = b"lB\0"; +pub const SCNBFAST32: &[u8; 3] = b"lB\0"; +pub const SCNBFAST64: &[u8; 3] = b"lB\0"; +pub const SCNBMAX: &[u8; 3] = b"jB\0"; +pub const SCNBPTR: &[u8; 3] = b"lB\0"; pub const SCNo8: &[u8; 4] = b"hho\0"; pub const SCNo16: &[u8; 3] = b"ho\0"; pub const SCNo32: &[u8; 2] = b"o\0"; @@ -225,12 +291,12 @@ pub const SCNxMAX: &[u8; 3] = b"jx\0"; pub const SCNxPTR: &[u8; 3] = b"lx\0"; pub const GAME_ACTIVITY_POINTER_INFO_AXIS_COUNT: u32 = 48; pub const GAMEACTIVITY_MAX_NUM_POINTERS_IN_MOTION_EVENT: u32 = 8; -pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 2; +pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 4; pub const GAMETEXTINPUT_MINOR_VERSION: u32 = 0; pub const GAMETEXTINPUT_BUGFIX_VERSION: u32 = 0; -pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 2; +pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 4; pub const GAMEACTIVITY_MINOR_VERSION: u32 = 0; -pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 2; +pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 0; pub const POLLIN: u32 = 1; pub const POLLPRI: u32 = 2; pub const POLLOUT: u32 = 4; @@ -248,6 +314,10 @@ pub const FPSIMD_MAGIC: u32 = 1179680769; pub const ESR_MAGIC: u32 = 1163088385; pub const EXTRA_MAGIC: u32 = 1163416577; pub const SVE_MAGIC: u32 = 1398162689; +pub const SVE_SIG_FLAG_SM: u32 = 1; +pub const TPIDR2_MAGIC: u32 = 1414547714; +pub const ZA_MAGIC: u32 = 1412850501; +pub const ZT_MAGIC: u32 = 1515474433; pub const __SVE_VQ_BYTES: u32 = 16; pub const __SVE_VQ_MIN: u32 = 1; pub const __SVE_VQ_MAX: u32 = 512; @@ -263,6 +333,8 @@ pub const SVE_VL_MIN: u32 = 16; pub const SVE_VL_MAX: u32 = 8192; pub const SVE_NUM_ZREGS: u32 = 32; pub const SVE_NUM_PREGS: u32 = 16; +pub const ZT_SIG_REG_SIZE: u32 = 512; +pub const ZT_SIG_REG_BYTES: u32 = 64; pub const NR_OPEN: u32 = 1024; pub const NGROUPS_MAX: u32 = 65536; pub const ARG_MAX: u32 = 131072; @@ -553,6 +625,7 @@ pub const TRAP_HWBKPT: u32 = 4; pub const TRAP_UNK: u32 = 5; pub const TRAP_PERF: u32 = 6; pub const NSIGTRAP: u32 = 6; +pub const TRAP_PERF_FLAG_ASYNC: u32 = 1; pub const CLD_EXITED: u32 = 1; pub const CLD_KILLED: u32 = 2; pub const CLD_DUMPED: u32 = 3; @@ -608,6 +681,9 @@ pub const TIMER_ABSTIME: u32 = 1; pub const FD_SETSIZE: u32 = 1024; pub const CLOCKS_PER_SEC: u32 = 1000000; pub const TIME_UTC: u32 = 1; +pub const TIME_MONOTONIC: u32 = 2; +pub const TIME_ACTIVE: u32 = 3; +pub const TIME_THREAD_ACTIVE: u32 = 4; pub const CSIGNAL: u32 = 255; pub const CLONE_VM: u32 = 256; pub const CLONE_FS: u32 = 512; @@ -693,32 +769,22 @@ fn bindgen_test_layout_max_align_t() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(max_align_t)) + "Size of max_align_t" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(max_align_t)) + "Alignment of max_align_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) + "Offset of field: max_align_t::__clang_max_align_nonce1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) + "Offset of field: max_align_t::__clang_max_align_nonce2" ); } pub type __int8_t = ::std::os::raw::c_schar; @@ -769,22 +835,17 @@ fn bindgen_test_layout___kernel_fd_set() { assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) + "Size of __kernel_fd_set" ); assert_eq!( ::std::mem::align_of::<__kernel_fd_set>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) + "Alignment of __kernel_fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: __kernel_fd_set::fds_bits" ); } pub type __kernel_sighandler_t = @@ -821,22 +882,17 @@ fn bindgen_test_layout___kernel_fsid_t() { assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) + "Size of __kernel_fsid_t" ); assert_eq!( ::std::mem::align_of::<__kernel_fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) + "Alignment of __kernel_fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) + "Offset of field: __kernel_fsid_t::val" ); } pub type __kernel_off_t = __kernel_long_t; @@ -899,7 +955,7 @@ pub type loff_t = off_t; pub type off64_t = loff_t; pub type __socklen_t = u32; pub type socklen_t = __socklen_t; -pub type __va_list = [u64; 4usize]; +pub type __va_list = __BindgenOpaqueArray; pub type uint_t = ::std::os::raw::c_uint; pub type uint = ::std::os::raw::c_uint; pub type u_char = ::std::os::raw::c_uchar; @@ -1204,6 +1260,22 @@ pub const AKEYCODE_REFRESH: _bindgen_ty_2 = 285; pub const AKEYCODE_THUMBS_UP: _bindgen_ty_2 = 286; pub const AKEYCODE_THUMBS_DOWN: _bindgen_ty_2 = 287; pub const AKEYCODE_PROFILE_SWITCH: _bindgen_ty_2 = 288; +pub const AKEYCODE_VIDEO_APP_1: _bindgen_ty_2 = 289; +pub const AKEYCODE_VIDEO_APP_2: _bindgen_ty_2 = 290; +pub const AKEYCODE_VIDEO_APP_3: _bindgen_ty_2 = 291; +pub const AKEYCODE_VIDEO_APP_4: _bindgen_ty_2 = 292; +pub const AKEYCODE_VIDEO_APP_5: _bindgen_ty_2 = 293; +pub const AKEYCODE_VIDEO_APP_6: _bindgen_ty_2 = 294; +pub const AKEYCODE_VIDEO_APP_7: _bindgen_ty_2 = 295; +pub const AKEYCODE_VIDEO_APP_8: _bindgen_ty_2 = 296; +pub const AKEYCODE_FEATURED_APP_1: _bindgen_ty_2 = 297; +pub const AKEYCODE_FEATURED_APP_2: _bindgen_ty_2 = 298; +pub const AKEYCODE_FEATURED_APP_3: _bindgen_ty_2 = 299; +pub const AKEYCODE_FEATURED_APP_4: _bindgen_ty_2 = 300; +pub const AKEYCODE_DEMO_APP_1: _bindgen_ty_2 = 301; +pub const AKEYCODE_DEMO_APP_2: _bindgen_ty_2 = 302; +pub const AKEYCODE_DEMO_APP_3: _bindgen_ty_2 = 303; +pub const AKEYCODE_DEMO_APP_4: _bindgen_ty_2 = 304; pub type _bindgen_ty_2 = ::std::os::raw::c_uint; pub const ALOOPER_PREPARE_ALLOW_NON_CALLBACKS: _bindgen_ty_3 = 1; pub type _bindgen_ty_3 = ::std::os::raw::c_uint; @@ -1218,8 +1290,8 @@ pub const ALOOPER_EVENT_ERROR: _bindgen_ty_5 = 4; pub const ALOOPER_EVENT_HANGUP: _bindgen_ty_5 = 8; pub const ALOOPER_EVENT_INVALID: _bindgen_ty_5 = 16; pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -pub type va_list = [u64; 4usize]; -pub type __gnuc_va_list = [u64; 4usize]; +pub type __gnuc_va_list = __BindgenOpaqueArray; +pub type va_list = __BindgenOpaqueArray; #[repr(C)] pub struct JavaVMAttachArgs { pub version: jint, @@ -1233,42 +1305,27 @@ fn bindgen_test_layout_JavaVMAttachArgs() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) + "Size of JavaVMAttachArgs" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) + "Alignment of JavaVMAttachArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMAttachArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) + "Offset of field: JavaVMAttachArgs::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) + "Offset of field: JavaVMAttachArgs::group" ); } #[repr(C)] @@ -1284,32 +1341,22 @@ fn bindgen_test_layout_JavaVMOption() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(JavaVMOption)) + "Size of JavaVMOption" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMOption)) + "Alignment of JavaVMOption" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) + "Offset of field: JavaVMOption::optionString" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) + "Offset of field: JavaVMOption::extraInfo" ); } #[repr(C)] @@ -1326,52 +1373,32 @@ fn bindgen_test_layout_JavaVMInitArgs() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) + "Size of JavaVMInitArgs" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) + "Alignment of JavaVMInitArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMInitArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) + "Offset of field: JavaVMInitArgs::nOptions" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) + "Offset of field: JavaVMInitArgs::options" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) + "Offset of field: JavaVMInitArgs::ignoreUnrecognized" ); } pub const AKEY_STATE_UNKNOWN: _bindgen_ty_6 = -1; @@ -1841,32 +1868,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -1971,6 +1988,10 @@ pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_S8_UINT: AHardwareBuffer pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420: AHardwareBuffer_Format = 35; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_YCbCr_P010: AHardwareBuffer_Format = 54; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R8_UNORM: AHardwareBuffer_Format = 56; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16_UINT: AHardwareBuffer_Format = 57; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16G16_UINT: AHardwareBuffer_Format = 58; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM: AHardwareBuffer_Format = + 59; pub type AHardwareBuffer_Format = ::std::os::raw::c_uint; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_CPU_READ_NEVER: AHardwareBuffer_UsageFlags = 0; @@ -2008,6 +2029,8 @@ pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP: AHardwareBuffer_UsageFlags = 33554432; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE: AHardwareBuffer_UsageFlags = 67108864; +pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_FRONT_BUFFER: + AHardwareBuffer_UsageFlags = 4294967296; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_0: AHardwareBuffer_UsageFlags = 268435456; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_1: AHardwareBuffer_UsageFlags = @@ -2068,92 +2091,52 @@ fn bindgen_test_layout_AHardwareBuffer_Desc() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) + "Size of AHardwareBuffer_Desc" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) + "Alignment of AHardwareBuffer_Desc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) + "Offset of field: AHardwareBuffer_Desc::width" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) + "Offset of field: AHardwareBuffer_Desc::height" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) + "Offset of field: AHardwareBuffer_Desc::layers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) + "Offset of field: AHardwareBuffer_Desc::format" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) + "Offset of field: AHardwareBuffer_Desc::usage" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) + "Offset of field: AHardwareBuffer_Desc::stride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) + "Offset of field: AHardwareBuffer_Desc::rfu0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) + "Offset of field: AHardwareBuffer_Desc::rfu1" ); } #[repr(C)] @@ -2171,42 +2154,27 @@ fn bindgen_test_layout_AHardwareBuffer_Plane() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) + "Size of AHardwareBuffer_Plane" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) + "Alignment of AHardwareBuffer_Plane" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) + "Offset of field: AHardwareBuffer_Plane::data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) + "Offset of field: AHardwareBuffer_Plane::pixelStride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) + "Offset of field: AHardwareBuffer_Plane::rowStride" ); } #[repr(C)] @@ -2223,32 +2191,22 @@ fn bindgen_test_layout_AHardwareBuffer_Planes() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) + "Size of AHardwareBuffer_Planes" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) + "Alignment of AHardwareBuffer_Planes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) + "Offset of field: AHardwareBuffer_Planes::planeCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) + "Offset of field: AHardwareBuffer_Planes::planes" ); } #[repr(C)] @@ -2348,62 +2306,37 @@ fn bindgen_test_layout_GameActivityPointerAxes() { assert_eq!( ::std::mem::size_of::(), 208usize, - concat!("Size of: ", stringify!(GameActivityPointerAxes)) + "Size of GameActivityPointerAxes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityPointerAxes)) + "Alignment of GameActivityPointerAxes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(id) - ) + "Offset of field: GameActivityPointerAxes::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).toolType) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(toolType) - ) + "Offset of field: GameActivityPointerAxes::toolType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).axisValues) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(axisValues) - ) + "Offset of field: GameActivityPointerAxes::axisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawX) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawX) - ) + "Offset of field: GameActivityPointerAxes::rawX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawY) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawY) - ) + "Offset of field: GameActivityPointerAxes::rawY" ); } extern "C" { @@ -2453,202 +2386,107 @@ fn bindgen_test_layout_GameActivityMotionEvent() { assert_eq!( ::std::mem::size_of::(), 1760usize, - concat!("Size of: ", stringify!(GameActivityMotionEvent)) + "Size of GameActivityMotionEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityMotionEvent)) + "Alignment of GameActivityMotionEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityMotionEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityMotionEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityMotionEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityMotionEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityMotionEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityMotionEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityMotionEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actionButton) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(actionButton) - ) + "Offset of field: GameActivityMotionEvent::actionButton" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buttonState) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(buttonState) - ) + "Offset of field: GameActivityMotionEvent::buttonState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).classification) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(classification) - ) + "Offset of field: GameActivityMotionEvent::classification" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edgeFlags) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(edgeFlags) - ) + "Offset of field: GameActivityMotionEvent::edgeFlags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointerCount) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointerCount) - ) + "Offset of field: GameActivityMotionEvent::pointerCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointers) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointers) - ) + "Offset of field: GameActivityMotionEvent::pointers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historySize) as usize - ptr as usize }, 1724usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historySize) - ) + "Offset of field: GameActivityMotionEvent::historySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesMillis) as usize - ptr as usize }, 1728usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesMillis) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesMillis" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesNanos) as usize - ptr as usize }, 1736usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesNanos) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesNanos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalAxisValues) as usize - ptr as usize }, 1744usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalAxisValues) - ) + "Offset of field: GameActivityMotionEvent::historicalAxisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionX) as usize - ptr as usize }, 1752usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionX) - ) + "Offset of field: GameActivityMotionEvent::precisionX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionY) as usize - ptr as usize }, 1756usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionY) - ) + "Offset of field: GameActivityMotionEvent::precisionY" ); } extern "C" { @@ -2663,14 +2501,6 @@ extern "C" { #[doc = " \\brief Handle the freeing of the GameActivityMotionEvent struct."] pub fn GameActivityMotionEvent_destroy(c_event: *mut GameActivityMotionEvent); } -extern "C" { - #[doc = " \\brief Convert a Java `MotionEvent` to a `GameActivityMotionEvent`.\n\n This is done automatically by the GameActivity: see `onTouchEvent` to set\n a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityMotionEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityMotionEvent, - ); -} #[doc = " \\brief Describe a key event that happened on the GameActivity SurfaceView.\n\n This is 1:1 mapping to the information contained in a Java `KeyEvent`\n (see https://developer.android.com/reference/android/view/KeyEvent).\n The only exception is the event times, which are reported as\n nanoseconds in this struct."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2694,146 +2524,69 @@ fn bindgen_test_layout_GameActivityKeyEvent() { assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(GameActivityKeyEvent)) + "Size of GameActivityKeyEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityKeyEvent)) + "Alignment of GameActivityKeyEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityKeyEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityKeyEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityKeyEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityKeyEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityKeyEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityKeyEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityKeyEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(modifiers) - ) + "Offset of field: GameActivityKeyEvent::modifiers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).repeatCount) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(repeatCount) - ) + "Offset of field: GameActivityKeyEvent::repeatCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyCode) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(keyCode) - ) + "Offset of field: GameActivityKeyEvent::keyCode" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scanCode) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(scanCode) - ) + "Offset of field: GameActivityKeyEvent::scanCode" ); } -extern "C" { - #[doc = " \\brief Convert a Java `KeyEvent` to a `GameActivityKeyEvent`.\n\n This is done automatically by the GameActivity: see `onKeyUp` and `onKeyDown`\n to set a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityKeyEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityKeyEvent, - ); -} -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: - GameCommonInsetsType = 3; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; -#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] -pub type GameCommonInsetsType = ::std::os::raw::c_uint; #[doc = " This struct holds a span within a region of text from start (inclusive) to\n end (exclusive). An empty span or cursor position is specified with\n start==end. An undefined span is specified with start = end = SPAN_UNDEFINED."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2850,37 +2603,27 @@ fn bindgen_test_layout_GameTextInputSpan() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(GameTextInputSpan)) + "Size of GameTextInputSpan" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputSpan)) + "Alignment of GameTextInputSpan" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(start) - ) + "Offset of field: GameTextInputSpan::start" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(end) - ) + "Offset of field: GameTextInputSpan::end" ); } pub const GameTextInputSpanFlag_SPAN_UNDEFINED: GameTextInputSpanFlag = -1; #[doc = " Values with special meaning in a GameTextInputSpan."] -pub type GameTextInputSpanFlag = ::std::os::raw::c_int; +pub type GameTextInputSpanFlag = i32; #[doc = " This struct holds the state of an editable section of text.\n The text can have a selection and a composing region defined on it.\n A composing region is used by IMEs that allow input using multiple steps to\n compose a glyph or word. Use functions GameTextInput_getState and\n GameTextInput_setState to read and modify the state that an IME is editing."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2901,52 +2644,32 @@ fn bindgen_test_layout_GameTextInputState() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(GameTextInputState)) + "Size of GameTextInputState" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameTextInputState)) + "Alignment of GameTextInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_UTF8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_UTF8) - ) + "Offset of field: GameTextInputState::text_UTF8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_length) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_length) - ) + "Offset of field: GameTextInputState::text_length" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).selection) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(selection) - ) + "Offset of field: GameTextInputState::selection" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).composingRegion) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(composingRegion) - ) + "Offset of field: GameTextInputState::composingRegion" ); } #[doc = " A callback called by GameTextInput_getState.\n @param context User-defined context.\n @param state State, owned by the library, that will be valid for the duration\n of the callback."] @@ -2978,7 +2701,7 @@ pub const ShowImeFlags_SHOW_IME_UNDEFINED: ShowImeFlags = 0; pub const ShowImeFlags_SHOW_IMPLICIT: ShowImeFlags = 1; pub const ShowImeFlags_SHOW_FORCED: ShowImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_showIme."] -pub type ShowImeFlags = ::std::os::raw::c_uint; +pub type ShowImeFlags = u32; extern "C" { #[doc = " Show the IME. Calls InputMethodManager.showSoftInput().\n @param input A valid GameTextInput library handle.\n @param flags Defined in ShowImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_showIme(input: *mut GameTextInput, flags: u32); @@ -2987,9 +2710,9 @@ pub const HideImeFlags_HIDE_IME_UNDEFINED: HideImeFlags = 0; pub const HideImeFlags_HIDE_IMPLICIT_ONLY: HideImeFlags = 1; pub const HideImeFlags_HIDE_NOT_ALWAYS: HideImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_hideIme."] -pub type HideImeFlags = ::std::os::raw::c_uint; +pub type HideImeFlags = u32; extern "C" { - #[doc = " Show the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] + #[doc = " Hide the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_hideIme(input: *mut GameTextInput, flags: u32); } extern "C" { @@ -3016,7 +2739,7 @@ pub type GameTextInputEventCallback = ::std::option::Option< ), >; extern "C" { - #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback."] + #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback.\n This function is deprecated. Don't perform any complex processing inside\n the callback other than copying the state variable. Using any synchronization\n primitives inside this callback may cause a deadlock."] pub fn GameTextInput_setEventCallback( input: *mut GameTextInput, callback: GameTextInputEventCallback, @@ -3059,6 +2782,144 @@ extern "C" { context: *mut ::std::os::raw::c_void, ); } +#[doc = " Mask of bits that determine the overall class\n of text being given. Currently supported classes are:\n {@link #TYPE_CLASS_TEXT}, {@link #TYPE_CLASS_NUMBER},\n {@link #TYPE_CLASS_PHONE}, {@link #TYPE_CLASS_DATETIME}.\n

IME authors: If the class is not one you\n understand, assume {@link #TYPE_CLASS_TEXT} with NO variation\n or flags.

"] +pub const GameTextInputType_TYPE_MASK_CLASS: GameTextInputType = 15; +#[doc = " Mask of bits that determine the variation of\n the base content class."] +pub const GameTextInputType_TYPE_MASK_VARIATION: GameTextInputType = 4080; +#[doc = " Mask of bits that provide addition bit flags\n of options."] +pub const GameTextInputType_TYPE_MASK_FLAGS: GameTextInputType = 16773120; +#[doc = " Special content type for when no explicit type has been specified.\n This should be interpreted to mean that the target input connection\n is not rich, it can not process and show things like candidate text nor\n retrieve the current text, so the input method will need to run in a\n limited \"generate key events\" mode, if it supports it. Note that some\n input methods may not support it, for example a voice-based input\n method will likely not be able to generate key events even if this\n flag is set."] +pub const GameTextInputType_TYPE_NULL: GameTextInputType = 0; +#[doc = " Class for normal text. This class supports the following flags (only\n one of which should be set):\n {@link #TYPE_TEXT_FLAG_CAP_CHARACTERS},\n {@link #TYPE_TEXT_FLAG_CAP_WORDS}, and.\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. It also supports the\n following variations:\n {@link #TYPE_TEXT_VARIATION_NORMAL}, and\n {@link #TYPE_TEXT_VARIATION_URI}. If you do not recognize the\n variation, normal should be assumed."] +pub const GameTextInputType_TYPE_CLASS_TEXT: GameTextInputType = 1; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize all characters. Overrides\n {@link #TYPE_TEXT_FLAG_CAP_WORDS} and\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_CHARACTERS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_CHARACTERS: GameTextInputType = 4096; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n every word. Overrides {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This\n value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_WORDS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_WORDS: GameTextInputType = 8192; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n each sentence. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_SENTENCES}. For example\n in English it means to capitalize after a period and a space (note that\n other languages may have different characters for period, or not use\n spaces, or use different grammatical rules). Of course, this only affects\n languages where there are upper-case and lower-case letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_SENTENCES: GameTextInputType = 16384; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the user is entering free-form\n text that should have auto-correction applied to it. Without this flag,\n the IME will not try to correct typos. You should always set this flag\n unless you really expect users to type non-words in this field, for\n example to choose a name for a character in a game.\n Contrast this with {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_CORRECT} means that the IME will try to\n auto-correct typos as the user is typing, but does not define whether\n the IME offers an interface to show suggestions."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_CORRECT: GameTextInputType = 32768; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the text editor (which means\n the application) is performing auto-completion of the text being entered\n based on its own semantics, which it will present to the user as they type.\n This generally means that the input method should not be showing\n candidates itself, but can expect the editor to supply its own\n completions/candidates from\n {@link android.view.inputmethod.InputMethodSession#displayCompletions\n InputMethodSession.displayCompletions()} as a result of the editor calling\n {@link android.view.inputmethod.InputMethodManager#displayCompletions\n InputMethodManager.displayCompletions()}.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_COMPLETE} means the editor should show an\n interface for displaying suggestions, but instead of supplying its own\n it will rely on the Editor to pass completions/corrections."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_COMPLETE: GameTextInputType = 65536; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: multiple lines of text can be\n entered into the field. If this flag is not set, the text field\n will be constrained to a single line. The IME may also choose not to\n display an enter key when this flag is not set, as there should be no\n need to create new lines."] +pub const GameTextInputType_TYPE_TEXT_FLAG_MULTI_LINE: GameTextInputType = 131072; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the regular text view associated\n with this should not be multi-line, but when a fullscreen input method\n is providing text it should use multiple lines if it can."] +pub const GameTextInputType_TYPE_TEXT_FLAG_IME_MULTI_LINE: GameTextInputType = 262144; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the input method does not need to\n display any dictionary-based candidates. This is useful for text views that\n do not contain words from the language and do not benefit from any\n dictionary-based completions or corrections. It overrides the\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} value when set.\n Please avoid using this unless you are certain this is what you want.\n Many input methods need suggestions to work well, for example the ones\n based on gesture typing. Consider clearing\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} instead if you just do not\n want the IME to correct typos.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE}:\n {@code TYPE_TEXT_FLAG_NO_SUGGESTIONS} means the IME does not need to\n show an interface to display suggestions. Most IMEs will also take this to\n mean they do not need to try to auto-correct what the user is typing."] +pub const GameTextInputType_TYPE_TEXT_FLAG_NO_SUGGESTIONS: GameTextInputType = 524288; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: Let the IME know the text conversion\n suggestions are required by the application. Text conversion suggestion is\n for the transliteration languages which has pronunciation characters and\n target characters. When the user is typing the pronunciation charactes, the\n IME could provide the possible target characters to the user. When this\n flag is set, the IME should insert the text conversion suggestions through\n {@link Builder#setTextConversionSuggestions(List)} and\n the {@link TextAttribute} with initialized with the text conversion\n suggestions is provided by the IME to the application. To receive the\n additional information, the application needs to implement {@link\n InputConnection#setComposingText(CharSequence, int, TextAttribute)},\n {@link InputConnection#setComposingRegion(int, int, TextAttribute)}, and\n {@link InputConnection#commitText(CharSequence, int, TextAttribute)}."] +pub const GameTextInputType_TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS: GameTextInputType = + 1048576; +#[doc = " Default variation of {@link #TYPE_CLASS_TEXT}: plain old normal text."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a URI."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_URI: GameTextInputType = 16; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering an e-mail address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_ADDRESS: GameTextInputType = 32; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the subject line of\n an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_SUBJECT: GameTextInputType = 48; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a short, possibly informal\n message such as an instant message or a text message."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_SHORT_MESSAGE: GameTextInputType = 64; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the content of a long,\n possibly formal message such as the body of an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_LONG_MESSAGE: GameTextInputType = 80; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the name of a person."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PERSON_NAME: GameTextInputType = 96; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a postal mailing address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_POSTAL_ADDRESS: GameTextInputType = 112; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PASSWORD: GameTextInputType = 128; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password, which should\n be visible to the user."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_VISIBLE_PASSWORD: GameTextInputType = 144; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text inside of a web form."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EDIT_TEXT: GameTextInputType = 160; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text to filter contents\n of a list etc."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_FILTER: GameTextInputType = 176; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text for phonetic\n pronunciation, such as a phonetic name field in contacts. This is mostly\n useful for languages where one spelling may have several phonetic\n readings, like Japanese."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PHONETIC: GameTextInputType = 192; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering e-mail address inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_EMAIL_ADDRESS}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS: GameTextInputType = 208; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering password inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_PASSWORD}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_PASSWORD: GameTextInputType = 224; +#[doc = " Class for numeric text. This class supports the following flags:\n {@link #TYPE_NUMBER_FLAG_SIGNED} and\n {@link #TYPE_NUMBER_FLAG_DECIMAL}. It also supports the following\n variations: {@link #TYPE_NUMBER_VARIATION_NORMAL} and\n {@link #TYPE_NUMBER_VARIATION_PASSWORD}.\n

IME authors: If you do not recognize\n the variation, normal should be assumed.

"] +pub const GameTextInputType_TYPE_CLASS_NUMBER: GameTextInputType = 2; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is signed, allowing\n a positive or negative sign at the start."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_SIGNED: GameTextInputType = 4096; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is decimal, allowing\n a decimal point to provide fractional values."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_DECIMAL: GameTextInputType = 8192; +#[doc = " Default variation of {@link #TYPE_CLASS_NUMBER}: plain normal\n numeric text. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be dropped when passed through\n {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_NUMBER}: entering a numeric password.\n This was added in {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An\n IME must target this API version or later to see this input type; if it\n doesn't, a request for this type will be dropped when passed\n through {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_PASSWORD: GameTextInputType = 16; +#[doc = " Class for a phone number. This class currently supports no variations\n or flags."] +pub const GameTextInputType_TYPE_CLASS_PHONE: GameTextInputType = 3; +#[doc = " Class for dates and times. It supports the\n following variations:\n {@link #TYPE_DATETIME_VARIATION_NORMAL}\n {@link #TYPE_DATETIME_VARIATION_DATE}, and\n {@link #TYPE_DATETIME_VARIATION_TIME}."] +pub const GameTextInputType_TYPE_CLASS_DATETIME: GameTextInputType = 4; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n both a date and time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a date."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_DATE: GameTextInputType = 16; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_TIME: GameTextInputType = 32; +#[doc = " Definitions for inputType argument of GameActivity_setImeEditorInfo()\n\n
\n |-------|-------|-------|-------|\n                              1111 TYPE_MASK_CLASS\n                      11111111     TYPE_MASK_VARIATION\n          111111111111             TYPE_MASK_FLAGS\n |-------|-------|-------|-------|\n                                   TYPE_NULL\n |-------|-------|-------|-------|\n                                 1 TYPE_CLASS_TEXT\n                             1     TYPE_TEXT_VARIATION_URI\n                            1      TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n                            11     TYPE_TEXT_VARIATION_EMAIL_SUBJECT\n                           1       TYPE_TEXT_VARIATION_SHORT_MESSAGE\n                           1 1     TYPE_TEXT_VARIATION_LONG_MESSAGE\n                           11      TYPE_TEXT_VARIATION_PERSON_NAME\n                           111     TYPE_TEXT_VARIATION_POSTAL_ADDRESS\n                          1        TYPE_TEXT_VARIATION_PASSWORD\n                          1  1     TYPE_TEXT_VARIATION_VISIBLE_PASSWORD\n                          1 1      TYPE_TEXT_VARIATION_WEB_EDIT_TEXT\n                          1 11     TYPE_TEXT_VARIATION_FILTER\n                          11       TYPE_TEXT_VARIATION_PHONETIC\n                          11 1     TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS\n                          111      TYPE_TEXT_VARIATION_WEB_PASSWORD\n                     1             TYPE_TEXT_FLAG_CAP_CHARACTERS\n                    1              TYPE_TEXT_FLAG_CAP_WORDS\n                   1               TYPE_TEXT_FLAG_CAP_SENTENCES\n                  1                TYPE_TEXT_FLAG_AUTO_CORRECT\n                 1                 TYPE_TEXT_FLAG_AUTO_COMPLETE\n                1                  TYPE_TEXT_FLAG_MULTI_LINE\n               1                   TYPE_TEXT_FLAG_IME_MULTI_LINE\n              1                    TYPE_TEXT_FLAG_NO_SUGGESTIONS\n             1 TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS\n |-------|-------|-------|-------|\n                                1  TYPE_CLASS_NUMBER\n                             1     TYPE_NUMBER_VARIATION_PASSWORD\n                     1             TYPE_NUMBER_FLAG_SIGNED\n                    1              TYPE_NUMBER_FLAG_DECIMAL\n |-------|-------|-------|-------|\n                                11 TYPE_CLASS_PHONE\n |-------|-------|-------|-------|\n                               1   TYPE_CLASS_DATETIME\n                             1     TYPE_DATETIME_VARIATION_DATE\n                            1      TYPE_DATETIME_VARIATION_TIME\n |-------|-------|-------|-------|
"] +pub type GameTextInputType = u32; +#[doc = " Set of bits in {@link #imeOptions} that provide alternative actions\n associated with the \"enter\" key. This both helps the IME provide\n better feedback about what the enter key will do, and also allows it\n to provide alternative mechanisms for providing that command."] +pub const GameTextInputActionType_IME_MASK_ACTION: GameTextInputActionType = 255; +#[doc = " Bits of {@link #IME_MASK_ACTION}: no specific action has been\n associated with this editor, let the editor come up with its own if\n it can."] +pub const GameTextInputActionType_IME_ACTION_UNSPECIFIED: GameTextInputActionType = 0; +#[doc = " Bits of {@link #IME_MASK_ACTION}: there is no available action."] +pub const GameTextInputActionType_IME_ACTION_NONE: GameTextInputActionType = 1; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"go\"\n operation to take the user to the target of the text they typed.\n Typically used, for example, when entering a URL."] +pub const GameTextInputActionType_IME_ACTION_GO: GameTextInputActionType = 2; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"search\"\n operation, taking the user to the results of searching for the text\n they have typed (in whatever context is appropriate)."] +pub const GameTextInputActionType_IME_ACTION_SEARCH: GameTextInputActionType = 3; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"send\"\n operation, delivering the text to its target. This is typically used\n when composing a message in IM or SMS where sending is immediate."] +pub const GameTextInputActionType_IME_ACTION_SEND: GameTextInputActionType = 4; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"next\"\n operation, taking the user to the next field that will accept text."] +pub const GameTextInputActionType_IME_ACTION_NEXT: GameTextInputActionType = 5; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"done\"\n operation, typically meaning there is nothing more to input and the\n IME will be closed."] +pub const GameTextInputActionType_IME_ACTION_DONE: GameTextInputActionType = 6; +#[doc = " Bits of {@link #IME_MASK_ACTION}: like {@link #IME_ACTION_NEXT}, but\n for moving to the previous field. This will normally not be used to\n specify an action (since it precludes {@link #IME_ACTION_NEXT}), but\n can be returned to the app if it sets {@link #IME_FLAG_NAVIGATE_PREVIOUS}."] +pub const GameTextInputActionType_IME_ACTION_PREVIOUS: GameTextInputActionType = 7; +#[doc = " actionId and imeOptions argument of GameActivity_setImeEditorInfo().\n\n
\n |-------|-------|-------|-------|\n                              1111 IME_MASK_ACTION\n |-------|-------|-------|-------|\n                                   IME_ACTION_UNSPECIFIED\n                                 1 IME_ACTION_NONE\n                                1  IME_ACTION_GO\n                                11 IME_ACTION_SEARCH\n                               1   IME_ACTION_SEND\n                               1 1 IME_ACTION_NEXT\n                               11  IME_ACTION_DONE\n                               111 IME_ACTION_PREVIOUS\n         1                         IME_FLAG_NO_PERSONALIZED_LEARNING\n        1                          IME_FLAG_NO_FULLSCREEN\n       1                           IME_FLAG_NAVIGATE_PREVIOUS\n      1                            IME_FLAG_NAVIGATE_NEXT\n     1                             IME_FLAG_NO_EXTRACT_UI\n    1                              IME_FLAG_NO_ACCESSORY_ACTION\n   1                               IME_FLAG_NO_ENTER_ACTION\n  1                                IME_FLAG_FORCE_ASCII\n |-------|-------|-------|-------|
"] +pub type GameTextInputActionType = u32; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME should not update\n any personalized data such as typing history and personalized language\n model based on what the user typed on this text editing object. Typical\n use cases are:
  • When the application is in a special mode, where\n user's activities are expected to be not recorded in the application's\n history. Some web browsers and chat applications may have this kind of\n modes.
  • When storing typing history does not make much sense.\n Specifying this flag in typing games may help to avoid typing history from\n being filled up with words that the user is less likely to type in their\n daily life. Another example is that when the application already knows\n that the expected input is not a valid word (e.g. a promotion code that is\n not a valid word in any natural language).
  • \n
\n\n

Applications need to be aware that the flag is not a guarantee, and some\n IMEs may not respect it.

"] +pub const GameTextInputImeOptions_IME_FLAG_NO_PERSONALIZED_LEARNING: GameTextInputImeOptions = + 16777216; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME never go\n into fullscreen mode.\n By default, IMEs may go into full screen mode when they think\n it's appropriate, for example on small screens in landscape\n orientation where displaying a software keyboard may occlude\n such a large portion of the screen that the remaining part is\n too small to meaningfully display the application UI.\n If this flag is set, compliant IMEs will never go into full screen mode,\n and always leave some space to display the application UI.\n Applications need to be aware that the flag is not a guarantee, and\n some IMEs may ignore it."] +pub const GameTextInputImeOptions_IME_FLAG_NO_FULLSCREEN: GameTextInputImeOptions = 33554432; +#[doc = " Flag of {@link #imeOptions}: like {@link #IME_FLAG_NAVIGATE_NEXT}, but\n specifies there is something interesting that a backward navigation\n can focus on. If the user selects the IME's facility to backward\n navigate, this will show up in the application as an {@link\n #IME_ACTION_PREVIOUS} at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_PREVIOUS: GameTextInputImeOptions = 67108864; +#[doc = " Flag of {@link #imeOptions}: used to specify that there is something\n interesting that a forward navigation can focus on. This is like using\n {@link #IME_ACTION_NEXT}, except allows the IME to be multiline (with\n an enter key) as well as provide forward navigation. Note that some\n IMEs may not be able to do this, especially when running on a small\n screen where there is little space. In that case it does not need to\n present a UI for this option. Like {@link #IME_ACTION_NEXT}, if the\n user selects the IME's facility to forward navigate, this will show up\n in the application at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_NEXT: GameTextInputImeOptions = 134217728; +#[doc = " Flag of {@link #imeOptions}: used to specify that the IME does not need\n to show its extracted text UI. For input methods that may be fullscreen,\n often when in landscape mode, this allows them to be smaller and let part\n of the application be shown behind, through transparent UI parts in the\n fullscreen IME. The part of the UI visible to the user may not be\n responsive to touch because the IME will receive touch events, which may\n confuse the user; use {@link #IME_FLAG_NO_FULLSCREEN} instead for a better\n experience. Using this flag is discouraged and it may become deprecated in\n the future. Its meaning is unclear in some situations and it may not work\n appropriately on older versions of the platform."] +pub const GameTextInputImeOptions_IME_FLAG_NO_EXTRACT_UI: GameTextInputImeOptions = 268435456; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}, this indicates that the action\n should not be available as an accessory button on the right of the\n extracted text when the input method is full-screen. Note that by setting\n this flag, there can be cases where the action is simply never available to\n the user. Setting this generally means that you think that in fullscreen\n mode, where there is little space to show the text, it's not worth taking\n some screen real estate to display the action and it should be used instead\n to show more text."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ACCESSORY_ACTION: GameTextInputImeOptions = 536870912; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}. If this flag is not set, IMEs will\n normally replace the \"enter\" key with the action supplied. This flag\n indicates that the action should not be available in-line as a replacement\n for the \"enter\" key. Typically this is because the action has such a\n significant impact or is not recoverable enough that accidentally hitting\n it should be avoided, such as sending a message. Note that\n {@link android.widget.TextView} will automatically set this flag for you\n on multi-line text views."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ENTER_ACTION: GameTextInputImeOptions = 1073741824; +#[doc = " Flag of {@link #imeOptions}: used to request an IME that is capable of\n inputting ASCII characters. The intention of this flag is to ensure that\n the user can type Roman alphabet characters in a {@link\n android.widget.TextView}. It is typically used for an account ID or\n password input. A lot of the time, IMEs are already able to input ASCII\n even without being told so (such IMEs already respect this flag in a\n sense), but there are cases when this is not the default. For instance,\n users of languages using a different script like Arabic, Greek, Hebrew or\n Russian typically have a keyboard that can't input ASCII characters by\n default. Applications need to be aware that the flag is not a guarantee,\n and some IMEs may not respect it. However, it is strongly recommended for\n IME authors to respect this flag especially when their IME could end up\n with a state where only languages using non-ASCII are enabled."] +pub const GameTextInputImeOptions_IME_FLAG_FORCE_ASCII: GameTextInputImeOptions = 2147483648; +#[doc = " Flag of {@link #internalImeOptions}: flag is set when app window containing\n this\n {@link EditorInfo} is using {@link Configuration#ORIENTATION_PORTRAIT}\n mode.\n @hide"] +pub const GameTextInputImeOptions_IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT: GameTextInputImeOptions = + 1; +#[doc = " Generic unspecified type for {@link #imeOptions}."] +pub const GameTextInputImeOptions_IME_NULL: GameTextInputImeOptions = 0; +pub type GameTextInputImeOptions = u32; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: + GameCommonInsetsType = 3; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; +#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] +pub type GameCommonInsetsType = u8; #[doc = " This structure defines the native side of an android.app.GameActivity.\n It is created by the framework, and handed to the application's native\n code as it is being launched."] #[repr(C)] pub struct GameActivity { @@ -3090,112 +2951,62 @@ fn bindgen_test_layout_GameActivity() { assert_eq!( ::std::mem::size_of::(), 80usize, - concat!("Size of: ", stringify!(GameActivity)) + "Size of GameActivity" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivity)) + "Alignment of GameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(callbacks) - ) + "Offset of field: GameActivity::callbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(vm) - ) + "Offset of field: GameActivity::vm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(env) - ) + "Offset of field: GameActivity::env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).javaGameActivity) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(javaGameActivity) - ) + "Offset of field: GameActivity::javaGameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(internalDataPath) - ) + "Offset of field: GameActivity::internalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(externalDataPath) - ) + "Offset of field: GameActivity::externalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(sdkVersion) - ) + "Offset of field: GameActivity::sdkVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(instance) - ) + "Offset of field: GameActivity::instance" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(assetManager) - ) + "Offset of field: GameActivity::assetManager" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(obbPath) - ) + "Offset of field: GameActivity::obbPath" ); } #[doc = " A function the user should call from their callback with the data, its length\n and the library- supplied context."] @@ -3252,7 +3063,7 @@ pub struct GameActivityCallbacks { pub onNativeWindowDestroyed: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, window: *mut ANativeWindow), >, - #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] + #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] pub onConfigurationChanged: ::std::option::Option, #[doc = " The system is running low on memory. Use this callback to release\n resources you do not need, to help the system avoid killing more\n important processes."] @@ -3291,6 +3102,13 @@ pub struct GameActivityCallbacks { pub onContentRectChanged: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, rect: *const ARect), >, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onSoftwareKeyboardVisibilityChanged: + ::std::option::Option, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onEditorAction: ::std::option::Option< + unsafe extern "C" fn(activity: *mut GameActivity, action: ::std::os::raw::c_int) -> bool, + >, } #[test] fn bindgen_test_layout_GameActivityCallbacks() { @@ -3299,203 +3117,120 @@ fn bindgen_test_layout_GameActivityCallbacks() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 152usize, - concat!("Size of: ", stringify!(GameActivityCallbacks)) + 168usize, + "Size of GameActivityCallbacks" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityCallbacks)) + "Alignment of GameActivityCallbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStart) - ) + "Offset of field: GameActivityCallbacks::onStart" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onResume) - ) + "Offset of field: GameActivityCallbacks::onResume" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) + "Offset of field: GameActivityCallbacks::onSaveInstanceState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onPause) - ) + "Offset of field: GameActivityCallbacks::onPause" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStop) - ) + "Offset of field: GameActivityCallbacks::onStop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onDestroy) - ) + "Offset of field: GameActivityCallbacks::onDestroy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowFocusChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowCreated" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowResized" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowRedrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowDestroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) + "Offset of field: GameActivityCallbacks::onConfigurationChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTrimMemory) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTrimMemory) - ) + "Offset of field: GameActivityCallbacks::onTrimMemory" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTouchEvent) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTouchEvent) - ) + "Offset of field: GameActivityCallbacks::onTouchEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyDown) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyDown) - ) + "Offset of field: GameActivityCallbacks::onKeyDown" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyUp) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyUp) - ) + "Offset of field: GameActivityCallbacks::onKeyUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTextInputEvent) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTextInputEvent) - ) + "Offset of field: GameActivityCallbacks::onTextInputEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowInsetsChanged) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowInsetsChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowInsetsChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) + "Offset of field: GameActivityCallbacks::onContentRectChanged" + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).onSoftwareKeyboardVisibilityChanged) as usize - ptr as usize + }, + 152usize, + "Offset of field: GameActivityCallbacks::onSoftwareKeyboardVisibilityChanged" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).onEditorAction) as usize - ptr as usize }, + 160usize, + "Offset of field: GameActivityCallbacks::onEditorAction" ); } #[doc = " This is the function that must be in the native code to instantiate the\n application's native activity. It is called with the activity instance (see\n above); if the code is being instantiated from a previously saved instance,\n the savedState will be non-NULL and point to the saved data. You must make\n any copy of this data you need -- it will be released after you return from\n this function."] @@ -3575,7 +3310,7 @@ pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_TURN_SCREEN_ON: GameActiv pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_DISMISS_KEYGUARD: GameActivitySetWindowFlags = 4194304; #[doc = " Flags for GameActivity_setWindowFlags,\n as per the Java API at android.view.WindowManager.LayoutParams."] -pub type GameActivitySetWindowFlags = ::std::os::raw::c_uint; +pub type GameActivitySetWindowFlags = u32; extern "C" { #[doc = " Change the window flags of the given activity. Calls getWindow().setFlags()\n of the given activity.\n Note that some flags must be set before the window decoration is created,\n see\n https://developer.android.com/reference/android/view/Window#setFlags(int,%20int).\n Note also that this method can be called from\n *any* thread; it will send a message to the main thread of the process\n where the Java finish call will take place."] pub fn GameActivity_setWindowFlags( @@ -3591,11 +3326,15 @@ pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT: pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_FORCED: GameActivityShowSoftInputFlags = 2; #[doc = " Flags for GameActivity_showSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityShowSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityShowSoftInputFlags = u8; extern "C" { #[doc = " Show the IME while in the given activity. Calls\n InputMethodManager.showSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java call will take place."] pub fn GameActivity_showSoftInput(activity: *mut GameActivity, flags: u32); } +extern "C" { + #[doc = " Restarts the input method. Calls InputMethodManager.restartInput().\n Note that this method can be called from *any* thread; it will send a message\n to the main thread of the process where the Java call will take place."] + pub fn GameActivity_restartInput(activity: *mut GameActivity); +} extern "C" { #[doc = " Set the text entry state (see documentation of the GameTextInputState struct\n in the Game Text Input library reference).\n\n Ownership of the state is maintained by the caller."] pub fn GameActivity_setTextInputState( @@ -3622,7 +3361,7 @@ pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_O pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS: GameActivityHideSoftInputFlags = 2; #[doc = " Flags for GameActivity_hideSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityHideSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityHideSoftInputFlags = u16; extern "C" { #[doc = " Hide the IME while in the given activity. Calls\n InputMethodManager.hideSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java finish call will take place."] pub fn GameActivity_hideSoftInput(activity: *mut GameActivity, flags: u32); @@ -3636,12 +3375,16 @@ extern "C" { ); } extern "C" { - #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note that this function will attach the current thread to the JVM if it is\n not already attached, so the caller must detach the thread from the JVM\n before the thread is destroyed using DetachCurrentThread."] + #[doc = " Tells whether the software keyboard is visible or not."] + pub fn GameActivity_isSoftwareKeyboardVisible(activity: *mut GameActivity) -> bool; +} +extern "C" { + #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note: currently only TYPE_NULL AND TYPE_CLASS_NUMBER are supported."] pub fn GameActivity_setImeEditorInfo( activity: *mut GameActivity, - inputType: ::std::os::raw::c_int, - actionId: ::std::os::raw::c_int, - imeOptions: ::std::os::raw::c_int, + inputType: GameTextInputType, + actionId: GameTextInputActionType, + imeOptions: GameTextInputImeOptions, ); } extern "C" { @@ -3672,6 +3415,9 @@ extern "C" { extern "C" { pub fn GameActivity_getKeyboardHidden(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + pub fn GameActivity_getLocalesCount(activity: *mut GameActivity) -> ::std::os::raw::c_int; +} extern "C" { pub fn GameActivity_getMcc(activity: *mut GameActivity) -> ::std::os::raw::c_int; } @@ -3704,6 +3450,39 @@ extern "C" { extern "C" { pub fn GameActivity_getUIMode(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " The functions below return Java locale information.\n\n In simple cases there will be just one locale, but it's possible tha\n there are more than one locale objects. Users are encouraged to write code\n that handles all locales and not just the first one.\n\n The functions in the block below return string values in the provided buffer.\n Return value is zero if there were no errors, otherwise it's non-zero.\n If the return value is zero, `dst` will contain a null-terminated string:\n strlen(dst) <= dst_size - 1.\n If the return value is non-zero, the content of dst is undefined.\n\n Parameters:\n\n dst, dst_size: define a receiver buffer. Locale string can be something\n short like \"EN/EN\", but it may be longer. You should be safe with a buffer\n size of 256 bytes.\n\n If the buffer is too small, ENOBUFS is returned. Try allocating a larger\n buffer in this case.\n\n localeIdx must be between 0 and the value of GameActivity_getLocalesCount().\n If localeIdx is out of range, EINVAL is returned.\n\n Refer to Java documentation of locales for more information."] + pub fn GameActivity_getLocaleLanguage( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleScript( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleCountry( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleVariant( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} pub const ACONFIGURATION_ORIENTATION_ANY: _bindgen_ty_21 = 0; pub const ACONFIGURATION_ORIENTATION_PORT: _bindgen_ty_21 = 1; pub const ACONFIGURATION_ORIENTATION_LAND: _bindgen_ty_21 = 2; @@ -3802,45 +3581,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } #[repr(C)] @@ -3862,72 +3622,42 @@ fn bindgen_test_layout_sigcontext() { assert_eq!( ::std::mem::size_of::(), 4384usize, - concat!("Size of: ", stringify!(sigcontext)) + "Size of sigcontext" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(sigcontext)) + "Alignment of sigcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fault_address) - ) + "Offset of field: sigcontext::fault_address" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(regs) - ) + "Offset of field: sigcontext::regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 256usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(sp) - ) + "Offset of field: sigcontext::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pc) as usize - ptr as usize }, 264usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(pc) - ) + "Offset of field: sigcontext::pc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pstate) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(pstate) - ) + "Offset of field: sigcontext::pstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, 288usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__reserved) - ) + "Offset of field: sigcontext::__reserved" ); } #[repr(C)] @@ -3943,32 +3673,22 @@ fn bindgen_test_layout__aarch64_ctx() { assert_eq!( ::std::mem::size_of::<_aarch64_ctx>(), 8usize, - concat!("Size of: ", stringify!(_aarch64_ctx)) + "Size of _aarch64_ctx" ); assert_eq!( ::std::mem::align_of::<_aarch64_ctx>(), 4usize, - concat!("Alignment of ", stringify!(_aarch64_ctx)) + "Alignment of _aarch64_ctx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_aarch64_ctx), - "::", - stringify!(magic) - ) + "Offset of field: _aarch64_ctx::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_aarch64_ctx), - "::", - stringify!(size) - ) + "Offset of field: _aarch64_ctx::size" ); } #[repr(C)] @@ -3987,52 +3707,32 @@ fn bindgen_test_layout_fpsimd_context() { assert_eq!( ::std::mem::size_of::(), 528usize, - concat!("Size of: ", stringify!(fpsimd_context)) + "Size of fpsimd_context" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(fpsimd_context)) + "Alignment of fpsimd_context" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(head) - ) + "Offset of field: fpsimd_context::head" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpsr) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(fpsr) - ) + "Offset of field: fpsimd_context::fpsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpcr) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(fpcr) - ) + "Offset of field: fpsimd_context::fpcr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vregs) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(fpsimd_context), - "::", - stringify!(vregs) - ) + "Offset of field: fpsimd_context::vregs" ); } #[repr(C)] @@ -4048,32 +3748,22 @@ fn bindgen_test_layout_esr_context() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(esr_context)) + "Size of esr_context" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(esr_context)) + "Alignment of esr_context" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(esr_context), - "::", - stringify!(head) - ) + "Offset of field: esr_context::head" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esr) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(esr_context), - "::", - stringify!(esr) - ) + "Offset of field: esr_context::esr" ); } #[repr(C)] @@ -4091,52 +3781,32 @@ fn bindgen_test_layout_extra_context() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(extra_context)) + "Size of extra_context" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(extra_context)) + "Alignment of extra_context" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(head) - ) + "Offset of field: extra_context::head" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).datap) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(datap) - ) + "Offset of field: extra_context::datap" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(size) - ) + "Offset of field: extra_context::size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(extra_context), - "::", - stringify!(__reserved) - ) + "Offset of field: extra_context::__reserved" ); } #[repr(C)] @@ -4144,7 +3814,8 @@ fn bindgen_test_layout_extra_context() { pub struct sve_context { pub head: _aarch64_ctx, pub vl: __u16, - pub __reserved: [__u16; 3usize], + pub flags: __u16, + pub __reserved: [__u16; 2usize], } #[test] fn bindgen_test_layout_sve_context() { @@ -4153,42 +3824,137 @@ fn bindgen_test_layout_sve_context() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(sve_context)) + "Size of sve_context" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sve_context)) + "Alignment of sve_context" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(head) - ) + "Offset of field: sve_context::head" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vl) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(vl) - ) + "Offset of field: sve_context::vl" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 10usize, + "Offset of field: sve_context::flags" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, + 12usize, + "Offset of field: sve_context::__reserved" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tpidr2_context { + pub head: _aarch64_ctx, + pub tpidr2: __u64, +} +#[test] +fn bindgen_test_layout_tpidr2_context() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + "Size of tpidr2_context" + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + "Alignment of tpidr2_context" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + "Offset of field: tpidr2_context::head" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tpidr2) as usize - ptr as usize }, + 8usize, + "Offset of field: tpidr2_context::tpidr2" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct za_context { + pub head: _aarch64_ctx, + pub vl: __u16, + pub __reserved: [__u16; 3usize], +} +#[test] +fn bindgen_test_layout_za_context() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + "Size of za_context" + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + "Alignment of za_context" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + "Offset of field: za_context::head" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vl) as usize - ptr as usize }, + 8usize, + "Offset of field: za_context::vl" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(sve_context), - "::", - stringify!(__reserved) - ) + "Offset of field: za_context::__reserved" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct zt_context { + pub head: _aarch64_ctx, + pub nregs: __u16, + pub __reserved: [__u16; 3usize], +} +#[test] +fn bindgen_test_layout_zt_context() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + "Size of zt_context" + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + "Alignment of zt_context" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).head) as usize - ptr as usize }, + 0usize, + "Offset of field: zt_context::head" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nregs) as usize - ptr as usize }, + 8usize, + "Offset of field: zt_context::nregs" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__reserved) as usize - ptr as usize }, + 10usize, + "Offset of field: zt_context::__reserved" ); } #[repr(C)] @@ -4203,22 +3969,17 @@ fn bindgen_test_layout_sigset_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigset_t)) + "Size of sigset_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigset_t)) + "Alignment of sigset_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sig) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigset_t), - "::", - stringify!(sig) - ) + "Offset of field: sigset_t::sig" ); } pub type old_sigset_t = ::std::os::raw::c_ulong; @@ -4241,52 +4002,32 @@ fn bindgen_test_layout___kernel_sigaction() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction>(), 32usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) + "Size of __kernel_sigaction" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) + "Alignment of __kernel_sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_handler) - ) + "Offset of field: __kernel_sigaction::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: __kernel_sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: __kernel_sigaction::sa_restorer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: __kernel_sigaction::sa_mask" ); } #[repr(C)] @@ -4303,42 +4044,27 @@ fn bindgen_test_layout_sigaltstack() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(sigaltstack)) + "Size of sigaltstack" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaltstack)) + "Alignment of sigaltstack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) + "Offset of field: sigaltstack::ss_sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) + "Offset of field: sigaltstack::ss_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) + "Offset of field: sigaltstack::ss_size" ); } pub type stack_t = sigaltstack; @@ -4352,35 +4078,21 @@ pub union sigval { fn bindgen_test_layout_sigval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of sigval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigval)) + "Alignment of sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) + "Offset of field: sigval::sival_int" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) + "Offset of field: sigval::sival_ptr" ); } pub type sigval_t = sigval; @@ -4409,32 +4121,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_1>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) + "Size of __sifields__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) + "Alignment of __sifields__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_1::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_1::_uid" ); } #[repr(C)] @@ -4453,52 +4155,32 @@ fn bindgen_test_layout___sifields__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_2>(), 24usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) + "Size of __sifields__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_2>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) + "Alignment of __sifields__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) + "Offset of field: __sifields__bindgen_ty_2::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) + "Offset of field: __sifields__bindgen_ty_2::_overrun" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_2::_sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) + "Offset of field: __sifields__bindgen_ty_2::_sys_private" ); } #[repr(C)] @@ -4516,42 +4198,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_3>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) + "Size of __sifields__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_3>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) + "Alignment of __sifields__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_3::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_3::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_3::_sigval" ); } #[repr(C)] @@ -4571,62 +4238,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_4() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_4>(), 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) + "Size of __sifields__bindgen_ty_4" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_4>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) + "Alignment of __sifields__bindgen_ty_4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_4::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_4::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) + "Offset of field: __sifields__bindgen_ty_4::_status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) + "Offset of field: __sifields__bindgen_ty_4::_utime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) + "Offset of field: __sifields__bindgen_ty_4::_stime" ); } #[repr(C)] @@ -4659,48 +4301,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper" ); } #[repr(C)] @@ -4717,38 +4338,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey" ); } #[repr(C)] @@ -4756,6 +4361,7 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _data: ::std::os::raw::c_ulong, pub _type: __u32, + pub _flags: __u32, } #[test] fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { @@ -4765,38 +4371,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 16usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 12usize, + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags" ); } #[test] @@ -4807,68 +4402,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf" ); } #[test] @@ -4879,22 +4443,17 @@ fn bindgen_test_layout___sifields__bindgen_ty_5() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5>(), 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) + "Size of __sifields__bindgen_ty_5" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) + "Alignment of __sifields__bindgen_ty_5" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) + "Offset of field: __sifields__bindgen_ty_5::_addr" ); } #[repr(C)] @@ -4911,32 +4470,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_6() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_6>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) + "Size of __sifields__bindgen_ty_6" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_6>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) + "Alignment of __sifields__bindgen_ty_6" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) + "Offset of field: __sifields__bindgen_ty_6::_band" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) + "Offset of field: __sifields__bindgen_ty_6::_fd" ); } #[repr(C)] @@ -4954,42 +4503,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_7() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_7>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) + "Size of __sifields__bindgen_ty_7" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_7>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) + "Alignment of __sifields__bindgen_ty_7" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) + "Offset of field: __sifields__bindgen_ty_7::_call_addr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) + "Offset of field: __sifields__bindgen_ty_7::_syscall" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) + "Offset of field: __sifields__bindgen_ty_7::_arch" ); } #[test] @@ -4999,82 +4533,47 @@ fn bindgen_test_layout___sifields() { assert_eq!( ::std::mem::size_of::<__sifields>(), 32usize, - concat!("Size of: ", stringify!(__sifields)) + "Size of __sifields" ); assert_eq!( ::std::mem::align_of::<__sifields>(), 8usize, - concat!("Alignment of ", stringify!(__sifields)) + "Alignment of __sifields" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) + "Offset of field: __sifields::_kill" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) + "Offset of field: __sifields::_timer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) + "Offset of field: __sifields::_rt" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) + "Offset of field: __sifields::_sigchld" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) + "Offset of field: __sifields::_sigfault" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) + "Offset of field: __sifields::_sigpoll" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) + "Offset of field: __sifields::_sigsys" ); } #[repr(C)] @@ -5104,55 +4603,32 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields" ); } #[test] @@ -5163,22 +4639,17 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) + "Alignment of siginfo__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) + "Offset of field: siginfo__bindgen_ty_1::_si_pad" ); } #[test] @@ -5186,12 +4657,12 @@ fn bindgen_test_layout_siginfo() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo)) + "Size of siginfo" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(siginfo)) + "Alignment of siginfo" ); } pub type siginfo_t = siginfo; @@ -5224,38 +4695,22 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Size of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute" ); } #[test] @@ -5266,42 +4721,27 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) + "Size of sigevent__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) + "Alignment of sigevent__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) + "Offset of field: sigevent__bindgen_ty_1::_pad" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) + "Offset of field: sigevent__bindgen_ty_1::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) + "Offset of field: sigevent__bindgen_ty_1::_sigev_thread" ); } #[test] @@ -5311,52 +4751,32 @@ fn bindgen_test_layout_sigevent() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(sigevent)) + "Size of sigevent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigevent)) + "Alignment of sigevent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) + "Offset of field: sigevent::sigev_value" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) + "Offset of field: sigevent::sigev_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) + "Offset of field: sigevent::sigev_notify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) + "Offset of field: sigevent::_sigev_un" ); } pub type sigevent_t = sigevent; @@ -5392,32 +4812,22 @@ fn bindgen_test_layout_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) + "Size of sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) + "Alignment of sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -5427,42 +4837,27 @@ fn bindgen_test_layout_sigaction() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(sigaction)) + "Size of sigaction" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction)) + "Alignment of sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction::sa_restorer" ); } #[repr(C)] @@ -5493,32 +4888,22 @@ fn bindgen_test_layout_sigaction64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) + "Size of sigaction64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) + "Alignment of sigaction64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -5528,42 +4913,27 @@ fn bindgen_test_layout_sigaction64() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(sigaction64)) + "Size of sigaction64" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction64)) + "Alignment of sigaction64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction64::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction64::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction64::sa_restorer" ); } #[repr(C)] @@ -5579,32 +4949,22 @@ fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(timespec)) + "Size of timespec" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timespec)) + "Alignment of timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: timespec::tv_nsec" ); } #[repr(C)] @@ -5622,52 +4982,32 @@ fn bindgen_test_layout_user_regs_struct() { assert_eq!( ::std::mem::size_of::(), 272usize, - concat!("Size of: ", stringify!(user_regs_struct)) + "Size of user_regs_struct" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(user_regs_struct)) + "Alignment of user_regs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(regs) - ) + "Offset of field: user_regs_struct::regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 248usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(sp) - ) + "Offset of field: user_regs_struct::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pc) as usize - ptr as usize }, 256usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(pc) - ) + "Offset of field: user_regs_struct::pc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pstate) as usize - ptr as usize }, 264usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(pstate) - ) + "Offset of field: user_regs_struct::pstate" ); } #[repr(C)] @@ -5685,42 +5025,27 @@ fn bindgen_test_layout_user_fpsimd_struct() { assert_eq!( ::std::mem::size_of::(), 528usize, - concat!("Size of: ", stringify!(user_fpsimd_struct)) + "Size of user_fpsimd_struct" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(user_fpsimd_struct)) + "Alignment of user_fpsimd_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(vregs) - ) + "Offset of field: user_fpsimd_struct::vregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpsr) as usize - ptr as usize }, 512usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(fpsr) - ) + "Offset of field: user_fpsimd_struct::fpsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpcr) as usize - ptr as usize }, 516usize, - concat!( - "Offset of field: ", - stringify!(user_fpsimd_struct), - "::", - stringify!(fpcr) - ) + "Offset of field: user_fpsimd_struct::fpcr" ); } pub type greg_t = ::std::os::raw::c_ulong; @@ -5753,32 +5078,22 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) + "Size of ucontext__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) + "Alignment of ucontext__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask64" ); } #[test] @@ -5788,62 +5103,37 @@ fn bindgen_test_layout_ucontext() { assert_eq!( ::std::mem::size_of::(), 4560usize, - concat!("Size of: ", stringify!(ucontext)) + "Size of ucontext" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(ucontext)) + "Alignment of ucontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) + "Offset of field: ucontext::uc_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) + "Offset of field: ucontext::uc_link" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) + "Offset of field: ucontext::uc_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__padding) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__padding) - ) + "Offset of field: ucontext::__padding" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) + "Offset of field: ucontext::uc_mcontext" ); } pub type ucontext_t = ucontext; @@ -6055,32 +5345,22 @@ fn bindgen_test_layout___kernel_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) + "Size of __kernel_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_timespec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) + "Alignment of __kernel_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_timespec::tv_nsec" ); } #[repr(C)] @@ -6096,32 +5376,22 @@ fn bindgen_test_layout___kernel_itimerspec() { assert_eq!( ::std::mem::size_of::<__kernel_itimerspec>(), 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) + "Size of __kernel_itimerspec" ); assert_eq!( ::std::mem::align_of::<__kernel_itimerspec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) + "Alignment of __kernel_itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: __kernel_itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: __kernel_itimerspec::it_value" ); } #[repr(C)] @@ -6138,32 +5408,22 @@ fn bindgen_test_layout___kernel_old_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_old_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) + "Size of __kernel_old_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_old_timespec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) + "Alignment of __kernel_old_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_old_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_old_timespec::tv_nsec" ); } #[repr(C)] @@ -6180,32 +5440,22 @@ fn bindgen_test_layout___kernel_sock_timeval() { assert_eq!( ::std::mem::size_of::<__kernel_sock_timeval>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) + "Size of __kernel_sock_timeval" ); assert_eq!( ::std::mem::align_of::<__kernel_sock_timeval>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) + "Alignment of __kernel_sock_timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_sock_timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: __kernel_sock_timeval::tv_usec" ); } #[repr(C)] @@ -6218,35 +5468,21 @@ pub struct timeval { fn bindgen_test_layout_timeval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); + assert_eq!(::std::mem::size_of::(), 16usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -6262,32 +5498,22 @@ fn bindgen_test_layout_itimerspec() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(itimerspec)) + "Size of itimerspec" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(itimerspec)) + "Alignment of itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: itimerspec::it_value" ); } #[repr(C)] @@ -6303,32 +5529,22 @@ fn bindgen_test_layout_itimerval() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(itimerval)) + "Size of itimerval" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(itimerval)) + "Alignment of itimerval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerval::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) + "Offset of field: itimerval::it_value" ); } #[repr(C)] @@ -6344,32 +5560,22 @@ fn bindgen_test_layout_timezone() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timezone)) + "Size of timezone" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timezone)) + "Alignment of timezone" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) + "Offset of field: timezone::tz_minuteswest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) + "Offset of field: timezone::tz_dsttime" ); } pub type fd_mask = ::std::os::raw::c_ulong; @@ -6382,25 +5588,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: fd_set::fds_bits" ); } extern "C" { @@ -6504,125 +5701,62 @@ pub struct tm { fn bindgen_test_layout_tm() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); + assert_eq!(::std::mem::size_of::(), 56usize, "Size of tm"); + assert_eq!(::std::mem::align_of::(), 8usize, "Alignment of tm"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) + "Offset of field: tm::tm_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) + "Offset of field: tm::tm_min" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) + "Offset of field: tm::tm_hour" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) + "Offset of field: tm::tm_mday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) + "Offset of field: tm::tm_mon" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) + "Offset of field: tm::tm_year" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) + "Offset of field: tm::tm_wday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) + "Offset of field: tm::tm_yday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) + "Offset of field: tm::tm_isdst" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) + "Offset of field: tm::tm_gmtoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) + "Offset of field: tm::tm_zone" ); } extern "C" { @@ -6655,12 +5789,18 @@ extern "C" { extern "C" { pub fn localtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timelocal(__tm: *mut tm) -> time_t; +} extern "C" { pub fn gmtime(__t: *const time_t) -> *mut tm; } extern "C" { pub fn gmtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timegm(__tm: *mut tm) -> time_t; +} extern "C" { pub fn strptime( __s: *const ::std::os::raw::c_char, @@ -6747,23 +5887,23 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn timer_gettime(__timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; + pub fn timer_gettime(_timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; } extern "C" { pub fn timer_getoverrun(__timer: timer_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn timelocal(__tm: *mut tm) -> time_t; -} -extern "C" { - pub fn timegm(__tm: *mut tm) -> time_t; -} extern "C" { pub fn timespec_get( __ts: *mut timespec, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn timespec_getres( + __ts: *mut timespec, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} pub type nfds_t = ::std::os::raw::c_uint; extern "C" { pub fn poll( @@ -6810,122 +5950,67 @@ fn bindgen_test_layout_clone_args() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(clone_args)) + "Size of clone_args" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(clone_args)) + "Alignment of clone_args" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(flags) - ) + "Offset of field: clone_args::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pidfd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(pidfd) - ) + "Offset of field: clone_args::pidfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).child_tid) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(child_tid) - ) + "Offset of field: clone_args::child_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent_tid) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(parent_tid) - ) + "Offset of field: clone_args::parent_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exit_signal) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(exit_signal) - ) + "Offset of field: clone_args::exit_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack) - ) + "Offset of field: clone_args::stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack_size) - ) + "Offset of field: clone_args::stack_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tls) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(tls) - ) + "Offset of field: clone_args::tls" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid) - ) + "Offset of field: clone_args::set_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid_size) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid_size) - ) + "Offset of field: clone_args::set_tid_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cgroup) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(cgroup) - ) + "Offset of field: clone_args::cgroup" ); } #[repr(C)] @@ -6940,22 +6025,17 @@ fn bindgen_test_layout_sched_param() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sched_param)) + "Size of sched_param" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sched_param)) + "Alignment of sched_param" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sched_param), - "::", - stringify!(sched_priority) - ) + "Offset of field: sched_param::sched_priority" ); } extern "C" { @@ -6996,13 +6076,12 @@ pub type _bindgen_ty_22 = ::std::os::raw::c_uint; pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_23 = 0; pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_23 = 1; pub type _bindgen_ty_23 = ::std::os::raw::c_uint; -pub type __pthread_cleanup_func_t = - ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cleanup_t { pub __cleanup_prev: *mut __pthread_cleanup_t, - pub __cleanup_routine: __pthread_cleanup_func_t, + pub __cleanup_routine: + ::std::option::Option, pub __cleanup_arg: *mut ::std::os::raw::c_void, } #[test] @@ -7012,48 +6091,33 @@ fn bindgen_test_layout___pthread_cleanup_t() { assert_eq!( ::std::mem::size_of::<__pthread_cleanup_t>(), 24usize, - concat!("Size of: ", stringify!(__pthread_cleanup_t)) + "Size of __pthread_cleanup_t" ); assert_eq!( ::std::mem::align_of::<__pthread_cleanup_t>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_cleanup_t)) + "Alignment of __pthread_cleanup_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_prev) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_routine) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_routine) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_routine" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_arg) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_arg) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_arg" ); } extern "C" { pub fn __pthread_cleanup_push( c: *mut __pthread_cleanup_t, - arg1: __pthread_cleanup_func_t, + arg1: ::std::option::Option, arg2: *mut ::std::os::raw::c_void, ); } @@ -7080,42 +6144,27 @@ fn bindgen_test_layout_android_poll_source() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(android_poll_source)) + "Size of android_poll_source" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_poll_source)) + "Alignment of android_poll_source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(id) - ) + "Offset of field: android_poll_source::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).app) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(app) - ) + "Offset of field: android_poll_source::app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).process) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(process) - ) + "Offset of field: android_poll_source::process" ); } #[repr(C)] @@ -7141,72 +6190,42 @@ fn bindgen_test_layout_android_input_buffer() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(android_input_buffer)) + "Size of android_input_buffer" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_input_buffer)) + "Alignment of android_input_buffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEvents) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEvents) - ) + "Offset of field: android_input_buffer::motionEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsCount) - ) + "Offset of field: android_input_buffer::motionEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsBufferSize) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsBufferSize) - ) + "Offset of field: android_input_buffer::motionEventsBufferSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEvents) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEvents) - ) + "Offset of field: android_input_buffer::keyEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsCount) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsCount) - ) + "Offset of field: android_input_buffer::keyEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsBufferSize) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsBufferSize) - ) + "Offset of field: android_input_buffer::keyEventsBufferSize" ); } #[doc = " Function pointer declaration for the filtering of key events.\n A function with this signature should be passed to\n android_app_set_key_event_filter and return false for any events that should\n not be handled by android_native_app_glue. These events will be handled by\n the system instead."] @@ -7236,6 +6255,10 @@ pub struct android_app { pub window: *mut ANativeWindow, #[doc = " Current content rectangle of the window; this is the area where the\n window's content should be placed to be seen by the user."] pub contentRect: ARect, + #[doc = " Whether the software keyboard is visible or not."] + pub softwareKeyboardVisible: bool, + #[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."] + pub editorAction: ::std::os::raw::c_int, #[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."] pub activityState: ::std::os::raw::c_int, #[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."] @@ -7269,313 +6292,173 @@ fn bindgen_test_layout_android_app() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 384usize, - concat!("Size of: ", stringify!(android_app)) + 392usize, + "Size of android_app" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_app)) + "Alignment of android_app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(userData) - ) + "Offset of field: android_app::userData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onAppCmd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(onAppCmd) - ) + "Offset of field: android_app::onAppCmd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activity) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activity) - ) + "Offset of field: android_app::activity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(config) - ) + "Offset of field: android_app::config" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedState) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedState) - ) + "Offset of field: android_app::savedState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedStateSize) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedStateSize) - ) + "Offset of field: android_app::savedStateSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).looper) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(looper) - ) + "Offset of field: android_app::looper" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(window) - ) + "Offset of field: android_app::window" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contentRect) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(contentRect) - ) + "Offset of field: android_app::contentRect" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).softwareKeyboardVisible) as usize - ptr as usize }, + 80usize, + "Offset of field: android_app::softwareKeyboardVisible" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).editorAction) as usize - ptr as usize }, + 84usize, + "Offset of field: android_app::editorAction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activityState) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activityState) - ) + 88usize, + "Offset of field: android_app::activityState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyRequested) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyRequested) - ) + 92usize, + "Offset of field: android_app::destroyRequested" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBuffers) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputBuffers) - ) + 96usize, + "Offset of field: android_app::inputBuffers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).currentInputBuffer) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(currentInputBuffer) - ) + 192usize, + "Offset of field: android_app::currentInputBuffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textInputState) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(textInputState) - ) + 196usize, + "Offset of field: android_app::textInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mutex) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(mutex) - ) + 200usize, + "Offset of field: android_app::mutex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cond) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cond) - ) + 240usize, + "Offset of field: android_app::cond" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgread) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgread) - ) + 288usize, + "Offset of field: android_app::msgread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgwrite) as usize - ptr as usize }, - 284usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgwrite) - ) + 292usize, + "Offset of field: android_app::msgwrite" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).thread) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(thread) - ) + 296usize, + "Offset of field: android_app::thread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmdPollSource) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cmdPollSource) - ) + 304usize, + "Offset of field: android_app::cmdPollSource" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(running) - ) + 328usize, + "Offset of field: android_app::running" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSaved) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(stateSaved) - ) + 332usize, + "Offset of field: android_app::stateSaved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyed) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyed) - ) + 336usize, + "Offset of field: android_app::destroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).redrawNeeded) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(redrawNeeded) - ) + 340usize, + "Offset of field: android_app::redrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingWindow) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingWindow) - ) + 344usize, + "Offset of field: android_app::pendingWindow" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingContentRect) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingContentRect) - ) + 352usize, + "Offset of field: android_app::pendingContentRect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventFilter) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(keyEventFilter) - ) + 368usize, + "Offset of field: android_app::keyEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventFilter) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(motionEventFilter) - ) + 376usize, + "Offset of field: android_app::motionEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputAvailableWakeUp) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputAvailableWakeUp) - ) + 384usize, + "Offset of field: android_app::inputAvailableWakeUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputSwapPending) as usize - ptr as usize }, - 377usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputSwapPending) - ) + 385usize, + "Offset of field: android_app::inputSwapPending" ); } #[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."] @@ -7585,7 +6468,7 @@ pub const NativeAppGlueLooperId_LOOPER_ID_INPUT: NativeAppGlueLooperId = 2; #[doc = " Start of user-defined ALooper identifiers."] pub const NativeAppGlueLooperId_LOOPER_ID_USER: NativeAppGlueLooperId = 3; #[doc = " Looper ID of commands coming from the app's main thread, an AInputQueue or\n user-defined sources."] -pub type NativeAppGlueLooperId = ::std::os::raw::c_uint; +pub type NativeAppGlueLooperId = i8; #[doc = " Unused. Reserved for future use when usage of AInputQueue will be\n supported."] pub const NativeAppGlueAppCmd_UNUSED_APP_CMD_INPUT_CHANGED: NativeAppGlueAppCmd = 0; #[doc = " Command from main thread: a new ANativeWindow is ready for use. Upon\n receiving this command, android_app->window will contain the new window\n surface."] @@ -7598,30 +6481,32 @@ pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_RESIZED: NativeAppGlueAppCmd = 3; pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_REDRAW_NEEDED: NativeAppGlueAppCmd = 4; #[doc = " Command from main thread: the content area of the window has changed,\n such as from the soft input window being shown or hidden. You can\n find the new content rect in android_app::contentRect."] pub const NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED: NativeAppGlueAppCmd = 5; +#[doc = " Command from main thread: the software keyboard was shown or hidden."] +pub const NativeAppGlueAppCmd_APP_CMD_SOFTWARE_KB_VIS_CHANGED: NativeAppGlueAppCmd = 6; #[doc = " Command from main thread: the app's activity window has gained\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 6; +pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 7; #[doc = " Command from main thread: the app's activity window has lost\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 7; +pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 8; #[doc = " Command from main thread: the current device configuration has changed."] -pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 8; +pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 9; #[doc = " Command from main thread: the system is running low on memory.\n Try to reduce your memory use."] -pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 9; +pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 10; #[doc = " Command from main thread: the app's activity has been started."] -pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 10; +pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 11; #[doc = " Command from main thread: the app's activity has been resumed."] -pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 11; +pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 12; #[doc = " Command from main thread: the app should generate a new saved state\n for itself, to restore from later if needed. If you have saved state,\n allocate it with malloc and place it in android_app.savedState with\n the size in android_app.savedStateSize. The will be freed for you\n later."] -pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 12; +pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 13; #[doc = " Command from main thread: the app's activity has been paused."] -pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 13; +pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 14; #[doc = " Command from main thread: the app's activity has been stopped."] -pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 14; +pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 15; #[doc = " Command from main thread: the app's activity is being destroyed,\n and waiting for the app thread to clean up and exit before proceeding."] -pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 15; +pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 16; #[doc = " Command from main thread: the app's insets have changed."] -pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 16; -#[doc = " Commands passed from the application's main Java thread to the game's thread."] -pub type NativeAppGlueAppCmd = ::std::os::raw::c_uint; +pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 17; +#[doc = " Commands passed from the application's main Java thread to the game's thread.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] +pub type NativeAppGlueAppCmd = i8; extern "C" { #[doc = " Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next\n app command message."] pub fn android_app_read_cmd(android_app: *mut android_app) -> i8; @@ -7666,6 +6551,10 @@ extern "C" { filter: android_motion_event_filter, ); } +extern "C" { + #[doc = " You can send your custom events using the function below.\n\n Make sure your custom codes do not overlap with this library's ones.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] + pub fn android_app_write_cmd(android_app: *mut android_app, cmd: i8); +} extern "C" { #[doc = " Determines if a looper wake up was due to new input becoming available"] pub fn android_app_input_available_wake_up(app: *mut android_app) -> bool; diff --git a/android-activity/src/game_activity/ffi_arm.rs b/android-activity/src/game_activity/ffi_arm.rs index 8933437..de717f5 100644 --- a/android-activity/src/game_activity/ffi_arm.rs +++ b/android-activity/src/game_activity/ffi_arm.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } pub const __BIONIC__: u32 = 1; pub const __WORDSIZE: u32 = 32; @@ -104,11 +161,12 @@ pub const __ANDROID_API_R__: u32 = 30; pub const __ANDROID_API_S__: u32 = 31; pub const __ANDROID_API_T__: u32 = 33; pub const __ANDROID_API_U__: u32 = 34; +pub const __ANDROID_API_V__: u32 = 35; pub const __ANDROID_NDK__: u32 = 1; -pub const __NDK_MAJOR__: u32 = 25; -pub const __NDK_MINOR__: u32 = 2; +pub const __NDK_MAJOR__: u32 = 26; +pub const __NDK_MINOR__: u32 = 1; pub const __NDK_BETA__: u32 = 0; -pub const __NDK_BUILD__: u32 = 9519653; +pub const __NDK_BUILD__: u32 = 10909125; pub const __NDK_CANARY__: u32 = 0; pub const WCHAR_MIN: u8 = 0u8; pub const INT8_MIN: i32 = -128; @@ -147,11 +205,10 @@ pub const PTRDIFF_MAX: u32 = 2147483647; pub const SIZE_MAX: u32 = 4294967295; pub const __BITS_PER_LONG: u32 = 32; pub const __FD_SETSIZE: u32 = 1024; -pub const __GNUC_VA_LIST: u32 = 1; pub const AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT: u32 = 8; +pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; pub const __PRI_64_prefix: &[u8; 3] = b"ll\0"; pub const PRId8: &[u8; 2] = b"d\0"; pub const PRId16: &[u8; 2] = b"d\0"; @@ -175,6 +232,28 @@ pub const PRIiLEAST64: &[u8; 4] = b"lli\0"; pub const PRIiFAST8: &[u8; 2] = b"i\0"; pub const PRIiFAST64: &[u8; 4] = b"lli\0"; pub const PRIiMAX: &[u8; 3] = b"ji\0"; +pub const PRIb8: &[u8; 2] = b"b\0"; +pub const PRIb16: &[u8; 2] = b"b\0"; +pub const PRIb32: &[u8; 2] = b"b\0"; +pub const PRIb64: &[u8; 4] = b"llb\0"; +pub const PRIbLEAST8: &[u8; 2] = b"b\0"; +pub const PRIbLEAST16: &[u8; 2] = b"b\0"; +pub const PRIbLEAST32: &[u8; 2] = b"b\0"; +pub const PRIbLEAST64: &[u8; 4] = b"llb\0"; +pub const PRIbFAST8: &[u8; 2] = b"b\0"; +pub const PRIbFAST64: &[u8; 4] = b"llb\0"; +pub const PRIbMAX: &[u8; 3] = b"jb\0"; +pub const PRIB8: &[u8; 2] = b"B\0"; +pub const PRIB16: &[u8; 2] = b"B\0"; +pub const PRIB32: &[u8; 2] = b"B\0"; +pub const PRIB64: &[u8; 4] = b"llB\0"; +pub const PRIBLEAST8: &[u8; 2] = b"B\0"; +pub const PRIBLEAST16: &[u8; 2] = b"B\0"; +pub const PRIBLEAST32: &[u8; 2] = b"B\0"; +pub const PRIBLEAST64: &[u8; 4] = b"llB\0"; +pub const PRIBFAST8: &[u8; 2] = b"B\0"; +pub const PRIBFAST64: &[u8; 4] = b"llB\0"; +pub const PRIBMAX: &[u8; 3] = b"jB\0"; pub const PRIo8: &[u8; 2] = b"o\0"; pub const PRIo16: &[u8; 2] = b"o\0"; pub const PRIo32: &[u8; 2] = b"o\0"; @@ -241,6 +320,28 @@ pub const SCNiLEAST64: &[u8; 4] = b"lli\0"; pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; pub const SCNiFAST64: &[u8; 4] = b"lli\0"; pub const SCNiMAX: &[u8; 3] = b"ji\0"; +pub const SCNb8: &[u8; 4] = b"hhb\0"; +pub const SCNb16: &[u8; 3] = b"hb\0"; +pub const SCNb32: &[u8; 2] = b"b\0"; +pub const SCNb64: &[u8; 4] = b"llb\0"; +pub const SCNbLEAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbLEAST16: &[u8; 3] = b"hb\0"; +pub const SCNbLEAST32: &[u8; 2] = b"b\0"; +pub const SCNbLEAST64: &[u8; 4] = b"llb\0"; +pub const SCNbFAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbFAST64: &[u8; 4] = b"llb\0"; +pub const SCNbMAX: &[u8; 3] = b"jb\0"; +pub const SCNB8: &[u8; 4] = b"hhB\0"; +pub const SCNB16: &[u8; 3] = b"hB\0"; +pub const SCNB32: &[u8; 2] = b"B\0"; +pub const SCNB64: &[u8; 4] = b"llB\0"; +pub const SCNBLEAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBLEAST16: &[u8; 3] = b"hB\0"; +pub const SCNBLEAST32: &[u8; 2] = b"B\0"; +pub const SCNBLEAST64: &[u8; 4] = b"llB\0"; +pub const SCNBFAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBFAST64: &[u8; 4] = b"llB\0"; +pub const SCNBMAX: &[u8; 3] = b"jB\0"; pub const SCNo8: &[u8; 4] = b"hho\0"; pub const SCNo16: &[u8; 3] = b"ho\0"; pub const SCNo32: &[u8; 2] = b"o\0"; @@ -276,12 +377,12 @@ pub const SCNxFAST64: &[u8; 4] = b"llx\0"; pub const SCNxMAX: &[u8; 3] = b"jx\0"; pub const GAME_ACTIVITY_POINTER_INFO_AXIS_COUNT: u32 = 48; pub const GAMEACTIVITY_MAX_NUM_POINTERS_IN_MOTION_EVENT: u32 = 8; -pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 2; +pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 4; pub const GAMETEXTINPUT_MINOR_VERSION: u32 = 0; pub const GAMETEXTINPUT_BUGFIX_VERSION: u32 = 0; -pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 2; +pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 4; pub const GAMEACTIVITY_MINOR_VERSION: u32 = 0; -pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 2; +pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 0; pub const POLLIN: u32 = 1; pub const POLLPRI: u32 = 2; pub const POLLOUT: u32 = 4; @@ -584,6 +685,7 @@ pub const TRAP_HWBKPT: u32 = 4; pub const TRAP_UNK: u32 = 5; pub const TRAP_PERF: u32 = 6; pub const NSIGTRAP: u32 = 6; +pub const TRAP_PERF_FLAG_ASYNC: u32 = 1; pub const CLD_EXITED: u32 = 1; pub const CLD_KILLED: u32 = 2; pub const CLD_DUMPED: u32 = 3; @@ -640,6 +742,9 @@ pub const TIMER_ABSTIME: u32 = 1; pub const FD_SETSIZE: u32 = 1024; pub const CLOCKS_PER_SEC: u32 = 1000000; pub const TIME_UTC: u32 = 1; +pub const TIME_MONOTONIC: u32 = 2; +pub const TIME_ACTIVE: u32 = 3; +pub const TIME_THREAD_ACTIVE: u32 = 4; pub const CSIGNAL: u32 = 255; pub const CLONE_VM: u32 = 256; pub const CLONE_FS: u32 = 512; @@ -723,32 +828,22 @@ fn bindgen_test_layout_max_align_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(max_align_t)) + "Size of max_align_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(max_align_t)) + "Alignment of max_align_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) + "Offset of field: max_align_t::__clang_max_align_nonce1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) + "Offset of field: max_align_t::__clang_max_align_nonce2" ); } pub type __int8_t = ::std::os::raw::c_schar; @@ -799,22 +894,17 @@ fn bindgen_test_layout___kernel_fd_set() { assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) + "Size of __kernel_fd_set" ); assert_eq!( ::std::mem::align_of::<__kernel_fd_set>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) + "Alignment of __kernel_fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: __kernel_fd_set::fds_bits" ); } pub type __kernel_sighandler_t = @@ -851,22 +941,17 @@ fn bindgen_test_layout___kernel_fsid_t() { assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) + "Size of __kernel_fsid_t" ); assert_eq!( ::std::mem::align_of::<__kernel_fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) + "Alignment of __kernel_fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) + "Offset of field: __kernel_fsid_t::val" ); } pub type __kernel_off_t = __kernel_long_t; @@ -1234,6 +1319,22 @@ pub const AKEYCODE_REFRESH: _bindgen_ty_2 = 285; pub const AKEYCODE_THUMBS_UP: _bindgen_ty_2 = 286; pub const AKEYCODE_THUMBS_DOWN: _bindgen_ty_2 = 287; pub const AKEYCODE_PROFILE_SWITCH: _bindgen_ty_2 = 288; +pub const AKEYCODE_VIDEO_APP_1: _bindgen_ty_2 = 289; +pub const AKEYCODE_VIDEO_APP_2: _bindgen_ty_2 = 290; +pub const AKEYCODE_VIDEO_APP_3: _bindgen_ty_2 = 291; +pub const AKEYCODE_VIDEO_APP_4: _bindgen_ty_2 = 292; +pub const AKEYCODE_VIDEO_APP_5: _bindgen_ty_2 = 293; +pub const AKEYCODE_VIDEO_APP_6: _bindgen_ty_2 = 294; +pub const AKEYCODE_VIDEO_APP_7: _bindgen_ty_2 = 295; +pub const AKEYCODE_VIDEO_APP_8: _bindgen_ty_2 = 296; +pub const AKEYCODE_FEATURED_APP_1: _bindgen_ty_2 = 297; +pub const AKEYCODE_FEATURED_APP_2: _bindgen_ty_2 = 298; +pub const AKEYCODE_FEATURED_APP_3: _bindgen_ty_2 = 299; +pub const AKEYCODE_FEATURED_APP_4: _bindgen_ty_2 = 300; +pub const AKEYCODE_DEMO_APP_1: _bindgen_ty_2 = 301; +pub const AKEYCODE_DEMO_APP_2: _bindgen_ty_2 = 302; +pub const AKEYCODE_DEMO_APP_3: _bindgen_ty_2 = 303; +pub const AKEYCODE_DEMO_APP_4: _bindgen_ty_2 = 304; pub type _bindgen_ty_2 = ::std::os::raw::c_uint; pub const ALOOPER_PREPARE_ALLOW_NON_CALLBACKS: _bindgen_ty_3 = 1; pub type _bindgen_ty_3 = ::std::os::raw::c_uint; @@ -1248,8 +1349,8 @@ pub const ALOOPER_EVENT_ERROR: _bindgen_ty_5 = 4; pub const ALOOPER_EVENT_HANGUP: _bindgen_ty_5 = 8; pub const ALOOPER_EVENT_INVALID: _bindgen_ty_5 = 16; pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -pub type va_list = u32; pub type __gnuc_va_list = u32; +pub type va_list = u32; #[repr(C)] pub struct JavaVMAttachArgs { pub version: jint, @@ -1263,42 +1364,27 @@ fn bindgen_test_layout_JavaVMAttachArgs() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) + "Size of JavaVMAttachArgs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) + "Alignment of JavaVMAttachArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMAttachArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) + "Offset of field: JavaVMAttachArgs::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) + "Offset of field: JavaVMAttachArgs::group" ); } #[repr(C)] @@ -1314,32 +1400,22 @@ fn bindgen_test_layout_JavaVMOption() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(JavaVMOption)) + "Size of JavaVMOption" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMOption)) + "Alignment of JavaVMOption" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) + "Offset of field: JavaVMOption::optionString" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) + "Offset of field: JavaVMOption::extraInfo" ); } #[repr(C)] @@ -1356,52 +1432,32 @@ fn bindgen_test_layout_JavaVMInitArgs() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) + "Size of JavaVMInitArgs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) + "Alignment of JavaVMInitArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMInitArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) + "Offset of field: JavaVMInitArgs::nOptions" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) + "Offset of field: JavaVMInitArgs::options" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) + "Offset of field: JavaVMInitArgs::ignoreUnrecognized" ); } pub const AKEY_STATE_UNKNOWN: _bindgen_ty_6 = -1; @@ -1871,32 +1927,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -2001,6 +2047,10 @@ pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_S8_UINT: AHardwareBuffer pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420: AHardwareBuffer_Format = 35; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_YCbCr_P010: AHardwareBuffer_Format = 54; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R8_UNORM: AHardwareBuffer_Format = 56; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16_UINT: AHardwareBuffer_Format = 57; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16G16_UINT: AHardwareBuffer_Format = 58; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM: AHardwareBuffer_Format = + 59; pub type AHardwareBuffer_Format = ::std::os::raw::c_uint; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_CPU_READ_NEVER: AHardwareBuffer_UsageFlags = 0; @@ -2038,6 +2088,8 @@ pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP: AHardwareBuffer_UsageFlags = 33554432; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE: AHardwareBuffer_UsageFlags = 67108864; +pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_FRONT_BUFFER: + AHardwareBuffer_UsageFlags = 2147483648; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_0: AHardwareBuffer_UsageFlags = 268435456; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_1: AHardwareBuffer_UsageFlags = @@ -2098,92 +2150,52 @@ fn bindgen_test_layout_AHardwareBuffer_Desc() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) + "Size of AHardwareBuffer_Desc" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) + "Alignment of AHardwareBuffer_Desc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) + "Offset of field: AHardwareBuffer_Desc::width" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) + "Offset of field: AHardwareBuffer_Desc::height" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) + "Offset of field: AHardwareBuffer_Desc::layers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) + "Offset of field: AHardwareBuffer_Desc::format" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) + "Offset of field: AHardwareBuffer_Desc::usage" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) + "Offset of field: AHardwareBuffer_Desc::stride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) + "Offset of field: AHardwareBuffer_Desc::rfu0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) + "Offset of field: AHardwareBuffer_Desc::rfu1" ); } #[repr(C)] @@ -2201,42 +2213,27 @@ fn bindgen_test_layout_AHardwareBuffer_Plane() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) + "Size of AHardwareBuffer_Plane" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) + "Alignment of AHardwareBuffer_Plane" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) + "Offset of field: AHardwareBuffer_Plane::data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) + "Offset of field: AHardwareBuffer_Plane::pixelStride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) + "Offset of field: AHardwareBuffer_Plane::rowStride" ); } #[repr(C)] @@ -2253,32 +2250,22 @@ fn bindgen_test_layout_AHardwareBuffer_Planes() { assert_eq!( ::std::mem::size_of::(), 52usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) + "Size of AHardwareBuffer_Planes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) + "Alignment of AHardwareBuffer_Planes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) + "Offset of field: AHardwareBuffer_Planes::planeCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) + "Offset of field: AHardwareBuffer_Planes::planes" ); } #[repr(C)] @@ -2378,62 +2365,37 @@ fn bindgen_test_layout_GameActivityPointerAxes() { assert_eq!( ::std::mem::size_of::(), 208usize, - concat!("Size of: ", stringify!(GameActivityPointerAxes)) + "Size of GameActivityPointerAxes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityPointerAxes)) + "Alignment of GameActivityPointerAxes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(id) - ) + "Offset of field: GameActivityPointerAxes::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).toolType) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(toolType) - ) + "Offset of field: GameActivityPointerAxes::toolType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).axisValues) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(axisValues) - ) + "Offset of field: GameActivityPointerAxes::axisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawX) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawX) - ) + "Offset of field: GameActivityPointerAxes::rawX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawY) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawY) - ) + "Offset of field: GameActivityPointerAxes::rawY" ); } extern "C" { @@ -2483,202 +2445,107 @@ fn bindgen_test_layout_GameActivityMotionEvent() { assert_eq!( ::std::mem::size_of::(), 1752usize, - concat!("Size of: ", stringify!(GameActivityMotionEvent)) + "Size of GameActivityMotionEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityMotionEvent)) + "Alignment of GameActivityMotionEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityMotionEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityMotionEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityMotionEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityMotionEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityMotionEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityMotionEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityMotionEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actionButton) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(actionButton) - ) + "Offset of field: GameActivityMotionEvent::actionButton" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buttonState) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(buttonState) - ) + "Offset of field: GameActivityMotionEvent::buttonState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).classification) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(classification) - ) + "Offset of field: GameActivityMotionEvent::classification" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edgeFlags) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(edgeFlags) - ) + "Offset of field: GameActivityMotionEvent::edgeFlags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointerCount) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointerCount) - ) + "Offset of field: GameActivityMotionEvent::pointerCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointers) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointers) - ) + "Offset of field: GameActivityMotionEvent::pointers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historySize) as usize - ptr as usize }, 1724usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historySize) - ) + "Offset of field: GameActivityMotionEvent::historySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesMillis) as usize - ptr as usize }, 1728usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesMillis) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesMillis" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesNanos) as usize - ptr as usize }, 1732usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesNanos) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesNanos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalAxisValues) as usize - ptr as usize }, 1736usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalAxisValues) - ) + "Offset of field: GameActivityMotionEvent::historicalAxisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionX) as usize - ptr as usize }, 1740usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionX) - ) + "Offset of field: GameActivityMotionEvent::precisionX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionY) as usize - ptr as usize }, 1744usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionY) - ) + "Offset of field: GameActivityMotionEvent::precisionY" ); } extern "C" { @@ -2693,14 +2560,6 @@ extern "C" { #[doc = " \\brief Handle the freeing of the GameActivityMotionEvent struct."] pub fn GameActivityMotionEvent_destroy(c_event: *mut GameActivityMotionEvent); } -extern "C" { - #[doc = " \\brief Convert a Java `MotionEvent` to a `GameActivityMotionEvent`.\n\n This is done automatically by the GameActivity: see `onTouchEvent` to set\n a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityMotionEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityMotionEvent, - ); -} #[doc = " \\brief Describe a key event that happened on the GameActivity SurfaceView.\n\n This is 1:1 mapping to the information contained in a Java `KeyEvent`\n (see https://developer.android.com/reference/android/view/KeyEvent).\n The only exception is the event times, which are reported as\n nanoseconds in this struct."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2724,146 +2583,69 @@ fn bindgen_test_layout_GameActivityKeyEvent() { assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(GameActivityKeyEvent)) + "Size of GameActivityKeyEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityKeyEvent)) + "Alignment of GameActivityKeyEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityKeyEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityKeyEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityKeyEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityKeyEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityKeyEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityKeyEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityKeyEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(modifiers) - ) + "Offset of field: GameActivityKeyEvent::modifiers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).repeatCount) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(repeatCount) - ) + "Offset of field: GameActivityKeyEvent::repeatCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyCode) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(keyCode) - ) + "Offset of field: GameActivityKeyEvent::keyCode" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scanCode) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(scanCode) - ) + "Offset of field: GameActivityKeyEvent::scanCode" ); } -extern "C" { - #[doc = " \\brief Convert a Java `KeyEvent` to a `GameActivityKeyEvent`.\n\n This is done automatically by the GameActivity: see `onKeyUp` and `onKeyDown`\n to set a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityKeyEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityKeyEvent, - ); -} -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: - GameCommonInsetsType = 3; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; -#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] -pub type GameCommonInsetsType = ::std::os::raw::c_uint; #[doc = " This struct holds a span within a region of text from start (inclusive) to\n end (exclusive). An empty span or cursor position is specified with\n start==end. An undefined span is specified with start = end = SPAN_UNDEFINED."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2880,37 +2662,27 @@ fn bindgen_test_layout_GameTextInputSpan() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(GameTextInputSpan)) + "Size of GameTextInputSpan" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputSpan)) + "Alignment of GameTextInputSpan" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(start) - ) + "Offset of field: GameTextInputSpan::start" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(end) - ) + "Offset of field: GameTextInputSpan::end" ); } pub const GameTextInputSpanFlag_SPAN_UNDEFINED: GameTextInputSpanFlag = -1; #[doc = " Values with special meaning in a GameTextInputSpan."] -pub type GameTextInputSpanFlag = ::std::os::raw::c_int; +pub type GameTextInputSpanFlag = i32; #[doc = " This struct holds the state of an editable section of text.\n The text can have a selection and a composing region defined on it.\n A composing region is used by IMEs that allow input using multiple steps to\n compose a glyph or word. Use functions GameTextInput_getState and\n GameTextInput_setState to read and modify the state that an IME is editing."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2931,52 +2703,32 @@ fn bindgen_test_layout_GameTextInputState() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(GameTextInputState)) + "Size of GameTextInputState" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputState)) + "Alignment of GameTextInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_UTF8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_UTF8) - ) + "Offset of field: GameTextInputState::text_UTF8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_length) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_length) - ) + "Offset of field: GameTextInputState::text_length" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).selection) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(selection) - ) + "Offset of field: GameTextInputState::selection" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).composingRegion) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(composingRegion) - ) + "Offset of field: GameTextInputState::composingRegion" ); } #[doc = " A callback called by GameTextInput_getState.\n @param context User-defined context.\n @param state State, owned by the library, that will be valid for the duration\n of the callback."] @@ -3008,7 +2760,7 @@ pub const ShowImeFlags_SHOW_IME_UNDEFINED: ShowImeFlags = 0; pub const ShowImeFlags_SHOW_IMPLICIT: ShowImeFlags = 1; pub const ShowImeFlags_SHOW_FORCED: ShowImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_showIme."] -pub type ShowImeFlags = ::std::os::raw::c_uint; +pub type ShowImeFlags = u32; extern "C" { #[doc = " Show the IME. Calls InputMethodManager.showSoftInput().\n @param input A valid GameTextInput library handle.\n @param flags Defined in ShowImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_showIme(input: *mut GameTextInput, flags: u32); @@ -3017,9 +2769,9 @@ pub const HideImeFlags_HIDE_IME_UNDEFINED: HideImeFlags = 0; pub const HideImeFlags_HIDE_IMPLICIT_ONLY: HideImeFlags = 1; pub const HideImeFlags_HIDE_NOT_ALWAYS: HideImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_hideIme."] -pub type HideImeFlags = ::std::os::raw::c_uint; +pub type HideImeFlags = u32; extern "C" { - #[doc = " Show the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] + #[doc = " Hide the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_hideIme(input: *mut GameTextInput, flags: u32); } extern "C" { @@ -3046,7 +2798,7 @@ pub type GameTextInputEventCallback = ::std::option::Option< ), >; extern "C" { - #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback."] + #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback.\n This function is deprecated. Don't perform any complex processing inside\n the callback other than copying the state variable. Using any synchronization\n primitives inside this callback may cause a deadlock."] pub fn GameTextInput_setEventCallback( input: *mut GameTextInput, callback: GameTextInputEventCallback, @@ -3089,6 +2841,144 @@ extern "C" { context: *mut ::std::os::raw::c_void, ); } +#[doc = " Mask of bits that determine the overall class\n of text being given. Currently supported classes are:\n {@link #TYPE_CLASS_TEXT}, {@link #TYPE_CLASS_NUMBER},\n {@link #TYPE_CLASS_PHONE}, {@link #TYPE_CLASS_DATETIME}.\n

IME authors: If the class is not one you\n understand, assume {@link #TYPE_CLASS_TEXT} with NO variation\n or flags.

"] +pub const GameTextInputType_TYPE_MASK_CLASS: GameTextInputType = 15; +#[doc = " Mask of bits that determine the variation of\n the base content class."] +pub const GameTextInputType_TYPE_MASK_VARIATION: GameTextInputType = 4080; +#[doc = " Mask of bits that provide addition bit flags\n of options."] +pub const GameTextInputType_TYPE_MASK_FLAGS: GameTextInputType = 16773120; +#[doc = " Special content type for when no explicit type has been specified.\n This should be interpreted to mean that the target input connection\n is not rich, it can not process and show things like candidate text nor\n retrieve the current text, so the input method will need to run in a\n limited \"generate key events\" mode, if it supports it. Note that some\n input methods may not support it, for example a voice-based input\n method will likely not be able to generate key events even if this\n flag is set."] +pub const GameTextInputType_TYPE_NULL: GameTextInputType = 0; +#[doc = " Class for normal text. This class supports the following flags (only\n one of which should be set):\n {@link #TYPE_TEXT_FLAG_CAP_CHARACTERS},\n {@link #TYPE_TEXT_FLAG_CAP_WORDS}, and.\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. It also supports the\n following variations:\n {@link #TYPE_TEXT_VARIATION_NORMAL}, and\n {@link #TYPE_TEXT_VARIATION_URI}. If you do not recognize the\n variation, normal should be assumed."] +pub const GameTextInputType_TYPE_CLASS_TEXT: GameTextInputType = 1; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize all characters. Overrides\n {@link #TYPE_TEXT_FLAG_CAP_WORDS} and\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_CHARACTERS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_CHARACTERS: GameTextInputType = 4096; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n every word. Overrides {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This\n value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_WORDS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_WORDS: GameTextInputType = 8192; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n each sentence. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_SENTENCES}. For example\n in English it means to capitalize after a period and a space (note that\n other languages may have different characters for period, or not use\n spaces, or use different grammatical rules). Of course, this only affects\n languages where there are upper-case and lower-case letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_SENTENCES: GameTextInputType = 16384; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the user is entering free-form\n text that should have auto-correction applied to it. Without this flag,\n the IME will not try to correct typos. You should always set this flag\n unless you really expect users to type non-words in this field, for\n example to choose a name for a character in a game.\n Contrast this with {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_CORRECT} means that the IME will try to\n auto-correct typos as the user is typing, but does not define whether\n the IME offers an interface to show suggestions."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_CORRECT: GameTextInputType = 32768; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the text editor (which means\n the application) is performing auto-completion of the text being entered\n based on its own semantics, which it will present to the user as they type.\n This generally means that the input method should not be showing\n candidates itself, but can expect the editor to supply its own\n completions/candidates from\n {@link android.view.inputmethod.InputMethodSession#displayCompletions\n InputMethodSession.displayCompletions()} as a result of the editor calling\n {@link android.view.inputmethod.InputMethodManager#displayCompletions\n InputMethodManager.displayCompletions()}.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_COMPLETE} means the editor should show an\n interface for displaying suggestions, but instead of supplying its own\n it will rely on the Editor to pass completions/corrections."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_COMPLETE: GameTextInputType = 65536; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: multiple lines of text can be\n entered into the field. If this flag is not set, the text field\n will be constrained to a single line. The IME may also choose not to\n display an enter key when this flag is not set, as there should be no\n need to create new lines."] +pub const GameTextInputType_TYPE_TEXT_FLAG_MULTI_LINE: GameTextInputType = 131072; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the regular text view associated\n with this should not be multi-line, but when a fullscreen input method\n is providing text it should use multiple lines if it can."] +pub const GameTextInputType_TYPE_TEXT_FLAG_IME_MULTI_LINE: GameTextInputType = 262144; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the input method does not need to\n display any dictionary-based candidates. This is useful for text views that\n do not contain words from the language and do not benefit from any\n dictionary-based completions or corrections. It overrides the\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} value when set.\n Please avoid using this unless you are certain this is what you want.\n Many input methods need suggestions to work well, for example the ones\n based on gesture typing. Consider clearing\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} instead if you just do not\n want the IME to correct typos.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE}:\n {@code TYPE_TEXT_FLAG_NO_SUGGESTIONS} means the IME does not need to\n show an interface to display suggestions. Most IMEs will also take this to\n mean they do not need to try to auto-correct what the user is typing."] +pub const GameTextInputType_TYPE_TEXT_FLAG_NO_SUGGESTIONS: GameTextInputType = 524288; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: Let the IME know the text conversion\n suggestions are required by the application. Text conversion suggestion is\n for the transliteration languages which has pronunciation characters and\n target characters. When the user is typing the pronunciation charactes, the\n IME could provide the possible target characters to the user. When this\n flag is set, the IME should insert the text conversion suggestions through\n {@link Builder#setTextConversionSuggestions(List)} and\n the {@link TextAttribute} with initialized with the text conversion\n suggestions is provided by the IME to the application. To receive the\n additional information, the application needs to implement {@link\n InputConnection#setComposingText(CharSequence, int, TextAttribute)},\n {@link InputConnection#setComposingRegion(int, int, TextAttribute)}, and\n {@link InputConnection#commitText(CharSequence, int, TextAttribute)}."] +pub const GameTextInputType_TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS: GameTextInputType = + 1048576; +#[doc = " Default variation of {@link #TYPE_CLASS_TEXT}: plain old normal text."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a URI."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_URI: GameTextInputType = 16; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering an e-mail address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_ADDRESS: GameTextInputType = 32; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the subject line of\n an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_SUBJECT: GameTextInputType = 48; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a short, possibly informal\n message such as an instant message or a text message."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_SHORT_MESSAGE: GameTextInputType = 64; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the content of a long,\n possibly formal message such as the body of an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_LONG_MESSAGE: GameTextInputType = 80; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the name of a person."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PERSON_NAME: GameTextInputType = 96; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a postal mailing address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_POSTAL_ADDRESS: GameTextInputType = 112; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PASSWORD: GameTextInputType = 128; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password, which should\n be visible to the user."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_VISIBLE_PASSWORD: GameTextInputType = 144; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text inside of a web form."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EDIT_TEXT: GameTextInputType = 160; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text to filter contents\n of a list etc."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_FILTER: GameTextInputType = 176; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text for phonetic\n pronunciation, such as a phonetic name field in contacts. This is mostly\n useful for languages where one spelling may have several phonetic\n readings, like Japanese."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PHONETIC: GameTextInputType = 192; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering e-mail address inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_EMAIL_ADDRESS}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS: GameTextInputType = 208; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering password inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_PASSWORD}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_PASSWORD: GameTextInputType = 224; +#[doc = " Class for numeric text. This class supports the following flags:\n {@link #TYPE_NUMBER_FLAG_SIGNED} and\n {@link #TYPE_NUMBER_FLAG_DECIMAL}. It also supports the following\n variations: {@link #TYPE_NUMBER_VARIATION_NORMAL} and\n {@link #TYPE_NUMBER_VARIATION_PASSWORD}.\n

IME authors: If you do not recognize\n the variation, normal should be assumed.

"] +pub const GameTextInputType_TYPE_CLASS_NUMBER: GameTextInputType = 2; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is signed, allowing\n a positive or negative sign at the start."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_SIGNED: GameTextInputType = 4096; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is decimal, allowing\n a decimal point to provide fractional values."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_DECIMAL: GameTextInputType = 8192; +#[doc = " Default variation of {@link #TYPE_CLASS_NUMBER}: plain normal\n numeric text. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be dropped when passed through\n {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_NUMBER}: entering a numeric password.\n This was added in {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An\n IME must target this API version or later to see this input type; if it\n doesn't, a request for this type will be dropped when passed\n through {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_PASSWORD: GameTextInputType = 16; +#[doc = " Class for a phone number. This class currently supports no variations\n or flags."] +pub const GameTextInputType_TYPE_CLASS_PHONE: GameTextInputType = 3; +#[doc = " Class for dates and times. It supports the\n following variations:\n {@link #TYPE_DATETIME_VARIATION_NORMAL}\n {@link #TYPE_DATETIME_VARIATION_DATE}, and\n {@link #TYPE_DATETIME_VARIATION_TIME}."] +pub const GameTextInputType_TYPE_CLASS_DATETIME: GameTextInputType = 4; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n both a date and time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a date."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_DATE: GameTextInputType = 16; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_TIME: GameTextInputType = 32; +#[doc = " Definitions for inputType argument of GameActivity_setImeEditorInfo()\n\n
\n |-------|-------|-------|-------|\n                              1111 TYPE_MASK_CLASS\n                      11111111     TYPE_MASK_VARIATION\n          111111111111             TYPE_MASK_FLAGS\n |-------|-------|-------|-------|\n                                   TYPE_NULL\n |-------|-------|-------|-------|\n                                 1 TYPE_CLASS_TEXT\n                             1     TYPE_TEXT_VARIATION_URI\n                            1      TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n                            11     TYPE_TEXT_VARIATION_EMAIL_SUBJECT\n                           1       TYPE_TEXT_VARIATION_SHORT_MESSAGE\n                           1 1     TYPE_TEXT_VARIATION_LONG_MESSAGE\n                           11      TYPE_TEXT_VARIATION_PERSON_NAME\n                           111     TYPE_TEXT_VARIATION_POSTAL_ADDRESS\n                          1        TYPE_TEXT_VARIATION_PASSWORD\n                          1  1     TYPE_TEXT_VARIATION_VISIBLE_PASSWORD\n                          1 1      TYPE_TEXT_VARIATION_WEB_EDIT_TEXT\n                          1 11     TYPE_TEXT_VARIATION_FILTER\n                          11       TYPE_TEXT_VARIATION_PHONETIC\n                          11 1     TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS\n                          111      TYPE_TEXT_VARIATION_WEB_PASSWORD\n                     1             TYPE_TEXT_FLAG_CAP_CHARACTERS\n                    1              TYPE_TEXT_FLAG_CAP_WORDS\n                   1               TYPE_TEXT_FLAG_CAP_SENTENCES\n                  1                TYPE_TEXT_FLAG_AUTO_CORRECT\n                 1                 TYPE_TEXT_FLAG_AUTO_COMPLETE\n                1                  TYPE_TEXT_FLAG_MULTI_LINE\n               1                   TYPE_TEXT_FLAG_IME_MULTI_LINE\n              1                    TYPE_TEXT_FLAG_NO_SUGGESTIONS\n             1 TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS\n |-------|-------|-------|-------|\n                                1  TYPE_CLASS_NUMBER\n                             1     TYPE_NUMBER_VARIATION_PASSWORD\n                     1             TYPE_NUMBER_FLAG_SIGNED\n                    1              TYPE_NUMBER_FLAG_DECIMAL\n |-------|-------|-------|-------|\n                                11 TYPE_CLASS_PHONE\n |-------|-------|-------|-------|\n                               1   TYPE_CLASS_DATETIME\n                             1     TYPE_DATETIME_VARIATION_DATE\n                            1      TYPE_DATETIME_VARIATION_TIME\n |-------|-------|-------|-------|
"] +pub type GameTextInputType = u32; +#[doc = " Set of bits in {@link #imeOptions} that provide alternative actions\n associated with the \"enter\" key. This both helps the IME provide\n better feedback about what the enter key will do, and also allows it\n to provide alternative mechanisms for providing that command."] +pub const GameTextInputActionType_IME_MASK_ACTION: GameTextInputActionType = 255; +#[doc = " Bits of {@link #IME_MASK_ACTION}: no specific action has been\n associated with this editor, let the editor come up with its own if\n it can."] +pub const GameTextInputActionType_IME_ACTION_UNSPECIFIED: GameTextInputActionType = 0; +#[doc = " Bits of {@link #IME_MASK_ACTION}: there is no available action."] +pub const GameTextInputActionType_IME_ACTION_NONE: GameTextInputActionType = 1; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"go\"\n operation to take the user to the target of the text they typed.\n Typically used, for example, when entering a URL."] +pub const GameTextInputActionType_IME_ACTION_GO: GameTextInputActionType = 2; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"search\"\n operation, taking the user to the results of searching for the text\n they have typed (in whatever context is appropriate)."] +pub const GameTextInputActionType_IME_ACTION_SEARCH: GameTextInputActionType = 3; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"send\"\n operation, delivering the text to its target. This is typically used\n when composing a message in IM or SMS where sending is immediate."] +pub const GameTextInputActionType_IME_ACTION_SEND: GameTextInputActionType = 4; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"next\"\n operation, taking the user to the next field that will accept text."] +pub const GameTextInputActionType_IME_ACTION_NEXT: GameTextInputActionType = 5; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"done\"\n operation, typically meaning there is nothing more to input and the\n IME will be closed."] +pub const GameTextInputActionType_IME_ACTION_DONE: GameTextInputActionType = 6; +#[doc = " Bits of {@link #IME_MASK_ACTION}: like {@link #IME_ACTION_NEXT}, but\n for moving to the previous field. This will normally not be used to\n specify an action (since it precludes {@link #IME_ACTION_NEXT}), but\n can be returned to the app if it sets {@link #IME_FLAG_NAVIGATE_PREVIOUS}."] +pub const GameTextInputActionType_IME_ACTION_PREVIOUS: GameTextInputActionType = 7; +#[doc = " actionId and imeOptions argument of GameActivity_setImeEditorInfo().\n\n
\n |-------|-------|-------|-------|\n                              1111 IME_MASK_ACTION\n |-------|-------|-------|-------|\n                                   IME_ACTION_UNSPECIFIED\n                                 1 IME_ACTION_NONE\n                                1  IME_ACTION_GO\n                                11 IME_ACTION_SEARCH\n                               1   IME_ACTION_SEND\n                               1 1 IME_ACTION_NEXT\n                               11  IME_ACTION_DONE\n                               111 IME_ACTION_PREVIOUS\n         1                         IME_FLAG_NO_PERSONALIZED_LEARNING\n        1                          IME_FLAG_NO_FULLSCREEN\n       1                           IME_FLAG_NAVIGATE_PREVIOUS\n      1                            IME_FLAG_NAVIGATE_NEXT\n     1                             IME_FLAG_NO_EXTRACT_UI\n    1                              IME_FLAG_NO_ACCESSORY_ACTION\n   1                               IME_FLAG_NO_ENTER_ACTION\n  1                                IME_FLAG_FORCE_ASCII\n |-------|-------|-------|-------|
"] +pub type GameTextInputActionType = u32; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME should not update\n any personalized data such as typing history and personalized language\n model based on what the user typed on this text editing object. Typical\n use cases are:
  • When the application is in a special mode, where\n user's activities are expected to be not recorded in the application's\n history. Some web browsers and chat applications may have this kind of\n modes.
  • When storing typing history does not make much sense.\n Specifying this flag in typing games may help to avoid typing history from\n being filled up with words that the user is less likely to type in their\n daily life. Another example is that when the application already knows\n that the expected input is not a valid word (e.g. a promotion code that is\n not a valid word in any natural language).
  • \n
\n\n

Applications need to be aware that the flag is not a guarantee, and some\n IMEs may not respect it.

"] +pub const GameTextInputImeOptions_IME_FLAG_NO_PERSONALIZED_LEARNING: GameTextInputImeOptions = + 16777216; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME never go\n into fullscreen mode.\n By default, IMEs may go into full screen mode when they think\n it's appropriate, for example on small screens in landscape\n orientation where displaying a software keyboard may occlude\n such a large portion of the screen that the remaining part is\n too small to meaningfully display the application UI.\n If this flag is set, compliant IMEs will never go into full screen mode,\n and always leave some space to display the application UI.\n Applications need to be aware that the flag is not a guarantee, and\n some IMEs may ignore it."] +pub const GameTextInputImeOptions_IME_FLAG_NO_FULLSCREEN: GameTextInputImeOptions = 33554432; +#[doc = " Flag of {@link #imeOptions}: like {@link #IME_FLAG_NAVIGATE_NEXT}, but\n specifies there is something interesting that a backward navigation\n can focus on. If the user selects the IME's facility to backward\n navigate, this will show up in the application as an {@link\n #IME_ACTION_PREVIOUS} at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_PREVIOUS: GameTextInputImeOptions = 67108864; +#[doc = " Flag of {@link #imeOptions}: used to specify that there is something\n interesting that a forward navigation can focus on. This is like using\n {@link #IME_ACTION_NEXT}, except allows the IME to be multiline (with\n an enter key) as well as provide forward navigation. Note that some\n IMEs may not be able to do this, especially when running on a small\n screen where there is little space. In that case it does not need to\n present a UI for this option. Like {@link #IME_ACTION_NEXT}, if the\n user selects the IME's facility to forward navigate, this will show up\n in the application at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_NEXT: GameTextInputImeOptions = 134217728; +#[doc = " Flag of {@link #imeOptions}: used to specify that the IME does not need\n to show its extracted text UI. For input methods that may be fullscreen,\n often when in landscape mode, this allows them to be smaller and let part\n of the application be shown behind, through transparent UI parts in the\n fullscreen IME. The part of the UI visible to the user may not be\n responsive to touch because the IME will receive touch events, which may\n confuse the user; use {@link #IME_FLAG_NO_FULLSCREEN} instead for a better\n experience. Using this flag is discouraged and it may become deprecated in\n the future. Its meaning is unclear in some situations and it may not work\n appropriately on older versions of the platform."] +pub const GameTextInputImeOptions_IME_FLAG_NO_EXTRACT_UI: GameTextInputImeOptions = 268435456; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}, this indicates that the action\n should not be available as an accessory button on the right of the\n extracted text when the input method is full-screen. Note that by setting\n this flag, there can be cases where the action is simply never available to\n the user. Setting this generally means that you think that in fullscreen\n mode, where there is little space to show the text, it's not worth taking\n some screen real estate to display the action and it should be used instead\n to show more text."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ACCESSORY_ACTION: GameTextInputImeOptions = 536870912; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}. If this flag is not set, IMEs will\n normally replace the \"enter\" key with the action supplied. This flag\n indicates that the action should not be available in-line as a replacement\n for the \"enter\" key. Typically this is because the action has such a\n significant impact or is not recoverable enough that accidentally hitting\n it should be avoided, such as sending a message. Note that\n {@link android.widget.TextView} will automatically set this flag for you\n on multi-line text views."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ENTER_ACTION: GameTextInputImeOptions = 1073741824; +#[doc = " Flag of {@link #imeOptions}: used to request an IME that is capable of\n inputting ASCII characters. The intention of this flag is to ensure that\n the user can type Roman alphabet characters in a {@link\n android.widget.TextView}. It is typically used for an account ID or\n password input. A lot of the time, IMEs are already able to input ASCII\n even without being told so (such IMEs already respect this flag in a\n sense), but there are cases when this is not the default. For instance,\n users of languages using a different script like Arabic, Greek, Hebrew or\n Russian typically have a keyboard that can't input ASCII characters by\n default. Applications need to be aware that the flag is not a guarantee,\n and some IMEs may not respect it. However, it is strongly recommended for\n IME authors to respect this flag especially when their IME could end up\n with a state where only languages using non-ASCII are enabled."] +pub const GameTextInputImeOptions_IME_FLAG_FORCE_ASCII: GameTextInputImeOptions = 2147483648; +#[doc = " Flag of {@link #internalImeOptions}: flag is set when app window containing\n this\n {@link EditorInfo} is using {@link Configuration#ORIENTATION_PORTRAIT}\n mode.\n @hide"] +pub const GameTextInputImeOptions_IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT: GameTextInputImeOptions = + 1; +#[doc = " Generic unspecified type for {@link #imeOptions}."] +pub const GameTextInputImeOptions_IME_NULL: GameTextInputImeOptions = 0; +pub type GameTextInputImeOptions = u32; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: + GameCommonInsetsType = 3; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; +#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] +pub type GameCommonInsetsType = u8; #[doc = " This structure defines the native side of an android.app.GameActivity.\n It is created by the framework, and handed to the application's native\n code as it is being launched."] #[repr(C)] pub struct GameActivity { @@ -3120,112 +3010,62 @@ fn bindgen_test_layout_GameActivity() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(GameActivity)) + "Size of GameActivity" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivity)) + "Alignment of GameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(callbacks) - ) + "Offset of field: GameActivity::callbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(vm) - ) + "Offset of field: GameActivity::vm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(env) - ) + "Offset of field: GameActivity::env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).javaGameActivity) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(javaGameActivity) - ) + "Offset of field: GameActivity::javaGameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(internalDataPath) - ) + "Offset of field: GameActivity::internalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(externalDataPath) - ) + "Offset of field: GameActivity::externalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(sdkVersion) - ) + "Offset of field: GameActivity::sdkVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(instance) - ) + "Offset of field: GameActivity::instance" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(assetManager) - ) + "Offset of field: GameActivity::assetManager" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(obbPath) - ) + "Offset of field: GameActivity::obbPath" ); } #[doc = " A function the user should call from their callback with the data, its length\n and the library- supplied context."] @@ -3282,7 +3122,7 @@ pub struct GameActivityCallbacks { pub onNativeWindowDestroyed: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, window: *mut ANativeWindow), >, - #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] + #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] pub onConfigurationChanged: ::std::option::Option, #[doc = " The system is running low on memory. Use this callback to release\n resources you do not need, to help the system avoid killing more\n important processes."] @@ -3321,6 +3161,13 @@ pub struct GameActivityCallbacks { pub onContentRectChanged: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, rect: *const ARect), >, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onSoftwareKeyboardVisibilityChanged: + ::std::option::Option, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onEditorAction: ::std::option::Option< + unsafe extern "C" fn(activity: *mut GameActivity, action: ::std::os::raw::c_int) -> bool, + >, } #[test] fn bindgen_test_layout_GameActivityCallbacks() { @@ -3329,203 +3176,120 @@ fn bindgen_test_layout_GameActivityCallbacks() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 76usize, - concat!("Size of: ", stringify!(GameActivityCallbacks)) + 84usize, + "Size of GameActivityCallbacks" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityCallbacks)) + "Alignment of GameActivityCallbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStart) - ) + "Offset of field: GameActivityCallbacks::onStart" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onResume) - ) + "Offset of field: GameActivityCallbacks::onResume" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) + "Offset of field: GameActivityCallbacks::onSaveInstanceState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onPause) - ) + "Offset of field: GameActivityCallbacks::onPause" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStop) - ) + "Offset of field: GameActivityCallbacks::onStop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onDestroy) - ) + "Offset of field: GameActivityCallbacks::onDestroy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowFocusChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowCreated" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowResized" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowRedrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowDestroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) + "Offset of field: GameActivityCallbacks::onConfigurationChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTrimMemory) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTrimMemory) - ) + "Offset of field: GameActivityCallbacks::onTrimMemory" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTouchEvent) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTouchEvent) - ) + "Offset of field: GameActivityCallbacks::onTouchEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyDown) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyDown) - ) + "Offset of field: GameActivityCallbacks::onKeyDown" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyUp) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyUp) - ) + "Offset of field: GameActivityCallbacks::onKeyUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTextInputEvent) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTextInputEvent) - ) + "Offset of field: GameActivityCallbacks::onTextInputEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowInsetsChanged) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowInsetsChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowInsetsChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) + "Offset of field: GameActivityCallbacks::onContentRectChanged" + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).onSoftwareKeyboardVisibilityChanged) as usize - ptr as usize + }, + 76usize, + "Offset of field: GameActivityCallbacks::onSoftwareKeyboardVisibilityChanged" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).onEditorAction) as usize - ptr as usize }, + 80usize, + "Offset of field: GameActivityCallbacks::onEditorAction" ); } #[doc = " This is the function that must be in the native code to instantiate the\n application's native activity. It is called with the activity instance (see\n above); if the code is being instantiated from a previously saved instance,\n the savedState will be non-NULL and point to the saved data. You must make\n any copy of this data you need -- it will be released after you return from\n this function."] @@ -3605,7 +3369,7 @@ pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_TURN_SCREEN_ON: GameActiv pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_DISMISS_KEYGUARD: GameActivitySetWindowFlags = 4194304; #[doc = " Flags for GameActivity_setWindowFlags,\n as per the Java API at android.view.WindowManager.LayoutParams."] -pub type GameActivitySetWindowFlags = ::std::os::raw::c_uint; +pub type GameActivitySetWindowFlags = u32; extern "C" { #[doc = " Change the window flags of the given activity. Calls getWindow().setFlags()\n of the given activity.\n Note that some flags must be set before the window decoration is created,\n see\n https://developer.android.com/reference/android/view/Window#setFlags(int,%20int).\n Note also that this method can be called from\n *any* thread; it will send a message to the main thread of the process\n where the Java finish call will take place."] pub fn GameActivity_setWindowFlags( @@ -3621,11 +3385,15 @@ pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT: pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_FORCED: GameActivityShowSoftInputFlags = 2; #[doc = " Flags for GameActivity_showSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityShowSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityShowSoftInputFlags = u8; extern "C" { #[doc = " Show the IME while in the given activity. Calls\n InputMethodManager.showSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java call will take place."] pub fn GameActivity_showSoftInput(activity: *mut GameActivity, flags: u32); } +extern "C" { + #[doc = " Restarts the input method. Calls InputMethodManager.restartInput().\n Note that this method can be called from *any* thread; it will send a message\n to the main thread of the process where the Java call will take place."] + pub fn GameActivity_restartInput(activity: *mut GameActivity); +} extern "C" { #[doc = " Set the text entry state (see documentation of the GameTextInputState struct\n in the Game Text Input library reference).\n\n Ownership of the state is maintained by the caller."] pub fn GameActivity_setTextInputState( @@ -3652,7 +3420,7 @@ pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_O pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS: GameActivityHideSoftInputFlags = 2; #[doc = " Flags for GameActivity_hideSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityHideSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityHideSoftInputFlags = u16; extern "C" { #[doc = " Hide the IME while in the given activity. Calls\n InputMethodManager.hideSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java finish call will take place."] pub fn GameActivity_hideSoftInput(activity: *mut GameActivity, flags: u32); @@ -3666,12 +3434,16 @@ extern "C" { ); } extern "C" { - #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note that this function will attach the current thread to the JVM if it is\n not already attached, so the caller must detach the thread from the JVM\n before the thread is destroyed using DetachCurrentThread."] + #[doc = " Tells whether the software keyboard is visible or not."] + pub fn GameActivity_isSoftwareKeyboardVisible(activity: *mut GameActivity) -> bool; +} +extern "C" { + #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note: currently only TYPE_NULL AND TYPE_CLASS_NUMBER are supported."] pub fn GameActivity_setImeEditorInfo( activity: *mut GameActivity, - inputType: ::std::os::raw::c_int, - actionId: ::std::os::raw::c_int, - imeOptions: ::std::os::raw::c_int, + inputType: GameTextInputType, + actionId: GameTextInputActionType, + imeOptions: GameTextInputImeOptions, ); } extern "C" { @@ -3702,6 +3474,9 @@ extern "C" { extern "C" { pub fn GameActivity_getKeyboardHidden(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + pub fn GameActivity_getLocalesCount(activity: *mut GameActivity) -> ::std::os::raw::c_int; +} extern "C" { pub fn GameActivity_getMcc(activity: *mut GameActivity) -> ::std::os::raw::c_int; } @@ -3734,6 +3509,39 @@ extern "C" { extern "C" { pub fn GameActivity_getUIMode(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " The functions below return Java locale information.\n\n In simple cases there will be just one locale, but it's possible tha\n there are more than one locale objects. Users are encouraged to write code\n that handles all locales and not just the first one.\n\n The functions in the block below return string values in the provided buffer.\n Return value is zero if there were no errors, otherwise it's non-zero.\n If the return value is zero, `dst` will contain a null-terminated string:\n strlen(dst) <= dst_size - 1.\n If the return value is non-zero, the content of dst is undefined.\n\n Parameters:\n\n dst, dst_size: define a receiver buffer. Locale string can be something\n short like \"EN/EN\", but it may be longer. You should be safe with a buffer\n size of 256 bytes.\n\n If the buffer is too small, ENOBUFS is returned. Try allocating a larger\n buffer in this case.\n\n localeIdx must be between 0 and the value of GameActivity_getLocalesCount().\n If localeIdx is out of range, EINVAL is returned.\n\n Refer to Java documentation of locales for more information."] + pub fn GameActivity_getLocaleLanguage( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleScript( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleCountry( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleVariant( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} pub const ACONFIGURATION_ORIENTATION_ANY: _bindgen_ty_21 = 0; pub const ACONFIGURATION_ORIENTATION_PORT: _bindgen_ty_21 = 1; pub const ACONFIGURATION_ORIENTATION_LAND: _bindgen_ty_21 = 2; @@ -3832,45 +3640,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } #[repr(C)] @@ -3905,222 +3694,117 @@ fn bindgen_test_layout_sigcontext() { assert_eq!( ::std::mem::size_of::(), 84usize, - concat!("Size of: ", stringify!(sigcontext)) + "Size of sigcontext" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigcontext)) + "Alignment of sigcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trap_no) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trap_no) - ) + "Offset of field: sigcontext::trap_no" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(error_code) - ) + "Offset of field: sigcontext::error_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r0) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r0) - ) + "Offset of field: sigcontext::arm_r0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r1) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r1) - ) + "Offset of field: sigcontext::arm_r1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r2) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r2) - ) + "Offset of field: sigcontext::arm_r2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r3) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r3) - ) + "Offset of field: sigcontext::arm_r3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r4) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r4) - ) + "Offset of field: sigcontext::arm_r4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r5) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r5) - ) + "Offset of field: sigcontext::arm_r5" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r6) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r6) - ) + "Offset of field: sigcontext::arm_r6" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r7) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r7) - ) + "Offset of field: sigcontext::arm_r7" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r8) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r8) - ) + "Offset of field: sigcontext::arm_r8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r9) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r9) - ) + "Offset of field: sigcontext::arm_r9" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_r10) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_r10) - ) + "Offset of field: sigcontext::arm_r10" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_fp) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_fp) - ) + "Offset of field: sigcontext::arm_fp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_ip) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_ip) - ) + "Offset of field: sigcontext::arm_ip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_sp) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_sp) - ) + "Offset of field: sigcontext::arm_sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_lr) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_lr) - ) + "Offset of field: sigcontext::arm_lr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_pc) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_pc) - ) + "Offset of field: sigcontext::arm_pc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arm_cpsr) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(arm_cpsr) - ) + "Offset of field: sigcontext::arm_cpsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fault_address) - ) + "Offset of field: sigcontext::fault_address" ); } pub type sigset_t = ::std::os::raw::c_ulong; @@ -4156,35 +3840,22 @@ fn bindgen_test_layout___kernel_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>(), 4usize, - concat!("Size of: ", stringify!(__kernel_sigaction__bindgen_ty_1)) + "Size of __kernel_sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__kernel_sigaction__bindgen_ty_1) - ) + "Alignment of __kernel_sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_handler) - ) + "Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_sigaction) - ) + "Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_sigaction" ); } #[test] @@ -4194,52 +3865,32 @@ fn bindgen_test_layout___kernel_sigaction() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) + "Size of __kernel_sigaction" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) + "Alignment of __kernel_sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(_u) - ) + "Offset of field: __kernel_sigaction::_u" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: __kernel_sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: __kernel_sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: __kernel_sigaction::sa_restorer" ); } #[repr(C)] @@ -4256,42 +3907,27 @@ fn bindgen_test_layout_sigaltstack() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(sigaltstack)) + "Size of sigaltstack" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaltstack)) + "Alignment of sigaltstack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) + "Offset of field: sigaltstack::ss_sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) + "Offset of field: sigaltstack::ss_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) + "Offset of field: sigaltstack::ss_size" ); } pub type stack_t = sigaltstack; @@ -4305,35 +3941,21 @@ pub union sigval { fn bindgen_test_layout_sigval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigval)) - ); + assert_eq!(::std::mem::size_of::(), 4usize, "Size of sigval"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigval)) + "Alignment of sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) + "Offset of field: sigval::sival_int" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) + "Offset of field: sigval::sival_ptr" ); } pub type sigval_t = sigval; @@ -4362,32 +3984,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_1>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) + "Size of __sifields__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) + "Alignment of __sifields__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_1::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_1::_uid" ); } #[repr(C)] @@ -4406,52 +4018,32 @@ fn bindgen_test_layout___sifields__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_2>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) + "Size of __sifields__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_2>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) + "Alignment of __sifields__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) + "Offset of field: __sifields__bindgen_ty_2::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) + "Offset of field: __sifields__bindgen_ty_2::_overrun" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_2::_sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) + "Offset of field: __sifields__bindgen_ty_2::_sys_private" ); } #[repr(C)] @@ -4469,42 +4061,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_3>(), 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) + "Size of __sifields__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_3>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) + "Alignment of __sifields__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_3::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_3::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_3::_sigval" ); } #[repr(C)] @@ -4524,62 +4101,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_4() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_4>(), 20usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) + "Size of __sifields__bindgen_ty_4" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_4>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) + "Alignment of __sifields__bindgen_ty_4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_4::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_4::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) + "Offset of field: __sifields__bindgen_ty_4::_status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) + "Offset of field: __sifields__bindgen_ty_4::_utime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) + "Offset of field: __sifields__bindgen_ty_4::_stime" ); } #[repr(C)] @@ -4612,48 +4164,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper" ); } #[repr(C)] @@ -4670,38 +4201,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey" ); } #[repr(C)] @@ -4709,6 +4224,7 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _data: ::std::os::raw::c_ulong, pub _type: __u32, + pub _flags: __u32, } #[test] fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { @@ -4717,39 +4233,28 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + 12usize, + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 8usize, + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags" ); } #[test] @@ -4760,68 +4265,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf" ); } #[test] @@ -4832,22 +4306,17 @@ fn bindgen_test_layout___sifields__bindgen_ty_5() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) + "Size of __sifields__bindgen_ty_5" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) + "Alignment of __sifields__bindgen_ty_5" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) + "Offset of field: __sifields__bindgen_ty_5::_addr" ); } #[repr(C)] @@ -4864,32 +4333,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_6() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_6>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) + "Size of __sifields__bindgen_ty_6" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_6>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) + "Alignment of __sifields__bindgen_ty_6" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) + "Offset of field: __sifields__bindgen_ty_6::_band" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) + "Offset of field: __sifields__bindgen_ty_6::_fd" ); } #[repr(C)] @@ -4907,42 +4366,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_7() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_7>(), 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) + "Size of __sifields__bindgen_ty_7" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_7>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) + "Alignment of __sifields__bindgen_ty_7" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) + "Offset of field: __sifields__bindgen_ty_7::_call_addr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) + "Offset of field: __sifields__bindgen_ty_7::_syscall" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) + "Offset of field: __sifields__bindgen_ty_7::_arch" ); } #[test] @@ -4952,82 +4396,47 @@ fn bindgen_test_layout___sifields() { assert_eq!( ::std::mem::size_of::<__sifields>(), 20usize, - concat!("Size of: ", stringify!(__sifields)) + "Size of __sifields" ); assert_eq!( ::std::mem::align_of::<__sifields>(), 4usize, - concat!("Alignment of ", stringify!(__sifields)) + "Alignment of __sifields" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) + "Offset of field: __sifields::_kill" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) + "Offset of field: __sifields::_timer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) + "Offset of field: __sifields::_rt" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) + "Offset of field: __sifields::_sigchld" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) + "Offset of field: __sifields::_sigfault" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) + "Offset of field: __sifields::_sigpoll" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) + "Offset of field: __sifields::_sigsys" ); } #[repr(C)] @@ -5057,55 +4466,32 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields" ); } #[test] @@ -5116,22 +4502,17 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) + "Alignment of siginfo__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) + "Offset of field: siginfo__bindgen_ty_1::_si_pad" ); } #[test] @@ -5139,12 +4520,12 @@ fn bindgen_test_layout_siginfo() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo)) + "Size of siginfo" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(siginfo)) + "Alignment of siginfo" ); } pub type siginfo_t = siginfo; @@ -5177,38 +4558,22 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Size of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute" ); } #[test] @@ -5219,42 +4584,27 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 52usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) + "Size of sigevent__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) + "Alignment of sigevent__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) + "Offset of field: sigevent__bindgen_ty_1::_pad" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) + "Offset of field: sigevent__bindgen_ty_1::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) + "Offset of field: sigevent__bindgen_ty_1::_sigev_thread" ); } #[test] @@ -5264,52 +4614,32 @@ fn bindgen_test_layout_sigevent() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(sigevent)) + "Size of sigevent" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigevent)) + "Alignment of sigevent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) + "Offset of field: sigevent::sigev_value" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) + "Offset of field: sigevent::sigev_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) + "Offset of field: sigevent::sigev_notify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) + "Offset of field: sigevent::_sigev_un" ); } pub type sigevent_t = sigevent; @@ -5328,22 +4658,17 @@ fn bindgen_test_layout_sigset64_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigset64_t)) + "Size of sigset64_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigset64_t)) + "Alignment of sigset64_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigset64_t), - "::", - stringify!(__bits) - ) + "Offset of field: sigset64_t::__bits" ); } #[repr(C)] @@ -5374,32 +4699,22 @@ fn bindgen_test_layout_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) + "Size of sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) + "Alignment of sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -5409,42 +4724,27 @@ fn bindgen_test_layout_sigaction() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(sigaction)) + "Size of sigaction" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction)) + "Alignment of sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction::sa_restorer" ); } #[repr(C)] @@ -5475,32 +4775,22 @@ fn bindgen_test_layout_sigaction64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) + "Size of sigaction64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) + "Alignment of sigaction64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -5510,42 +4800,27 @@ fn bindgen_test_layout_sigaction64() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(sigaction64)) + "Size of sigaction64" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction64)) + "Alignment of sigaction64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction64::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction64::sa_restorer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction64::sa_mask" ); } #[repr(C)] @@ -5561,32 +4836,22 @@ fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timespec)) + "Size of timespec" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timespec)) + "Alignment of timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: timespec::tv_nsec" ); } #[repr(C)] @@ -5599,7 +4864,6 @@ pub struct user_fpregs { pub init_flag: ::std::os::raw::c_uint, } #[repr(C)] -#[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct user_fpregs_fp_reg { pub _bitfield_align_1: [u32; 0], @@ -5610,12 +4874,12 @@ fn bindgen_test_layout_user_fpregs_fp_reg() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(user_fpregs_fp_reg)) + "Size of user_fpregs_fp_reg" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_fpregs_fp_reg)) + "Alignment of user_fpregs_fp_reg" ); } impl user_fpregs_fp_reg { @@ -5631,6 +4895,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn sign1_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign1_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn unused(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u32) } } @@ -5642,6 +4928,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn unused_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 15u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_unused_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 15u8, + val as u64, + ) + } + } + #[inline] pub fn sign2(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } } @@ -5653,6 +4961,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn sign2_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign2_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exponent(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 14u8) as u32) } } @@ -5664,6 +4994,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn exponent_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 14u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_exponent_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 14u8, + val as u64, + ) + } + } + #[inline] pub fn j(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -5675,6 +5027,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn j_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_j_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mantissa1(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 31u8) as u32) } } @@ -5686,6 +5060,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn mantissa1_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mantissa1_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 31u8, + val as u64, + ) + } + } + #[inline] pub fn mantissa0(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 32u8) as u32) } } @@ -5697,6 +5093,28 @@ impl user_fpregs_fp_reg { } } #[inline] + pub unsafe fn mantissa0_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 32u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mantissa0_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 32u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( sign1: ::std::os::raw::c_uint, unused: ::std::os::raw::c_uint, @@ -5745,42 +5163,27 @@ fn bindgen_test_layout_user_fpregs() { assert_eq!( ::std::mem::size_of::(), 116usize, - concat!("Size of: ", stringify!(user_fpregs)) + "Size of user_fpregs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_fpregs)) + "Alignment of user_fpregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(fpregs) - ) + "Offset of field: user_fpregs::fpregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ftype) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(ftype) - ) + "Offset of field: user_fpregs::ftype" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).init_flag) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs), - "::", - stringify!(init_flag) - ) + "Offset of field: user_fpregs::init_flag" ); } impl user_fpregs { @@ -5796,6 +5199,28 @@ impl user_fpregs { } } #[inline] + pub unsafe fn fpsr_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 32u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_fpsr_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 32u8, + val as u64, + ) + } + } + #[inline] pub fn fpcr(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u32) } } @@ -5807,6 +5232,28 @@ impl user_fpregs { } } #[inline] + pub unsafe fn fpcr_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 32u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_fpcr_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 32u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( fpsr: ::std::os::raw::c_uint, fpcr: ::std::os::raw::c_uint, @@ -5835,22 +5282,17 @@ fn bindgen_test_layout_user_regs() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(user_regs)) + "Size of user_regs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_regs)) + "Alignment of user_regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs), - "::", - stringify!(uregs) - ) + "Offset of field: user_regs::uregs" ); } #[repr(C)] @@ -5866,32 +5308,22 @@ fn bindgen_test_layout_user_vfp() { assert_eq!( ::std::mem::size_of::(), 264usize, - concat!("Size of: ", stringify!(user_vfp)) + "Size of user_vfp" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(user_vfp)) + "Alignment of user_vfp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_vfp), - "::", - stringify!(fpregs) - ) + "Offset of field: user_vfp::fpregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpscr) as usize - ptr as usize }, 256usize, - concat!( - "Offset of field: ", - stringify!(user_vfp), - "::", - stringify!(fpscr) - ) + "Offset of field: user_vfp::fpscr" ); } #[repr(C)] @@ -5908,42 +5340,27 @@ fn bindgen_test_layout_user_vfp_exc() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(user_vfp_exc)) + "Size of user_vfp_exc" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_vfp_exc)) + "Alignment of user_vfp_exc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpexc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpexc) - ) + "Offset of field: user_vfp_exc::fpexc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpinst) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpinst) - ) + "Offset of field: user_vfp_exc::fpinst" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpinst2) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_vfp_exc), - "::", - stringify!(fpinst2) - ) + "Offset of field: user_vfp_exc::fpinst2" ); } #[repr(C)] @@ -5969,165 +5386,82 @@ pub struct user { fn bindgen_test_layout_user() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user)) - ); + assert_eq!(::std::mem::size_of::(), 296usize, "Size of user"); + assert_eq!(::std::mem::align_of::(), 4usize, "Alignment of user"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) + "Offset of field: user::regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) + "Offset of field: user::u_fpvalid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) + "Offset of field: user::u_tsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) + "Offset of field: user::u_dsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) + "Offset of field: user::u_ssize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) + "Offset of field: user::start_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, 92usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) + "Offset of field: user::start_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) + "Offset of field: user::signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 100usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) + "Offset of field: user::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) + "Offset of field: user::u_ar0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 108usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) + "Offset of field: user::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) + "Offset of field: user::u_comm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) + "Offset of field: user::u_debugreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fp) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fp) - ) + "Offset of field: user::u_fp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fp0) as usize - ptr as usize }, 292usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fp0) - ) + "Offset of field: user::u_fp0" ); } pub const REG_R0: _bindgen_ty_22 = 0; @@ -6183,38 +5517,22 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) + "Size of ucontext__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of ucontext__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) + "Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::uc_sigmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__padding_rt_sigset) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__padding_rt_sigset) - ) + "Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::__padding_rt_sigset" ); } #[test] @@ -6225,22 +5543,17 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) + "Size of ucontext__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) + "Alignment of ucontext__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask64" ); } #[test] @@ -6250,72 +5563,42 @@ fn bindgen_test_layout_ucontext() { assert_eq!( ::std::mem::size_of::(), 744usize, - concat!("Size of: ", stringify!(ucontext)) + "Size of ucontext" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ucontext)) + "Alignment of ucontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) + "Offset of field: ucontext::uc_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) + "Offset of field: ucontext::uc_link" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) + "Offset of field: ucontext::uc_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) + "Offset of field: ucontext::uc_mcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__padding) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__padding) - ) + "Offset of field: ucontext::__padding" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_regspace) as usize - ptr as usize }, 232usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_regspace) - ) + "Offset of field: ucontext::uc_regspace" ); } pub type ucontext_t = ucontext; @@ -6527,32 +5810,22 @@ fn bindgen_test_layout___kernel_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) + "Size of __kernel_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_timespec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) + "Alignment of __kernel_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_timespec::tv_nsec" ); } #[repr(C)] @@ -6568,32 +5841,22 @@ fn bindgen_test_layout___kernel_itimerspec() { assert_eq!( ::std::mem::size_of::<__kernel_itimerspec>(), 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) + "Size of __kernel_itimerspec" ); assert_eq!( ::std::mem::align_of::<__kernel_itimerspec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) + "Alignment of __kernel_itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: __kernel_itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: __kernel_itimerspec::it_value" ); } #[repr(C)] @@ -6610,32 +5873,22 @@ fn bindgen_test_layout___kernel_old_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_old_timespec>(), 8usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) + "Size of __kernel_old_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_old_timespec>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) + "Alignment of __kernel_old_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_old_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_old_timespec::tv_nsec" ); } #[repr(C)] @@ -6652,32 +5905,22 @@ fn bindgen_test_layout___kernel_sock_timeval() { assert_eq!( ::std::mem::size_of::<__kernel_sock_timeval>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) + "Size of __kernel_sock_timeval" ); assert_eq!( ::std::mem::align_of::<__kernel_sock_timeval>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) + "Alignment of __kernel_sock_timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_sock_timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: __kernel_sock_timeval::tv_usec" ); } #[repr(C)] @@ -6690,35 +5933,21 @@ pub struct timeval { fn bindgen_test_layout_timeval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timeval)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -6734,32 +5963,22 @@ fn bindgen_test_layout_itimerspec() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(itimerspec)) + "Size of itimerspec" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(itimerspec)) + "Alignment of itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: itimerspec::it_value" ); } #[repr(C)] @@ -6775,32 +5994,22 @@ fn bindgen_test_layout_itimerval() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(itimerval)) + "Size of itimerval" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(itimerval)) + "Alignment of itimerval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerval::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) + "Offset of field: itimerval::it_value" ); } #[repr(C)] @@ -6816,32 +6025,22 @@ fn bindgen_test_layout_timezone() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timezone)) + "Size of timezone" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timezone)) + "Alignment of timezone" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) + "Offset of field: timezone::tz_minuteswest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) + "Offset of field: timezone::tz_dsttime" ); } pub type fd_mask = ::std::os::raw::c_ulong; @@ -6854,25 +6053,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: fd_set::fds_bits" ); } extern "C" { @@ -6976,125 +6166,62 @@ pub struct tm { fn bindgen_test_layout_tm() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tm)) - ); + assert_eq!(::std::mem::size_of::(), 44usize, "Size of tm"); + assert_eq!(::std::mem::align_of::(), 4usize, "Alignment of tm"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) + "Offset of field: tm::tm_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) + "Offset of field: tm::tm_min" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) + "Offset of field: tm::tm_hour" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) + "Offset of field: tm::tm_mday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) + "Offset of field: tm::tm_mon" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) + "Offset of field: tm::tm_year" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) + "Offset of field: tm::tm_wday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) + "Offset of field: tm::tm_yday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) + "Offset of field: tm::tm_isdst" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) + "Offset of field: tm::tm_gmtoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) + "Offset of field: tm::tm_zone" ); } extern "C" { @@ -7127,12 +6254,18 @@ extern "C" { extern "C" { pub fn localtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timelocal(__tm: *mut tm) -> time_t; +} extern "C" { pub fn gmtime(__t: *const time_t) -> *mut tm; } extern "C" { pub fn gmtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timegm(__tm: *mut tm) -> time_t; +} extern "C" { pub fn strptime( __s: *const ::std::os::raw::c_char, @@ -7219,23 +6352,23 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn timer_gettime(__timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; + pub fn timer_gettime(_timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; } extern "C" { pub fn timer_getoverrun(__timer: timer_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn timelocal(__tm: *mut tm) -> time_t; -} -extern "C" { - pub fn timegm(__tm: *mut tm) -> time_t; -} extern "C" { pub fn timespec_get( __ts: *mut timespec, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn timespec_getres( + __ts: *mut timespec, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} pub type nfds_t = ::std::os::raw::c_uint; extern "C" { pub fn poll( @@ -7282,122 +6415,67 @@ fn bindgen_test_layout_clone_args() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(clone_args)) + "Size of clone_args" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(clone_args)) + "Alignment of clone_args" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(flags) - ) + "Offset of field: clone_args::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pidfd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(pidfd) - ) + "Offset of field: clone_args::pidfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).child_tid) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(child_tid) - ) + "Offset of field: clone_args::child_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent_tid) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(parent_tid) - ) + "Offset of field: clone_args::parent_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exit_signal) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(exit_signal) - ) + "Offset of field: clone_args::exit_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack) - ) + "Offset of field: clone_args::stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack_size) - ) + "Offset of field: clone_args::stack_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tls) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(tls) - ) + "Offset of field: clone_args::tls" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid) - ) + "Offset of field: clone_args::set_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid_size) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid_size) - ) + "Offset of field: clone_args::set_tid_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cgroup) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(cgroup) - ) + "Offset of field: clone_args::cgroup" ); } #[repr(C)] @@ -7412,22 +6490,17 @@ fn bindgen_test_layout_sched_param() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sched_param)) + "Size of sched_param" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sched_param)) + "Alignment of sched_param" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sched_param), - "::", - stringify!(sched_priority) - ) + "Offset of field: sched_param::sched_priority" ); } extern "C" { @@ -7468,13 +6541,12 @@ pub type _bindgen_ty_23 = ::std::os::raw::c_uint; pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_24 = 0; pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_24 = 1; pub type _bindgen_ty_24 = ::std::os::raw::c_uint; -pub type __pthread_cleanup_func_t = - ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cleanup_t { pub __cleanup_prev: *mut __pthread_cleanup_t, - pub __cleanup_routine: __pthread_cleanup_func_t, + pub __cleanup_routine: + ::std::option::Option, pub __cleanup_arg: *mut ::std::os::raw::c_void, } #[test] @@ -7484,48 +6556,33 @@ fn bindgen_test_layout___pthread_cleanup_t() { assert_eq!( ::std::mem::size_of::<__pthread_cleanup_t>(), 12usize, - concat!("Size of: ", stringify!(__pthread_cleanup_t)) + "Size of __pthread_cleanup_t" ); assert_eq!( ::std::mem::align_of::<__pthread_cleanup_t>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_cleanup_t)) + "Alignment of __pthread_cleanup_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_prev) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_routine) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_routine) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_routine" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_arg) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_arg) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_arg" ); } extern "C" { pub fn __pthread_cleanup_push( c: *mut __pthread_cleanup_t, - arg1: __pthread_cleanup_func_t, + arg1: ::std::option::Option, arg2: *mut ::std::os::raw::c_void, ); } @@ -7552,42 +6609,27 @@ fn bindgen_test_layout_android_poll_source() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(android_poll_source)) + "Size of android_poll_source" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(android_poll_source)) + "Alignment of android_poll_source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(id) - ) + "Offset of field: android_poll_source::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).app) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(app) - ) + "Offset of field: android_poll_source::app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).process) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(process) - ) + "Offset of field: android_poll_source::process" ); } #[repr(C)] @@ -7613,72 +6655,42 @@ fn bindgen_test_layout_android_input_buffer() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(android_input_buffer)) + "Size of android_input_buffer" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_input_buffer)) + "Alignment of android_input_buffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEvents) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEvents) - ) + "Offset of field: android_input_buffer::motionEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsCount) - ) + "Offset of field: android_input_buffer::motionEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsBufferSize) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsBufferSize) - ) + "Offset of field: android_input_buffer::motionEventsBufferSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEvents) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEvents) - ) + "Offset of field: android_input_buffer::keyEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsCount) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsCount) - ) + "Offset of field: android_input_buffer::keyEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsBufferSize) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsBufferSize) - ) + "Offset of field: android_input_buffer::keyEventsBufferSize" ); } #[doc = " Function pointer declaration for the filtering of key events.\n A function with this signature should be passed to\n android_app_set_key_event_filter and return false for any events that should\n not be handled by android_native_app_glue. These events will be handled by\n the system instead."] @@ -7708,6 +6720,10 @@ pub struct android_app { pub window: *mut ANativeWindow, #[doc = " Current content rectangle of the window; this is the area where the\n window's content should be placed to be seen by the user."] pub contentRect: ARect, + #[doc = " Whether the software keyboard is visible or not."] + pub softwareKeyboardVisible: bool, + #[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."] + pub editorAction: ::std::os::raw::c_int, #[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."] pub activityState: ::std::os::raw::c_int, #[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."] @@ -7741,313 +6757,173 @@ fn bindgen_test_layout_android_app() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 240usize, - concat!("Size of: ", stringify!(android_app)) + 248usize, + "Size of android_app" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_app)) + "Alignment of android_app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(userData) - ) + "Offset of field: android_app::userData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onAppCmd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(onAppCmd) - ) + "Offset of field: android_app::onAppCmd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activity) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activity) - ) + "Offset of field: android_app::activity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(config) - ) + "Offset of field: android_app::config" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedState) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedState) - ) + "Offset of field: android_app::savedState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedStateSize) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedStateSize) - ) + "Offset of field: android_app::savedStateSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).looper) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(looper) - ) + "Offset of field: android_app::looper" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(window) - ) + "Offset of field: android_app::window" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contentRect) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(contentRect) - ) + "Offset of field: android_app::contentRect" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).softwareKeyboardVisible) as usize - ptr as usize }, + 48usize, + "Offset of field: android_app::softwareKeyboardVisible" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).editorAction) as usize - ptr as usize }, + 52usize, + "Offset of field: android_app::editorAction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activityState) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activityState) - ) + 56usize, + "Offset of field: android_app::activityState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyRequested) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyRequested) - ) + 60usize, + "Offset of field: android_app::destroyRequested" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBuffers) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputBuffers) - ) + 64usize, + "Offset of field: android_app::inputBuffers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).currentInputBuffer) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(currentInputBuffer) - ) + 160usize, + "Offset of field: android_app::currentInputBuffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textInputState) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(textInputState) - ) + 164usize, + "Offset of field: android_app::textInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mutex) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(mutex) - ) + 168usize, + "Offset of field: android_app::mutex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cond) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cond) - ) + 172usize, + "Offset of field: android_app::cond" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgread) as usize - ptr as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgread) - ) + 176usize, + "Offset of field: android_app::msgread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgwrite) as usize - ptr as usize }, - 172usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgwrite) - ) + 180usize, + "Offset of field: android_app::msgwrite" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).thread) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(thread) - ) + 184usize, + "Offset of field: android_app::thread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmdPollSource) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cmdPollSource) - ) + 188usize, + "Offset of field: android_app::cmdPollSource" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(running) - ) + 200usize, + "Offset of field: android_app::running" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSaved) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(stateSaved) - ) + 204usize, + "Offset of field: android_app::stateSaved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyed) as usize - ptr as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyed) - ) + 208usize, + "Offset of field: android_app::destroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).redrawNeeded) as usize - ptr as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(redrawNeeded) - ) + 212usize, + "Offset of field: android_app::redrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingWindow) as usize - ptr as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingWindow) - ) + 216usize, + "Offset of field: android_app::pendingWindow" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingContentRect) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingContentRect) - ) + 220usize, + "Offset of field: android_app::pendingContentRect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventFilter) as usize - ptr as usize }, - 228usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(keyEventFilter) - ) + 236usize, + "Offset of field: android_app::keyEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventFilter) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(motionEventFilter) - ) + 240usize, + "Offset of field: android_app::motionEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputAvailableWakeUp) as usize - ptr as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputAvailableWakeUp) - ) + 244usize, + "Offset of field: android_app::inputAvailableWakeUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputSwapPending) as usize - ptr as usize }, - 237usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputSwapPending) - ) + 245usize, + "Offset of field: android_app::inputSwapPending" ); } #[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."] @@ -8057,7 +6933,7 @@ pub const NativeAppGlueLooperId_LOOPER_ID_INPUT: NativeAppGlueLooperId = 2; #[doc = " Start of user-defined ALooper identifiers."] pub const NativeAppGlueLooperId_LOOPER_ID_USER: NativeAppGlueLooperId = 3; #[doc = " Looper ID of commands coming from the app's main thread, an AInputQueue or\n user-defined sources."] -pub type NativeAppGlueLooperId = ::std::os::raw::c_uint; +pub type NativeAppGlueLooperId = i8; #[doc = " Unused. Reserved for future use when usage of AInputQueue will be\n supported."] pub const NativeAppGlueAppCmd_UNUSED_APP_CMD_INPUT_CHANGED: NativeAppGlueAppCmd = 0; #[doc = " Command from main thread: a new ANativeWindow is ready for use. Upon\n receiving this command, android_app->window will contain the new window\n surface."] @@ -8070,30 +6946,32 @@ pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_RESIZED: NativeAppGlueAppCmd = 3; pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_REDRAW_NEEDED: NativeAppGlueAppCmd = 4; #[doc = " Command from main thread: the content area of the window has changed,\n such as from the soft input window being shown or hidden. You can\n find the new content rect in android_app::contentRect."] pub const NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED: NativeAppGlueAppCmd = 5; +#[doc = " Command from main thread: the software keyboard was shown or hidden."] +pub const NativeAppGlueAppCmd_APP_CMD_SOFTWARE_KB_VIS_CHANGED: NativeAppGlueAppCmd = 6; #[doc = " Command from main thread: the app's activity window has gained\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 6; +pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 7; #[doc = " Command from main thread: the app's activity window has lost\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 7; +pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 8; #[doc = " Command from main thread: the current device configuration has changed."] -pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 8; +pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 9; #[doc = " Command from main thread: the system is running low on memory.\n Try to reduce your memory use."] -pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 9; +pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 10; #[doc = " Command from main thread: the app's activity has been started."] -pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 10; +pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 11; #[doc = " Command from main thread: the app's activity has been resumed."] -pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 11; +pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 12; #[doc = " Command from main thread: the app should generate a new saved state\n for itself, to restore from later if needed. If you have saved state,\n allocate it with malloc and place it in android_app.savedState with\n the size in android_app.savedStateSize. The will be freed for you\n later."] -pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 12; +pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 13; #[doc = " Command from main thread: the app's activity has been paused."] -pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 13; +pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 14; #[doc = " Command from main thread: the app's activity has been stopped."] -pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 14; +pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 15; #[doc = " Command from main thread: the app's activity is being destroyed,\n and waiting for the app thread to clean up and exit before proceeding."] -pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 15; +pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 16; #[doc = " Command from main thread: the app's insets have changed."] -pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 16; -#[doc = " Commands passed from the application's main Java thread to the game's thread."] -pub type NativeAppGlueAppCmd = ::std::os::raw::c_uint; +pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 17; +#[doc = " Commands passed from the application's main Java thread to the game's thread.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] +pub type NativeAppGlueAppCmd = i8; extern "C" { #[doc = " Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next\n app command message."] pub fn android_app_read_cmd(android_app: *mut android_app) -> i8; @@ -8138,6 +7016,10 @@ extern "C" { filter: android_motion_event_filter, ); } +extern "C" { + #[doc = " You can send your custom events using the function below.\n\n Make sure your custom codes do not overlap with this library's ones.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] + pub fn android_app_write_cmd(android_app: *mut android_app, cmd: i8); +} extern "C" { #[doc = " Determines if a looper wake up was due to new input becoming available"] pub fn android_app_input_available_wake_up(app: *mut android_app) -> bool; diff --git a/android-activity/src/game_activity/ffi_i686.rs b/android-activity/src/game_activity/ffi_i686.rs index d18082f..42426aa 100644 --- a/android-activity/src/game_activity/ffi_i686.rs +++ b/android-activity/src/game_activity/ffi_i686.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const __BIONIC__: u32 = 1; pub const __WORDSIZE: u32 = 32; @@ -24,11 +24,12 @@ pub const __ANDROID_API_R__: u32 = 30; pub const __ANDROID_API_S__: u32 = 31; pub const __ANDROID_API_T__: u32 = 33; pub const __ANDROID_API_U__: u32 = 34; +pub const __ANDROID_API_V__: u32 = 35; pub const __ANDROID_NDK__: u32 = 1; -pub const __NDK_MAJOR__: u32 = 25; -pub const __NDK_MINOR__: u32 = 2; +pub const __NDK_MAJOR__: u32 = 26; +pub const __NDK_MINOR__: u32 = 1; pub const __NDK_BETA__: u32 = 0; -pub const __NDK_BUILD__: u32 = 9519653; +pub const __NDK_BUILD__: u32 = 10909125; pub const __NDK_CANARY__: u32 = 0; pub const INT8_MIN: i32 = -128; pub const INT8_MAX: u32 = 127; @@ -66,11 +67,10 @@ pub const PTRDIFF_MAX: u32 = 2147483647; pub const SIZE_MAX: u32 = 4294967295; pub const __BITS_PER_LONG: u32 = 32; pub const __FD_SETSIZE: u32 = 1024; -pub const __GNUC_VA_LIST: u32 = 1; pub const AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT: u32 = 8; +pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; pub const __PRI_64_prefix: &[u8; 3] = b"ll\0"; pub const PRId8: &[u8; 2] = b"d\0"; pub const PRId16: &[u8; 2] = b"d\0"; @@ -94,6 +94,28 @@ pub const PRIiLEAST64: &[u8; 4] = b"lli\0"; pub const PRIiFAST8: &[u8; 2] = b"i\0"; pub const PRIiFAST64: &[u8; 4] = b"lli\0"; pub const PRIiMAX: &[u8; 3] = b"ji\0"; +pub const PRIb8: &[u8; 2] = b"b\0"; +pub const PRIb16: &[u8; 2] = b"b\0"; +pub const PRIb32: &[u8; 2] = b"b\0"; +pub const PRIb64: &[u8; 4] = b"llb\0"; +pub const PRIbLEAST8: &[u8; 2] = b"b\0"; +pub const PRIbLEAST16: &[u8; 2] = b"b\0"; +pub const PRIbLEAST32: &[u8; 2] = b"b\0"; +pub const PRIbLEAST64: &[u8; 4] = b"llb\0"; +pub const PRIbFAST8: &[u8; 2] = b"b\0"; +pub const PRIbFAST64: &[u8; 4] = b"llb\0"; +pub const PRIbMAX: &[u8; 3] = b"jb\0"; +pub const PRIB8: &[u8; 2] = b"B\0"; +pub const PRIB16: &[u8; 2] = b"B\0"; +pub const PRIB32: &[u8; 2] = b"B\0"; +pub const PRIB64: &[u8; 4] = b"llB\0"; +pub const PRIBLEAST8: &[u8; 2] = b"B\0"; +pub const PRIBLEAST16: &[u8; 2] = b"B\0"; +pub const PRIBLEAST32: &[u8; 2] = b"B\0"; +pub const PRIBLEAST64: &[u8; 4] = b"llB\0"; +pub const PRIBFAST8: &[u8; 2] = b"B\0"; +pub const PRIBFAST64: &[u8; 4] = b"llB\0"; +pub const PRIBMAX: &[u8; 3] = b"jB\0"; pub const PRIo8: &[u8; 2] = b"o\0"; pub const PRIo16: &[u8; 2] = b"o\0"; pub const PRIo32: &[u8; 2] = b"o\0"; @@ -160,6 +182,28 @@ pub const SCNiLEAST64: &[u8; 4] = b"lli\0"; pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; pub const SCNiFAST64: &[u8; 4] = b"lli\0"; pub const SCNiMAX: &[u8; 3] = b"ji\0"; +pub const SCNb8: &[u8; 4] = b"hhb\0"; +pub const SCNb16: &[u8; 3] = b"hb\0"; +pub const SCNb32: &[u8; 2] = b"b\0"; +pub const SCNb64: &[u8; 4] = b"llb\0"; +pub const SCNbLEAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbLEAST16: &[u8; 3] = b"hb\0"; +pub const SCNbLEAST32: &[u8; 2] = b"b\0"; +pub const SCNbLEAST64: &[u8; 4] = b"llb\0"; +pub const SCNbFAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbFAST64: &[u8; 4] = b"llb\0"; +pub const SCNbMAX: &[u8; 3] = b"jb\0"; +pub const SCNB8: &[u8; 4] = b"hhB\0"; +pub const SCNB16: &[u8; 3] = b"hB\0"; +pub const SCNB32: &[u8; 2] = b"B\0"; +pub const SCNB64: &[u8; 4] = b"llB\0"; +pub const SCNBLEAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBLEAST16: &[u8; 3] = b"hB\0"; +pub const SCNBLEAST32: &[u8; 2] = b"B\0"; +pub const SCNBLEAST64: &[u8; 4] = b"llB\0"; +pub const SCNBFAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBFAST64: &[u8; 4] = b"llB\0"; +pub const SCNBMAX: &[u8; 3] = b"jB\0"; pub const SCNo8: &[u8; 4] = b"hho\0"; pub const SCNo16: &[u8; 3] = b"ho\0"; pub const SCNo32: &[u8; 2] = b"o\0"; @@ -195,12 +239,12 @@ pub const SCNxFAST64: &[u8; 4] = b"llx\0"; pub const SCNxMAX: &[u8; 3] = b"jx\0"; pub const GAME_ACTIVITY_POINTER_INFO_AXIS_COUNT: u32 = 48; pub const GAMEACTIVITY_MAX_NUM_POINTERS_IN_MOTION_EVENT: u32 = 8; -pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 2; +pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 4; pub const GAMETEXTINPUT_MINOR_VERSION: u32 = 0; pub const GAMETEXTINPUT_BUGFIX_VERSION: u32 = 0; -pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 2; +pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 4; pub const GAMEACTIVITY_MINOR_VERSION: u32 = 0; -pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 2; +pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 0; pub const POLLIN: u32 = 1; pub const POLLPRI: u32 = 2; pub const POLLOUT: u32 = 4; @@ -523,6 +567,7 @@ pub const TRAP_HWBKPT: u32 = 4; pub const TRAP_UNK: u32 = 5; pub const TRAP_PERF: u32 = 6; pub const NSIGTRAP: u32 = 6; +pub const TRAP_PERF_FLAG_ASYNC: u32 = 1; pub const CLD_EXITED: u32 = 1; pub const CLD_KILLED: u32 = 2; pub const CLD_DUMPED: u32 = 3; @@ -560,6 +605,9 @@ pub const UPAGES: u32 = 1; pub const FD_SETSIZE: u32 = 1024; pub const CLOCKS_PER_SEC: u32 = 1000000; pub const TIME_UTC: u32 = 1; +pub const TIME_MONOTONIC: u32 = 2; +pub const TIME_ACTIVE: u32 = 3; +pub const TIME_THREAD_ACTIVE: u32 = 4; pub const CSIGNAL: u32 = 255; pub const CLONE_VM: u32 = 256; pub const CLONE_FS: u32 = 512; @@ -644,32 +692,22 @@ fn bindgen_test_layout_max_align_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(max_align_t)) + "Size of max_align_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(max_align_t)) + "Alignment of max_align_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) + "Offset of field: max_align_t::__clang_max_align_nonce1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) + "Offset of field: max_align_t::__clang_max_align_nonce2" ); } pub type __int8_t = ::std::os::raw::c_schar; @@ -720,22 +758,17 @@ fn bindgen_test_layout___kernel_fd_set() { assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) + "Size of __kernel_fd_set" ); assert_eq!( ::std::mem::align_of::<__kernel_fd_set>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) + "Alignment of __kernel_fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: __kernel_fd_set::fds_bits" ); } pub type __kernel_sighandler_t = @@ -772,22 +805,17 @@ fn bindgen_test_layout___kernel_fsid_t() { assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) + "Size of __kernel_fsid_t" ); assert_eq!( ::std::mem::align_of::<__kernel_fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) + "Alignment of __kernel_fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) + "Offset of field: __kernel_fsid_t::val" ); } pub type __kernel_off_t = __kernel_long_t; @@ -1155,6 +1183,22 @@ pub const AKEYCODE_REFRESH: _bindgen_ty_2 = 285; pub const AKEYCODE_THUMBS_UP: _bindgen_ty_2 = 286; pub const AKEYCODE_THUMBS_DOWN: _bindgen_ty_2 = 287; pub const AKEYCODE_PROFILE_SWITCH: _bindgen_ty_2 = 288; +pub const AKEYCODE_VIDEO_APP_1: _bindgen_ty_2 = 289; +pub const AKEYCODE_VIDEO_APP_2: _bindgen_ty_2 = 290; +pub const AKEYCODE_VIDEO_APP_3: _bindgen_ty_2 = 291; +pub const AKEYCODE_VIDEO_APP_4: _bindgen_ty_2 = 292; +pub const AKEYCODE_VIDEO_APP_5: _bindgen_ty_2 = 293; +pub const AKEYCODE_VIDEO_APP_6: _bindgen_ty_2 = 294; +pub const AKEYCODE_VIDEO_APP_7: _bindgen_ty_2 = 295; +pub const AKEYCODE_VIDEO_APP_8: _bindgen_ty_2 = 296; +pub const AKEYCODE_FEATURED_APP_1: _bindgen_ty_2 = 297; +pub const AKEYCODE_FEATURED_APP_2: _bindgen_ty_2 = 298; +pub const AKEYCODE_FEATURED_APP_3: _bindgen_ty_2 = 299; +pub const AKEYCODE_FEATURED_APP_4: _bindgen_ty_2 = 300; +pub const AKEYCODE_DEMO_APP_1: _bindgen_ty_2 = 301; +pub const AKEYCODE_DEMO_APP_2: _bindgen_ty_2 = 302; +pub const AKEYCODE_DEMO_APP_3: _bindgen_ty_2 = 303; +pub const AKEYCODE_DEMO_APP_4: _bindgen_ty_2 = 304; pub type _bindgen_ty_2 = ::std::os::raw::c_uint; pub const ALOOPER_PREPARE_ALLOW_NON_CALLBACKS: _bindgen_ty_3 = 1; pub type _bindgen_ty_3 = ::std::os::raw::c_uint; @@ -1169,8 +1213,8 @@ pub const ALOOPER_EVENT_ERROR: _bindgen_ty_5 = 4; pub const ALOOPER_EVENT_HANGUP: _bindgen_ty_5 = 8; pub const ALOOPER_EVENT_INVALID: _bindgen_ty_5 = 16; pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -pub type va_list = __builtin_va_list; pub type __gnuc_va_list = __builtin_va_list; +pub type va_list = __builtin_va_list; #[repr(C)] pub struct JavaVMAttachArgs { pub version: jint, @@ -1184,42 +1228,27 @@ fn bindgen_test_layout_JavaVMAttachArgs() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) + "Size of JavaVMAttachArgs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) + "Alignment of JavaVMAttachArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMAttachArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) + "Offset of field: JavaVMAttachArgs::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) + "Offset of field: JavaVMAttachArgs::group" ); } #[repr(C)] @@ -1235,32 +1264,22 @@ fn bindgen_test_layout_JavaVMOption() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(JavaVMOption)) + "Size of JavaVMOption" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMOption)) + "Alignment of JavaVMOption" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) + "Offset of field: JavaVMOption::optionString" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) + "Offset of field: JavaVMOption::extraInfo" ); } #[repr(C)] @@ -1277,52 +1296,32 @@ fn bindgen_test_layout_JavaVMInitArgs() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) + "Size of JavaVMInitArgs" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) + "Alignment of JavaVMInitArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMInitArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) + "Offset of field: JavaVMInitArgs::nOptions" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) + "Offset of field: JavaVMInitArgs::options" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) + "Offset of field: JavaVMInitArgs::ignoreUnrecognized" ); } pub const AKEY_STATE_UNKNOWN: _bindgen_ty_6 = -1; @@ -1792,32 +1791,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -1922,6 +1911,10 @@ pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_S8_UINT: AHardwareBuffer pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420: AHardwareBuffer_Format = 35; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_YCbCr_P010: AHardwareBuffer_Format = 54; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R8_UNORM: AHardwareBuffer_Format = 56; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16_UINT: AHardwareBuffer_Format = 57; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16G16_UINT: AHardwareBuffer_Format = 58; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM: AHardwareBuffer_Format = + 59; pub type AHardwareBuffer_Format = ::std::os::raw::c_uint; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_CPU_READ_NEVER: AHardwareBuffer_UsageFlags = 0; @@ -1959,6 +1952,8 @@ pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP: AHardwareBuffer_UsageFlags = 33554432; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE: AHardwareBuffer_UsageFlags = 67108864; +pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_FRONT_BUFFER: + AHardwareBuffer_UsageFlags = 2147483648; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_0: AHardwareBuffer_UsageFlags = 268435456; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_1: AHardwareBuffer_UsageFlags = @@ -2019,92 +2014,52 @@ fn bindgen_test_layout_AHardwareBuffer_Desc() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) + "Size of AHardwareBuffer_Desc" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) + "Alignment of AHardwareBuffer_Desc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) + "Offset of field: AHardwareBuffer_Desc::width" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) + "Offset of field: AHardwareBuffer_Desc::height" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) + "Offset of field: AHardwareBuffer_Desc::layers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) + "Offset of field: AHardwareBuffer_Desc::format" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) + "Offset of field: AHardwareBuffer_Desc::usage" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) + "Offset of field: AHardwareBuffer_Desc::stride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) + "Offset of field: AHardwareBuffer_Desc::rfu0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) + "Offset of field: AHardwareBuffer_Desc::rfu1" ); } #[repr(C)] @@ -2122,42 +2077,27 @@ fn bindgen_test_layout_AHardwareBuffer_Plane() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) + "Size of AHardwareBuffer_Plane" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) + "Alignment of AHardwareBuffer_Plane" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) + "Offset of field: AHardwareBuffer_Plane::data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) + "Offset of field: AHardwareBuffer_Plane::pixelStride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) + "Offset of field: AHardwareBuffer_Plane::rowStride" ); } #[repr(C)] @@ -2174,32 +2114,22 @@ fn bindgen_test_layout_AHardwareBuffer_Planes() { assert_eq!( ::std::mem::size_of::(), 52usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) + "Size of AHardwareBuffer_Planes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) + "Alignment of AHardwareBuffer_Planes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) + "Offset of field: AHardwareBuffer_Planes::planeCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) + "Offset of field: AHardwareBuffer_Planes::planes" ); } #[repr(C)] @@ -2299,62 +2229,37 @@ fn bindgen_test_layout_GameActivityPointerAxes() { assert_eq!( ::std::mem::size_of::(), 208usize, - concat!("Size of: ", stringify!(GameActivityPointerAxes)) + "Size of GameActivityPointerAxes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityPointerAxes)) + "Alignment of GameActivityPointerAxes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(id) - ) + "Offset of field: GameActivityPointerAxes::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).toolType) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(toolType) - ) + "Offset of field: GameActivityPointerAxes::toolType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).axisValues) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(axisValues) - ) + "Offset of field: GameActivityPointerAxes::axisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawX) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawX) - ) + "Offset of field: GameActivityPointerAxes::rawX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawY) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawY) - ) + "Offset of field: GameActivityPointerAxes::rawY" ); } extern "C" { @@ -2404,202 +2309,107 @@ fn bindgen_test_layout_GameActivityMotionEvent() { assert_eq!( ::std::mem::size_of::(), 1744usize, - concat!("Size of: ", stringify!(GameActivityMotionEvent)) + "Size of GameActivityMotionEvent" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityMotionEvent)) + "Alignment of GameActivityMotionEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityMotionEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityMotionEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityMotionEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityMotionEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityMotionEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityMotionEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityMotionEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actionButton) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(actionButton) - ) + "Offset of field: GameActivityMotionEvent::actionButton" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buttonState) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(buttonState) - ) + "Offset of field: GameActivityMotionEvent::buttonState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).classification) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(classification) - ) + "Offset of field: GameActivityMotionEvent::classification" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edgeFlags) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(edgeFlags) - ) + "Offset of field: GameActivityMotionEvent::edgeFlags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointerCount) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointerCount) - ) + "Offset of field: GameActivityMotionEvent::pointerCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointers) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointers) - ) + "Offset of field: GameActivityMotionEvent::pointers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historySize) as usize - ptr as usize }, 1720usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historySize) - ) + "Offset of field: GameActivityMotionEvent::historySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesMillis) as usize - ptr as usize }, 1724usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesMillis) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesMillis" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesNanos) as usize - ptr as usize }, 1728usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesNanos) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesNanos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalAxisValues) as usize - ptr as usize }, 1732usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalAxisValues) - ) + "Offset of field: GameActivityMotionEvent::historicalAxisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionX) as usize - ptr as usize }, 1736usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionX) - ) + "Offset of field: GameActivityMotionEvent::precisionX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionY) as usize - ptr as usize }, 1740usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionY) - ) + "Offset of field: GameActivityMotionEvent::precisionY" ); } extern "C" { @@ -2614,14 +2424,6 @@ extern "C" { #[doc = " \\brief Handle the freeing of the GameActivityMotionEvent struct."] pub fn GameActivityMotionEvent_destroy(c_event: *mut GameActivityMotionEvent); } -extern "C" { - #[doc = " \\brief Convert a Java `MotionEvent` to a `GameActivityMotionEvent`.\n\n This is done automatically by the GameActivity: see `onTouchEvent` to set\n a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityMotionEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityMotionEvent, - ); -} #[doc = " \\brief Describe a key event that happened on the GameActivity SurfaceView.\n\n This is 1:1 mapping to the information contained in a Java `KeyEvent`\n (see https://developer.android.com/reference/android/view/KeyEvent).\n The only exception is the event times, which are reported as\n nanoseconds in this struct."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2645,146 +2447,69 @@ fn bindgen_test_layout_GameActivityKeyEvent() { assert_eq!( ::std::mem::size_of::(), 52usize, - concat!("Size of: ", stringify!(GameActivityKeyEvent)) + "Size of GameActivityKeyEvent" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityKeyEvent)) + "Alignment of GameActivityKeyEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityKeyEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityKeyEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityKeyEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityKeyEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityKeyEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityKeyEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityKeyEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(modifiers) - ) + "Offset of field: GameActivityKeyEvent::modifiers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).repeatCount) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(repeatCount) - ) + "Offset of field: GameActivityKeyEvent::repeatCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyCode) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(keyCode) - ) + "Offset of field: GameActivityKeyEvent::keyCode" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scanCode) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(scanCode) - ) + "Offset of field: GameActivityKeyEvent::scanCode" ); } -extern "C" { - #[doc = " \\brief Convert a Java `KeyEvent` to a `GameActivityKeyEvent`.\n\n This is done automatically by the GameActivity: see `onKeyUp` and `onKeyDown`\n to set a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityKeyEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityKeyEvent, - ); -} -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: - GameCommonInsetsType = 3; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; -#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] -pub type GameCommonInsetsType = ::std::os::raw::c_uint; #[doc = " This struct holds a span within a region of text from start (inclusive) to\n end (exclusive). An empty span or cursor position is specified with\n start==end. An undefined span is specified with start = end = SPAN_UNDEFINED."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2801,37 +2526,27 @@ fn bindgen_test_layout_GameTextInputSpan() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(GameTextInputSpan)) + "Size of GameTextInputSpan" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputSpan)) + "Alignment of GameTextInputSpan" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(start) - ) + "Offset of field: GameTextInputSpan::start" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(end) - ) + "Offset of field: GameTextInputSpan::end" ); } pub const GameTextInputSpanFlag_SPAN_UNDEFINED: GameTextInputSpanFlag = -1; #[doc = " Values with special meaning in a GameTextInputSpan."] -pub type GameTextInputSpanFlag = ::std::os::raw::c_int; +pub type GameTextInputSpanFlag = i32; #[doc = " This struct holds the state of an editable section of text.\n The text can have a selection and a composing region defined on it.\n A composing region is used by IMEs that allow input using multiple steps to\n compose a glyph or word. Use functions GameTextInput_getState and\n GameTextInput_setState to read and modify the state that an IME is editing."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2852,52 +2567,32 @@ fn bindgen_test_layout_GameTextInputState() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(GameTextInputState)) + "Size of GameTextInputState" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputState)) + "Alignment of GameTextInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_UTF8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_UTF8) - ) + "Offset of field: GameTextInputState::text_UTF8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_length) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_length) - ) + "Offset of field: GameTextInputState::text_length" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).selection) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(selection) - ) + "Offset of field: GameTextInputState::selection" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).composingRegion) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(composingRegion) - ) + "Offset of field: GameTextInputState::composingRegion" ); } #[doc = " A callback called by GameTextInput_getState.\n @param context User-defined context.\n @param state State, owned by the library, that will be valid for the duration\n of the callback."] @@ -2929,7 +2624,7 @@ pub const ShowImeFlags_SHOW_IME_UNDEFINED: ShowImeFlags = 0; pub const ShowImeFlags_SHOW_IMPLICIT: ShowImeFlags = 1; pub const ShowImeFlags_SHOW_FORCED: ShowImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_showIme."] -pub type ShowImeFlags = ::std::os::raw::c_uint; +pub type ShowImeFlags = u32; extern "C" { #[doc = " Show the IME. Calls InputMethodManager.showSoftInput().\n @param input A valid GameTextInput library handle.\n @param flags Defined in ShowImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_showIme(input: *mut GameTextInput, flags: u32); @@ -2938,9 +2633,9 @@ pub const HideImeFlags_HIDE_IME_UNDEFINED: HideImeFlags = 0; pub const HideImeFlags_HIDE_IMPLICIT_ONLY: HideImeFlags = 1; pub const HideImeFlags_HIDE_NOT_ALWAYS: HideImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_hideIme."] -pub type HideImeFlags = ::std::os::raw::c_uint; +pub type HideImeFlags = u32; extern "C" { - #[doc = " Show the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] + #[doc = " Hide the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_hideIme(input: *mut GameTextInput, flags: u32); } extern "C" { @@ -2967,7 +2662,7 @@ pub type GameTextInputEventCallback = ::std::option::Option< ), >; extern "C" { - #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback."] + #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback.\n This function is deprecated. Don't perform any complex processing inside\n the callback other than copying the state variable. Using any synchronization\n primitives inside this callback may cause a deadlock."] pub fn GameTextInput_setEventCallback( input: *mut GameTextInput, callback: GameTextInputEventCallback, @@ -3010,6 +2705,144 @@ extern "C" { context: *mut ::std::os::raw::c_void, ); } +#[doc = " Mask of bits that determine the overall class\n of text being given. Currently supported classes are:\n {@link #TYPE_CLASS_TEXT}, {@link #TYPE_CLASS_NUMBER},\n {@link #TYPE_CLASS_PHONE}, {@link #TYPE_CLASS_DATETIME}.\n

IME authors: If the class is not one you\n understand, assume {@link #TYPE_CLASS_TEXT} with NO variation\n or flags.

"] +pub const GameTextInputType_TYPE_MASK_CLASS: GameTextInputType = 15; +#[doc = " Mask of bits that determine the variation of\n the base content class."] +pub const GameTextInputType_TYPE_MASK_VARIATION: GameTextInputType = 4080; +#[doc = " Mask of bits that provide addition bit flags\n of options."] +pub const GameTextInputType_TYPE_MASK_FLAGS: GameTextInputType = 16773120; +#[doc = " Special content type for when no explicit type has been specified.\n This should be interpreted to mean that the target input connection\n is not rich, it can not process and show things like candidate text nor\n retrieve the current text, so the input method will need to run in a\n limited \"generate key events\" mode, if it supports it. Note that some\n input methods may not support it, for example a voice-based input\n method will likely not be able to generate key events even if this\n flag is set."] +pub const GameTextInputType_TYPE_NULL: GameTextInputType = 0; +#[doc = " Class for normal text. This class supports the following flags (only\n one of which should be set):\n {@link #TYPE_TEXT_FLAG_CAP_CHARACTERS},\n {@link #TYPE_TEXT_FLAG_CAP_WORDS}, and.\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. It also supports the\n following variations:\n {@link #TYPE_TEXT_VARIATION_NORMAL}, and\n {@link #TYPE_TEXT_VARIATION_URI}. If you do not recognize the\n variation, normal should be assumed."] +pub const GameTextInputType_TYPE_CLASS_TEXT: GameTextInputType = 1; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize all characters. Overrides\n {@link #TYPE_TEXT_FLAG_CAP_WORDS} and\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_CHARACTERS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_CHARACTERS: GameTextInputType = 4096; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n every word. Overrides {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This\n value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_WORDS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_WORDS: GameTextInputType = 8192; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n each sentence. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_SENTENCES}. For example\n in English it means to capitalize after a period and a space (note that\n other languages may have different characters for period, or not use\n spaces, or use different grammatical rules). Of course, this only affects\n languages where there are upper-case and lower-case letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_SENTENCES: GameTextInputType = 16384; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the user is entering free-form\n text that should have auto-correction applied to it. Without this flag,\n the IME will not try to correct typos. You should always set this flag\n unless you really expect users to type non-words in this field, for\n example to choose a name for a character in a game.\n Contrast this with {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_CORRECT} means that the IME will try to\n auto-correct typos as the user is typing, but does not define whether\n the IME offers an interface to show suggestions."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_CORRECT: GameTextInputType = 32768; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the text editor (which means\n the application) is performing auto-completion of the text being entered\n based on its own semantics, which it will present to the user as they type.\n This generally means that the input method should not be showing\n candidates itself, but can expect the editor to supply its own\n completions/candidates from\n {@link android.view.inputmethod.InputMethodSession#displayCompletions\n InputMethodSession.displayCompletions()} as a result of the editor calling\n {@link android.view.inputmethod.InputMethodManager#displayCompletions\n InputMethodManager.displayCompletions()}.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_COMPLETE} means the editor should show an\n interface for displaying suggestions, but instead of supplying its own\n it will rely on the Editor to pass completions/corrections."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_COMPLETE: GameTextInputType = 65536; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: multiple lines of text can be\n entered into the field. If this flag is not set, the text field\n will be constrained to a single line. The IME may also choose not to\n display an enter key when this flag is not set, as there should be no\n need to create new lines."] +pub const GameTextInputType_TYPE_TEXT_FLAG_MULTI_LINE: GameTextInputType = 131072; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the regular text view associated\n with this should not be multi-line, but when a fullscreen input method\n is providing text it should use multiple lines if it can."] +pub const GameTextInputType_TYPE_TEXT_FLAG_IME_MULTI_LINE: GameTextInputType = 262144; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the input method does not need to\n display any dictionary-based candidates. This is useful for text views that\n do not contain words from the language and do not benefit from any\n dictionary-based completions or corrections. It overrides the\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} value when set.\n Please avoid using this unless you are certain this is what you want.\n Many input methods need suggestions to work well, for example the ones\n based on gesture typing. Consider clearing\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} instead if you just do not\n want the IME to correct typos.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE}:\n {@code TYPE_TEXT_FLAG_NO_SUGGESTIONS} means the IME does not need to\n show an interface to display suggestions. Most IMEs will also take this to\n mean they do not need to try to auto-correct what the user is typing."] +pub const GameTextInputType_TYPE_TEXT_FLAG_NO_SUGGESTIONS: GameTextInputType = 524288; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: Let the IME know the text conversion\n suggestions are required by the application. Text conversion suggestion is\n for the transliteration languages which has pronunciation characters and\n target characters. When the user is typing the pronunciation charactes, the\n IME could provide the possible target characters to the user. When this\n flag is set, the IME should insert the text conversion suggestions through\n {@link Builder#setTextConversionSuggestions(List)} and\n the {@link TextAttribute} with initialized with the text conversion\n suggestions is provided by the IME to the application. To receive the\n additional information, the application needs to implement {@link\n InputConnection#setComposingText(CharSequence, int, TextAttribute)},\n {@link InputConnection#setComposingRegion(int, int, TextAttribute)}, and\n {@link InputConnection#commitText(CharSequence, int, TextAttribute)}."] +pub const GameTextInputType_TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS: GameTextInputType = + 1048576; +#[doc = " Default variation of {@link #TYPE_CLASS_TEXT}: plain old normal text."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a URI."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_URI: GameTextInputType = 16; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering an e-mail address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_ADDRESS: GameTextInputType = 32; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the subject line of\n an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_SUBJECT: GameTextInputType = 48; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a short, possibly informal\n message such as an instant message or a text message."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_SHORT_MESSAGE: GameTextInputType = 64; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the content of a long,\n possibly formal message such as the body of an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_LONG_MESSAGE: GameTextInputType = 80; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the name of a person."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PERSON_NAME: GameTextInputType = 96; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a postal mailing address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_POSTAL_ADDRESS: GameTextInputType = 112; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PASSWORD: GameTextInputType = 128; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password, which should\n be visible to the user."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_VISIBLE_PASSWORD: GameTextInputType = 144; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text inside of a web form."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EDIT_TEXT: GameTextInputType = 160; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text to filter contents\n of a list etc."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_FILTER: GameTextInputType = 176; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text for phonetic\n pronunciation, such as a phonetic name field in contacts. This is mostly\n useful for languages where one spelling may have several phonetic\n readings, like Japanese."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PHONETIC: GameTextInputType = 192; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering e-mail address inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_EMAIL_ADDRESS}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS: GameTextInputType = 208; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering password inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_PASSWORD}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_PASSWORD: GameTextInputType = 224; +#[doc = " Class for numeric text. This class supports the following flags:\n {@link #TYPE_NUMBER_FLAG_SIGNED} and\n {@link #TYPE_NUMBER_FLAG_DECIMAL}. It also supports the following\n variations: {@link #TYPE_NUMBER_VARIATION_NORMAL} and\n {@link #TYPE_NUMBER_VARIATION_PASSWORD}.\n

IME authors: If you do not recognize\n the variation, normal should be assumed.

"] +pub const GameTextInputType_TYPE_CLASS_NUMBER: GameTextInputType = 2; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is signed, allowing\n a positive or negative sign at the start."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_SIGNED: GameTextInputType = 4096; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is decimal, allowing\n a decimal point to provide fractional values."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_DECIMAL: GameTextInputType = 8192; +#[doc = " Default variation of {@link #TYPE_CLASS_NUMBER}: plain normal\n numeric text. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be dropped when passed through\n {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_NUMBER}: entering a numeric password.\n This was added in {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An\n IME must target this API version or later to see this input type; if it\n doesn't, a request for this type will be dropped when passed\n through {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_PASSWORD: GameTextInputType = 16; +#[doc = " Class for a phone number. This class currently supports no variations\n or flags."] +pub const GameTextInputType_TYPE_CLASS_PHONE: GameTextInputType = 3; +#[doc = " Class for dates and times. It supports the\n following variations:\n {@link #TYPE_DATETIME_VARIATION_NORMAL}\n {@link #TYPE_DATETIME_VARIATION_DATE}, and\n {@link #TYPE_DATETIME_VARIATION_TIME}."] +pub const GameTextInputType_TYPE_CLASS_DATETIME: GameTextInputType = 4; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n both a date and time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a date."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_DATE: GameTextInputType = 16; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_TIME: GameTextInputType = 32; +#[doc = " Definitions for inputType argument of GameActivity_setImeEditorInfo()\n\n
\n |-------|-------|-------|-------|\n                              1111 TYPE_MASK_CLASS\n                      11111111     TYPE_MASK_VARIATION\n          111111111111             TYPE_MASK_FLAGS\n |-------|-------|-------|-------|\n                                   TYPE_NULL\n |-------|-------|-------|-------|\n                                 1 TYPE_CLASS_TEXT\n                             1     TYPE_TEXT_VARIATION_URI\n                            1      TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n                            11     TYPE_TEXT_VARIATION_EMAIL_SUBJECT\n                           1       TYPE_TEXT_VARIATION_SHORT_MESSAGE\n                           1 1     TYPE_TEXT_VARIATION_LONG_MESSAGE\n                           11      TYPE_TEXT_VARIATION_PERSON_NAME\n                           111     TYPE_TEXT_VARIATION_POSTAL_ADDRESS\n                          1        TYPE_TEXT_VARIATION_PASSWORD\n                          1  1     TYPE_TEXT_VARIATION_VISIBLE_PASSWORD\n                          1 1      TYPE_TEXT_VARIATION_WEB_EDIT_TEXT\n                          1 11     TYPE_TEXT_VARIATION_FILTER\n                          11       TYPE_TEXT_VARIATION_PHONETIC\n                          11 1     TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS\n                          111      TYPE_TEXT_VARIATION_WEB_PASSWORD\n                     1             TYPE_TEXT_FLAG_CAP_CHARACTERS\n                    1              TYPE_TEXT_FLAG_CAP_WORDS\n                   1               TYPE_TEXT_FLAG_CAP_SENTENCES\n                  1                TYPE_TEXT_FLAG_AUTO_CORRECT\n                 1                 TYPE_TEXT_FLAG_AUTO_COMPLETE\n                1                  TYPE_TEXT_FLAG_MULTI_LINE\n               1                   TYPE_TEXT_FLAG_IME_MULTI_LINE\n              1                    TYPE_TEXT_FLAG_NO_SUGGESTIONS\n             1 TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS\n |-------|-------|-------|-------|\n                                1  TYPE_CLASS_NUMBER\n                             1     TYPE_NUMBER_VARIATION_PASSWORD\n                     1             TYPE_NUMBER_FLAG_SIGNED\n                    1              TYPE_NUMBER_FLAG_DECIMAL\n |-------|-------|-------|-------|\n                                11 TYPE_CLASS_PHONE\n |-------|-------|-------|-------|\n                               1   TYPE_CLASS_DATETIME\n                             1     TYPE_DATETIME_VARIATION_DATE\n                            1      TYPE_DATETIME_VARIATION_TIME\n |-------|-------|-------|-------|
"] +pub type GameTextInputType = u32; +#[doc = " Set of bits in {@link #imeOptions} that provide alternative actions\n associated with the \"enter\" key. This both helps the IME provide\n better feedback about what the enter key will do, and also allows it\n to provide alternative mechanisms for providing that command."] +pub const GameTextInputActionType_IME_MASK_ACTION: GameTextInputActionType = 255; +#[doc = " Bits of {@link #IME_MASK_ACTION}: no specific action has been\n associated with this editor, let the editor come up with its own if\n it can."] +pub const GameTextInputActionType_IME_ACTION_UNSPECIFIED: GameTextInputActionType = 0; +#[doc = " Bits of {@link #IME_MASK_ACTION}: there is no available action."] +pub const GameTextInputActionType_IME_ACTION_NONE: GameTextInputActionType = 1; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"go\"\n operation to take the user to the target of the text they typed.\n Typically used, for example, when entering a URL."] +pub const GameTextInputActionType_IME_ACTION_GO: GameTextInputActionType = 2; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"search\"\n operation, taking the user to the results of searching for the text\n they have typed (in whatever context is appropriate)."] +pub const GameTextInputActionType_IME_ACTION_SEARCH: GameTextInputActionType = 3; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"send\"\n operation, delivering the text to its target. This is typically used\n when composing a message in IM or SMS where sending is immediate."] +pub const GameTextInputActionType_IME_ACTION_SEND: GameTextInputActionType = 4; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"next\"\n operation, taking the user to the next field that will accept text."] +pub const GameTextInputActionType_IME_ACTION_NEXT: GameTextInputActionType = 5; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"done\"\n operation, typically meaning there is nothing more to input and the\n IME will be closed."] +pub const GameTextInputActionType_IME_ACTION_DONE: GameTextInputActionType = 6; +#[doc = " Bits of {@link #IME_MASK_ACTION}: like {@link #IME_ACTION_NEXT}, but\n for moving to the previous field. This will normally not be used to\n specify an action (since it precludes {@link #IME_ACTION_NEXT}), but\n can be returned to the app if it sets {@link #IME_FLAG_NAVIGATE_PREVIOUS}."] +pub const GameTextInputActionType_IME_ACTION_PREVIOUS: GameTextInputActionType = 7; +#[doc = " actionId and imeOptions argument of GameActivity_setImeEditorInfo().\n\n
\n |-------|-------|-------|-------|\n                              1111 IME_MASK_ACTION\n |-------|-------|-------|-------|\n                                   IME_ACTION_UNSPECIFIED\n                                 1 IME_ACTION_NONE\n                                1  IME_ACTION_GO\n                                11 IME_ACTION_SEARCH\n                               1   IME_ACTION_SEND\n                               1 1 IME_ACTION_NEXT\n                               11  IME_ACTION_DONE\n                               111 IME_ACTION_PREVIOUS\n         1                         IME_FLAG_NO_PERSONALIZED_LEARNING\n        1                          IME_FLAG_NO_FULLSCREEN\n       1                           IME_FLAG_NAVIGATE_PREVIOUS\n      1                            IME_FLAG_NAVIGATE_NEXT\n     1                             IME_FLAG_NO_EXTRACT_UI\n    1                              IME_FLAG_NO_ACCESSORY_ACTION\n   1                               IME_FLAG_NO_ENTER_ACTION\n  1                                IME_FLAG_FORCE_ASCII\n |-------|-------|-------|-------|
"] +pub type GameTextInputActionType = u32; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME should not update\n any personalized data such as typing history and personalized language\n model based on what the user typed on this text editing object. Typical\n use cases are:
  • When the application is in a special mode, where\n user's activities are expected to be not recorded in the application's\n history. Some web browsers and chat applications may have this kind of\n modes.
  • When storing typing history does not make much sense.\n Specifying this flag in typing games may help to avoid typing history from\n being filled up with words that the user is less likely to type in their\n daily life. Another example is that when the application already knows\n that the expected input is not a valid word (e.g. a promotion code that is\n not a valid word in any natural language).
  • \n
\n\n

Applications need to be aware that the flag is not a guarantee, and some\n IMEs may not respect it.

"] +pub const GameTextInputImeOptions_IME_FLAG_NO_PERSONALIZED_LEARNING: GameTextInputImeOptions = + 16777216; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME never go\n into fullscreen mode.\n By default, IMEs may go into full screen mode when they think\n it's appropriate, for example on small screens in landscape\n orientation where displaying a software keyboard may occlude\n such a large portion of the screen that the remaining part is\n too small to meaningfully display the application UI.\n If this flag is set, compliant IMEs will never go into full screen mode,\n and always leave some space to display the application UI.\n Applications need to be aware that the flag is not a guarantee, and\n some IMEs may ignore it."] +pub const GameTextInputImeOptions_IME_FLAG_NO_FULLSCREEN: GameTextInputImeOptions = 33554432; +#[doc = " Flag of {@link #imeOptions}: like {@link #IME_FLAG_NAVIGATE_NEXT}, but\n specifies there is something interesting that a backward navigation\n can focus on. If the user selects the IME's facility to backward\n navigate, this will show up in the application as an {@link\n #IME_ACTION_PREVIOUS} at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_PREVIOUS: GameTextInputImeOptions = 67108864; +#[doc = " Flag of {@link #imeOptions}: used to specify that there is something\n interesting that a forward navigation can focus on. This is like using\n {@link #IME_ACTION_NEXT}, except allows the IME to be multiline (with\n an enter key) as well as provide forward navigation. Note that some\n IMEs may not be able to do this, especially when running on a small\n screen where there is little space. In that case it does not need to\n present a UI for this option. Like {@link #IME_ACTION_NEXT}, if the\n user selects the IME's facility to forward navigate, this will show up\n in the application at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_NEXT: GameTextInputImeOptions = 134217728; +#[doc = " Flag of {@link #imeOptions}: used to specify that the IME does not need\n to show its extracted text UI. For input methods that may be fullscreen,\n often when in landscape mode, this allows them to be smaller and let part\n of the application be shown behind, through transparent UI parts in the\n fullscreen IME. The part of the UI visible to the user may not be\n responsive to touch because the IME will receive touch events, which may\n confuse the user; use {@link #IME_FLAG_NO_FULLSCREEN} instead for a better\n experience. Using this flag is discouraged and it may become deprecated in\n the future. Its meaning is unclear in some situations and it may not work\n appropriately on older versions of the platform."] +pub const GameTextInputImeOptions_IME_FLAG_NO_EXTRACT_UI: GameTextInputImeOptions = 268435456; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}, this indicates that the action\n should not be available as an accessory button on the right of the\n extracted text when the input method is full-screen. Note that by setting\n this flag, there can be cases where the action is simply never available to\n the user. Setting this generally means that you think that in fullscreen\n mode, where there is little space to show the text, it's not worth taking\n some screen real estate to display the action and it should be used instead\n to show more text."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ACCESSORY_ACTION: GameTextInputImeOptions = 536870912; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}. If this flag is not set, IMEs will\n normally replace the \"enter\" key with the action supplied. This flag\n indicates that the action should not be available in-line as a replacement\n for the \"enter\" key. Typically this is because the action has such a\n significant impact or is not recoverable enough that accidentally hitting\n it should be avoided, such as sending a message. Note that\n {@link android.widget.TextView} will automatically set this flag for you\n on multi-line text views."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ENTER_ACTION: GameTextInputImeOptions = 1073741824; +#[doc = " Flag of {@link #imeOptions}: used to request an IME that is capable of\n inputting ASCII characters. The intention of this flag is to ensure that\n the user can type Roman alphabet characters in a {@link\n android.widget.TextView}. It is typically used for an account ID or\n password input. A lot of the time, IMEs are already able to input ASCII\n even without being told so (such IMEs already respect this flag in a\n sense), but there are cases when this is not the default. For instance,\n users of languages using a different script like Arabic, Greek, Hebrew or\n Russian typically have a keyboard that can't input ASCII characters by\n default. Applications need to be aware that the flag is not a guarantee,\n and some IMEs may not respect it. However, it is strongly recommended for\n IME authors to respect this flag especially when their IME could end up\n with a state where only languages using non-ASCII are enabled."] +pub const GameTextInputImeOptions_IME_FLAG_FORCE_ASCII: GameTextInputImeOptions = 2147483648; +#[doc = " Flag of {@link #internalImeOptions}: flag is set when app window containing\n this\n {@link EditorInfo} is using {@link Configuration#ORIENTATION_PORTRAIT}\n mode.\n @hide"] +pub const GameTextInputImeOptions_IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT: GameTextInputImeOptions = + 1; +#[doc = " Generic unspecified type for {@link #imeOptions}."] +pub const GameTextInputImeOptions_IME_NULL: GameTextInputImeOptions = 0; +pub type GameTextInputImeOptions = u32; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: + GameCommonInsetsType = 3; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; +#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] +pub type GameCommonInsetsType = u8; #[doc = " This structure defines the native side of an android.app.GameActivity.\n It is created by the framework, and handed to the application's native\n code as it is being launched."] #[repr(C)] pub struct GameActivity { @@ -3041,112 +2874,62 @@ fn bindgen_test_layout_GameActivity() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(GameActivity)) + "Size of GameActivity" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivity)) + "Alignment of GameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(callbacks) - ) + "Offset of field: GameActivity::callbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(vm) - ) + "Offset of field: GameActivity::vm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(env) - ) + "Offset of field: GameActivity::env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).javaGameActivity) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(javaGameActivity) - ) + "Offset of field: GameActivity::javaGameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(internalDataPath) - ) + "Offset of field: GameActivity::internalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(externalDataPath) - ) + "Offset of field: GameActivity::externalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(sdkVersion) - ) + "Offset of field: GameActivity::sdkVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(instance) - ) + "Offset of field: GameActivity::instance" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(assetManager) - ) + "Offset of field: GameActivity::assetManager" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(obbPath) - ) + "Offset of field: GameActivity::obbPath" ); } #[doc = " A function the user should call from their callback with the data, its length\n and the library- supplied context."] @@ -3203,7 +2986,7 @@ pub struct GameActivityCallbacks { pub onNativeWindowDestroyed: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, window: *mut ANativeWindow), >, - #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] + #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] pub onConfigurationChanged: ::std::option::Option, #[doc = " The system is running low on memory. Use this callback to release\n resources you do not need, to help the system avoid killing more\n important processes."] @@ -3242,6 +3025,13 @@ pub struct GameActivityCallbacks { pub onContentRectChanged: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, rect: *const ARect), >, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onSoftwareKeyboardVisibilityChanged: + ::std::option::Option, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onEditorAction: ::std::option::Option< + unsafe extern "C" fn(activity: *mut GameActivity, action: ::std::os::raw::c_int) -> bool, + >, } #[test] fn bindgen_test_layout_GameActivityCallbacks() { @@ -3250,203 +3040,120 @@ fn bindgen_test_layout_GameActivityCallbacks() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 76usize, - concat!("Size of: ", stringify!(GameActivityCallbacks)) + 84usize, + "Size of GameActivityCallbacks" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityCallbacks)) + "Alignment of GameActivityCallbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStart) - ) + "Offset of field: GameActivityCallbacks::onStart" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onResume) - ) + "Offset of field: GameActivityCallbacks::onResume" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) + "Offset of field: GameActivityCallbacks::onSaveInstanceState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onPause) - ) + "Offset of field: GameActivityCallbacks::onPause" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStop) - ) + "Offset of field: GameActivityCallbacks::onStop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onDestroy) - ) + "Offset of field: GameActivityCallbacks::onDestroy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowFocusChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowCreated" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowResized" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowRedrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowDestroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) + "Offset of field: GameActivityCallbacks::onConfigurationChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTrimMemory) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTrimMemory) - ) + "Offset of field: GameActivityCallbacks::onTrimMemory" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTouchEvent) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTouchEvent) - ) + "Offset of field: GameActivityCallbacks::onTouchEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyDown) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyDown) - ) + "Offset of field: GameActivityCallbacks::onKeyDown" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyUp) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyUp) - ) + "Offset of field: GameActivityCallbacks::onKeyUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTextInputEvent) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTextInputEvent) - ) + "Offset of field: GameActivityCallbacks::onTextInputEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowInsetsChanged) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowInsetsChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowInsetsChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) + "Offset of field: GameActivityCallbacks::onContentRectChanged" + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).onSoftwareKeyboardVisibilityChanged) as usize - ptr as usize + }, + 76usize, + "Offset of field: GameActivityCallbacks::onSoftwareKeyboardVisibilityChanged" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).onEditorAction) as usize - ptr as usize }, + 80usize, + "Offset of field: GameActivityCallbacks::onEditorAction" ); } #[doc = " This is the function that must be in the native code to instantiate the\n application's native activity. It is called with the activity instance (see\n above); if the code is being instantiated from a previously saved instance,\n the savedState will be non-NULL and point to the saved data. You must make\n any copy of this data you need -- it will be released after you return from\n this function."] @@ -3526,7 +3233,7 @@ pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_TURN_SCREEN_ON: GameActiv pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_DISMISS_KEYGUARD: GameActivitySetWindowFlags = 4194304; #[doc = " Flags for GameActivity_setWindowFlags,\n as per the Java API at android.view.WindowManager.LayoutParams."] -pub type GameActivitySetWindowFlags = ::std::os::raw::c_uint; +pub type GameActivitySetWindowFlags = u32; extern "C" { #[doc = " Change the window flags of the given activity. Calls getWindow().setFlags()\n of the given activity.\n Note that some flags must be set before the window decoration is created,\n see\n https://developer.android.com/reference/android/view/Window#setFlags(int,%20int).\n Note also that this method can be called from\n *any* thread; it will send a message to the main thread of the process\n where the Java finish call will take place."] pub fn GameActivity_setWindowFlags( @@ -3542,11 +3249,15 @@ pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT: pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_FORCED: GameActivityShowSoftInputFlags = 2; #[doc = " Flags for GameActivity_showSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityShowSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityShowSoftInputFlags = u8; extern "C" { #[doc = " Show the IME while in the given activity. Calls\n InputMethodManager.showSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java call will take place."] pub fn GameActivity_showSoftInput(activity: *mut GameActivity, flags: u32); } +extern "C" { + #[doc = " Restarts the input method. Calls InputMethodManager.restartInput().\n Note that this method can be called from *any* thread; it will send a message\n to the main thread of the process where the Java call will take place."] + pub fn GameActivity_restartInput(activity: *mut GameActivity); +} extern "C" { #[doc = " Set the text entry state (see documentation of the GameTextInputState struct\n in the Game Text Input library reference).\n\n Ownership of the state is maintained by the caller."] pub fn GameActivity_setTextInputState( @@ -3573,7 +3284,7 @@ pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_O pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS: GameActivityHideSoftInputFlags = 2; #[doc = " Flags for GameActivity_hideSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityHideSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityHideSoftInputFlags = u16; extern "C" { #[doc = " Hide the IME while in the given activity. Calls\n InputMethodManager.hideSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java finish call will take place."] pub fn GameActivity_hideSoftInput(activity: *mut GameActivity, flags: u32); @@ -3587,12 +3298,16 @@ extern "C" { ); } extern "C" { - #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note that this function will attach the current thread to the JVM if it is\n not already attached, so the caller must detach the thread from the JVM\n before the thread is destroyed using DetachCurrentThread."] + #[doc = " Tells whether the software keyboard is visible or not."] + pub fn GameActivity_isSoftwareKeyboardVisible(activity: *mut GameActivity) -> bool; +} +extern "C" { + #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note: currently only TYPE_NULL AND TYPE_CLASS_NUMBER are supported."] pub fn GameActivity_setImeEditorInfo( activity: *mut GameActivity, - inputType: ::std::os::raw::c_int, - actionId: ::std::os::raw::c_int, - imeOptions: ::std::os::raw::c_int, + inputType: GameTextInputType, + actionId: GameTextInputActionType, + imeOptions: GameTextInputImeOptions, ); } extern "C" { @@ -3623,6 +3338,9 @@ extern "C" { extern "C" { pub fn GameActivity_getKeyboardHidden(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + pub fn GameActivity_getLocalesCount(activity: *mut GameActivity) -> ::std::os::raw::c_int; +} extern "C" { pub fn GameActivity_getMcc(activity: *mut GameActivity) -> ::std::os::raw::c_int; } @@ -3655,6 +3373,39 @@ extern "C" { extern "C" { pub fn GameActivity_getUIMode(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " The functions below return Java locale information.\n\n In simple cases there will be just one locale, but it's possible tha\n there are more than one locale objects. Users are encouraged to write code\n that handles all locales and not just the first one.\n\n The functions in the block below return string values in the provided buffer.\n Return value is zero if there were no errors, otherwise it's non-zero.\n If the return value is zero, `dst` will contain a null-terminated string:\n strlen(dst) <= dst_size - 1.\n If the return value is non-zero, the content of dst is undefined.\n\n Parameters:\n\n dst, dst_size: define a receiver buffer. Locale string can be something\n short like \"EN/EN\", but it may be longer. You should be safe with a buffer\n size of 256 bytes.\n\n If the buffer is too small, ENOBUFS is returned. Try allocating a larger\n buffer in this case.\n\n localeIdx must be between 0 and the value of GameActivity_getLocalesCount().\n If localeIdx is out of range, EINVAL is returned.\n\n Refer to Java documentation of locales for more information."] + pub fn GameActivity_getLocaleLanguage( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleScript( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleCountry( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleVariant( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} pub const ACONFIGURATION_ORIENTATION_ANY: _bindgen_ty_21 = 0; pub const ACONFIGURATION_ORIENTATION_PORT: _bindgen_ty_21 = 1; pub const ACONFIGURATION_ORIENTATION_LAND: _bindgen_ty_21 = 2; @@ -3753,45 +3504,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } #[repr(C)] @@ -3810,62 +3542,37 @@ fn bindgen_test_layout__fpx_sw_bytes() { assert_eq!( ::std::mem::size_of::<_fpx_sw_bytes>(), 48usize, - concat!("Size of: ", stringify!(_fpx_sw_bytes)) + "Size of _fpx_sw_bytes" ); assert_eq!( ::std::mem::align_of::<_fpx_sw_bytes>(), 4usize, - concat!("Alignment of ", stringify!(_fpx_sw_bytes)) + "Alignment of _fpx_sw_bytes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(magic1) - ) + "Offset of field: _fpx_sw_bytes::magic1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extended_size) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(extended_size) - ) + "Offset of field: _fpx_sw_bytes::extended_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xfeatures) - ) + "Offset of field: _fpx_sw_bytes::xfeatures" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xstate_size) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xstate_size) - ) + "Offset of field: _fpx_sw_bytes::xstate_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(padding) - ) + "Offset of field: _fpx_sw_bytes::padding" ); } #[repr(C)] @@ -3878,35 +3585,21 @@ pub struct _fpreg { fn bindgen_test_layout__fpreg() { const UNINIT: ::std::mem::MaybeUninit<_fpreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpreg>(), - 10usize, - concat!("Size of: ", stringify!(_fpreg)) - ); + assert_eq!(::std::mem::size_of::<_fpreg>(), 10usize, "Size of _fpreg"); assert_eq!( ::std::mem::align_of::<_fpreg>(), 2usize, - concat!("Alignment of ", stringify!(_fpreg)) + "Alignment of _fpreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(significand) - ) + "Offset of field: _fpreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(exponent) - ) + "Offset of field: _fpreg::exponent" ); } #[repr(C)] @@ -3920,45 +3613,26 @@ pub struct _fpxreg { fn bindgen_test_layout__fpxreg() { const UNINIT: ::std::mem::MaybeUninit<_fpxreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpxreg>(), - 16usize, - concat!("Size of: ", stringify!(_fpxreg)) - ); + assert_eq!(::std::mem::size_of::<_fpxreg>(), 16usize, "Size of _fpxreg"); assert_eq!( ::std::mem::align_of::<_fpxreg>(), 2usize, - concat!("Alignment of ", stringify!(_fpxreg)) + "Alignment of _fpxreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(significand) - ) + "Offset of field: _fpxreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(exponent) - ) + "Offset of field: _fpxreg::exponent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(padding) - ) + "Offset of field: _fpxreg::padding" ); } #[repr(C)] @@ -3970,25 +3644,16 @@ pub struct _xmmreg { fn bindgen_test_layout__xmmreg() { const UNINIT: ::std::mem::MaybeUninit<_xmmreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xmmreg>(), - 16usize, - concat!("Size of: ", stringify!(_xmmreg)) - ); + assert_eq!(::std::mem::size_of::<_xmmreg>(), 16usize, "Size of _xmmreg"); assert_eq!( ::std::mem::align_of::<_xmmreg>(), 4usize, - concat!("Alignment of ", stringify!(_xmmreg)) + "Alignment of _xmmreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_xmmreg), - "::", - stringify!(element) - ) + "Offset of field: _xmmreg::element" ); } #[repr(C)] @@ -4026,32 +3691,22 @@ fn bindgen_test_layout__fpstate_32__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<_fpstate_32__bindgen_ty_1>(), 176usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_1)) + "Size of _fpstate_32__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<_fpstate_32__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_1)) + "Alignment of _fpstate_32__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding1) - ) + "Offset of field: _fpstate_32__bindgen_ty_1::padding1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding) - ) + "Offset of field: _fpstate_32__bindgen_ty_1::padding" ); } #[repr(C)] @@ -4068,32 +3723,22 @@ fn bindgen_test_layout__fpstate_32__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<_fpstate_32__bindgen_ty_2>(), 48usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_2)) + "Size of _fpstate_32__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<_fpstate_32__bindgen_ty_2>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_2)) + "Alignment of _fpstate_32__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(padding2) - ) + "Offset of field: _fpstate_32__bindgen_ty_2::padding2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(sw_reserved) - ) + "Offset of field: _fpstate_32__bindgen_ty_2::sw_reserved" ); } #[test] @@ -4103,162 +3748,87 @@ fn bindgen_test_layout__fpstate_32() { assert_eq!( ::std::mem::size_of::<_fpstate_32>(), 624usize, - concat!("Size of: ", stringify!(_fpstate_32)) + "Size of _fpstate_32" ); assert_eq!( ::std::mem::align_of::<_fpstate_32>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_32)) + "Alignment of _fpstate_32" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cw) - ) + "Offset of field: _fpstate_32::cw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(sw) - ) + "Offset of field: _fpstate_32::sw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(tag) - ) + "Offset of field: _fpstate_32::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(ipoff) - ) + "Offset of field: _fpstate_32::ipoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cssel) - ) + "Offset of field: _fpstate_32::cssel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(dataoff) - ) + "Offset of field: _fpstate_32::dataoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(datasel) - ) + "Offset of field: _fpstate_32::datasel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_st) - ) + "Offset of field: _fpstate_32::_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 108usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(status) - ) + "Offset of field: _fpstate_32::status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 110usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(magic) - ) + "Offset of field: _fpstate_32::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_env) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_env) - ) + "Offset of field: _fpstate_32::_fxsr_env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(mxcsr) - ) + "Offset of field: _fpstate_32::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 140usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(reserved) - ) + "Offset of field: _fpstate_32::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_st) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_st) - ) + "Offset of field: _fpstate_32::_fxsr_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_xmm) - ) + "Offset of field: _fpstate_32::_xmm" ); } #[repr(C)] @@ -4291,32 +3861,22 @@ fn bindgen_test_layout__fpstate_64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<_fpstate_64__bindgen_ty_1>(), 48usize, - concat!("Size of: ", stringify!(_fpstate_64__bindgen_ty_1)) + "Size of _fpstate_64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<_fpstate_64__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_64__bindgen_ty_1)) + "Alignment of _fpstate_64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(reserved3) - ) + "Offset of field: _fpstate_64__bindgen_ty_1::reserved3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(sw_reserved) - ) + "Offset of field: _fpstate_64__bindgen_ty_1::sw_reserved" ); } #[test] @@ -4326,122 +3886,67 @@ fn bindgen_test_layout__fpstate_64() { assert_eq!( ::std::mem::size_of::<_fpstate_64>(), 512usize, - concat!("Size of: ", stringify!(_fpstate_64)) + "Size of _fpstate_64" ); assert_eq!( ::std::mem::align_of::<_fpstate_64>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_64)) + "Alignment of _fpstate_64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(cwd) - ) + "Offset of field: _fpstate_64::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(swd) - ) + "Offset of field: _fpstate_64::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(twd) - ) + "Offset of field: _fpstate_64::twd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(fop) - ) + "Offset of field: _fpstate_64::fop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rip) - ) + "Offset of field: _fpstate_64::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rdp) - ) + "Offset of field: _fpstate_64::rdp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr) - ) + "Offset of field: _fpstate_64::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr_mask) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr_mask) - ) + "Offset of field: _fpstate_64::mxcsr_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(st_space) - ) + "Offset of field: _fpstate_64::st_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(xmm_space) - ) + "Offset of field: _fpstate_64::xmm_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 416usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(reserved2) - ) + "Offset of field: _fpstate_64::reserved2" ); } #[repr(C)] @@ -4455,45 +3960,26 @@ pub struct _header { fn bindgen_test_layout__header() { const UNINIT: ::std::mem::MaybeUninit<_header> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_header>(), - 64usize, - concat!("Size of: ", stringify!(_header)) - ); + assert_eq!(::std::mem::size_of::<_header>(), 64usize, "Size of _header"); assert_eq!( ::std::mem::align_of::<_header>(), 4usize, - concat!("Alignment of ", stringify!(_header)) + "Alignment of _header" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(xfeatures) - ) + "Offset of field: _header::xfeatures" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved1) - ) + "Offset of field: _header::reserved1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved2) - ) + "Offset of field: _header::reserved2" ); } #[repr(C)] @@ -4508,22 +3994,17 @@ fn bindgen_test_layout__ymmh_state() { assert_eq!( ::std::mem::size_of::<_ymmh_state>(), 256usize, - concat!("Size of: ", stringify!(_ymmh_state)) + "Size of _ymmh_state" ); assert_eq!( ::std::mem::align_of::<_ymmh_state>(), 4usize, - concat!("Alignment of ", stringify!(_ymmh_state)) + "Alignment of _ymmh_state" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ymmh_space) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_ymmh_state), - "::", - stringify!(ymmh_space) - ) + "Offset of field: _ymmh_state::ymmh_space" ); } #[repr(C)] @@ -4540,42 +4021,27 @@ fn bindgen_test_layout__xstate() { assert_eq!( ::std::mem::size_of::<_xstate>(), 944usize, - concat!("Size of: ", stringify!(_xstate)) + "Size of _xstate" ); assert_eq!( ::std::mem::align_of::<_xstate>(), 4usize, - concat!("Alignment of ", stringify!(_xstate)) + "Alignment of _xstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(fpstate) - ) + "Offset of field: _xstate::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xstate_hdr) as usize - ptr as usize }, 624usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(xstate_hdr) - ) + "Offset of field: _xstate::xstate_hdr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ymmh) as usize - ptr as usize }, 688usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(ymmh) - ) + "Offset of field: _xstate::ymmh" ); } #[repr(C)] @@ -4617,292 +4083,152 @@ fn bindgen_test_layout_sigcontext_32() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(sigcontext_32)) + "Size of sigcontext_32" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigcontext_32)) + "Alignment of sigcontext_32" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext_32::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__gsh) - ) + "Offset of field: sigcontext_32::__gsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext_32::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__fsh) - ) + "Offset of field: sigcontext_32::__fsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(es) - ) + "Offset of field: sigcontext_32::es" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__esh) - ) + "Offset of field: sigcontext_32::__esh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ds) - ) + "Offset of field: sigcontext_32::ds" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__dsh) - ) + "Offset of field: sigcontext_32::__dsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(di) - ) + "Offset of field: sigcontext_32::di" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(si) - ) + "Offset of field: sigcontext_32::si" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bp) - ) + "Offset of field: sigcontext_32::bp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp) - ) + "Offset of field: sigcontext_32::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bx) - ) + "Offset of field: sigcontext_32::bx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(dx) - ) + "Offset of field: sigcontext_32::dx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cx) - ) + "Offset of field: sigcontext_32::cx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ax) - ) + "Offset of field: sigcontext_32::ax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext_32::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(err) - ) + "Offset of field: sigcontext_32::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ip) - ) + "Offset of field: sigcontext_32::ip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext_32::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__csh) - ) + "Offset of field: sigcontext_32::__csh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(flags) - ) + "Offset of field: sigcontext_32::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp_at_signal) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp_at_signal) - ) + "Offset of field: sigcontext_32::sp_at_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext_32::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__ssh) - ) + "Offset of field: sigcontext_32::__ssh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext_32::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext_32::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext_32::cr2" ); } #[repr(C)] @@ -4944,292 +4270,152 @@ fn bindgen_test_layout_sigcontext_64() { assert_eq!( ::std::mem::size_of::(), 256usize, - concat!("Size of: ", stringify!(sigcontext_64)) + "Size of sigcontext_64" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigcontext_64)) + "Alignment of sigcontext_64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r8) - ) + "Offset of field: sigcontext_64::r8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r9) - ) + "Offset of field: sigcontext_64::r9" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r10) - ) + "Offset of field: sigcontext_64::r10" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r11) - ) + "Offset of field: sigcontext_64::r11" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r12) - ) + "Offset of field: sigcontext_64::r12" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r13) - ) + "Offset of field: sigcontext_64::r13" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r14) - ) + "Offset of field: sigcontext_64::r14" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r15) - ) + "Offset of field: sigcontext_64::r15" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(di) - ) + "Offset of field: sigcontext_64::di" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(si) - ) + "Offset of field: sigcontext_64::si" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bp) - ) + "Offset of field: sigcontext_64::bp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bx) - ) + "Offset of field: sigcontext_64::bx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(dx) - ) + "Offset of field: sigcontext_64::dx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ax) - ) + "Offset of field: sigcontext_64::ax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cx) - ) + "Offset of field: sigcontext_64::cx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(sp) - ) + "Offset of field: sigcontext_64::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ip) - ) + "Offset of field: sigcontext_64::ip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(flags) - ) + "Offset of field: sigcontext_64::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext_64::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext_64::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext_64::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 150usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext_64::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(err) - ) + "Offset of field: sigcontext_64::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext_64::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext_64::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext_64::cr2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext_64::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(reserved1) - ) + "Offset of field: sigcontext_64::reserved1" ); } #[repr(C)] @@ -5271,292 +4457,183 @@ fn bindgen_test_layout_sigcontext() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(sigcontext)) + "Size of sigcontext" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigcontext)) + "Alignment of sigcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__gsh) - ) + "Offset of field: sigcontext::__gsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__fsh) - ) + "Offset of field: sigcontext::__fsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(es) - ) + "Offset of field: sigcontext::es" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__esh) - ) + "Offset of field: sigcontext::__esh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ds) - ) + "Offset of field: sigcontext::ds" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__dsh) - ) + "Offset of field: sigcontext::__dsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edi) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(edi) - ) + "Offset of field: sigcontext::edi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esi) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esi) - ) + "Offset of field: sigcontext::esi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ebp) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ebp) - ) + "Offset of field: sigcontext::ebp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esp) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esp) - ) + "Offset of field: sigcontext::esp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ebx) - ) + "Offset of field: sigcontext::ebx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(edx) - ) + "Offset of field: sigcontext::edx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ecx) - ) + "Offset of field: sigcontext::ecx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eax) - ) + "Offset of field: sigcontext::eax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(err) - ) + "Offset of field: sigcontext::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eip) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eip) - ) + "Offset of field: sigcontext::eip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__csh) - ) + "Offset of field: sigcontext::__csh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eflags) - ) + "Offset of field: sigcontext::eflags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esp_at_signal) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(esp_at_signal) - ) + "Offset of field: sigcontext::esp_at_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(__ssh) - ) + "Offset of field: sigcontext::__ssh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext::cr2" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timespec { + pub tv_sec: time_t, + pub tv_nsec: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_timespec() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + "Size of timespec" + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + "Alignment of timespec" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, + 0usize, + "Offset of field: timespec::tv_sec" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, + 4usize, + "Offset of field: timespec::tv_nsec" ); } #[repr(C)] @@ -5572,32 +4649,22 @@ fn bindgen_test_layout___kernel_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) + "Size of __kernel_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_timespec>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) + "Alignment of __kernel_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_timespec::tv_nsec" ); } #[repr(C)] @@ -5613,32 +4680,22 @@ fn bindgen_test_layout___kernel_itimerspec() { assert_eq!( ::std::mem::size_of::<__kernel_itimerspec>(), 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) + "Size of __kernel_itimerspec" ); assert_eq!( ::std::mem::align_of::<__kernel_itimerspec>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) + "Alignment of __kernel_itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: __kernel_itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: __kernel_itimerspec::it_value" ); } #[repr(C)] @@ -5655,32 +4712,22 @@ fn bindgen_test_layout___kernel_old_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_old_timespec>(), 8usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) + "Size of __kernel_old_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_old_timespec>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) + "Alignment of __kernel_old_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_old_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_old_timespec::tv_nsec" ); } #[repr(C)] @@ -5697,73 +4744,22 @@ fn bindgen_test_layout___kernel_sock_timeval() { assert_eq!( ::std::mem::size_of::<__kernel_sock_timeval>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) + "Size of __kernel_sock_timeval" ); assert_eq!( ::std::mem::align_of::<__kernel_sock_timeval>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) + "Alignment of __kernel_sock_timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_sock_timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __kernel_old_time_t, - pub tv_nsec: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_sock_timeval::tv_usec" ); } #[repr(C)] @@ -5776,35 +4772,21 @@ pub struct timeval { fn bindgen_test_layout_timeval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(timeval)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -5820,32 +4802,22 @@ fn bindgen_test_layout_itimerspec() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(itimerspec)) + "Size of itimerspec" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(itimerspec)) + "Alignment of itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: itimerspec::it_value" ); } #[repr(C)] @@ -5861,32 +4833,22 @@ fn bindgen_test_layout_itimerval() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(itimerval)) + "Size of itimerval" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(itimerval)) + "Alignment of itimerval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerval::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) + "Offset of field: itimerval::it_value" ); } #[repr(C)] @@ -5902,32 +4864,22 @@ fn bindgen_test_layout_timezone() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timezone)) + "Size of timezone" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timezone)) + "Alignment of timezone" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) + "Offset of field: timezone::tz_minuteswest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) + "Offset of field: timezone::tz_dsttime" ); } pub type sigset_t = ::std::os::raw::c_ulong; @@ -5963,35 +4915,22 @@ fn bindgen_test_layout___kernel_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction__bindgen_ty_1>(), 4usize, - concat!("Size of: ", stringify!(__kernel_sigaction__bindgen_ty_1)) + "Size of __kernel_sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__kernel_sigaction__bindgen_ty_1) - ) + "Alignment of __kernel_sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_handler) - ) + "Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction__bindgen_ty_1), - "::", - stringify!(_sa_sigaction) - ) + "Offset of field: __kernel_sigaction__bindgen_ty_1::_sa_sigaction" ); } #[test] @@ -6001,52 +4940,32 @@ fn bindgen_test_layout___kernel_sigaction() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) + "Size of __kernel_sigaction" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) + "Alignment of __kernel_sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(_u) - ) + "Offset of field: __kernel_sigaction::_u" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: __kernel_sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: __kernel_sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: __kernel_sigaction::sa_restorer" ); } #[repr(C)] @@ -6063,42 +4982,27 @@ fn bindgen_test_layout_sigaltstack() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(sigaltstack)) + "Size of sigaltstack" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaltstack)) + "Alignment of sigaltstack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) + "Offset of field: sigaltstack::ss_sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) + "Offset of field: sigaltstack::ss_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) + "Offset of field: sigaltstack::ss_size" ); } pub type stack_t = sigaltstack; @@ -6112,35 +5016,21 @@ pub union sigval { fn bindgen_test_layout_sigval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(sigval)) - ); + assert_eq!(::std::mem::size_of::(), 4usize, "Size of sigval"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigval)) + "Alignment of sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) + "Offset of field: sigval::sival_int" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) + "Offset of field: sigval::sival_ptr" ); } pub type sigval_t = sigval; @@ -6169,32 +5059,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_1>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) + "Size of __sifields__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) + "Alignment of __sifields__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_1::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_1::_uid" ); } #[repr(C)] @@ -6213,52 +5093,32 @@ fn bindgen_test_layout___sifields__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_2>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) + "Size of __sifields__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_2>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) + "Alignment of __sifields__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) + "Offset of field: __sifields__bindgen_ty_2::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) + "Offset of field: __sifields__bindgen_ty_2::_overrun" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_2::_sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) + "Offset of field: __sifields__bindgen_ty_2::_sys_private" ); } #[repr(C)] @@ -6276,42 +5136,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_3>(), 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) + "Size of __sifields__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_3>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) + "Alignment of __sifields__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_3::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_3::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_3::_sigval" ); } #[repr(C)] @@ -6331,62 +5176,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_4() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_4>(), 20usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) + "Size of __sifields__bindgen_ty_4" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_4>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) + "Alignment of __sifields__bindgen_ty_4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_4::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_4::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) + "Offset of field: __sifields__bindgen_ty_4::_status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) + "Offset of field: __sifields__bindgen_ty_4::_utime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) + "Offset of field: __sifields__bindgen_ty_4::_stime" ); } #[repr(C)] @@ -6419,48 +5239,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper" ); } #[repr(C)] @@ -6477,38 +5276,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey" ); } #[repr(C)] @@ -6516,6 +5299,7 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _data: ::std::os::raw::c_ulong, pub _type: __u32, + pub _flags: __u32, } #[test] fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { @@ -6524,39 +5308,28 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), - 8usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + 12usize, + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 8usize, + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags" ); } #[test] @@ -6567,68 +5340,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf" ); } #[test] @@ -6639,22 +5381,17 @@ fn bindgen_test_layout___sifields__bindgen_ty_5() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) + "Size of __sifields__bindgen_ty_5" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) + "Alignment of __sifields__bindgen_ty_5" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) + "Offset of field: __sifields__bindgen_ty_5::_addr" ); } #[repr(C)] @@ -6671,32 +5408,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_6() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_6>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) + "Size of __sifields__bindgen_ty_6" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_6>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) + "Alignment of __sifields__bindgen_ty_6" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) + "Offset of field: __sifields__bindgen_ty_6::_band" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) + "Offset of field: __sifields__bindgen_ty_6::_fd" ); } #[repr(C)] @@ -6714,42 +5441,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_7() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_7>(), 12usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) + "Size of __sifields__bindgen_ty_7" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_7>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) + "Alignment of __sifields__bindgen_ty_7" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) + "Offset of field: __sifields__bindgen_ty_7::_call_addr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) + "Offset of field: __sifields__bindgen_ty_7::_syscall" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) + "Offset of field: __sifields__bindgen_ty_7::_arch" ); } #[test] @@ -6759,82 +5471,47 @@ fn bindgen_test_layout___sifields() { assert_eq!( ::std::mem::size_of::<__sifields>(), 20usize, - concat!("Size of: ", stringify!(__sifields)) + "Size of __sifields" ); assert_eq!( ::std::mem::align_of::<__sifields>(), 4usize, - concat!("Alignment of ", stringify!(__sifields)) + "Alignment of __sifields" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) + "Offset of field: __sifields::_kill" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) + "Offset of field: __sifields::_timer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) + "Offset of field: __sifields::_rt" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) + "Offset of field: __sifields::_sigchld" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) + "Offset of field: __sifields::_sigfault" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) + "Offset of field: __sifields::_sigpoll" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) + "Offset of field: __sifields::_sigsys" ); } #[repr(C)] @@ -6864,55 +5541,32 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields" ); } #[test] @@ -6923,22 +5577,17 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) + "Alignment of siginfo__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) + "Offset of field: siginfo__bindgen_ty_1::_si_pad" ); } #[test] @@ -6946,12 +5595,12 @@ fn bindgen_test_layout_siginfo() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo)) + "Size of siginfo" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(siginfo)) + "Alignment of siginfo" ); } pub type siginfo_t = siginfo; @@ -6984,38 +5633,22 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Size of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute" ); } #[test] @@ -7026,42 +5659,27 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 52usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) + "Size of sigevent__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) + "Alignment of sigevent__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) + "Offset of field: sigevent__bindgen_ty_1::_pad" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) + "Offset of field: sigevent__bindgen_ty_1::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) + "Offset of field: sigevent__bindgen_ty_1::_sigev_thread" ); } #[test] @@ -7071,52 +5689,32 @@ fn bindgen_test_layout_sigevent() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(sigevent)) + "Size of sigevent" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigevent)) + "Alignment of sigevent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) + "Offset of field: sigevent::sigev_value" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) + "Offset of field: sigevent::sigev_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) + "Offset of field: sigevent::sigev_notify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) + "Offset of field: sigevent::_sigev_un" ); } pub type sigevent_t = sigevent; @@ -7135,22 +5733,17 @@ fn bindgen_test_layout_sigset64_t() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigset64_t)) + "Size of sigset64_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigset64_t)) + "Alignment of sigset64_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigset64_t), - "::", - stringify!(__bits) - ) + "Offset of field: sigset64_t::__bits" ); } #[repr(C)] @@ -7181,32 +5774,22 @@ fn bindgen_test_layout_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) + "Size of sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) + "Alignment of sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -7216,42 +5799,27 @@ fn bindgen_test_layout_sigaction() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(sigaction)) + "Size of sigaction" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction)) + "Alignment of sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction::sa_restorer" ); } #[repr(C)] @@ -7282,32 +5850,22 @@ fn bindgen_test_layout_sigaction64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) + "Size of sigaction64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) + "Alignment of sigaction64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -7317,42 +5875,27 @@ fn bindgen_test_layout_sigaction64() { assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(sigaction64)) + "Size of sigaction64" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigaction64)) + "Alignment of sigaction64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction64::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction64::sa_restorer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction64::sa_mask" ); } #[repr(C)] @@ -7374,92 +5917,52 @@ fn bindgen_test_layout_user_fpregs_struct() { assert_eq!( ::std::mem::size_of::(), 108usize, - concat!("Size of: ", stringify!(user_fpregs_struct)) + "Size of user_fpregs_struct" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_fpregs_struct)) + "Alignment of user_fpregs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(cwd) - ) + "Offset of field: user_fpregs_struct::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(swd) - ) + "Offset of field: user_fpregs_struct::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(twd) - ) + "Offset of field: user_fpregs_struct::twd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fip) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fip) - ) + "Offset of field: user_fpregs_struct::fip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fcs) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fcs) - ) + "Offset of field: user_fpregs_struct::fcs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(foo) - ) + "Offset of field: user_fpregs_struct::foo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fos) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fos) - ) + "Offset of field: user_fpregs_struct::fos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(st_space) - ) + "Offset of field: user_fpregs_struct::st_space" ); } #[repr(C)] @@ -7486,142 +5989,77 @@ fn bindgen_test_layout_user_fpxregs_struct() { assert_eq!( ::std::mem::size_of::(), 512usize, - concat!("Size of: ", stringify!(user_fpxregs_struct)) + "Size of user_fpxregs_struct" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_fpxregs_struct)) + "Alignment of user_fpxregs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(cwd) - ) + "Offset of field: user_fpxregs_struct::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(swd) - ) + "Offset of field: user_fpxregs_struct::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(twd) - ) + "Offset of field: user_fpxregs_struct::twd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fop) - ) + "Offset of field: user_fpxregs_struct::fop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fip) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fip) - ) + "Offset of field: user_fpxregs_struct::fip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fcs) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fcs) - ) + "Offset of field: user_fpxregs_struct::fcs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).foo) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(foo) - ) + "Offset of field: user_fpxregs_struct::foo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fos) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(fos) - ) + "Offset of field: user_fpxregs_struct::fos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(mxcsr) - ) + "Offset of field: user_fpxregs_struct::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(reserved) - ) + "Offset of field: user_fpxregs_struct::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(st_space) - ) + "Offset of field: user_fpxregs_struct::st_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(xmm_space) - ) + "Offset of field: user_fpxregs_struct::xmm_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 288usize, - concat!( - "Offset of field: ", - stringify!(user_fpxregs_struct), - "::", - stringify!(padding) - ) + "Offset of field: user_fpxregs_struct::padding" ); } #[repr(C)] @@ -7652,182 +6090,97 @@ fn bindgen_test_layout_user_regs_struct() { assert_eq!( ::std::mem::size_of::(), 68usize, - concat!("Size of: ", stringify!(user_regs_struct)) + "Size of user_regs_struct" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(user_regs_struct)) + "Alignment of user_regs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ebx) - ) + "Offset of field: user_regs_struct::ebx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ecx) - ) + "Offset of field: user_regs_struct::ecx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(edx) - ) + "Offset of field: user_regs_struct::edx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esi) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(esi) - ) + "Offset of field: user_regs_struct::esi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edi) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(edi) - ) + "Offset of field: user_regs_struct::edi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ebp) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ebp) - ) + "Offset of field: user_regs_struct::ebp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eax) - ) + "Offset of field: user_regs_struct::eax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xds) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xds) - ) + "Offset of field: user_regs_struct::xds" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xes) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xes) - ) + "Offset of field: user_regs_struct::xes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xfs) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xfs) - ) + "Offset of field: user_regs_struct::xfs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xgs) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xgs) - ) + "Offset of field: user_regs_struct::xgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).orig_eax) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(orig_eax) - ) + "Offset of field: user_regs_struct::orig_eax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eip) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eip) - ) + "Offset of field: user_regs_struct::eip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xcs) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xcs) - ) + "Offset of field: user_regs_struct::xcs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eflags) - ) + "Offset of field: user_regs_struct::eflags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esp) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(esp) - ) + "Offset of field: user_regs_struct::esp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xss) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(xss) - ) + "Offset of field: user_regs_struct::xss" ); } #[repr(C)] @@ -7853,165 +6206,82 @@ pub struct user { fn bindgen_test_layout_user() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 284usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(user)) - ); + assert_eq!(::std::mem::size_of::(), 284usize, "Size of user"); + assert_eq!(::std::mem::align_of::(), 4usize, "Alignment of user"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) + "Offset of field: user::regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) + "Offset of field: user::u_fpvalid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).i387) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(i387) - ) + "Offset of field: user::i387" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, 180usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) + "Offset of field: user::u_tsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) + "Offset of field: user::u_dsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, 188usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) + "Offset of field: user::u_ssize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) + "Offset of field: user::start_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, 196usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) + "Offset of field: user::start_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) + "Offset of field: user::signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) + "Offset of field: user::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, 208usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) + "Offset of field: user::u_ar0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fpstate) as usize - ptr as usize }, 212usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpstate) - ) + "Offset of field: user::u_fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 216usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) + "Offset of field: user::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, 220usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) + "Offset of field: user::u_comm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, 252usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) + "Offset of field: user::u_debugreg" ); } pub const REG_GS: _bindgen_ty_22 = 0; @@ -8050,32 +6320,22 @@ fn bindgen_test_layout__libc_fpreg() { assert_eq!( ::std::mem::size_of::<_libc_fpreg>(), 10usize, - concat!("Size of: ", stringify!(_libc_fpreg)) + "Size of _libc_fpreg" ); assert_eq!( ::std::mem::align_of::<_libc_fpreg>(), 2usize, - concat!("Alignment of ", stringify!(_libc_fpreg)) + "Alignment of _libc_fpreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpreg), - "::", - stringify!(significand) - ) + "Offset of field: _libc_fpreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpreg), - "::", - stringify!(exponent) - ) + "Offset of field: _libc_fpreg::exponent" ); } #[repr(C)] @@ -8098,102 +6358,57 @@ fn bindgen_test_layout__libc_fpstate() { assert_eq!( ::std::mem::size_of::<_libc_fpstate>(), 112usize, - concat!("Size of: ", stringify!(_libc_fpstate)) + "Size of _libc_fpstate" ); assert_eq!( ::std::mem::align_of::<_libc_fpstate>(), 4usize, - concat!("Alignment of ", stringify!(_libc_fpstate)) + "Alignment of _libc_fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cw) - ) + "Offset of field: _libc_fpstate::cw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(sw) - ) + "Offset of field: _libc_fpstate::sw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(tag) - ) + "Offset of field: _libc_fpstate::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(ipoff) - ) + "Offset of field: _libc_fpstate::ipoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cssel) - ) + "Offset of field: _libc_fpstate::cssel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(dataoff) - ) + "Offset of field: _libc_fpstate::dataoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(datasel) - ) + "Offset of field: _libc_fpstate::datasel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_st) - ) + "Offset of field: _libc_fpstate::_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 108usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(status) - ) + "Offset of field: _libc_fpstate::status" ); } pub type fpregset_t = *mut _libc_fpstate; @@ -8212,52 +6427,32 @@ fn bindgen_test_layout_mcontext_t() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(mcontext_t)) + "Size of mcontext_t" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(mcontext_t)) + "Alignment of mcontext_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(gregs) - ) + "Offset of field: mcontext_t::gregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(fpregs) - ) + "Offset of field: mcontext_t::fpregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(oldmask) - ) + "Offset of field: mcontext_t::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(cr2) - ) + "Offset of field: mcontext_t::cr2" ); } #[repr(C)] @@ -8290,38 +6485,22 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) + "Size of ucontext__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of ucontext__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) + "Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::uc_sigmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__padding_rt_sigset) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(__padding_rt_sigset) - ) + "Offset of field: ucontext__bindgen_ty_1__bindgen_ty_1::__padding_rt_sigset" ); } #[test] @@ -8332,22 +6511,17 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) + "Size of ucontext__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) + "Alignment of ucontext__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask64" ); } #[test] @@ -8357,62 +6531,37 @@ fn bindgen_test_layout_ucontext() { assert_eq!( ::std::mem::size_of::(), 228usize, - concat!("Size of: ", stringify!(ucontext)) + "Size of ucontext" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(ucontext)) + "Alignment of ucontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) + "Offset of field: ucontext::uc_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) + "Offset of field: ucontext::uc_link" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) + "Offset of field: ucontext::uc_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) + "Offset of field: ucontext::uc_mcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fpregs_mem) as usize - ptr as usize }, 116usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__fpregs_mem) - ) + "Offset of field: ucontext::__fpregs_mem" ); } pub type ucontext_t = ucontext; @@ -8621,25 +6770,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: fd_set::fds_bits" ); } extern "C" { @@ -8743,125 +6883,62 @@ pub struct tm { fn bindgen_test_layout_tm() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 44usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tm)) - ); + assert_eq!(::std::mem::size_of::(), 44usize, "Size of tm"); + assert_eq!(::std::mem::align_of::(), 4usize, "Alignment of tm"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) + "Offset of field: tm::tm_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) + "Offset of field: tm::tm_min" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) + "Offset of field: tm::tm_hour" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) + "Offset of field: tm::tm_mday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) + "Offset of field: tm::tm_mon" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) + "Offset of field: tm::tm_year" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) + "Offset of field: tm::tm_wday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) + "Offset of field: tm::tm_yday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) + "Offset of field: tm::tm_isdst" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) + "Offset of field: tm::tm_gmtoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) + "Offset of field: tm::tm_zone" ); } extern "C" { @@ -8894,12 +6971,18 @@ extern "C" { extern "C" { pub fn localtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timelocal(__tm: *mut tm) -> time_t; +} extern "C" { pub fn gmtime(__t: *const time_t) -> *mut tm; } extern "C" { pub fn gmtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timegm(__tm: *mut tm) -> time_t; +} extern "C" { pub fn strptime( __s: *const ::std::os::raw::c_char, @@ -8986,23 +7069,23 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn timer_gettime(__timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; + pub fn timer_gettime(_timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; } extern "C" { pub fn timer_getoverrun(__timer: timer_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn timelocal(__tm: *mut tm) -> time_t; -} -extern "C" { - pub fn timegm(__tm: *mut tm) -> time_t; -} extern "C" { pub fn timespec_get( __ts: *mut timespec, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn timespec_getres( + __ts: *mut timespec, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} pub type nfds_t = ::std::os::raw::c_uint; extern "C" { pub fn poll( @@ -9050,122 +7133,67 @@ fn bindgen_test_layout_clone_args() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(clone_args)) + "Size of clone_args" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(clone_args)) + "Alignment of clone_args" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(flags) - ) + "Offset of field: clone_args::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pidfd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(pidfd) - ) + "Offset of field: clone_args::pidfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).child_tid) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(child_tid) - ) + "Offset of field: clone_args::child_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent_tid) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(parent_tid) - ) + "Offset of field: clone_args::parent_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exit_signal) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(exit_signal) - ) + "Offset of field: clone_args::exit_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack) - ) + "Offset of field: clone_args::stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack_size) - ) + "Offset of field: clone_args::stack_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tls) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(tls) - ) + "Offset of field: clone_args::tls" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid) - ) + "Offset of field: clone_args::set_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid_size) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid_size) - ) + "Offset of field: clone_args::set_tid_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cgroup) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(cgroup) - ) + "Offset of field: clone_args::cgroup" ); } #[repr(C)] @@ -9180,22 +7208,17 @@ fn bindgen_test_layout_sched_param() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sched_param)) + "Size of sched_param" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sched_param)) + "Alignment of sched_param" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sched_param), - "::", - stringify!(sched_priority) - ) + "Offset of field: sched_param::sched_priority" ); } extern "C" { @@ -9236,13 +7259,12 @@ pub type _bindgen_ty_23 = ::std::os::raw::c_uint; pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_24 = 0; pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_24 = 1; pub type _bindgen_ty_24 = ::std::os::raw::c_uint; -pub type __pthread_cleanup_func_t = - ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cleanup_t { pub __cleanup_prev: *mut __pthread_cleanup_t, - pub __cleanup_routine: __pthread_cleanup_func_t, + pub __cleanup_routine: + ::std::option::Option, pub __cleanup_arg: *mut ::std::os::raw::c_void, } #[test] @@ -9252,48 +7274,33 @@ fn bindgen_test_layout___pthread_cleanup_t() { assert_eq!( ::std::mem::size_of::<__pthread_cleanup_t>(), 12usize, - concat!("Size of: ", stringify!(__pthread_cleanup_t)) + "Size of __pthread_cleanup_t" ); assert_eq!( ::std::mem::align_of::<__pthread_cleanup_t>(), 4usize, - concat!("Alignment of ", stringify!(__pthread_cleanup_t)) + "Alignment of __pthread_cleanup_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_prev) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_routine) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_routine) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_routine" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_arg) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_arg) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_arg" ); } extern "C" { pub fn __pthread_cleanup_push( c: *mut __pthread_cleanup_t, - arg1: __pthread_cleanup_func_t, + arg1: ::std::option::Option, arg2: *mut ::std::os::raw::c_void, ); } @@ -9320,42 +7327,27 @@ fn bindgen_test_layout_android_poll_source() { assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(android_poll_source)) + "Size of android_poll_source" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(android_poll_source)) + "Alignment of android_poll_source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(id) - ) + "Offset of field: android_poll_source::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).app) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(app) - ) + "Offset of field: android_poll_source::app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).process) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(process) - ) + "Offset of field: android_poll_source::process" ); } #[repr(C)] @@ -9381,72 +7373,42 @@ fn bindgen_test_layout_android_input_buffer() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(android_input_buffer)) + "Size of android_input_buffer" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(android_input_buffer)) + "Alignment of android_input_buffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEvents) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEvents) - ) + "Offset of field: android_input_buffer::motionEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsCount) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsCount) - ) + "Offset of field: android_input_buffer::motionEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsBufferSize) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsBufferSize) - ) + "Offset of field: android_input_buffer::motionEventsBufferSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEvents) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEvents) - ) + "Offset of field: android_input_buffer::keyEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsCount) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsCount) - ) + "Offset of field: android_input_buffer::keyEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsBufferSize) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsBufferSize) - ) + "Offset of field: android_input_buffer::keyEventsBufferSize" ); } #[doc = " Function pointer declaration for the filtering of key events.\n A function with this signature should be passed to\n android_app_set_key_event_filter and return false for any events that should\n not be handled by android_native_app_glue. These events will be handled by\n the system instead."] @@ -9476,6 +7438,10 @@ pub struct android_app { pub window: *mut ANativeWindow, #[doc = " Current content rectangle of the window; this is the area where the\n window's content should be placed to be seen by the user."] pub contentRect: ARect, + #[doc = " Whether the software keyboard is visible or not."] + pub softwareKeyboardVisible: bool, + #[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."] + pub editorAction: ::std::os::raw::c_int, #[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."] pub activityState: ::std::os::raw::c_int, #[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."] @@ -9509,313 +7475,173 @@ fn bindgen_test_layout_android_app() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 224usize, - concat!("Size of: ", stringify!(android_app)) + 232usize, + "Size of android_app" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(android_app)) + "Alignment of android_app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(userData) - ) + "Offset of field: android_app::userData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onAppCmd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(onAppCmd) - ) + "Offset of field: android_app::onAppCmd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activity) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activity) - ) + "Offset of field: android_app::activity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(config) - ) + "Offset of field: android_app::config" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedState) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedState) - ) + "Offset of field: android_app::savedState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedStateSize) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedStateSize) - ) + "Offset of field: android_app::savedStateSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).looper) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(looper) - ) + "Offset of field: android_app::looper" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(window) - ) + "Offset of field: android_app::window" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contentRect) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(contentRect) - ) + "Offset of field: android_app::contentRect" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).softwareKeyboardVisible) as usize - ptr as usize }, + 48usize, + "Offset of field: android_app::softwareKeyboardVisible" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).editorAction) as usize - ptr as usize }, + 52usize, + "Offset of field: android_app::editorAction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activityState) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activityState) - ) + 56usize, + "Offset of field: android_app::activityState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyRequested) as usize - ptr as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyRequested) - ) + 60usize, + "Offset of field: android_app::destroyRequested" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBuffers) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputBuffers) - ) + 64usize, + "Offset of field: android_app::inputBuffers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).currentInputBuffer) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(currentInputBuffer) - ) + 144usize, + "Offset of field: android_app::currentInputBuffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textInputState) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(textInputState) - ) + 148usize, + "Offset of field: android_app::textInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mutex) as usize - ptr as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(mutex) - ) + 152usize, + "Offset of field: android_app::mutex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cond) as usize - ptr as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cond) - ) + 156usize, + "Offset of field: android_app::cond" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgread) as usize - ptr as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgread) - ) + 160usize, + "Offset of field: android_app::msgread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgwrite) as usize - ptr as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgwrite) - ) + 164usize, + "Offset of field: android_app::msgwrite" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).thread) as usize - ptr as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(thread) - ) + 168usize, + "Offset of field: android_app::thread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmdPollSource) as usize - ptr as usize }, - 164usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cmdPollSource) - ) + 172usize, + "Offset of field: android_app::cmdPollSource" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(running) - ) + 184usize, + "Offset of field: android_app::running" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSaved) as usize - ptr as usize }, - 180usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(stateSaved) - ) + 188usize, + "Offset of field: android_app::stateSaved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyed) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyed) - ) + 192usize, + "Offset of field: android_app::destroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).redrawNeeded) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(redrawNeeded) - ) + 196usize, + "Offset of field: android_app::redrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingWindow) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingWindow) - ) + 200usize, + "Offset of field: android_app::pendingWindow" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingContentRect) as usize - ptr as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingContentRect) - ) + 204usize, + "Offset of field: android_app::pendingContentRect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventFilter) as usize - ptr as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(keyEventFilter) - ) + 220usize, + "Offset of field: android_app::keyEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventFilter) as usize - ptr as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(motionEventFilter) - ) + 224usize, + "Offset of field: android_app::motionEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputAvailableWakeUp) as usize - ptr as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputAvailableWakeUp) - ) + 228usize, + "Offset of field: android_app::inputAvailableWakeUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputSwapPending) as usize - ptr as usize }, - 221usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputSwapPending) - ) + 229usize, + "Offset of field: android_app::inputSwapPending" ); } #[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."] @@ -9825,7 +7651,7 @@ pub const NativeAppGlueLooperId_LOOPER_ID_INPUT: NativeAppGlueLooperId = 2; #[doc = " Start of user-defined ALooper identifiers."] pub const NativeAppGlueLooperId_LOOPER_ID_USER: NativeAppGlueLooperId = 3; #[doc = " Looper ID of commands coming from the app's main thread, an AInputQueue or\n user-defined sources."] -pub type NativeAppGlueLooperId = ::std::os::raw::c_uint; +pub type NativeAppGlueLooperId = i8; #[doc = " Unused. Reserved for future use when usage of AInputQueue will be\n supported."] pub const NativeAppGlueAppCmd_UNUSED_APP_CMD_INPUT_CHANGED: NativeAppGlueAppCmd = 0; #[doc = " Command from main thread: a new ANativeWindow is ready for use. Upon\n receiving this command, android_app->window will contain the new window\n surface."] @@ -9838,30 +7664,32 @@ pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_RESIZED: NativeAppGlueAppCmd = 3; pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_REDRAW_NEEDED: NativeAppGlueAppCmd = 4; #[doc = " Command from main thread: the content area of the window has changed,\n such as from the soft input window being shown or hidden. You can\n find the new content rect in android_app::contentRect."] pub const NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED: NativeAppGlueAppCmd = 5; +#[doc = " Command from main thread: the software keyboard was shown or hidden."] +pub const NativeAppGlueAppCmd_APP_CMD_SOFTWARE_KB_VIS_CHANGED: NativeAppGlueAppCmd = 6; #[doc = " Command from main thread: the app's activity window has gained\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 6; +pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 7; #[doc = " Command from main thread: the app's activity window has lost\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 7; +pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 8; #[doc = " Command from main thread: the current device configuration has changed."] -pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 8; +pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 9; #[doc = " Command from main thread: the system is running low on memory.\n Try to reduce your memory use."] -pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 9; +pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 10; #[doc = " Command from main thread: the app's activity has been started."] -pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 10; +pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 11; #[doc = " Command from main thread: the app's activity has been resumed."] -pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 11; +pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 12; #[doc = " Command from main thread: the app should generate a new saved state\n for itself, to restore from later if needed. If you have saved state,\n allocate it with malloc and place it in android_app.savedState with\n the size in android_app.savedStateSize. The will be freed for you\n later."] -pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 12; +pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 13; #[doc = " Command from main thread: the app's activity has been paused."] -pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 13; +pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 14; #[doc = " Command from main thread: the app's activity has been stopped."] -pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 14; +pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 15; #[doc = " Command from main thread: the app's activity is being destroyed,\n and waiting for the app thread to clean up and exit before proceeding."] -pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 15; +pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 16; #[doc = " Command from main thread: the app's insets have changed."] -pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 16; -#[doc = " Commands passed from the application's main Java thread to the game's thread."] -pub type NativeAppGlueAppCmd = ::std::os::raw::c_uint; +pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 17; +#[doc = " Commands passed from the application's main Java thread to the game's thread.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] +pub type NativeAppGlueAppCmd = i8; extern "C" { #[doc = " Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next\n app command message."] pub fn android_app_read_cmd(android_app: *mut android_app) -> i8; @@ -9906,6 +7734,10 @@ extern "C" { filter: android_motion_event_filter, ); } +extern "C" { + #[doc = " You can send your custom events using the function below.\n\n Make sure your custom codes do not overlap with this library's ones.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] + pub fn android_app_write_cmd(android_app: *mut android_app, cmd: i8); +} extern "C" { #[doc = " Determines if a looper wake up was due to new input becoming available"] pub fn android_app_input_available_wake_up(app: *mut android_app) -> bool; diff --git a/android-activity/src/game_activity/ffi_x86_64.rs b/android-activity/src/game_activity/ffi_x86_64.rs index 1e9d92a..f8ac155 100644 --- a/android-activity/src/game_activity/ffi_x86_64.rs +++ b/android-activity/src/game_activity/ffi_x86_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const __BIONIC__: u32 = 1; pub const __WORDSIZE: u32 = 64; @@ -24,11 +24,12 @@ pub const __ANDROID_API_R__: u32 = 30; pub const __ANDROID_API_S__: u32 = 31; pub const __ANDROID_API_T__: u32 = 33; pub const __ANDROID_API_U__: u32 = 34; +pub const __ANDROID_API_V__: u32 = 35; pub const __ANDROID_NDK__: u32 = 1; -pub const __NDK_MAJOR__: u32 = 25; -pub const __NDK_MINOR__: u32 = 2; +pub const __NDK_MAJOR__: u32 = 26; +pub const __NDK_MINOR__: u32 = 1; pub const __NDK_BETA__: u32 = 0; -pub const __NDK_BUILD__: u32 = 9519653; +pub const __NDK_BUILD__: u32 = 10909125; pub const __NDK_CANARY__: u32 = 0; pub const INT8_MIN: i32 = -128; pub const INT8_MAX: u32 = 127; @@ -60,11 +61,10 @@ pub const WINT_MAX: u32 = 4294967295; pub const WINT_MIN: u32 = 0; pub const __BITS_PER_LONG: u32 = 64; pub const __FD_SETSIZE: u32 = 1024; -pub const __GNUC_VA_LIST: u32 = 1; pub const AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT: u32 = 8; +pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; pub const __PRI_64_prefix: &[u8; 2] = b"l\0"; pub const __PRI_PTR_prefix: &[u8; 2] = b"l\0"; pub const __PRI_FAST_prefix: &[u8; 2] = b"l\0"; @@ -96,6 +96,34 @@ pub const PRIiFAST32: &[u8; 3] = b"li\0"; pub const PRIiFAST64: &[u8; 3] = b"li\0"; pub const PRIiMAX: &[u8; 3] = b"ji\0"; pub const PRIiPTR: &[u8; 3] = b"li\0"; +pub const PRIb8: &[u8; 2] = b"b\0"; +pub const PRIb16: &[u8; 2] = b"b\0"; +pub const PRIb32: &[u8; 2] = b"b\0"; +pub const PRIb64: &[u8; 3] = b"lb\0"; +pub const PRIbLEAST8: &[u8; 2] = b"b\0"; +pub const PRIbLEAST16: &[u8; 2] = b"b\0"; +pub const PRIbLEAST32: &[u8; 2] = b"b\0"; +pub const PRIbLEAST64: &[u8; 3] = b"lb\0"; +pub const PRIbFAST8: &[u8; 2] = b"b\0"; +pub const PRIbFAST16: &[u8; 3] = b"lb\0"; +pub const PRIbFAST32: &[u8; 3] = b"lb\0"; +pub const PRIbFAST64: &[u8; 3] = b"lb\0"; +pub const PRIbMAX: &[u8; 3] = b"jb\0"; +pub const PRIbPTR: &[u8; 3] = b"lb\0"; +pub const PRIB8: &[u8; 2] = b"B\0"; +pub const PRIB16: &[u8; 2] = b"B\0"; +pub const PRIB32: &[u8; 2] = b"B\0"; +pub const PRIB64: &[u8; 3] = b"lB\0"; +pub const PRIBLEAST8: &[u8; 2] = b"B\0"; +pub const PRIBLEAST16: &[u8; 2] = b"B\0"; +pub const PRIBLEAST32: &[u8; 2] = b"B\0"; +pub const PRIBLEAST64: &[u8; 3] = b"lB\0"; +pub const PRIBFAST8: &[u8; 2] = b"B\0"; +pub const PRIBFAST16: &[u8; 3] = b"lB\0"; +pub const PRIBFAST32: &[u8; 3] = b"lB\0"; +pub const PRIBFAST64: &[u8; 3] = b"lB\0"; +pub const PRIBMAX: &[u8; 3] = b"jB\0"; +pub const PRIBPTR: &[u8; 3] = b"lB\0"; pub const PRIo8: &[u8; 2] = b"o\0"; pub const PRIo16: &[u8; 2] = b"o\0"; pub const PRIo32: &[u8; 2] = b"o\0"; @@ -180,6 +208,34 @@ pub const SCNiFAST32: &[u8; 3] = b"li\0"; pub const SCNiFAST64: &[u8; 3] = b"li\0"; pub const SCNiMAX: &[u8; 3] = b"ji\0"; pub const SCNiPTR: &[u8; 3] = b"li\0"; +pub const SCNb8: &[u8; 4] = b"hhb\0"; +pub const SCNb16: &[u8; 3] = b"hb\0"; +pub const SCNb32: &[u8; 2] = b"b\0"; +pub const SCNb64: &[u8; 3] = b"lb\0"; +pub const SCNbLEAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbLEAST16: &[u8; 3] = b"hb\0"; +pub const SCNbLEAST32: &[u8; 2] = b"b\0"; +pub const SCNbLEAST64: &[u8; 3] = b"lb\0"; +pub const SCNbFAST8: &[u8; 4] = b"hhb\0"; +pub const SCNbFAST16: &[u8; 3] = b"lb\0"; +pub const SCNbFAST32: &[u8; 3] = b"lb\0"; +pub const SCNbFAST64: &[u8; 3] = b"lb\0"; +pub const SCNbMAX: &[u8; 3] = b"jb\0"; +pub const SCNbPTR: &[u8; 3] = b"lb\0"; +pub const SCNB8: &[u8; 4] = b"hhB\0"; +pub const SCNB16: &[u8; 3] = b"hB\0"; +pub const SCNB32: &[u8; 2] = b"B\0"; +pub const SCNB64: &[u8; 3] = b"lB\0"; +pub const SCNBLEAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBLEAST16: &[u8; 3] = b"hB\0"; +pub const SCNBLEAST32: &[u8; 2] = b"B\0"; +pub const SCNBLEAST64: &[u8; 3] = b"lB\0"; +pub const SCNBFAST8: &[u8; 4] = b"hhB\0"; +pub const SCNBFAST16: &[u8; 3] = b"lB\0"; +pub const SCNBFAST32: &[u8; 3] = b"lB\0"; +pub const SCNBFAST64: &[u8; 3] = b"lB\0"; +pub const SCNBMAX: &[u8; 3] = b"jB\0"; +pub const SCNBPTR: &[u8; 3] = b"lB\0"; pub const SCNo8: &[u8; 4] = b"hho\0"; pub const SCNo16: &[u8; 3] = b"ho\0"; pub const SCNo32: &[u8; 2] = b"o\0"; @@ -224,12 +280,12 @@ pub const SCNxMAX: &[u8; 3] = b"jx\0"; pub const SCNxPTR: &[u8; 3] = b"lx\0"; pub const GAME_ACTIVITY_POINTER_INFO_AXIS_COUNT: u32 = 48; pub const GAMEACTIVITY_MAX_NUM_POINTERS_IN_MOTION_EVENT: u32 = 8; -pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 2; +pub const GAMETEXTINPUT_MAJOR_VERSION: u32 = 4; pub const GAMETEXTINPUT_MINOR_VERSION: u32 = 0; pub const GAMETEXTINPUT_BUGFIX_VERSION: u32 = 0; -pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 2; +pub const GAMEACTIVITY_MAJOR_VERSION: u32 = 4; pub const GAMEACTIVITY_MINOR_VERSION: u32 = 0; -pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 2; +pub const GAMEACTIVITY_BUGFIX_VERSION: u32 = 0; pub const POLLIN: u32 = 1; pub const POLLPRI: u32 = 2; pub const POLLOUT: u32 = 4; @@ -552,6 +608,7 @@ pub const TRAP_HWBKPT: u32 = 4; pub const TRAP_UNK: u32 = 5; pub const TRAP_PERF: u32 = 6; pub const NSIGTRAP: u32 = 6; +pub const TRAP_PERF_FLAG_ASYNC: u32 = 1; pub const CLD_EXITED: u32 = 1; pub const CLD_KILLED: u32 = 2; pub const CLD_DUMPED: u32 = 3; @@ -588,6 +645,9 @@ pub const PAGE_MASK: i32 = -4096; pub const FD_SETSIZE: u32 = 1024; pub const CLOCKS_PER_SEC: u32 = 1000000; pub const TIME_UTC: u32 = 1; +pub const TIME_MONOTONIC: u32 = 2; +pub const TIME_ACTIVE: u32 = 3; +pub const TIME_THREAD_ACTIVE: u32 = 4; pub const CSIGNAL: u32 = 255; pub const CLONE_VM: u32 = 256; pub const CLONE_FS: u32 = 512; @@ -673,32 +733,22 @@ fn bindgen_test_layout_max_align_t() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(max_align_t)) + "Size of max_align_t" ); assert_eq!( ::std::mem::align_of::(), 16usize, - concat!("Alignment of ", stringify!(max_align_t)) + "Alignment of max_align_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce1) - ) + "Offset of field: max_align_t::__clang_max_align_nonce1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(max_align_t), - "::", - stringify!(__clang_max_align_nonce2) - ) + "Offset of field: max_align_t::__clang_max_align_nonce2" ); } pub type __int8_t = ::std::os::raw::c_schar; @@ -749,22 +799,17 @@ fn bindgen_test_layout___kernel_fd_set() { assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, - concat!("Size of: ", stringify!(__kernel_fd_set)) + "Size of __kernel_fd_set" ); assert_eq!( ::std::mem::align_of::<__kernel_fd_set>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_fd_set)) + "Alignment of __kernel_fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: __kernel_fd_set::fds_bits" ); } pub type __kernel_sighandler_t = @@ -801,22 +846,17 @@ fn bindgen_test_layout___kernel_fsid_t() { assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, - concat!("Size of: ", stringify!(__kernel_fsid_t)) + "Size of __kernel_fsid_t" ); assert_eq!( ::std::mem::align_of::<__kernel_fsid_t>(), 4usize, - concat!("Alignment of ", stringify!(__kernel_fsid_t)) + "Alignment of __kernel_fsid_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_fsid_t), - "::", - stringify!(val) - ) + "Offset of field: __kernel_fsid_t::val" ); } pub type __kernel_off_t = __kernel_long_t; @@ -1184,6 +1224,22 @@ pub const AKEYCODE_REFRESH: _bindgen_ty_2 = 285; pub const AKEYCODE_THUMBS_UP: _bindgen_ty_2 = 286; pub const AKEYCODE_THUMBS_DOWN: _bindgen_ty_2 = 287; pub const AKEYCODE_PROFILE_SWITCH: _bindgen_ty_2 = 288; +pub const AKEYCODE_VIDEO_APP_1: _bindgen_ty_2 = 289; +pub const AKEYCODE_VIDEO_APP_2: _bindgen_ty_2 = 290; +pub const AKEYCODE_VIDEO_APP_3: _bindgen_ty_2 = 291; +pub const AKEYCODE_VIDEO_APP_4: _bindgen_ty_2 = 292; +pub const AKEYCODE_VIDEO_APP_5: _bindgen_ty_2 = 293; +pub const AKEYCODE_VIDEO_APP_6: _bindgen_ty_2 = 294; +pub const AKEYCODE_VIDEO_APP_7: _bindgen_ty_2 = 295; +pub const AKEYCODE_VIDEO_APP_8: _bindgen_ty_2 = 296; +pub const AKEYCODE_FEATURED_APP_1: _bindgen_ty_2 = 297; +pub const AKEYCODE_FEATURED_APP_2: _bindgen_ty_2 = 298; +pub const AKEYCODE_FEATURED_APP_3: _bindgen_ty_2 = 299; +pub const AKEYCODE_FEATURED_APP_4: _bindgen_ty_2 = 300; +pub const AKEYCODE_DEMO_APP_1: _bindgen_ty_2 = 301; +pub const AKEYCODE_DEMO_APP_2: _bindgen_ty_2 = 302; +pub const AKEYCODE_DEMO_APP_3: _bindgen_ty_2 = 303; +pub const AKEYCODE_DEMO_APP_4: _bindgen_ty_2 = 304; pub type _bindgen_ty_2 = ::std::os::raw::c_uint; pub const ALOOPER_PREPARE_ALLOW_NON_CALLBACKS: _bindgen_ty_3 = 1; pub type _bindgen_ty_3 = ::std::os::raw::c_uint; @@ -1198,8 +1254,8 @@ pub const ALOOPER_EVENT_ERROR: _bindgen_ty_5 = 4; pub const ALOOPER_EVENT_HANGUP: _bindgen_ty_5 = 8; pub const ALOOPER_EVENT_INVALID: _bindgen_ty_5 = 16; pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -pub type va_list = __builtin_va_list; pub type __gnuc_va_list = __builtin_va_list; +pub type va_list = __builtin_va_list; #[repr(C)] pub struct JavaVMAttachArgs { pub version: jint, @@ -1213,42 +1269,27 @@ fn bindgen_test_layout_JavaVMAttachArgs() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(JavaVMAttachArgs)) + "Size of JavaVMAttachArgs" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMAttachArgs)) + "Alignment of JavaVMAttachArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMAttachArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(name) - ) + "Offset of field: JavaVMAttachArgs::name" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMAttachArgs), - "::", - stringify!(group) - ) + "Offset of field: JavaVMAttachArgs::group" ); } #[repr(C)] @@ -1264,32 +1305,22 @@ fn bindgen_test_layout_JavaVMOption() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(JavaVMOption)) + "Size of JavaVMOption" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMOption)) + "Alignment of JavaVMOption" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).optionString) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(optionString) - ) + "Offset of field: JavaVMOption::optionString" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extraInfo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMOption), - "::", - stringify!(extraInfo) - ) + "Offset of field: JavaVMOption::extraInfo" ); } #[repr(C)] @@ -1306,52 +1337,32 @@ fn bindgen_test_layout_JavaVMInitArgs() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(JavaVMInitArgs)) + "Size of JavaVMInitArgs" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(JavaVMInitArgs)) + "Alignment of JavaVMInitArgs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(version) - ) + "Offset of field: JavaVMInitArgs::version" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nOptions) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(nOptions) - ) + "Offset of field: JavaVMInitArgs::nOptions" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(options) - ) + "Offset of field: JavaVMInitArgs::options" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ignoreUnrecognized) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(JavaVMInitArgs), - "::", - stringify!(ignoreUnrecognized) - ) + "Offset of field: JavaVMInitArgs::ignoreUnrecognized" ); } pub const AKEY_STATE_UNKNOWN: _bindgen_ty_6 = -1; @@ -1821,32 +1832,22 @@ fn bindgen_test_layout_imaxdiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) + "Size of imaxdiv_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) + "Alignment of imaxdiv_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) + "Offset of field: imaxdiv_t::quot" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) + "Offset of field: imaxdiv_t::rem" ); } extern "C" { @@ -1951,6 +1952,10 @@ pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_S8_UINT: AHardwareBuffer pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420: AHardwareBuffer_Format = 35; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_YCbCr_P010: AHardwareBuffer_Format = 54; pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R8_UNORM: AHardwareBuffer_Format = 56; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16_UINT: AHardwareBuffer_Format = 57; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R16G16_UINT: AHardwareBuffer_Format = 58; +pub const AHardwareBuffer_Format_AHARDWAREBUFFER_FORMAT_R10G10B10A10_UNORM: AHardwareBuffer_Format = + 59; pub type AHardwareBuffer_Format = ::std::os::raw::c_uint; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_CPU_READ_NEVER: AHardwareBuffer_UsageFlags = 0; @@ -1988,6 +1993,8 @@ pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_CUBE_MAP: AHardwareBuffer_UsageFlags = 33554432; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE: AHardwareBuffer_UsageFlags = 67108864; +pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_FRONT_BUFFER: + AHardwareBuffer_UsageFlags = 4294967296; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_0: AHardwareBuffer_UsageFlags = 268435456; pub const AHardwareBuffer_UsageFlags_AHARDWAREBUFFER_USAGE_VENDOR_1: AHardwareBuffer_UsageFlags = @@ -2048,92 +2055,52 @@ fn bindgen_test_layout_AHardwareBuffer_Desc() { assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Desc)) + "Size of AHardwareBuffer_Desc" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Desc)) + "Alignment of AHardwareBuffer_Desc" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(width) - ) + "Offset of field: AHardwareBuffer_Desc::width" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(height) - ) + "Offset of field: AHardwareBuffer_Desc::height" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layers) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(layers) - ) + "Offset of field: AHardwareBuffer_Desc::layers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(format) - ) + "Offset of field: AHardwareBuffer_Desc::format" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(usage) - ) + "Offset of field: AHardwareBuffer_Desc::usage" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stride) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(stride) - ) + "Offset of field: AHardwareBuffer_Desc::stride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu0) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu0) - ) + "Offset of field: AHardwareBuffer_Desc::rfu0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rfu1) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Desc), - "::", - stringify!(rfu1) - ) + "Offset of field: AHardwareBuffer_Desc::rfu1" ); } #[repr(C)] @@ -2151,42 +2118,27 @@ fn bindgen_test_layout_AHardwareBuffer_Plane() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Plane)) + "Size of AHardwareBuffer_Plane" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Plane)) + "Alignment of AHardwareBuffer_Plane" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(data) - ) + "Offset of field: AHardwareBuffer_Plane::data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pixelStride) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(pixelStride) - ) + "Offset of field: AHardwareBuffer_Plane::pixelStride" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rowStride) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Plane), - "::", - stringify!(rowStride) - ) + "Offset of field: AHardwareBuffer_Plane::rowStride" ); } #[repr(C)] @@ -2203,32 +2155,22 @@ fn bindgen_test_layout_AHardwareBuffer_Planes() { assert_eq!( ::std::mem::size_of::(), 72usize, - concat!("Size of: ", stringify!(AHardwareBuffer_Planes)) + "Size of AHardwareBuffer_Planes" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(AHardwareBuffer_Planes)) + "Alignment of AHardwareBuffer_Planes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planeCount) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planeCount) - ) + "Offset of field: AHardwareBuffer_Planes::planeCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(AHardwareBuffer_Planes), - "::", - stringify!(planes) - ) + "Offset of field: AHardwareBuffer_Planes::planes" ); } #[repr(C)] @@ -2328,62 +2270,37 @@ fn bindgen_test_layout_GameActivityPointerAxes() { assert_eq!( ::std::mem::size_of::(), 208usize, - concat!("Size of: ", stringify!(GameActivityPointerAxes)) + "Size of GameActivityPointerAxes" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameActivityPointerAxes)) + "Alignment of GameActivityPointerAxes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(id) - ) + "Offset of field: GameActivityPointerAxes::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).toolType) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(toolType) - ) + "Offset of field: GameActivityPointerAxes::toolType" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).axisValues) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(axisValues) - ) + "Offset of field: GameActivityPointerAxes::axisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawX) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawX) - ) + "Offset of field: GameActivityPointerAxes::rawX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rawY) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(GameActivityPointerAxes), - "::", - stringify!(rawY) - ) + "Offset of field: GameActivityPointerAxes::rawY" ); } extern "C" { @@ -2433,202 +2350,107 @@ fn bindgen_test_layout_GameActivityMotionEvent() { assert_eq!( ::std::mem::size_of::(), 1760usize, - concat!("Size of: ", stringify!(GameActivityMotionEvent)) + "Size of GameActivityMotionEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityMotionEvent)) + "Alignment of GameActivityMotionEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityMotionEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityMotionEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityMotionEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityMotionEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityMotionEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityMotionEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityMotionEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).actionButton) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(actionButton) - ) + "Offset of field: GameActivityMotionEvent::actionButton" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buttonState) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(buttonState) - ) + "Offset of field: GameActivityMotionEvent::buttonState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).classification) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(classification) - ) + "Offset of field: GameActivityMotionEvent::classification" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).edgeFlags) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(edgeFlags) - ) + "Offset of field: GameActivityMotionEvent::edgeFlags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointerCount) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointerCount) - ) + "Offset of field: GameActivityMotionEvent::pointerCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pointers) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(pointers) - ) + "Offset of field: GameActivityMotionEvent::pointers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historySize) as usize - ptr as usize }, 1724usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historySize) - ) + "Offset of field: GameActivityMotionEvent::historySize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesMillis) as usize - ptr as usize }, 1728usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesMillis) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesMillis" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalEventTimesNanos) as usize - ptr as usize }, 1736usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalEventTimesNanos) - ) + "Offset of field: GameActivityMotionEvent::historicalEventTimesNanos" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).historicalAxisValues) as usize - ptr as usize }, 1744usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(historicalAxisValues) - ) + "Offset of field: GameActivityMotionEvent::historicalAxisValues" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionX) as usize - ptr as usize }, 1752usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionX) - ) + "Offset of field: GameActivityMotionEvent::precisionX" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).precisionY) as usize - ptr as usize }, 1756usize, - concat!( - "Offset of field: ", - stringify!(GameActivityMotionEvent), - "::", - stringify!(precisionY) - ) + "Offset of field: GameActivityMotionEvent::precisionY" ); } extern "C" { @@ -2643,14 +2465,6 @@ extern "C" { #[doc = " \\brief Handle the freeing of the GameActivityMotionEvent struct."] pub fn GameActivityMotionEvent_destroy(c_event: *mut GameActivityMotionEvent); } -extern "C" { - #[doc = " \\brief Convert a Java `MotionEvent` to a `GameActivityMotionEvent`.\n\n This is done automatically by the GameActivity: see `onTouchEvent` to set\n a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityMotionEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityMotionEvent, - ); -} #[doc = " \\brief Describe a key event that happened on the GameActivity SurfaceView.\n\n This is 1:1 mapping to the information contained in a Java `KeyEvent`\n (see https://developer.android.com/reference/android/view/KeyEvent).\n The only exception is the event times, which are reported as\n nanoseconds in this struct."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2674,146 +2488,69 @@ fn bindgen_test_layout_GameActivityKeyEvent() { assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(GameActivityKeyEvent)) + "Size of GameActivityKeyEvent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityKeyEvent)) + "Alignment of GameActivityKeyEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceId) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(deviceId) - ) + "Offset of field: GameActivityKeyEvent::deviceId" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(source) - ) + "Offset of field: GameActivityKeyEvent::source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(action) - ) + "Offset of field: GameActivityKeyEvent::action" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eventTime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(eventTime) - ) + "Offset of field: GameActivityKeyEvent::eventTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).downTime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(downTime) - ) + "Offset of field: GameActivityKeyEvent::downTime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(flags) - ) + "Offset of field: GameActivityKeyEvent::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).metaState) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(metaState) - ) + "Offset of field: GameActivityKeyEvent::metaState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).modifiers) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(modifiers) - ) + "Offset of field: GameActivityKeyEvent::modifiers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).repeatCount) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(repeatCount) - ) + "Offset of field: GameActivityKeyEvent::repeatCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyCode) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(keyCode) - ) + "Offset of field: GameActivityKeyEvent::keyCode" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scanCode) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(GameActivityKeyEvent), - "::", - stringify!(scanCode) - ) + "Offset of field: GameActivityKeyEvent::scanCode" ); } -extern "C" { - #[doc = " \\brief Convert a Java `KeyEvent` to a `GameActivityKeyEvent`.\n\n This is done automatically by the GameActivity: see `onKeyUp` and `onKeyDown`\n to set a callback to consume the received events.\n This function can be used if you re-implement events handling in your own\n activity.\n Ownership of out_event is maintained by the caller."] - pub fn GameActivityKeyEvent_fromJava( - env: *mut JNIEnv, - motionEvent: jobject, - out_event: *mut GameActivityKeyEvent, - ); -} -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: - GameCommonInsetsType = 3; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; -pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; -#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] -pub type GameCommonInsetsType = ::std::os::raw::c_uint; #[doc = " This struct holds a span within a region of text from start (inclusive) to\n end (exclusive). An empty span or cursor position is specified with\n start==end. An undefined span is specified with start = end = SPAN_UNDEFINED."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2830,37 +2567,27 @@ fn bindgen_test_layout_GameTextInputSpan() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(GameTextInputSpan)) + "Size of GameTextInputSpan" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(GameTextInputSpan)) + "Alignment of GameTextInputSpan" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(start) - ) + "Offset of field: GameTextInputSpan::start" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputSpan), - "::", - stringify!(end) - ) + "Offset of field: GameTextInputSpan::end" ); } pub const GameTextInputSpanFlag_SPAN_UNDEFINED: GameTextInputSpanFlag = -1; #[doc = " Values with special meaning in a GameTextInputSpan."] -pub type GameTextInputSpanFlag = ::std::os::raw::c_int; +pub type GameTextInputSpanFlag = i32; #[doc = " This struct holds the state of an editable section of text.\n The text can have a selection and a composing region defined on it.\n A composing region is used by IMEs that allow input using multiple steps to\n compose a glyph or word. Use functions GameTextInput_getState and\n GameTextInput_setState to read and modify the state that an IME is editing."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2881,52 +2608,32 @@ fn bindgen_test_layout_GameTextInputState() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(GameTextInputState)) + "Size of GameTextInputState" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameTextInputState)) + "Alignment of GameTextInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_UTF8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_UTF8) - ) + "Offset of field: GameTextInputState::text_UTF8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).text_length) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(text_length) - ) + "Offset of field: GameTextInputState::text_length" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).selection) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(selection) - ) + "Offset of field: GameTextInputState::selection" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).composingRegion) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(GameTextInputState), - "::", - stringify!(composingRegion) - ) + "Offset of field: GameTextInputState::composingRegion" ); } #[doc = " A callback called by GameTextInput_getState.\n @param context User-defined context.\n @param state State, owned by the library, that will be valid for the duration\n of the callback."] @@ -2958,7 +2665,7 @@ pub const ShowImeFlags_SHOW_IME_UNDEFINED: ShowImeFlags = 0; pub const ShowImeFlags_SHOW_IMPLICIT: ShowImeFlags = 1; pub const ShowImeFlags_SHOW_FORCED: ShowImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_showIme."] -pub type ShowImeFlags = ::std::os::raw::c_uint; +pub type ShowImeFlags = u32; extern "C" { #[doc = " Show the IME. Calls InputMethodManager.showSoftInput().\n @param input A valid GameTextInput library handle.\n @param flags Defined in ShowImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_showIme(input: *mut GameTextInput, flags: u32); @@ -2967,9 +2674,9 @@ pub const HideImeFlags_HIDE_IME_UNDEFINED: HideImeFlags = 0; pub const HideImeFlags_HIDE_IMPLICIT_ONLY: HideImeFlags = 1; pub const HideImeFlags_HIDE_NOT_ALWAYS: HideImeFlags = 2; #[doc = " Flags to be passed to GameTextInput_hideIme."] -pub type HideImeFlags = ::std::os::raw::c_uint; +pub type HideImeFlags = u32; extern "C" { - #[doc = " Show the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] + #[doc = " Hide the IME. Calls InputMethodManager.hideSoftInputFromWindow().\n @param input A valid GameTextInput library handle.\n @param flags Defined in HideImeFlags above. For more information see:\n https://developer.android.com/reference/android/view/inputmethod/InputMethodManager"] pub fn GameTextInput_hideIme(input: *mut GameTextInput, flags: u32); } extern "C" { @@ -2996,7 +2703,7 @@ pub type GameTextInputEventCallback = ::std::option::Option< ), >; extern "C" { - #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback."] + #[doc = " Optionally set a callback to be called whenever the IME state changes.\n Not necessary if you are using GameActivity, which handles these callbacks\n for you.\n @param input A valid GameTextInput library handle.\n @param callback Called by the library when the IME state changes.\n @param context Context passed as first argument to the callback.\n This function is deprecated. Don't perform any complex processing inside\n the callback other than copying the state variable. Using any synchronization\n primitives inside this callback may cause a deadlock."] pub fn GameTextInput_setEventCallback( input: *mut GameTextInput, callback: GameTextInputEventCallback, @@ -3039,6 +2746,144 @@ extern "C" { context: *mut ::std::os::raw::c_void, ); } +#[doc = " Mask of bits that determine the overall class\n of text being given. Currently supported classes are:\n {@link #TYPE_CLASS_TEXT}, {@link #TYPE_CLASS_NUMBER},\n {@link #TYPE_CLASS_PHONE}, {@link #TYPE_CLASS_DATETIME}.\n

IME authors: If the class is not one you\n understand, assume {@link #TYPE_CLASS_TEXT} with NO variation\n or flags.

"] +pub const GameTextInputType_TYPE_MASK_CLASS: GameTextInputType = 15; +#[doc = " Mask of bits that determine the variation of\n the base content class."] +pub const GameTextInputType_TYPE_MASK_VARIATION: GameTextInputType = 4080; +#[doc = " Mask of bits that provide addition bit flags\n of options."] +pub const GameTextInputType_TYPE_MASK_FLAGS: GameTextInputType = 16773120; +#[doc = " Special content type for when no explicit type has been specified.\n This should be interpreted to mean that the target input connection\n is not rich, it can not process and show things like candidate text nor\n retrieve the current text, so the input method will need to run in a\n limited \"generate key events\" mode, if it supports it. Note that some\n input methods may not support it, for example a voice-based input\n method will likely not be able to generate key events even if this\n flag is set."] +pub const GameTextInputType_TYPE_NULL: GameTextInputType = 0; +#[doc = " Class for normal text. This class supports the following flags (only\n one of which should be set):\n {@link #TYPE_TEXT_FLAG_CAP_CHARACTERS},\n {@link #TYPE_TEXT_FLAG_CAP_WORDS}, and.\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. It also supports the\n following variations:\n {@link #TYPE_TEXT_VARIATION_NORMAL}, and\n {@link #TYPE_TEXT_VARIATION_URI}. If you do not recognize the\n variation, normal should be assumed."] +pub const GameTextInputType_TYPE_CLASS_TEXT: GameTextInputType = 1; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize all characters. Overrides\n {@link #TYPE_TEXT_FLAG_CAP_WORDS} and\n {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_CHARACTERS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_CHARACTERS: GameTextInputType = 4096; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n every word. Overrides {@link #TYPE_TEXT_FLAG_CAP_SENTENCES}. This\n value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_WORDS}. Of course,\n this only affects languages where there are upper-case and lower-case\n letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_WORDS: GameTextInputType = 8192; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: capitalize the first character of\n each sentence. This value is explicitly defined\n to be the same as {@link TextUtils#CAP_MODE_SENTENCES}. For example\n in English it means to capitalize after a period and a space (note that\n other languages may have different characters for period, or not use\n spaces, or use different grammatical rules). Of course, this only affects\n languages where there are upper-case and lower-case letters."] +pub const GameTextInputType_TYPE_TEXT_FLAG_CAP_SENTENCES: GameTextInputType = 16384; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the user is entering free-form\n text that should have auto-correction applied to it. Without this flag,\n the IME will not try to correct typos. You should always set this flag\n unless you really expect users to type non-words in this field, for\n example to choose a name for a character in a game.\n Contrast this with {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_CORRECT} means that the IME will try to\n auto-correct typos as the user is typing, but does not define whether\n the IME offers an interface to show suggestions."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_CORRECT: GameTextInputType = 32768; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the text editor (which means\n the application) is performing auto-completion of the text being entered\n based on its own semantics, which it will present to the user as they type.\n This generally means that the input method should not be showing\n candidates itself, but can expect the editor to supply its own\n completions/candidates from\n {@link android.view.inputmethod.InputMethodSession#displayCompletions\n InputMethodSession.displayCompletions()} as a result of the editor calling\n {@link android.view.inputmethod.InputMethodManager#displayCompletions\n InputMethodManager.displayCompletions()}.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_NO_SUGGESTIONS}:\n {@code TYPE_TEXT_FLAG_AUTO_COMPLETE} means the editor should show an\n interface for displaying suggestions, but instead of supplying its own\n it will rely on the Editor to pass completions/corrections."] +pub const GameTextInputType_TYPE_TEXT_FLAG_AUTO_COMPLETE: GameTextInputType = 65536; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: multiple lines of text can be\n entered into the field. If this flag is not set, the text field\n will be constrained to a single line. The IME may also choose not to\n display an enter key when this flag is not set, as there should be no\n need to create new lines."] +pub const GameTextInputType_TYPE_TEXT_FLAG_MULTI_LINE: GameTextInputType = 131072; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the regular text view associated\n with this should not be multi-line, but when a fullscreen input method\n is providing text it should use multiple lines if it can."] +pub const GameTextInputType_TYPE_TEXT_FLAG_IME_MULTI_LINE: GameTextInputType = 262144; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: the input method does not need to\n display any dictionary-based candidates. This is useful for text views that\n do not contain words from the language and do not benefit from any\n dictionary-based completions or corrections. It overrides the\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} value when set.\n Please avoid using this unless you are certain this is what you want.\n Many input methods need suggestions to work well, for example the ones\n based on gesture typing. Consider clearing\n {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} instead if you just do not\n want the IME to correct typos.\n Note the contrast with {@link #TYPE_TEXT_FLAG_AUTO_CORRECT} and\n {@link #TYPE_TEXT_FLAG_AUTO_COMPLETE}:\n {@code TYPE_TEXT_FLAG_NO_SUGGESTIONS} means the IME does not need to\n show an interface to display suggestions. Most IMEs will also take this to\n mean they do not need to try to auto-correct what the user is typing."] +pub const GameTextInputType_TYPE_TEXT_FLAG_NO_SUGGESTIONS: GameTextInputType = 524288; +#[doc = " Flag for {@link #TYPE_CLASS_TEXT}: Let the IME know the text conversion\n suggestions are required by the application. Text conversion suggestion is\n for the transliteration languages which has pronunciation characters and\n target characters. When the user is typing the pronunciation charactes, the\n IME could provide the possible target characters to the user. When this\n flag is set, the IME should insert the text conversion suggestions through\n {@link Builder#setTextConversionSuggestions(List)} and\n the {@link TextAttribute} with initialized with the text conversion\n suggestions is provided by the IME to the application. To receive the\n additional information, the application needs to implement {@link\n InputConnection#setComposingText(CharSequence, int, TextAttribute)},\n {@link InputConnection#setComposingRegion(int, int, TextAttribute)}, and\n {@link InputConnection#commitText(CharSequence, int, TextAttribute)}."] +pub const GameTextInputType_TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS: GameTextInputType = + 1048576; +#[doc = " Default variation of {@link #TYPE_CLASS_TEXT}: plain old normal text."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a URI."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_URI: GameTextInputType = 16; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering an e-mail address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_ADDRESS: GameTextInputType = 32; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the subject line of\n an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_EMAIL_SUBJECT: GameTextInputType = 48; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a short, possibly informal\n message such as an instant message or a text message."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_SHORT_MESSAGE: GameTextInputType = 64; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the content of a long,\n possibly formal message such as the body of an e-mail."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_LONG_MESSAGE: GameTextInputType = 80; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering the name of a person."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PERSON_NAME: GameTextInputType = 96; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a postal mailing address."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_POSTAL_ADDRESS: GameTextInputType = 112; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PASSWORD: GameTextInputType = 128; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering a password, which should\n be visible to the user."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_VISIBLE_PASSWORD: GameTextInputType = 144; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text inside of a web form."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EDIT_TEXT: GameTextInputType = 160; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text to filter contents\n of a list etc."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_FILTER: GameTextInputType = 176; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering text for phonetic\n pronunciation, such as a phonetic name field in contacts. This is mostly\n useful for languages where one spelling may have several phonetic\n readings, like Japanese."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_PHONETIC: GameTextInputType = 192; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering e-mail address inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_EMAIL_ADDRESS}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS: GameTextInputType = 208; +#[doc = " Variation of {@link #TYPE_CLASS_TEXT}: entering password inside\n of a web form. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be seen as {@link #TYPE_TEXT_VARIATION_PASSWORD}\n when passed through {@link\n android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_TEXT_VARIATION_WEB_PASSWORD: GameTextInputType = 224; +#[doc = " Class for numeric text. This class supports the following flags:\n {@link #TYPE_NUMBER_FLAG_SIGNED} and\n {@link #TYPE_NUMBER_FLAG_DECIMAL}. It also supports the following\n variations: {@link #TYPE_NUMBER_VARIATION_NORMAL} and\n {@link #TYPE_NUMBER_VARIATION_PASSWORD}.\n

IME authors: If you do not recognize\n the variation, normal should be assumed.

"] +pub const GameTextInputType_TYPE_CLASS_NUMBER: GameTextInputType = 2; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is signed, allowing\n a positive or negative sign at the start."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_SIGNED: GameTextInputType = 4096; +#[doc = " Flag of {@link #TYPE_CLASS_NUMBER}: the number is decimal, allowing\n a decimal point to provide fractional values."] +pub const GameTextInputType_TYPE_NUMBER_FLAG_DECIMAL: GameTextInputType = 8192; +#[doc = " Default variation of {@link #TYPE_CLASS_NUMBER}: plain normal\n numeric text. This was added in\n {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An IME must target\n this API version or later to see this input type; if it doesn't, a request\n for this type will be dropped when passed through\n {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Variation of {@link #TYPE_CLASS_NUMBER}: entering a numeric password.\n This was added in {@link android.os.Build.VERSION_CODES#HONEYCOMB}. An\n IME must target this API version or later to see this input type; if it\n doesn't, a request for this type will be dropped when passed\n through {@link android.view.inputmethod.EditorInfo#makeCompatible(int)\n EditorInfo.makeCompatible(int)}."] +pub const GameTextInputType_TYPE_NUMBER_VARIATION_PASSWORD: GameTextInputType = 16; +#[doc = " Class for a phone number. This class currently supports no variations\n or flags."] +pub const GameTextInputType_TYPE_CLASS_PHONE: GameTextInputType = 3; +#[doc = " Class for dates and times. It supports the\n following variations:\n {@link #TYPE_DATETIME_VARIATION_NORMAL}\n {@link #TYPE_DATETIME_VARIATION_DATE}, and\n {@link #TYPE_DATETIME_VARIATION_TIME}."] +pub const GameTextInputType_TYPE_CLASS_DATETIME: GameTextInputType = 4; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n both a date and time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_NORMAL: GameTextInputType = 0; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a date."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_DATE: GameTextInputType = 16; +#[doc = " Default variation of {@link #TYPE_CLASS_DATETIME}: allows entering\n only a time."] +pub const GameTextInputType_TYPE_DATETIME_VARIATION_TIME: GameTextInputType = 32; +#[doc = " Definitions for inputType argument of GameActivity_setImeEditorInfo()\n\n
\n |-------|-------|-------|-------|\n                              1111 TYPE_MASK_CLASS\n                      11111111     TYPE_MASK_VARIATION\n          111111111111             TYPE_MASK_FLAGS\n |-------|-------|-------|-------|\n                                   TYPE_NULL\n |-------|-------|-------|-------|\n                                 1 TYPE_CLASS_TEXT\n                             1     TYPE_TEXT_VARIATION_URI\n                            1      TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n                            11     TYPE_TEXT_VARIATION_EMAIL_SUBJECT\n                           1       TYPE_TEXT_VARIATION_SHORT_MESSAGE\n                           1 1     TYPE_TEXT_VARIATION_LONG_MESSAGE\n                           11      TYPE_TEXT_VARIATION_PERSON_NAME\n                           111     TYPE_TEXT_VARIATION_POSTAL_ADDRESS\n                          1        TYPE_TEXT_VARIATION_PASSWORD\n                          1  1     TYPE_TEXT_VARIATION_VISIBLE_PASSWORD\n                          1 1      TYPE_TEXT_VARIATION_WEB_EDIT_TEXT\n                          1 11     TYPE_TEXT_VARIATION_FILTER\n                          11       TYPE_TEXT_VARIATION_PHONETIC\n                          11 1     TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS\n                          111      TYPE_TEXT_VARIATION_WEB_PASSWORD\n                     1             TYPE_TEXT_FLAG_CAP_CHARACTERS\n                    1              TYPE_TEXT_FLAG_CAP_WORDS\n                   1               TYPE_TEXT_FLAG_CAP_SENTENCES\n                  1                TYPE_TEXT_FLAG_AUTO_CORRECT\n                 1                 TYPE_TEXT_FLAG_AUTO_COMPLETE\n                1                  TYPE_TEXT_FLAG_MULTI_LINE\n               1                   TYPE_TEXT_FLAG_IME_MULTI_LINE\n              1                    TYPE_TEXT_FLAG_NO_SUGGESTIONS\n             1 TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS\n |-------|-------|-------|-------|\n                                1  TYPE_CLASS_NUMBER\n                             1     TYPE_NUMBER_VARIATION_PASSWORD\n                     1             TYPE_NUMBER_FLAG_SIGNED\n                    1              TYPE_NUMBER_FLAG_DECIMAL\n |-------|-------|-------|-------|\n                                11 TYPE_CLASS_PHONE\n |-------|-------|-------|-------|\n                               1   TYPE_CLASS_DATETIME\n                             1     TYPE_DATETIME_VARIATION_DATE\n                            1      TYPE_DATETIME_VARIATION_TIME\n |-------|-------|-------|-------|
"] +pub type GameTextInputType = u32; +#[doc = " Set of bits in {@link #imeOptions} that provide alternative actions\n associated with the \"enter\" key. This both helps the IME provide\n better feedback about what the enter key will do, and also allows it\n to provide alternative mechanisms for providing that command."] +pub const GameTextInputActionType_IME_MASK_ACTION: GameTextInputActionType = 255; +#[doc = " Bits of {@link #IME_MASK_ACTION}: no specific action has been\n associated with this editor, let the editor come up with its own if\n it can."] +pub const GameTextInputActionType_IME_ACTION_UNSPECIFIED: GameTextInputActionType = 0; +#[doc = " Bits of {@link #IME_MASK_ACTION}: there is no available action."] +pub const GameTextInputActionType_IME_ACTION_NONE: GameTextInputActionType = 1; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"go\"\n operation to take the user to the target of the text they typed.\n Typically used, for example, when entering a URL."] +pub const GameTextInputActionType_IME_ACTION_GO: GameTextInputActionType = 2; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"search\"\n operation, taking the user to the results of searching for the text\n they have typed (in whatever context is appropriate)."] +pub const GameTextInputActionType_IME_ACTION_SEARCH: GameTextInputActionType = 3; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"send\"\n operation, delivering the text to its target. This is typically used\n when composing a message in IM or SMS where sending is immediate."] +pub const GameTextInputActionType_IME_ACTION_SEND: GameTextInputActionType = 4; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"next\"\n operation, taking the user to the next field that will accept text."] +pub const GameTextInputActionType_IME_ACTION_NEXT: GameTextInputActionType = 5; +#[doc = " Bits of {@link #IME_MASK_ACTION}: the action key performs a \"done\"\n operation, typically meaning there is nothing more to input and the\n IME will be closed."] +pub const GameTextInputActionType_IME_ACTION_DONE: GameTextInputActionType = 6; +#[doc = " Bits of {@link #IME_MASK_ACTION}: like {@link #IME_ACTION_NEXT}, but\n for moving to the previous field. This will normally not be used to\n specify an action (since it precludes {@link #IME_ACTION_NEXT}), but\n can be returned to the app if it sets {@link #IME_FLAG_NAVIGATE_PREVIOUS}."] +pub const GameTextInputActionType_IME_ACTION_PREVIOUS: GameTextInputActionType = 7; +#[doc = " actionId and imeOptions argument of GameActivity_setImeEditorInfo().\n\n
\n |-------|-------|-------|-------|\n                              1111 IME_MASK_ACTION\n |-------|-------|-------|-------|\n                                   IME_ACTION_UNSPECIFIED\n                                 1 IME_ACTION_NONE\n                                1  IME_ACTION_GO\n                                11 IME_ACTION_SEARCH\n                               1   IME_ACTION_SEND\n                               1 1 IME_ACTION_NEXT\n                               11  IME_ACTION_DONE\n                               111 IME_ACTION_PREVIOUS\n         1                         IME_FLAG_NO_PERSONALIZED_LEARNING\n        1                          IME_FLAG_NO_FULLSCREEN\n       1                           IME_FLAG_NAVIGATE_PREVIOUS\n      1                            IME_FLAG_NAVIGATE_NEXT\n     1                             IME_FLAG_NO_EXTRACT_UI\n    1                              IME_FLAG_NO_ACCESSORY_ACTION\n   1                               IME_FLAG_NO_ENTER_ACTION\n  1                                IME_FLAG_FORCE_ASCII\n |-------|-------|-------|-------|
"] +pub type GameTextInputActionType = u32; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME should not update\n any personalized data such as typing history and personalized language\n model based on what the user typed on this text editing object. Typical\n use cases are:
  • When the application is in a special mode, where\n user's activities are expected to be not recorded in the application's\n history. Some web browsers and chat applications may have this kind of\n modes.
  • When storing typing history does not make much sense.\n Specifying this flag in typing games may help to avoid typing history from\n being filled up with words that the user is less likely to type in their\n daily life. Another example is that when the application already knows\n that the expected input is not a valid word (e.g. a promotion code that is\n not a valid word in any natural language).
  • \n
\n\n

Applications need to be aware that the flag is not a guarantee, and some\n IMEs may not respect it.

"] +pub const GameTextInputImeOptions_IME_FLAG_NO_PERSONALIZED_LEARNING: GameTextInputImeOptions = + 16777216; +#[doc = " Flag of {@link #imeOptions}: used to request that the IME never go\n into fullscreen mode.\n By default, IMEs may go into full screen mode when they think\n it's appropriate, for example on small screens in landscape\n orientation where displaying a software keyboard may occlude\n such a large portion of the screen that the remaining part is\n too small to meaningfully display the application UI.\n If this flag is set, compliant IMEs will never go into full screen mode,\n and always leave some space to display the application UI.\n Applications need to be aware that the flag is not a guarantee, and\n some IMEs may ignore it."] +pub const GameTextInputImeOptions_IME_FLAG_NO_FULLSCREEN: GameTextInputImeOptions = 33554432; +#[doc = " Flag of {@link #imeOptions}: like {@link #IME_FLAG_NAVIGATE_NEXT}, but\n specifies there is something interesting that a backward navigation\n can focus on. If the user selects the IME's facility to backward\n navigate, this will show up in the application as an {@link\n #IME_ACTION_PREVIOUS} at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_PREVIOUS: GameTextInputImeOptions = 67108864; +#[doc = " Flag of {@link #imeOptions}: used to specify that there is something\n interesting that a forward navigation can focus on. This is like using\n {@link #IME_ACTION_NEXT}, except allows the IME to be multiline (with\n an enter key) as well as provide forward navigation. Note that some\n IMEs may not be able to do this, especially when running on a small\n screen where there is little space. In that case it does not need to\n present a UI for this option. Like {@link #IME_ACTION_NEXT}, if the\n user selects the IME's facility to forward navigate, this will show up\n in the application at {@link InputConnection#performEditorAction(int)\n InputConnection.performEditorAction(int)}."] +pub const GameTextInputImeOptions_IME_FLAG_NAVIGATE_NEXT: GameTextInputImeOptions = 134217728; +#[doc = " Flag of {@link #imeOptions}: used to specify that the IME does not need\n to show its extracted text UI. For input methods that may be fullscreen,\n often when in landscape mode, this allows them to be smaller and let part\n of the application be shown behind, through transparent UI parts in the\n fullscreen IME. The part of the UI visible to the user may not be\n responsive to touch because the IME will receive touch events, which may\n confuse the user; use {@link #IME_FLAG_NO_FULLSCREEN} instead for a better\n experience. Using this flag is discouraged and it may become deprecated in\n the future. Its meaning is unclear in some situations and it may not work\n appropriately on older versions of the platform."] +pub const GameTextInputImeOptions_IME_FLAG_NO_EXTRACT_UI: GameTextInputImeOptions = 268435456; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}, this indicates that the action\n should not be available as an accessory button on the right of the\n extracted text when the input method is full-screen. Note that by setting\n this flag, there can be cases where the action is simply never available to\n the user. Setting this generally means that you think that in fullscreen\n mode, where there is little space to show the text, it's not worth taking\n some screen real estate to display the action and it should be used instead\n to show more text."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ACCESSORY_ACTION: GameTextInputImeOptions = 536870912; +#[doc = " Flag of {@link #imeOptions}: used in conjunction with one of the actions\n masked by {@link #IME_MASK_ACTION}. If this flag is not set, IMEs will\n normally replace the \"enter\" key with the action supplied. This flag\n indicates that the action should not be available in-line as a replacement\n for the \"enter\" key. Typically this is because the action has such a\n significant impact or is not recoverable enough that accidentally hitting\n it should be avoided, such as sending a message. Note that\n {@link android.widget.TextView} will automatically set this flag for you\n on multi-line text views."] +pub const GameTextInputImeOptions_IME_FLAG_NO_ENTER_ACTION: GameTextInputImeOptions = 1073741824; +#[doc = " Flag of {@link #imeOptions}: used to request an IME that is capable of\n inputting ASCII characters. The intention of this flag is to ensure that\n the user can type Roman alphabet characters in a {@link\n android.widget.TextView}. It is typically used for an account ID or\n password input. A lot of the time, IMEs are already able to input ASCII\n even without being told so (such IMEs already respect this flag in a\n sense), but there are cases when this is not the default. For instance,\n users of languages using a different script like Arabic, Greek, Hebrew or\n Russian typically have a keyboard that can't input ASCII characters by\n default. Applications need to be aware that the flag is not a guarantee,\n and some IMEs may not respect it. However, it is strongly recommended for\n IME authors to respect this flag especially when their IME could end up\n with a state where only languages using non-ASCII are enabled."] +pub const GameTextInputImeOptions_IME_FLAG_FORCE_ASCII: GameTextInputImeOptions = 2147483648; +#[doc = " Flag of {@link #internalImeOptions}: flag is set when app window containing\n this\n {@link EditorInfo} is using {@link Configuration#ORIENTATION_PORTRAIT}\n mode.\n @hide"] +pub const GameTextInputImeOptions_IME_INTERNAL_FLAG_APP_WINDOW_PORTRAIT: GameTextInputImeOptions = + 1; +#[doc = " Generic unspecified type for {@link #imeOptions}."] +pub const GameTextInputImeOptions_IME_NULL: GameTextInputImeOptions = 0; +pub type GameTextInputImeOptions = u32; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_CAPTION_BAR: GameCommonInsetsType = 0; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_DISPLAY_CUTOUT: GameCommonInsetsType = 1; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_IME: GameCommonInsetsType = 2; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_MANDATORY_SYSTEM_GESTURES: + GameCommonInsetsType = 3; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_NAVIGATION_BARS: GameCommonInsetsType = 4; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_STATUS_BARS: GameCommonInsetsType = 5; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_BARS: GameCommonInsetsType = 6; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_SYSTEM_GESTURES: GameCommonInsetsType = 7; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_TAPABLE_ELEMENT: GameCommonInsetsType = 8; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_WATERFALL: GameCommonInsetsType = 9; +pub const GameCommonInsetsType_GAMECOMMON_INSETS_TYPE_COUNT: GameCommonInsetsType = 10; +#[doc = " The type of a component for which to retrieve insets. See\n https://developer.android.com/reference/androidx/core/view/WindowInsetsCompat.Type"] +pub type GameCommonInsetsType = u8; #[doc = " This structure defines the native side of an android.app.GameActivity.\n It is created by the framework, and handed to the application's native\n code as it is being launched."] #[repr(C)] pub struct GameActivity { @@ -3070,112 +2915,62 @@ fn bindgen_test_layout_GameActivity() { assert_eq!( ::std::mem::size_of::(), 80usize, - concat!("Size of: ", stringify!(GameActivity)) + "Size of GameActivity" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivity)) + "Alignment of GameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).callbacks) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(callbacks) - ) + "Offset of field: GameActivity::callbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(vm) - ) + "Offset of field: GameActivity::vm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).env) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(env) - ) + "Offset of field: GameActivity::env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).javaGameActivity) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(javaGameActivity) - ) + "Offset of field: GameActivity::javaGameActivity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internalDataPath) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(internalDataPath) - ) + "Offset of field: GameActivity::internalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).externalDataPath) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(externalDataPath) - ) + "Offset of field: GameActivity::externalDataPath" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sdkVersion) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(sdkVersion) - ) + "Offset of field: GameActivity::sdkVersion" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).instance) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(instance) - ) + "Offset of field: GameActivity::instance" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).assetManager) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(assetManager) - ) + "Offset of field: GameActivity::assetManager" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).obbPath) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivity), - "::", - stringify!(obbPath) - ) + "Offset of field: GameActivity::obbPath" ); } #[doc = " A function the user should call from their callback with the data, its length\n and the library- supplied context."] @@ -3232,7 +3027,7 @@ pub struct GameActivityCallbacks { pub onNativeWindowDestroyed: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, window: *mut ANativeWindow), >, - #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] + #[doc = " The current device AConfiguration has changed. The new configuration can\n be retrieved from assetManager."] pub onConfigurationChanged: ::std::option::Option, #[doc = " The system is running low on memory. Use this callback to release\n resources you do not need, to help the system avoid killing more\n important processes."] @@ -3271,6 +3066,13 @@ pub struct GameActivityCallbacks { pub onContentRectChanged: ::std::option::Option< unsafe extern "C" fn(activity: *mut GameActivity, rect: *const ARect), >, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onSoftwareKeyboardVisibilityChanged: + ::std::option::Option, + #[doc = " Callback called when the software keyboard is shown or hidden."] + pub onEditorAction: ::std::option::Option< + unsafe extern "C" fn(activity: *mut GameActivity, action: ::std::os::raw::c_int) -> bool, + >, } #[test] fn bindgen_test_layout_GameActivityCallbacks() { @@ -3279,203 +3081,120 @@ fn bindgen_test_layout_GameActivityCallbacks() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 152usize, - concat!("Size of: ", stringify!(GameActivityCallbacks)) + 168usize, + "Size of GameActivityCallbacks" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GameActivityCallbacks)) + "Alignment of GameActivityCallbacks" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStart) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStart) - ) + "Offset of field: GameActivityCallbacks::onStart" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onResume) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onResume) - ) + "Offset of field: GameActivityCallbacks::onResume" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onSaveInstanceState) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onSaveInstanceState) - ) + "Offset of field: GameActivityCallbacks::onSaveInstanceState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onPause) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onPause) - ) + "Offset of field: GameActivityCallbacks::onPause" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onStop) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onStop) - ) + "Offset of field: GameActivityCallbacks::onStop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onDestroy) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onDestroy) - ) + "Offset of field: GameActivityCallbacks::onDestroy" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowFocusChanged) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowFocusChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowFocusChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowCreated) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowCreated) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowCreated" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowResized) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowResized) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowResized" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowRedrawNeeded) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowRedrawNeeded) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowRedrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onNativeWindowDestroyed) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onNativeWindowDestroyed) - ) + "Offset of field: GameActivityCallbacks::onNativeWindowDestroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onConfigurationChanged) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onConfigurationChanged) - ) + "Offset of field: GameActivityCallbacks::onConfigurationChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTrimMemory) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTrimMemory) - ) + "Offset of field: GameActivityCallbacks::onTrimMemory" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTouchEvent) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTouchEvent) - ) + "Offset of field: GameActivityCallbacks::onTouchEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyDown) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyDown) - ) + "Offset of field: GameActivityCallbacks::onKeyDown" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onKeyUp) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onKeyUp) - ) + "Offset of field: GameActivityCallbacks::onKeyUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onTextInputEvent) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onTextInputEvent) - ) + "Offset of field: GameActivityCallbacks::onTextInputEvent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onWindowInsetsChanged) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onWindowInsetsChanged) - ) + "Offset of field: GameActivityCallbacks::onWindowInsetsChanged" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onContentRectChanged) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(GameActivityCallbacks), - "::", - stringify!(onContentRectChanged) - ) + "Offset of field: GameActivityCallbacks::onContentRectChanged" + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).onSoftwareKeyboardVisibilityChanged) as usize - ptr as usize + }, + 152usize, + "Offset of field: GameActivityCallbacks::onSoftwareKeyboardVisibilityChanged" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).onEditorAction) as usize - ptr as usize }, + 160usize, + "Offset of field: GameActivityCallbacks::onEditorAction" ); } #[doc = " This is the function that must be in the native code to instantiate the\n application's native activity. It is called with the activity instance (see\n above); if the code is being instantiated from a previously saved instance,\n the savedState will be non-NULL and point to the saved data. You must make\n any copy of this data you need -- it will be released after you return from\n this function."] @@ -3555,7 +3274,7 @@ pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_TURN_SCREEN_ON: GameActiv pub const GameActivitySetWindowFlags_GAMEACTIVITY_FLAG_DISMISS_KEYGUARD: GameActivitySetWindowFlags = 4194304; #[doc = " Flags for GameActivity_setWindowFlags,\n as per the Java API at android.view.WindowManager.LayoutParams."] -pub type GameActivitySetWindowFlags = ::std::os::raw::c_uint; +pub type GameActivitySetWindowFlags = u32; extern "C" { #[doc = " Change the window flags of the given activity. Calls getWindow().setFlags()\n of the given activity.\n Note that some flags must be set before the window decoration is created,\n see\n https://developer.android.com/reference/android/view/Window#setFlags(int,%20int).\n Note also that this method can be called from\n *any* thread; it will send a message to the main thread of the process\n where the Java finish call will take place."] pub fn GameActivity_setWindowFlags( @@ -3571,11 +3290,15 @@ pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT: pub const GameActivityShowSoftInputFlags_GAMEACTIVITY_SHOW_SOFT_INPUT_FORCED: GameActivityShowSoftInputFlags = 2; #[doc = " Flags for GameActivity_showSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityShowSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityShowSoftInputFlags = u8; extern "C" { #[doc = " Show the IME while in the given activity. Calls\n InputMethodManager.showSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java call will take place."] pub fn GameActivity_showSoftInput(activity: *mut GameActivity, flags: u32); } +extern "C" { + #[doc = " Restarts the input method. Calls InputMethodManager.restartInput().\n Note that this method can be called from *any* thread; it will send a message\n to the main thread of the process where the Java call will take place."] + pub fn GameActivity_restartInput(activity: *mut GameActivity); +} extern "C" { #[doc = " Set the text entry state (see documentation of the GameTextInputState struct\n in the Game Text Input library reference).\n\n Ownership of the state is maintained by the caller."] pub fn GameActivity_setTextInputState( @@ -3602,7 +3325,7 @@ pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_O pub const GameActivityHideSoftInputFlags_GAMEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS: GameActivityHideSoftInputFlags = 2; #[doc = " Flags for GameActivity_hideSoftInput; see the Java InputMethodManager\n API for documentation."] -pub type GameActivityHideSoftInputFlags = ::std::os::raw::c_uint; +pub type GameActivityHideSoftInputFlags = u16; extern "C" { #[doc = " Hide the IME while in the given activity. Calls\n InputMethodManager.hideSoftInput() for the given activity. Note that this\n method can be called from *any* thread; it will send a message to the main\n thread of the process where the Java finish call will take place."] pub fn GameActivity_hideSoftInput(activity: *mut GameActivity, flags: u32); @@ -3616,12 +3339,16 @@ extern "C" { ); } extern "C" { - #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note that this function will attach the current thread to the JVM if it is\n not already attached, so the caller must detach the thread from the JVM\n before the thread is destroyed using DetachCurrentThread."] + #[doc = " Tells whether the software keyboard is visible or not."] + pub fn GameActivity_isSoftwareKeyboardVisible(activity: *mut GameActivity) -> bool; +} +extern "C" { + #[doc = " Set options on how the IME behaves when it is requested for text input.\n See\n https://developer.android.com/reference/android/view/inputmethod/EditorInfo\n for the meaning of inputType, actionId and imeOptions.\n\n Note: currently only TYPE_NULL AND TYPE_CLASS_NUMBER are supported."] pub fn GameActivity_setImeEditorInfo( activity: *mut GameActivity, - inputType: ::std::os::raw::c_int, - actionId: ::std::os::raw::c_int, - imeOptions: ::std::os::raw::c_int, + inputType: GameTextInputType, + actionId: GameTextInputActionType, + imeOptions: GameTextInputImeOptions, ); } extern "C" { @@ -3652,6 +3379,9 @@ extern "C" { extern "C" { pub fn GameActivity_getKeyboardHidden(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + pub fn GameActivity_getLocalesCount(activity: *mut GameActivity) -> ::std::os::raw::c_int; +} extern "C" { pub fn GameActivity_getMcc(activity: *mut GameActivity) -> ::std::os::raw::c_int; } @@ -3684,6 +3414,39 @@ extern "C" { extern "C" { pub fn GameActivity_getUIMode(activity: *mut GameActivity) -> ::std::os::raw::c_int; } +extern "C" { + #[doc = " The functions below return Java locale information.\n\n In simple cases there will be just one locale, but it's possible tha\n there are more than one locale objects. Users are encouraged to write code\n that handles all locales and not just the first one.\n\n The functions in the block below return string values in the provided buffer.\n Return value is zero if there were no errors, otherwise it's non-zero.\n If the return value is zero, `dst` will contain a null-terminated string:\n strlen(dst) <= dst_size - 1.\n If the return value is non-zero, the content of dst is undefined.\n\n Parameters:\n\n dst, dst_size: define a receiver buffer. Locale string can be something\n short like \"EN/EN\", but it may be longer. You should be safe with a buffer\n size of 256 bytes.\n\n If the buffer is too small, ENOBUFS is returned. Try allocating a larger\n buffer in this case.\n\n localeIdx must be between 0 and the value of GameActivity_getLocalesCount().\n If localeIdx is out of range, EINVAL is returned.\n\n Refer to Java documentation of locales for more information."] + pub fn GameActivity_getLocaleLanguage( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleScript( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleCountry( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn GameActivity_getLocaleVariant( + dst: *mut ::std::os::raw::c_char, + dst_size: usize, + activity: *mut GameActivity, + localeIdx: usize, + ) -> ::std::os::raw::c_int; +} pub const ACONFIGURATION_ORIENTATION_ANY: _bindgen_ty_21 = 0; pub const ACONFIGURATION_ORIENTATION_PORT: _bindgen_ty_21 = 1; pub const ACONFIGURATION_ORIENTATION_LAND: _bindgen_ty_21 = 2; @@ -3782,45 +3545,26 @@ pub struct pollfd { fn bindgen_test_layout_pollfd() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pollfd)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of pollfd"); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(pollfd)) + "Alignment of pollfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(fd) - ) + "Offset of field: pollfd::fd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).events) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(events) - ) + "Offset of field: pollfd::events" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).revents) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pollfd), - "::", - stringify!(revents) - ) + "Offset of field: pollfd::revents" ); } #[repr(C)] @@ -3839,62 +3583,37 @@ fn bindgen_test_layout__fpx_sw_bytes() { assert_eq!( ::std::mem::size_of::<_fpx_sw_bytes>(), 48usize, - concat!("Size of: ", stringify!(_fpx_sw_bytes)) + "Size of _fpx_sw_bytes" ); assert_eq!( ::std::mem::align_of::<_fpx_sw_bytes>(), 8usize, - concat!("Alignment of ", stringify!(_fpx_sw_bytes)) + "Alignment of _fpx_sw_bytes" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(magic1) - ) + "Offset of field: _fpx_sw_bytes::magic1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extended_size) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(extended_size) - ) + "Offset of field: _fpx_sw_bytes::extended_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xfeatures) - ) + "Offset of field: _fpx_sw_bytes::xfeatures" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xstate_size) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(xstate_size) - ) + "Offset of field: _fpx_sw_bytes::xstate_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(_fpx_sw_bytes), - "::", - stringify!(padding) - ) + "Offset of field: _fpx_sw_bytes::padding" ); } #[repr(C)] @@ -3907,35 +3626,21 @@ pub struct _fpreg { fn bindgen_test_layout__fpreg() { const UNINIT: ::std::mem::MaybeUninit<_fpreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpreg>(), - 10usize, - concat!("Size of: ", stringify!(_fpreg)) - ); + assert_eq!(::std::mem::size_of::<_fpreg>(), 10usize, "Size of _fpreg"); assert_eq!( ::std::mem::align_of::<_fpreg>(), 2usize, - concat!("Alignment of ", stringify!(_fpreg)) + "Alignment of _fpreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(significand) - ) + "Offset of field: _fpreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpreg), - "::", - stringify!(exponent) - ) + "Offset of field: _fpreg::exponent" ); } #[repr(C)] @@ -3949,45 +3654,26 @@ pub struct _fpxreg { fn bindgen_test_layout__fpxreg() { const UNINIT: ::std::mem::MaybeUninit<_fpxreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_fpxreg>(), - 16usize, - concat!("Size of: ", stringify!(_fpxreg)) - ); + assert_eq!(::std::mem::size_of::<_fpxreg>(), 16usize, "Size of _fpxreg"); assert_eq!( ::std::mem::align_of::<_fpxreg>(), 2usize, - concat!("Alignment of ", stringify!(_fpxreg)) + "Alignment of _fpxreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(significand) - ) + "Offset of field: _fpxreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(exponent) - ) + "Offset of field: _fpxreg::exponent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(_fpxreg), - "::", - stringify!(padding) - ) + "Offset of field: _fpxreg::padding" ); } #[repr(C)] @@ -3999,25 +3685,16 @@ pub struct _xmmreg { fn bindgen_test_layout__xmmreg() { const UNINIT: ::std::mem::MaybeUninit<_xmmreg> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_xmmreg>(), - 16usize, - concat!("Size of: ", stringify!(_xmmreg)) - ); + assert_eq!(::std::mem::size_of::<_xmmreg>(), 16usize, "Size of _xmmreg"); assert_eq!( ::std::mem::align_of::<_xmmreg>(), 4usize, - concat!("Alignment of ", stringify!(_xmmreg)) + "Alignment of _xmmreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_xmmreg), - "::", - stringify!(element) - ) + "Offset of field: _xmmreg::element" ); } #[repr(C)] @@ -4055,32 +3732,22 @@ fn bindgen_test_layout__fpstate_32__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<_fpstate_32__bindgen_ty_1>(), 176usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_1)) + "Size of _fpstate_32__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<_fpstate_32__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_1)) + "Alignment of _fpstate_32__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding1) - ) + "Offset of field: _fpstate_32__bindgen_ty_1::padding1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_1), - "::", - stringify!(padding) - ) + "Offset of field: _fpstate_32__bindgen_ty_1::padding" ); } #[repr(C)] @@ -4097,32 +3764,22 @@ fn bindgen_test_layout__fpstate_32__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<_fpstate_32__bindgen_ty_2>(), 48usize, - concat!("Size of: ", stringify!(_fpstate_32__bindgen_ty_2)) + "Size of _fpstate_32__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<_fpstate_32__bindgen_ty_2>(), 8usize, - concat!("Alignment of ", stringify!(_fpstate_32__bindgen_ty_2)) + "Alignment of _fpstate_32__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(padding2) - ) + "Offset of field: _fpstate_32__bindgen_ty_2::padding2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32__bindgen_ty_2), - "::", - stringify!(sw_reserved) - ) + "Offset of field: _fpstate_32__bindgen_ty_2::sw_reserved" ); } #[test] @@ -4132,162 +3789,87 @@ fn bindgen_test_layout__fpstate_32() { assert_eq!( ::std::mem::size_of::<_fpstate_32>(), 624usize, - concat!("Size of: ", stringify!(_fpstate_32)) + "Size of _fpstate_32" ); assert_eq!( ::std::mem::align_of::<_fpstate_32>(), 8usize, - concat!("Alignment of ", stringify!(_fpstate_32)) + "Alignment of _fpstate_32" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cw) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cw) - ) + "Offset of field: _fpstate_32::cw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(sw) - ) + "Offset of field: _fpstate_32::sw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(tag) - ) + "Offset of field: _fpstate_32::tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ipoff) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(ipoff) - ) + "Offset of field: _fpstate_32::ipoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cssel) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(cssel) - ) + "Offset of field: _fpstate_32::cssel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataoff) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(dataoff) - ) + "Offset of field: _fpstate_32::dataoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).datasel) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(datasel) - ) + "Offset of field: _fpstate_32::datasel" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_st) - ) + "Offset of field: _fpstate_32::_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 108usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(status) - ) + "Offset of field: _fpstate_32::status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 110usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(magic) - ) + "Offset of field: _fpstate_32::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_env) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_env) - ) + "Offset of field: _fpstate_32::_fxsr_env" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(mxcsr) - ) + "Offset of field: _fpstate_32::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 140usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(reserved) - ) + "Offset of field: _fpstate_32::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fxsr_st) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_fxsr_st) - ) + "Offset of field: _fpstate_32::_fxsr_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_32), - "::", - stringify!(_xmm) - ) + "Offset of field: _fpstate_32::_xmm" ); } #[repr(C)] @@ -4320,32 +3902,22 @@ fn bindgen_test_layout__fpstate_64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<_fpstate_64__bindgen_ty_1>(), 48usize, - concat!("Size of: ", stringify!(_fpstate_64__bindgen_ty_1)) + "Size of _fpstate_64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<_fpstate_64__bindgen_ty_1>(), 8usize, - concat!("Alignment of ", stringify!(_fpstate_64__bindgen_ty_1)) + "Alignment of _fpstate_64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(reserved3) - ) + "Offset of field: _fpstate_64__bindgen_ty_1::reserved3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw_reserved) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64__bindgen_ty_1), - "::", - stringify!(sw_reserved) - ) + "Offset of field: _fpstate_64__bindgen_ty_1::sw_reserved" ); } #[test] @@ -4355,122 +3927,67 @@ fn bindgen_test_layout__fpstate_64() { assert_eq!( ::std::mem::size_of::<_fpstate_64>(), 512usize, - concat!("Size of: ", stringify!(_fpstate_64)) + "Size of _fpstate_64" ); assert_eq!( ::std::mem::align_of::<_fpstate_64>(), 8usize, - concat!("Alignment of ", stringify!(_fpstate_64)) + "Alignment of _fpstate_64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(cwd) - ) + "Offset of field: _fpstate_64::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(swd) - ) + "Offset of field: _fpstate_64::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).twd) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(twd) - ) + "Offset of field: _fpstate_64::twd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(fop) - ) + "Offset of field: _fpstate_64::fop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rip) - ) + "Offset of field: _fpstate_64::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(rdp) - ) + "Offset of field: _fpstate_64::rdp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr) - ) + "Offset of field: _fpstate_64::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr_mask) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(mxcsr_mask) - ) + "Offset of field: _fpstate_64::mxcsr_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(st_space) - ) + "Offset of field: _fpstate_64::st_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(xmm_space) - ) + "Offset of field: _fpstate_64::xmm_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 416usize, - concat!( - "Offset of field: ", - stringify!(_fpstate_64), - "::", - stringify!(reserved2) - ) + "Offset of field: _fpstate_64::reserved2" ); } #[repr(C)] @@ -4484,45 +4001,26 @@ pub struct _header { fn bindgen_test_layout__header() { const UNINIT: ::std::mem::MaybeUninit<_header> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<_header>(), - 64usize, - concat!("Size of: ", stringify!(_header)) - ); + assert_eq!(::std::mem::size_of::<_header>(), 64usize, "Size of _header"); assert_eq!( ::std::mem::align_of::<_header>(), 8usize, - concat!("Alignment of ", stringify!(_header)) + "Alignment of _header" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xfeatures) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(xfeatures) - ) + "Offset of field: _header::xfeatures" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved1) - ) + "Offset of field: _header::reserved1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_header), - "::", - stringify!(reserved2) - ) + "Offset of field: _header::reserved2" ); } #[repr(C)] @@ -4537,22 +4035,17 @@ fn bindgen_test_layout__ymmh_state() { assert_eq!( ::std::mem::size_of::<_ymmh_state>(), 256usize, - concat!("Size of: ", stringify!(_ymmh_state)) + "Size of _ymmh_state" ); assert_eq!( ::std::mem::align_of::<_ymmh_state>(), 4usize, - concat!("Alignment of ", stringify!(_ymmh_state)) + "Alignment of _ymmh_state" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ymmh_space) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_ymmh_state), - "::", - stringify!(ymmh_space) - ) + "Offset of field: _ymmh_state::ymmh_space" ); } #[repr(C)] @@ -4569,42 +4062,27 @@ fn bindgen_test_layout__xstate() { assert_eq!( ::std::mem::size_of::<_xstate>(), 832usize, - concat!("Size of: ", stringify!(_xstate)) + "Size of _xstate" ); assert_eq!( ::std::mem::align_of::<_xstate>(), 8usize, - concat!("Alignment of ", stringify!(_xstate)) + "Alignment of _xstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(fpstate) - ) + "Offset of field: _xstate::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xstate_hdr) as usize - ptr as usize }, 512usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(xstate_hdr) - ) + "Offset of field: _xstate::xstate_hdr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ymmh) as usize - ptr as usize }, 576usize, - concat!( - "Offset of field: ", - stringify!(_xstate), - "::", - stringify!(ymmh) - ) + "Offset of field: _xstate::ymmh" ); } #[repr(C)] @@ -4646,292 +4124,152 @@ fn bindgen_test_layout_sigcontext_32() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(sigcontext_32)) + "Size of sigcontext_32" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sigcontext_32)) + "Alignment of sigcontext_32" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext_32::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__gsh) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__gsh) - ) + "Offset of field: sigcontext_32::__gsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext_32::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fsh) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__fsh) - ) + "Offset of field: sigcontext_32::__fsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(es) - ) + "Offset of field: sigcontext_32::es" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__esh) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__esh) - ) + "Offset of field: sigcontext_32::__esh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ds) - ) + "Offset of field: sigcontext_32::ds" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__dsh) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__dsh) - ) + "Offset of field: sigcontext_32::__dsh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(di) - ) + "Offset of field: sigcontext_32::di" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(si) - ) + "Offset of field: sigcontext_32::si" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bp) - ) + "Offset of field: sigcontext_32::bp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp) - ) + "Offset of field: sigcontext_32::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(bx) - ) + "Offset of field: sigcontext_32::bx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(dx) - ) + "Offset of field: sigcontext_32::dx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cx) - ) + "Offset of field: sigcontext_32::cx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ax) - ) + "Offset of field: sigcontext_32::ax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext_32::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(err) - ) + "Offset of field: sigcontext_32::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ip) - ) + "Offset of field: sigcontext_32::ip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext_32::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__csh) as usize - ptr as usize }, 62usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__csh) - ) + "Offset of field: sigcontext_32::__csh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(flags) - ) + "Offset of field: sigcontext_32::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp_at_signal) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(sp_at_signal) - ) + "Offset of field: sigcontext_32::sp_at_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext_32::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ssh) as usize - ptr as usize }, 74usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(__ssh) - ) + "Offset of field: sigcontext_32::__ssh" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext_32::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext_32::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_32), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext_32::cr2" ); } #[repr(C)] @@ -4973,292 +4311,152 @@ fn bindgen_test_layout_sigcontext_64() { assert_eq!( ::std::mem::size_of::(), 256usize, - concat!("Size of: ", stringify!(sigcontext_64)) + "Size of sigcontext_64" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigcontext_64)) + "Alignment of sigcontext_64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r8) - ) + "Offset of field: sigcontext_64::r8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r9) - ) + "Offset of field: sigcontext_64::r9" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r10) - ) + "Offset of field: sigcontext_64::r10" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r11) - ) + "Offset of field: sigcontext_64::r11" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r12) - ) + "Offset of field: sigcontext_64::r12" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r13) - ) + "Offset of field: sigcontext_64::r13" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r14) - ) + "Offset of field: sigcontext_64::r14" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(r15) - ) + "Offset of field: sigcontext_64::r15" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).di) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(di) - ) + "Offset of field: sigcontext_64::di" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(si) - ) + "Offset of field: sigcontext_64::si" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bp) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bp) - ) + "Offset of field: sigcontext_64::bp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bx) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(bx) - ) + "Offset of field: sigcontext_64::bx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dx) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(dx) - ) + "Offset of field: sigcontext_64::dx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ax) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ax) - ) + "Offset of field: sigcontext_64::ax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cx) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cx) - ) + "Offset of field: sigcontext_64::cx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(sp) - ) + "Offset of field: sigcontext_64::sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ip) - ) + "Offset of field: sigcontext_64::ip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(flags) - ) + "Offset of field: sigcontext_64::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext_64::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext_64::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext_64::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 150usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext_64::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(err) - ) + "Offset of field: sigcontext_64::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext_64::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext_64::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext_64::cr2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext_64::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext_64), - "::", - stringify!(reserved1) - ) + "Offset of field: sigcontext_64::reserved1" ); } #[repr(C)] @@ -5307,32 +4505,22 @@ fn bindgen_test_layout_sigcontext__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 2usize, - concat!("Size of: ", stringify!(sigcontext__bindgen_ty_1)) + "Size of sigcontext__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 2usize, - concat!("Alignment of ", stringify!(sigcontext__bindgen_ty_1)) + "Alignment of sigcontext__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext__bindgen_ty_1), - "::", - stringify!(ss) - ) + "Offset of field: sigcontext__bindgen_ty_1::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pad0) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext__bindgen_ty_1), - "::", - stringify!(__pad0) - ) + "Offset of field: sigcontext__bindgen_ty_1::__pad0" ); } #[test] @@ -5342,282 +4530,178 @@ fn bindgen_test_layout_sigcontext() { assert_eq!( ::std::mem::size_of::(), 256usize, - concat!("Size of: ", stringify!(sigcontext)) + "Size of sigcontext" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigcontext)) + "Alignment of sigcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r8) - ) + "Offset of field: sigcontext::r8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r9) - ) + "Offset of field: sigcontext::r9" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r10) - ) + "Offset of field: sigcontext::r10" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r11) - ) + "Offset of field: sigcontext::r11" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r12) - ) + "Offset of field: sigcontext::r12" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r13) - ) + "Offset of field: sigcontext::r13" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r14) - ) + "Offset of field: sigcontext::r14" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(r15) - ) + "Offset of field: sigcontext::r15" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rdi) - ) + "Offset of field: sigcontext::rdi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rsi) - ) + "Offset of field: sigcontext::rsi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rbp) - ) + "Offset of field: sigcontext::rbp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rbx) - ) + "Offset of field: sigcontext::rbx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rdx) - ) + "Offset of field: sigcontext::rdx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rax) - ) + "Offset of field: sigcontext::rax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rcx) - ) + "Offset of field: sigcontext::rcx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rsp) - ) + "Offset of field: sigcontext::rsp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(rip) - ) + "Offset of field: sigcontext::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(eflags) - ) + "Offset of field: sigcontext::eflags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cs) - ) + "Offset of field: sigcontext::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 146usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(gs) - ) + "Offset of field: sigcontext::gs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 148usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fs) - ) + "Offset of field: sigcontext::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).err) as usize - ptr as usize }, 152usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(err) - ) + "Offset of field: sigcontext::err" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).trapno) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(trapno) - ) + "Offset of field: sigcontext::trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).oldmask) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(oldmask) - ) + "Offset of field: sigcontext::oldmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cr2) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(cr2) - ) + "Offset of field: sigcontext::cr2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpstate) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(fpstate) - ) + "Offset of field: sigcontext::fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(sigcontext), - "::", - stringify!(reserved1) - ) + "Offset of field: sigcontext::reserved1" + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timespec { + pub tv_sec: time_t, + pub tv_nsec: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_timespec() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + "Size of timespec" + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + "Alignment of timespec" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, + 0usize, + "Offset of field: timespec::tv_sec" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, + 8usize, + "Offset of field: timespec::tv_nsec" ); } #[repr(C)] @@ -5633,32 +4717,22 @@ fn bindgen_test_layout___kernel_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_timespec)) + "Size of __kernel_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_timespec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_timespec)) + "Alignment of __kernel_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_timespec::tv_nsec" ); } #[repr(C)] @@ -5674,32 +4748,22 @@ fn bindgen_test_layout___kernel_itimerspec() { assert_eq!( ::std::mem::size_of::<__kernel_itimerspec>(), 32usize, - concat!("Size of: ", stringify!(__kernel_itimerspec)) + "Size of __kernel_itimerspec" ); assert_eq!( ::std::mem::align_of::<__kernel_itimerspec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_itimerspec)) + "Alignment of __kernel_itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: __kernel_itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: __kernel_itimerspec::it_value" ); } #[repr(C)] @@ -5716,32 +4780,22 @@ fn bindgen_test_layout___kernel_old_timespec() { assert_eq!( ::std::mem::size_of::<__kernel_old_timespec>(), 16usize, - concat!("Size of: ", stringify!(__kernel_old_timespec)) + "Size of __kernel_old_timespec" ); assert_eq!( ::std::mem::align_of::<__kernel_old_timespec>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_old_timespec)) + "Alignment of __kernel_old_timespec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_old_timespec::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_old_timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_old_timespec::tv_nsec" ); } #[repr(C)] @@ -5758,73 +4812,22 @@ fn bindgen_test_layout___kernel_sock_timeval() { assert_eq!( ::std::mem::size_of::<__kernel_sock_timeval>(), 16usize, - concat!("Size of: ", stringify!(__kernel_sock_timeval)) + "Size of __kernel_sock_timeval" ); assert_eq!( ::std::mem::align_of::<__kernel_sock_timeval>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_sock_timeval)) + "Alignment of __kernel_sock_timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: __kernel_sock_timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sock_timeval), - "::", - stringify!(tv_usec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __kernel_old_time_t, - pub tv_nsec: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_timespec() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + "Offset of field: __kernel_sock_timeval::tv_usec" ); } #[repr(C)] @@ -5837,35 +4840,21 @@ pub struct timeval { fn bindgen_test_layout_timeval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); + assert_eq!(::std::mem::size_of::(), 16usize, "Size of timeval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(timeval)) + "Alignment of timeval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) + "Offset of field: timeval::tv_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + "Offset of field: timeval::tv_usec" ); } #[repr(C)] @@ -5881,32 +4870,22 @@ fn bindgen_test_layout_itimerspec() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(itimerspec)) + "Size of itimerspec" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(itimerspec)) + "Alignment of itimerspec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerspec::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) + "Offset of field: itimerspec::it_value" ); } #[repr(C)] @@ -5922,32 +4901,22 @@ fn bindgen_test_layout_itimerval() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(itimerval)) + "Size of itimerval" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(itimerval)) + "Alignment of itimerval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_interval) - ) + "Offset of field: itimerval::it_interval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) + "Offset of field: itimerval::it_value" ); } #[repr(C)] @@ -5963,32 +4932,22 @@ fn bindgen_test_layout_timezone() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(timezone)) + "Size of timezone" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(timezone)) + "Alignment of timezone" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_minuteswest) - ) + "Offset of field: timezone::tz_minuteswest" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) + "Offset of field: timezone::tz_dsttime" ); } pub type sigset_t = ::std::os::raw::c_ulong; @@ -6011,52 +4970,32 @@ fn bindgen_test_layout___kernel_sigaction() { assert_eq!( ::std::mem::size_of::<__kernel_sigaction>(), 32usize, - concat!("Size of: ", stringify!(__kernel_sigaction)) + "Size of __kernel_sigaction" ); assert_eq!( ::std::mem::align_of::<__kernel_sigaction>(), 8usize, - concat!("Alignment of ", stringify!(__kernel_sigaction)) + "Alignment of __kernel_sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_handler) - ) + "Offset of field: __kernel_sigaction::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: __kernel_sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: __kernel_sigaction::sa_restorer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__kernel_sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: __kernel_sigaction::sa_mask" ); } #[repr(C)] @@ -6073,42 +5012,27 @@ fn bindgen_test_layout_sigaltstack() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(sigaltstack)) + "Size of sigaltstack" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaltstack)) + "Alignment of sigaltstack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_sp) - ) + "Offset of field: sigaltstack::ss_sp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_flags) - ) + "Offset of field: sigaltstack::ss_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaltstack), - "::", - stringify!(ss_size) - ) + "Offset of field: sigaltstack::ss_size" ); } pub type stack_t = sigaltstack; @@ -6122,35 +5046,21 @@ pub union sigval { fn bindgen_test_layout_sigval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); + assert_eq!(::std::mem::size_of::(), 8usize, "Size of sigval"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigval)) + "Alignment of sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) + "Offset of field: sigval::sival_int" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) + "Offset of field: sigval::sival_ptr" ); } pub type sigval_t = sigval; @@ -6179,32 +5089,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_1>(), 8usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_1)) + "Size of __sifields__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_1>(), 4usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_1)) + "Alignment of __sifields__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_1::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_1), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_1::_uid" ); } #[repr(C)] @@ -6223,52 +5123,32 @@ fn bindgen_test_layout___sifields__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_2>(), 24usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_2)) + "Size of __sifields__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_2>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_2)) + "Alignment of __sifields__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_tid) - ) + "Offset of field: __sifields__bindgen_ty_2::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._overrun) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_overrun) - ) + "Offset of field: __sifields__bindgen_ty_2::_overrun" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_2::_sigval" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sys_private) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_2), - "::", - stringify!(_sys_private) - ) + "Offset of field: __sifields__bindgen_ty_2::_sys_private" ); } #[repr(C)] @@ -6286,42 +5166,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_3>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_3)) + "Size of __sifields__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_3>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_3)) + "Alignment of __sifields__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_3::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_3::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigval) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_3), - "::", - stringify!(_sigval) - ) + "Offset of field: __sifields__bindgen_ty_3::_sigval" ); } #[repr(C)] @@ -6341,62 +5206,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_4() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_4>(), 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_4)) + "Size of __sifields__bindgen_ty_4" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_4>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_4)) + "Alignment of __sifields__bindgen_ty_4" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_pid) - ) + "Offset of field: __sifields__bindgen_ty_4::_pid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._uid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_uid) - ) + "Offset of field: __sifields__bindgen_ty_4::_uid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._status) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_status) - ) + "Offset of field: __sifields__bindgen_ty_4::_status" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._utime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_utime) - ) + "Offset of field: __sifields__bindgen_ty_4::_utime" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._stime) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_4), - "::", - stringify!(_stime) - ) + "Offset of field: __sifields__bindgen_ty_4::_stime" ); } #[repr(C)] @@ -6429,48 +5269,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_dummy_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_dummy_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._lower) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_lower) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_lower" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._upper) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_upper) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1::_upper" ); } #[repr(C)] @@ -6487,38 +5306,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 12usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2>(), 4usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._dummy_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_dummy_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_dummy_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pkey) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2::_pkey" ); } #[repr(C)] @@ -6526,6 +5329,7 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2() { pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 { pub _data: ::std::os::raw::c_ulong, pub _type: __u32, + pub _flags: __u32, } #[test] fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { @@ -6535,38 +5339,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 16usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._data) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_data) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_data" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._type) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(_type) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_type" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize }, + 12usize, + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3::_flags" ); } #[test] @@ -6577,68 +5370,37 @@ fn bindgen_test_layout___sifields__bindgen_ty_5__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 24usize, - concat!( - "Size of: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Size of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5__bindgen_ty_1>(), 8usize, - concat!( - "Alignment of ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1) - ) + "Alignment of __sifields__bindgen_ty_5__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._trapno) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_trapno) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_trapno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_lsb) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_lsb) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_lsb" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_bnd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_bnd) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_bnd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr_pkey) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_addr_pkey) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_addr_pkey" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._perf) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5__bindgen_ty_1), - "::", - stringify!(_perf) - ) + "Offset of field: __sifields__bindgen_ty_5__bindgen_ty_1::_perf" ); } #[test] @@ -6649,22 +5411,17 @@ fn bindgen_test_layout___sifields__bindgen_ty_5() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_5>(), 32usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_5)) + "Size of __sifields__bindgen_ty_5" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_5>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_5)) + "Alignment of __sifields__bindgen_ty_5" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_5), - "::", - stringify!(_addr) - ) + "Offset of field: __sifields__bindgen_ty_5::_addr" ); } #[repr(C)] @@ -6681,32 +5438,22 @@ fn bindgen_test_layout___sifields__bindgen_ty_6() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_6>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_6)) + "Size of __sifields__bindgen_ty_6" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_6>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_6)) + "Alignment of __sifields__bindgen_ty_6" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._band) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_band) - ) + "Offset of field: __sifields__bindgen_ty_6::_band" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._fd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_6), - "::", - stringify!(_fd) - ) + "Offset of field: __sifields__bindgen_ty_6::_fd" ); } #[repr(C)] @@ -6724,42 +5471,27 @@ fn bindgen_test_layout___sifields__bindgen_ty_7() { assert_eq!( ::std::mem::size_of::<__sifields__bindgen_ty_7>(), 16usize, - concat!("Size of: ", stringify!(__sifields__bindgen_ty_7)) + "Size of __sifields__bindgen_ty_7" ); assert_eq!( ::std::mem::align_of::<__sifields__bindgen_ty_7>(), 8usize, - concat!("Alignment of ", stringify!(__sifields__bindgen_ty_7)) + "Alignment of __sifields__bindgen_ty_7" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._call_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_call_addr) - ) + "Offset of field: __sifields__bindgen_ty_7::_call_addr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._syscall) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_syscall) - ) + "Offset of field: __sifields__bindgen_ty_7::_syscall" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._arch) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(__sifields__bindgen_ty_7), - "::", - stringify!(_arch) - ) + "Offset of field: __sifields__bindgen_ty_7::_arch" ); } #[test] @@ -6769,82 +5501,47 @@ fn bindgen_test_layout___sifields() { assert_eq!( ::std::mem::size_of::<__sifields>(), 32usize, - concat!("Size of: ", stringify!(__sifields)) + "Size of __sifields" ); assert_eq!( ::std::mem::align_of::<__sifields>(), 8usize, - concat!("Alignment of ", stringify!(__sifields)) + "Alignment of __sifields" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._kill) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_kill) - ) + "Offset of field: __sifields::_kill" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._timer) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_timer) - ) + "Offset of field: __sifields::_timer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._rt) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_rt) - ) + "Offset of field: __sifields::_rt" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigchld) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigchld) - ) + "Offset of field: __sifields::_sigchld" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigfault) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigfault) - ) + "Offset of field: __sifields::_sigfault" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigpoll) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigpoll) - ) + "Offset of field: __sifields::_sigpoll" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigsys) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__sifields), - "::", - stringify!(_sigsys) - ) + "Offset of field: __sifields::_sigsys" ); } #[repr(C)] @@ -6874,55 +5571,32 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of siginfo__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_signo) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_errno) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_errno" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(si_code) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::si_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sifields) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_sifields) - ) + "Offset of field: siginfo__bindgen_ty_1__bindgen_ty_1::_sifields" ); } #[test] @@ -6933,22 +5607,17 @@ fn bindgen_test_layout_siginfo__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo__bindgen_ty_1)) + "Size of siginfo__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(siginfo__bindgen_ty_1)) + "Alignment of siginfo__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._si_pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(siginfo__bindgen_ty_1), - "::", - stringify!(_si_pad) - ) + "Offset of field: siginfo__bindgen_ty_1::_si_pad" ); } #[test] @@ -6956,12 +5625,12 @@ fn bindgen_test_layout_siginfo() { assert_eq!( ::std::mem::size_of::(), 128usize, - concat!("Size of: ", stringify!(siginfo)) + "Size of siginfo" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(siginfo)) + "Alignment of siginfo" ); } pub type siginfo_t = siginfo; @@ -6994,38 +5663,22 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 16usize, - concat!( - "Size of: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Size of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1) - ) + "Alignment of sigevent__bindgen_ty_1__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._function) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_function) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_function" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._attribute) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(_attribute) - ) + "Offset of field: sigevent__bindgen_ty_1__bindgen_ty_1::_attribute" ); } #[test] @@ -7036,42 +5689,27 @@ fn bindgen_test_layout_sigevent__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(sigevent__bindgen_ty_1)) + "Size of sigevent__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigevent__bindgen_ty_1)) + "Alignment of sigevent__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._pad) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_pad) - ) + "Offset of field: sigevent__bindgen_ty_1::_pad" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._tid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_tid) - ) + "Offset of field: sigevent__bindgen_ty_1::_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_thread) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent__bindgen_ty_1), - "::", - stringify!(_sigev_thread) - ) + "Offset of field: sigevent__bindgen_ty_1::_sigev_thread" ); } #[test] @@ -7081,52 +5719,32 @@ fn bindgen_test_layout_sigevent() { assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(sigevent)) + "Size of sigevent" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigevent)) + "Alignment of sigevent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) + "Offset of field: sigevent::sigev_value" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) + "Offset of field: sigevent::sigev_signo" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) + "Offset of field: sigevent::sigev_notify" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._sigev_un) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(_sigev_un) - ) + "Offset of field: sigevent::_sigev_un" ); } pub type sigevent_t = sigevent; @@ -7162,32 +5780,22 @@ fn bindgen_test_layout_sigaction__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigaction__bindgen_ty_1)) + "Size of sigaction__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction__bindgen_ty_1)) + "Alignment of sigaction__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -7197,42 +5805,27 @@ fn bindgen_test_layout_sigaction() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(sigaction)) + "Size of sigaction" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction)) + "Alignment of sigaction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction::sa_restorer" ); } #[repr(C)] @@ -7263,32 +5856,22 @@ fn bindgen_test_layout_sigaction64__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(sigaction64__bindgen_ty_1)) + "Size of sigaction64__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction64__bindgen_ty_1)) + "Alignment of sigaction64__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_handler) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_handler) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_handler" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_sigaction) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64__bindgen_ty_1), - "::", - stringify!(sa_sigaction) - ) + "Offset of field: sigaction64__bindgen_ty_1::sa_sigaction" ); } #[test] @@ -7298,42 +5881,27 @@ fn bindgen_test_layout_sigaction64() { assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(sigaction64)) + "Size of sigaction64" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(sigaction64)) + "Alignment of sigaction64" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_flags) - ) + "Offset of field: sigaction64::sa_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_mask) - ) + "Offset of field: sigaction64::sa_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_restorer) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(sigaction64), - "::", - stringify!(sa_restorer) - ) + "Offset of field: sigaction64::sa_restorer" ); } #[repr(C)] @@ -7358,122 +5926,67 @@ fn bindgen_test_layout_user_fpregs_struct() { assert_eq!( ::std::mem::size_of::(), 512usize, - concat!("Size of: ", stringify!(user_fpregs_struct)) + "Size of user_fpregs_struct" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(user_fpregs_struct)) + "Alignment of user_fpregs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(cwd) - ) + "Offset of field: user_fpregs_struct::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(swd) - ) + "Offset of field: user_fpregs_struct::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ftw) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(ftw) - ) + "Offset of field: user_fpregs_struct::ftw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(fop) - ) + "Offset of field: user_fpregs_struct::fop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(rip) - ) + "Offset of field: user_fpregs_struct::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(rdp) - ) + "Offset of field: user_fpregs_struct::rdp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(mxcsr) - ) + "Offset of field: user_fpregs_struct::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcr_mask) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(mxcr_mask) - ) + "Offset of field: user_fpregs_struct::mxcr_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).st_space) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(st_space) - ) + "Offset of field: user_fpregs_struct::st_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xmm_space) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(xmm_space) - ) + "Offset of field: user_fpregs_struct::xmm_space" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 416usize, - concat!( - "Offset of field: ", - stringify!(user_fpregs_struct), - "::", - stringify!(padding) - ) + "Offset of field: user_fpregs_struct::padding" ); } #[repr(C)] @@ -7514,282 +6027,147 @@ fn bindgen_test_layout_user_regs_struct() { assert_eq!( ::std::mem::size_of::(), 216usize, - concat!("Size of: ", stringify!(user_regs_struct)) + "Size of user_regs_struct" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(user_regs_struct)) + "Alignment of user_regs_struct" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r15) - ) + "Offset of field: user_regs_struct::r15" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r14) - ) + "Offset of field: user_regs_struct::r14" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r13) - ) + "Offset of field: user_regs_struct::r13" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r12) - ) + "Offset of field: user_regs_struct::r12" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rbp) - ) + "Offset of field: user_regs_struct::rbp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rbx) - ) + "Offset of field: user_regs_struct::rbx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r11) - ) + "Offset of field: user_regs_struct::r11" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r10) - ) + "Offset of field: user_regs_struct::r10" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r9) - ) + "Offset of field: user_regs_struct::r9" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(r8) - ) + "Offset of field: user_regs_struct::r8" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rax) - ) + "Offset of field: user_regs_struct::rax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rcx) - ) + "Offset of field: user_regs_struct::rcx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rdx) - ) + "Offset of field: user_regs_struct::rdx" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rsi) - ) + "Offset of field: user_regs_struct::rsi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rdi) - ) + "Offset of field: user_regs_struct::rdi" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).orig_rax) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(orig_rax) - ) + "Offset of field: user_regs_struct::orig_rax" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 128usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rip) - ) + "Offset of field: user_regs_struct::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(cs) - ) + "Offset of field: user_regs_struct::cs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eflags) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(eflags) - ) + "Offset of field: user_regs_struct::eflags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize }, 152usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(rsp) - ) + "Offset of field: user_regs_struct::rsp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ss) - ) + "Offset of field: user_regs_struct::ss" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs_base) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(fs_base) - ) + "Offset of field: user_regs_struct::fs_base" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs_base) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(gs_base) - ) + "Offset of field: user_regs_struct::gs_base" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(ds) - ) + "Offset of field: user_regs_struct::ds" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(es) - ) + "Offset of field: user_regs_struct::es" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(fs) - ) + "Offset of field: user_regs_struct::fs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize }, 208usize, - concat!( - "Offset of field: ", - stringify!(user_regs_struct), - "::", - stringify!(gs) - ) + "Offset of field: user_regs_struct::gs" ); } #[repr(C)] @@ -7819,205 +6197,102 @@ pub struct user { fn bindgen_test_layout_user() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 928usize, - concat!("Size of: ", stringify!(user)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(user)) - ); + assert_eq!(::std::mem::size_of::(), 928usize, "Size of user"); + assert_eq!(::std::mem::align_of::(), 8usize, "Alignment of user"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(regs) - ) + "Offset of field: user::regs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fpvalid) as usize - ptr as usize }, 216usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpvalid) - ) + "Offset of field: user::u_fpvalid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad0) as usize - ptr as usize }, 220usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(pad0) - ) + "Offset of field: user::pad0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).i387) as usize - ptr as usize }, 224usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(i387) - ) + "Offset of field: user::i387" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_tsize) as usize - ptr as usize }, 736usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_tsize) - ) + "Offset of field: user::u_tsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_dsize) as usize - ptr as usize }, 744usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_dsize) - ) + "Offset of field: user::u_dsize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ssize) as usize - ptr as usize }, 752usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ssize) - ) + "Offset of field: user::u_ssize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_code) as usize - ptr as usize }, 760usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_code) - ) + "Offset of field: user::start_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).start_stack) as usize - ptr as usize }, 768usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(start_stack) - ) + "Offset of field: user::start_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, 776usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(signal) - ) + "Offset of field: user::signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 784usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(reserved) - ) + "Offset of field: user::reserved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize }, 788usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(pad1) - ) + "Offset of field: user::pad1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_ar0) as usize - ptr as usize }, 792usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_ar0) - ) + "Offset of field: user::u_ar0" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_fpstate) as usize - ptr as usize }, 800usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_fpstate) - ) + "Offset of field: user::u_fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 808usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(magic) - ) + "Offset of field: user::magic" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_comm) as usize - ptr as usize }, 816usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_comm) - ) + "Offset of field: user::u_comm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u_debugreg) as usize - ptr as usize }, 848usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(u_debugreg) - ) + "Offset of field: user::u_debugreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, 912usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(error_code) - ) + "Offset of field: user::error_code" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fault_address) as usize - ptr as usize }, 920usize, - concat!( - "Offset of field: ", - stringify!(user), - "::", - stringify!(fault_address) - ) + "Offset of field: user::fault_address" ); } pub const REG_R8: _bindgen_ty_22 = 0; @@ -8061,42 +6336,27 @@ fn bindgen_test_layout__libc_fpxreg() { assert_eq!( ::std::mem::size_of::<_libc_fpxreg>(), 16usize, - concat!("Size of: ", stringify!(_libc_fpxreg)) + "Size of _libc_fpxreg" ); assert_eq!( ::std::mem::align_of::<_libc_fpxreg>(), 2usize, - concat!("Alignment of ", stringify!(_libc_fpxreg)) + "Alignment of _libc_fpxreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).significand) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(significand) - ) + "Offset of field: _libc_fpxreg::significand" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(exponent) - ) + "Offset of field: _libc_fpxreg::exponent" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpxreg), - "::", - stringify!(padding) - ) + "Offset of field: _libc_fpxreg::padding" ); } #[repr(C)] @@ -8111,22 +6371,17 @@ fn bindgen_test_layout__libc_xmmreg() { assert_eq!( ::std::mem::size_of::<_libc_xmmreg>(), 16usize, - concat!("Size of: ", stringify!(_libc_xmmreg)) + "Size of _libc_xmmreg" ); assert_eq!( ::std::mem::align_of::<_libc_xmmreg>(), 4usize, - concat!("Alignment of ", stringify!(_libc_xmmreg)) + "Alignment of _libc_xmmreg" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).element) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_xmmreg), - "::", - stringify!(element) - ) + "Offset of field: _libc_xmmreg::element" ); } #[repr(C)] @@ -8151,122 +6406,67 @@ fn bindgen_test_layout__libc_fpstate() { assert_eq!( ::std::mem::size_of::<_libc_fpstate>(), 512usize, - concat!("Size of: ", stringify!(_libc_fpstate)) + "Size of _libc_fpstate" ); assert_eq!( ::std::mem::align_of::<_libc_fpstate>(), 8usize, - concat!("Alignment of ", stringify!(_libc_fpstate)) + "Alignment of _libc_fpstate" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cwd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(cwd) - ) + "Offset of field: _libc_fpstate::cwd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).swd) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(swd) - ) + "Offset of field: _libc_fpstate::swd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ftw) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(ftw) - ) + "Offset of field: _libc_fpstate::ftw" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(fop) - ) + "Offset of field: _libc_fpstate::fop" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(rip) - ) + "Offset of field: _libc_fpstate::rip" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(rdp) - ) + "Offset of field: _libc_fpstate::rdp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(mxcsr) - ) + "Offset of field: _libc_fpstate::mxcsr" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mxcr_mask) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(mxcr_mask) - ) + "Offset of field: _libc_fpstate::mxcr_mask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._st) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_st) - ) + "Offset of field: _libc_fpstate::_st" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr)._xmm) as usize - ptr as usize }, 160usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(_xmm) - ) + "Offset of field: _libc_fpstate::_xmm" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, 416usize, - concat!( - "Offset of field: ", - stringify!(_libc_fpstate), - "::", - stringify!(padding) - ) + "Offset of field: _libc_fpstate::padding" ); } pub type fpregset_t = *mut _libc_fpstate; @@ -8284,42 +6484,27 @@ fn bindgen_test_layout_mcontext_t() { assert_eq!( ::std::mem::size_of::(), 256usize, - concat!("Size of: ", stringify!(mcontext_t)) + "Size of mcontext_t" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(mcontext_t)) + "Alignment of mcontext_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gregs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(gregs) - ) + "Offset of field: mcontext_t::gregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fpregs) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(fpregs) - ) + "Offset of field: mcontext_t::fpregs" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__reserved1) as usize - ptr as usize }, 192usize, - concat!( - "Offset of field: ", - stringify!(mcontext_t), - "::", - stringify!(__reserved1) - ) + "Offset of field: mcontext_t::__reserved1" ); } #[repr(C)] @@ -8346,32 +6531,22 @@ fn bindgen_test_layout_ucontext__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(ucontext__bindgen_ty_1)) + "Size of ucontext__bindgen_ty_1" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ucontext__bindgen_ty_1)) + "Alignment of ucontext__bindgen_ty_1" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask64) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext__bindgen_ty_1), - "::", - stringify!(uc_sigmask64) - ) + "Offset of field: ucontext__bindgen_ty_1::uc_sigmask64" ); } #[test] @@ -8381,62 +6556,37 @@ fn bindgen_test_layout_ucontext() { assert_eq!( ::std::mem::size_of::(), 816usize, - concat!("Size of: ", stringify!(ucontext)) + "Size of ucontext" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(ucontext)) + "Alignment of ucontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_flags) - ) + "Offset of field: ucontext::uc_flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_link) - ) + "Offset of field: ucontext::uc_link" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_stack) - ) + "Offset of field: ucontext::uc_stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(uc_mcontext) - ) + "Offset of field: ucontext::uc_mcontext" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__fpregs_mem) as usize - ptr as usize }, 304usize, - concat!( - "Offset of field: ", - stringify!(ucontext), - "::", - stringify!(__fpregs_mem) - ) + "Offset of field: ucontext::__fpregs_mem" ); } pub type ucontext_t = ucontext; @@ -8645,25 +6795,16 @@ pub struct fd_set { fn bindgen_test_layout_fd_set() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); + assert_eq!(::std::mem::size_of::(), 128usize, "Size of fd_set"); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(fd_set)) + "Alignment of fd_set" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) + "Offset of field: fd_set::fds_bits" ); } extern "C" { @@ -8767,125 +6908,62 @@ pub struct tm { fn bindgen_test_layout_tm() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); + assert_eq!(::std::mem::size_of::(), 56usize, "Size of tm"); + assert_eq!(::std::mem::align_of::(), 8usize, "Alignment of tm"); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) + "Offset of field: tm::tm_sec" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) + "Offset of field: tm::tm_min" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) + "Offset of field: tm::tm_hour" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) + "Offset of field: tm::tm_mday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) + "Offset of field: tm::tm_mon" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) + "Offset of field: tm::tm_year" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) + "Offset of field: tm::tm_wday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) + "Offset of field: tm::tm_yday" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) + "Offset of field: tm::tm_isdst" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) + "Offset of field: tm::tm_gmtoff" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) + "Offset of field: tm::tm_zone" ); } extern "C" { @@ -8918,12 +6996,18 @@ extern "C" { extern "C" { pub fn localtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timelocal(__tm: *mut tm) -> time_t; +} extern "C" { pub fn gmtime(__t: *const time_t) -> *mut tm; } extern "C" { pub fn gmtime_r(__t: *const time_t, __tm: *mut tm) -> *mut tm; } +extern "C" { + pub fn timegm(__tm: *mut tm) -> time_t; +} extern "C" { pub fn strptime( __s: *const ::std::os::raw::c_char, @@ -9010,23 +7094,23 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn timer_gettime(__timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; + pub fn timer_gettime(_timer: timer_t, __ts: *mut itimerspec) -> ::std::os::raw::c_int; } extern "C" { pub fn timer_getoverrun(__timer: timer_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn timelocal(__tm: *mut tm) -> time_t; -} -extern "C" { - pub fn timegm(__tm: *mut tm) -> time_t; -} extern "C" { pub fn timespec_get( __ts: *mut timespec, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn timespec_getres( + __ts: *mut timespec, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} pub type nfds_t = ::std::os::raw::c_uint; extern "C" { pub fn poll( @@ -9073,122 +7157,67 @@ fn bindgen_test_layout_clone_args() { assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(clone_args)) + "Size of clone_args" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(clone_args)) + "Alignment of clone_args" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(flags) - ) + "Offset of field: clone_args::flags" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pidfd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(pidfd) - ) + "Offset of field: clone_args::pidfd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).child_tid) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(child_tid) - ) + "Offset of field: clone_args::child_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent_tid) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(parent_tid) - ) + "Offset of field: clone_args::parent_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exit_signal) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(exit_signal) - ) + "Offset of field: clone_args::exit_signal" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack) - ) + "Offset of field: clone_args::stack" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stack_size) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(stack_size) - ) + "Offset of field: clone_args::stack_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tls) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(tls) - ) + "Offset of field: clone_args::tls" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid) - ) + "Offset of field: clone_args::set_tid" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tid_size) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(set_tid_size) - ) + "Offset of field: clone_args::set_tid_size" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cgroup) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(clone_args), - "::", - stringify!(cgroup) - ) + "Offset of field: clone_args::cgroup" ); } #[repr(C)] @@ -9203,22 +7232,17 @@ fn bindgen_test_layout_sched_param() { assert_eq!( ::std::mem::size_of::(), 4usize, - concat!("Size of: ", stringify!(sched_param)) + "Size of sched_param" ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(sched_param)) + "Alignment of sched_param" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sched_param), - "::", - stringify!(sched_priority) - ) + "Offset of field: sched_param::sched_priority" ); } extern "C" { @@ -9259,13 +7283,12 @@ pub type _bindgen_ty_23 = ::std::os::raw::c_uint; pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_24 = 0; pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_24 = 1; pub type _bindgen_ty_24 = ::std::os::raw::c_uint; -pub type __pthread_cleanup_func_t = - ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cleanup_t { pub __cleanup_prev: *mut __pthread_cleanup_t, - pub __cleanup_routine: __pthread_cleanup_func_t, + pub __cleanup_routine: + ::std::option::Option, pub __cleanup_arg: *mut ::std::os::raw::c_void, } #[test] @@ -9275,48 +7298,33 @@ fn bindgen_test_layout___pthread_cleanup_t() { assert_eq!( ::std::mem::size_of::<__pthread_cleanup_t>(), 24usize, - concat!("Size of: ", stringify!(__pthread_cleanup_t)) + "Size of __pthread_cleanup_t" ); assert_eq!( ::std::mem::align_of::<__pthread_cleanup_t>(), 8usize, - concat!("Alignment of ", stringify!(__pthread_cleanup_t)) + "Alignment of __pthread_cleanup_t" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_prev) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_prev) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_prev" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_routine) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_routine) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_routine" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_arg) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__pthread_cleanup_t), - "::", - stringify!(__cleanup_arg) - ) + "Offset of field: __pthread_cleanup_t::__cleanup_arg" ); } extern "C" { pub fn __pthread_cleanup_push( c: *mut __pthread_cleanup_t, - arg1: __pthread_cleanup_func_t, + arg1: ::std::option::Option, arg2: *mut ::std::os::raw::c_void, ); } @@ -9343,42 +7351,27 @@ fn bindgen_test_layout_android_poll_source() { assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(android_poll_source)) + "Size of android_poll_source" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_poll_source)) + "Alignment of android_poll_source" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(id) - ) + "Offset of field: android_poll_source::id" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).app) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(app) - ) + "Offset of field: android_poll_source::app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).process) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_poll_source), - "::", - stringify!(process) - ) + "Offset of field: android_poll_source::process" ); } #[repr(C)] @@ -9404,72 +7397,42 @@ fn bindgen_test_layout_android_input_buffer() { assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(android_input_buffer)) + "Size of android_input_buffer" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_input_buffer)) + "Alignment of android_input_buffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEvents) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEvents) - ) + "Offset of field: android_input_buffer::motionEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsCount) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsCount) - ) + "Offset of field: android_input_buffer::motionEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventsBufferSize) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(motionEventsBufferSize) - ) + "Offset of field: android_input_buffer::motionEventsBufferSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEvents) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEvents) - ) + "Offset of field: android_input_buffer::keyEvents" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsCount) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsCount) - ) + "Offset of field: android_input_buffer::keyEventsCount" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventsBufferSize) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(android_input_buffer), - "::", - stringify!(keyEventsBufferSize) - ) + "Offset of field: android_input_buffer::keyEventsBufferSize" ); } #[doc = " Function pointer declaration for the filtering of key events.\n A function with this signature should be passed to\n android_app_set_key_event_filter and return false for any events that should\n not be handled by android_native_app_glue. These events will be handled by\n the system instead."] @@ -9499,6 +7462,10 @@ pub struct android_app { pub window: *mut ANativeWindow, #[doc = " Current content rectangle of the window; this is the area where the\n window's content should be placed to be seen by the user."] pub contentRect: ARect, + #[doc = " Whether the software keyboard is visible or not."] + pub softwareKeyboardVisible: bool, + #[doc = " Last editor action. Valid within APP_CMD_SOFTWARE_KB_VIS_CHANGED handler.\n\n Note: the upstream comment above isn't accurate.\n - `APP_CMD_SOFTWARE_KB_VIS_CHANGED` is associated with `softwareKeyboardVisible`\n changes, not `editorAction`.\n - `APP_CMD_EDITOR_ACTION` is associated with this state but unlike for\n `window` state there's no synchonization that blocks the Java main\n thread, so we can't say that this is only valid within the `APP_CMD_` handler."] + pub editorAction: ::std::os::raw::c_int, #[doc = " Current state of the app's activity. May be either APP_CMD_START,\n APP_CMD_RESUME, APP_CMD_PAUSE, or APP_CMD_STOP."] pub activityState: ::std::os::raw::c_int, #[doc = " This is non-zero when the application's GameActivity is being\n destroyed and waiting for the app thread to complete."] @@ -9532,313 +7499,173 @@ fn bindgen_test_layout_android_app() { let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 384usize, - concat!("Size of: ", stringify!(android_app)) + 392usize, + "Size of android_app" ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(android_app)) + "Alignment of android_app" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(userData) - ) + "Offset of field: android_app::userData" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onAppCmd) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(onAppCmd) - ) + "Offset of field: android_app::onAppCmd" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activity) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activity) - ) + "Offset of field: android_app::activity" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).config) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(config) - ) + "Offset of field: android_app::config" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedState) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedState) - ) + "Offset of field: android_app::savedState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).savedStateSize) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(savedStateSize) - ) + "Offset of field: android_app::savedStateSize" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).looper) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(looper) - ) + "Offset of field: android_app::looper" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(window) - ) + "Offset of field: android_app::window" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).contentRect) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(contentRect) - ) + "Offset of field: android_app::contentRect" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).softwareKeyboardVisible) as usize - ptr as usize }, + 80usize, + "Offset of field: android_app::softwareKeyboardVisible" + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).editorAction) as usize - ptr as usize }, + 84usize, + "Offset of field: android_app::editorAction" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).activityState) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(activityState) - ) + 88usize, + "Offset of field: android_app::activityState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyRequested) as usize - ptr as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyRequested) - ) + 92usize, + "Offset of field: android_app::destroyRequested" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBuffers) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputBuffers) - ) + 96usize, + "Offset of field: android_app::inputBuffers" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).currentInputBuffer) as usize - ptr as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(currentInputBuffer) - ) + 192usize, + "Offset of field: android_app::currentInputBuffer" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textInputState) as usize - ptr as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(textInputState) - ) + 196usize, + "Offset of field: android_app::textInputState" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mutex) as usize - ptr as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(mutex) - ) + 200usize, + "Offset of field: android_app::mutex" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cond) as usize - ptr as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cond) - ) + 240usize, + "Offset of field: android_app::cond" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgread) as usize - ptr as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgread) - ) + 288usize, + "Offset of field: android_app::msgread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msgwrite) as usize - ptr as usize }, - 284usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(msgwrite) - ) + 292usize, + "Offset of field: android_app::msgwrite" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).thread) as usize - ptr as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(thread) - ) + 296usize, + "Offset of field: android_app::thread" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmdPollSource) as usize - ptr as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(cmdPollSource) - ) + 304usize, + "Offset of field: android_app::cmdPollSource" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(running) - ) + 328usize, + "Offset of field: android_app::running" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSaved) as usize - ptr as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(stateSaved) - ) + 332usize, + "Offset of field: android_app::stateSaved" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).destroyed) as usize - ptr as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(destroyed) - ) + 336usize, + "Offset of field: android_app::destroyed" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).redrawNeeded) as usize - ptr as usize }, - 332usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(redrawNeeded) - ) + 340usize, + "Offset of field: android_app::redrawNeeded" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingWindow) as usize - ptr as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingWindow) - ) + 344usize, + "Offset of field: android_app::pendingWindow" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pendingContentRect) as usize - ptr as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(pendingContentRect) - ) + 352usize, + "Offset of field: android_app::pendingContentRect" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyEventFilter) as usize - ptr as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(keyEventFilter) - ) + 368usize, + "Offset of field: android_app::keyEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).motionEventFilter) as usize - ptr as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(motionEventFilter) - ) + 376usize, + "Offset of field: android_app::motionEventFilter" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputAvailableWakeUp) as usize - ptr as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputAvailableWakeUp) - ) + 384usize, + "Offset of field: android_app::inputAvailableWakeUp" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputSwapPending) as usize - ptr as usize }, - 377usize, - concat!( - "Offset of field: ", - stringify!(android_app), - "::", - stringify!(inputSwapPending) - ) + 385usize, + "Offset of field: android_app::inputSwapPending" ); } #[doc = " Looper data ID of commands coming from the app's main thread, which\n is returned as an identifier from ALooper_pollOnce(). The data for this\n identifier is a pointer to an android_poll_source structure.\n These can be retrieved and processed with android_app_read_cmd()\n and android_app_exec_cmd()."] @@ -9848,7 +7675,7 @@ pub const NativeAppGlueLooperId_LOOPER_ID_INPUT: NativeAppGlueLooperId = 2; #[doc = " Start of user-defined ALooper identifiers."] pub const NativeAppGlueLooperId_LOOPER_ID_USER: NativeAppGlueLooperId = 3; #[doc = " Looper ID of commands coming from the app's main thread, an AInputQueue or\n user-defined sources."] -pub type NativeAppGlueLooperId = ::std::os::raw::c_uint; +pub type NativeAppGlueLooperId = i8; #[doc = " Unused. Reserved for future use when usage of AInputQueue will be\n supported."] pub const NativeAppGlueAppCmd_UNUSED_APP_CMD_INPUT_CHANGED: NativeAppGlueAppCmd = 0; #[doc = " Command from main thread: a new ANativeWindow is ready for use. Upon\n receiving this command, android_app->window will contain the new window\n surface."] @@ -9861,30 +7688,32 @@ pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_RESIZED: NativeAppGlueAppCmd = 3; pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_REDRAW_NEEDED: NativeAppGlueAppCmd = 4; #[doc = " Command from main thread: the content area of the window has changed,\n such as from the soft input window being shown or hidden. You can\n find the new content rect in android_app::contentRect."] pub const NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED: NativeAppGlueAppCmd = 5; +#[doc = " Command from main thread: the software keyboard was shown or hidden."] +pub const NativeAppGlueAppCmd_APP_CMD_SOFTWARE_KB_VIS_CHANGED: NativeAppGlueAppCmd = 6; #[doc = " Command from main thread: the app's activity window has gained\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 6; +pub const NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS: NativeAppGlueAppCmd = 7; #[doc = " Command from main thread: the app's activity window has lost\n input focus."] -pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 7; +pub const NativeAppGlueAppCmd_APP_CMD_LOST_FOCUS: NativeAppGlueAppCmd = 8; #[doc = " Command from main thread: the current device configuration has changed."] -pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 8; +pub const NativeAppGlueAppCmd_APP_CMD_CONFIG_CHANGED: NativeAppGlueAppCmd = 9; #[doc = " Command from main thread: the system is running low on memory.\n Try to reduce your memory use."] -pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 9; +pub const NativeAppGlueAppCmd_APP_CMD_LOW_MEMORY: NativeAppGlueAppCmd = 10; #[doc = " Command from main thread: the app's activity has been started."] -pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 10; +pub const NativeAppGlueAppCmd_APP_CMD_START: NativeAppGlueAppCmd = 11; #[doc = " Command from main thread: the app's activity has been resumed."] -pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 11; +pub const NativeAppGlueAppCmd_APP_CMD_RESUME: NativeAppGlueAppCmd = 12; #[doc = " Command from main thread: the app should generate a new saved state\n for itself, to restore from later if needed. If you have saved state,\n allocate it with malloc and place it in android_app.savedState with\n the size in android_app.savedStateSize. The will be freed for you\n later."] -pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 12; +pub const NativeAppGlueAppCmd_APP_CMD_SAVE_STATE: NativeAppGlueAppCmd = 13; #[doc = " Command from main thread: the app's activity has been paused."] -pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 13; +pub const NativeAppGlueAppCmd_APP_CMD_PAUSE: NativeAppGlueAppCmd = 14; #[doc = " Command from main thread: the app's activity has been stopped."] -pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 14; +pub const NativeAppGlueAppCmd_APP_CMD_STOP: NativeAppGlueAppCmd = 15; #[doc = " Command from main thread: the app's activity is being destroyed,\n and waiting for the app thread to clean up and exit before proceeding."] -pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 15; +pub const NativeAppGlueAppCmd_APP_CMD_DESTROY: NativeAppGlueAppCmd = 16; #[doc = " Command from main thread: the app's insets have changed."] -pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 16; -#[doc = " Commands passed from the application's main Java thread to the game's thread."] -pub type NativeAppGlueAppCmd = ::std::os::raw::c_uint; +pub const NativeAppGlueAppCmd_APP_CMD_WINDOW_INSETS_CHANGED: NativeAppGlueAppCmd = 17; +#[doc = " Commands passed from the application's main Java thread to the game's thread.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] +pub type NativeAppGlueAppCmd = i8; extern "C" { #[doc = " Call when ALooper_pollAll() returns LOOPER_ID_MAIN, reading the next\n app command message."] pub fn android_app_read_cmd(android_app: *mut android_app) -> i8; @@ -9929,6 +7758,10 @@ extern "C" { filter: android_motion_event_filter, ); } +extern "C" { + #[doc = " You can send your custom events using the function below.\n\n Make sure your custom codes do not overlap with this library's ones.\n\n Values from 0 to 127 are reserved for this library; values from -128 to -1\n can be used for custom user's events."] + pub fn android_app_write_cmd(android_app: *mut android_app, cmd: i8); +} extern "C" { #[doc = " Determines if a looper wake up was due to new input becoming available"] pub fn android_app_input_available_wake_up(app: *mut android_app) -> bool; @@ -9949,51 +7782,31 @@ fn bindgen_test_layout___va_list_tag() { assert_eq!( ::std::mem::size_of::<__va_list_tag>(), 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) + "Size of __va_list_tag" ); assert_eq!( ::std::mem::align_of::<__va_list_tag>(), 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) + "Alignment of __va_list_tag" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) + "Offset of field: __va_list_tag::gp_offset" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) + "Offset of field: __va_list_tag::fp_offset" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) + "Offset of field: __va_list_tag::overflow_arg_area" ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) + "Offset of field: __va_list_tag::reg_save_area" ); }